diff options
1295 files changed, 16857 insertions, 13401 deletions
diff --git a/builddefs/build_keyboard.mk b/builddefs/build_keyboard.mk index 8427573181..ccd7e50b05 100644 --- a/builddefs/build_keyboard.mk +++ b/builddefs/build_keyboard.mk @@ -212,7 +212,12 @@ $(INTERMEDIATE_OUTPUT)/src/config.h: $(KEYMAP_JSON) $(eval CMD=$(QMK_BIN) generate-config-h --quiet --output $(KEYMAP_H) $(KEYMAP_JSON)) @$(BUILD_CMD) -generated-files: $(INTERMEDIATE_OUTPUT)/src/config.h $(INTERMEDIATE_OUTPUT)/src/keymap.c +$(INTERMEDIATE_OUTPUT)/src/keymap.h: $(KEYMAP_JSON) + @$(SILENT) || printf "$(MSG_GENERATING) $@" | $(AWK_CMD) + $(eval CMD=$(QMK_BIN) generate-keymap-h --quiet --output $(INTERMEDIATE_OUTPUT)/src/keymap.h $(KEYMAP_JSON)) + @$(BUILD_CMD) + +generated-files: $(INTERMEDIATE_OUTPUT)/src/config.h $(INTERMEDIATE_OUTPUT)/src/keymap.c $(INTERMEDIATE_OUTPUT)/src/keymap.h endif diff --git a/builddefs/build_test.mk b/builddefs/build_test.mk index 2cc1134da5..d0de63c6f5 100644 --- a/builddefs/build_test.mk +++ b/builddefs/build_test.mk @@ -47,7 +47,8 @@ PLATFORM:=TEST PLATFORM_KEY:=test BOOTLOADER_TYPE:=none -ifeq ($(strip $(DEBUG)), 1) +DEBUG ?= 0 +ifneq ($(strip $(DEBUG)), 0) CONSOLE_ENABLE = yes endif diff --git a/builddefs/common_features.mk b/builddefs/common_features.mk index 68f9a1dd08..498614dd26 100644 --- a/builddefs/common_features.mk +++ b/builddefs/common_features.mk @@ -282,18 +282,17 @@ ifneq ($(strip $(WEAR_LEVELING_DRIVER)),none) endif endif -VALID_FLASH_DRIVER_TYPES := spi +VALID_FLASH_DRIVER_TYPES := spi custom FLASH_DRIVER ?= none ifneq ($(strip $(FLASH_DRIVER)), none) ifeq ($(filter $(FLASH_DRIVER),$(VALID_FLASH_DRIVER_TYPES)),) $(call CATASTROPHIC_ERROR,Invalid FLASH_DRIVER,FLASH_DRIVER="$(FLASH_DRIVER)" is not a valid flash driver) else - OPT_DEFS += -DFLASH_ENABLE + OPT_DEFS += -DFLASH_ENABLE -DFLASH_DRIVER -DFLASH_DRIVER_$(strip $(shell echo $(FLASH_DRIVER) | tr '[:lower:]' '[:upper:]')) + COMMON_VPATH += $(DRIVER_PATH)/flash ifeq ($(strip $(FLASH_DRIVER)),spi) - SPI_DRIVER_REQUIRED = yes - OPT_DEFS += -DFLASH_DRIVER -DFLASH_SPI - COMMON_VPATH += $(DRIVER_PATH)/flash SRC += flash_spi.c + SPI_DRIVER_REQUIRED = yes endif endif endif diff --git a/data/constants/keycodes/extras/keycodes_farsi_0.0.1.hjson b/data/constants/keycodes/extras/keycodes_farsi_0.0.1.hjson new file mode 100644 index 0000000000..d59b6fab26 --- /dev/null +++ b/data/constants/keycodes/extras/keycodes_farsi_0.0.1.hjson @@ -0,0 +1,616 @@ +{ + "aliases": { +/* + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │ │ ۱ │ ۲ │ ۳ │ ۴ │ ۵ │ ۶ │ ۷ │ ۸ │ ۹ │ ۰ │ - │ = │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │ │ ض │ ص │ ث │ ق │ ف │ غ │ ع │ ه │ خ │ ح │ ج │ چ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ + * │ │ ش │ س │ ی │ ب │ ل │ ا │ ت │ ن │ م │ ک │ گ │ \ │ │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ + * │ │ < │ ظ │ ط │ ز │ ر │ ذ │ د │ پ │ و │ . │ / │ │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ + * │ │ │ │ │ │ │ │ │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ + */ + "KC_GRV": { + "key": "FA_ZWJ", + "label": "(zero-width joiner)", + } + "KC_1": { + "key": "FA_1A", + "label": "۱", + } + "KC_2": { + "key": "FA_2A", + "label": "۲", + } + "KC_3": { + "key": "FA_3A", + "label": "۳", + } + "KC_4": { + "key": "FA_4A", + "label": "۴", + } + "KC_5": { + "key": "FA_5A", + "label": "۵", + } + "KC_6": { + "key": "FA_6A", + "label": "۶", + } + "KC_7": { + "key": "FA_7A", + "label": "۷", + } + "KC_8": { + "key": "FA_8A", + "label": "۸", + } + "KC_9": { + "key": "FA_9A", + "label": "۹", + } + "KC_0": { + "key": "FA_0A", + "label": "۰", + } + "KC_MINS": { + "key": "FA_MINS", + "label": "-", + } + "KC_EQL": { + "key": "FA_EQL", + "label": "=", + } + "KC_Q": { + "key": "FA_ZAD", + "label": "ض", + } + "KC_W": { + "key": "FA_SAD", + "label": "ص", + } + "KC_E": { + "key": "FA_SE", + "label": "ث", + } + "KC_R": { + "key": "FA_QAF", + "label": "ق", + } + "KC_T": { + "key": "FA_FE", + "label": "ف", + } + "KC_Y": { + "key": "FA_GHYN", + "label": "غ", + } + "KC_U": { + "key": "FA_EYN", + "label": "ع", + } + "KC_I": { + "key": "FA_HE", + "label": "ه", + } + "KC_O": { + "key": "FA_KHE", + "label": "خ", + } + "KC_P": { + "key": "FA_HEJ", + "label": "ح", + } + "KC_LBRC": { + "key": "FA_JIM", + "label": "ج", + } + "KC_RBRC": { + "key": "FA_CHE", + "label": "چ", + } + "KC_A": { + "key": "FA_SHIN", + "label": "ش", + } + "KC_S": { + "key": "FA_SIN", + "label": "س", + } + "KC_D": { + "key": "FA_YE", + "label": "ی", + } + "KC_F": { + "key": "FA_BE", + "label": "ب", + } + "KC_G": { + "key": "FA_LAM", + "label": "ل", + } + "KC_H": { + "key": "FA_ALEF", + "label": "ا", + } + "KC_J": { + "key": "FA_TE", + "label": "ت", + } + "KC_K": { + "key": "FA_NOON", + "label": "ن", + } + "KC_L": { + "key": "FA_MIM", + "label": "م", + } + "KC_SCLN": { + "key": "FA_KAF", + "label": "ک", + } + "KC_QUOT": { + "key": "FA_GAF", + "label": "گ", + } + "KC_BSLS": { + "key": "FA_BSLS", + "label": "\\", + } + "KC_LT": { + "key": "FA_LT", + "label": "<", + } + "KC_Z": { + "key": "FA_ZA", + "label": "ظ", + } + "KC_X": { + "key": "FA_TA", + "label": "ط", + } + "KC_C": { + "key": "FA_ZE", + "label": "ز", + } + "KC_V": { + "key": "FA_RE", + "label": "ر", + } + "KC_B": { + "key": "FA_ZAL", + "label": "ذ", + } + "KC_N": { + "key": "FA_DAL", + "label": "د", + } + "KC_M": { + "key": "FA_PE", + "label": "پ", + } + "KC_COMM": { + "key": "FA_WAW", + "label": "و", + } + "KC_DOT": { + "key": "FA_DOT", + "label": ".", + } + "KC_SLSH": { + "key": "FA_SLSH", + "label": "/", + } + "KC_SPC": { + "key": "FA_SPC", + "label": " ", + } +/* Shifted symbols + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │ ÷ │ ! │ ٬ │ ٫ │ ﷼ │ ٪ │ × │ ، │ * │ ) │ ( │ ـ │ + │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │ │ ْ │ ٌ │ ٍ │ ً │ ُ │ ِ │ َ │ ّ │ ] │ [ │ } │ { │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ + * │ │ ؤ │ ئ │ ي │ إ │ أ │ آ │ ة │ » │ « │ : │ ؛ │ | │ │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ + * │ │ > │ ك │ ٓ │ ژ │ ٰ │ │ ٔ │ ء │ │ │ ؟ │ │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ + * │ │ │ │ │ │ │ │ │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ + */ + "S(FA_ZWJ)": { + "key": "FA_DIV", + "label": "÷", + } + "S(FA_1A)": { + "key": "FA_EXLM", + "label": "!", + } + "S(FA_2A)": { + "key": "FA_THS", + "label": "٬", + } + "S(FA_3A)": { + "key": "FA_DECS", + "label": "٫", + } + "S(FA_4A)": { + "key": "FA_RIAL", + "label": "﷼", + } + "S(FA_5A)": { + "key": "FA_PRCA", + "label": "٪", + } + "S(FA_6A)": { + "key": "FA_MUL", + "label": "×", + } + "S(FA_7A)": { + "key": "FA_COMA", + "label": "،", + } + "S(FA_8A)": { + "key": "FA_ASTR", + "label": "*", + } + "S(FA_9A)": { + "key": "FA_RPRN", + "label": ")", + } + "S(FA_0A)": { + "key": "FA_LPRN", + "label": "(", + } + "S(FA_MINS)": { + "key": "FA_TATW", + "label": "ـ", + } + "S(FA_EQL)": { + "key": "FA_PLUS", + "label": "+", + } + "S(FA_ZAD)": { + "key": "FA_SUK", + "label": "ْ", + } + "S(FA_SAD)": { + "key": "FA_DMTN", + "label": "ٌ", + } + "S(FA_SE)": { + "key": "FA_KSTN", + "label": "ٍ", + } + "S(FA_QAF)": { + "key": "FA_FTHN", + "label": "ً", + } + "S(FA_FE)": { + "key": "FA_DMM", + "label": "ُ", + } + "S(FA_GHYN)": { + "key": "FA_KAS", + "label": "ِ", + } + "S(FA_EYN)": { + "key": "FA_FAT", + "label": "َ", + } + "S(FA_HE)": { + "key": "FA_TSDD", + "label": "", + } + "S(FA_KHE)": { + "key": "FA_RBRC", + "label": "]", + } + "S(FA_HEJ)": { + "key": "FA_LBRC", + "label": "[", + } + "S(FA_JIM)": { + "key": "FA_RCBR", + "label": "}", + } + "S(FA_CHE)": { + "key": "FA_LCBR", + "label": "{", + } + "S(FA_SHIN)": { + "key": "FA_HMZV", + "label": "ؤ", + } + "S(FA_SIN)": { + "key": "FA_HMZY", + "label": "ئ", + } + "S(FA_YE)": { + "key": "FA_YEA", + "label": "ي", + } + "S(FA_BE)": { + "key": "FA_HMZU", + "label": "إ", + } + "S(FA_LAM)": { + "key": "FA_HMZO", + "label": "أ", + } + "S(FA_ALEF)": { + "key": "FA_MALF", + "label": "آ", + } + "S(FA_TE)": { + "key": "FA_TEHM", + "label": "ة", + } + "S(FA_NOON)": { + "key": "FA_RQOT", + "label": "»", + } + "S(FA_MIM)": { + "key": "FA_LQOT", + "label": "«", + } + "S(FA_KAF)": { + "key": "FA_COLN", + "label": ":", + } + "S(FA_GAF)": { + "key": "FA_SCLA", + "label": "؛", + } + "S(FA_LT)": { + "key": "FA_GT", + "label": ">", + } + "S(FA_ZA)": { + "key": "FA_KAFA", + "label": "ك", + } + "S(FA_TA)": { + "key": "FA_MADO", + "label": "ٓ", + } + "S(FA_ZE)": { + "key": "FA_JEH", + "label": "ژ", + } + "S(FA_RE)": { + "key": "FA_SUPA", + "label": "ٰ", + } + "S(FA_ZAL)": { + "key": "FA_ZWNJ", + "label": "(zero-width non-joiner)", + } + "S(FA_DAL)": { + "key": "FA_HMZA", + "label": "ٔ", + } + "S(FA_PE)": { + "key": "FA_HMZ", + "label": "ء", + } + "S(FA_SLSH)": { + "key": "FA_QSA", + "label": "؟", + } +/* AltGr symbols + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │ ~ │ ` │ @ │ # │ $ │ % │ ^ │ & │ • │ │ │ _ │ − │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │ │ ° │ │ € │ │ │ │ │ │ │ │ │ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ + * │ │ │ │ ى │ │ │ ٱ │ │ ﴾ │ ﴿ │ ; │ " │ ‐ │ │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ + * │ │ | │ │ │ │ ٖ │ │ ٕ │ … │ , │ ' │ ? │ │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ + * │ │ │ │ │ │ │ │ │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ + */ + "ALGR(FA_ZWJ)": { + "key": "FA_TILD", + "label": "~", + } + "ALGR(FA_1A)": { + "key": "FA_GRV", + "label": "`", + } + "ALGR(FA_2A)": { + "key": "FA_AT", + "label": "@", + } + "ALGR(FA_3A)": { + "key": "FA_HASH", + "label": "#", + } + "ALGR(FA_4A)": { + "key": "FA_DLR", + "label": "$", + } + "ALGR(FA_5A)": { + "key": "FA_PERC", + "label": "%", + } + "ALGR(FA_6A)": { + "key": "FA_CIRC", + "label": "^", + } + "ALGR(FA_7A)": { + "key": "FA_AMPR", + "label": "&", + } + "ALGR(FA_8A)": { + "key": "FA_BULT", + "label": "•", + } + "ALGR(FA_9A)": { + "key": "FA_LRM", + "label": "(left-to-right mark)", + } + "ALGR(FA_0A)": { + "key": "FA_RLM", + "label": "(right-to-left mark)", + } + "ALGR(FA_MINS)": { + "key": "FA_UNDS", + "label": "_", + } + "ALGR(FA_EQL)": { + "key": "FA_DMNS", + "label": "− (dead)", + } + "ALGR(FA_ZAD)": { + "key": "FA_DEG", + "label": "°", + } + "ALGR(FA_SE)": { + "key": "FA_EURO", + "label": "€", + } + "ALGR(FA_HE)": { + "key": "FA_LRO", + "label": "(left-to-right override)", + } + "ALGR(FA_KHE)": { + "key": "FA_RLO", + "label": "(right-to-left override)", + } + "ALGR(FA_HEJ)": { + "key": "FA_PDF", + "label": "(pop directional formatting)", + } + "ALGR(FA_JIM)": { + "key": "FA_LRE", + "label": "(left-to-right embedding)", + } + "ALGR(FA_CHE)": { + "key": "FA_RLE", + "label": "(right-to-left embedding)", + } + "ALGR(FA_YE)": { + "key": "FA_ALFM", + "label": "ى", + } + "ALGR(FA_ALEF)": { + "key": "FA_ALFW", + "label": "ٱ", + } + "ALGR(FA_NOON)": { + "key": "FA_LORP", + "label": "﴾", + } + "ALGR(FA_MIM)": { + "key": "FA_RORP", + "label": "﴿", + } + "ALGR(FA_KAF)": { + "key": "FA_SCLN", + "label": ";", + } + "ALGR(FA_GAF)": { + "key": "FA_DQT", + "label": "\"", + } + "ALGR(FA_BSLS)": { + "key": "FA_MINA", + "label": "-", + } + "ALGR(FA_ZA)": { + "key": "FA_PIPE", + "label": "|", + } + "ALGR(FA_RA)": { + "key": "FA_SUBA", + "label": "ٖ", + } + "ALGR(FA_DAL)": { + "key": "FA_HMZB", + "label": "ء", + } + "ALGR(FA_PE)": { + "key": "FA_ELLP", + "label": "…", + } + "ALGR(FA_WAW)": { + "key": "FA_COMM", + "label": ",", + } + "ALGR(FA_DOT)": { + "key": "FA_QUOT", + "label": "'", + } + "ALGR(FA_SLSH)": { + "key": "FA_QUES", + "label": "?", + } +/* Shift+AltGr symbols + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │ │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ │ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ + * │ │ ¦ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ + * │ │ │ │ │ │ │ │ │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ + */ + "S(ALGR(FA_1A))": { + "key": "FA_1", + "label": "1", + } + "S(ALGR(FA_2A))": { + "key": "FA_2", + "label": "2", + } + "S(ALGR(FA_3A))": { + "key": "FA_3", + "label": "3", + } + "S(ALGR(FA_4A))": { + "key": "FA_4", + "label": "4", + } + "S(ALGR(FA_5A))": { + "key": "FA_5", + "label": "5", + } + "S(ALGR(FA_6A))": { + "key": "FA_6", + "label": "6", + } + "S(ALGR(FA_7A))": { + "key": "FA_7", + "label": "7", + } + "S(ALGR(FA_8A))": { + "key": "FA_8", + "label": "8", + } + "S(ALGR(FA_9A))": { + "key": "FA_9", + "label": "9", + } + "S(ALGR(FA_0A))": { + "key": "FA_0", + "label": "0", + } + "S(ALGR(FA_LT))": { + "key": "FA_BRKP", + "label": "¦", + } + "S(ALGR(FA_SPC))": { + "key": "FA_NNBS", + "label": "(narrow non-breaking space)", + } + } +} diff --git a/keyboards/handwired/pytest/has_template/readme.md b/data/constants/keycodes/keycodes_0.0.5.hjson index e69de29bb2..e69de29bb2 100644 --- a/keyboards/handwired/pytest/has_template/readme.md +++ b/data/constants/keycodes/keycodes_0.0.5.hjson diff --git a/data/constants/keycodes/keycodes_0.0.5_basic.hjson b/data/constants/keycodes/keycodes_0.0.5_basic.hjson new file mode 100644 index 0000000000..79b6bf6596 --- /dev/null +++ b/data/constants/keycodes/keycodes_0.0.5_basic.hjson @@ -0,0 +1,175 @@ +{ + "keycodes": { + "0x00CD": { + "group": "mouse", + "key": "QK_MOUSE_CURSOR_UP", + "label": "Mouse cursor up", + "aliases": [ + "!reset!", + "MS_UP" + ] + }, + "0x00CE": { + "group": "mouse", + "key": "QK_MOUSE_CURSOR_DOWN", + "label": "Mouse cursor down", + "aliases": [ + "!reset!", + "MS_DOWN" + ] + }, + "0x00CF": { + "group": "mouse", + "key": "QK_MOUSE_CURSOR_LEFT", + "label": "Mouse cursor left", + "aliases": [ + "!reset!", + "MS_LEFT" + ] + }, + "0x00D0": { + "group": "mouse", + "key": "QK_MOUSE_CURSOR_RIGHT", + "label": "Mouse cursor right", + "aliases": [ + "!reset!", + "MS_RGHT" + ] + }, + "0x00D1": { + "group": "mouse", + "key": "QK_MOUSE_BUTTON_1", + "label": "Mouse button 1", + "aliases": [ + "!reset!", + "MS_BTN1" + ] + }, + "0x00D2": { + "group": "mouse", + "key": "QK_MOUSE_BUTTON_2", + "label": "Mouse button 2", + "aliases": [ + "!reset!", + "MS_BTN2" + ] + }, + "0x00D3": { + "group": "mouse", + "key": "QK_MOUSE_BUTTON_3", + "label": "Mouse button 3", + "aliases": [ + "!reset!", + "MS_BTN3" + ] + }, + "0x00D4": { + "group": "mouse", + "key": "QK_MOUSE_BUTTON_4", + "label": "Mouse button 4", + "aliases": [ + "!reset!", + "MS_BTN4" + ] + }, + "0x00D5": { + "group": "mouse", + "key": "QK_MOUSE_BUTTON_5", + "label": "Mouse button 5", + "aliases": [ + "!reset!", + "MS_BTN5" + ] + }, + "0x00D6": { + "group": "mouse", + "key": "QK_MOUSE_BUTTON_6", + "label": "Mouse button 6", + "aliases": [ + "!reset!", + "MS_BTN6" + ] + }, + "0x00D7": { + "group": "mouse", + "key": "QK_MOUSE_BUTTON_7", + "label": "Mouse button 7", + "aliases": [ + "!reset!", + "MS_BTN7" + ] + }, + "0x00D8": { + "group": "mouse", + "key": "QK_MOUSE_BUTTON_8", + "label": "Mouse button 8", + "aliases": [ + "!reset!", + "MS_BTN8" + ] + }, + "0x00D9": { + "group": "mouse", + "key": "QK_MOUSE_WHEEL_UP", + "label": "Mouse wheel up", + "aliases": [ + "!reset!", + "MS_WHLU" + ] + }, + "0x00DA": { + "group": "mouse", + "key": "QK_MOUSE_WHEEL_DOWN", + "label": "Mouse wheel down", + "aliases": [ + "!reset!", + "MS_WHLD" + ] + }, + "0x00DB": { + "group": "mouse", + "key": "QK_MOUSE_WHEEL_LEFT", + "label": "Mouse wheel left", + "aliases": [ + "!reset!", + "MS_WHLL" + ] + }, + "0x00DC": { + "group": "mouse", + "key": "QK_MOUSE_WHEEL_RIGHT", + "label": "Mouse wheel right", + "aliases": [ + "!reset!", + "MS_WHLR" + ] + }, + "0x00DD": { + "group": "mouse", + "key": "QK_MOUSE_ACCELERATION_0", + "label": "Set mouse acceleration to 0", + "aliases": [ + "!reset!", + "MS_ACL0" + ] + }, + "0x00DE": { + "group": "mouse", + "key": "QK_MOUSE_ACCELERATION_1", + "label": "Set mouse acceleration to 1", + "aliases": [ + "!reset!", + "MS_ACL1" + ] + }, + "0x00DF": { + "group": "mouse", + "key": "QK_MOUSE_ACCELERATION_2", + "label": "Set mouse acceleration to 2", + "aliases": [ + "!reset!", + "MS_ACL2" + ] + } + } +} diff --git a/data/mappings/info_config.hjson b/data/mappings/info_config.hjson index b61ca04071..4c895cf5d5 100644 --- a/data/mappings/info_config.hjson +++ b/data/mappings/info_config.hjson @@ -72,6 +72,11 @@ "LED_KANA_PIN": {"info_key": "indicators.kana"}, "LED_PIN_ON_STATE": {"info_key": "indicators.on_state", "value_type": "int"}, + // Joystick + "JOYSTICK_AXIS_COUNT": {"info_key": "joystick.axis_count", "value_type": "int"}, + "JOYSTICK_AXIS_RESOLUTION": {"info_key": "joystick.axis_resolution", "value_type": "int"}, + "JOYSTICK_BUTTON_COUNT": {"info_key": "joystick.button_count", "value_type": "int"}, + // Leader Key "LEADER_PER_KEY_TIMING": {"info_key": "leader_key.timing", "value_type": "flag"}, "LEADER_KEY_STRICT_KEY_PROCESSING": {"info_key": "leader_key.strict_processing", "value_type": "flag"}, @@ -171,7 +176,7 @@ "SECURE_UNLOCK_TIMEOUT": {"info_key": "secure.unlock_timeout", "value_type": "int"}, // Split Keyboard - "SOFT_SERIAL_PIN": {"info_key": "split.soft_serial_pin"}, + "SOFT_SERIAL_PIN": {"info_key": "split.serial.pin"}, "SOFT_SERIAL_SPEED": {"info_key": "split.soft_serial_speed"}, "SPLIT_HAND_MATRIX_GRID": {"info_key": "split.handedness.matrix_grid", "value_type": "array", "to_c": false}, "SPLIT_HAND_PIN": {"info_key": "split.handedness.pin"}, diff --git a/data/mappings/info_rules.hjson b/data/mappings/info_rules.hjson index 97611bcf58..64972af63b 100644 --- a/data/mappings/info_rules.hjson +++ b/data/mappings/info_rules.hjson @@ -25,6 +25,8 @@ "ENCODER_DRIVER": {"info_key": "encoder.driver"}, "FIRMWARE_FORMAT": {"info_key": "build.firmware_format"}, "HAPTIC_DRIVER": {"info_key": "haptic.driver"}, + "JOYSTICK_DRIVER": {"info_key": "joystick.driver"}, + "JOYSTICK_ENABLE": {"info_key": "joystick.enabled", "value_type": "bool"}, "KEYBOARD_SHARED_EP": {"info_key": "usb.shared_endpoint.keyboard", "value_type": "bool"}, "LAYOUTS": {"info_key": "community_layouts", "value_type": "list"}, "LED_MATRIX_DRIVER": {"info_key": "led_matrix.driver"}, @@ -41,6 +43,7 @@ "RGB_MATRIX_DRIVER": {"info_key": "rgb_matrix.driver"}, "RGBLIGHT_DRIVER": {"info_key": "rgblight.driver"}, "SECURE_ENABLE": {"info_key": "secure.enabled", "value_type": "bool"}, + "SERIAL_DRIVER": {"info_key": "split.serial.driver"}, "SPLIT_KEYBOARD": {"info_key": "split.enabled", "value_type": "bool"}, "SPLIT_TRANSPORT": {"info_key": "split.transport.protocol", "to_c": false}, "STENO_ENABLE": {"info_key": "stenography.enabled", "value_type": "bool"}, diff --git a/data/mappings/keyboard_aliases.hjson b/data/mappings/keyboard_aliases.hjson index 57585aae92..bca1865fc9 100644 --- a/data/mappings/keyboard_aliases.hjson +++ b/data/mappings/keyboard_aliases.hjson @@ -563,6 +563,15 @@ "plain60": { "target": "evyd13/plain60" }, + "planck/ez": { + "target": "zsa/planck_ez/base" + }, + "planck/ez/base": { + "target": "zsa/planck_ez/base" + }, + "planck/ez/glow": { + "target": "zsa/planck_ez/glow" + }, "ploopyco/trackball": { "target": "ploopyco/trackball/rev1_005" }, @@ -1060,7 +1069,7 @@ "target": "lyso1/lefishe" }, "lets_split_eh/eh": { - "target": "maple_computing/lets_split_eh/eh" + "target": "maple_computing/lets_split_eh" }, "ls_60": { "target": "weirdo/ls_60" @@ -1080,6 +1089,9 @@ "macro1": { "target": "laneware/macro1" }, + "maple_computing/lets_split_eh/eh": { + "target": "maple_computing/lets_split_eh" + }, "massdrop/thekey": { "target": "drop/thekey/v1" }, @@ -1137,6 +1149,12 @@ "mt980": { "target": "mt/mt980" }, + "mt/ncr80/hotswap": { + "target": "mt/ncr80/r2/hotswap" + }, + "mt/ncr80/solder": { + "target": "mt/ncr80/r2/solder" + }, "nafuda": { "target": "salicylic_acid3/nafuda" }, @@ -1525,5 +1543,8 @@ }, "kprepublic/jj50": { "target": "kprepublic/jj50/rev1" + }, + "dnworks/9973": { + "target": "dnworks/tkl87" } } diff --git a/data/schemas/false.jsonschema b/data/schemas/false.jsonschema deleted file mode 100644 index c508d5366f..0000000000 --- a/data/schemas/false.jsonschema +++ /dev/null @@ -1 +0,0 @@ -false diff --git a/data/schemas/keyboard.jsonschema b/data/schemas/keyboard.jsonschema index e5802fe07d..7649a8e31b 100644 --- a/data/schemas/keyboard.jsonschema +++ b/data/schemas/keyboard.jsonschema @@ -342,6 +342,36 @@ "on_state": {"$ref": "qmk.definitions.v1#/bit"} } }, + "joystick": { + "type": "object", + "properties": { + "enabled": {"type": "boolean"}, + "driver": {"type": "string"}, + "button_count": {"$ref": "qmk.definitions.v1#/unsigned_int"}, + "axis_resolution": {"$ref": "qmk.definitions.v1#/unsigned_int"}, + "axes": { + "type": "object", + "propertyNames": {"enum": ["x", "y", "z", "rx", "ry", "rz"]} + "additionalProperties": { + "oneOf": [ + { + "type": "object", + "properties": { + "input_pin": {"$ref": "qmk.definitions.v1#/mcu_pin"}, + "low": {"$ref": "qmk.definitions.v1#/unsigned_int"}, + "rest": {"$ref": "qmk.definitions.v1#/unsigned_int"}, + "high": {"$ref": "qmk.definitions.v1#/unsigned_int"} + } + }, + { + "type": "string", + "enum": ["virtual"] + } + ] + } + } + } + }, "keycodes": {"$ref": "qmk.definitions.v1#/keycode_decl_array"}, "layout_aliases": { "type": "object", @@ -793,12 +823,26 @@ } } }, - "soft_serial_pin": {"$ref": "qmk.definitions.v1#/mcu_pin"}, + "soft_serial_pin": { + "$ref": "qmk.definitions.v1#/mcu_pin", + "$comment": "Deprecated: use split.serial.pin instead" + }, "soft_serial_speed": { "type": "integer", "minimum": 0, "maximum": 5 }, + "serial": { + "type": "object", + "additionalProperties": false, + "properties": { + "driver": { + "type": "string", + "enum": ["bitbang", "usart", "vendor"] + }, + "pin": {"$ref": "qmk.definitions.v1#/mcu_pin"} + } + }, "transport": { "type": "object", "additionalProperties": false, diff --git a/data/schemas/true.jsonschema b/data/schemas/true.jsonschema deleted file mode 100644 index 27ba77ddaf..0000000000 --- a/data/schemas/true.jsonschema +++ /dev/null @@ -1 +0,0 @@ -true diff --git a/docs/ChangeLog/20240825/PR24120.md b/docs/ChangeLog/20240825/PR24120.md new file mode 100644 index 0000000000..5c635349ea --- /dev/null +++ b/docs/ChangeLog/20240825/PR24120.md @@ -0,0 +1,19 @@ +## Changes requiring user action + +### Key Override Introspection + +Changes were made to key overrides in order to hook them into the keymap introspection system. + +Key override signature changed from: + +```c +const key_override_t **key_overrides = (const key_override_t *[]){ +``` + +to: + +```c +const key_override_t *key_overrides[] = { +``` + +The list of key overrides now does not need to be `NULL`-terminated. diff --git a/docs/ChangeLog/20240825/PR24192.md b/docs/ChangeLog/20240825/PR24192.md new file mode 100644 index 0000000000..31f7a97379 --- /dev/null +++ b/docs/ChangeLog/20240825/PR24192.md @@ -0,0 +1,19 @@ +## Changes requiring user action + +### SparkFun Pro Micro RP2040 converter renamed + +The converter for the SparkFun Pro Micro RP2040 has been renamed. + +from: + +``` +promicro_rp2040 +``` + +to: + +```c +sparkfun_rp2040 +``` + +This change was made to avoid confusion between the clones named ProMicro RP2040 and the SparkFun Pro Micro RP2040. The clones should be using the `rp2040_ce` option. diff --git a/docs/drivers/apa102.md b/docs/drivers/apa102.md index 88868a73b5..197b18869e 100644 --- a/docs/drivers/apa102.md +++ b/docs/drivers/apa102.md @@ -26,20 +26,51 @@ Add the following to your `config.h`: ## API {#api} -### `void apa102_setleds(rgb_led_t *start_led, uint16_t num_leds)` +### `void apa102_init(void)` {#api-apa102-init} -Send RGB data to the APA102 LED chain. +Initialize the LED driver. This function should be called first. -#### Arguments {#api-apa102-setleds-arguments} +--- + +### `void apa102_set_color(uint16_t index, uint8_t red, uint8_t green, uint8_t blue)` {#api-apa102-set-color} + +Set the color of a single LED. This function does not immediately update the LEDs; call `apa102_flush()` after you are finished. + +#### Arguments {#api-apa102-set-color-arguments} + + - `uint16_t index` + The LED index in the APA102 chain. + - `uint8_t red` + The red value to set. + - `uint8_t green` + The green value to set. + - `uint8_t blue` + The blue value to set. + +--- + +### `void apa102_set_color_all(uint8_t red, uint8_t green, uint8_t blue)` {#api-apa102-set-color-all} + +Set the color of all LEDs. + +#### Arguments {#api-apa102-set-color-all-arguments} + + - `uint8_t red` + The red value to set. + - `uint8_t green` + The green value to set. + - `uint8_t blue` + The blue value to set. + +--- + +### `void apa102_flush(void)` {#api-apa102-flush} - - `rgb_led_t *start_led` - A pointer to the LED array. - - `uint16_t num_leds` - The length of the LED array. +Flush the PWM values to the LED chain. --- -### `void apa102_set_brightness(uint8_t brightness)` +### `void apa102_set_brightness(uint8_t brightness)` {#api-apa102-set-brightness} Set the global brightness. diff --git a/docs/drivers/aw20216s.md b/docs/drivers/aw20216s.md new file mode 100644 index 0000000000..36a6d63c33 --- /dev/null +++ b/docs/drivers/aw20216s.md @@ -0,0 +1,133 @@ +# AW20216S Driver {#aw20216s-driver} + +SPI 18x12 LED matrix driver by Awinic. Supports a maximum of four drivers, each controlling up to 216 single-color LEDs, or 72 RGB LEDs. + +[AW20216S Datasheet](https://doc.awinic.com/doc/20230609wm/b6a9c70b-e1bd-495b-925f-bcbed3fc2620.pdf) + +## Usage {#usage} + +The AW20216S driver code is automatically included if you are using the [RGB Matrix](../features/rgb_matrix) feature with the `aw20216s` driver set, and you would use those APIs instead. + +However, if you need to use the driver standalone, add this to your `rules.mk`: + +```make +COMMON_VPATH += $(DRIVER_PATH)/led +SRC += aw20216s.c +SPI_DRIVER_REQUIRED = yes +``` + +## Basic Configuration {#basic-configuration} + +Add the following to your `config.h`: + +|Define |Default |Description | +|-----------------------------|-------------|-------------------------------------------------------------| +|`AW20216S_CS_PIN_1` |*Not defined*|The GPIO pin connected to the first driver's Chip Select pin | +|`AW20216S_CS_PIN_2` |*Not defined*|The GPIO pin connected to the second driver's Chip Select pin| +|`AW20216S_EN_PIN` |*Not defined*|The GPIO pin connected to the drivers' Enable pins | +|`AW20216S_SPI_MODE` |`0` |The SPI mode to use | +|`AW20216S_SPI_DIVISOR` |`4` |The SPI divisor to use | +|`AW20216S_SCALING_MAX` |`150` |The scaling value | +|`AW20216S_GLOBAL_CURRENT_MAX`|`150` |The global current control value | + +### Global Current Control {#global-current-control} + +This setting controls the current sunk by the `CSx` pins, from 0 to 255. To adjust it, add the following to your `config.h`: + +```c +#define AW20216S_GLOBAL_CURRENT_MAX 150 +``` + +## ARM/ChibiOS Configuration {#arm-configuration} + +Depending on the ChibiOS board configuration, you may need to [enable and configure SPI](spi#arm-configuration) at the keyboard level. + +## LED Mapping {#led-mapping} + +In order to use this driver, each output must be mapped to an LED index, by adding the following to your `<keyboardname>.c`: + +```c +const aw20216s_led_t PROGMEM g_aw20216s_leds[AW20216S_LED_COUNT] = { +/* Driver + * | R G B */ + {0, SW1_CS1, SW1_CS2, SW1_CS3}, + // etc... +}; +``` + +In this example, the first LED index on driver 0 has its red channel on `SW1_CS1`, green on `SW1_CS2` and blue on `SW1_CS3`. + +These values correspond to the matrix locations as shown in the datasheet on page 16, figure 16. + +## API {#api} + +### `struct aw20216s_led_t` {#api-aw20216s-led-t} + +Contains the PWM register addresses for a single RGB LED. + +#### Members {#api-aw20216s-led-t-members} + + - `uint8_t driver` + The driver index of the LED, from 0 to 3. + - `uint8_t r` + The output PWM register address for the LED's red channel. + - `uint8_t g` + The output PWM register address for the LED's green channel. + - `uint8_t b` + The output PWM register address for the LED's blue channel. + +--- + +### `void aw20216s_init(pin_t cs_pin)` {#api-aw20216s-init} + +Initialize the LED driver. This function should be called first. + +#### Arguments {#api-aw20216s-init-arguments} + + - `pin_t cs_pin` + The GPIO connected to the Chip Select pin of the LED driver to initialize. + +--- + +### `void aw20216s_set_color(int index, uint8_t red, uint8_t green, uint8_t blue)` {#api-aw20216s-set-color} + +Set the color of a single LED. This function does not immediately update the LEDs; call `aw20216s_update_pwm_buffers()` after you are finished. + +#### Arguments {#api-aw20216s-set-color-arguments} + + - `int index` + The LED index (ie. the index into the `g_aw20216s_leds` array). + - `uint8_t red` + The red value to set. + - `uint8_t green` + The green value to set. + - `uint8_t blue` + The blue value to set. + +--- + +### `void aw20216s_set_color_all(uint8_t red, uint8_t green, uint8_t blue)` {#api-aw20216s-set-color-all} + +Set the color of all LEDs. + +#### Arguments {#api-aw20216s-set-color-all-arguments} + + - `uint8_t red` + The red value to set. + - `uint8_t green` + The green value to set. + - `uint8_t blue` + The blue value to set. + +--- + +### `void aw20216s_update_pwm_buffers(pin_t cs_pin, uint8_t index)` {#api-aw20216s-update-pwm-buffers} + +Flush the PWM values to the LED driver. + +#### Arguments {#api-aw20216s-update-pwm-buffers-arguments} + + - `pin_t cs_pin` + The GPIO connected to the Chip Select pin of the driver. + - `uint8_t index` + The index of the driver. diff --git a/docs/drivers/eeprom.md b/docs/drivers/eeprom.md index 82630c501d..0ae258424f 100644 --- a/docs/drivers/eeprom.md +++ b/docs/drivers/eeprom.md @@ -119,13 +119,14 @@ This driver performs writes to the embedded flash storage embedded in the MCU. I Configurable options in your keyboard's `config.h`: -`config.h` override | Default | Description ------------------------------------------|-------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -`#define WEAR_LEVELING_EFL_FIRST_SECTOR` | _unset_ | The first sector on the MCU to use. By default this is not defined and calculated at runtime based on the MCU. However, different flash sizes on MCUs may require custom configuration. -`#define WEAR_LEVELING_EFL_FLASH_SIZE` | _unset_ | Allows overriding the flash size available for use for wear-leveling. Under normal circumstances this is automatically calculated and should not need to be overridden. Specifying a size larger than the amount actually available in flash will usually prevent the MCU from booting. -`#define WEAR_LEVELING_LOGICAL_SIZE` | `(backing_size/2)` | Number of bytes "exposed" to the rest of QMK and denotes the size of the usable EEPROM. -`#define WEAR_LEVELING_BACKING_SIZE` | `2048` | Number of bytes used by the wear-leveling algorithm for its underlying storage, and needs to be a multiple of the logical size. -`#define BACKING_STORE_WRITE_SIZE` | _automatic_ | The byte width of the underlying write used on the MCU, and is usually automatically determined from the selected MCU family. If an error occurs in the auto-detection, you'll need to consult the MCU's datasheet and determine this value, specifying it directly. +`config.h` override | Default | Description +---------------------------------------------------|--------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +`#define WEAR_LEVELING_EFL_FIRST_SECTOR` | _unset_ | The first sector on the MCU to use. By default this is not defined and calculated at runtime based on the MCU. However, different flash sizes on MCUs may require custom configuration. +`#define WEAR_LEVELING_EFL_FLASH_SIZE` | _unset_ | Allows overriding the flash size available for use for wear-leveling. Under normal circumstances this is automatically calculated and should not need to be overridden. Specifying a size larger than the amount actually available in flash will usually prevent the MCU from booting. +`#define WEAR_LEVELING_EFL_OMIT_LAST_SECTOR_COUNT` | `0` | Number of sectors to omit at the end of the flash. These sectors will not be allocated to the driver and the usable flash block will be offset, but keeping the set flash size. Useful on devices with bootloaders requiring a check flag at the end of flash to be present in order to confirm a valid, bootable firmware. +`#define WEAR_LEVELING_LOGICAL_SIZE` | `(backing_size/2)` | Number of bytes "exposed" to the rest of QMK and denotes the size of the usable EEPROM. +`#define WEAR_LEVELING_BACKING_SIZE` | `2048` | Number of bytes used by the wear-leveling algorithm for its underlying storage, and needs to be a multiple of the logical size. +`#define BACKING_STORE_WRITE_SIZE` | _automatic_ | The byte width of the underlying write used on the MCU, and is usually automatically determined from the selected MCU family. If an error occurs in the auto-detection, you'll need to consult the MCU's datasheet and determine this value, specifying it directly. ::: warning If your MCU does not boot after swapping to the EFL wear-leveling driver, it's likely that the flash size is incorrectly detected, usually as an MCU with larger flash and may require overriding. diff --git a/docs/drivers/is31fl3218.md b/docs/drivers/is31fl3218.md new file mode 100644 index 0000000000..1c98069120 --- /dev/null +++ b/docs/drivers/is31fl3218.md @@ -0,0 +1,194 @@ +# IS31FL3218 Driver {#is31fl3218-driver} + +I²C LED driver by Lumissil. Supports up to 18 single-color LEDs, or 6 RGB LEDs. + +[IS31FL3218 Datasheet](https://www.lumissil.com/assets/pdf/core/IS31FL3218_DS.pdf) + +## Usage {#usage} + +The IS31FL3218 driver code is automatically included if you are using the [LED Matrix](../features/led_matrix) or [RGB Matrix](../features/rgb_matrix) feature with the `is31fl3218` driver set, and you would use those APIs instead. + +However, if you need to use the driver standalone, add this to your `rules.mk`: + +```make +COMMON_VPATH += $(DRIVER_PATH)/led/issi +SRC += is31fl3218-mono.c # For single-color +SRC += is31fl3218.c # For RGB +I2C_DRIVER_REQUIRED = yes +``` + +## Basic Configuration {#basic-configuration} + +Add the following to your `config.h`: + +|Define |Default |Description | +|----------------------------|-------------|---------------------------------------------------| +|`IS31FL3218_SDB_PIN` |*Not defined*|The GPIO pin connected to the driver's shutdown pin| +|`IS31FL3218_I2C_TIMEOUT` |`100` |The I²C timeout in milliseconds | +|`IS31FL3218_I2C_PERSISTENCE`|`0` |The number of times to retry I²C transmissions | + +### I²C Addressing {#i2c-addressing} + +The IS31FL3218's 7-bit I²C address is `0x54`, available as `IS31FL3218_I2C_ADDRESS`. + +## ARM/ChibiOS Configuration {#arm-configuration} + +Depending on the ChibiOS board configuration, you may need to [enable and configure I²C](i2c#arm-configuration) at the keyboard level. + +## LED Mapping {#led-mapping} + +In order to use this driver, each output must be mapped to an LED index, by adding the following to your `<keyboardname>.c`: + +```c +const is31fl3218_led_t PROGMEM g_is31fl3218_leds[IS31FL3218_LED_COUNT] = { +/* R G B */ + {OUT1, OUT2, OUT3}, + // etc... +}; +``` + +In this example, the red, green and blue channels for the first LED index all have their anodes connected to `VCC`, and their cathodes on the `OUT1`, `OUT2` and `OUT3` pins respectively. + +For the single-color driver, the principle is the same, but there is only one channel: + +```c +const is31fl3218_led_t PROGMEM g_is31fl3218_leds[IS31FL3218_LED_COUNT] = { +/* V */ + {OUT1}, + // etc... +}; +``` + +## API {#api} + +### `struct is31fl3218_led_t` {#api-is31fl3218-led-t} + +Contains the PWM register addresses for a single RGB LED. + +#### Members {#api-is31fl3218-led-t-members} + + - `uint8_t r` + The output PWM register address for the LED's red channel (RGB driver only). + - `uint8_t g` + The output PWM register address for the LED's green channel (RGB driver only). + - `uint8_t b` + The output PWM register address for the LED's blue channel (RGB driver only). + - `uint8_t v` + The output PWM register address for the LED (single-color driver only). + +--- + +### `void is31fl3218_init(void)` {#api-is31fl3218-init} + +Initialize the LED driver. This function should be called first. + +--- + +### `void is31fl3218_write_register(uint8_t reg, uint8_t data)` {#api-is31fl3218-write-register} + +Set the value of the given register. + +#### Arguments {#api-is31fl3218-write-register-arguments} + + - `uint8_t reg` + The register address. + - `uint8_t data` + The value to set. + +--- + +### `void is31fl3218_set_color(int index, uint8_t red, uint8_t green, uint8_t blue)` {#api-is31fl3218-set-color} + +Set the color of a single LED (RGB driver only). This function does not immediately update the LEDs; call `is31fl3218_update_pwm_buffers()` after you are finished. + +#### Arguments {#api-is31fl3218-set-color-arguments} + + - `int index` + The LED index (ie. the index into the `g_is31fl3218_leds` array). + - `uint8_t red` + The red value to set. + - `uint8_t green` + The green value to set. + - `uint8_t blue` + The blue value to set. + +--- + +### `void is31fl3218_set_color_all(uint8_t red, uint8_t green, uint8_t blue)` {#api-is31fl3218-set-color-all} + +Set the color of all LEDs (RGB driver only). + +#### Arguments {#api-is31fl3218-set-color-all-arguments} + + - `uint8_t red` + The red value to set. + - `uint8_t green` + The green value to set. + - `uint8_t blue` + The blue value to set. + +--- + +### `void is31fl3218_set_value(int index, uint8_t value)` {#api-is31fl3218-set-value} + +Set the brightness of a single LED (single-color driver only). This function does not immediately update the LEDs; call `is31fl3218_update_pwm_buffers()` after you are finished. + +#### Arguments {#api-is31fl3218-set-value-arguments} + + - `int index` + The LED index (ie. the index into the `g_is31fl3218_leds` array). + - `uint8_t value` + The brightness value to set. + +--- + +### `void is31fl3218_set_value_all(uint8_t value)` {#api-is31fl3218-set-value-all} + +Set the brightness of all LEDs (single-color driver only). + +#### Arguments {#api-is31fl3218-set-value-all-arguments} + + - `uint8_t value` + The brightness value to set. + +--- + +### `void is31fl3218_set_led_control_register(uint8_t index, bool red, bool green, bool blue)` {#api-is31fl3218-set-led-control-register-rgb} + +Configure the LED control registers for a single LED (RGB driver only). This function does not immediately update the LEDs; call `is31fl3218_update_led_control_registers()` after you are finished. + +#### Arguments {#api-is31fl3218-set-led-control-register-rgb-arguments} + + - `uint8_t index` + The LED index (ie. the index into the `g_is31fl3218_leds` array). + - `bool red` + Enable or disable the red channel. + - `bool green` + Enable or disable the green channel. + - `bool blue` + Enable or disable the blue channel. + +--- + +### `void is31fl3218_set_led_control_register(uint8_t index, bool value)` {#api-is31fl3218-set-led-control-register-mono} + +Configure the LED control registers for a single LED (single-color driver only). This function does not immediately update the LEDs; call `is31fl3218_update_led_control_registers()` after you are finished. + +#### Arguments {#api-is31fl3218-set-led-control-register-mono-arguments} + + - `uint8_t index` + The LED index (ie. the index into the `g_is31fl3218_leds` array). + - `bool value` + Enable or disable the LED. + +--- + +### `void is31fl3218_update_pwm_buffers(void)` {#api-is31fl3218-update-pwm-buffers} + +Flush the PWM values to the LED driver. + +--- + +### `void is31fl3218_update_led_control_registers(void)` {#api-is31fl3218-update-led-control-registers} + +Flush the LED control register values to the LED driver. diff --git a/docs/drivers/is31fl3236.md b/docs/drivers/is31fl3236.md new file mode 100644 index 0000000000..98e05e4abd --- /dev/null +++ b/docs/drivers/is31fl3236.md @@ -0,0 +1,228 @@ +# IS31FL3236 Driver {#is31fl3236-driver} + +I²C LED driver by Lumissil. Supports a maximum of four drivers, each controlling up to 36 single-color LEDs, or 12 RGB LEDs. + +[IS31FL3236 Datasheet](https://www.lumissil.com/assets/pdf/core/IS31FL3236_DS.pdf) + +## Usage {#usage} + +The IS31FL3236 driver code is automatically included if you are using the [LED Matrix](../features/led_matrix) or [RGB Matrix](../features/rgb_matrix) feature with the `is31fl3236` driver set, and you would use those APIs instead. + +However, if you need to use the driver standalone, add this to your `rules.mk`: + +```make +COMMON_VPATH += $(DRIVER_PATH)/led/issi +SRC += is31fl3236-mono.c # For single-color +SRC += is31fl3236.c # For RGB +I2C_DRIVER_REQUIRED = yes +``` + +## Basic Configuration {#basic-configuration} + +Add the following to your `config.h`: + +|Define |Default |Description | +|----------------------------|-------------|----------------------------------------------------| +|`IS31FL3236_SDB_PIN` |*Not defined*|The GPIO pin connected to the drivers' shutdown pins| +|`IS31FL3236_I2C_TIMEOUT` |`100` |The I²C timeout in milliseconds | +|`IS31FL3236_I2C_PERSISTENCE`|`0` |The number of times to retry I²C transmissions | +|`IS31FL3236_I2C_ADDRESS_1` |*Not defined*|The I²C address of driver 0 | +|`IS31FL3236_I2C_ADDRESS_2` |*Not defined*|The I²C address of driver 1 | +|`IS31FL3236_I2C_ADDRESS_3` |*Not defined*|The I²C address of driver 2 | +|`IS31FL3236_I2C_ADDRESS_4` |*Not defined*|The I²C address of driver 3 | + +### I²C Addressing {#i2c-addressing} + +The IS31FL3236 has four possible 7-bit I²C addresses, depending on how the `AD` pin is connected. + +To configure this, set the `IS31FL3236_I2C_ADDRESS_n` defines to one of the following in your `config.h`, where *n* denotes the driver index: + +|Define |Value | +|----------------------------|------| +|`IS31FL3236_I2C_ADDRESS_GND`|`0x3C`| +|`IS31FL3236_I2C_ADDRESS_SCL`|`0x3D`| +|`IS31FL3236_I2C_ADDRESS_SDA`|`0x3E`| +|`IS31FL3236_I2C_ADDRESS_VCC`|`0x3F`| + +## ARM/ChibiOS Configuration {#arm-configuration} + +Depending on the ChibiOS board configuration, you may need to [enable and configure I²C](i2c#arm-configuration) at the keyboard level. + +## LED Mapping {#led-mapping} + +In order to use this driver, each output must be mapped to an LED index, by adding the following to your `<keyboardname>.c`: + +```c +const is31fl3236_led_t PROGMEM g_is31fl3236_leds[IS31FL3236_LED_COUNT] = { +/* Driver + | R G B */ + {0, OUT1, OUT2, OUT3}, + // etc... +}; +``` + +In this example, the red, green and blue channels for the first LED index on driver 0 all have their anodes connected to `VCC`, and their cathodes on the `OUT1`, `OUT2` and `OUT3` pins respectively. + +For the single-color driver, the principle is the same, but there is only one channel: + +```c +const is31fl3236_led_t PROGMEM g_is31fl3236_leds[IS31FL3236_LED_COUNT] = { +/* Driver + | V */ + {0, OUT1}, + // etc... +}; +``` + +## API {#api} + +### `struct is31fl3236_led_t` {#api-is31fl3236-led-t} + +Contains the PWM register addresses for a single RGB LED. + +#### Members {#api-is31fl3236-led-t-members} + + - `uint8_t driver` + The driver index of the LED, from 0 to 3. + - `uint8_t r` + The output PWM register address for the LED's red channel (RGB driver only). + - `uint8_t g` + The output PWM register address for the LED's green channel (RGB driver only). + - `uint8_t b` + The output PWM register address for the LED's blue channel (RGB driver only). + - `uint8_t v` + The output PWM register address for the LED (single-color driver only). + +--- + +### `void is31fl3236_init(uint8_t index)` {#api-is31fl3236-init} + +Initialize the LED driver. This function should be called first. + +#### Arguments {#api-is31fl3236-init-arguments} + + - `uint8_t index` + The driver index. + +--- + +### `void is31fl3236_write_register(uint8_t index, uint8_t reg, uint8_t data)` {#api-is31fl3236-write-register} + +Set the value of the given register. + +#### Arguments {#api-is31fl3236-write-register-arguments} + + - `uint8_t index` + The driver index. + - `uint8_t reg` + The register address. + - `uint8_t data` + The value to set. + +--- + +### `void is31fl3236_set_color(int index, uint8_t red, uint8_t green, uint8_t blue)` {#api-is31fl3236-set-color} + +Set the color of a single LED (RGB driver only). This function does not immediately update the LEDs; call `is31fl3236_update_pwm_buffers()` after you are finished. + +#### Arguments {#api-is31fl3236-set-color-arguments} + + - `int index` + The LED index (ie. the index into the `g_is31fl3236_leds` array). + - `uint8_t red` + The red value to set. + - `uint8_t green` + The green value to set. + - `uint8_t blue` + The blue value to set. + +--- + +### `void is31fl3236_set_color_all(uint8_t red, uint8_t green, uint8_t blue)` {#api-is31fl3236-set-color-all} + +Set the color of all LEDs (RGB driver only). + +#### Arguments {#api-is31fl3236-set-color-all-arguments} + + - `uint8_t red` + The red value to set. + - `uint8_t green` + The green value to set. + - `uint8_t blue` + The blue value to set. + +--- + +### `void is31fl3236_set_value(int index, uint8_t value)` {#api-is31fl3236-set-value} + +Set the brightness of a single LED (single-color driver only). This function does not immediately update the LEDs; call `is31fl3236_update_pwm_buffers()` after you are finished. + +#### Arguments {#api-is31fl3236-set-value-arguments} + + - `int index` + The LED index (ie. the index into the `g_is31fl3236_leds` array). + - `uint8_t value` + The brightness value to set. + +--- + +### `void is31fl3236_set_value_all(uint8_t value)` {#api-is31fl3236-set-value-all} + +Set the brightness of all LEDs (single-color driver only). + +#### Arguments {#api-is31fl3236-set-value-all-arguments} + + - `uint8_t value` + The brightness value to set. + +--- + +### `void is31fl3236_set_led_control_register(uint8_t index, bool red, bool green, bool blue)` {#api-is31fl3236-set-led-control-register-rgb} + +Configure the LED control registers for a single LED (RGB driver only). This function does not immediately update the LEDs; call `is31fl3236_update_led_control_registers()` after you are finished. + +#### Arguments {#api-is31fl3236-set-led-control-register-rgb-arguments} + + - `uint8_t index` + The LED index (ie. the index into the `g_is31fl3236_leds` array). + - `bool red` + Enable or disable the red channel. + - `bool green` + Enable or disable the green channel. + - `bool blue` + Enable or disable the blue channel. + +--- + +### `void is31fl3236_set_led_control_register(uint8_t index, bool value)` {#api-is31fl3236-set-led-control-register-mono} + +Configure the LED control registers for a single LED (single-color driver only). This function does not immediately update the LEDs; call `is31fl3236_update_led_control_registers()` after you are finished. + +#### Arguments {#api-is31fl3236-set-led-control-register-mono-arguments} + + - `uint8_t index` + The LED index (ie. the index into the `g_is31fl3236_leds` array). + - `bool value` + Enable or disable the LED. + +--- + +### `void is31fl3236_update_pwm_buffers(uint8_t index)` {#api-is31fl3236-update-pwm-buffers} + +Flush the PWM values to the LED driver. + +#### Arguments {#api-is31fl3236-update-pwm-buffers-arguments} + + - `uint8_t index` + The driver index. + +--- + +### `void is31fl3236_update_led_control_registers(uint8_t index)` {#api-is31fl3236-update-led-control-registers} + +Flush the LED control register values to the LED driver. + +#### Arguments {#api-is31fl3236-update-led-control-registers-arguments} + + - `uint8_t index` + The driver index. diff --git a/docs/drivers/is31fl3729.md b/docs/drivers/is31fl3729.md new file mode 100644 index 0000000000..32618d82d5 --- /dev/null +++ b/docs/drivers/is31fl3729.md @@ -0,0 +1,300 @@ +# IS31FL3729 Driver {#is31fl3729-driver} + +I²C 16x8/15x9 LED matrix driver by Lumissil. Supports a maximum of four drivers, each controlling up to 135 single-color LEDs, or 45 RGB LEDs. + +[IS31FL3729 Datasheet](https://www.lumissil.com/assets/pdf/core/IS31FL3729_DS.pdf) + +## Usage {#usage} + +The IS31FL3729 driver code is automatically included if you are using the [LED Matrix](../features/led_matrix) or [RGB Matrix](../features/rgb_matrix) feature with the `is31fl3729` driver set, and you would use those APIs instead. + +However, if you need to use the driver standalone, add this to your `rules.mk`: + +```make +COMMON_VPATH += $(DRIVER_PATH)/led/issi +SRC += is31fl3729-mono.c # For single-color +SRC += is31fl3729.c # For RGB +I2C_DRIVER_REQUIRED = yes +``` + +## Basic Configuration {#basic-configuration} + +Add the following to your `config.h`: + +|Define |Default |Description | +|----------------------------|--------------------------------------|----------------------------------------------------| +|`IS31FL3729_SDB_PIN` |*Not defined* |The GPIO pin connected to the drivers' shutdown pins| +|`IS31FL3729_I2C_TIMEOUT` |`100` |The I²C timeout in milliseconds | +|`IS31FL3729_I2C_PERSISTENCE`|`0` |The number of times to retry I²C transmissions | +|`IS31FL3729_I2C_ADDRESS_1` |*Not defined* |The I²C address of driver 0 | +|`IS31FL3729_I2C_ADDRESS_2` |*Not defined* |The I²C address of driver 1 | +|`IS31FL3729_I2C_ADDRESS_3` |*Not defined* |The I²C address of driver 2 | +|`IS31FL3729_I2C_ADDRESS_4` |*Not defined* |The I²C address of driver 3 | +|`IS31FL3729_PWM_FREQUENCY` |`IS31FL3729_PWM_FREQUENCY_32K_HZ` |The PWM frequency of the LEDs | +|`IS31FL3729_SW_PULLDOWN` |`IS31FL3729_SW_PULLDOWN_2K_OHM_SW_OFF`|The `SWx` pullup resistor value | +|`IS31FL3729_CS_PULLUP` |`IS31FL3729_CS_PULLUP_2K_OHM_CS_OFF` |The `CSx` pulldown resistor value | +|`IS31FL3729_GLOBAL_CURRENT` |`0x40` |The global current control value | + +### I²C Addressing {#i2c-addressing} + +The IS31FL3729 has four possible 7-bit I²C addresses, depending on how the `AD` pin is connected. + +To configure this, set the `IS31FL3729_I2C_ADDRESS_n` defines to one of the following in your `config.h`, where *n* denotes the driver index: + +|Define |Value | +|----------------------------|------| +|`IS31FL3729_I2C_ADDRESS_GND`|`0x34`| +|`IS31FL3729_I2C_ADDRESS_SCL`|`0x35`| +|`IS31FL3729_I2C_ADDRESS_SDA`|`0x36`| +|`IS31FL3729_I2C_ADDRESS_VCC`|`0x37`| + +### PWM Frequency {#pwm-frequency} + +The PWM frequency can be adjusted by adding the following to your `config.h`: + +```c +#define IS31FL3729_PWM_FREQUENCY IS31FL3729_PWM_FREQUENCY_32K_HZ +``` + +Valid values are: + +|Define |Frequency | +|----------------------------------|----------------| +|`IS31FL3729_PWM_FREQUENCY_55K_HZ` |55 kHz | +|`IS31FL3729_PWM_FREQUENCY_32K_HZ` |32 kHz (default)| +|`IS31FL3729_PWM_FREQUENCY_4K_HZ` |4 kHz | +|`IS31FL3729_PWM_FREQUENCY_2K_HZ` |2 kHz | +|`IS31FL3729_PWM_FREQUENCY_1K_HZ` |1 kHz | +|`IS31FL3729_PWM_FREQUENCY_500_HZ` |500 Hz | +|`IS31FL3729_PWM_FREQUENCY_250_HZ` |250 Hz | +|`IS31FL3729_PWM_FREQUENCY_80K_HZ` |80 kHz | + +### De-Ghosting {#de-ghosting} + +These settings control the pulldown and pullup resistor values on the `SWy` and `CSx` pins respectively, for the purposes of eliminating ghosting. Refer to the datasheet (p. 18) for more information on how and why this occurs. + +To adjust the resistor values, add the following to your `config.h`: + +```c +#define IS31FL3729_SW_PULLDOWN IS31FL3729_SW_PULLDOWN_2K_OHM_SW_OFF +#define IS31FL3729_CS_PULLUP IS31FL3729_CS_PULLUP_2K_OHM_CS_OFF +``` + +Valid values for `IS31FL3729_SW_PULLDOWN` are: + +|Define |Resistance | +|---------------------------------------|------------------------------| +|`IS31FL3729_SW_PULLDOWN_0_OHM` |None | +|`IS31FL3729_SW_PULLDOWN_0K5_OHM_SW_OFF`|0.5 kΩ in SWy off time | +|`IS31FL3729_SW_PULLDOWN_1K_OHM_SW_OFF` |1 kΩ in SWy off time | +|`IS31FL3729_SW_PULLDOWN_2K_OHM_SW_OFF` |2 kΩ in SWy off time (default)| +|`IS31FL3729_SW_PULLDOWN_1K_OHM` |1 kΩ | +|`IS31FL3729_SW_PULLDOWN_2K_OHM` |2 kΩ | +|`IS31FL3729_SW_PULLDOWN_4K_OHM` |4 kΩ | +|`IS31FL3729_SW_PULLDOWN_8K_OHM` |8 kΩ | + +Valid values for `IS31FL3729_CS_PULLUP` are: + +|Define |Resistance | +|-------------------------------------|------------------------------| +|`IS31FL3729_CS_PULLUP_0_OHM` |None | +|`IS31FL3729_CS_PULLUP_0K5_OHM_CS_OFF`|0.5 kΩ in CSx off time | +|`IS31FL3729_CS_PULLUP_1K_OHM_CS_OFF` |1 kΩ in CSx off time | +|`IS31FL3729_CS_PULLUP_2K_OHM_CS_OFF` |2 kΩ in CSx off time (default)| +|`IS31FL3729_CS_PULLUP_1K_OHM` |1 kΩ | +|`IS31FL3729_CS_PULLUP_2K_OHM` |2 kΩ | +|`IS31FL3729_CS_PULLUP_4K_OHM` |4 kΩ | +|`IS31FL3729_CS_PULLUP_8K_OHM` |8 kΩ | + +### Global Current Control {#global-current-control} + +This setting controls the current sunk by the `CSx` pins, from 0 to 255. By default, the value is 64, but if you need to adjust it, add the following to your `config.h`: + +```c +#define IS31FL3729_GLOBAL_CURRENT 0x40 +``` + +## ARM/ChibiOS Configuration {#arm-configuration} + +Depending on the ChibiOS board configuration, you may need to [enable and configure I²C](i2c#arm-configuration) at the keyboard level. + +## LED Mapping {#led-mapping} + +In order to use this driver, each output must be mapped to an LED index, by adding the following to your `<keyboardname>.c`: + +```c +const is31fl3729_led_t PROGMEM g_is31fl3729_leds[IS31FL3729_LED_COUNT] = { +/* Driver + * | R G B */ + {0, SW1_CS1, SW1_CS2, SW1_CS3}, + // etc... +}; +``` + +In this example, the red, green and blue channels for the first LED index on driver 0 all have their anodes connected to the `SW1` pin, and their cathodes on the `CS1`, `CS2` and `CS3` pins respectively. + +For the single-color driver, the principle is the same, but there is only one channel: + +```c +const is31fl3729_led_t PROGMEM g_is31fl3729_leds[IS31FL3729_LED_COUNT] = { +/* Driver + * | V */ + {0, SW1_CS1}, + // etc... +}; +``` + +These values correspond to the register indices as shown in the datasheet on page 12, figure 9. + +## API {#api} + +### `struct is31fl3729_led_t` {#api-is31fl3729-led-t} + +Contains the PWM register addresses for a single RGB LED. + +#### Members {#api-is31fl3729-led-t-members} + + - `uint8_t driver` + The driver index of the LED, from 0 to 3. + - `uint8_t r` + The output PWM register address for the LED's red channel (RGB driver only). + - `uint8_t g` + The output PWM register address for the LED's green channel (RGB driver only). + - `uint8_t b` + The output PWM register address for the LED's blue channel (RGB driver only). + - `uint8_t v` + The output PWM register address for the LED (single-color driver only). + +--- + +### `void is31fl3729_init(uint8_t index)` {#api-is31fl3729-init} + +Initialize the LED driver. This function should be called first. + +#### Arguments {#api-is31fl3729-init-arguments} + + - `uint8_t index` + The driver index. + +--- + +### `void is31fl3729_write_register(uint8_t index, uint8_t reg, uint8_t data)` {#api-is31fl3729-write-register} + +Set the value of the given register. + +#### Arguments {#api-is31fl3729-write-register-arguments} + + - `uint8_t index` + The driver index. + - `uint8_t reg` + The register address. + - `uint8_t data` + The value to set. + +--- + +### `void is31fl3729_set_color(int index, uint8_t red, uint8_t green, uint8_t blue)` {#api-is31fl3729-set-color} + +Set the color of a single LED (RGB driver only). This function does not immediately update the LEDs; call `is31fl3729_update_pwm_buffers()` after you are finished. + +#### Arguments {#api-is31fl3729-set-color-arguments} + + - `int index` + The LED index (ie. the index into the `g_is31fl3729_leds` array). + - `uint8_t red` + The red value to set. + - `uint8_t green` + The green value to set. + - `uint8_t blue` + The blue value to set. + +--- + +### `void is31fl3729_set_color_all(uint8_t red, uint8_t green, uint8_t blue)` {#api-is31fl3729-set-color-all} + +Set the color of all LEDs (RGB driver only). + +#### Arguments {#api-is31fl3729-set-color-all-arguments} + + - `uint8_t red` + The red value to set. + - `uint8_t green` + The green value to set. + - `uint8_t blue` + The blue value to set. + +--- + +### `void is31fl3729_set_value(int index, uint8_t value)` {#api-is31fl3729-set-value} + +Set the brightness of a single LED (single-color driver only). This function does not immediately update the LEDs; call `is31fl3729_update_pwm_buffers()` after you are finished. + +#### Arguments {#api-is31fl3729-set-value-arguments} + + - `int index` + The LED index (ie. the index into the `g_is31fl3729_leds` array). + - `uint8_t value` + The brightness value to set. + +--- + +### `void is31fl3729_set_value_all(uint8_t value)` {#api-is31fl3729-set-value-all} + +Set the brightness of all LEDs (single-color driver only). + +#### Arguments {#api-is31fl3729-set-value-all-arguments} + + - `uint8_t value` + The brightness value to set. + +--- + +### `void is31fl3729_set_scaling_register(uint8_t index, uint8_t red, uint8_t green, uint8_t blue)` {#api-is31fl3729-set-scaling-register-rgb} + +Configure the scaling registers for a single LED (RGB driver only). This function does not immediately update the LEDs; call `is31fl3729_update_scaling_registers()` after you are finished. + +#### Arguments {#api-is31fl3729-set-scaling-register-rgb-arguments} + + - `uint8_t index` + The LED index (ie. the index into the `g_is31fl3729_leds` array). + - `uint8_t red` + The scaling value for the red channel. + - `uint8_t green` + The scaling value for the green channel. + - `uint8_t blue` + The scaling value for the blue channel. + +--- + +### `void is31fl3729_set_scaling_register(uint8_t index, uint8_t value)` {#api-is31fl3729-set-scaling-register-mono} + +Configure the scaling registers for a single LED (single-color driver only). This function does not immediately update the LEDs; call `is31fl3729_update_scaling_registers()` after you are finished. + +#### Arguments {#api-is31fl3729-set-scaling-register-mono-arguments} + + - `uint8_t index` + The LED index (ie. the index into the `g_is31fl3729_leds` array). + - `uint8_t value` + The scaling value for the LED. + +--- + +### `void is31fl3729_update_pwm_buffers(uint8_t index)` {#api-is31fl3729-update-pwm-buffers} + +Flush the PWM values to the LED driver. + +#### Arguments {#api-is31fl3729-update-pwm-buffers-arguments} + + - `uint8_t index` + The driver index. + +--- + +### `void is31fl3729_update_scaling_registers(uint8_t index)` {#api-is31fl3729-update-scaling-registers} + +Flush the scaling register values to the LED driver. + +#### Arguments {#api-is31fl3729-update-scaling-registers-arguments} + + - `uint8_t index` + The driver index. diff --git a/docs/drivers/is31fl3731.md b/docs/drivers/is31fl3731.md new file mode 100644 index 0000000000..0d928a919e --- /dev/null +++ b/docs/drivers/is31fl3731.md @@ -0,0 +1,254 @@ +# IS31FL3731 Driver {#is31fl3731-driver} + +I²C Charlieplexed 16x9 LED matrix driver by Lumissil. Supports a maximum of four drivers, each controlling up to 144 single-color LEDs, or 48 RGB LEDs. + +[IS31FL3731 Datasheet](https://www.lumissil.com/assets/pdf/core/IS31FL3731_DS.pdf) + +## Usage {#usage} + +The IS31FL3731 driver code is automatically included if you are using the [LED Matrix](../features/led_matrix) or [RGB Matrix](../features/rgb_matrix) feature with the `is31fl3731` driver set, and you would use those APIs instead. + +However, if you need to use the driver standalone, add this to your `rules.mk`: + +```make +COMMON_VPATH += $(DRIVER_PATH)/led/issi +SRC += is31fl3731-mono.c # For single-color +SRC += is31fl3731.c # For RGB +I2C_DRIVER_REQUIRED = yes +``` + +## Basic Configuration {#basic-configuration} + +Add the following to your `config.h`: + +|Define |Default |Description | +|----------------------------|-------------|----------------------------------------------------| +|`IS31FL3731_SDB_PIN` |*Not defined*|The GPIO pin connected to the drivers' shutdown pins| +|`IS31FL3731_I2C_TIMEOUT` |`100` |The I²C timeout in milliseconds | +|`IS31FL3731_I2C_PERSISTENCE`|`0` |The number of times to retry I²C transmissions | +|`IS31FL3731_I2C_ADDRESS_1` |*Not defined*|The I²C address of driver 0 | +|`IS31FL3731_I2C_ADDRESS_2` |*Not defined*|The I²C address of driver 1 | +|`IS31FL3731_I2C_ADDRESS_3` |*Not defined*|The I²C address of driver 2 | +|`IS31FL3731_I2C_ADDRESS_4` |*Not defined*|The I²C address of driver 3 | +|`IS31FL3731_DEGHOST` |*Not defined*|Enable ghost image prevention | + +### I²C Addressing {#i2c-addressing} + +The IS31FL3731 has four possible 7-bit I²C addresses, depending on how the `AD` pin is connected. + +To configure this, set the `IS31FL3731_I2C_ADDRESS_n` defines to one of the following in your `config.h`, where *n* denotes the driver index: + +|Define |Value | +|----------------------------|------| +|`IS31FL3731_I2C_ADDRESS_GND`|`0x74`| +|`IS31FL3731_I2C_ADDRESS_SCL`|`0x75`| +|`IS31FL3731_I2C_ADDRESS_SDA`|`0x76`| +|`IS31FL3731_I2C_ADDRESS_VCC`|`0x77`| + +### De-Ghosting {#de-ghosting} + +This setting enables the de-ghosting feature on the IS31FL3731. See this [Application Note](https://www.lumissil.com/assets/pdf/core/IS31FL3731_AN.pdf) (p. 15) for more information. + +To enable, add the following to your `config.h`: + +```c +#define IS31FL3731_DEGHOST +``` + +## ARM/ChibiOS Configuration {#arm-configuration} + +Depending on the ChibiOS board configuration, you may need to [enable and configure I²C](i2c#arm-configuration) at the keyboard level. + +## LED Mapping {#led-mapping} + +In order to use this driver, each output must be mapped to an LED index, by adding the following to your `<keyboardname>.c`: + +```c +const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = { +/* Driver + * | R G B */ + {0, C1_1, C1_2, C1_3}, + // etc... +}; +``` + +In this example, the red, green and blue channels for the first LED index on driver 0 all have their cathodes connected to the `CA1` pin, and their anodes on the `CA2`, `CA3` and `CA4` pins respectively. + +For the single-color driver, the principle is the same, but there is only one channel: + +```c +const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = { +/* Driver + * | V */ + {0, C1_1}, + // etc... +}; +``` + +These values correspond to the register indices as shown in the datasheet on page 11, figure 8. + +## API {#api} + +### `struct is31fl3731_led_t` {#api-is31fl3731-led-t} + +Contains the PWM register addresses for a single RGB LED. + +#### Members {#api-is31fl3731-led-t-members} + + - `uint8_t driver` + The driver index of the LED, from 0 to 3. + - `uint8_t r` + The output PWM register address for the LED's red channel (RGB driver only). + - `uint8_t g` + The output PWM register address for the LED's green channel (RGB driver only). + - `uint8_t b` + The output PWM register address for the LED's blue channel (RGB driver only). + - `uint8_t v` + The output PWM register address for the LED (single-color driver only). + +--- + +### `void is31fl3731_init(uint8_t index)` {#api-is31fl3731-init} + +Initialize the LED driver. This function should be called first. + +#### Arguments {#api-is31fl3731-init-arguments} + + - `uint8_t index` + The driver index. + +--- + +### `void is31fl3731_write_register(uint8_t index, uint8_t reg, uint8_t data)` {#api-is31fl3731-write-register} + +Set the value of the given register. + +#### Arguments {#api-is31fl3731-write-register-arguments} + + - `uint8_t index` + The driver index. + - `uint8_t reg` + The register address. + - `uint8_t data` + The value to set. + +--- + +### `void is31fl3731_select_page(uint8_t index, uint8_t page)` {#api-is31fl3731-select-page} + +Change the current page for configuring the LED driver. + +#### Arguments {#api-is31fl3731-select-page-arguments} + + - `uint8_t index` + The driver index. + - `uint8_t page` + The page number to select. + +--- + +### `void is31fl3731_set_color(int index, uint8_t red, uint8_t green, uint8_t blue)` {#api-is31fl3731-set-color} + +Set the color of a single LED (RGB driver only). This function does not immediately update the LEDs; call `is31fl3731_update_pwm_buffers()` after you are finished. + +#### Arguments {#api-is31fl3731-set-color-arguments} + + - `int index` + The LED index (ie. the index into the `g_is31fl3731_leds` array). + - `uint8_t red` + The red value to set. + - `uint8_t green` + The green value to set. + - `uint8_t blue` + The blue value to set. + +--- + +### `void is31fl3731_set_color_all(uint8_t red, uint8_t green, uint8_t blue)` {#api-is31fl3731-set-color-all} + +Set the color of all LEDs (RGB driver only). + +#### Arguments {#api-is31fl3731-set-color-all-arguments} + + - `uint8_t red` + The red value to set. + - `uint8_t green` + The green value to set. + - `uint8_t blue` + The blue value to set. + +--- + +### `void is31fl3731_set_value(int index, uint8_t value)` {#api-is31fl3731-set-value} + +Set the brightness of a single LED (single-color driver only). This function does not immediately update the LEDs; call `is31fl3731_update_pwm_buffers()` after you are finished. + +#### Arguments {#api-is31fl3731-set-value-arguments} + + - `int index` + The LED index (ie. the index into the `g_is31fl3731_leds` array). + - `uint8_t value` + The brightness value to set. + +--- + +### `void is31fl3731_set_value_all(uint8_t value)` {#api-is31fl3731-set-value-all} + +Set the brightness of all LEDs (single-color driver only). + +#### Arguments {#api-is31fl3731-set-value-all-arguments} + + - `uint8_t value` + The brightness value to set. + +--- + +### `void is31fl3731_set_led_control_register(uint8_t index, bool red, bool green, bool blue)` {#api-is31fl3731-set-led-control-register-rgb} + +Configure the LED control registers for a single LED (RGB driver only). This function does not immediately update the LEDs; call `is31fl3731_update_led_control_registers()` after you are finished. + +#### Arguments {#api-is31fl3731-set-led-control-register-rgb-arguments} + + - `uint8_t index` + The LED index (ie. the index into the `g_is31fl3731_leds` array). + - `bool red` + Enable or disable the red channel. + - `bool green` + Enable or disable the green channel. + - `bool blue` + Enable or disable the blue channel. + +--- + +### `void is31fl3731_set_led_control_register(uint8_t index, bool value)` {#api-is31fl3731-set-led-control-register-mono} + +Configure the LED control registers for a single LED (single-color driver only). This function does not immediately update the LEDs; call `is31fl3731_update_led_control_registers()` after you are finished. + +#### Arguments {#api-is31fl3731-set-led-control-register-mono-arguments} + + - `uint8_t index` + The LED index (ie. the index into the `g_is31fl3731_leds` array). + - `bool value` + Enable or disable the LED. + +--- + +### `void is31fl3731_update_pwm_buffers(uint8_t index)` {#api-is31fl3731-update-pwm-buffers} + +Flush the PWM values to the LED driver. + +#### Arguments {#api-is31fl3731-update-pwm-buffers-arguments} + + - `uint8_t index` + The driver index. + +--- + +### `void is31fl3731_update_led_control_registers(uint8_t index)` {#api-is31fl3731-update-led-control-registers} + +Flush the LED control register values to the LED driver. + +#### Arguments {#api-is31fl3731-update-led-control-registers-arguments} + + - `uint8_t index` + The driver index. diff --git a/docs/drivers/is31fl3733.md b/docs/drivers/is31fl3733.md new file mode 100644 index 0000000000..e299f785bd --- /dev/null +++ b/docs/drivers/is31fl3733.md @@ -0,0 +1,338 @@ +# IS31FL3733 Driver {#is31fl3733-driver} + +I²C 12x16 LED matrix driver by Lumissil. Supports a maximum of four drivers, each controlling up to 192 single-color LEDs, or 64 RGB LEDs. + +[IS31FL3733 Datasheet](https://www.lumissil.com/assets/pdf/core/IS31FL3733_DS.pdf) + +## Usage {#usage} + +The IS31FL3733 driver code is automatically included if you are using the [LED Matrix](../features/led_matrix) or [RGB Matrix](../features/rgb_matrix) feature with the `is31fl3733` driver set, and you would use those APIs instead. + +However, if you need to use the driver standalone, add this to your `rules.mk`: + +```make +COMMON_VPATH += $(DRIVER_PATH)/led/issi +SRC += is31fl3733-mono.c # For single-color +SRC += is31fl3733.c # For RGB +I2C_DRIVER_REQUIRED = yes +``` + +## Basic Configuration {#basic-configuration} + +Add the following to your `config.h`: + +|Define |Default |Description | +|----------------------------|---------------------------------|----------------------------------------------------| +|`IS31FL3733_SDB_PIN` |*Not defined* |The GPIO pin connected to the drivers' shutdown pins| +|`IS31FL3733_I2C_TIMEOUT` |`100` |The I²C timeout in milliseconds | +|`IS31FL3733_I2C_PERSISTENCE`|`0` |The number of times to retry I²C transmissions | +|`IS31FL3733_I2C_ADDRESS_1` |*Not defined* |The I²C address of driver 0 | +|`IS31FL3733_I2C_ADDRESS_2` |*Not defined* |The I²C address of driver 1 | +|`IS31FL3733_I2C_ADDRESS_3` |*Not defined* |The I²C address of driver 2 | +|`IS31FL3733_I2C_ADDRESS_4` |*Not defined* |The I²C address of driver 3 | +|`IS31FL3733_SYNC_1` |`IS31FL3733_SYNC_NONE` |The sync configuration for driver 0 | +|`IS31FL3733_SYNC_2` |`IS31FL3733_SYNC_NONE` |The sync configuration for driver 1 | +|`IS31FL3733_SYNC_3` |`IS31FL3733_SYNC_NONE` |The sync configuration for driver 2 | +|`IS31FL3733_SYNC_4` |`IS31FL3733_SYNC_NONE` |The sync configuration for driver 3 | +|`IS31FL3733_PWM_FREQUENCY` |`IS31FL3733_PWM_FREQUENCY_8K4_HZ`|The PWM frequency of the LEDs (IS31FL3733B only) | +|`IS31FL3733_SW_PULLUP` |`IS31FL3733_PUR_0_OHM` |The `SWx` pullup resistor value | +|`IS31FL3733_CS_PULLDOWN` |`IS31FL3733_PDR_0_OHM` |The `CSx` pulldown resistor value | +|`IS31FL3733_GLOBAL_CURRENT` |`0xFF` |The global current control value | + +### I²C Addressing {#i2c-addressing} + +The IS31FL3733 has 16 possible 7-bit I²C addresses, depending on how the `ADDR1` and `ADDR2` pins are connected. + +To configure this, set the `IS31FL3733_I2C_ADDRESS_n` defines to one of the following in your `config.h`, where *n* denotes the driver index: + +|Define |Value | +|--------------------------------|------| +|`IS31FL3733_I2C_ADDRESS_GND_GND`|`0x50`| +|`IS31FL3733_I2C_ADDRESS_GND_SCL`|`0x51`| +|`IS31FL3733_I2C_ADDRESS_GND_SDA`|`0x52`| +|`IS31FL3733_I2C_ADDRESS_GND_VCC`|`0x53`| +|`IS31FL3733_I2C_ADDRESS_SCL_GND`|`0x54`| +|`IS31FL3733_I2C_ADDRESS_SCL_SCL`|`0x55`| +|`IS31FL3733_I2C_ADDRESS_SCL_SDA`|`0x56`| +|`IS31FL3733_I2C_ADDRESS_SCL_VCC`|`0x57`| +|`IS31FL3733_I2C_ADDRESS_SDA_GND`|`0x58`| +|`IS31FL3733_I2C_ADDRESS_SDA_SCL`|`0x59`| +|`IS31FL3733_I2C_ADDRESS_SDA_SDA`|`0x5A`| +|`IS31FL3733_I2C_ADDRESS_SDA_VCC`|`0x5B`| +|`IS31FL3733_I2C_ADDRESS_VCC_GND`|`0x5C`| +|`IS31FL3733_I2C_ADDRESS_VCC_SCL`|`0x5D`| +|`IS31FL3733_I2C_ADDRESS_VCC_SDA`|`0x5E`| +|`IS31FL3733_I2C_ADDRESS_VCC_VCC`|`0x5F`| + +### Multi-Driver Synchronization {#multi-driver-synchronization} + +Multiple IS31FL3733 drivers can be synchronized by connecting the `SYNC` pins together. One driver must be designated as the "master", and the others configured as "slave". + +To do this, set the `IS31FL3733_SYNC_n` defines accordingly in your `config.h`, where *n* denotes the driver index: + +|Define |Value | +|------------------------|---------------------------| +|`IS31FL3733_SYNC_NONE` |No synchronization | +|`IS31FL3733_SYNC_MASTER`|Driver configured as master| +|`IS31FL3733_SYNC_SLAVE` |Driver configured as slave | + +### PWM Frequency {#pwm-frequency} + +The PWM frequency can be adjusted (for IS31FL3733B only) by adding the following to your `config.h`: + +```c +#define IS31FL3733_PWM_FREQUENCY IS31FL3733_PWM_FREQUENCY_8K4_HZ +``` + +Valid values are: + +|Define |Frequency | +|----------------------------------|-----------------| +|`IS31FL3733_PWM_FREQUENCY_8K4_HZ` |8.4 kHz (default)| +|`IS31FL3733_PWM_FREQUENCY_4K2_HZ` |4.2 kHz | +|`IS31FL3733_PWM_FREQUENCY_26K7_HZ`|26.7 kHz | +|`IS31FL3733_PWM_FREQUENCY_2K1_HZ` |2.1 kHz | +|`IS31FL3733_PWM_FREQUENCY_1K05_HZ`|1.05 kHz | + +### De-Ghosting {#de-ghosting} + +These settings control the pullup and pulldown resistor values on the `SWy` and `CSx` pins respectively, for the purposes of eliminating ghosting. Refer to the datasheet (p. 23) for more information on how and why this occurs. + +To adjust the resistor values, add the following to your `config.h`: + +```c +#define IS31FL3733_SW_PULLUP IS31FL3733_PUR_0_OHM +#define IS31FL3733_CS_PULLDOWN IS31FL3733_PUR_0_OHM +``` + +Valid values for `IS31FL3733_SW_PULLUP` are: + +|Define |Resistance | +|------------------------|--------------| +|`IS31FL3733_PUR_0_OHM` |None (default)| +|`IS31FL3733_PUR_0K5_OHM`|0.5 kΩ | +|`IS31FL3733_PUR_1K_OHM` |1 kΩ | +|`IS31FL3733_PUR_2K_OHM` |2 kΩ | +|`IS31FL3733_PUR_4K_OHM` |4 kΩ | +|`IS31FL3733_PUR_8K_OHM` |8 kΩ | +|`IS31FL3733_PUR_16K_OHM`|16 kΩ | +|`IS31FL3733_PUR_32K_OHM`|32 kΩ | + +Valid values for `IS31FL3733_CS_PULLDOWN` are: + +|Define |Resistance | +|------------------------|--------------| +|`IS31FL3733_PDR_0_OHM` |None (default)| +|`IS31FL3733_PDR_0K5_OHM`|0.5 kΩ | +|`IS31FL3733_PDR_1K_OHM` |1 kΩ | +|`IS31FL3733_PDR_2K_OHM` |2 kΩ | +|`IS31FL3733_PDR_4K_OHM` |4 kΩ | +|`IS31FL3733_PDR_8K_OHM` |8 kΩ | +|`IS31FL3733_PDR_16K_OHM`|16 kΩ | +|`IS31FL3733_PDR_32K_OHM`|32 kΩ | + +### Global Current Control {#global-current-control} + +This setting controls the current sunk by the `CSx` pins, from 0 to 255. By default, the value is the maximum (255), but if you need to lower it, add the following to your `config.h`: + +```c +#define IS31FL3733_GLOBAL_CURRENT 0xFF +``` + +## ARM/ChibiOS Configuration {#arm-configuration} + +Depending on the ChibiOS board configuration, you may need to [enable and configure I²C](i2c#arm-configuration) at the keyboard level. + +## LED Mapping {#led-mapping} + +In order to use this driver, each output must be mapped to an LED index, by adding the following to your `<keyboardname>.c`: + +```c +const is31fl3733_led_t PROGMEM g_is31fl3733_leds[IS31FL3733_LED_COUNT] = { +/* Driver + * | R G B */ + {0, SW1_CS1, SW1_CS2, SW1_CS3}, + // etc... +}; +``` + +In this example, the red, green and blue channels for the first LED index on driver 0 all have their cathodes connected to the `SW1` pin, and their anodes on the `CS1`, `CS2` and `CS3` pins respectively. + +For the single-color driver, the principle is the same, but there is only one channel: + +```c +const is31fl3733_led_t PROGMEM g_is31fl3733_leds[IS31FL3733_LED_COUNT] = { +/* Driver + * | V */ + {0, SW1_CS1}, + // etc... +}; +``` + +These values correspond to the register indices as shown in the datasheet on page 15, figure 9. + +## API {#api} + +### `struct is31fl3733_led_t` {#api-is31fl3733-led-t} + +Contains the PWM register addresses for a single RGB LED. + +#### Members {#api-is31fl3733-led-t-members} + + - `uint8_t driver` + The driver index of the LED, from 0 to 3. + - `uint8_t r` + The output PWM register address for the LED's red channel (RGB driver only). + - `uint8_t g` + The output PWM register address for the LED's green channel (RGB driver only). + - `uint8_t b` + The output PWM register address for the LED's blue channel (RGB driver only). + - `uint8_t v` + The output PWM register address for the LED (single-color driver only). + +--- + +### `void is31fl3733_init(uint8_t index)` {#api-is31fl3733-init} + +Initialize the LED driver. This function should be called first. + +#### Arguments {#api-is31fl3733-init-arguments} + + - `uint8_t index` + The driver index. + +--- + +### `void is31fl3733_write_register(uint8_t index, uint8_t reg, uint8_t data)` {#api-is31fl3733-write-register} + +Set the value of the given register. + +#### Arguments {#api-is31fl3733-write-register-arguments} + + - `uint8_t index` + The driver index. + - `uint8_t reg` + The register address. + - `uint8_t data` + The value to set. + +--- + +### `void is31fl3733_select_page(uint8_t index, uint8_t page)` {#api-is31fl3733-select-page} + +Change the current page for configuring the LED driver. + +#### Arguments {#api-is31fl3733-select-page-arguments} + + - `uint8_t index` + The driver index. + - `uint8_t page` + The page number to select. + +--- + +### `void is31fl3733_set_color(int index, uint8_t red, uint8_t green, uint8_t blue)` {#api-is31fl3733-set-color} + +Set the color of a single LED (RGB driver only). This function does not immediately update the LEDs; call `is31fl3733_update_pwm_buffers()` after you are finished. + +#### Arguments {#api-is31fl3733-set-color-arguments} + + - `int index` + The LED index (ie. the index into the `g_is31fl3733_leds` array). + - `uint8_t red` + The red value to set. + - `uint8_t green` + The green value to set. + - `uint8_t blue` + The blue value to set. + +--- + +### `void is31fl3733_set_color_all(uint8_t red, uint8_t green, uint8_t blue)` {#api-is31fl3733-set-color-all} + +Set the color of all LEDs (RGB driver only). + +#### Arguments {#api-is31fl3733-set-color-all-arguments} + + - `uint8_t red` + The red value to set. + - `uint8_t green` + The green value to set. + - `uint8_t blue` + The blue value to set. + +--- + +### `void is31fl3733_set_value(int index, uint8_t value)` {#api-is31fl3733-set-value} + +Set the brightness of a single LED (single-color driver only). This function does not immediately update the LEDs; call `is31fl3733_update_pwm_buffers()` after you are finished. + +#### Arguments {#api-is31fl3733-set-value-arguments} + + - `int index` + The LED index (ie. the index into the `g_is31fl3733_leds` array). + - `uint8_t value` + The brightness value to set. + +--- + +### `void is31fl3733_set_value_all(uint8_t value)` {#api-is31fl3733-set-value-all} + +Set the brightness of all LEDs (single-color driver only). + +#### Arguments {#api-is31fl3733-set-value-all-arguments} + + - `uint8_t value` + The brightness value to set. + +--- + +### `void is31fl3733_set_led_control_register(uint8_t index, bool red, bool green, bool blue)` {#api-is31fl3733-set-led-control-register-rgb} + +Configure the LED control registers for a single LED (RGB driver only). This function does not immediately update the LEDs; call `is31fl3733_update_led_control_registers()` after you are finished. + +#### Arguments {#api-is31fl3733-set-led-control-register-rgb-arguments} + + - `uint8_t index` + The LED index (ie. the index into the `g_is31fl3733_leds` array). + - `bool red` + Enable or disable the red channel. + - `bool green` + Enable or disable the green channel. + - `bool blue` + Enable or disable the blue channel. + +--- + +### `void is31fl3733_set_led_control_register(uint8_t index, bool value)` {#api-is31fl3733-set-led-control-register-mono} + +Configure the LED control registers for a single LED (single-color driver only). This function does not immediately update the LEDs; call `is31fl3733_update_led_control_registers()` after you are finished. + +#### Arguments {#api-is31fl3733-set-led-control-register-mono-arguments} + + - `uint8_t index` + The LED index (ie. the index into the `g_is31fl3733_leds` array). + - `bool value` + Enable or disable the LED. + +--- + +### `void is31fl3733_update_pwm_buffers(uint8_t index)` {#api-is31fl3733-update-pwm-buffers} + +Flush the PWM values to the LED driver. + +#### Arguments {#api-is31fl3733-update-pwm-buffers-arguments} + + - `uint8_t index` + The driver index. + +--- + +### `void is31fl3733_update_led_control_registers(uint8_t index)` {#api-is31fl3733-update-led-control-registers} + +Flush the LED control register values to the LED driver. + +#### Arguments {#api-is31fl3733-update-led-control-registers-arguments} + + - `uint8_t index` + The driver index. diff --git a/docs/drivers/is31fl3736.md b/docs/drivers/is31fl3736.md new file mode 100644 index 0000000000..b679a232cd --- /dev/null +++ b/docs/drivers/is31fl3736.md @@ -0,0 +1,322 @@ +# IS31FL3736 Driver {#is31fl3736-driver} + +I²C 12x8 LED matrix driver by Lumissil. Supports a maximum of four drivers, each controlling up to 96 single-color LEDs, or 32 RGB LEDs. + +[IS31FL3736 Datasheet](https://www.lumissil.com/assets/pdf/core/IS31FL3736_DS.pdf) + +## Usage {#usage} + +The IS31FL3736 driver code is automatically included if you are using the [LED Matrix](../features/led_matrix) or [RGB Matrix](../features/rgb_matrix) feature with the `is31fl3736` driver set, and you would use those APIs instead. + +However, if you need to use the driver standalone, add this to your `rules.mk`: + +```make +COMMON_VPATH += $(DRIVER_PATH)/led/issi +SRC += is31fl3736-mono.c # For single-color +SRC += is31fl3736.c # For RGB +I2C_DRIVER_REQUIRED = yes +``` + +## Basic Configuration {#basic-configuration} + +Add the following to your `config.h`: + +|Define |Default |Description | +|----------------------------|---------------------------------|----------------------------------------------------| +|`IS31FL3736_SDB_PIN` |*Not defined* |The GPIO pin connected to the drivers' shutdown pins| +|`IS31FL3736_I2C_TIMEOUT` |`100` |The I²C timeout in milliseconds | +|`IS31FL3736_I2C_PERSISTENCE`|`0` |The number of times to retry I²C transmissions | +|`IS31FL3736_I2C_ADDRESS_1` |*Not defined* |The I²C address of driver 0 | +|`IS31FL3736_I2C_ADDRESS_2` |*Not defined* |The I²C address of driver 1 | +|`IS31FL3736_I2C_ADDRESS_3` |*Not defined* |The I²C address of driver 2 | +|`IS31FL3736_I2C_ADDRESS_4` |*Not defined* |The I²C address of driver 3 | +|`IS31FL3736_PWM_FREQUENCY` |`IS31FL3736_PWM_FREQUENCY_8K4_HZ`|The PWM frequency of the LEDs (IS31FL3736B only) | +|`IS31FL3736_SW_PULLUP` |`IS31FL3736_PUR_0_OHM` |The `SWx` pullup resistor value | +|`IS31FL3736_CS_PULLDOWN` |`IS31FL3736_PDR_0_OHM` |The `CSx` pulldown resistor value | +|`IS31FL3736_GLOBAL_CURRENT` |`0xFF` |The global current control value | + +### I²C Addressing {#i2c-addressing} + +The IS31FL3736 has 16 possible 7-bit I²C addresses, depending on how the `ADDR1` and `ADDR2` pins are connected. + +To configure this, set the `IS31FL3736_I2C_ADDRESS_n` defines to one of the following in your `config.h`, where *n* denotes the driver index: + +|Define |Value | +|--------------------------------|------| +|`IS31FL3736_I2C_ADDRESS_GND_GND`|`0x50`| +|`IS31FL3736_I2C_ADDRESS_GND_SCL`|`0x51`| +|`IS31FL3736_I2C_ADDRESS_GND_SDA`|`0x52`| +|`IS31FL3736_I2C_ADDRESS_GND_VCC`|`0x53`| +|`IS31FL3736_I2C_ADDRESS_SCL_GND`|`0x54`| +|`IS31FL3736_I2C_ADDRESS_SCL_SCL`|`0x55`| +|`IS31FL3736_I2C_ADDRESS_SCL_SDA`|`0x56`| +|`IS31FL3736_I2C_ADDRESS_SCL_VCC`|`0x57`| +|`IS31FL3736_I2C_ADDRESS_SDA_GND`|`0x58`| +|`IS31FL3736_I2C_ADDRESS_SDA_SCL`|`0x59`| +|`IS31FL3736_I2C_ADDRESS_SDA_SDA`|`0x5A`| +|`IS31FL3736_I2C_ADDRESS_SDA_VCC`|`0x5B`| +|`IS31FL3736_I2C_ADDRESS_VCC_GND`|`0x5C`| +|`IS31FL3736_I2C_ADDRESS_VCC_SCL`|`0x5D`| +|`IS31FL3736_I2C_ADDRESS_VCC_SDA`|`0x5E`| +|`IS31FL3736_I2C_ADDRESS_VCC_VCC`|`0x5F`| + +### PWM Frequency {#pwm-frequency} + +The PWM frequency can be adjusted (for IS31FL3736B only) by adding the following to your `config.h`: + +```c +#define IS31FL3736_PWM_FREQUENCY IS31FL3736_PWM_FREQUENCY_8K4_HZ +``` + +Valid values are: + +|Define |Frequency | +|----------------------------------|-----------------| +|`IS31FL3736_PWM_FREQUENCY_8K4_HZ` |8.4 kHz (default)| +|`IS31FL3736_PWM_FREQUENCY_4K2_HZ` |4.2 kHz | +|`IS31FL3736_PWM_FREQUENCY_26K7_HZ`|26.7 kHz | +|`IS31FL3736_PWM_FREQUENCY_2K1_HZ` |2.1 kHz | +|`IS31FL3736_PWM_FREQUENCY_1K05_HZ`|1.05 kHz | + +### De-Ghosting {#de-ghosting} + +These settings control the pullup and pulldown resistor values on the `SWy` and `CSx` pins respectively, for the purposes of eliminating ghosting. Refer to the datasheet (p. 25) for more information on how and why this occurs. + +To adjust the resistor values, add the following to your `config.h`: + +```c +#define IS31FL3736_SW_PULLUP IS31FL3736_PUR_0_OHM +#define IS31FL3736_CS_PULLDOWN IS31FL3736_PDR_0_OHM +``` + +Valid values for `IS31FL3736_SW_PULLUP` are: + +|Define |Resistance | +|------------------------|--------------| +|`IS31FL3736_PUR_0_OHM` |None (default)| +|`IS31FL3736_PUR_0K5_OHM`|0.5 kΩ | +|`IS31FL3736_PUR_1K_OHM` |1 kΩ | +|`IS31FL3736_PUR_2K_OHM` |2 kΩ | +|`IS31FL3736_PUR_4K_OHM` |4 kΩ | +|`IS31FL3736_PUR_8K_OHM` |8 kΩ | +|`IS31FL3736_PUR_16K_OHM`|16 kΩ | +|`IS31FL3736_PUR_32K_OHM`|32 kΩ | + +Valid values for `IS31FL3736_CS_PULLDOWN` are: + +|Define |Resistance | +|------------------------|--------------| +|`IS31FL3736_PDR_0_OHM` |None (default)| +|`IS31FL3736_PDR_0K5_OHM`|0.5 kΩ | +|`IS31FL3736_PDR_1K_OHM` |1 kΩ | +|`IS31FL3736_PDR_2K_OHM` |2 kΩ | +|`IS31FL3736_PDR_4K_OHM` |4 kΩ | +|`IS31FL3736_PDR_8K_OHM` |8 kΩ | +|`IS31FL3736_PDR_16K_OHM`|16 kΩ | +|`IS31FL3736_PDR_32K_OHM`|32 kΩ | + +### Global Current Control {#global-current-control} + +This setting controls the current sunk by the `CSx` pins, from 0 to 255. By default, the value is the maximum (255), but if you need to lower it, add the following to your `config.h`: + +```c +#define IS31FL3736_GLOBAL_CURRENT 0xFF +``` + +## ARM/ChibiOS Configuration {#arm-configuration} + +Depending on the ChibiOS board configuration, you may need to [enable and configure I²C](i2c#arm-configuration) at the keyboard level. + +## LED Mapping {#led-mapping} + +In order to use this driver, each output must be mapped to an LED index, by adding the following to your `<keyboardname>.c`: + +```c +const is31fl3736_led_t PROGMEM g_is31fl3736_leds[IS31FL3736_LED_COUNT] = { +/* Driver + * | R G B */ + {0, SW1_CS1, SW1_CS2, SW1_CS3}, + // etc... +}; +``` + +In this example, the red, green and blue channels for the first LED index on driver 0 all have their cathodes connected to the `SW1` pin, and their anodes on the `CS1`, `CS2` and `CS3` pins respectively. + +For the single-color driver, the principle is the same, but there is only one channel: + +```c +const is31fl3736_led_t PROGMEM g_is31fl3736_leds[IS31FL3736_LED_COUNT] = { +/* Driver + * | V */ + {0, SW1_CS1}, + // etc... +}; +``` + +These values correspond to the register indices as shown in the datasheet on page 16, figure 9. + +## API {#api} + +### `struct is31fl3736_led_t` {#api-is31fl3736-led-t} + +Contains the PWM register addresses for a single RGB LED. + +#### Members {#api-is31fl3736-led-t-members} + + - `uint8_t driver` + The driver index of the LED, from 0 to 3. + - `uint8_t r` + The output PWM register address for the LED's red channel (RGB driver only). + - `uint8_t g` + The output PWM register address for the LED's green channel (RGB driver only). + - `uint8_t b` + The output PWM register address for the LED's blue channel (RGB driver only). + - `uint8_t v` + The output PWM register address for the LED (single-color driver only). + +--- + +### `void is31fl3736_init(uint8_t index)` {#api-is31fl3736-init} + +Initialize the LED driver. This function should be called first. + +#### Arguments {#api-is31fl3736-init-arguments} + + - `uint8_t index` + The driver index. + +--- + +### `void is31fl3736_write_register(uint8_t index, uint8_t reg, uint8_t data)` {#api-is31fl3736-write-register} + +Set the value of the given register. + +#### Arguments {#api-is31fl3736-write-register-arguments} + + - `uint8_t index` + The driver index. + - `uint8_t reg` + The register address. + - `uint8_t data` + The value to set. + +--- + +### `void is31fl3736_select_page(uint8_t index, uint8_t page)` {#api-is31fl3736-select-page} + +Change the current page for configuring the LED driver. + +#### Arguments {#api-is31fl3736-select-page-arguments} + + - `uint8_t index` + The driver index. + - `uint8_t page` + The page number to select. + +--- + +### `void is31fl3736_set_color(int index, uint8_t red, uint8_t green, uint8_t blue)` {#api-is31fl3736-set-color} + +Set the color of a single LED (RGB driver only). This function does not immediately update the LEDs; call `is31fl3736_update_pwm_buffers()` after you are finished. + +#### Arguments {#api-is31fl3736-set-color-arguments} + + - `int index` + The LED index (ie. the index into the `g_is31fl3736_leds` array). + - `uint8_t red` + The red value to set. + - `uint8_t green` + The green value to set. + - `uint8_t blue` + The blue value to set. + +--- + +### `void is31fl3736_set_color_all(uint8_t red, uint8_t green, uint8_t blue)` {#api-is31fl3736-set-color-all} + +Set the color of all LEDs (RGB driver only). + +#### Arguments {#api-is31fl3736-set-color-all-arguments} + + - `uint8_t red` + The red value to set. + - `uint8_t green` + The green value to set. + - `uint8_t blue` + The blue value to set. + +--- + +### `void is31fl3736_set_value(int index, uint8_t value)` {#api-is31fl3736-set-value} + +Set the brightness of a single LED (single-color driver only). This function does not immediately update the LEDs; call `is31fl3736_update_pwm_buffers()` after you are finished. + +#### Arguments {#api-is31fl3736-set-value-arguments} + + - `int index` + The LED index (ie. the index into the `g_is31fl3736_leds` array). + - `uint8_t value` + The brightness value to set. + +--- + +### `void is31fl3736_set_value_all(uint8_t value)` {#api-is31fl3736-set-value-all} + +Set the brightness of all LEDs (single-color driver only). + +#### Arguments {#api-is31fl3736-set-value-all-arguments} + + - `uint8_t value` + The brightness value to set. + +--- + +### `void is31fl3736_set_led_control_register(uint8_t index, bool red, bool green, bool blue)` {#api-is31fl3736-set-led-control-register-rgb} + +Configure the LED control registers for a single LED (RGB driver only). This function does not immediately update the LEDs; call `is31fl3736_update_led_control_registers()` after you are finished. + +#### Arguments {#api-is31fl3736-set-led-control-register-rgb-arguments} + + - `uint8_t index` + The LED index (ie. the index into the `g_is31fl3736_leds` array). + - `bool red` + Enable or disable the red channel. + - `bool green` + Enable or disable the green channel. + - `bool blue` + Enable or disable the blue channel. + +--- + +### `void is31fl3736_set_led_control_register(uint8_t index, bool value)` {#api-is31fl3736-set-led-control-register-mono} + +Configure the LED control registers for a single LED (single-color driver only). This function does not immediately update the LEDs; call `is31fl3736_update_led_control_registers()` after you are finished. + +#### Arguments {#api-is31fl3736-set-led-control-register-mono-arguments} + + - `uint8_t index` + The LED index (ie. the index into the `g_is31fl3736_leds` array). + - `bool value` + Enable or disable the LED. + +--- + +### `void is31fl3736_update_pwm_buffers(uint8_t index)` {#api-is31fl3736-update-pwm-buffers} + +Flush the PWM values to the LED driver. + +#### Arguments {#api-is31fl3736-update-pwm-buffers-arguments} + + - `uint8_t index` + The driver index. + +--- + +### `void is31fl3736_update_led_control_registers(uint8_t index)` {#api-is31fl3736-update-led-control-registers} + +Flush the LED control register values to the LED driver. + +#### Arguments {#api-is31fl3736-update-led-control-registers-arguments} + + - `uint8_t index` + The driver index. diff --git a/docs/drivers/is31fl3737.md b/docs/drivers/is31fl3737.md new file mode 100644 index 0000000000..d23def237f --- /dev/null +++ b/docs/drivers/is31fl3737.md @@ -0,0 +1,310 @@ +# IS31FL3737 Driver {#is31fl3737-driver} + +I²C 12x12 LED matrix driver by Lumissil. Supports a maximum of four drivers, each controlling up to 144 single-color LEDs, or 48 RGB LEDs. + +[IS31FL3737 Datasheet](https://www.lumissil.com/assets/pdf/core/IS31FL3737_DS.pdf) + +## Usage {#usage} + +The IS31FL3737 driver code is automatically included if you are using the [LED Matrix](../features/led_matrix) or [RGB Matrix](../features/rgb_matrix) feature with the `is31fl3737` driver set, and you would use those APIs instead. + +However, if you need to use the driver standalone, add this to your `rules.mk`: + +```make +COMMON_VPATH += $(DRIVER_PATH)/led/issi +SRC += is31fl3737-mono.c # For single-color +SRC += is31fl3737.c # For RGB +I2C_DRIVER_REQUIRED = yes +``` + +## Basic Configuration {#basic-configuration} + +Add the following to your `config.h`: + +|Define |Default |Description | +|----------------------------|---------------------------------|----------------------------------------------------| +|`IS31FL3737_SDB_PIN` |*Not defined* |The GPIO pin connected to the drivers' shutdown pins| +|`IS31FL3737_I2C_TIMEOUT` |`100` |The I²C timeout in milliseconds | +|`IS31FL3737_I2C_PERSISTENCE`|`0` |The number of times to retry I²C transmissions | +|`IS31FL3737_I2C_ADDRESS_1` |*Not defined* |The I²C address of driver 0 | +|`IS31FL3737_I2C_ADDRESS_2` |*Not defined* |The I²C address of driver 1 | +|`IS31FL3737_I2C_ADDRESS_3` |*Not defined* |The I²C address of driver 2 | +|`IS31FL3737_I2C_ADDRESS_4` |*Not defined* |The I²C address of driver 3 | +|`IS31FL3737_PWM_FREQUENCY` |`IS31FL3737_PWM_FREQUENCY_8K4_HZ`|The PWM frequency of the LEDs (IS31FL3737B only) | +|`IS31FL3737_SW_PULLUP` |`IS31FL3737_PUR_0_OHM` |The `SWx` pullup resistor value | +|`IS31FL3737_CS_PULLDOWN` |`IS31FL3737_PDR_0_OHM` |The `CSx` pulldown resistor value | +|`IS31FL3737_GLOBAL_CURRENT` |`0xFF` |The global current control value | + +### I²C Addressing {#i2c-addressing} + +The IS31FL3737 has four possible 7-bit I²C addresses, depending on how the `ADDR` pin is connected. + +To configure this, set the `IS31FL3737_I2C_ADDRESS_n` defines to one of the following in your `config.h`, where *n* denotes the driver index: + +|Define |Value | +|----------------------------|------| +|`IS31FL3737_I2C_ADDRESS_GND`|`0x50`| +|`IS31FL3737_I2C_ADDRESS_SCL`|`0x55`| +|`IS31FL3737_I2C_ADDRESS_SDA`|`0x5A`| +|`IS31FL3737_I2C_ADDRESS_VCC`|`0x5F`| + +### PWM Frequency {#pwm-frequency} + +The PWM frequency can be adjusted (for IS31FL3737B only) by adding the following to your `config.h`: + +```c +#define IS31FL3737_PWM_FREQUENCY IS31FL3737_PWM_FREQUENCY_8K4_HZ +``` + +Valid values are: + +|Define |Frequency | +|----------------------------------|-----------------| +|`IS31FL3737_PWM_FREQUENCY_8K4_HZ` |8.4 kHz (default)| +|`IS31FL3737_PWM_FREQUENCY_4K2_HZ` |4.2 kHz | +|`IS31FL3737_PWM_FREQUENCY_26K7_HZ`|26.7 kHz | +|`IS31FL3737_PWM_FREQUENCY_2K1_HZ` |2.1 kHz | +|`IS31FL3737_PWM_FREQUENCY_1K05_HZ`|1.05 kHz | + +### De-Ghosting {#de-ghosting} + +These settings control the pullup and pulldown resistor values on the `SWy` and `CSx` pins respectively, for the purposes of eliminating ghosting. Refer to the datasheet (p. 23) for more information on how and why this occurs. + +To adjust the resistor values, add the following to your `config.h`: + +```c +#define IS31FL3737_SW_PULLUP IS31FL3737_PUR_0_OHM +#define IS31FL3737_CS_PULLDOWN IS31FL3737_PDR_0_OHM +``` + +Valid values for `IS31FL3737_SW_PULLUP` are: + +|Define |Resistance | +|------------------------|--------------| +|`IS31FL3737_PUR_0_OHM` |None (default)| +|`IS31FL3737_PUR_0K5_OHM`|0.5 kΩ | +|`IS31FL3737_PUR_1K_OHM` |1 kΩ | +|`IS31FL3737_PUR_2K_OHM` |2 kΩ | +|`IS31FL3737_PUR_4K_OHM` |4 kΩ | +|`IS31FL3737_PUR_8K_OHM` |8 kΩ | +|`IS31FL3737_PUR_16K_OHM`|16 kΩ | +|`IS31FL3737_PUR_32K_OHM`|32 kΩ | + +Valid values for `IS31FL3737_CS_PULLDOWN` are: + +|Define |Resistance | +|------------------------|--------------| +|`IS31FL3737_PDR_0_OHM` |None (default)| +|`IS31FL3737_PDR_0K5_OHM`|0.5 kΩ | +|`IS31FL3737_PDR_1K_OHM` |1 kΩ | +|`IS31FL3737_PDR_2K_OHM` |2 kΩ | +|`IS31FL3737_PDR_4K_OHM` |4 kΩ | +|`IS31FL3737_PDR_8K_OHM` |8 kΩ | +|`IS31FL3737_PDR_16K_OHM`|16 kΩ | +|`IS31FL3737_PDR_32K_OHM`|32 kΩ | + +### Global Current Control {#global-current-control} + +This setting controls the current sunk by the `CSx` pins, from 0 to 255. By default, the value is the maximum (255), but if you need to lower it, add the following to your `config.h`: + +```c +#define IS31FL3737_GLOBAL_CURRENT 0xFF +``` + +## ARM/ChibiOS Configuration {#arm-configuration} + +Depending on the ChibiOS board configuration, you may need to [enable and configure I²C](i2c#arm-configuration) at the keyboard level. + +## LED Mapping {#led-mapping} + +In order to use this driver, each output must be mapped to an LED index, by adding the following to your `<keyboardname>.c`: + +```c +const is31fl3737_led_t PROGMEM g_is31fl3737_leds[IS31FL3737_LED_COUNT] = { +/* Driver + * | R G B */ + {0, SW1_CS1, SW1_CS2, SW1_CS3}, + // etc... +}; +``` + +In this example, the red, green and blue channels for the first LED index on driver 0 all have their cathodes connected to the `SW1` pin, and their anodes on the `CS1`, `CS2` and `CS3` pins respectively. + +For the single-color driver, the principle is the same, but there is only one channel: + +```c +const is31fl3737_led_t PROGMEM g_is31fl3737_leds[IS31FL3737_LED_COUNT] = { +/* Driver + * | V */ + {0, SW1_CS1}, + // etc... +}; +``` + +These values correspond to the register indices as shown in the datasheet on page 15, figure 9. + +## API {#api} + +### `struct is31fl3737_led_t` {#api-is31fl3737-led-t} + +Contains the PWM register addresses for a single RGB LED. + +#### Members {#api-is31fl3737-led-t-members} + + - `uint8_t driver` + The driver index of the LED, from 0 to 3. + - `uint8_t r` + The output PWM register address for the LED's red channel (RGB driver only). + - `uint8_t g` + The output PWM register address for the LED's green channel (RGB driver only). + - `uint8_t b` + The output PWM register address for the LED's blue channel (RGB driver only). + - `uint8_t v` + The output PWM register address for the LED (single-color driver only). + +--- + +### `void is31fl3737_init(uint8_t index)` {#api-is31fl3737-init} + +Initialize the LED driver. This function should be called first. + +#### Arguments {#api-is31fl3737-init-arguments} + + - `uint8_t index` + The driver index. + +--- + +### `void is31fl3737_write_register(uint8_t index, uint8_t reg, uint8_t data)` {#api-is31fl3737-write-register} + +Set the value of the given register. + +#### Arguments {#api-is31fl3737-write-register-arguments} + + - `uint8_t index` + The driver index. + - `uint8_t reg` + The register address. + - `uint8_t data` + The value to set. + +--- + +### `void is31fl3737_select_page(uint8_t index, uint8_t page)` {#api-is31fl3737-select-page} + +Change the current page for configuring the LED driver. + +#### Arguments {#api-is31fl3737-select-page-arguments} + + - `uint8_t index` + The driver index. + - `uint8_t page` + The page number to select. + +--- + +### `void is31fl3737_set_color(int index, uint8_t red, uint8_t green, uint8_t blue)` {#api-is31fl3737-set-color} + +Set the color of a single LED (RGB driver only). This function does not immediately update the LEDs; call `is31fl3737_update_pwm_buffers()` after you are finished. + +#### Arguments {#api-is31fl3737-set-color-arguments} + + - `int index` + The LED index (ie. the index into the `g_is31fl3737_leds` array). + - `uint8_t red` + The red value to set. + - `uint8_t green` + The green value to set. + - `uint8_t blue` + The blue value to set. + +--- + +### `void is31fl3737_set_color_all(uint8_t red, uint8_t green, uint8_t blue)` {#api-is31fl3737-set-color-all} + +Set the color of all LEDs (RGB driver only). + +#### Arguments {#api-is31fl3737-set-color-all-arguments} + + - `uint8_t red` + The red value to set. + - `uint8_t green` + The green value to set. + - `uint8_t blue` + The blue value to set. + +--- + +### `void is31fl3737_set_value(int index, uint8_t value)` {#api-is31fl3737-set-value} + +Set the brightness of a single LED (single-color driver only). This function does not immediately update the LEDs; call `is31fl3737_update_pwm_buffers()` after you are finished. + +#### Arguments {#api-is31fl3737-set-value-arguments} + + - `int index` + The LED index (ie. the index into the `g_is31fl3737_leds` array). + - `uint8_t value` + The brightness value to set. + +--- + +### `void is31fl3737_set_value_all(uint8_t value)` {#api-is31fl3737-set-value-all} + +Set the brightness of all LEDs (single-color driver only). + +#### Arguments {#api-is31fl3737-set-value-all-arguments} + + - `uint8_t value` + The brightness value to set. + +--- + +### `void is31fl3737_set_led_control_register(uint8_t index, bool red, bool green, bool blue)` {#api-is31fl3737-set-led-control-register-rgb} + +Configure the LED control registers for a single LED (RGB driver only). This function does not immediately update the LEDs; call `is31fl3737_update_led_control_registers()` after you are finished. + +#### Arguments {#api-is31fl3737-set-led-control-register-rgb-arguments} + + - `uint8_t index` + The LED index (ie. the index into the `g_is31fl3737_leds` array). + - `bool red` + Enable or disable the red channel. + - `bool green` + Enable or disable the green channel. + - `bool blue` + Enable or disable the blue channel. + +--- + +### `void is31fl3737_set_led_control_register(uint8_t index, bool value)` {#api-is31fl3737-set-led-control-register-mono} + +Configure the LED control registers for a single LED (single-color driver only). This function does not immediately update the LEDs; call `is31fl3737_update_led_control_registers()` after you are finished. + +#### Arguments {#api-is31fl3737-set-led-control-register-mono-arguments} + + - `uint8_t index` + The LED index (ie. the index into the `g_is31fl3737_leds` array). + - `bool value` + Enable or disable the LED. + +--- + +### `void is31fl3737_update_pwm_buffers(uint8_t index)` {#api-is31fl3737-update-pwm-buffers} + +Flush the PWM values to the LED driver. + +#### Arguments {#api-is31fl3737-update-pwm-buffers-arguments} + + - `uint8_t index` + The driver index. + +--- + +### `void is31fl3737_update_led_control_registers(uint8_t index)` {#api-is31fl3737-update-led-control-registers} + +Flush the LED control register values to the LED driver. + +#### Arguments {#api-is31fl3737-update-led-control-registers-arguments} + + - `uint8_t index` + The driver index. diff --git a/docs/drivers/is31fl3741.md b/docs/drivers/is31fl3741.md new file mode 100644 index 0000000000..dce5c08b21 --- /dev/null +++ b/docs/drivers/is31fl3741.md @@ -0,0 +1,310 @@ +# IS31FL3741 Driver {#is31fl3741-driver} + +I²C 39x9 LED matrix driver by Lumissil. Supports a maximum of four drivers, each controlling up to 351 single-color LEDs, or 117 RGB LEDs. + +[IS31FL3741A Datasheet](https://www.lumissil.com/assets/pdf/core/IS31FL3741A_DS.pdf) + +## Usage {#usage} + +The IS31FL3741 driver code is automatically included if you are using the [LED Matrix](../features/led_matrix) or [RGB Matrix](../features/rgb_matrix) feature with the `is31fl3741` driver set, and you would use those APIs instead. + +However, if you need to use the driver standalone, add this to your `rules.mk`: + +```make +COMMON_VPATH += $(DRIVER_PATH)/led/issi +SRC += is31fl3741-mono.c # For single-color +SRC += is31fl3741.c # For RGB +I2C_DRIVER_REQUIRED = yes +``` + +## Basic Configuration {#basic-configuration} + +Add the following to your `config.h`: + +|Define |Default |Description | +|----------------------------|---------------------------------|----------------------------------------------------| +|`IS31FL3741_SDB_PIN` |*Not defined* |The GPIO pin connected to the drivers' shutdown pins| +|`IS31FL3741_I2C_TIMEOUT` |`100` |The I²C timeout in milliseconds | +|`IS31FL3741_I2C_PERSISTENCE`|`0` |The number of times to retry I²C transmissions | +|`IS31FL3741_I2C_ADDRESS_1` |*Not defined* |The I²C address of driver 0 | +|`IS31FL3741_I2C_ADDRESS_2` |*Not defined* |The I²C address of driver 1 | +|`IS31FL3741_I2C_ADDRESS_3` |*Not defined* |The I²C address of driver 2 | +|`IS31FL3741_I2C_ADDRESS_4` |*Not defined* |The I²C address of driver 3 | +|`IS31FL3741_CONFIGURATION` |`1` |The value of the configuration register | +|`IS31FL3741_PWM_FREQUENCY` |`IS31FL3741_PWM_FREQUENCY_29K_HZ`|The PWM frequency of the LEDs (IS31FL3741A only) | +|`IS31FL3741_SW_PULLUP` |`IS31FL3741_PUR_32K_OHM` |The `SWx` pullup resistor value | +|`IS31FL3741_CS_PULLDOWN` |`IS31FL3741_PDR_32K_OHM` |The `CSx` pulldown resistor value | +|`IS31FL3741_GLOBAL_CURRENT` |`0xFF` |The global current control value | + +### I²C Addressing {#i2c-addressing} + +The IS31FL3741 has four possible 7-bit I²C addresses, depending on how the `ADDR` pin is connected. + +To configure this, set the `IS31FL3741_I2C_ADDRESS_n` defines to one of the following in your `config.h`, where *n* denotes the driver index: + +|Define |Value | +|----------------------------|------| +|`IS31FL3741_I2C_ADDRESS_GND`|`0x30`| +|`IS31FL3741_I2C_ADDRESS_SCL`|`0x31`| +|`IS31FL3741_I2C_ADDRESS_SDA`|`0x32`| +|`IS31FL3741_I2C_ADDRESS_VCC`|`0x33`| + +### PWM Frequency {#pwm-frequency} + +The PWM frequency can be adjusted (for IS31FL3741A only) by adding the following to your `config.h`: + +```c +#define IS31FL3741_PWM_FREQUENCY IS31FL3741_PWM_FREQUENCY_29K_HZ +``` + +Valid values are: + +|Define |Frequency | +|---------------------------------|----------------| +|`IS31FL3741_PWM_FREQUENCY_29K_HZ`|29 kHz (default)| +|`IS31FL3741_PWM_FREQUENCY_3K6_HZ`|3.6 kHz | +|`IS31FL3741_PWM_FREQUENCY_1K8_HZ`|1.8 kHz | +|`IS31FL3741_PWM_FREQUENCY_900_HZ`|900 Hz | + +### De-Ghosting {#de-ghosting} + +These settings control the pullup and pulldown resistor values on the `CSx` and `SWy` pins respectively, for the purposes of eliminating ghosting. Refer to the datasheet (p. 18) for more information on how and why this occurs. + +To adjust the resistor values, add the following to your `config.h`: + +```c +#define IS31FL3741_SW_PULLUP IS31FL3741_PUR_32K_OHM +#define IS31FL3741_CS_PULLDOWN IS31FL3741_PDR_32K_OHM +``` + +Valid values for `IS31FL3741_SW_PULLUP` are: + +|Define |Resistance | +|------------------------|---------------| +|`IS31FL3741_PUR_0_OHM` |None | +|`IS31FL3741_PUR_0K5_OHM`|0.5 kΩ | +|`IS31FL3741_PUR_1K_OHM` |1 kΩ | +|`IS31FL3741_PUR_2K_OHM` |2 kΩ | +|`IS31FL3741_PUR_4K_OHM` |4 kΩ | +|`IS31FL3741_PUR_8K_OHM` |8 kΩ | +|`IS31FL3741_PUR_16K_OHM`|16 kΩ | +|`IS31FL3741_PUR_32K_OHM`|32 kΩ (default)| + +Valid values for `IS31FL3741_CS_PULLDOWN` are: + +|Define |Resistance | +|------------------------|---------------| +|`IS31FL3741_PDR_0_OHM` |None | +|`IS31FL3741_PDR_0K5_OHM`|0.5 kΩ | +|`IS31FL3741_PDR_1K_OHM` |1 kΩ | +|`IS31FL3741_PDR_2K_OHM` |2 kΩ | +|`IS31FL3741_PDR_4K_OHM` |4 kΩ | +|`IS31FL3741_PDR_8K_OHM` |8 kΩ | +|`IS31FL3741_PDR_16K_OHM`|16 kΩ | +|`IS31FL3741_PDR_32K_OHM`|32 kΩ (default)| + +### Global Current Control {#global-current-control} + +This setting controls the current sunk by the `CSx` pins, from 0 to 255. By default, the value is the maximum (255), but if you need to lower it, add the following to your `config.h`: + +```c +#define IS31FL3741_GLOBAL_CURRENT 0xFF +``` + +## ARM/ChibiOS Configuration {#arm-configuration} + +Depending on the ChibiOS board configuration, you may need to [enable and configure I²C](i2c#arm-configuration) at the keyboard level. + +## LED Mapping {#led-mapping} + +In order to use this driver, each output must be mapped to an LED index, by adding the following to your `<keyboardname>.c`: + +```c +const is31fl3741_led_t PROGMEM g_is31fl3741_leds[IS31FL3741_LED_COUNT] = { +/* Driver + * | R G B */ + {0, SW1_CS1, SW1_CS2, SW1_CS3}, + // etc... +}; +``` + +In this example, the red, green and blue channels for the first LED index on driver 0 all have their anodes connected to the `SW1` pin, and their cathodes on the `CS1`, `CS2` and `CS3` pins respectively. + +For the single-color driver, the principle is the same, but there is only one channel: + +```c +const is31fl3741_led_t PROGMEM g_is31fl3741_leds[IS31FL3741_LED_COUNT] = { +/* Driver + * | V */ + {0, SW1_CS1}, + // etc... +}; +``` + +These values correspond to the register indices as shown in the datasheet on page 12, figure 8. + +## API {#api} + +### `struct is31fl3741_led_t` {#api-is31fl3741-led-t} + +Contains the PWM register addresses for a single RGB LED. + +#### Members {#api-is31fl3741-led-t-members} + + - `uint32_t driver` + The driver index of the LED, from 0 to 3. + - `uint32_t r` + The output PWM register address for the LED's red channel (RGB driver only). + - `uint32_t g` + The output PWM register address for the LED's green channel (RGB driver only). + - `uint32_t b` + The output PWM register address for the LED's blue channel (RGB driver only). + - `uint32_t v` + The output PWM register address for the LED (single-color driver only). + +--- + +### `void is31fl3741_init(uint8_t index)` {#api-is31fl3741-init} + +Initialize the LED driver. This function should be called first. + +#### Arguments {#api-is31fl3741-init-arguments} + + - `uint8_t index` + The driver index. + +--- + +### `void is31fl3741_write_register(uint8_t index, uint8_t reg, uint8_t data)` {#api-is31fl3741-write-register} + +Set the value of the given register. + +#### Arguments {#api-is31fl3741-write-register-arguments} + + - `uint8_t index` + The driver index. + - `uint8_t reg` + The register address. + - `uint8_t data` + The value to set. + +--- + +### `void is31fl3741_select_page(uint8_t index, uint8_t page)` {#api-is31fl3741-select-page} + +Change the current page for configuring the LED driver. + +#### Arguments {#api-is31fl3741-select-page-arguments} + + - `uint8_t index` + The driver index. + - `uint8_t page` + The page number to select. + +--- + +### `void is31fl3741_set_color(int index, uint8_t red, uint8_t green, uint8_t blue)` {#api-is31fl3741-set-color} + +Set the color of a single LED (RGB driver only). This function does not immediately update the LEDs; call `is31fl3741_update_pwm_buffers()` after you are finished. + +#### Arguments {#api-is31fl3741-set-color-arguments} + + - `int index` + The LED index (ie. the index into the `g_is31fl3741_leds` array). + - `uint8_t red` + The red value to set. + - `uint8_t green` + The green value to set. + - `uint8_t blue` + The blue value to set. + +--- + +### `void is31fl3741_set_color_all(uint8_t red, uint8_t green, uint8_t blue)` {#api-is31fl3741-set-color-all} + +Set the color of all LEDs (RGB driver only). + +#### Arguments {#api-is31fl3741-set-color-all-arguments} + + - `uint8_t red` + The red value to set. + - `uint8_t green` + The green value to set. + - `uint8_t blue` + The blue value to set. + +--- + +### `void is31fl3741_set_value(int index, uint8_t value)` {#api-is31fl3741-set-value} + +Set the brightness of a single LED (single-color driver only). This function does not immediately update the LEDs; call `is31fl3741_update_pwm_buffers()` after you are finished. + +#### Arguments {#api-is31fl3741-set-value-arguments} + + - `int index` + The LED index (ie. the index into the `g_is31fl3741_leds` array). + - `uint8_t value` + The brightness value to set. + +--- + +### `void is31fl3741_set_value_all(uint8_t value)` {#api-is31fl3741-set-value-all} + +Set the brightness of all LEDs (single-color driver only). + +#### Arguments {#api-is31fl3741-set-value-all-arguments} + + - `uint8_t value` + The brightness value to set. + +--- + +### `void is31fl3741_set_led_control_register(uint8_t index, bool red, bool green, bool blue)` {#api-is31fl3741-set-led-control-register-rgb} + +Configure the LED control registers for a single LED (RGB driver only). This function does not immediately update the LEDs; call `is31fl3741_update_led_control_registers()` after you are finished. + +#### Arguments {#api-is31fl3741-set-led-control-register-rgb-arguments} + + - `uint8_t index` + The LED index (ie. the index into the `g_is31fl3741_leds` array). + - `bool red` + Enable or disable the red channel. + - `bool green` + Enable or disable the green channel. + - `bool blue` + Enable or disable the blue channel. + +--- + +### `void is31fl3741_set_led_control_register(uint8_t index, bool value)` {#api-is31fl3741-set-led-control-register-mono} + +Configure the LED control registers for a single LED (single-color driver only). This function does not immediately update the LEDs; call `is31fl3741_update_led_control_registers()` after you are finished. + +#### Arguments {#api-is31fl3741-set-led-control-register-mono-arguments} + + - `uint8_t index` + The LED index (ie. the index into the `g_is31fl3741_leds` array). + - `bool value` + Enable or disable the LED. + +--- + +### `void is31fl3741_update_pwm_buffers(uint8_t index)` {#api-is31fl3741-update-pwm-buffers} + +Flush the PWM values to the LED driver. + +#### Arguments {#api-is31fl3741-update-pwm-buffers-arguments} + + - `uint8_t index` + The driver index. + +--- + +### `void is31fl3741_update_led_control_registers(uint8_t index)` {#api-is31fl3741-update-led-control-registers} + +Flush the LED control register values to the LED driver. + +#### Arguments {#api-is31fl3741-update-led-control-registers-arguments} + + - `uint8_t index` + The driver index. diff --git a/docs/drivers/is31fl3742a.md b/docs/drivers/is31fl3742a.md new file mode 100644 index 0000000000..ebe648cba4 --- /dev/null +++ b/docs/drivers/is31fl3742a.md @@ -0,0 +1,310 @@ +# IS31FL3742A Driver {#is31fl3742a-driver} + +I²C 30x6 LED matrix driver by Lumissil. Supports a maximum of four drivers, each controlling up to 180 single-color LEDs, or 60 RGB LEDs. + +[IS31FL3742A Datasheet](https://www.lumissil.com/assets/pdf/core/IS31FL3742A_DS.pdf) + +## Usage {#usage} + +The IS31FL3742A driver code is automatically included if you are using the [LED Matrix](../features/led_matrix) or [RGB Matrix](../features/rgb_matrix) feature with the `is31fl3742a` driver set, and you would use those APIs instead. + +However, if you need to use the driver standalone, add this to your `rules.mk`: + +```make +COMMON_VPATH += $(DRIVER_PATH)/led/issi +SRC += is31fl3742a-mono.c # For single-color +SRC += is31fl3742a.c # For RGB +I2C_DRIVER_REQUIRED = yes +``` + +## Basic Configuration {#basic-configuration} + +Add the following to your `config.h`: + +|Define |Default |Description | +|-----------------------------|----------------------------------|----------------------------------------------------| +|`IS31FL3742A_SDB_PIN` |*Not defined* |The GPIO pin connected to the drivers' shutdown pins| +|`IS31FL3742A_I2C_TIMEOUT` |`100` |The I²C timeout in milliseconds | +|`IS31FL3742A_I2C_PERSISTENCE`|`0` |The number of times to retry I²C transmissions | +|`IS31FL3742A_I2C_ADDRESS_1` |*Not defined* |The I²C address of driver 0 | +|`IS31FL3742A_I2C_ADDRESS_2` |*Not defined* |The I²C address of driver 1 | +|`IS31FL3742A_I2C_ADDRESS_3` |*Not defined* |The I²C address of driver 2 | +|`IS31FL3742A_I2C_ADDRESS_4` |*Not defined* |The I²C address of driver 3 | +|`IS31FL3742A_CONFIGURATION` |`0x31` |The value of the configuration register | +|`IS31FL3742A_PWM_FREQUENCY` |`IS31FL3742A_PWM_FREQUENCY_29K_HZ`|The PWM frequency of the LEDs | +|`IS31FL3742A_SW_PULLDOWN` |`IS31FL3742A_PDR_8K_OHM` |The `SWx` pulldown resistor value | +|`IS31FL3742A_CS_PULLUP` |`IS31FL3742A_PUR_8K_OHM` |The `CSx` pullup resistor value | +|`IS31FL3742A_GLOBAL_CURRENT` |`0xFF` |The global current control value | + +### I²C Addressing {#i2c-addressing} + +The IS31FL3742A has four possible 7-bit I²C addresses, depending on how the `ADDR` pin is connected. + +To configure this, set the `IS31FL3742A_I2C_ADDRESS_n` defines to one of the following in your `config.h`, where *n* denotes the driver index: + +|Define |Value | +|-----------------------------|------| +|`IS31FL3742A_I2C_ADDRESS_GND`|`0x30`| +|`IS31FL3742A_I2C_ADDRESS_SCL`|`0x31`| +|`IS31FL3742A_I2C_ADDRESS_SDA`|`0x32`| +|`IS31FL3742A_I2C_ADDRESS_VCC`|`0x33`| + +### PWM Frequency {#pwm-frequency} + +The PWM frequency can be adjusted by adding the following to your `config.h`: + +```c +#define IS31FL3742A_PWM_FREQUENCY IS31FL3742A_PWM_FREQUENCY_29K_HZ +``` + +Valid values are: + +|Define |Frequency | +|----------------------------------|----------------| +|`IS31FL3742A_PWM_FREQUENCY_29K_HZ`|29 kHz (default)| +|`IS31FL3742A_PWM_FREQUENCY_3K6_HZ`|3.6 kHz | +|`IS31FL3742A_PWM_FREQUENCY_1K8_HZ`|1.8 kHz | +|`IS31FL3742A_PWM_FREQUENCY_900_HZ`|900 Hz | + +### De-Ghosting {#de-ghosting} + +These settings control the pulldown and pullup resistor values on the `SWy` and `CSx` pins respectively, for the purposes of eliminating ghosting. Refer to the datasheet (p. 23) for more information on how and why this occurs. + +To adjust the resistor values, add the following to your `config.h`: + +```c +#define IS31FL3742A_SW_PULLDOWN IS31FL3742A_PDR_8K_OHM +#define IS31FL3742A_CS_PULLUP IS31FL3742A_PUR_8K_OHM +``` + +Valid values for `IS31FL3742A_SW_PULLDOWN` are: + +|Define |Resistance | +|-------------------------|--------------| +|`IS31FL3742A_PDR_0_OHM` |None | +|`IS31FL3742A_PDR_0K5_OHM`|0.5 kΩ | +|`IS31FL3742A_PDR_1K_OHM` |1 kΩ | +|`IS31FL3742A_PDR_2K_OHM` |2 kΩ | +|`IS31FL3742A_PDR_4K_OHM` |4 kΩ | +|`IS31FL3742A_PDR_8K_OHM` |8 kΩ (default)| +|`IS31FL3742A_PDR_16K_OHM`|16 kΩ | +|`IS31FL3742A_PDR_32K_OHM`|32 kΩ | + +Valid values for `IS31FL3742A_CS_PULLUP` are: + +|Define |Resistance | +|-------------------------|--------------| +|`IS31FL3742A_PUR_0_OHM` |None | +|`IS31FL3742A_PUR_0K5_OHM`|0.5 kΩ | +|`IS31FL3742A_PUR_1K_OHM` |1 kΩ | +|`IS31FL3742A_PUR_2K_OHM` |2 kΩ | +|`IS31FL3742A_PUR_4K_OHM` |4 kΩ | +|`IS31FL3742A_PUR_8K_OHM` |8 kΩ (default)| +|`IS31FL3742A_PUR_16K_OHM`|16 kΩ | +|`IS31FL3742A_PUR_32K_OHM`|32 kΩ | + +### Global Current Control {#global-current-control} + +This setting controls the current sunk by the `CSx` pins, from 0 to 255. By default, the value is the maximum (255), but if you need to lower it, add the following to your `config.h`: + +```c +#define IS31FL3742A_GLOBAL_CURRENT 0xFF +``` + +## ARM/ChibiOS Configuration {#arm-configuration} + +Depending on the ChibiOS board configuration, you may need to [enable and configure I²C](i2c#arm-configuration) at the keyboard level. + +## LED Mapping {#led-mapping} + +In order to use this driver, each output must be mapped to an LED index, by adding the following to your `<keyboardname>.c`: + +```c +const is31fl3742a_led_t PROGMEM g_is31fl3742a_leds[IS31FL3742A_LED_COUNT] = { +/* Driver + * | R G B */ + {0, SW1_CS1, SW1_CS2, SW1_CS3}, + // etc... +}; +``` + +In this example, the red, green and blue channels for the first LED index on driver 0 all have their anodes connected to the `SW1` pin, and their cathodes on the `CS1`, `CS2` and `CS3` pins respectively. + +For the single-color driver, the principle is the same, but there is only one channel: + +```c +const is31fl3742a_led_t PROGMEM g_is31fl3742a_leds[IS31FL3742A_LED_COUNT] = { +/* Driver + * | V */ + {0, SW1_CS1}, + // etc... +}; +``` + +These values correspond to the register indices as shown in the datasheet on page 12, figure 8. + +## API {#api} + +### `struct is31fl3742a_led_t` {#api-is31fl3742a-led-t} + +Contains the PWM register addresses for a single RGB LED. + +#### Members {#api-is31fl3742a-led-t-members} + + - `uint8_t driver` + The driver index of the LED, from 0 to 3. + - `uint8_t r` + The output PWM register address for the LED's red channel (RGB driver only). + - `uint8_t g` + The output PWM register address for the LED's green channel (RGB driver only). + - `uint8_t b` + The output PWM register address for the LED's blue channel (RGB driver only). + - `uint8_t v` + The output PWM register address for the LED (single-color driver only). + +--- + +### `void is31fl3742a_init(uint8_t index)` {#api-is31fl3742a-init} + +Initialize the LED driver. This function should be called first. + +#### Arguments {#api-is31fl3742a-init-arguments} + + - `uint8_t index` + The driver index. + +--- + +### `void is31fl3742a_write_register(uint8_t index, uint8_t reg, uint8_t data)` {#api-is31fl3742a-write-register} + +Set the value of the given register. + +#### Arguments {#api-is31fl3742a-write-register-arguments} + + - `uint8_t index` + The driver index. + - `uint8_t reg` + The register address. + - `uint8_t data` + The value to set. + +--- + +### `void is31fl3742a_select_page(uint8_t index, uint8_t page)` {#api-is31fl3742a-select-page} + +Change the current page for configuring the LED driver. + +#### Arguments {#api-is31fl3742a-select-page-arguments} + + - `uint8_t index` + The driver index. + - `uint8_t page` + The page number to select. + +--- + +### `void is31fl3742a_set_color(int index, uint8_t red, uint8_t green, uint8_t blue)` {#api-is31fl3742a-set-color} + +Set the color of a single LED (RGB driver only). This function does not immediately update the LEDs; call `is31fl3742a_update_pwm_buffers()` after you are finished. + +#### Arguments {#api-is31fl3742a-set-color-arguments} + + - `int index` + The LED index (ie. the index into the `g_is31fl3742a_leds` array). + - `uint8_t red` + The red value to set. + - `uint8_t green` + The green value to set. + - `uint8_t blue` + The blue value to set. + +--- + +### `void is31fl3742a_set_color_all(uint8_t red, uint8_t green, uint8_t blue)` {#api-is31fl3742a-set-color-all} + +Set the color of all LEDs (RGB driver only). + +#### Arguments {#api-is31fl3742a-set-color-all-arguments} + + - `uint8_t red` + The red value to set. + - `uint8_t green` + The green value to set. + - `uint8_t blue` + The blue value to set. + +--- + +### `void is31fl3742a_set_value(int index, uint8_t value)` {#api-is31fl3742a-set-value} + +Set the brightness of a single LED (single-color driver only). This function does not immediately update the LEDs; call `is31fl3742a_update_pwm_buffers()` after you are finished. + +#### Arguments {#api-is31fl3742a-set-value-arguments} + + - `int index` + The LED index (ie. the index into the `g_is31fl3742a_leds` array). + - `uint8_t value` + The brightness value to set. + +--- + +### `void is31fl3742a_set_value_all(uint8_t value)` {#api-is31fl3742a-set-value-all} + +Set the brightness of all LEDs (single-color driver only). + +#### Arguments {#api-is31fl3742a-set-value-all-arguments} + + - `uint8_t value` + The brightness value to set. + +--- + +### `void is31fl3742a_set_scaling_register(uint8_t index, uint8_t red, uint8_t green, uint8_t blue)` {#api-is31fl3742a-set-scaling-register-rgb} + +Configure the scaling registers for a single LED (RGB driver only). This function does not immediately update the LEDs; call `is31fl3742a_update_scaling_registers()` after you are finished. + +#### Arguments {#api-is31fl3742a-set-scaling-register-rgb-arguments} + + - `uint8_t index` + The LED index (ie. the index into the `g_is31fl3742a_leds` array). + - `uint8_t red` + The scaling value for the red channel. + - `uint8_t green` + The scaling value for the green channel. + - `uint8_t blue` + The scaling value for the blue channel. + +--- + +### `void is31fl3742a_set_scaling_register(uint8_t index, uint8_t value)` {#api-is31fl3742a-set-scaling-register-mono} + +Configure the scaling register for a single LED (single-color driver only). This function does not immediately update the LEDs; call `is31fl3742a_update_scaling_registers()` after you are finished. + +#### Arguments {#api-is31fl3742a-set-scaling-register-mono-arguments} + + - `uint8_t index` + The LED index (ie. the index into the `g_is31fl3742a_leds` array). + - `uint8_t value` + The scaling value for the LED. + +--- + +### `void is31fl3742a_update_pwm_buffers(uint8_t index)` {#api-is31fl3742a-update-pwm-buffers} + +Flush the PWM values to the LED driver. + +#### Arguments {#api-is31fl3742a-update-pwm-buffers-arguments} + + - `uint8_t index` + The driver index. + +--- + +### `void is31fl3742a_update_scaling_registers(uint8_t index)` {#api-is31fl3742a-update-scaling-registers} + +Flush the scaling register values to the LED driver. + +#### Arguments {#api-is31fl3742a-update-scaling-registers-arguments} + + - `uint8_t index` + The driver index. diff --git a/docs/drivers/is31fl3743a.md b/docs/drivers/is31fl3743a.md new file mode 100644 index 0000000000..9ca55c5eeb --- /dev/null +++ b/docs/drivers/is31fl3743a.md @@ -0,0 +1,320 @@ +# IS31FL3743A Driver {#is31fl3743a-driver} + +I²C 18x11 LED matrix driver by Lumissil. Supports a maximum of four drivers, each controlling up to 198 single-color LEDs, or 66 RGB LEDs. + +[IS31FL3743A Datasheet](https://www.lumissil.com/assets/pdf/core/IS31FL3743A_DS.pdf) + +## Usage {#usage} + +The IS31FL3743A driver code is automatically included if you are using the [LED Matrix](../features/led_matrix) or [RGB Matrix](../features/rgb_matrix) feature with the `is31fl3743a` driver set, and you would use those APIs instead. + +However, if you need to use the driver standalone, add this to your `rules.mk`: + +```make +COMMON_VPATH += $(DRIVER_PATH)/led/issi +SRC += is31fl3743a-mono.c # For single-color +SRC += is31fl3743a.c # For RGB +I2C_DRIVER_REQUIRED = yes +``` + +## Basic Configuration {#basic-configuration} + +Add the following to your `config.h`: + +|Define |Default |Description | +|-----------------------------|-------------------------------|----------------------------------------------------| +|`IS31FL3743A_SDB_PIN` |*Not defined* |The GPIO pin connected to the drivers' shutdown pins| +|`IS31FL3743A_I2C_TIMEOUT` |`100` |The I²C timeout in milliseconds | +|`IS31FL3743A_I2C_PERSISTENCE`|`0` |The number of times to retry I²C transmissions | +|`IS31FL3743A_I2C_ADDRESS_1` |*Not defined* |The I²C address of driver 0 | +|`IS31FL3743A_I2C_ADDRESS_2` |*Not defined* |The I²C address of driver 1 | +|`IS31FL3743A_I2C_ADDRESS_3` |*Not defined* |The I²C address of driver 2 | +|`IS31FL3743A_I2C_ADDRESS_4` |*Not defined* |The I²C address of driver 3 | +|`IS31FL3743A_SYNC_1` |`IS31FL3743A_SYNC_NONE` |The sync configuration for driver 0 | +|`IS31FL3743A_SYNC_2` |`IS31FL3743A_SYNC_NONE` |The sync configuration for driver 1 | +|`IS31FL3743A_SYNC_3` |`IS31FL3743A_SYNC_NONE` |The sync configuration for driver 2 | +|`IS31FL3743A_SYNC_4` |`IS31FL3743A_SYNC_NONE` |The sync configuration for driver 3 | +|`IS31FL3743A_CONFIGURATION` |`0x01` |The value of the configuration register | +|`IS31FL3743A_SW_PULLDOWN` |`IS31FL3743A_PDR_2K_OHM_SW_OFF`|The `SWx` pulldown resistor value | +|`IS31FL3743A_CS_PULLUP` |`IS31FL3743A_PUR_2K_OHM_CS_OFF`|The `CSx` pullup resistor value | +|`IS31FL3743A_GLOBAL_CURRENT` |`0xFF` |The global current control value | + +### I²C Addressing {#i2c-addressing} + +The IS31FL3743A has 16 possible 7-bit I²C addresses, depending on how the `ADDR1` and `ADDR2` pins are connected. + +To configure this, set the `IS31FL3743A_I2C_ADDRESS_n` defines to one of the following in your `config.h`, where *n* denotes the driver index: + +|Define |Value | +|---------------------------------|------| +|`IS31FL3743A_I2C_ADDRESS_GND_GND`|`0x20`| +|`IS31FL3743A_I2C_ADDRESS_GND_SCL`|`0x21`| +|`IS31FL3743A_I2C_ADDRESS_GND_SDA`|`0x22`| +|`IS31FL3743A_I2C_ADDRESS_GND_VCC`|`0x23`| +|`IS31FL3743A_I2C_ADDRESS_SCL_GND`|`0x24`| +|`IS31FL3743A_I2C_ADDRESS_SCL_SCL`|`0x25`| +|`IS31FL3743A_I2C_ADDRESS_SCL_SDA`|`0x26`| +|`IS31FL3743A_I2C_ADDRESS_SCL_VCC`|`0x27`| +|`IS31FL3743A_I2C_ADDRESS_SDA_GND`|`0x28`| +|`IS31FL3743A_I2C_ADDRESS_SDA_SCL`|`0x29`| +|`IS31FL3743A_I2C_ADDRESS_SDA_SDA`|`0x2A`| +|`IS31FL3743A_I2C_ADDRESS_SDA_VCC`|`0x2B`| +|`IS31FL3743A_I2C_ADDRESS_VCC_GND`|`0x2C`| +|`IS31FL3743A_I2C_ADDRESS_VCC_SCL`|`0x2D`| +|`IS31FL3743A_I2C_ADDRESS_VCC_SDA`|`0x2E`| +|`IS31FL3743A_I2C_ADDRESS_VCC_VCC`|`0x2F`| + +### Multi-Driver Synchronization {#multi-driver-synchronization} + +Multiple IS31FL3743A drivers can be synchronized by connecting the `SYNC` pins together. One driver must be designated as the "master", and the others configured as "slave". + +To do this, set the `IS31FL3743A_SYNC_n` defines accordingly in your `config.h`, where *n* denotes the driver index: + +|Define |Value | +|-------------------------|---------------------------| +|`IS31FL3743A_SYNC_NONE` |No synchronization | +|`IS31FL3743A_SYNC_MASTER`|Driver configured as master| +|`IS31FL3743A_SYNC_SLAVE` |Driver configured as slave | + +### De-Ghosting {#de-ghosting} + +These settings control the pulldown and pullup resistor values on the `SWy` and `CSx` pins respectively, for the purposes of eliminating ghosting. Refer to the datasheet (p. 23) for more information on how and why this occurs. + +To adjust the resistor values, add the following to your `config.h`: + +```c +#define IS31FL3743A_SW_PULLDOWN IS31FL3743A_PDR_2K_OHM_SW_OFF +#define IS31FL3743A_CS_PULLUP IS31FL3743A_PUR_2K_OHM_CS_OFF +``` + +Valid values for `IS31FL3743A_SW_PULLDOWN` are: + +|Define |Resistance | +|--------------------------------|------------------------------| +|`IS31FL3743A_PDR_0_OHM` |None (default) | +|`IS31FL3743A_PDR_0K5_OHM_SW_OFF`|0.5 kΩ in SWx off time | +|`IS31FL3743A_PDR_1K_OHM_SW_OFF` |1 kΩ in SWx off time | +|`IS31FL3743A_PDR_2K_OHM_SW_OFF` |2 kΩ in SWx off time (default)| +|`IS31FL3743A_PDR_1K_OHM` |1 kΩ | +|`IS31FL3743A_PDR_2K_OHM` |2 kΩ | +|`IS31FL3743A_PDR_4K_OHM` |4 kΩ | +|`IS31FL3743A_PDR_8K_OHM` |8 kΩ | + +Valid values for `IS31FL3743A_CS_PULLUP` are: + +|Define |Resistance | +|--------------------------------|------------------------------| +|`IS31FL3743A_PUR_0_OHM` |None (default) | +|`IS31FL3743A_PUR_0K5_OHM_CS_OFF`|0.5 kΩ in CSy off time | +|`IS31FL3743A_PUR_1K_OHM_CS_OFF` |1 kΩ in CSy off time | +|`IS31FL3743A_PUR_2K_OHM_CS_OFF` |2 kΩ in CSy off time (default)| +|`IS31FL3743A_PUR_1K_OHM` |1 kΩ | +|`IS31FL3743A_PUR_2K_OHM` |2 kΩ | +|`IS31FL3743A_PUR_4K_OHM` |4 kΩ | +|`IS31FL3743A_PUR_8K_OHM` |8 kΩ | + +### Global Current Control {#global-current-control} + +This setting controls the current sunk by the `CSy` pins, from 0 to 255. By default, the value is the maximum (255), but if you need to lower it, add the following to your `config.h`: + +```c +#define IS31FL3743A_GLOBAL_CURRENT 0xFF +``` + +## ARM/ChibiOS Configuration {#arm-configuration} + +Depending on the ChibiOS board configuration, you may need to [enable and configure I²C](i2c#arm-configuration) at the keyboard level. + +## LED Mapping {#led-mapping} + +In order to use this driver, each output must be mapped to an LED index, by adding the following to your `<keyboardname>.c`: + +```c +const is31fl3743a_led_t PROGMEM g_is31fl3743a_leds[IS31FL3743A_LED_COUNT] = { +/* Driver + * | R G B */ + {0, SW1_CS1, SW1_CS2, SW1_CS3}, + // etc... +}; +``` + +In this example, the red, green and blue channels for the first LED index on driver 0 all have their anodes connected to the `SW1` pin, and their cathodes on the `CS1`, `CS2` and `CS3` pins respectively. + +For the single-color driver, the principle is the same, but there is only one channel: + +```c +const is31fl3743a_led_t PROGMEM g_is31fl3743a_leds[IS31FL3743A_LED_COUNT] = { +/* Driver + * | V */ + {0, SW1_CS1}, + // etc... +}; +``` + +These values correspond to the register indices as shown in the datasheet on page 12, figure 8. + +## API {#api} + +### `struct is31fl3743a_led_t` {#api-is31fl3743a-led-t} + +Contains the PWM register addresses for a single RGB LED. + +#### Members {#api-is31fl3743a-led-t-members} + + - `uint8_t driver` + The driver index of the LED, from 0 to 3. + - `uint8_t r` + The output PWM register address for the LED's red channel (RGB driver only). + - `uint8_t g` + The output PWM register address for the LED's green channel (RGB driver only). + - `uint8_t b` + The output PWM register address for the LED's blue channel (RGB driver only). + - `uint8_t v` + The output PWM register address for the LED (single-color driver only). + +--- + +### `void is31fl3743a_init(uint8_t index)` {#api-is31fl3743a-init} + +Initialize the LED driver. This function should be called first. + +#### Arguments {#api-is31fl3743a-init-arguments} + + - `uint8_t index` + The driver index. + +--- + +### `void is31fl3743a_write_register(uint8_t index, uint8_t reg, uint8_t data)` {#api-is31fl3743a-write-register} + +Set the value of the given register. + +#### Arguments {#api-is31fl3743a-write-register-arguments} + + - `uint8_t index` + The driver index. + - `uint8_t reg` + The register address. + - `uint8_t data` + The value to set. + +--- + +### `void is31fl3743a_select_page(uint8_t index, uint8_t page)` {#api-is31fl3743a-select-page} + +Change the current page for configuring the LED driver. + +#### Arguments {#api-is31fl3743a-select-page-arguments} + + - `uint8_t index` + The driver index. + - `uint8_t page` + The page number to select. + +--- + +### `void is31fl3743a_set_color(int index, uint8_t red, uint8_t green, uint8_t blue)` {#api-is31fl3743a-set-color} + +Set the color of a single LED (RGB driver only). This function does not immediately update the LEDs; call `is31fl3743a_update_pwm_buffers()` after you are finished. + +#### Arguments {#api-is31fl3743a-set-color-arguments} + + - `int index` + The LED index (ie. the index into the `g_is31fl3743a_leds` array). + - `uint8_t red` + The red value to set. + - `uint8_t green` + The green value to set. + - `uint8_t blue` + The blue value to set. + +--- + +### `void is31fl3743a_set_color_all(uint8_t red, uint8_t green, uint8_t blue)` {#api-is31fl3743a-set-color-all} + +Set the color of all LEDs (RGB driver only). + +#### Arguments {#api-is31fl3743a-set-color-all-arguments} + + - `uint8_t red` + The red value to set. + - `uint8_t green` + The green value to set. + - `uint8_t blue` + The blue value to set. + +--- + +### `void is31fl3743a_set_value(int index, uint8_t value)` {#api-is31fl3743a-set-value} + +Set the brightness of a single LED (single-color driver only). This function does not immediately update the LEDs; call `is31fl3743a_update_pwm_buffers()` after you are finished. + +#### Arguments {#api-is31fl3743a-set-value-arguments} + + - `int index` + The LED index (ie. the index into the `g_is31fl3743a_leds` array). + - `uint8_t value` + The brightness value to set. + +--- + +### `void is31fl3743a_set_value_all(uint8_t value)` {#api-is31fl3743a-set-value-all} + +Set the brightness of all LEDs (single-color driver only). + +#### Arguments {#api-is31fl3743a-set-value-all-arguments} + + - `uint8_t value` + The brightness value to set. + +--- + +### `void is31fl3743a_set_scaling_register(uint8_t index, uint8_t red, uint8_t green, uint8_t blue)` {#api-is31fl3743a-set-scaling-register-rgb} + +Configure the scaling registers for a single LED (RGB driver only). This function does not immediately update the LEDs; call `is31fl3743a_update_scaling_registers()` after you are finished. + +#### Arguments {#api-is31fl3743a-set-scaling-register-rgb-arguments} + + - `uint8_t index` + The LED index (ie. the index into the `g_is31fl3743a_leds` array). + - `uint8_t red` + The scaling value for the red channel. + - `uint8_t green` + The scaling value for the green channel. + - `uint8_t blue` + The scaling value for the blue channel. + +--- + +### `void is31fl3743a_set_scaling_register(uint8_t index, uint8_t value)` {#api-is31fl3743a-set-scaling-register-mono} + +Configure the scaling register for a single LED (single-color driver only). This function does not immediately update the LEDs; call `is31fl3743a_update_scaling_registers()` after you are finished. + +#### Arguments {#api-is31fl3743a-set-scaling-register-mono-arguments} + + - `uint8_t index` + The LED index (ie. the index into the `g_is31fl3743a_leds` array). + - `uint8_t value` + The scaling value for the LED. + +--- + +### `void is31fl3743a_update_pwm_buffers(uint8_t index)` {#api-is31fl3743a-update-pwm-buffers} + +Flush the PWM values to the LED driver. + +#### Arguments {#api-is31fl3743a-update-pwm-buffers-arguments} + + - `uint8_t index` + The driver index. + +--- + +### `void is31fl3743a_update_scaling_registers(uint8_t index)` {#api-is31fl3743a-update-scaling-registers} + +Flush the scaling register values to the LED driver. + +#### Arguments {#api-is31fl3743a-update-scaling-registers-arguments} + + - `uint8_t index` + The driver index. diff --git a/docs/drivers/is31fl3745.md b/docs/drivers/is31fl3745.md new file mode 100644 index 0000000000..f13f029bfe --- /dev/null +++ b/docs/drivers/is31fl3745.md @@ -0,0 +1,320 @@ +# IS31FL3745 Driver {#is31fl3745-driver} + +I²C 18x8 LED matrix driver by Lumissil. Supports a maximum of four drivers, each controlling up to 144 single-color LEDs, or 48 RGB LEDs. + +[IS31FL3745 Datasheet](https://www.lumissil.com/assets/pdf/core/IS31FL3745_DS.pdf) + +## Usage {#usage} + +The IS31FL3745 driver code is automatically included if you are using the [LED Matrix](../features/led_matrix) or [RGB Matrix](../features/rgb_matrix) feature with the `is31fl3745` driver set, and you would use those APIs instead. + +However, if you need to use the driver standalone, add this to your `rules.mk`: + +```make +COMMON_VPATH += $(DRIVER_PATH)/led/issi +SRC += is31fl3745-mono.c # For single-color +SRC += is31fl3745.c # For RGB +I2C_DRIVER_REQUIRED = yes +``` + +## Basic Configuration {#basic-configuration} + +Add the following to your `config.h`: + +|Define |Default |Description | +|----------------------------|------------------------------|----------------------------------------------------| +|`IS31FL3745_SDB_PIN` |*Not defined* |The GPIO pin connected to the drivers' shutdown pins| +|`IS31FL3745_I2C_TIMEOUT` |`100` |The I²C timeout in milliseconds | +|`IS31FL3745_I2C_PERSISTENCE`|`0` |The number of times to retry I²C transmissions | +|`IS31FL3745_I2C_ADDRESS_1` |*Not defined* |The I²C address of driver 0 | +|`IS31FL3745_I2C_ADDRESS_2` |*Not defined* |The I²C address of driver 1 | +|`IS31FL3745_I2C_ADDRESS_3` |*Not defined* |The I²C address of driver 2 | +|`IS31FL3745_I2C_ADDRESS_4` |*Not defined* |The I²C address of driver 3 | +|`IS31FL3745_SYNC_1` |`IS31FL3745_SYNC_NONE` |The sync configuration for driver 0 | +|`IS31FL3745_SYNC_2` |`IS31FL3745_SYNC_NONE` |The sync configuration for driver 1 | +|`IS31FL3745_SYNC_3` |`IS31FL3745_SYNC_NONE` |The sync configuration for driver 2 | +|`IS31FL3745_SYNC_4` |`IS31FL3745_SYNC_NONE` |The sync configuration for driver 3 | +|`IS31FL3745_CONFIGURATION` |`0x31` |The value of the configuration register | +|`IS31FL3745_SW_PULLDOWN` |`IS31FL3745_PDR_2K_OHM_SW_OFF`|The `SWx` pulldown resistor value | +|`IS31FL3745_CS_PULLUP` |`IS31FL3745_PUR_2K_OHM_CS_OFF`|The `CSx` pullup resistor value | +|`IS31FL3745_GLOBAL_CURRENT` |`0xFF` |The global current control value | + +### I²C Addressing {#i2c-addressing} + +The IS31FL3745 has 16 possible 7-bit I²C addresses, depending on how the `ADDR1` and `ADDR2` pins are connected. + +To configure this, set the `IS31FL3745_I2C_ADDRESS_n` defines to one of the following in your `config.h`, where *n* denotes the driver index: + +|Define |Value | +|--------------------------------|------| +|`IS31FL3745_I2C_ADDRESS_GND_GND`|`0x20`| +|`IS31FL3745_I2C_ADDRESS_GND_SCL`|`0x21`| +|`IS31FL3745_I2C_ADDRESS_GND_SDA`|`0x22`| +|`IS31FL3745_I2C_ADDRESS_GND_VCC`|`0x23`| +|`IS31FL3745_I2C_ADDRESS_SCL_GND`|`0x24`| +|`IS31FL3745_I2C_ADDRESS_SCL_SCL`|`0x25`| +|`IS31FL3745_I2C_ADDRESS_SCL_SDA`|`0x26`| +|`IS31FL3745_I2C_ADDRESS_SCL_VCC`|`0x27`| +|`IS31FL3745_I2C_ADDRESS_SDA_GND`|`0x28`| +|`IS31FL3745_I2C_ADDRESS_SDA_SCL`|`0x29`| +|`IS31FL3745_I2C_ADDRESS_SDA_SDA`|`0x2A`| +|`IS31FL3745_I2C_ADDRESS_SDA_VCC`|`0x2B`| +|`IS31FL3745_I2C_ADDRESS_VCC_GND`|`0x2C`| +|`IS31FL3745_I2C_ADDRESS_VCC_SCL`|`0x2D`| +|`IS31FL3745_I2C_ADDRESS_VCC_SDA`|`0x2E`| +|`IS31FL3745_I2C_ADDRESS_VCC_VCC`|`0x2F`| + +### Multi-Driver Synchronization {#multi-driver-synchronization} + +Multiple IS31FL3745 drivers can be synchronized by connecting the `SYNC` pins together. One driver must be designated as the "master", and the others configured as "slave". + +To do this, set the `IS31FL3745_SYNC_n` defines accordingly in your `config.h`, where *n* denotes the driver index: + +|Define |Value | +|------------------------|---------------------------| +|`IS31FL3745_SYNC_NONE` |No synchronization | +|`IS31FL3745_SYNC_MASTER`|Driver configured as master| +|`IS31FL3745_SYNC_SLAVE` |Driver configured as slave | + +### De-Ghosting {#de-ghosting} + +These settings control the pulldown and pullup resistor values on the `SWy` and `CSx` pins respectively, for the purposes of eliminating ghosting. Refer to the datasheet (p. 23) for more information on how and why this occurs. + +To adjust the resistor values, add the following to your `config.h`: + +```c +#define IS31FL3745_SW_PULLDOWN IS31FL3745_PDR_2K_OHM_SW_OFF +#define IS31FL3745_CS_PULLUP IS31FL3745_PUR_2K_OHM_CS_OFF +``` + +Valid values for `IS31FL3745_SW_PULLDOWN` are: + +|Define |Resistance | +|-------------------------------|------------------------------| +|`IS31FL3745_PDR_0_OHM` |None (default) | +|`IS31FL3745_PDR_0K5_OHM_SW_OFF`|0.5 kΩ in SWx off time | +|`IS31FL3745_PDR_1K_OHM_SW_OFF` |1 kΩ in SWx off time | +|`IS31FL3745_PDR_2K_OHM_SW_OFF` |2 kΩ in SWx off time (default)| +|`IS31FL3745_PDR_1K_OHM` |1 kΩ | +|`IS31FL3745_PDR_2K_OHM` |2 kΩ | +|`IS31FL3745_PDR_4K_OHM` |4 kΩ | +|`IS31FL3745_PDR_8K_OHM` |8 kΩ | + +Valid values for `IS31FL3745_CS_PULLUP` are: + +|Define |Resistance | +|-------------------------------|------------------------------| +|`IS31FL3745_PUR_0_OHM` |None (default) | +|`IS31FL3745_PUR_0K5_OHM_CS_OFF`|0.5 kΩ in CSy off time | +|`IS31FL3745_PUR_1K_OHM_CS_OFF` |1 kΩ in CSy off time | +|`IS31FL3745_PUR_2K_OHM_CS_OFF` |2 kΩ in CSy off time (default)| +|`IS31FL3745_PUR_1K_OHM` |1 kΩ | +|`IS31FL3745_PUR_2K_OHM` |2 kΩ | +|`IS31FL3745_PUR_4K_OHM` |4 kΩ | +|`IS31FL3745_PUR_8K_OHM` |8 kΩ | + +### Global Current Control {#global-current-control} + +This setting controls the current sunk by the `CSy` pins, from 0 to 255. By default, the value is the maximum (255), but if you need to lower it, add the following to your `config.h`: + +```c +#define IS31FL3745_GLOBAL_CURRENT 0xFF +``` + +## ARM/ChibiOS Configuration {#arm-configuration} + +Depending on the ChibiOS board configuration, you may need to [enable and configure I²C](i2c#arm-configuration) at the keyboard level. + +## LED Mapping {#led-mapping} + +In order to use this driver, each output must be mapped to an LED index, by adding the following to your `<keyboardname>.c`: + +```c +const is31fl3745_led_t PROGMEM g_is31fl3745_leds[IS31FL3745_LED_COUNT] = { +/* Driver + * | R G B */ + {0, SW1_CS1, SW1_CS2, SW1_CS3}, + // etc... +}; +``` + +In this example, the red, green and blue channels for the first LED index on driver 0 all have their anodes connected to the `SW1` pin, and their cathodes on the `CS1`, `CS2` and `CS3` pins respectively. + +For the single-color driver, the principle is the same, but there is only one channel: + +```c +const is31fl3745_led_t PROGMEM g_is31fl3745_leds[IS31FL3745_LED_COUNT] = { +/* Driver + * | V */ + {0, SW1_CS1}, + // etc... +}; +``` + +These values correspond to the register indices as shown in the datasheet on page 12, figure 9. + +## API {#api} + +### `struct is31fl3745_led_t` {#api-is31fl3745-led-t} + +Contains the PWM register addresses for a single RGB LED. + +#### Members {#api-is31fl3745-led-t-members} + + - `uint8_t driver` + The driver index of the LED, from 0 to 3. + - `uint8_t r` + The output PWM register address for the LED's red channel (RGB driver only). + - `uint8_t g` + The output PWM register address for the LED's green channel (RGB driver only). + - `uint8_t b` + The output PWM register address for the LED's blue channel (RGB driver only). + - `uint8_t v` + The output PWM register address for the LED (single-color driver only). + +--- + +### `void is31fl3745_init(uint8_t index)` {#api-is31fl3745-init} + +Initialize the LED driver. This function should be called first. + +#### Arguments {#api-is31fl3745-init-arguments} + + - `uint8_t index` + The driver index. + +--- + +### `void is31fl3745_write_register(uint8_t index, uint8_t reg, uint8_t data)` {#api-is31fl3745-write-register} + +Set the value of the given register. + +#### Arguments {#api-is31fl3745-write-register-arguments} + + - `uint8_t index` + The driver index. + - `uint8_t reg` + The register address. + - `uint8_t data` + The value to set. + +--- + +### `void is31fl3745_select_page(uint8_t index, uint8_t page)` {#api-is31fl3745-select-page} + +Change the current page for configuring the LED driver. + +#### Arguments {#api-is31fl3745-select-page-arguments} + + - `uint8_t index` + The driver index. + - `uint8_t page` + The page number to select. + +--- + +### `void is31fl3745_set_color(int index, uint8_t red, uint8_t green, uint8_t blue)` {#api-is31fl3745-set-color} + +Set the color of a single LED (RGB driver only). This function does not immediately update the LEDs; call `is31fl3745_update_pwm_buffers()` after you are finished. + +#### Arguments {#api-is31fl3745-set-color-arguments} + + - `int index` + The LED index (ie. the index into the `g_is31fl3745_leds` array). + - `uint8_t red` + The red value to set. + - `uint8_t green` + The green value to set. + - `uint8_t blue` + The blue value to set. + +--- + +### `void is31fl3745_set_color_all(uint8_t red, uint8_t green, uint8_t blue)` {#api-is31fl3745-set-color-all} + +Set the color of all LEDs (RGB driver only). + +#### Arguments {#api-is31fl3745-set-color-all-arguments} + + - `uint8_t red` + The red value to set. + - `uint8_t green` + The green value to set. + - `uint8_t blue` + The blue value to set. + +--- + +### `void is31fl3745_set_value(int index, uint8_t value)` {#api-is31fl3745-set-value} + +Set the brightness of a single LED (single-color driver only). This function does not immediately update the LEDs; call `is31fl3745_update_pwm_buffers()` after you are finished. + +#### Arguments {#api-is31fl3745-set-value-arguments} + + - `int index` + The LED index (ie. the index into the `g_is31fl3745_leds` array). + - `uint8_t value` + The brightness value to set. + +--- + +### `void is31fl3745_set_value_all(uint8_t value)` {#api-is31fl3745-set-value-all} + +Set the brightness of all LEDs (single-color driver only). + +#### Arguments {#api-is31fl3745-set-value-all-arguments} + + - `uint8_t value` + The brightness value to set. + +--- + +### `void is31fl3745_set_scaling_register(uint8_t index, uint8_t red, uint8_t green, uint8_t blue)` {#api-is31fl3745-set-scaling-register-rgb} + +Configure the scaling registers for a single LED (RGB driver only). This function does not immediately update the LEDs; call `is31fl3745_update_scaling_registers()` after you are finished. + +#### Arguments {#api-is31fl3745-set-scaling-register-rgb-arguments} + + - `uint8_t index` + The LED index (ie. the index into the `g_is31fl3745_leds` array). + - `uint8_t red` + The scaling value for the red channel. + - `uint8_t green` + The scaling value for the green channel. + - `uint8_t blue` + The scaling value for the blue channel. + +--- + +### `void is31fl3745_set_scaling_register(uint8_t index, uint8_t value)` {#api-is31fl3745-set-scaling-register-mono} + +Configure the scaling register for a single LED (single-color driver only). This function does not immediately update the LEDs; call `is31fl3745_update_scaling_registers()` after you are finished. + +#### Arguments {#api-is31fl3745-set-scaling-register-mono-arguments} + + - `uint8_t index` + The LED index (ie. the index into the `g_is31fl3745_leds` array). + - `uint8_t value` + The scaling value for the LED. + +--- + +### `void is31fl3745_update_pwm_buffers(uint8_t index)` {#api-is31fl3745-update-pwm-buffers} + +Flush the PWM values to the LED driver. + +#### Arguments {#api-is31fl3745-update-pwm-buffers-arguments} + + - `uint8_t index` + The driver index. + +--- + +### `void is31fl3745_update_scaling_registers(uint8_t index)` {#api-is31fl3745-update-scaling-registers} + +Flush the scaling register values to the LED driver. + +#### Arguments {#api-is31fl3745-update-scaling-registers-arguments} + + - `uint8_t index` + The driver index. diff --git a/docs/drivers/is31fl3746a.md b/docs/drivers/is31fl3746a.md new file mode 100644 index 0000000000..bdd5c18357 --- /dev/null +++ b/docs/drivers/is31fl3746a.md @@ -0,0 +1,327 @@ +# IS31FL3746A Driver {#is31fl3746a-driver} + +I²C 18x4 LED matrix driver by Lumissil. Supports a maximum of four drivers, each controlling up to 72 single-color LEDs, or 24 RGB LEDs. + +[IS31FL3746A Datasheet](https://www.lumissil.com/assets/pdf/core/IS31FL3746A_DS.pdf) + +## Usage {#usage} + +The IS31FL3746A driver code is automatically included if you are using the [LED Matrix](../features/led_matrix) or [RGB Matrix](../features/rgb_matrix) feature with the `is31fl3746a` driver set, and you would use those APIs instead. + +However, if you need to use the driver standalone, add this to your `rules.mk`: + +```make +COMMON_VPATH += $(DRIVER_PATH)/led/issi +SRC += is31fl3746a-mono.c # For single-color +SRC += is31fl3746a.c # For RGB +I2C_DRIVER_REQUIRED = yes +``` + +## Basic Configuration {#basic-configuration} + +Add the following to your `config.h`: + +|Define |Default |Description | +|-----------------------------|----------------------------------|----------------------------------------------------| +|`IS31FL3746A_SDB_PIN` |*Not defined* |The GPIO pin connected to the drivers' shutdown pins| +|`IS31FL3746A_I2C_TIMEOUT` |`100` |The I²C timeout in milliseconds | +|`IS31FL3746A_I2C_PERSISTENCE`|`0` |The number of times to retry I²C transmissions | +|`IS31FL3746A_I2C_ADDRESS_1` |*Not defined* |The I²C address of driver 0 | +|`IS31FL3746A_I2C_ADDRESS_2` |*Not defined* |The I²C address of driver 1 | +|`IS31FL3746A_I2C_ADDRESS_3` |*Not defined* |The I²C address of driver 2 | +|`IS31FL3746A_I2C_ADDRESS_4` |*Not defined* |The I²C address of driver 3 | +|`IS31FL3746A_CONFIGURATION` |`0x01` |The value of the configuration register | +|`IS31FL3746A_PWM_FREQUENCY` |`IS31FL3746A_PWM_FREQUENCY_29K_HZ`|The PWM frequency of the LEDs | +|`IS31FL3746A_SW_PULLDOWN` |`IS31FL3746A_PDR_2K_OHM_SW_OFF` |The `SWx` pulldown resistor value | +|`IS31FL3746A_CS_PULLUP` |`IS31FL3746A_PUR_2K_OHM_CS_OFF` |The `CSx` pullup resistor value | +|`IS31FL3746A_GLOBAL_CURRENT` |`0xFF` |The global current control value | + +### I²C Addressing {#i2c-addressing} + +The IS31FL3746A has 16 possible 7-bit I²C addresses, depending on how the `ADDR1` and `ADDR2` pins are connected. + +To configure this, set the `IS31FL3746A_I2C_ADDRESS_n` defines to one of the following in your `config.h`, where *n* denotes the driver index: + +|Define |Value | +|---------------------------------|------| +|`IS31FL3746A_I2C_ADDRESS_GND_GND`|`0x60`| +|`IS31FL3746A_I2C_ADDRESS_GND_SCL`|`0x61`| +|`IS31FL3746A_I2C_ADDRESS_GND_SDA`|`0x62`| +|`IS31FL3746A_I2C_ADDRESS_GND_VCC`|`0x63`| +|`IS31FL3746A_I2C_ADDRESS_SCL_GND`|`0x64`| +|`IS31FL3746A_I2C_ADDRESS_SCL_SCL`|`0x65`| +|`IS31FL3746A_I2C_ADDRESS_SCL_SDA`|`0x66`| +|`IS31FL3746A_I2C_ADDRESS_SCL_VCC`|`0x67`| +|`IS31FL3746A_I2C_ADDRESS_SDA_GND`|`0x68`| +|`IS31FL3746A_I2C_ADDRESS_SDA_SCL`|`0x69`| +|`IS31FL3746A_I2C_ADDRESS_SDA_SDA`|`0x6A`| +|`IS31FL3746A_I2C_ADDRESS_SDA_VCC`|`0x6B`| +|`IS31FL3746A_I2C_ADDRESS_VCC_GND`|`0x6C`| +|`IS31FL3746A_I2C_ADDRESS_VCC_SCL`|`0x6D`| +|`IS31FL3746A_I2C_ADDRESS_VCC_SDA`|`0x6E`| +|`IS31FL3746A_I2C_ADDRESS_VCC_VCC`|`0x6F`| + +### PWM Frequency {#pwm-frequency} + +The PWM frequency can be adjusted by adding the following to your `config.h`: + +```c +#define IS31FL3746A_PWM_FREQUENCY IS31FL3746A_PWM_FREQUENCY_29K_HZ +``` + +Valid values are: + +|Define |Frequency | +|-----------------------------------|----------------| +|`IS31FL3746A_PWM_FREQUENCY_29K_HZ` |29 kHz (default)| +|`IS31FL3746A_PWM_FREQUENCY_14K5_HZ`|14.5 kHz | +|`IS31FL3746A_PWM_FREQUENCY_7K25_HZ`|7.25 kHz | +|`IS31FL3746A_PWM_FREQUENCY_3K63_HZ`|3.63 kHz | +|`IS31FL3746A_PWM_FREQUENCY_1K81_HZ`|1.81 kHz | +|`IS31FL3746A_PWM_FREQUENCY_906_HZ` |906 Hz | +|`IS31FL3746A_PWM_FREQUENCY_453_HZ` |453 Hz | + +### De-Ghosting {#de-ghosting} + +These settings control the pulldown and pullup resistor values on the `SWy` and `CSx` pins respectively, for the purposes of eliminating ghosting. Refer to the datasheet (p. 23) for more information on how and why this occurs. + +To adjust the resistor values, add the following to your `config.h`: + +```c +#define IS31FL3746A_SW_PULLDOWN IS31FL3746A_PDR_2K_OHM_SW_OFF +#define IS31FL3746A_CS_PULLUP IS31FL3746A_PUR_2K_OHM_CS_OFF +``` + +Valid values for `IS31FL3746A_SW_PULLDOWN` are: + +|Define |Resistance | +|--------------------------------|------------------------------| +|`IS31FL3746A_PDR_0_OHM` |None | +|`IS31FL3746A_PDR_0K5_OHM_SW_OFF`|0.5 kΩ in SWx off time | +|`IS31FL3746A_PDR_1K_OHM_SW_OFF` |1 kΩ in SWx off time | +|`IS31FL3746A_PDR_2K_OHM_SW_OFF` |2 kΩ in SWx off time (default)| +|`IS31FL3746A_PDR_1K_OHM` |1 kΩ | +|`IS31FL3746A_PDR_2K_OHM` |2 kΩ | +|`IS31FL3746A_PDR_4K_OHM` |4 kΩ | +|`IS31FL3746A_PDR_8K_OHM` |8 kΩ | + +Valid values for `IS31FL3746A_CS_PULLUP` are: + +|Define |Resistance | +|--------------------------------|------------------------------| +|`IS31FL3746A_PUR_0_OHM` |None (default) | +|`IS31FL3746A_PUR_0K5_OHM_CS_OFF`|0.5 kΩ in CSy off time | +|`IS31FL3746A_PUR_1K_OHM_CS_OFF` |1 kΩ in CSy off time | +|`IS31FL3746A_PUR_2K_OHM_CS_OFF` |2 kΩ in CSy off time (default)| +|`IS31FL3746A_PUR_1K_OHM` |1 kΩ | +|`IS31FL3746A_PUR_2K_OHM` |2 kΩ | +|`IS31FL3746A_PUR_4K_OHM` |4 kΩ | +|`IS31FL3746A_PUR_8K_OHM` |8 kΩ | + +### Global Current Control {#global-current-control} + +This setting controls the current sunk by the `CSy` pins, from 0 to 255. By default, the value is the maximum (255), but if you need to lower it, add the following to your `config.h`: + +```c +#define IS31FL3746A_GLOBAL_CURRENT 0xFF +``` + +## ARM/ChibiOS Configuration {#arm-configuration} + +Depending on the ChibiOS board configuration, you may need to [enable and configure I²C](i2c#arm-configuration) at the keyboard level. + +## LED Mapping {#led-mapping} + +In order to use this driver, each output must be mapped to an LED index, by adding the following to your `<keyboardname>.c`: + +```c +const is31fl3746a_led_t PROGMEM g_is31fl3746a_leds[IS31FL3746A_LED_COUNT] = { +/* Driver + * | R G B */ + {0, SW1_CS1, SW1_CS2, SW1_CS3}, + // etc... +}; +``` + +In this example, the red, green and blue channels for the first LED index on driver 0 all have their anodes connected to the `SW1` pin, and their cathodes on the `CS1`, `CS2` and `CS3` pins respectively. + +For the single-color driver, the principle is the same, but there is only one channel: + +```c +const is31fl3746a_led_t PROGMEM g_is31fl3746a_leds[IS31FL3746A_LED_COUNT] = { +/* Driver + * | V */ + {0, SW1_CS1}, + // etc... +}; +``` + +These values correspond to the register indices as shown in the datasheet on page 13, figure 8. + +## API {#api} + +### `struct is31fl3746a_led_t` {#api-is31fl3746a-led-t} + +Contains the PWM register addresses for a single RGB LED. + +#### Members {#api-is31fl3746a-led-t-members} + + - `uint8_t driver` + The driver index of the LED, from 0 to 3. + - `uint8_t r` + The output PWM register address for the LED's red channel (RGB driver only). + - `uint8_t g` + The output PWM register address for the LED's green channel (RGB driver only). + - `uint8_t b` + The output PWM register address for the LED's blue channel (RGB driver only). + - `uint8_t v` + The output PWM register address for the LED (single-color driver only). + +--- + +### `void is31fl3746a_init(uint8_t index)` {#api-is31fl3746a-init} + +Initialize the LED driver. This function should be called first. + +#### Arguments {#api-is31fl3746a-init-arguments} + + - `uint8_t index` + The driver index. + - `uint8_t sync` + Sync configuration of the LED driver. + +--- + +### `void is31fl3746a_write_register(uint8_t index, uint8_t reg, uint8_t data)` {#api-is31fl3746a-write-register} + +Set the value of the given register. + +#### Arguments {#api-is31fl3746a-write-register-arguments} + + - `uint8_t index` + The driver index. + - `uint8_t reg` + The register address. + - `uint8_t data` + The value to set. + +--- + +### `void is31fl3746a_select_page(uint8_t index, uint8_t page)` {#api-is31fl3746a-select-page} + +Change the current page for configuring the LED driver. + +#### Arguments {#api-is31fl3746a-select-page-arguments} + + - `uint8_t index` + The driver index. + - `uint8_t page` + The page number to select. + +--- + +### `void is31fl3746a_set_color(int index, uint8_t red, uint8_t green, uint8_t blue)` {#api-is31fl3746a-set-color} + +Set the color of a single LED (RGB driver only). This function does not immediately update the LEDs; call `is31fl3746a_update_pwm_buffers()` after you are finished. + +#### Arguments {#api-is31fl3746a-set-color-arguments} + + - `int index` + The LED index (ie. the index into the `g_is31fl3746a_leds` array). + - `uint8_t red` + The red value to set. + - `uint8_t green` + The green value to set. + - `uint8_t blue` + The blue value to set. + +--- + +### `void is31fl3746a_set_color_all(uint8_t red, uint8_t green, uint8_t blue)` {#api-is31fl3746a-set-color-all} + +Set the color of all LEDs (RGB driver only). + +#### Arguments {#api-is31fl3746a-set-color-all-arguments} + + - `uint8_t red` + The red value to set. + - `uint8_t green` + The green value to set. + - `uint8_t blue` + The blue value to set. + +--- + +### `void is31fl3746a_set_value(int index, uint8_t value)` {#api-is31fl3746a-set-value} + +Set the brightness of a single LED (single-color driver only). This function does not immediately update the LEDs; call `is31fl3746a_update_pwm_buffers()` after you are finished. + +#### Arguments {#api-is31fl3746a-set-value-arguments} + + - `int index` + The LED index (ie. the index into the `g_is31fl3746a_leds` array). + - `uint8_t value` + The brightness value to set. + +--- + +### `void is31fl3746a_set_value_all(uint8_t value)` {#api-is31fl3746a-set-value-all} + +Set the brightness of all LEDs (single-color driver only). + +#### Arguments {#api-is31fl3746a-set-value-all-arguments} + + - `uint8_t value` + The brightness value to set. + +--- + +### `void is31fl3746a_set_scaling_register(uint8_t index, uint8_t red, uint8_t green, uint8_t blue)` {#api-is31fl3746a-set-scaling-register-rgb} + +Configure the scaling registers for a single LED (RGB driver only). This function does not immediately update the LEDs; call `is31fl3746a_update_scaling_registers()` after you are finished. + +#### Arguments {#api-is31fl3746a-set-scaling-register-rgb-arguments} + + - `uint8_t index` + The LED index (ie. the index into the `g_is31fl3746a_leds` array). + - `uint8_t red` + The scaling value for the red channel. + - `uint8_t green` + The scaling value for the green channel. + - `uint8_t blue` + The scaling value for the blue channel. + +--- + +### `void is31fl3746a_set_scaling_register(uint8_t index, uint8_t value)` {#api-is31fl3746a-set-scaling-register-mono} + +Configure the scaling register for a single LED (single-color driver only). This function does not immediately update the LEDs; call `is31fl3746a_update_scaling_registers()` after you are finished. + +#### Arguments {#api-is31fl3746a-set-scaling-register-mono-arguments} + + - `uint8_t index` + The LED index (ie. the index into the `g_is31fl3746a_leds` array). + - `uint8_t value` + The scaling value for the LED. + +--- + +### `void is31fl3746a_update_pwm_buffers(uint8_t index)` {#api-is31fl3746a-update-pwm-buffers} + +Flush the PWM values to the LED driver. + +#### Arguments {#api-is31fl3746a-update-pwm-buffers-arguments} + + - `uint8_t index` + The driver index. + +--- + +### `void is31fl3746a_update_scaling_registers(uint8_t index)` {#api-is31fl3746a-update-scaling-registers} + +Flush the scaling register values to the LED driver. + +#### Arguments {#api-is31fl3746a-update-scaling-registers-arguments} + + - `uint8_t index` + The driver index. diff --git a/docs/drivers/snled27351.md b/docs/drivers/snled27351.md new file mode 100644 index 0000000000..1d91182f7c --- /dev/null +++ b/docs/drivers/snled27351.md @@ -0,0 +1,245 @@ +# SNLED27351 Driver {#snled27351-driver} + +I²C 16x12 LED matrix driver by Sonix. Supports a maximum of four drivers, each controlling up to 192 single-color LEDs, or 64 RGB LEDs. + +A slightly modified version of this IC is also known as "CKLED2001". + +[SNLED27351 Datasheet](https://www.sonix.com.tw/files/1/D235860C0C037C28E050007F01001CBE) + +## Usage {#usage} + +The SNLED27351 driver code is automatically included if you are using the [LED Matrix](../features/led_matrix) or [RGB Matrix](../features/rgb_matrix) feature with the `snled27351` driver set, and you would use those APIs instead. + +However, if you need to use the driver standalone, add this to your `rules.mk`: + +```make +COMMON_VPATH += $(DRIVER_PATH)/led +SRC += snled27351-mono.c # For single-color +SRC += snled27351.c # For RGB +I2C_DRIVER_REQUIRED = yes +``` + +## Basic Configuration {#basic-configuration} + +Add the following to your `config.h`: + +|Define |Default |Description | +|----------------------------|-------------|----------------------------------------------------| +|`SNLED27351_SDB_PIN` |*Not defined*|The GPIO pin connected to the drivers' shutdown pins| +|`SNLED27351_I2C_TIMEOUT` |`100` |The I²C timeout in milliseconds | +|`SNLED27351_I2C_PERSISTENCE`|`0` |The number of times to retry I²C transmissions | +|`SNLED27351_I2C_ADDRESS_1` |*Not defined*|The I²C address of driver 0 | +|`SNLED27351_I2C_ADDRESS_2` |*Not defined*|The I²C address of driver 1 | +|`SNLED27351_I2C_ADDRESS_3` |*Not defined*|The I²C address of driver 2 | +|`SNLED27351_I2C_ADDRESS_4` |*Not defined*|The I²C address of driver 3 | + +### I²C Addressing {#i2c-addressing} + +The SNLED27351 has four possible 7-bit I²C addresses, depending on how the `ADDR` pin is connected. + +To configure this, set the `SNLED27351_I2C_ADDRESS_n` defines to one of the following in your `config.h`, where *n* denotes the driver index: + +|Define |Value | +|------------------------------|------| +|`SNLED27351_I2C_ADDRESS_GND` |`0x74`| +|`SNLED27351_I2C_ADDRESS_SCL` |`0x75`| +|`SNLED27351_I2C_ADDRESS_SDA` |`0x76`| +|`SNLED27351_I2C_ADDRESS_VDDIO`|`0x77`| + +## ARM/ChibiOS Configuration {#arm-configuration} + +Depending on the ChibiOS board configuration, you may need to [enable and configure I²C](i2c#arm-configuration) at the keyboard level. + +## LED Mapping {#led-mapping} + +In order to use this driver, each output must be mapped to an LED index, by adding the following to your `<keyboardname>.c`: + +```c +const snled27351_led_t PROGMEM g_snled27351_leds[SNLED27351_LED_COUNT] = { +/* Driver + * | R G B */ + {0, CB1_CA1, CB1_CA2, CB1_CA3}, + // etc... +}; +``` + +In this example, the red, green and blue channels for the first LED index on driver 0 all have their cathodes connected to the `CB1` pin, and their anodes on the `CA1`, `CA2` and `CA3` pins respectively. + +For the single-color driver, the principle is the same, but there is only one channel: + +```c +const snled27351_led_t PROGMEM g_snled27351_leds[SNLED27351_LED_COUNT] = { +/* Driver + * | V */ + {0, CB1_CA1}, + // etc... +}; +``` + +These values correspond to the register indices as shown in the datasheet on page 13. + +## API {#api} + +### `struct snled27351_led_t` {#api-snled27351-led-t} + +Contains the PWM register addresses for a single RGB LED. + +#### Members {#api-snled27351-led-t-members} + + - `uint8_t driver` + The driver index of the LED, from 0 to 3. + - `uint8_t r` + The output PWM register address for the LED's red channel (RGB driver only). + - `uint8_t g` + The output PWM register address for the LED's green channel (RGB driver only). + - `uint8_t b` + The output PWM register address for the LED's blue channel (RGB driver only). + - `uint8_t v` + The output PWM register address for the LED (single-color driver only). + +--- + +### `void snled27351_init(uint8_t index)` {#api-snled27351-init} + +Initialize the LED driver. This function should be called first. + +#### Arguments {#api-snled27351-init-arguments} + + - `uint8_t index` + The driver index. + +--- + +### `void snled27351_write_register(uint8_t index, uint8_t reg, uint8_t data)` {#api-snled27351-write-register} + +Set the value of the given register. + +#### Arguments {#api-snled27351-write-register-arguments} + + - `uint8_t index` + The driver index. + - `uint8_t reg` + The register address. + - `uint8_t data` + The value to set. + +--- + +### `void snled27351_select_page(uint8_t index, uint8_t page)` {#api-snled27351-select-page} + +Change the current page for configuring the LED driver. + +#### Arguments {#api-snled27351-select-page-arguments} + + - `uint8_t index` + The driver index. + - `uint8_t page` + The page number to select. + +--- + +### `void snled27351_set_color(int index, uint8_t red, uint8_t green, uint8_t blue)` {#api-snled27351-set-color} + +Set the color of a single LED (RGB driver only). This function does not immediately update the LEDs; call `snled27351_update_pwm_buffers()` after you are finished. + +#### Arguments {#api-snled27351-set-color-arguments} + + - `int index` + The LED index (ie. the index into the `g_snled27351_leds` array). + - `uint8_t red` + The red value to set. + - `uint8_t green` + The green value to set. + - `uint8_t blue` + The blue value to set. + +--- + +### `void snled27351_set_color_all(uint8_t red, uint8_t green, uint8_t blue)` {#api-snled27351-set-color-all} + +Set the color of all LEDs (RGB driver only). + +#### Arguments {#api-snled27351-set-color-all-arguments} + + - `uint8_t red` + The red value to set. + - `uint8_t green` + The green value to set. + - `uint8_t blue` + The blue value to set. + +--- + +### `void snled27351_set_value(int index, uint8_t value)` {#api-snled27351-set-value} + +Set the brightness of a single LED (single-color driver only). This function does not immediately update the LEDs; call `snled27351_update_pwm_buffers()` after you are finished. + +#### Arguments {#api-snled27351-set-value-arguments} + + - `int index` + The LED index (ie. the index into the `g_snled27351_leds` array). + - `uint8_t value` + The brightness value to set. + +--- + +### `void snled27351_set_value_all(uint8_t value)` {#api-snled27351-set-value-all} + +Set the brightness of all LEDs (single-color driver only). + +#### Arguments {#api-snled27351-set-value-all-arguments} + + - `uint8_t value` + The brightness value to set. + +--- + +### `void snled27351_set_led_control_register(uint8_t index, bool red, bool green, bool blue)` {#api-snled27351-set-led-control-register-rgb} + +Configure the LED control registers for a single LED (RGB driver only). This function does not immediately update the LEDs; call `snled27351_update_led_control_registers()` after you are finished. + +#### Arguments {#api-snled27351-set-led-control-register-rgb-arguments} + + - `uint8_t index` + The LED index (ie. the index into the `g_snled27351_leds` array). + - `bool red` + Enable or disable the red channel. + - `bool green` + Enable or disable the green channel. + - `bool blue` + Enable or disable the blue channel. + +--- + +### `void snled27351_set_led_control_register(uint8_t index, bool value)` {#api-snled27351-set-led-control-register-mono} + +Configure the LED control registers for a single LED (single-color driver only). This function does not immediately update the LEDs; call `snled27351_update_led_control_registers()` after you are finished. + +#### Arguments {#api-snled27351-set-led-control-register-mono-arguments} + + - `uint8_t index` + The LED index (ie. the index into the `g_snled27351_leds` array). + - `bool value` + Enable or disable the LED. + +--- + +### `void snled27351_update_pwm_buffers(uint8_t index)` {#api-snled27351-update-pwm-buffers} + +Flush the PWM values to the LED driver. + +#### Arguments {#api-snled27351-update-pwm-buffers-arguments} + + - `uint8_t index` + The driver index. + +--- + +### `void snled27351_update_led_control_registers(uint8_t index)` {#api-snled27351-update-led-control-registers} + +Flush the LED control register values to the LED driver. + +#### Arguments {#api-snled27351-update-led-control-registers-arguments} + + - `uint8_t index` + The driver index. diff --git a/docs/feature_converters.md b/docs/feature_converters.md index 229d1007ab..0021c34e51 100644 --- a/docs/feature_converters.md +++ b/docs/feature_converters.md @@ -10,7 +10,7 @@ The following converters are available at this time: |------------|-------------------| | `promicro` | `proton_c` | | `promicro` | `kb2040` | -| `promicro` | `promicro_rp2040` | +| `promicro` | `sparkfun_pm2040` | | `promicro` | `blok` | | `promicro` | `bit_c_pro` | | `promicro` | `stemcell` | @@ -77,7 +77,7 @@ If a board currently supported in QMK uses a [Pro Micro](https://www.sparkfun.co |------------------------------------------------------------------------------------------|-------------------| | [Proton C](https://qmk.fm/proton-c/) | `proton_c` | | [Adafruit KB2040](https://learn.adafruit.com/adafruit-kb2040) | `kb2040` | -| [SparkFun Pro Micro - RP2040](https://www.sparkfun.com/products/18288) | `promicro_rp2040` | +| [SparkFun Pro Micro - RP2040](https://www.sparkfun.com/products/18288) | `sparkfun_pm2040` | | [Blok](https://boardsource.xyz/store/628b95b494dfa308a6581622) | `blok` | | [Bit-C PRO](https://nullbits.co/bit-c-pro) | `bit_c_pro` | | [STeMCell](https://github.com/megamind4089/STeMCell) | `stemcell` | @@ -94,7 +94,7 @@ Converter summary: |-------------------|---------------------------------|------------------------------|-------------------------------------| | `proton_c` | `-e CONVERT_TO=proton_c` | `CONVERT_TO=proton_c` | `#ifdef CONVERT_TO_PROTON_C` | | `kb2040` | `-e CONVERT_TO=kb2040` | `CONVERT_TO=kb2040` | `#ifdef CONVERT_TO_KB2040` | -| `promicro_rp2040` | `-e CONVERT_TO=promicro_rp2040` | `CONVERT_TO=promicro_rp2040` | `#ifdef CONVERT_TO_PROMICRO_RP2040` | +| `sparkfun_pm2040` | `-e CONVERT_TO=sparkfun_pm2040` | `CONVERT_TO=sparkfun_pm2040` | `#ifdef CONVERT_TO_SPARKFUN_PM2040` | | `blok` | `-e CONVERT_TO=blok` | `CONVERT_TO=blok` | `#ifdef CONVERT_TO_BLOK` | | `bit_c_pro` | `-e CONVERT_TO=bit_c_pro` | `CONVERT_TO=bit_c_pro` | `#ifdef CONVERT_TO_BIT_C_PRO` | | `stemcell` | `-e CONVERT_TO=stemcell` | `CONVERT_TO=stemcell` | `#ifdef CONVERT_TO_STEMCELL` | @@ -135,7 +135,7 @@ The following defaults are based on what has been implemented for [RP2040](platf | USB Host (e.g. USB-USB converter) | Not supported (USB host code is AVR specific and is not currently supported on ARM) | | [Split keyboards](features/split_keyboard) | Partial via `PIO` vendor driver - heavily dependent on enabled features | -### SparkFun Pro Micro - RP2040, Blok, Bit-C PRO and Michi {#promicro_rp2040 } +### SparkFun Pro Micro - RP2040, Blok, Bit-C PRO and Michi {#sparkfun_pm2040 } Feature set is identical to [Adafruit KB2040](#kb2040). diff --git a/docs/features/encoders.md b/docs/features/encoders.md index 9157fe67c8..a674eaa4a6 100644 --- a/docs/features/encoders.md +++ b/docs/features/encoders.md @@ -9,15 +9,15 @@ ENCODER_ENABLE = yes and this to your `config.h`: ```c -#define ENCODERS_PAD_A { B12 } -#define ENCODERS_PAD_B { B13 } +#define ENCODER_A_PINS { B12 } +#define ENCODER_B_PINS { B13 } ``` Each PAD_A/B variable defines an array so multiple encoders can be defined, e.g.: ```c -#define ENCODERS_PAD_A { encoder1a, encoder2a } -#define ENCODERS_PAD_B { encoder1b, encoder2b } +#define ENCODER_A_PINS { encoder1a, encoder2a } +#define ENCODER_B_PINS { encoder1b, encoder2b } ``` If your encoder's clockwise directions are incorrect, you can swap the A & B pad definitions. They can also be flipped with a define: @@ -49,8 +49,8 @@ For 4× encoders you also can assign default position if encoder skips pulses wh If you are using different pinouts for the encoders on each half of a split keyboard, you can define the pinout (and optionally, resolutions) for the right half like this: ```c -#define ENCODERS_PAD_A_RIGHT { encoder1a, encoder2a } -#define ENCODERS_PAD_B_RIGHT { encoder1b, encoder2b } +#define ENCODER_A_PINS_RIGHT { encoder1a, encoder2a } +#define ENCODER_B_PINS_RIGHT { encoder1b, encoder2b } #define ENCODER_RESOLUTIONS_RIGHT { 2, 4 } ``` @@ -59,11 +59,11 @@ If the `_RIGHT` definitions aren't specified in your `config.h`, then the non-`_ Additionally, if one side does not have an encoder, you can specify `{}` for the pins/resolution -- for example, a split keyboard with only a right-side encoder: ```c -#define ENCODERS_PAD_A { } -#define ENCODERS_PAD_B { } +#define ENCODER_A_PINS { } +#define ENCODER_B_PINS { } #define ENCODER_RESOLUTIONS { } -#define ENCODERS_PAD_A_RIGHT { B12 } -#define ENCODERS_PAD_B_RIGHT { B13 } +#define ENCODER_A_PINS_RIGHT { B12 } +#define ENCODER_B_PINS_RIGHT { B13 } #define ENCODER_RESOLUTIONS_RIGHT { 4 } ``` @@ -84,10 +84,10 @@ Your `keymap.c` will then need an encoder mapping defined (for four layers and t ```c #if defined(ENCODER_MAP_ENABLE) const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { - [0] = { ENCODER_CCW_CW(KC_MS_WH_UP, KC_MS_WH_DOWN), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, - [1] = { ENCODER_CCW_CW(UG_HUED, UG_HUEU), ENCODER_CCW_CW(UG_SATD, UG_SATU) }, - [2] = { ENCODER_CCW_CW(UG_VALD, UG_VALU), ENCODER_CCW_CW(UG_SPDD, UG_SPDU) }, - [3] = { ENCODER_CCW_CW(UG_PREV, UG_NEXT), ENCODER_CCW_CW(KC_RIGHT, KC_LEFT) }, + [0] = { ENCODER_CCW_CW(MS_WHLU, MS_WHLD), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [1] = { ENCODER_CCW_CW(UG_HUED, UG_HUEU), ENCODER_CCW_CW(UG_SATD, UG_SATU) }, + [2] = { ENCODER_CCW_CW(UG_VALD, UG_VALU), ENCODER_CCW_CW(UG_SPDD, UG_SPDU) }, + [3] = { ENCODER_CCW_CW(UG_PREV, UG_NEXT), ENCODER_CCW_CW(KC_RIGHT, KC_LEFT) }, }; #endif ``` @@ -174,13 +174,13 @@ Multiple encoders may share pins so long as each encoder has a distinct pair of For example you can support two encoders using only 3 pins like this ``` -#define ENCODERS_PAD_A { B1, B1 } -#define ENCODERS_PAD_B { B2, B3 } +#define ENCODER_A_PINS { B1, B1 } +#define ENCODER_B_PINS { B2, B3 } ``` You could even support three encoders using only three pins (one per encoder) however in this configuration, rotating two encoders which share pins simultaneously will often generate incorrect output. For example: ``` -#define ENCODERS_PAD_A { B1, B1, B2 } -#define ENCODERS_PAD_B { B2, B3, B3 } +#define ENCODER_A_PINS { B1, B1, B2 } +#define ENCODER_B_PINS { B2, B3, B3 } ``` Here rotating Encoder 0 `B1 B2` and Encoder 1 `B1 B3` could be interpreted as rotating Encoder 2 `B2 B3` or `B3 B2` depending on the timing. This may still be a useful configuration depending on your use case diff --git a/docs/features/key_overrides.md b/docs/features/key_overrides.md index 4c568f1679..9b6015175c 100644 --- a/docs/features/key_overrides.md +++ b/docs/features/key_overrides.md @@ -14,7 +14,7 @@ You can use key overrides in a similar way to momentary layer/fn keys to activat 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 **`). +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`contains pointers to `key_override_t` values (`const key_override_t **`). ## Creating Key Overrides {#creating-key-overrides} @@ -42,9 +42,8 @@ This shows how the mentioned example of sending `delete` when `shift` + `backspa const key_override_t delete_key_override = ko_make_basic(MOD_MASK_SHIFT, KC_BSPC, KC_DEL); // 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! +const key_override_t *key_overrides[] = { + &delete_key_override }; ``` @@ -91,14 +90,13 @@ const key_override_t brightness_up_override = ko_make_with_layers_negmods_and_op 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 *[]){ +const key_override_t *key_overrides[] = { &next_track_override, &prev_track_override, &vol_up_override, &vol_down_override, &brightness_up_override, - &brightness_down_override, - NULL + &brightness_down_override }; ``` @@ -112,10 +110,9 @@ const key_override_t tilde_esc_override = ko_make_basic(MOD_MASK_SHIFT, KC_ESC, // GUI + esc = ` const key_override_t grave_esc_override = ko_make_basic(MOD_MASK_GUI, KC_ESC, KC_GRV); -const key_override_t **key_overrides = (const key_override_t *[]){ +const key_override_t *key_overrides[] = { &tilde_esc_override, - &grave_esc_override, - NULL + &grave_esc_override }; ``` diff --git a/docs/features/led_indicators.md b/docs/features/led_indicators.md index 8435c69a55..211fda2581 100644 --- a/docs/features/led_indicators.md +++ b/docs/features/led_indicators.md @@ -21,9 +21,8 @@ There are three ways to get the lock LED state: The `host_keyboard_led_state()` may reflect an updated state before `led_update_user()` is called. ::: -Two deprecated functions that provide the LED state as `uint8_t`: +Deprecated functions that provide the LED state as `uint8_t`: -* `uint8_t led_set_user(uint8_t usb_led)` * `uint8_t host_keyboard_leds()` ## Configuration Options @@ -50,10 +49,6 @@ When the configuration options do not provide enough flexibility, the following Both receives LED state as a struct parameter. Returning `true` in `led_update_user()` will allow the keyboard level code in `led_update_kb()` to run as well. Returning `false` will override the keyboard level code, depending on how the keyboard level function is set up. -::: tip -This boolean return type of `led_update_user` allows for overriding keyboard LED controls, and is thus recommended over the void `led_set_user` function. -::: - ### Example of keyboard LED update implementation This is a template indicator function that can be implemented on keyboard level code: diff --git a/docs/features/led_matrix.md b/docs/features/led_matrix.md index f6587f7b3e..756cc11e2b 100644 --- a/docs/features/led_matrix.md +++ b/docs/features/led_matrix.md @@ -4,176 +4,32 @@ This feature allows you to use LED matrices driven by external drivers. It hooks If you want to use RGB LED's you should use the [RGB Matrix Subsystem](rgb_matrix) instead. -## Driver configuration {#driver-configuration} ---- -### IS31FL3731 {#is31fl3731} - -There is basic support for addressable LED matrix lighting with the I2C IS31FL3731 LED controller. To enable it, add this to your `rules.mk`: +## Driver Configuration {#driver-configuration} + +LED Matrix is an abstraction layer on top of an underlying LED driver API. The list of supported LED drivers is below; see the respective documentation for information on how to configure the driver. + +|Driver |Max LEDs| +|-------------------------------------|--------| +|[IS31FL3218](../drivers/is31fl3218) |18 | +|[IS31FL3236](../drivers/is31fl3236) |36 | +|[IS31FL3729](../drivers/is31fl3729) |135 | +|[IS31FL3731](../drivers/is31fl3731) |144 | +|[IS31FL3733](../drivers/is31fl3733) |192 | +|[IS31FL3736](../drivers/is31fl3736) |96 | +|[IS31FL3737](../drivers/is31fl3737) |144 | +|[IS31FL3741](../drivers/is31fl3741) |351 | +|[IS31FL3742A](../drivers/is31fl3742a)|180 | +|[IS31FL3743A](../drivers/is31fl3743a)|198 | +|[IS31FL3745](../drivers/is31fl3745) |144 | +|[IS31FL3746A](../drivers/is31fl3746a)|72 | +|[SNLED27351](../drivers/snled27351) |192 | + +To assign the LED Matrix driver, add the following to your `rules.mk`, for example: ```make -LED_MATRIX_ENABLE = yes -LED_MATRIX_DRIVER = is31fl3731 -``` - -You can use between 1 and 4 IS31FL3731 IC's. Do not specify `LED_DRIVER_ADDR_<N>` defines for IC's that are not present on your keyboard. You can define the following items in `config.h`: - -| Variable | Description | Default | -|----------|-------------|---------| -| `IS31FL3731_I2C_TIMEOUT` | (Optional) How long to wait for i2c messages, in milliseconds | 100 | -| `IS31FL3731_I2C_PERSISTENCE` | (Optional) Retry failed messages this many times | 0 | -| `LED_MATRIX_LED_COUNT` | (Required) How many LED lights are present across all drivers | | -| `IS31FL3731_I2C_ADDRESS_1` | (Required) Address for the first LED driver | | -| `IS31FL3731_I2C_ADDRESS_2` | (Optional) Address for the second LED driver | | -| `IS31FL3731_I2C_ADDRESS_3` | (Optional) Address for the third LED driver | | -| `IS31FL3731_I2C_ADDRESS_4` | (Optional) Address for the fourth LED 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) -// The address will vary depending on your wiring: -// 00 AD <-> GND -// 01 AD <-> SCL -// 10 AD <-> SDA -// 11 AD <-> VCC -// ADDR represents A1:A0 of the 7-bit address. -// The result is: 0b11101(ADDR) -#define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND -#define IS31FL3731_I2C_ADDRESS_2 IS31FL3731_I2C_ADDRESS_SDA - -#define LED_DRIVER_1_LED_TOTAL 25 -#define LED_DRIVER_2_LED_TOTAL 24 -#define LED_MATRIX_LED_COUNT (LED_DRIVER_1_LED_TOTAL + LED_DRIVER_2_LED_TOTAL) -``` - -::: warning -Note the parentheses, this is so when `LED_MATRIX_LED_COUNT` is used in code and expanded, the values are added together before any additional math is applied to them. As an example, `rand() % (LED_DRIVER_1_LED_TOTAL + LED_DRIVER_2_LED_TOTAL)` will give very different results than `rand() % LED_DRIVER_1_LED_TOTAL + LED_DRIVER_2_LED_TOTAL`. -::: - -For split keyboards using `LED_MATRIX_SPLIT` with an LED driver, you can either have the same driver address or different driver addresses. If using different addresses, use `IS31FL3731_I2C_ADDRESS_1` for one and `IS31FL3731_I2C_ADDRESS_2` for the other one. Then, in `g_is31fl3731_leds`, fill out the correct driver index (0 or 1). If using one address, use `IS31FL3731_I2C_ADDRESS_1` for both, and use index 0 for `g_is31fl3731_leds`. - -Define these arrays listing all the LEDs in your `<keyboard>.c`: - -```c -const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = { -/* Refer to IS31 manual for these locations - * driver - * | LED address - * | | */ - { 0, C1_1 }, - { 0, C1_15 }, - // ... -} -``` - -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-mono.h`. The `driver` is the index of the driver you defined in your `config.h` (`0`, `1`, `2`, or `3` ). - ---- -### IS31FLCOMMON {#is31flcommon} - -There is basic support for addressable LED matrix lighting with a selection of I2C ISSI Lumissil LED controllers through a shared common driver. To enable it, add this to your `rules.mk`: - -```makefile -LED_MATRIX_ENABLE = yes -LED_MATRIX_DRIVER = <driver name> +LED_MATRIX_DRIVER = is31fl3218 ``` -Where `<driver name>` is the applicable LED driver chip as below - -| Driver Name | Data Sheet | Capability | -|-------------|------------|------------| -| `IS31FL3742A` | [datasheet](https://www.lumissil.com/assets/pdf/core/IS31FL3742A_DS.pdf) | 180 LED, 30x6 Matrix | -| `IS31FL3743A` | [datasheet](https://www.lumissil.com/assets/pdf/core/IS31FL3743A_DS.pdf) | 198 LED, 18x11 Matrix | -| `IS31FL3745` | [datasheet](https://www.lumissil.com/assets/pdf/core/IS31FL3745_DS.pdf) | 144 LED, 18x8 Matrix | -| `IS31FL3746A` | [datasheet](https://www.lumissil.com/assets/pdf/core/IS31FL3746A_DS.pdf) | 72 LED, 18x4 Matrix | - -You can use between 1 and 4 IC's. Do not specify `DRIVER_ADDR_<N>` define for IC's if not present on your keyboard. The `DRIVER_ADDR_1` default assumes that all Address pins on the controller have been connected to GND. Drivers that have SYNC functionality have the default settings to disable if 1 driver. If more than 1 drivers then `DRIVER_ADDR_1` will be set to Master and the remaiing ones set to Slave. - -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 | -| `LED_MATRIX_LED_COUNT` | (Required) How many LED lights are present across all drivers | | -| `DRIVER_ADDR_1` | (Optional) Address for the first LED driver | | -| `DRIVER_ADDR_<N>` | (Required) Address for the additional LED drivers | | -| `ISSI_SSR_<N>` | (Optional) Configuration for the Spread Spectrum Register | | -| `ISSI_CONFIGURATION` | (Optional) Configuration for the Configuration Register | | -| `ISSI_GLOBALCURRENT` | (Optional) Configuration for the Global Current Register | 0xFF | -| `ISSI_PULLDOWNUP` | (Optional) Configuration for the Pull Up & Pull Down Register | | -| `ISSI_TEMP` | (Optional) Configuration for the Tempature Register | | -| `ISSI_PWM_ENABLE` | (Optional) Configuration for the PWM Enable Register | | -| `ISSI_PWM_SET` | (Optional) Configuration for the PWM Setting Register | | -| `ISSI_SCAL_LED ` | (Optional) Configuration for the LEDs Scaling Registers | 0xFF | -| `ISSI_MANUAL_SCALING` | (Optional) If you wish to configure the Scaling Registers manually | | - - -Defaults - -| Variable | IS31FL3742A | IS31FL3743A | IS31FL3745 | IS31FL3746 | -|----------|-------------|-------------|------------|------------| -| `DRIVER_ADDR_1` | 0b0110000 | 0b0100000 | 0b0100000 | 0b1100000 | -| `ISSI_SSR_1` | 0x00 | 0x00 / 0x60 | 0x00 / 0xC0 | 0x00 | -| `ISSI_SSR_<2-4>` | 0x00 | 0x40 | 0x80 | 0x00 | -| `ISSI_CONFIGURATION` | 0x31 | 0x01 | 0x31 | 0x01 | -| `ISSI_PULLDOWNUP` | 0x55 | 0x33 | 0x33 | 0x33 | -| `ISSI_TEMP` | N/A | 0x00 | 0x00 | 0x00 | -| `ISSI_PWM_ENABLE` | N/A | N/A | N/A | 0x00 | -| `ISSI_PWM_SET` | 0x00 | N/A | N/A | 0x00 | - -Here is an example using 2 drivers. - -```c -#define DRIVER_ADDR_2 0b0100001 - -#define DRIVER_1_LED_TOTAL 66 -#define DRIVER_2_LED_TOTAL 42 -#define LED_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) -``` -::: warning -Note the parentheses, this is so when `LED_MATRIX_LED_COUNT` 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 4 drivers are supported, but it would be trivial to support for more. Note that using a combination of different drivers is not supported. All drivers must be of the same model. - -Define these arrays listing all the LEDs in your `<keyboard>.c`: - -```c -const is31_led PROGMEM g_is31_leds[LED_MATRIX_LED_COUNT] = { -/* Refer to IS31 manual for these locations - * driver - * | LED address - * | | */ - { 0, SW1_CS1 }, - { 0, SW1_CS2 }, - // ... -} -``` - -Where `CSx_SWx` is the location of the LED in the matrix defined by the datasheet. The `driver` is the index of the driver you defined in your `config.h` (`0`, `1`, `2`, or `3` for now). - -`ISSI_MANUAL_SCALING` is used to override the Scaling for individual LED's. By default they will be set as per `ISSI_SCAL_LED`. In `config.h` set how many LED's you want to manually set scaling for. -Eg `#define ISSI_MANUAL_SCALING 3` - -Then Define the array listing all the LEDs you want to override in your `<keyboard>.c`: - -```c -const is31_led PROGMEM g_is31_scaling[ISSI_MANUAL_SCALING] = { -/* LED Index - * | Scaling - * | | */ - {5, 120}, - {9, 120}, - .... -} -``` - -Where LED Index is the position of the LED in the `g_is31_leds` array. The `scaling` value between 0 and 255 to be written to the Scaling Register. - ---- - ## Common Configuration {#common-configuration} From this point forward the configuration is the same for all the drivers. The `led_config_t` struct provides a key electrical matrix to led index lookup table, what the physical position of each LED is on the board, and what type of key or usage the LED if the LED represents. Here is a brief example: diff --git a/docs/features/mouse_keys.md b/docs/features/mouse_keys.md index c2b3e98f42..d755084f8e 100644 --- a/docs/features/mouse_keys.md +++ b/docs/features/mouse_keys.md @@ -18,27 +18,27 @@ MOUSEKEY_ENABLE = yes In your keymap you can use the following keycodes to map key presses to mouse actions: -|Key |Aliases |Description | -|----------------|---------|-----------------| -|`KC_MS_UP` |`KC_MS_U`|Move cursor up | -|`KC_MS_DOWN` |`KC_MS_D`|Move cursor down | -|`KC_MS_LEFT` |`KC_MS_L`|Move cursor left | -|`KC_MS_RIGHT` |`KC_MS_R`|Move cursor right| -|`KC_MS_BTN1` |`KC_BTN1`|Press button 1 | -|`KC_MS_BTN2` |`KC_BTN2`|Press button 2 | -|`KC_MS_BTN3` |`KC_BTN3`|Press button 3 | -|`KC_MS_BTN4` |`KC_BTN4`|Press button 4 | -|`KC_MS_BTN5` |`KC_BTN5`|Press button 5 | -|`KC_MS_BTN6` |`KC_BTN6`|Press button 6 | -|`KC_MS_BTN7` |`KC_BTN7`|Press button 7 | -|`KC_MS_BTN8` |`KC_BTN8`|Press button 8 | -|`KC_MS_WH_UP` |`KC_WH_U`|Move wheel up | -|`KC_MS_WH_DOWN` |`KC_WH_D`|Move wheel down | -|`KC_MS_WH_LEFT` |`KC_WH_L`|Move wheel left | -|`KC_MS_WH_RIGHT`|`KC_WH_R`|Move wheel right | -|`KC_MS_ACCEL0` |`KC_ACL0`|Set speed to 0 | -|`KC_MS_ACCEL1` |`KC_ACL1`|Set speed to 1 | -|`KC_MS_ACCEL2` |`KC_ACL2`|Set speed to 2 | +|Key |Aliases |Description | +|-------------------------|---------|---------------------------| +|`QK_MOUSE_CURSOR_UP` |`MS_UP` |Mouse cursor up | +|`QK_MOUSE_CURSOR_DOWN` |`MS_DOWN`|Mouse cursor down | +|`QK_MOUSE_CURSOR_LEFT` |`MS_LEFT`|Mouse cursor left | +|`QK_MOUSE_CURSOR_RIGHT` |`MS_RGHT`|Mouse cursor right | +|`QK_MOUSE_BUTTON_1` |`MS_BTN1`|Mouse button 1 | +|`QK_MOUSE_BUTTON_2` |`MS_BTN2`|Mouse button 2 | +|`QK_MOUSE_BUTTON_3` |`MS_BTN3`|Mouse button 3 | +|`QK_MOUSE_BUTTON_4` |`MS_BTN4`|Mouse button 4 | +|`QK_MOUSE_BUTTON_5` |`MS_BTN5`|Mouse button 5 | +|`QK_MOUSE_BUTTON_6` |`MS_BTN6`|Mouse button 6 | +|`QK_MOUSE_BUTTON_7` |`MS_BTN7`|Mouse button 7 | +|`QK_MOUSE_BUTTON_8` |`MS_BTN8`|Mouse button 8 | +|`QK_MOUSE_WHEEL_UP` |`MS_WHLU`|Mouse wheel up | +|`QK_MOUSE_WHEEL_DOWN` |`MS_WHLD`|Mouse wheel down | +|`QK_MOUSE_WHEEL_LEFT` |`MS_WHLL`|Mouse wheel left | +|`QK_MOUSE_WHEEL_RIGHT` |`MS_WHLR`|Mouse wheel right | +|`QK_MOUSE_ACCELERATION_0`|`MS_ACL0`|Set mouse acceleration to 0| +|`QK_MOUSE_ACCELERATION_1`|`MS_ACL1`|Set mouse acceleration to 1| +|`QK_MOUSE_ACCELERATION_2`|`MS_ACL2`|Set mouse acceleration to 2| ## Configuring mouse keys @@ -106,17 +106,17 @@ Tips: ### Constant mode -In this mode you can define multiple different speeds for both the cursor and the mouse wheel. There is no acceleration. `KC_ACL0`, `KC_ACL1` and `KC_ACL2` change the cursor and scroll speed to their respective setting. +In this mode you can define multiple different speeds for both the cursor and the mouse wheel. There is no acceleration. `MS_ACL0`, `MS_ACL1` and `MS_ACL2` change the cursor and scroll speed to their respective setting. You can choose whether speed selection is momentary or tap-to-select: * **Momentary:** The chosen speed is only active while you hold the respective key. When the key is raised, mouse keys returns to the unmodified speed. -* **Tap-to-select:** The chosen speed is activated when you press the respective key and remains active even after the key has been raised. The default speed is that of `KC_ACL1`. There is no unmodified speed. +* **Tap-to-select:** The chosen speed is activated when you press the respective key and remains active even after the key has been raised. The default speed is that of `MS_ACL1`. There is no unmodified speed. The default speeds from slowest to fastest are as follows: -* **Momentary:** `KC_ACL0` < `KC_ACL1` < *unmodified* < `KC_ACL2` -* **Tap-to-select:** `KC_ACL0` < `KC_ACL1` < `KC_ACL2` +* **Momentary:** `MS_ACL0` < `MS_ACL1` < *unmodified* < `MS_ACL2` +* **Tap-to-select:** `MS_ACL0` < `MS_ACL1` < `MS_ACL2` To use constant speed mode, you must at least define `MK_3_SPEED` in your keymap’s `config.h` file: @@ -138,32 +138,32 @@ Use the following settings if you want to adjust cursor movement or scrolling: |`MK_MOMENTARY_ACCEL` |*Not defined*|Enable momentary speed selection | |`MK_C_OFFSET_UNMOD` |16 |Cursor offset per movement (unmodified) | |`MK_C_INTERVAL_UNMOD`|16 |Time between cursor movements (unmodified) | -|`MK_C_OFFSET_0` |1 |Cursor offset per movement (`KC_ACL0`) | -|`MK_C_INTERVAL_0` |32 |Time between cursor movements (`KC_ACL0`) | -|`MK_C_OFFSET_1` |4 |Cursor offset per movement (`KC_ACL1`) | -|`MK_C_INTERVAL_1` |16 |Time between cursor movements (`KC_ACL1`) | -|`MK_C_OFFSET_2` |32 |Cursor offset per movement (`KC_ACL2`) | -|`MK_C_INTERVAL_2` |16 |Time between cursor movements (`KC_ACL2`) | +|`MK_C_OFFSET_0` |1 |Cursor offset per movement (`MS_ACL0`) | +|`MK_C_INTERVAL_0` |32 |Time between cursor movements (`MS_ACL0`) | +|`MK_C_OFFSET_1` |4 |Cursor offset per movement (`MS_ACL1`) | +|`MK_C_INTERVAL_1` |16 |Time between cursor movements (`MS_ACL1`) | +|`MK_C_OFFSET_2` |32 |Cursor offset per movement (`MS_ACL2`) | +|`MK_C_INTERVAL_2` |16 |Time between cursor movements (`MS_ACL2`) | |`MK_W_OFFSET_UNMOD` |1 |Scroll steps per scroll action (unmodified)| |`MK_W_INTERVAL_UNMOD`|40 |Time between scroll steps (unmodified) | -|`MK_W_OFFSET_0` |1 |Scroll steps per scroll action (`KC_ACL0`) | -|`MK_W_INTERVAL_0` |360 |Time between scroll steps (`KC_ACL0`) | -|`MK_W_OFFSET_1` |1 |Scroll steps per scroll action (`KC_ACL1`) | -|`MK_W_INTERVAL_1` |120 |Time between scroll steps (`KC_ACL1`) | -|`MK_W_OFFSET_2` |1 |Scroll steps per scroll action (`KC_ACL2`) | -|`MK_W_INTERVAL_2` |20 |Time between scroll steps (`KC_ACL2`) | +|`MK_W_OFFSET_0` |1 |Scroll steps per scroll action (`MS_ACL0`) | +|`MK_W_INTERVAL_0` |360 |Time between scroll steps (`MS_ACL0`) | +|`MK_W_OFFSET_1` |1 |Scroll steps per scroll action (`MS_ACL1`) | +|`MK_W_INTERVAL_1` |120 |Time between scroll steps (`MS_ACL1`) | +|`MK_W_OFFSET_2` |1 |Scroll steps per scroll action (`MS_ACL2`) | +|`MK_W_INTERVAL_2` |20 |Time between scroll steps (`MS_ACL2`) | ### Combined mode -This mode functions like **Accelerated** mode, however, you can hold `KC_ACL0`, `KC_ACL1` and `KC_ACL2` +This mode functions like **Accelerated** mode, however, you can hold `MS_ACL0`, `MS_ACL1` and `MS_ACL2` to momentarily (while held) set the cursor and scroll speeds to constant speeds. When no acceleration keys are held, this mode is identical to **Accelerated** mode, and can be modified using all of the relevant settings. -* **KC_ACL0:** This acceleration sets your cursor to the slowest possible speed. This is useful for very +* **MS_ACL0:** This acceleration sets your cursor to the slowest possible speed. This is useful for very small and detailed movements of the cursor. -* **KC_ACL1:** This acceleration sets your cursor to half the maximum (user defined) speed. -* **KC_ACL2:** This acceleration sets your cursor to the maximum (computer defined) speed. This is +* **MS_ACL1:** This acceleration sets your cursor to half the maximum (user defined) speed. +* **MS_ACL2:** This acceleration sets your cursor to the maximum (computer defined) speed. This is useful for moving the cursor large distances without much accuracy. To use combined speed mode, you must at least define `MK_COMBINED` in your keymap’s `config.h` file: @@ -203,6 +203,19 @@ Tips: * Keep `MOUSEKEY_MOVE_DELTA` at 1. This allows precise movements before the gliding effect starts. * Mouse wheel options are the same as the default accelerated mode, and do not use inertia. +### Overlapping mouse key control + +When additional overlapping mouse key is pressed, the mouse cursor will continue in a new direction with the same acceleration. The following settings can be used to reset the acceleration with new overlapping keys for more precise control if desired: + +|Define |Default |Description | +|------------------------------|----------------------|-----------------------------------------------------------------------| +|`MOUSEKEY_OVERLAP_RESET` |undefined |Enables overlapping mouse key control | +|`MOUSEKEY_OVERLAP_MOVE_DELTA` |`MOUSEKEY_MOVE_DELTA` |Step size of reset movement acceleration | +|`MOUSEKEY_OVERLAP_WHEEL_DELTA`|`MOUSEKEY_WHEEL_DELTA`|Step size of reset mouse wheel acceleration | +|`MOUSEKEY_OVERLAP_INTERVAL` |`MOUSEKEY_INTERVAL` |Reset time between cursor movements in milliseconds (Kinetic mode only)| + +?> This feature will not be applied on Inertial mode + ## Use with PS/2 Mouse and Pointing Device Mouse keys button state is shared with [PS/2 mouse](ps2_mouse) and [pointing device](pointing_device) so mouse keys button presses can be used for clicks and drags. diff --git a/docs/features/repeat_key.md b/docs/features/repeat_key.md index 53495e0f4d..7f2bdc44e6 100644 --- a/docs/features/repeat_key.md +++ b/docs/features/repeat_key.md @@ -60,10 +60,10 @@ with mods, like Ctrl + Left ↔ Ctrl + Right Arrow. |`KC_UP` ↔ `KC_DOWN` | Up ↔ Down Arrow | |`KC_HOME` ↔ `KC_END` | Home ↔ End | |`KC_PGUP` ↔ `KC_PGDN` | Page Up ↔ Page Down | -|`KC_MS_L` ↔ `KC_MS_R` | Mouse Cursor Left ↔ Right | -|`KC_MS_U` ↔ `KC_MS_D` | Mouse Cursor Up ↔ Down | -|`KC_WH_L` ↔ `KC_WH_R` | Mouse Wheel Left ↔ Right | -|`KC_WH_U` ↔ `KC_WH_D` | Mouse Wheel Up ↔ Down | +|`MS_LEFT` ↔ `MS_RGHT` | Mouse Cursor Left ↔ Right | +|`MS_UP` ↔ `MS_DOWN` | Mouse Cursor Up ↔ Down | +|`MS_WHLL` ↔ `MS_WHLR` | Mouse Wheel Left ↔ Right | +|`MS_WHLU` ↔ `MS_WHLD` | Mouse Wheel Up ↔ Down | **Misc** diff --git a/docs/features/rgb_matrix.md b/docs/features/rgb_matrix.md index aef766ebd2..bc14bb6277 100644 --- a/docs/features/rgb_matrix.md +++ b/docs/features/rgb_matrix.md @@ -4,543 +4,35 @@ This feature allows you to use RGB LED matrices driven by external drivers. It h If you want to use single color LED's you should use the [LED Matrix Subsystem](led_matrix) instead. -## Driver configuration {#driver-configuration} ---- -### IS31FL3731 {#is31fl3731} - -There is basic support for addressable RGB matrix lighting with the I2C IS31FL3731 RGB controller. To enable it, add this to your `rules.mk`: - -```make -RGB_MATRIX_ENABLE = yes -RGB_MATRIX_DRIVER = is31fl3731 -``` - -You can use between 1 and 4 IS31FL3731 IC's. Do not specify `DRIVER_ADDR_<N>` defines for IC's that are not present on your keyboard. You can define the following items in `config.h`: - -| Variable | Description | Default | -|----------|-------------|---------| -| `IS31FL3731_I2C_TIMEOUT` | (Optional) How long to wait for i2c messages, in milliseconds | 100 | -| `IS31FL3731_I2C_PERSISTENCE` | (Optional) Retry failed messages this many times | 0 | -| `IS31FL3731_DEGHOST` | (Optional) Set this define to enable de-ghosting by halving Vcc during blanking time | | -| `RGB_MATRIX_LED_COUNT` | (Required) How many RGB lights are present across all drivers | | -| `IS31FL3731_I2C_ADDRESS_1` | (Required) Address for the first RGB driver | | -| `IS31FL3731_I2C_ADDRESS_2` | (Optional) Address for the second RGB driver | | -| `IS31FL3731_I2C_ADDRESS_3` | (Optional) Address for the third RGB driver | | -| `IS31FL3731_I2C_ADDRESS_4` | (Optional) Address for the fourth 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) -// The address will vary depending on your wiring: -// 00 AD <-> GND -// 01 AD <-> SCL -// 10 AD <-> SDA -// 11 AD <-> VCC -// ADDR represents A1:A0 of the 7-bit address. -// The result is: 0b11101(ADDR) -#define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND -#define IS31FL3731_I2C_ADDRESS_2 IS31FL3731_I2C_ADDRESS_SDA - -#define DRIVER_1_LED_TOTAL 25 -#define DRIVER_2_LED_TOTAL 24 -#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) -``` - -::: warning -Note the parentheses, this is so when `RGB_MATRIX_LED_COUNT` 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`. -::: - -For split keyboards using `RGB_MATRIX_SPLIT` with an LED driver, you can either have the same driver address or different driver addresses. If using different addresses, use `IS31FL3731_I2C_ADDRESS_1` for one and `IS31FL3731_I2C_ADDRESS_2` for the other one. Then, in `g_is31fl3731_leds`, fill out the correct driver index (0 or 1). If using one address, use `IS31FL3731_I2C_ADDRESS_1` for both, and use index 0 for `g_is31fl3731_leds`. - -Define these arrays listing all the LEDs in your `<keyboard>.c`: - -```c -const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = { -/* Refer to IS31 manual for these locations - * driver - * | R location - * | | G location - * | | | B location - * | | | | */ - {0, C1_3, C2_3, C3_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 {#is31fl3733} - -There is basic support for addressable RGB matrix lighting with the I2C IS31FL3733 RGB controller. To enable it, add this to your `rules.mk`: - -```make -RGB_MATRIX_ENABLE = yes -RGB_MATRIX_DRIVER = is31fl3733 -``` - -You can use between 1 and 4 IS31FL3733 IC's. Do not specify `DRIVER_ADDR_<N>` defines for IC's that are not present on your keyboard. You can define the following items in `config.h`: - -| Variable | Description | Default | -|----------|-------------|---------| -| `IS31FL3733_I2C_TIMEOUT` | (Optional) How long to wait for i2c messages, in milliseconds | 100 | -| `IS31FL3733_I2C_PERSISTENCE` | (Optional) Retry failed messages this many times | 0 | -| `IS31FL3733_PWM_FREQUENCY` | (Optional) PWM Frequency Setting - IS31FL3733B only | 0 | -| `IS31FL3733_GLOBALCURRENT` | (Optional) Configuration for the Global Current Register | 0xFF | -| `IS31FL3733_SWPULLUP` | (Optional) Set the value of the SWx lines on-chip de-ghosting resistors | PUR_0R (Disabled) | -| `IS31FL3733_CSPULLUP` | (Optional) Set the value of the CSx lines on-chip de-ghosting resistors | PUR_0R (Disabled) | -| `RGB_MATRIX_LED_COUNT` | (Required) How many RGB lights are present across all drivers | | -| `IS31FL3733_I2C_ADDRESS_1` | (Required) Address for the first RGB driver | | -| `IS31FL3733_I2C_ADDRESS_2` | (Optional) Address for the second RGB driver | | -| `IS31FL3733_I2C_ADDRESS_3` | (Optional) Address for the third RGB driver | | -| `IS31FL3733_I2C_ADDRESS_4` | (Optional) Address for the fourth RGB driver | | -| `IS31FL3733_SYNC_1` | (Optional) Sync configuration for the first RGB driver | 0 | -| `IS31FL3733_SYNC_2` | (Optional) Sync configuration for the second RGB driver | 0 | -| `IS31FL3733_SYNC_3` | (Optional) Sync configuration for the third RGB driver | 0 | -| `IS31FL3733_SYNC_4` | (Optional) Sync configuration for the fourth RGB driver | 0 | - -The IS31FL3733 IC's have on-chip resistors that can be enabled to allow for de-ghosting of the RGB matrix. By default these resistors are not enabled (`IS31FL3733_SWPULLUP`/`IS31FL3733_CSPULLUP` are given the value of `IS31FL3733_PUR_0R`), the values that can be set to enable de-ghosting are as follows: - -| `IS31FL3733_SWPULLUP/IS31FL3733_CSPULLUP` | Description | -|----------------------|-------------| -| `IS31FL3733_PUR_0R` | (default) Do not use the on-chip resistors/enable de-ghosting | -| `IS31FL3733_PUR_05KR` | The 0.5k Ohm resistor used during blanking period (t_NOL) | -| `IS31FL3733_PUR_3KR` | The 3k Ohm resistor used at all times | -| `IS31FL3733_PUR_4KR` | The 4k Ohm resistor used at all times | -| `IS31FL3733_PUR_8KR` | The 8k Ohm resistor used at all times | -| `IS31FL3733_PUR_16KR` | The 16k Ohm resistor used at all times | -| `IS31FL3733_PUR_32KR` | The 32k Ohm resistor used during blanking period (t_NOL) | - -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) -// The address will vary depending on your wiring: -// 00 ADDRn <-> GND -// 01 ADDRn <-> SCL -// 10 ADDRn <-> SDA -// 11 ADDRn <-> 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 IS31FL3733_I2C_ADDRESS_1 IS31FL3733_I2C_ADDRESS_GND_GND -#define IS31FL3733_I2C_ADDRESS_2 IS31FL3733_I2C_ADDRESS_GND_VCC - -#define DRIVER_1_LED_TOTAL 58 -#define DRIVER_2_LED_TOTAL 10 -#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) -``` - -::: warning -Note the parentheses, this is so when `RGB_MATRIX_LED_COUNT` 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 4 drivers are supported, but it would be trivial to support all 8 combinations. - -Define these arrays listing all the LEDs in your `<keyboard>.c`: - -```c -const is31fl3733_led_t PROGMEM g_is31fl3733_leds[IS31FL3733_LED_COUNT] = { -/* Refer to IS31 manual for these locations - * driver - * | R location - * | | G location - * | | | B location - * | | | | */ - {0, SW1_CS1, SW1_CS2, SW1_CS3}, - .... -} -``` - -Where `SWx_CSy` 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). - ---- -### IS31FL3736 {#is31fl3736} - -There is basic support for addressable RGB matrix lighting with the I2C IS31FL3736 RGB controller. To enable it, add this to your `rules.mk`: - -```make -RGB_MATRIX_ENABLE = yes -RGB_MATRIX_DRIVER = is31fl3736 -``` -You can use between 1 and 4 IS31FL3736 IC's. Do not specify `DRIVER_ADDR_<N>` defines for IC's that are not present on your keyboard. - -Configure the hardware via your `config.h`: - -| Variable | Description | Default | -|----------|-------------|---------| -| `IS31FL3736_I2C_TIMEOUT` | (Optional) How long to wait for i2c messages, in milliseconds | 100 | -| `IS31FL3736_PERSISTENCE` | (Optional) Retry failed messages this many times | 0 | -| `IS31FL3736_PWM_FREQUENCY` | (Optional) PWM Frequency Setting - IS31FL3736B only | 0 | -| `IS31FL3736_GLOBALCURRENT` | (Optional) Configuration for the Global Current Register | 0xFF | -| `IS31FL3736_SWPULLUP` | (Optional) Set the value of the SWx lines on-chip de-ghosting resistors | PUR_0R (Disabled) | -| `IS31FL3736_CSPULLUP` | (Optional) Set the value of the CSx lines on-chip de-ghosting resistors | PUR_0R (Disabled) | -| `RGB_MATRIX_LED_COUNT` | (Required) How many RGB lights are present across all drivers | | -| `IS31FL3736_I2C_ADDRESS_1` | (Required) Address for the first RGB driver | | -| `IS31FL3736_I2C_ADDRESS_2` | (Optional) Address for the second RGB driver | | -| `IS31FL3736_I2C_ADDRESS_3` | (Optional) Address for the third RGB driver | | -| `IS31FL3736_I2C_ADDRESS_4` | (Optional) Address for the fourth RGB driver | | - -The IS31FL3736 IC's have on-chip resistors that can be enabled to allow for de-ghosting of the RGB matrix. By default these resistors are not enabled (`IS31FL3736_SWPULLUP`/`IS31FL3736_CSPULLUP` are given the value of `IS31FL3736_PUR_0R`), the values that can be set to enable de-ghosting are as follows: - -| `IS31FL3736_SWPULLUP/IS31FL3736_CSPULLUP` | Description | -|----------------------|-------------| -| `IS31FL3736_PUR_0R` | (default) Do not use the on-chip resistors/enable de-ghosting | -| `IS31FL3736_PUR_05KR` | The 0.5k Ohm resistor used during blanking period (t_NOL) | -| `IS31FL3736_PUR_1KR` | The 1k Ohm resistor used during blanking period (t_NOL) | -| `IS31FL3736_PUR_2KR` | The 2k Ohm resistor used during blanking period (t_NOL) | -| `IS31FL3736_PUR_4KR` | The 4k Ohm resistor used during blanking period (t_NOL) | -| `IS31FL3736_PUR_8KR` | The 8k Ohm resistor during blanking period (t_NOL) | -| `IS31FL3736_PUR_16KR` | The 16k Ohm resistor during blanking period (t_NOL) | -| `IS31FL3736_PUR_32KR` | The 32k Ohm resistor used during blanking period (t_NOL) | - -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) -// The address will vary depending on your wiring: -// 00 ADDRn <-> GND -// 01 ADDRn <-> SCL -// 10 ADDRn <-> SDA -// 11 ADDRn <-> 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 IS31FL3736_I2C_ADDRESS_1 IS31FL3736_I2C_ADDRESS_GND_GND -#define IS31FL3736_I2C_ADDRESS_2 IS31FL3736_I2C_ADDRESS_GND_SCL - -#define DRIVER_1_LED_TOTAL 30 -#define DRIVER_2_LED_TOTAL 32 -#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) -``` -::: warning -Note the parentheses, this is so when `RGB_MATRIX_LED_COUNT` 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 `<keyboard>.c`: - -```c -const is31fl3736_led_t PROGMEM g_is31fl3736_leds[IS31FL3736_LED_COUNT] = { -/* Refer to IS31 manual for these locations - * driver - * | R location - * | | G location - * | | | B location - * | | | | */ - {0, SW1_CS1, SW1_CS2, SW1_CS3}, - .... -} -``` -### IS31FL3737 {#is31fl3737} - -There is basic support for addressable RGB matrix lighting with the I2C IS31FL3737 RGB controller. To enable it, add this to your `rules.mk`: - -```make -RGB_MATRIX_ENABLE = yes -RGB_MATRIX_DRIVER = is31fl3737 -``` -You can use between 1 and 4 IS31FL3737 IC's. Do not specify `DRIVER_ADDR_<N>` defines for IC's that are not present on your keyboard. - -Configure the hardware via your `config.h`: - -| Variable | Description | Default | -|----------|-------------|---------| -| `IS31FL3737_I2C_TIMEOUT` | (Optional) How long to wait for i2c messages, in milliseconds | 100 | -| `IS31FL3737_I2C_PERSISTENCE` | (Optional) Retry failed messages this many times | 0 | -| `IS31FL3737_PWM_FREQUENCY` | (Optional) PWM Frequency Setting - IS31FL3737B only | 0 | -| `IS31FL3737_GLOBALCURRENT` | (Optional) Configuration for the Global Current Register | 0xFF | -| `IS31FL3737_SWPULLUP` | (Optional) Set the value of the SWx lines on-chip de-ghosting resistors | PUR_0R (Disabled) | -| `IS31FL3737_CSPULLUP` | (Optional) Set the value of the CSx lines on-chip de-ghosting resistors | PUR_0R (Disabled) | -| `RGB_MATRIX_LED_COUNT` | (Required) How many RGB lights are present across all drivers | | -| `IS31FL3737_I2C_ADDRESS_1` | (Required) Address for the first RGB driver | | -| `IS31FL3737_I2C_ADDRESS_2` | (Optional) Address for the second RGB driver | | -| `IS31FL3737_I2C_ADDRESS_3` | (Optional) Address for the third RGB driver | | -| `IS31FL3737_I2C_ADDRESS_4` | (Optional) Address for the fourth RGB driver | | - -The IS31FL3737 IC's have on-chip resistors that can be enabled to allow for de-ghosting of the RGB matrix. By default these resistors are not enabled (`IS31FL3737_SWPULLUP`/`IS31FL3737_CSPULLUP` are given the value of `IS31FL3737_PUR_0R`), the values that can be set to enable de-ghosting are as follows: - -| `IS31FL3737_SWPULLUP/IS31FL3737_CSPULLUP` | Description | -|----------------------|-------------| -| `IS31FL3737_PUR_0R` | (default) Do not use the on-chip resistors/enable de-ghosting | -| `IS31FL3737_PUR_05KR` | The 0.5k Ohm resistor used during blanking period (t_NOL) | -| `IS31FL3737_PUR_1KR` | The 1k Ohm resistor used during blanking period (t_NOL) | -| `IS31FL3737_PUR_2KR` | The 2k Ohm resistor used during blanking period (t_NOL) | -| `IS31FL3737_PUR_4KR` | The 4k Ohm resistor used during blanking period (t_NOL) | -| `IS31FL3737_PUR_8KR` | The 8k Ohm resistor during blanking period (t_NOL) | -| `IS31FL3737_PUR_16KR` | The 16k Ohm resistor during blanking period (t_NOL) | -| `IS31FL3737_PUR_32KR` | The 32k Ohm resistor used during blanking period (t_NOL) | - -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) -// The address will vary depending on your wiring: -// 0000 ADDR <-> GND -// 0101 ADDR <-> SCL -// 1010 ADDR <-> SDA -// 1111 ADDR <-> VCC -// ADDR represents A3:A0 of the 7-bit address. -// The result is: 0b101(ADDR) -#define IS31FL3737_I2C_ADDRESS_1 IS31FL3737_I2C_ADDRESS_GND -#define IS31FL3737_I2C_ADDRESS_2 IS31FL3737_I2C_ADDRESS_SCL - -#define DRIVER_1_LED_TOTAL 30 -#define DRIVER_2_LED_TOTAL 36 -#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) -``` -::: warning -Note the parentheses, this is so when `RGB_MATRIX_LED_COUNT` 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 `<keyboard>.c`: - -```c -const is31fl3737_led_t PROGMEM g_is31fl3737_leds[IS31FL3737_LED_COUNT] = { -/* Refer to IS31 manual for these locations - * driver - * | R location - * | | G location - * | | | B location - * | | | | */ - {0, SW1_CS1, SW1_CS2, SW1_CS3}, - .... -} -``` - -Where `SWx_CSy` 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`, `2`, or `3` for now). - ---- -### IS31FLCOMMON {#is31flcommon} - -There is basic support for addressable RGB matrix lighting with a selection of I2C ISSI Lumissil RGB controllers through a shared common driver. To enable it, add this to your `rules.mk`: - -```makefile -RGB_MATRIX_ENABLE = yes -RGB_MATRIX_DRIVER = <driver name> -``` - -Where `<driver name>` is the applicable LED driver chip as below - -| Driver Name | Data Sheet | Capability | -|-------------|------------|------------| -| `IS31FL3742A` | [datasheet](https://www.lumissil.com/assets/pdf/core/IS31FL3742A_DS.pdf) | 60 RGB, 30x6 Matrix | -| `IS31FL3743A` | [datasheet](https://www.lumissil.com/assets/pdf/core/IS31FL3743A_DS.pdf) | 66 RGB, 18x11 Matrix | -| `IS31FL3745` | [datasheet](https://www.lumissil.com/assets/pdf/core/IS31FL3745_DS.pdf) | 48 RGB, 18x8 Matrix | -| `IS31FL3746A` | [datasheet](https://www.lumissil.com/assets/pdf/core/IS31FL3746A_DS.pdf) | 24 RGB, 18x4 Matrix | - -You can use between 1 and 4 IC's. Do not specify `DRIVER_ADDR_<N>` define for IC's if not present on your keyboard. The `DRIVER_ADDR_1` default assumes that all Address pins on the controller have been connected to GND. Drivers that have SYNC functionality have the default settings to disable if 1 driver. If more than 1 drivers then `DRIVER_ADDR_1` will be set to Master and the remaining ones set to Slave. - -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 | -| `RGB_MATRIX_LED_COUNT` | (Required) How many RGB lights are present across all drivers | | -| `DRIVER_ADDR_1` | (Optional) Address for the first RGB driver | | -| `DRIVER_ADDR_<N>` | (Required) Address for the additional RGB drivers | | -| `ISSI_SSR_<N>` | (Optional) Configuration for the Spread Spectrum Register | | -| `ISSI_CONFIGURATION` | (Optional) Configuration for the Configuration Register | | -| `ISSI_GLOBALCURRENT` | (Optional) Configuration for the Global Current Register | 0xFF | -| `ISSI_PULLDOWNUP` | (Optional) Configuration for the Pull Up & Pull Down Register | | -| `ISSI_TEMP` | (Optional) Configuration for the Temperature Register | | -| `ISSI_PWM_ENABLE` | (Optional) Configuration for the PWM Enable Register | | -| `ISSI_PWM_SET` | (Optional) Configuration for the PWM Setting Register | | -| `ISSI_SCAL_RED` | (Optional) Configuration for the RED LEDs in Scaling Registers | 0xFF | -| `ISSI_SCAL_BLUE` | (Optional) Configuration for the BLUE LEDs in Scaling Registers | 0xFF | -| `ISSI_SCAL_GREEN` | (Optional) Configuration for the GREEN LEDs in Scaling Registers | 0xFF | -| `ISSI_MANUAL_SCALING` | (Optional) If you wish to configure the Scaling Registers manually | | - - -Defaults - -| Variable | IS31FL3742A | IS31FL3743A | IS31FL3745 | IS31FL3746 | -|----------|-------------|-------------|------------|------------| -| `DRIVER_ADDR_1` | 0b0110000 | 0b0100000 | 0b0100000 | 0b1100000 | -| `ISSI_SSR_1` | 0x00 | 0x00 / 0x60 | 0x00 / 0xC0 | 0x00 | -| `ISSI_SSR_<2-4>` | 0x00 | 0x40 | 0x80 | 0x00 | -| `ISSI_CONFIGURATION` | 0x31 | 0x01 | 0x31 | 0x01 | -| `ISSI_PULLDOWNUP` | 0x55 | 0x33 | 0x33 | 0x33 | -| `ISSI_TEMP` | N/A | 0x00 | 0x00 | 0x00 | -| `ISSI_PWM_ENABLE` | N/A | N/A | N/A | 0x00 | -| `ISSI_PWM_SET` | 0x00 | N/A | N/A | 0x00 | - -Here is an example using 2 drivers. - -```c -#define DRIVER_ADDR_2 0b0100001 - -#define DRIVER_1_LED_TOTAL 66 -#define DRIVER_2_LED_TOTAL 42 -#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) -``` - -::: warning -Note the parentheses, this is so when `RGB_MATRIX_LED_COUNT` 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 4 drivers are supported, but it would be trivial to support for more. Note that using a combination of different drivers is not supported. All drivers must be of the same model. - -Define these arrays listing all the LEDs in your `<keyboard>.c`: - -```c -const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = { -/* Refer to IS31 manual for these locations - * driver - * | R location - * | | G location - * | | | B location - * | | | | */ - {0, SW1_CS1, SW1_CS2, SW1_CS3}, - .... -} -``` - -Where `CSx_SWx` is the location of the LED in the matrix defined by the datasheet. The `driver` is the index of the driver you defined in your `config.h` (`0`, `1`, `2`, or `3` for now). - -`ISSI_MANUAL_SCALING` is used to override the Scaling for individual LED's. By default they will be set as per `ISSI_SCAL_<colour>`. In `config.h` set how many LED's you want to manually set scaling for. -Eg `#define ISSI_MANUAL_SCALING 3` - -Then Define the array listing all the LEDs you want to override in your `<keyboard>.c`: - -```c -const is31_led PROGMEM g_is31_scaling[ISSI_MANUAL_SCALING] = { -/* LED Index - * | R scaling - * | | G scaling - * | | | B scaling - * | | | | */ - {5, 120, 155, 167}, - {9, 120, 155, 167}, - .... -} -``` - -Where LED Index is the position of the LED in the `g_is31_leds` array. The `scaling` value between 0 and 255 to be written to the Scaling Register. - ---- - -### WS2812 {#ws2812} - -There is basic support for addressable RGB matrix lighting with a WS2811/WS2812{a,b,c} addressable LED strand. To enable it, add this to your `rules.mk`: +## Driver Configuration {#driver-configuration} + +RGB Matrix is an abstraction layer on top of an underlying LED driver API. The list of supported LED drivers is below; see the respective documentation for information on how to configure the driver. + +|Driver |Max LEDs| +|-------------------------------------|--------| +|[APA102](../drivers/apa102) |? | +|[AW20216S](../drivers/aw20216s) |72 | +|[IS31FL3218](../drivers/is31fl3218) |6 | +|[IS31FL3236](../drivers/is31fl3236) |12 | +|[IS31FL3729](../drivers/is31fl3729) |45 | +|[IS31FL3731](../drivers/is31fl3731) |48 | +|[IS31FL3733](../drivers/is31fl3733) |64 | +|[IS31FL3736](../drivers/is31fl3736) |32 | +|[IS31FL3737](../drivers/is31fl3737) |48 | +|[IS31FL3741](../drivers/is31fl3741) |117 | +|[IS31FL3742A](../drivers/is31fl3742a)|60 | +|[IS31FL3743A](../drivers/is31fl3743a)|66 | +|[IS31FL3745](../drivers/is31fl3745) |48 | +|[IS31FL3746A](../drivers/is31fl3746a)|24 | +|[SNLED27351](../drivers/snled27351) |64 | +|[WS2812](../drivers/ws2812) |? | + +To assign the RGB Matrix driver, add the following to your `rules.mk`, for example: ```make -RGB_MATRIX_ENABLE = yes -RGB_MATRIX_DRIVER = ws2812 -``` - -Configure the hardware via your `config.h`: - -```c -// The pin connected to the data pin of the LEDs -#define WS2812_DI_PIN D7 -// The number of LEDs connected -#define RGB_MATRIX_LED_COUNT 70 +RGB_MATRIX_DRIVER = is31fl3218 ``` -::: tip -There are additional configuration options for ARM controllers that offer increased performance over the default bitbang driver. Please see [WS2812 Driver](../drivers/ws2812) for more information. -::: - ---- - -### APA102 {#apa102} - -There is basic support for APA102 based addressable LED strands. To enable it, add this to your `rules.mk`: - -```make -RGB_MATRIX_ENABLE = yes -RGB_MATRIX_DRIVER = apa102 -``` - -Configure the hardware via your `config.h`: - -```c -// The pin connected to the data pin of the LEDs -#define APA102_DI_PIN D7 -// The pin connected to the clock pin of the LEDs -#define APA102_CI_PIN D6 -// The number of LEDs connected -#define RGB_MATRIX_LED_COUNT 70 -``` - ---- -### AW20216S {#aw20216s} -There is basic support for addressable RGB matrix lighting with the SPI AW20216S RGB controller. To enable it, add this to your `rules.mk`: - -```make -RGB_MATRIX_ENABLE = yes -RGB_MATRIX_DRIVER = aw20216s -``` - -You can use up to 2 AW20216S IC's. Do not specify `DRIVER_<N>_xxx` defines for IC's that are not present on your keyboard. You can define the following items in `config.h`: - -| Variable | Description | Default | -|----------|-------------|---------| -| `AW20216S_CS_PIN_1` | (Required) MCU pin connected to first RGB driver chip select line | B13 | -| `AW20216S_CS_PIN_2` | (Optional) MCU pin connected to second RGB driver chip select line | | -| `AW20216S_EN_PIN_1` | (Required) MCU pin connected to first RGB driver hardware enable line | C13 | -| `AW20216S_EN_PIN_2` | (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 | | -| `RGB_MATRIX_LED_COUNT` | (Required) How many RGB lights are present across all drivers | | -| `AW20216S_SCALING_MAX` | (Optional) LED current scaling value (0-255, higher values mean LED is brighter at full PWM) | 150 | -| `AW20216S_GLOBAL_CURRENT_MAX` | (Optional) Driver global current limit (0-255, higher values means the driver may consume more power) | 150 | -| `AW20216S_SPI_MODE` | (Optional) Mode for SPI communication (0-3, defines polarity and phase of the clock) | 3 | -| `AW20216S_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 AW20216S_CS_PIN_1 B13 -#define AW20216S_CS_PIN_2 B14 -// Hardware enable lines may be connected to the same pin -#define AW20216S_EN_PIN_1 C13 -#define AW20216S_EN_PIN_2 C13 - -#define DRIVER_1_LED_TOTAL 66 -#define DRIVER_2_LED_TOTAL 32 -#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) -``` - -::: warning -Note the parentheses, this is so when `RGB_MATRIX_LED_COUNT` 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 `<keyboard>.c`: - -```c -const aw20216s_led_t PROGMEM g_aw20216s_leds[AW20216S_LED_COUNT] = { -/* Each AW20216S channel is controlled by a register at some offset between 0x00 - * and 0xD7 inclusive. - * See drivers/led/aw20216s.h for the mapping between register offsets and - * driver pin locations. - * driver - * | R location - * | | G location - * | | | B location - * | | | | */ - { 0, SW1_CS1, SW1_CS2, SW1_CS3 }, - { 0, SW1_CS4, SW1_CS5, SW1_CS6 }, - { 0, SW1_CS7, SW1_CS8, SW1_CS9 }, - { 0, SW1_CS10, SW1_CS11, SW1_CS12 }, - { 0, SW1_CS13, SW1_CS14, SW1_CS15 }, - ... - { 1, SW1_CS1, SW1_CS2, SW1_CS3 }, - { 1, SW1_CS13, SW1_CS14, SW1_CS15 }, - { 1, SW1_CS16, SW1_CS17, SW1_CS18 }, - { 1, SW2_CS4, SW2_CS5, SW2_CS6 }, - ... -}; -``` - ---- - ## Common Configuration {#common-configuration} From this point forward the configuration is the same for all the drivers. The `led_config_t` struct provides a key electrical matrix to led index lookup table, what the physical position of each LED is on the board, and what type of key or usage the LED if the LED represents. Here is a brief example: diff --git a/docs/features/split_keyboard.md b/docs/features/split_keyboard.md index 6efa1c2a35..49582c3946 100644 --- a/docs/features/split_keyboard.md +++ b/docs/features/split_keyboard.md @@ -417,8 +417,8 @@ This allows you to specify a different set of pins for the matrix on the right s This allows you to specify a different set of direct pins for the right side. ```c -#define ENCODERS_PAD_A_RIGHT { encoder1a, encoder2a } -#define ENCODERS_PAD_B_RIGHT { encoder1b, encoder2b } +#define ENCODER_A_PINS_RIGHT { encoder1a, encoder2a } +#define ENCODER_B_PINS_RIGHT { encoder1b, encoder2b } ``` This allows you to specify a different set of encoder pins for the right side. diff --git a/docs/keycodes.md b/docs/keycodes.md index 9526895228..9038c2b6d7 100644 --- a/docs/keycodes.md +++ b/docs/keycodes.md @@ -611,24 +611,27 @@ See also: [MIDI](features/midi) See also: [Mouse Keys](features/mouse_keys) -|Key |Aliases |Description | -|----------------|---------|---------------------------| -|`KC_MS_UP` |`KC_MS_U`|Mouse Cursor Up | -|`KC_MS_DOWN` |`KC_MS_D`|Mouse Cursor Down | -|`KC_MS_LEFT` |`KC_MS_L`|Mouse Cursor Left | -|`KC_MS_RIGHT` |`KC_MS_R`|Mouse Cursor Right | -|`KC_MS_BTN1` |`KC_BTN1`|Mouse Button 1 | -|`KC_MS_BTN2` |`KC_BTN2`|Mouse Button 2 | -|`KC_MS_BTN3` |`KC_BTN3`|Mouse Button 3 | -|`KC_MS_BTN4` |`KC_BTN4`|Mouse Button 4 | -|`KC_MS_BTN5` |`KC_BTN5`|Mouse Button 5 | -|`KC_MS_WH_UP` |`KC_WH_U`|Mouse Wheel Up | -|`KC_MS_WH_DOWN` |`KC_WH_D`|Mouse Wheel Down | -|`KC_MS_WH_LEFT` |`KC_WH_L`|Mouse Wheel Left | -|`KC_MS_WH_RIGHT`|`KC_WH_R`|Mouse Wheel Right | -|`KC_MS_ACCEL0` |`KC_ACL0`|Set mouse acceleration to 0| -|`KC_MS_ACCEL1` |`KC_ACL1`|Set mouse acceleration to 1| -|`KC_MS_ACCEL2` |`KC_ACL2`|Set mouse acceleration to 2| +|Key |Aliases |Description | +|-------------------------|---------|---------------------------| +|`QK_MOUSE_CURSOR_UP` |`MS_UP` |Mouse cursor up | +|`QK_MOUSE_CURSOR_DOWN` |`MS_DOWN`|Mouse cursor down | +|`QK_MOUSE_CURSOR_LEFT` |`MS_LEFT`|Mouse cursor left | +|`QK_MOUSE_CURSOR_RIGHT` |`MS_RGHT`|Mouse cursor right | +|`QK_MOUSE_BUTTON_1` |`MS_BTN1`|Mouse button 1 | +|`QK_MOUSE_BUTTON_2` |`MS_BTN2`|Mouse button 2 | +|`QK_MOUSE_BUTTON_3` |`MS_BTN3`|Mouse button 3 | +|`QK_MOUSE_BUTTON_4` |`MS_BTN4`|Mouse button 4 | +|`QK_MOUSE_BUTTON_5` |`MS_BTN5`|Mouse button 5 | +|`QK_MOUSE_BUTTON_6` |`MS_BTN6`|Mouse button 6 | +|`QK_MOUSE_BUTTON_7` |`MS_BTN7`|Mouse button 7 | +|`QK_MOUSE_BUTTON_8` |`MS_BTN8`|Mouse button 8 | +|`QK_MOUSE_WHEEL_UP` |`MS_WHLU`|Mouse wheel up | +|`QK_MOUSE_WHEEL_DOWN` |`MS_WHLD`|Mouse wheel down | +|`QK_MOUSE_WHEEL_LEFT` |`MS_WHLL`|Mouse wheel left | +|`QK_MOUSE_WHEEL_RIGHT` |`MS_WHLR`|Mouse wheel right | +|`QK_MOUSE_ACCELERATION_0`|`MS_ACL0`|Set mouse acceleration to 0| +|`QK_MOUSE_ACCELERATION_1`|`MS_ACL1`|Set mouse acceleration to 1| +|`QK_MOUSE_ACCELERATION_2`|`MS_ACL2`|Set mouse acceleration to 2| ## Modifiers {#modifiers} diff --git a/docs/reference_info_json.md b/docs/reference_info_json.md index 2db2cd1427..e658b48b71 100644 --- a/docs/reference_info_json.md +++ b/docs/reference_info_json.md @@ -732,8 +732,12 @@ Configures the [Split Keyboard](features/split_keyboard) feature. * `matrix_pins` * `right` * See [Matrix](#matrix) config. - * `soft_serial_pin` - * The GPIO pin to use (`serial` transport protocol only). + * `serial` + * `driver` + * The driver to use. Must be one of `bitbang`, `usart`, `vendor`. + * Default: `"bitbang"` + * `pin` + * The GPIO pin to use for transmit and receive. * `soft_serial_speed` * The protocol speed, from `0` to `5` (`serial` transport protocol only). * Default: `1` diff --git a/docs/reference_keymap_extras.md b/docs/reference_keymap_extras.md index 191e0d4ea8..d45183b6c6 100644 --- a/docs/reference_keymap_extras.md +++ b/docs/reference_keymap_extras.md @@ -33,6 +33,7 @@ These headers are located in [`quantum/keymap_extras/`](https://github.com/qmk/q |English (US International) |`keymap_us_international.h` |`sendstring_us_international.h` | |English (US International, Linux)|`keymap_us_international_linux.h`| | |Estonian |`keymap_estonian.h` |`sendstring_estonian.h` | +|Farsi |`keymap_farsi.h` | | |Finnish |`keymap_finnish.h` |`sendstring_finnish.h` | |French |`keymap_french.h` |`sendstring_french.h` | |French (AFNOR) |`keymap_french_afnor.h` |`sendstring_french_afnor.h` | diff --git a/drivers/eeprom/eeprom_custom.c-template b/drivers/eeprom/eeprom_custom.c-template index 5f915f7fab..fb1f0a3a97 100644 --- a/drivers/eeprom/eeprom_custom.c-template +++ b/drivers/eeprom/eeprom_custom.c-template @@ -23,6 +23,17 @@ void eeprom_driver_init(void) { /* Any initialisation code */ } +void eeprom_driver_format(bool erase) { + /* If erase=false, then only do the absolute minimum initialisation necessary + to make sure that the eeprom driver is usable. It doesn't need to guarantee + that the content of the eeprom is reset to any particular value. For many + eeprom drivers this may be a no-op. + + If erase=true, then in addition to making sure the eeprom driver is in a + usable state, also make sure that it is erased. + */ +} + void eeprom_driver_erase(void) { /* Wipe out the EEPROM, setting values to zero */ } diff --git a/drivers/eeprom/eeprom_driver.c b/drivers/eeprom/eeprom_driver.c index 885cf21981..1f3f96f006 100644 --- a/drivers/eeprom/eeprom_driver.c +++ b/drivers/eeprom/eeprom_driver.c @@ -77,3 +77,9 @@ void eeprom_update_dword(uint32_t *addr, uint32_t value) { eeprom_write_dword(addr, value); } } + +void eeprom_driver_format(bool erase) __attribute__((weak)); +void eeprom_driver_format(bool erase) { + (void)erase; /* The default implementation assumes that the eeprom must be erased in order to be usable. */ + eeprom_driver_erase(); +} diff --git a/drivers/eeprom/eeprom_driver.h b/drivers/eeprom/eeprom_driver.h index 74592bc8f0..0c55c497d4 100644 --- a/drivers/eeprom/eeprom_driver.h +++ b/drivers/eeprom/eeprom_driver.h @@ -16,7 +16,9 @@ #pragma once +#include <stdbool.h> #include "eeprom.h" void eeprom_driver_init(void); +void eeprom_driver_format(bool erase); void eeprom_driver_erase(void); diff --git a/drivers/eeprom/eeprom_i2c.c b/drivers/eeprom/eeprom_i2c.c index 0d3d5ccbe5..d29aff5f85 100644 --- a/drivers/eeprom/eeprom_i2c.c +++ b/drivers/eeprom/eeprom_i2c.c @@ -36,6 +36,7 @@ #include "wait.h" #include "i2c_master.h" #include "eeprom.h" +#include "eeprom_driver.h" #include "eeprom_i2c.h" // #define DEBUG_EEPROM_OUTPUT @@ -62,6 +63,13 @@ void eeprom_driver_init(void) { #endif } +void eeprom_driver_format(bool erase) { + /* i2c eeproms do not need to be formatted before use */ + if (erase) { + eeprom_driver_erase(); + } +} + void eeprom_driver_erase(void) { #if defined(CONSOLE_ENABLE) && defined(DEBUG_EEPROM_OUTPUT) uint32_t start = timer_read32(); diff --git a/drivers/eeprom/eeprom_spi.c b/drivers/eeprom/eeprom_spi.c index 51ba25dece..14f0afa68b 100644 --- a/drivers/eeprom/eeprom_spi.c +++ b/drivers/eeprom/eeprom_spi.c @@ -35,6 +35,7 @@ #include "timer.h" #include "spi_master.h" #include "eeprom.h" +#include "eeprom_driver.h" #include "eeprom_spi.h" #define CMD_WREN 6 @@ -92,6 +93,13 @@ void eeprom_driver_init(void) { spi_init(); } +void eeprom_driver_format(bool erase) { + /* spi eeproms do not need to be formatted before use */ + if (erase) { + eeprom_driver_erase(); + } +} + void eeprom_driver_erase(void) { #if defined(CONSOLE_ENABLE) && defined(DEBUG_EEPROM_OUTPUT) uint32_t start = timer_read32(); diff --git a/drivers/eeprom/eeprom_transient.c b/drivers/eeprom/eeprom_transient.c index 9dc4289c27..d9f5db9853 100644 --- a/drivers/eeprom/eeprom_transient.c +++ b/drivers/eeprom/eeprom_transient.c @@ -30,8 +30,13 @@ size_t clamp_length(intptr_t offset, size_t len) { return len; } -void eeprom_driver_init(void) { - eeprom_driver_erase(); +void eeprom_driver_init(void) {} + +void eeprom_driver_format(bool erase) { + /* The transient eeprom driver doesn't necessarily need to be formatted before use, and it always starts up filled with zeros, due to placement in the .bss section */ + if (erase) { + eeprom_driver_erase(); + } } void eeprom_driver_erase(void) { diff --git a/drivers/eeprom/eeprom_wear_leveling.c b/drivers/eeprom/eeprom_wear_leveling.c index bd77eef35c..24ca6c3c6b 100644 --- a/drivers/eeprom/eeprom_wear_leveling.c +++ b/drivers/eeprom/eeprom_wear_leveling.c @@ -10,6 +10,12 @@ void eeprom_driver_init(void) { wear_leveling_init(); } +void eeprom_driver_format(bool erase) { + /* wear leveling requires the write log data structures to be erased before use. */ + (void)erase; + eeprom_driver_erase(); +} + void eeprom_driver_erase(void) { wear_leveling_erase(); } diff --git a/drivers/encoder/encoder_quadrature.c b/drivers/encoder/encoder_quadrature.c index cd589bf1e2..086f500391 100644 --- a/drivers/encoder/encoder_quadrature.c +++ b/drivers/encoder/encoder_quadrature.c @@ -22,7 +22,7 @@ #endif #undef ENCODER_DEFAULT_PIN_API_IMPL -#if defined(ENCODERS_PAD_A) && defined(ENCODERS_PAD_B) +#if defined(ENCODER_A_PINS) && defined(ENCODER_B_PINS) // Inform the quadrature driver that it needs to implement pin init/read functions # define ENCODER_DEFAULT_PIN_API_IMPL #endif @@ -34,8 +34,8 @@ __attribute__((weak)) uint8_t encoder_quadrature_read_pin(uint8_t index, bool pa #ifdef ENCODER_DEFAULT_PIN_API_IMPL -static pin_t encoders_pad_a[NUM_ENCODERS_MAX_PER_SIDE] = ENCODERS_PAD_A; -static pin_t encoders_pad_b[NUM_ENCODERS_MAX_PER_SIDE] = ENCODERS_PAD_B; +static pin_t encoders_pad_a[NUM_ENCODERS_MAX_PER_SIDE] = ENCODER_A_PINS; +static pin_t encoders_pad_b[NUM_ENCODERS_MAX_PER_SIDE] = ENCODER_B_PINS; __attribute__((weak)) void encoder_wait_pullup_charge(void) { wait_us(100); @@ -123,25 +123,25 @@ void encoder_driver_init(void) { // here, but it's the simplest solution. memset(encoder_state, 0, sizeof(encoder_state)); memset(encoder_pulses, 0, sizeof(encoder_pulses)); - const pin_t encoders_pad_a_left[] = ENCODERS_PAD_A; - const pin_t encoders_pad_b_left[] = ENCODERS_PAD_B; + const pin_t encoders_pad_a_left[] = ENCODER_A_PINS; + const pin_t encoders_pad_b_left[] = ENCODER_B_PINS; for (uint8_t i = 0; i < thisCount; i++) { encoders_pad_a[i] = encoders_pad_a_left[i]; encoders_pad_b[i] = encoders_pad_b_left[i]; } #endif -#if defined(SPLIT_KEYBOARD) && defined(ENCODERS_PAD_A_RIGHT) && defined(ENCODERS_PAD_B_RIGHT) +#if defined(SPLIT_KEYBOARD) && defined(ENCODER_A_PINS_RIGHT) && defined(ENCODER_B_PINS_RIGHT) // Re-initialise the pads if it's the right-hand side if (!isLeftHand) { - const pin_t encoders_pad_a_right[] = ENCODERS_PAD_A_RIGHT; - const pin_t encoders_pad_b_right[] = ENCODERS_PAD_B_RIGHT; + const pin_t encoders_pad_a_right[] = ENCODER_A_PINS_RIGHT; + const pin_t encoders_pad_b_right[] = ENCODER_B_PINS_RIGHT; for (uint8_t i = 0; i < thisCount; i++) { encoders_pad_a[i] = encoders_pad_a_right[i]; encoders_pad_b[i] = encoders_pad_b_right[i]; } } -#endif // defined(SPLIT_KEYBOARD) && defined(ENCODERS_PAD_A_RIGHT) && defined(ENCODERS_PAD_B_RIGHT) +#endif // defined(SPLIT_KEYBOARD) && defined(ENCODER_A_PINS_RIGHT) && defined(ENCODER_B_PINS_RIGHT) // Encoder resolutions is defined differently in config.h, so concatenate #if defined(SPLIT_KEYBOARD) && defined(ENCODER_RESOLUTIONS) diff --git a/drivers/flash/flash.h b/drivers/flash/flash.h new file mode 100644 index 0000000000..4d62475139 --- /dev/null +++ b/drivers/flash/flash.h @@ -0,0 +1,126 @@ +// Copyright 2024 Nick Brassel (@tzarc) +// SPDX-License-Identifier: GPL-2.0-or-later +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + +#include <stdint.h> +#include <stdlib.h> +#include <stdbool.h> + +/** + * @brief The status of a flash operation. + */ +enum { + FLASH_STATUS_SUCCESS = 0, //< The operation completed successfully. + FLASH_STATUS_ERROR = -1, //< An error occurred during the operation. + FLASH_STATUS_TIMEOUT = -2, //< The operation timed out. + FLASH_STATUS_BAD_ADDRESS = -3, //< The address is out of bounds. + FLASH_STATUS_BUSY = -4, //< The flash is busy. +}; + +/** + * @brief The status of a flash operation. + */ +typedef int16_t flash_status_t; + +/** + * @brief Initializes the flash driver. + * + * This function initializes the flash driver and prepares it for use. + * It should be called before any other flash-related functions are used. + */ +void flash_init(void); + +/** + * @brief Checks if the flash is busy. + * + * This function checks if the flash is currently busy with an operation. + * + * @return FLASH_STATUS_SUCCESS if the flash is not busy, FLASH_STATUS_BUSY if the flash is busy, or FLASH_STATUS_ERROR if an error occurred. + */ +flash_status_t flash_is_busy(void); + +/** + * @brief Initiates a chip erase operation. + * + * This function does not wait for the flash to become ready. + * + * @return FLASH_STATUS_SUCCESS if the erase command was successfully sent, FLASH_STATUS_TIMEOUT if the flash is busy, or FLASH_STATUS_ERROR if an error occurred. + */ +flash_status_t flash_begin_erase_chip(void); + +/** + * @brief Waits for the chip erase operation to complete. + * + * This function waits for the chip erase operation to complete. + * + * @return FLASH_STATUS_SUCCESS if the chip erase operation completed successfully, FLASH_STATUS_TIMEOUT if the flash was still busy, or FLASH_STATUS_ERROR if an error occurred. + */ +flash_status_t flash_wait_erase_chip(void); + +/** + * @brief Erases the entire flash memory chip. + * + * This function initiates an erase operation to erase the entire flash memory chip. + * It waits for the operation to complete. + * + * @return FLASH_STATUS_SUCCESS if the erase was successfully executed, FLASH_STATUS_TIMEOUT if the flash is busy, or FLASH_STATUS_ERROR if an error occurred. + */ +flash_status_t flash_erase_chip(void); + +/** + * @brief Erases a block of flash memory. + * + * This function initiates an erase operation to erase a block of flash memory. + * It waits for the operation to complete. + * + * @param addr The address of the block to erase. + * + * @return FLASH_STATUS_SUCCESS if the erase was successfully executed, FLASH_STATUS_TIMEOUT if the flash is busy, or FLASH_STATUS_ERROR if an error occurred. + */ +flash_status_t flash_erase_block(uint32_t addr); + +/** + * @brief Erases a sector of flash memory. + * + * This function initiates an erase operation to erase a sector of flash memory. + * It waits for the operation to complete. + * + * @param addr The address of the sector to erase. + * + * @return FLASH_STATUS_SUCCESS if the erase was successfully executed, FLASH_STATUS_TIMEOUT if the flash is busy, or FLASH_STATUS_ERROR if an error occurred. + */ +flash_status_t flash_erase_sector(uint32_t addr); + +/** + * @brief Reads a range of flash memory. + * + * This function reads a range of flash memory into a buffer. + * + * @param addr The address of the range to read. + * @param buf A pointer to the buffer to read the range into. + * @param len The length of the range to read. + * + * @return FLASH_STATUS_SUCCESS if the range was successfully read, FLASH_STATUS_BAD_ADDRESS if the address is out of bounds, FLASH_STATUS_TIMEOUT if the flash is busy, or FLASH_STATUS_ERROR if an error occurred. + */ +flash_status_t flash_read_range(uint32_t addr, void *buf, size_t len); + +/** + * @brief Writes a range of flash memory. + * + * This function writes a range of flash memory from a buffer. + * + * @param addr The address of the range to write. + * @param buf A pointer to the buffer to write to the range. + * @param len The length of the range to write. + * + * @return FLASH_STATUS_SUCCESS if the range was successfully written, FLASH_STATUS_BAD_ADDRESS if the address is out of bounds, FLASH_STATUS_TIMEOUT if the flash is busy, or FLASH_STATUS_ERROR if an error occurred. + */ +flash_status_t flash_write_range(uint32_t addr, const void *buf, size_t len); + +#ifdef __cplusplus +} +#endif diff --git a/drivers/flash/flash_spi.c b/drivers/flash/flash_spi.c index 0c0eb8a99e..7226773ff4 100644 --- a/drivers/flash/flash_spi.c +++ b/drivers/flash/flash_spi.c @@ -1,22 +1,10 @@ -/* -Copyright (C) 2021 Westberry Technology (ChangZhou) Corp., Ltd - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ +// Copyright 2021 Westberry Technology (ChangZhou) Corp., Ltd +// Copyright 2024 Nick Brassel (@tzarc) +// SPDX-License-Identifier: GPL-2.0-or-later #include <string.h> +#include "flash.h" #include "util.h" #include "wait.h" #include "debug.h" @@ -69,33 +57,43 @@ static bool spi_flash_start(void) { return spi_start(EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN, EXTERNAL_FLASH_SPI_LSBFIRST, EXTERNAL_FLASH_SPI_MODE, EXTERNAL_FLASH_SPI_CLOCK_DIVISOR); } -static flash_status_t spi_flash_wait_while_busy(void) { - uint32_t deadline = timer_read32() + EXTERNAL_FLASH_SPI_TIMEOUT; +static flash_status_t spi_flash_wait_while_busy_multiplier(int multiplier) { flash_status_t response = FLASH_STATUS_SUCCESS; - uint8_t retval; - + uint32_t deadline = timer_read32() + ((EXTERNAL_FLASH_SPI_TIMEOUT)*multiplier); do { - bool res = spi_flash_start(); - if (!res) { - dprint("Failed to start SPI! [spi flash wait while busy]\n"); - return FLASH_STATUS_ERROR; - } - - spi_write(FLASH_CMD_RDSR); - - retval = (uint8_t)spi_read(); - - spi_stop(); - if (timer_read32() >= deadline) { response = FLASH_STATUS_TIMEOUT; break; } - } while (retval & FLASH_FLAG_WIP); + response = flash_is_busy(); + } while (response == FLASH_STATUS_BUSY); return response; } +static flash_status_t spi_flash_wait_while_busy(void) { + return spi_flash_wait_while_busy_multiplier(1); +} + +flash_status_t flash_is_busy(void) { + bool res = spi_flash_start(); + if (!res) { + dprint("Failed to start SPI! [spi flash wait while busy]\n"); + return FLASH_STATUS_ERROR; + } + + spi_write(FLASH_CMD_RDSR); + spi_status_t status = spi_read(); + spi_stop(); + + if (status < 0) { + return status; + } + + uint8_t sr = (uint8_t)status; + return (sr & FLASH_FLAG_WIP) ? FLASH_STATUS_BUSY : FLASH_STATUS_SUCCESS; +} + static flash_status_t spi_flash_write_enable(void) { bool res = spi_flash_start(); if (!res) { @@ -104,7 +102,6 @@ static flash_status_t spi_flash_write_enable(void) { } spi_write(FLASH_CMD_WREN); - spi_stop(); return FLASH_STATUS_SUCCESS; @@ -118,7 +115,6 @@ static flash_status_t spi_flash_write_disable(void) { } spi_write(FLASH_CMD_WRDI); - spi_stop(); return FLASH_STATUS_SUCCESS; @@ -166,7 +162,7 @@ void flash_init(void) { spi_init(); } -flash_status_t flash_erase_chip(void) { +flash_status_t flash_begin_erase_chip(void) { flash_status_t response = FLASH_STATUS_SUCCESS; /* Wait for the write-in-progress bit to be cleared. */ @@ -191,17 +187,28 @@ flash_status_t flash_erase_chip(void) { } spi_write(FLASH_CMD_CE); spi_stop(); + return FLASH_STATUS_SUCCESS; +} - /* Wait for the write-in-progress bit to be cleared.*/ - response = spi_flash_wait_while_busy(); +flash_status_t flash_wait_erase_chip(void) { + flash_status_t response = spi_flash_wait_while_busy_multiplier(250); // Chip erase can take a long time, wait 250x the usual timeout if (response != FLASH_STATUS_SUCCESS) { dprint("Failed to check WIP flag! [spi flash erase chip]\n"); return response; } - return response; } +flash_status_t flash_erase_chip(void) { + flash_status_t response = flash_begin_erase_chip(); + if (response != FLASH_STATUS_SUCCESS) { + dprint("Failed to begin erase chip! [spi flash erase chip]\n"); + return response; + } + + return flash_wait_erase_chip(); +} + flash_status_t flash_erase_sector(uint32_t addr) { flash_status_t response = FLASH_STATUS_SUCCESS; @@ -282,7 +289,7 @@ flash_status_t flash_erase_block(uint32_t addr) { return response; } -flash_status_t flash_read_block(uint32_t addr, void *buf, size_t len) { +flash_status_t flash_read_range(uint32_t addr, void *buf, size_t len) { flash_status_t response = FLASH_STATUS_SUCCESS; uint8_t * read_buf = (uint8_t *)buf; @@ -313,7 +320,7 @@ flash_status_t flash_read_block(uint32_t addr, void *buf, size_t len) { return response; } -flash_status_t flash_write_block(uint32_t addr, const void *buf, size_t len) { +flash_status_t flash_write_range(uint32_t addr, const void *buf, size_t len) { flash_status_t response = FLASH_STATUS_SUCCESS; uint8_t * write_buf = (uint8_t *)buf; diff --git a/drivers/flash/flash_spi.h b/drivers/flash/flash_spi.h index 87460fc210..7a979daf0f 100644 --- a/drivers/flash/flash_spi.h +++ b/drivers/flash/flash_spi.h @@ -17,6 +17,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once +#include "flash.h" + /* All the following default configurations are based on MX25L4006E Nor FLASH. */ /* @@ -105,32 +107,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. The page count of the FLASH, calculated by total FLASH size and page size. */ #define EXTERNAL_FLASH_PAGE_COUNT ((EXTERNAL_FLASH_SIZE) / (EXTERNAL_FLASH_PAGE_SIZE)) - -typedef int16_t flash_status_t; - -#define FLASH_STATUS_SUCCESS (0) -#define FLASH_STATUS_ERROR (-1) -#define FLASH_STATUS_TIMEOUT (-2) -#define FLASH_STATUS_BAD_ADDRESS (-3) - -#ifdef __cplusplus -extern "C" { -#endif - -#include <stdint.h> - -void flash_init(void); - -flash_status_t flash_erase_chip(void); - -flash_status_t flash_erase_block(uint32_t addr); - -flash_status_t flash_erase_sector(uint32_t addr); - -flash_status_t flash_read_block(uint32_t addr, void *buf, size_t len); - -flash_status_t flash_write_block(uint32_t addr, const void *buf, size_t len); - -#ifdef __cplusplus -} -#endif diff --git a/drivers/led/apa102.c b/drivers/led/apa102.c index b171b07b12..0cf0ecb401 100644 --- a/drivers/led/apa102.c +++ b/drivers/led/apa102.c @@ -53,7 +53,8 @@ io_wait; \ } while (0) -uint8_t apa102_led_brightness = APA102_DEFAULT_BRIGHTNESS; +rgb_led_t apa102_leds[APA102_LED_COUNT]; +uint8_t apa102_led_brightness = APA102_DEFAULT_BRIGHTNESS; static void apa102_send_byte(uint8_t byte) { APA102_SEND_BIT(byte, 7); @@ -121,14 +122,24 @@ void apa102_init(void) { gpio_set_pin_output(APA102_CI_PIN); } -void apa102_setleds(rgb_led_t *start_led, uint16_t num_leds) { - rgb_led_t *end = start_led + num_leds; +void apa102_set_color(uint16_t index, uint8_t red, uint8_t green, uint8_t blue) { + apa102_leds[index].r = red; + apa102_leds[index].g = green; + apa102_leds[index].b = blue; +} + +void apa102_set_color_all(uint8_t red, uint8_t green, uint8_t blue) { + for (uint16_t i = 0; i < APA102_LED_COUNT; i++) { + apa102_set_color(i, red, green, blue); + } +} +void apa102_flush(void) { apa102_start_frame(); - for (rgb_led_t *led = start_led; led < end; led++) { - apa102_send_frame(led->r, led->g, led->b, apa102_led_brightness); + for (uint8_t i = 0; i < APA102_LED_COUNT; i++) { + apa102_send_frame(apa102_leds[i].r, apa102_leds[i].g, apa102_leds[i].b, apa102_led_brightness); } - apa102_end_frame(num_leds); + apa102_end_frame(APA102_LED_COUNT); } void apa102_set_brightness(uint8_t brightness) { diff --git a/drivers/led/apa102.h b/drivers/led/apa102.h index 5e2f78658b..42f1344f0c 100644 --- a/drivers/led/apa102.h +++ b/drivers/led/apa102.h @@ -32,17 +32,8 @@ #define APA102_MAX_BRIGHTNESS 31 void apa102_init(void); - -/* User Interface - * - * Input: - * start_led: An array of GRB data describing the LED colors - * num_leds: The number of LEDs to write - * - * The functions will perform the following actions: - * - Set the data-out pin as output - * - Send out the LED data - */ -void apa102_setleds(rgb_led_t *start_led, uint16_t num_leds); +void apa102_set_color(uint16_t index, uint8_t red, uint8_t green, uint8_t blue); +void apa102_set_color_all(uint8_t red, uint8_t green, uint8_t blue); +void apa102_flush(void); void apa102_set_brightness(uint8_t brightness); diff --git a/drivers/painter/gc9a01/qp_gc9a01_opcodes.h b/drivers/painter/gc9a01/qp_gc9a01_opcodes.h deleted file mode 100644 index 828e42752b..0000000000 --- a/drivers/painter/gc9a01/qp_gc9a01_opcodes.h +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright 2021 Paul Cotter (@gr1mr3aver) -// SPDX-License-Identifier: GPL-2.0-or-later -#pragma once - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// Quantum Painter GC9A01 command opcodes -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// Level 1 command opcodes - -#define GC9A01_GET_ID_INFO 0x04 // Get ID information -#define GC9A01_GET_STATUS 0x09 // Get status -#define GC9A01_CMD_SLEEP_ON 0x10 // Enter sleep mode -#define GC9A01_CMD_SLEEP_OFF 0x11 // Exit sleep mode -#define GC9A01_CMD_PARTIAL_ON 0x12 // Enter partial mode -#define GC9A01_CMD_PARTIAL_OFF 0x13 // Exit partial mode -#define GC9A01_CMD_INVERT_ON 0x20 // Enter inverted mode -#define GC9A01_CMD_INVERT_OFF 0x21 // Exit inverted mode -#define GC9A01_CMD_DISPLAY_OFF 0x28 // Disable display -#define GC9A01_CMD_DISPLAY_ON 0x29 // Enable display -#define GC9A01_SET_COL_ADDR 0x2A // Set column address -#define GC9A01_SET_PAGE_ADDR 0x2B // Set page address -#define GC9A01_SET_MEM 0x2C // Set memory -#define GC9A01_SET_PARTIAL_AREA 0x30 // Set partial area -#define GC9A01_SET_VSCROLL 0x33 // Set vertical scroll def -#define GC9A01_CMD_TEARING_ON 0x34 // Tearing line enabled -#define GC9A01_CMD_TEARING_OFF 0x35 // Tearing line disabled -#define GC9A01_SET_MEM_ACS_CTL 0x36 // Set mem access ctl -#define GC9A01_SET_VSCROLL_ADDR 0x37 // Set vscroll start addr -#define GC9A01_CMD_IDLE_OFF 0x38 // Exit idle mode -#define GC9A01_CMD_IDLE_ON 0x39 // Enter idle mode -#define GC9A01_SET_PIX_FMT 0x3A // Set pixel format -#define GC9A01_SET_MEM_CONT 0x3C // Set memory continue -#define GC9A01_SET_TEAR_SCANLINE 0x44 // Set tearing scanline -#define GC9A01_GET_TEAR_SCANLINE 0x45 // Get tearing scanline -#define GC9A01_SET_BRIGHTNESS 0x51 // Set brightness -#define GC9A01_SET_DISPLAY_CTL 0x53 // Set display ctl -#define GC9A01_GET_ID1 0xDA // Get ID1 -#define GC9A01_GET_ID2 0xDB // Get ID2 -#define GC9A01_GET_ID3 0xDC // Get ID3 - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// Level 2 command opcodes - -#define GC9A01_SET_RGB_IF_SIG_CTL 0xB0 // RGB IF signal ctl -#define GC9A01_SET_BLANKING_PORCH_CTL 0xB5 // Set blanking porch ctl -#define GC9A01_SET_FUNCTION_CTL 0xB6 // Set function ctl -#define GC9A01_SET_TEARING_EFFECT 0xBA // Set backlight ctl 3 -#define GC9A01_SET_IF_CTL 0xF6 // Set interface control - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// Level 3 command opcodes - -#define GC9A01_SET_FRAME_RATE 0xE8 // Set frame rate -#define GC9A01_SET_SPI_2DATA 0xE9 // Set frame rate -#define GC9A01_SET_POWER_CTL_1 0xC1 // Set power ctl 1 -#define GC9A01_SET_POWER_CTL_2 0xC3 // Set power ctl 2 -#define GC9A01_SET_POWER_CTL_3 0xC4 // Set power ctl 3 -#define GC9A01_SET_POWER_CTL_4 0xC9 // Set power ctl 4 -#define GC9A01_SET_POWER_CTL_7 0xA7 // Set power ctl 7 -#define GC9A01_SET_INTER_REG_ENABLE1 0xFE // Enable Inter Register 1 -#define GC9A01_SET_INTER_REG_ENABLE2 0xEF // Enable Inter Register 2 -#define GC9A01_SET_GAMMA1 0xF0 // -#define GC9A01_SET_GAMMA2 0xF1 -#define GC9A01_SET_GAMMA3 0xF2 -#define GC9A01_SET_GAMMA4 0xF3 - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// MADCTL Flags -#define GC9A01_MADCTL_MY 0b10000000 -#define GC9A01_MADCTL_MX 0b01000000 -#define GC9A01_MADCTL_MV 0b00100000 -#define GC9A01_MADCTL_ML 0b00010000 -#define GC9A01_MADCTL_RGB 0b00000000 -#define GC9A01_MADCTL_BGR 0b00001000 -#define GC9A01_MADCTL_MH 0b00000100 diff --git a/drivers/painter/gc9xxx/qp_gc9107.c b/drivers/painter/gc9xxx/qp_gc9107.c new file mode 100644 index 0000000000..108344da4f --- /dev/null +++ b/drivers/painter/gc9xxx/qp_gc9107.c @@ -0,0 +1,114 @@ +// Copyright 2024 Fernando Birra +// SPDX-License-Identifier: GPL-2.0-or-later +#include "qp_internal.h" +#include "qp_comms.h" +#include "qp_gc9107.h" +#include "qp_gc9xxx_opcodes.h" +#include "qp_gc9107_opcodes.h" +#include "qp_tft_panel.h" + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// Driver storage +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +tft_panel_dc_reset_painter_device_t gc9107_drivers[GC9107_NUM_DEVICES] = {0}; + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// Initialization +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +__attribute__((weak)) bool qp_gc9107_init(painter_device_t device, painter_rotation_t rotation) { + // A lot of these "unknown" opcodes are sourced from other OSS projects and are seemingly required for this display to function. + // clang-format off + const uint8_t gc9107_init_sequence[] = { + GC9XXX_SET_INTER_REG_ENABLE1, 5, 0, + GC9XXX_SET_INTER_REG_ENABLE2, 5, 0, + GC9107_SET_FUNCTION_CTL6, 0, 1, GC9107_ALLOW_SET_COMPLEMENT_RGB | 0x08 | GC9107_ALLOW_SET_FRAMERATE, + GC9107_SET_COMPLEMENT_RGB, 0, 1, GC9107_COMPLEMENT_WITH_LSB, + 0xAB, 0, 1, 0x0E, + GC9107_SET_FRAME_RATE, 0, 1, 0x19, + GC9XXX_SET_PIXEL_FORMAT, 0, 1, GC9107_PIXEL_FORMAT_16_BPP_IFPF, + GC9XXX_CMD_SLEEP_OFF, 120, 0, + GC9XXX_CMD_DISPLAY_ON, 20, 0 + }; + + // clang-format on + qp_comms_bulk_command_sequence(device, gc9107_init_sequence, sizeof(gc9107_init_sequence)); + + // Configure the rotation (i.e. the ordering and direction of memory writes in GRAM) + const uint8_t madctl[] = { + [QP_ROTATION_0] = GC9XXX_MADCTL_BGR, + [QP_ROTATION_90] = GC9XXX_MADCTL_BGR | GC9XXX_MADCTL_MX | GC9XXX_MADCTL_MV, + [QP_ROTATION_180] = GC9XXX_MADCTL_BGR | GC9XXX_MADCTL_MX | GC9XXX_MADCTL_MY, + [QP_ROTATION_270] = GC9XXX_MADCTL_BGR | GC9XXX_MADCTL_MV | GC9XXX_MADCTL_MY, + }; + qp_comms_command_databyte(device, GC9XXX_SET_MEM_ACS_CTL, madctl[rotation]); + + return true; +} + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// Driver vtable +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +const tft_panel_dc_reset_painter_driver_vtable_t gc9107_driver_vtable = { + .base = + { + .init = qp_gc9107_init, + .power = qp_tft_panel_power, + .clear = qp_tft_panel_clear, + .flush = qp_tft_panel_flush, + .pixdata = qp_tft_panel_pixdata, + .viewport = qp_tft_panel_viewport, + .palette_convert = qp_tft_panel_palette_convert_rgb565_swapped, + .append_pixels = qp_tft_panel_append_pixels_rgb565, + .append_pixdata = qp_tft_panel_append_pixdata, + }, + .num_window_bytes = 2, + .swap_window_coords = false, + .opcodes = + { + .display_on = GC9XXX_CMD_DISPLAY_ON, + .display_off = GC9XXX_CMD_DISPLAY_OFF, + .set_column_address = GC9XXX_SET_COL_ADDR, + .set_row_address = GC9XXX_SET_ROW_ADDR, + .enable_writes = GC9XXX_SET_MEM, + }, +}; + +#ifdef QUANTUM_PAINTER_GC9107_SPI_ENABLE +// Factory function for creating a handle to the GC9107 device +painter_device_t qp_gc9107_make_spi_device(uint16_t panel_width, uint16_t panel_height, pin_t chip_select_pin, pin_t dc_pin, pin_t reset_pin, uint16_t spi_divisor, int spi_mode) { + for (uint32_t i = 0; i < GC9107_NUM_DEVICES; ++i) { + tft_panel_dc_reset_painter_device_t *driver = &gc9107_drivers[i]; + if (!driver->base.driver_vtable) { + driver->base.driver_vtable = (const painter_driver_vtable_t *)&gc9107_driver_vtable; + driver->base.comms_vtable = (const painter_comms_vtable_t *)&spi_comms_with_dc_vtable; + driver->base.native_bits_per_pixel = 16; // RGB565 + driver->base.panel_width = panel_width; + driver->base.panel_height = panel_height; + driver->base.rotation = QP_ROTATION_0; + driver->base.offset_x = 2; + driver->base.offset_y = 1; + + // SPI and other pin configuration + driver->base.comms_config = &driver->spi_dc_reset_config; + driver->spi_dc_reset_config.spi_config.chip_select_pin = chip_select_pin; + driver->spi_dc_reset_config.spi_config.divisor = spi_divisor; + driver->spi_dc_reset_config.spi_config.lsb_first = false; + driver->spi_dc_reset_config.spi_config.mode = spi_mode; + driver->spi_dc_reset_config.dc_pin = dc_pin; + driver->spi_dc_reset_config.reset_pin = reset_pin; + driver->spi_dc_reset_config.command_params_uses_command_pin = false; + + if (!qp_internal_register_device((painter_device_t)driver)) { + memset(driver, 0, sizeof(tft_panel_dc_reset_painter_device_t)); + return NULL; + } + + return (painter_device_t)driver; + } + } + return NULL; +} + +#endif // QUANTUM_PAINTER_GC9107_SPI_ENABLE diff --git a/drivers/painter/gc9xxx/qp_gc9107.h b/drivers/painter/gc9xxx/qp_gc9107.h new file mode 100644 index 0000000000..b0b08f7665 --- /dev/null +++ b/drivers/painter/gc9xxx/qp_gc9107.h @@ -0,0 +1,37 @@ +// Copyright 2024 Fernando Birra (@gr1mr3aver) +// SPDX-License-Identifier: GPL-2.0-or-later +#pragma once + +#include "gpio.h" +#include "qp_internal.h" + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// Quantum Painter GC9107 configurables (add to your keyboard's config.h) + +#ifndef GC9107_NUM_DEVICES +/** + * @def This controls the maximum number of GC9107 devices that Quantum Painter can communicate with at any one time. + * Increasing this number allows for multiple displays to be used. + */ +# define GC9107_NUM_DEVICES 1 +#endif + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// Quantum Painter GC9107 device factories + +#ifdef QUANTUM_PAINTER_GC9107_SPI_ENABLE +/** + * Factory method for an GC9107 SPI LCD device. + * + * @param panel_width[in] the width of the display panel + * @param panel_height[in] the height of the display panel + * @param chip_select_pin[in] the GPIO pin used for SPI chip select + * @param dc_pin[in] the GPIO pin used for D/C control + * @param reset_pin[in] the GPIO pin used for RST + * @param spi_divisor[in] the SPI divisor to use when communicating with the display + * @param spi_mode[in] the SPI mode to use when communicating with the display + * @return the device handle used with all drawing routines in Quantum Painter + */ +painter_device_t qp_gc9107_make_spi_device(uint16_t panel_width, uint16_t panel_height, pin_t chip_select_pin, pin_t dc_pin, pin_t reset_pin, uint16_t spi_divisor, int spi_mode); + +#endif // QUANTUM_PAINTER_GC9107_SPI_ENABLE diff --git a/drivers/painter/gc9xxx/qp_gc9107_opcodes.h b/drivers/painter/gc9xxx/qp_gc9107_opcodes.h new file mode 100644 index 0000000000..e9b308eb49 --- /dev/null +++ b/drivers/painter/gc9xxx/qp_gc9107_opcodes.h @@ -0,0 +1,135 @@ +// Copyright 2024 Fernando Birra +// SPDX-License-Identifier: GPL-2.0-or-later +#pragma once + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// Quantum Painter GC9107 command opcodes +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +#define GC9107_GET_POWER_MODE 0x0A // Get power mode +#define GC9107_GET_MADCTL 0x0B // Get MADCTL +#define GC9107_GET_PIXEL_FMT 0x0C // Get pixel format +#define GC9107_GET_IMAGE_FMT 0x0D // Get image format +#define GC9107_GET_SIGNAL_MODE 0x0E // Get signal mode +#define GC9107_GET_DIAG_RESULT 0x0F // Get self-diagnostic results + +#define GC9107_SET_FRAME_RATE 0xA8 // Set frame rate +#define GC9107_SET_COMPLEMENT_RGB 0xAC // Set complement Principle RGB +#define GC9107_SET_BLANK_PORCH 0xAD // Set blank porch control, 0;front_porch[6:0],0;back_porch[6:0] +#define GC9107_SET_FUNCTION_CTL1 0xB1 // Set access to AVDD_VCL_CLK and VGH_VGL_CLK commands +#define GC9107_SET_FUNCTION_CTL2 0xB2 // Set access to VGH, VGH control commands +#define GC9107_SET_FUNCTION_CTL3 0xB3 // Set access to Gamma control commands +#define GC9107_SET_DISPLAY_INVERSION 0xB4 // Set Display Inversion control +#define GC9107_SET_FUNCTION_CTL6 0xB6 // Set access to commands SET_FRAME_RATE, SET_COMPLEMENT_RGB and SET_BLANK_PORCH +#define GC9107_SET_CUSTOM_ID_INFO 0xD3 // Set customized display id information +#define GC9107_AVDD_VCL_CLK 0xE3 // AVDD_CLK +#define GC9107_SET_VGH 0xE8 // Set VGH +#define GC9107_SET_VGL 0xE9 // Set VGL +#define GC9107_SET_VGH_VGL_CLK 0xEA // Set VGH and VGL clock divisors + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// GC9107 Parameter constants + +// Parameter values for +// GC9107_SET_PIXEL_FORMAT +#define GC9107_PIXEL_FORMAT_12_BPP_IFPF (0b001 << 0) // 12 bits per pixel +#define GC9107_PIXEL_FORMAT_16_BPP_IFPF (0b101 << 0) // 16 bits per pixel +#define GC9107_PIXEL_FORMAT_18_BPP_IFPB (0b110 << 0) // 18 bits per pixel + +// Parameter values for +// GC9107_SET_COMPLEMENT_RGB +#define GC9107_COMPLEMENT_WITH_0 0x00 // R0 <- B0 <- 0, except if data is FFh +#define GC9107_COMPLEMENT_WITH_1 0x40 // R0 <- B0 <- 1, except if data is 00h +#define GC9107_COMPLEMENT_WITH_MSB 0x80 // R0 <- R5, B0 <- B5 +#define GC9107_COMPLEMENT_WITH_LSB 0xC0 // R0 <- B0 <- G0 +// Parameter masks for +// GC9107_SET_FUNCTION_CTL1 +#define GC9107_ALLOW_AVDD_VCL_CLK 0b00001000 // Allow AVDD_VCL_CLK command +// Parameter masks for +// GC9107_SET_FUNCTION_CTL2 +#define GC9107_ALLOW_SET_VGH 0b00000001 // Allow GC9107_SET_VGH +#define GC9107_ALLOW_SET_VGL 0b00000010 // Allow GC9107_SET_VGL +#define GC9107_ALLOW_SET_VGH_VGL_CLK 0b00000100 // Allow GC9107_SET_VGH_VGL_CLK +// Parameter masks for +// GC9107_SET_FUNCTION_CTL3 +#define GC9107_ALLOW_SET_GAMMA1 0b00000001 // Allow GC9107_SET_GAMMA1 +#define GC9107_ALLOW_SET_GAMMA2 0b00000010 // Allow GC9107_SET_GAMMA2 +// Parameter mask for +// GC9107_SET_FUNCTION_CTL6 +#define GC9107_ALLOW_SET_FRAMERATE 0b000000001 // Allow GC9107_SET_FRAME_RATE +#define GC9107_ALLOW_SET_COMPLEMENT_RGB 0b000010000 // Allow GC9107_SET_COMPLEMENT_RGB +#define GC9107_ALLOW_SET_BLANK_PORCH 0b000100000 // Allow GFC9107_SET_BLANK_PORCH +// Parameter values for +// AVDD_CLK_AD part (Most significant nibble) +#define GC9107_AVDD_CLK_AD_2T 0x00 +#define GC9107_AVDD_CLK_AD_3T 0x10 +#define GC9107_AVDD_CLK_AD_4T 0x20 +#define GC9107_AVDD_CLK_AD_5T 0x30 +#define GC9107_AVDD_CLK_AD_6T 0x40 +#define GC9107_AVDD_CLK_AD_7T 0x50 +#define GC9107_AVDD_CLK_AD_8T 0x60 +#define GC9107_AVDD_CLK_AD_9T 0x70 +// Parameter values for +// VCL_CLK_AD part (Least significant nibble) +#define GC9107_VCL_CLK_AD_2T 0x00 +#define GC9107_VCL_CLK_AD_3T 0x01 +#define GC9107_VCL_CLK_AD_4T 0x02 +#define GC9107_VCL_CLK_AD_5T 0x03 +#define GC9107_VCL_CLK_AD_6T 0x04 +#define GC9107_VCL_CLK_AD_7T 0x05 +#define GC9107_VCL_CLK_AD_8T 0x06 +#define GC9107_VCL_CLK_AD_9T 0x07 +// Parameter values for +// GC9107_SET_VGH +#define GC9107_VGH_P100 0x20 // +10 V +#define GC9107_VGH_P110 0x21 // +11 V +#define GC9107_VGH_P120 0x22 // +12 V +#define GC9107_VGH_P130 0x23 // +13 V +#define GC9107_VGH_P140 0x24 // +14 V +#define GC9107_VGH_P150 0x25 // +15 V +// Parameter values for +// GC9107_SET_VGL +#define VGL_N_075 0x40 // -7.5 V +#define VGL_N_085 0x41 // -8.5 V +#define VGL_N_095 0x42 // -9.5 V +#define VGL_N_100 0x43 // -10.0 V +#define VGL_N_105 0x44 // -10.5 V +#define VGL_N_110 0x45 // -11.0 V +#define VGL_N_120 0x46 // -12.0 V +#define VGL_N_130 0x47 // -13.0 V +// Parameter masks for +// GC9107_SET_VGH_VGL_CLK (VGH Divisor) +#define GC9107_VGH_CLK_DIV_2 0x00 // Clock divisor = 2 -> 6.0 Mhz +#define GC9107_VGH_CLK_DIV_3 0x10 // Clock divisor = 3 -> 4.0 Mhz +#define GC9107_VGH_CLK_DIV_4 0x20 // Clock divisor = 4 -> 3.0 Mhz +#define GC9107_VGH_CLK_DIV_5 0x30 // Clock divisor = 5 -> 2.4 Mhz +#define GC9107_VGH_CLK_DIV_6 0x40 // Clock divisor = 6 -> 2.0 Mhz +#define GC9107_VGH_CLK_DIV_7 0x50 // Clock divisor = 7 -> 1.7 Mhz +#define GC9107_VGH_CLK_DIV_8 0x60 // Clock divisor = 8 -> 1.5 Mhz +#define GC9107_VGH_CLK_DIV_9 0x70 // Clock divisor = 9 -> 1.3 Mhz +#define GC9107_VGH_CLK_DIV_10 0x80 // Clock divisor = 10 -> 1.2 Mhz +#define GC9107_VGH_CLK_DIV_12 0x90 // Clock divisor = 12 -> 1.0 Mhz +#define GC9107_VGH_CLK_DIV_15 0xA0 // Clock divisor = 15 -> 0.8 Mhz +#define GC9107_VGH_CLK_DIV_20 0xB0 // Clock divisor = 20 -> 0.6 Mhz +#define GC9107_VGH_CLK_DIV_24 0xC0 // Clock divisor = 24 -> 0.5 Mhz +#define GC9107_VGH_CLK_DIV_30 0xD0 // Clock divisor = 30 -> 0.4 Mhz +#define GC9107_VGH_CLK_DIV_40 0xE0 // Clock divisor = 40 -> 0.3 Mhz +#define GC9107_VGH_CLK_DIV_60 0xE0 // Clock divisor = 40 -> 0.2 Mhz +// Parameter masks for +// GC9107_SET_VGH_VGL_CLK (VGL Divisor) +#define GC9107_VGL_CLK_DIV_2 0x00 // Clock divisor = 2 -> 6.0 Mhz +#define GC9107_VGL_CLK_DIV_3 0x01 // Clock divisor = 3 -> 4.0 Mhz +#define GC9107_VGL_CLK_DIV_4 0x02 // Clock divisor = 4 -> 3.0 Mhz +#define GC9107_VGL_CLK_DIV_5 0x03 // Clock divisor = 5 -> 2.4 Mhz +#define GC9107_VGL_CLK_DIV_6 0x04 // Clock divisor = 6 -> 2.0 Mhz +#define GC9107_VGL_CLK_DIV_7 0x05 // Clock divisor = 7 -> 1.7 Mhz +#define GC9107_VGL_CLK_DIV_8 0x06 // Clock divisor = 8 -> 1.5 Mhz +#define GC9107_VGL_CLK_DIV_9 0x07 // Clock divisor = 9 -> 1.3 Mhz +#define GC9107_VGL_CLK_DIV_10 0x08 // Clock divisor = 10 -> 1.2 Mhz +#define GC9107_VGL_CLK_DIV_12 0x09 // Clock divisor = 12 -> 1.0 Mhz +#define GC9107_VGL_CLK_DIV_15 0x0A // Clock divisor = 15 -> 0.8 Mhz +#define GC9107_VGL_CLK_DIV_20 0x0B // Clock divisor = 20 -> 0.6 Mhz +#define GC9107_VGL_CLK_DIV_24 0x0C // Clock divisor = 24 -> 0.5 Mhz +#define GC9107_VGL_CLK_DIV_30 0x0D // Clock divisor = 30 -> 0.4 Mhz +#define GC9107_VGL_CLK_DIV_40 0x0E // Clock divisor = 40 -> 0.3 Mhz +#define GC9107_VGL_CLK_DIV_60 0x0E // Clock divisor = 40 -> 0.2 Mhz diff --git a/drivers/painter/gc9a01/qp_gc9a01.c b/drivers/painter/gc9xxx/qp_gc9a01.c index fe6fa7a9d0..f037a4cc87 100644 --- a/drivers/painter/gc9a01/qp_gc9a01.c +++ b/drivers/painter/gc9xxx/qp_gc9a01.c @@ -5,6 +5,7 @@ #include "qp_internal.h" #include "qp_comms.h" #include "qp_gc9a01.h" +#include "qp_gc9xxx_opcodes.h" #include "qp_gc9a01_opcodes.h" #include "qp_tft_panel.h" @@ -20,71 +21,40 @@ tft_panel_dc_reset_painter_device_t gc9a01_drivers[GC9A01_NUM_DEVICES] = {0}; __attribute__((weak)) bool qp_gc9a01_init(painter_device_t device, painter_rotation_t rotation) { // A lot of these "unknown" opcodes are sourced from other OSS projects and are seemingly required for this display to function. // clang-format off + const uint8_t gc9a01_init_sequence[] = { // Command, Delay, N, Data[N] - GC9A01_SET_INTER_REG_ENABLE2, 0, 0, - 0xEB, 0, 1, 0x14, - GC9A01_SET_INTER_REG_ENABLE1, 0, 0, - GC9A01_SET_INTER_REG_ENABLE2, 0, 0, - 0xEB, 0, 1, 0x14, + GC9XXX_SET_INTER_REG_ENABLE1, 0, 0, + GC9XXX_SET_INTER_REG_ENABLE2, 0, 0, 0x84, 0, 1, 0x40, - 0x85, 0, 1, 0xFF, - 0x86, 0, 1, 0xFF, - 0x87, 0, 1, 0xFF, - 0x88, 0, 1, 0x0A, - 0x89, 0, 1, 0x21, - 0x8a, 0, 1, 0x00, - 0x8b, 0, 1, 0x80, - 0x8c, 0, 1, 0x01, - 0x8d, 0, 1, 0x01, - 0x8e, 0, 1, 0xFF, - 0x8f, 0, 1, 0xFF, - GC9A01_SET_FUNCTION_CTL, 0, 2, 0x00, 0x20, - GC9A01_SET_PIX_FMT, 0, 1, 0x55, - 0x90, 0, 4, 0x08, 0x08, 0x08, 0x08, - 0xBD, 0, 1, 0x06, - 0xBC, 0, 1, 0x00, - 0xFF, 0, 3, 0x60, 0x01, 0x04, - GC9A01_SET_POWER_CTL_2, 0, 1, 0x13, - GC9A01_SET_POWER_CTL_3, 0, 1, 0x13, + GC9A01_SET_FUNCTION_CTL, 0, 3, 0x00, GC9A01_SOURCE_OUTPUT_SCAN_DIRECTION_S360_TO_S1 | GC9A01_GATE_OUTPUT_SCAN_DIRECTION_G1_TO_G32, GC9A01_LCD_DRIVE_LINE_240, // Only works if the previous command is present (undocumented) + GC9A01_SET_POWER_CTL_2, 0, 1, 0x20, + GC9A01_SET_POWER_CTL_3, 0, 1, 0x20, GC9A01_SET_POWER_CTL_4, 0, 1, 0x22, - 0xBE, 0, 1, 0x11, - 0xE1, 0, 2, 0x10, 0x0E, - 0xDF, 0, 3, 0x21, 0x0C, 0x02, - GC9A01_SET_GAMMA1, 0, 6, 0x45, 0x09, 0x08, 0x08, 0x26, 0x2A, - GC9A01_SET_GAMMA2, 0, 6, 0x43, 0x70, 0x72, 0x36, 0x37, 0x6F, + GC9XXX_SET_GAMMA1, 0, 6, 0x45, 0x09, 0x08, 0x08, 0x26, 0x2A, + GC9XXX_SET_GAMMA2, 0, 6, 0x43, 0x70, 0x72, 0x36, 0x37, 0x6F, GC9A01_SET_GAMMA3, 0, 6, 0x45, 0x09, 0x08, 0x08, 0x26, 0x2A, GC9A01_SET_GAMMA4, 0, 6, 0x43, 0x70, 0x72, 0x36, 0x37, 0x6F, - 0xED, 0, 2, 0x1B, 0x0B, - 0xAE, 0, 1, 0x77, - 0xCD, 0, 1, 0x63, - 0x70, 0, 9, 0x07, 0x07, 0x04, 0x0E, 0x0F, 0x09, 0x07, 0x08, 0x03, - GC9A01_SET_FRAME_RATE, 0, 1, 0x34, - 0x62, 0, 12, 0x18, 0x0D, 0x71, 0xED, 0x70, 0x70, 0x18, 0x0F, 0x71, 0xEF, 0x70, 0x70, - 0x63, 0, 12, 0x18, 0x11, 0x71, 0xF1, 0x70, 0x70, 0x18, 0x13, 0x71, 0xF3, 0x70, 0x70, - 0x64, 0, 7, 0x28, 0x29, 0xF1, 0x01, 0xF1, 0x00, 0x07, 0x66, 0, 10, 0x3C, 0x00, 0xCD, 0x67, 0x45, 0x45, 0x10, 0x00, 0x00, 0x00, 0x67, 0, 10, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x01, 0x54, 0x10, 0x32, 0x98, - 0x74, 0, 7, 0x10, 0x85, 0x80, 0x00, 0x00, 0x4E, 0x00, - 0x98, 0, 2, 0x3E, 0x07, - GC9A01_CMD_TEARING_OFF, 0, 0, - GC9A01_CMD_INVERT_OFF, 0, 0, - GC9A01_CMD_SLEEP_OFF, 120, 0, - GC9A01_CMD_DISPLAY_ON, 20, 0 + GC9XXX_CMD_TEARING_ON, 0, 0, + GC9XXX_SET_PIXEL_FORMAT, 0, 1, GC9A01_PIXEL_FORMAT_16_BPP_DBI, + GC9XXX_CMD_INVERT_ON, 0, 0, + GC9XXX_CMD_SLEEP_OFF, 120, 0, + GC9XXX_CMD_DISPLAY_ON, 20, 0 }; // clang-format on - // clang-format on qp_comms_bulk_command_sequence(device, gc9a01_init_sequence, sizeof(gc9a01_init_sequence)); // Configure the rotation (i.e. the ordering and direction of memory writes in GRAM) const uint8_t madctl[] = { - [QP_ROTATION_0] = GC9A01_MADCTL_BGR, - [QP_ROTATION_90] = GC9A01_MADCTL_BGR | GC9A01_MADCTL_MX | GC9A01_MADCTL_MV, - [QP_ROTATION_180] = GC9A01_MADCTL_BGR | GC9A01_MADCTL_MX | GC9A01_MADCTL_MY, - [QP_ROTATION_270] = GC9A01_MADCTL_BGR | GC9A01_MADCTL_MV | GC9A01_MADCTL_MY, + [QP_ROTATION_0] = GC9XXX_MADCTL_BGR, + [QP_ROTATION_90] = GC9XXX_MADCTL_BGR | GC9XXX_MADCTL_MX | GC9XXX_MADCTL_MV, + [QP_ROTATION_180] = GC9XXX_MADCTL_BGR | GC9XXX_MADCTL_MX | GC9XXX_MADCTL_MY, + [QP_ROTATION_270] = GC9XXX_MADCTL_BGR | GC9XXX_MADCTL_MV | GC9XXX_MADCTL_MY, }; - qp_comms_command_databyte(device, GC9A01_SET_MEM_ACS_CTL, madctl[rotation]); + qp_comms_command_databyte(device, GC9XXX_SET_MEM_ACS_CTL, madctl[rotation]); return true; } @@ -110,11 +80,11 @@ const tft_panel_dc_reset_painter_driver_vtable_t gc9a01_driver_vtable = { .swap_window_coords = false, .opcodes = { - .display_on = GC9A01_CMD_DISPLAY_ON, - .display_off = GC9A01_CMD_DISPLAY_OFF, - .set_column_address = GC9A01_SET_COL_ADDR, - .set_row_address = GC9A01_SET_PAGE_ADDR, - .enable_writes = GC9A01_SET_MEM, + .display_on = GC9XXX_CMD_DISPLAY_ON, + .display_off = GC9XXX_CMD_DISPLAY_OFF, + .set_column_address = GC9XXX_SET_COL_ADDR, + .set_row_address = GC9XXX_SET_ROW_ADDR, + .enable_writes = GC9XXX_SET_MEM, }, }; diff --git a/drivers/painter/gc9a01/qp_gc9a01.h b/drivers/painter/gc9xxx/qp_gc9a01.h index 31a3804b50..31a3804b50 100644 --- a/drivers/painter/gc9a01/qp_gc9a01.h +++ b/drivers/painter/gc9xxx/qp_gc9a01.h diff --git a/drivers/painter/gc9xxx/qp_gc9a01_opcodes.h b/drivers/painter/gc9xxx/qp_gc9a01_opcodes.h new file mode 100644 index 0000000000..5853902e68 --- /dev/null +++ b/drivers/painter/gc9xxx/qp_gc9a01_opcodes.h @@ -0,0 +1,104 @@ +// Copyright 2021 Paul Cotter (@gr1mr3aver) +// Copyright 2024 Fernando Birra +// SPDX-License-Identifier: GPL-2.0-or-later +#pragma once + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// Quantum Painter GC9A01 command opcodes +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +#define GC9A01_SET_MEM_CONT 0x3C // Set memory continue +#define GC9A01_SET_BRIGHTNESS 0x51 // Set brightness +#define GC9A01_SET_DISPLAY_CTL 0x53 // Set display ctl + +#define GC9A01_SET_RGB_IF_SIG_CTL 0xB0 // RGB IF signal ctl +#define GC9A01_SET_BLANKING_PORCH_CTL 0xB5 // Set blanking porch ctl +#define GC9A01_SET_FUNCTION_CTL 0xB6 // Set function ctl +#define GC9A01_SET_TEARING_EFFECT 0xBA // Set tering effect control +#define GC9A01_SET_POWER_CTL_7 0xA7 // Set power ctl 7 +#define GC9A01_SET_POWER_CTL_1 0xC1 // Set power ctl 1 +#define GC9A01_SET_POWER_CTL_2 0xC3 // Set power ctl 2 +#define GC9A01_SET_POWER_CTL_3 0xC4 // Set power ctl 3 +#define GC9A01_SET_POWER_CTL_4 0xC9 // Set power ctl 4 +#define GC9A01_SET_FRAME_RATE 0xE8 // Set frame rate +#define GC9A01_SET_SPI_2DATA 0xE9 // Set frame rate +#define GC9A01_SET_GAMMA3 0xF2 // Set gamma 3 +#define GC9A01_SET_GAMMA4 0xF3 // Set gamma 4 +#define GC9A01_SET_IF_CTL 0xF6 // Set interface control + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// GC9A01 MADCTL Flags +#define GC9A01_MADCTL_MH 0b00000100 + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// GC9A01 Parameter constants + +// Parameter values for +// GC9A01_SET_PIXEL_FORMAT +#define GC9A01_PIXEL_FORMAT_12_BPP_DBI (0b011 << 0) // 12 bits/pixel MCU interface format +#define GC9A01_PIXEL_FORMAT_16_BPP_DBI (0b101 << 0) // 16 bits/pixel MCU interface format +#define GC9A01_PIXEL_FORMAT_18_BPP_DBI (0b110 << 0) // 18 bits/pixel MCU interface format +#define GC9A01_PIXEL_FORMAT_16_BPP_DPI (0b101 << 4) // 16 bits/pixel RGB interface format +#define GC9A01_PIXEL_FORMAT_18_BPP_DPI (0b110 << 4) // 18 bits/pixel RGB interface format + +// Parameter values for +// GC9A01_SET_FUNCTION_CTL (2nd parameter) +#define GC9A01_SOURCE_OUTPUT_SCAN_DIRECTION_S1_TO_S360 0b00000000 +#define GC9A01_SOURCE_OUTPUT_SCAN_DIRECTION_S360_TO_S1 0b00100000 +#define GC9A01_GATE_OUTPUT_SCAN_DIRECTION_G1_TO_G32 0b00000000 +#define GC9A01_GATE_OUTPUT_SCAN_DIRECTION_G32_TO_G1 0b01000000 +#define GC9A01_SCAN_MODE_INTER 0x10 + +// Parameter values for +// GC9A01_SET_FUNCTION_CTL (3rd parameter) +#define GC9A01_LCD_DRIVE_LINE_16 0x01 +#define GC9A01_LCD_DRIVE_LINE_24 0x02 +#define GC9A01_LCD_DRIVE_LINE_32 0x03 +#define GC9A01_LCD_DRIVE_LINE_40 0x04 +#define GC9A01_LCD_DRIVE_LINE_48 0x05 +#define GC9A01_LCD_DRIVE_LINE_56 0x06 +#define GC9A01_LCD_DRIVE_LINE_64 0x07 +#define GC9A01_LCD_DRIVE_LINE_72 0x08 +#define GC9A01_LCD_DRIVE_LINE_80 0x09 +#define GC9A01_LCD_DRIVE_LINE_88 0x0A +#define GC9A01_LCD_DRIVE_LINE_96 0x0B +#define GC9A01_LCD_DRIVE_LINE_104 0x0C +#define GC9A01_LCD_DRIVE_LINE_112 0x0D +#define GC9A01_LCD_DRIVE_LINE_120 0x0E +#define GC9A01_LCD_DRIVE_LINE_128 0x0F +#define GC9A01_LCD_DRIVE_LINE_136 0x10 +#define GC9A01_LCD_DRIVE_LINE_144 0x11 +#define GC9A01_LCD_DRIVE_LINE_152 0x12 +#define GC9A01_LCD_DRIVE_LINE_160 0x13 +#define GC9A01_LCD_DRIVE_LINE_168 0x14 +#define GC9A01_LCD_DRIVE_LINE_176 0x15 +#define GC9A01_LCD_DRIVE_LINE_184 0x16 +#define GC9A01_LCD_DRIVE_LINE_192 0x17 +#define GC9A01_LCD_DRIVE_LINE_200 0x18 +#define GC9A01_LCD_DRIVE_LINE_208 0x19 +#define GC9A01_LCD_DRIVE_LINE_216 0x1A +#define GC9A01_LCD_DRIVE_LINE_224 0x1B +#define GC9A01_LCD_DRIVE_LINE_232 0x1C +#define GC9A01_LCD_DRIVE_LINE_240 0x1D + +// Parameter values for +// GC9A01_SET_DISPLAY_CTL +#define GC9A01_BRIGHTNESS_CONTROL_ON 0b00100000 +#define GC9A01_DIMMING_ON 0b00001000 +#define GC9A01_BACKLIGHT_ON 0b00000100 +#define GC9A01_BRIGHTNESS_CONTROL_OFF 0b00000000 +#define GC9A01_DIMMING_OFF 0b00000000 +#define GC9A01_BACKLIGHT_OFF 0b00000000 + +// Parameter values for +// GC9A01_SET_IF_CTL +#define GC9A01_DISPLAY_MODE_INTERNAL_CLOCK 0b00000000 +#define GC9A01_DISPLAY_MODE_RGB_INTERFACE 0b00000100 +#define GC9A01_DISPLAY_MODE_VSYNC_INTERFACE 0b00001000 +#define GC9A01_DSISPLAY_MODE_DISABLED 0b00001100 + +#define GC0A01_GRAM_INTERFACE_VSYNC 0b00000000 +#define GC9A01_GRAM_INTERFACE_RGB 0b00000010 + +#define GC9A01_RGB_INTERFACE_MODE_1_TRANSFER 0b00000000 +#define GC9A01_RGB_INTERFACE_MODE_3_TRANSFER 0b00000001
\ No newline at end of file diff --git a/drivers/painter/gc9xxx/qp_gc9xxx_opcodes.h b/drivers/painter/gc9xxx/qp_gc9xxx_opcodes.h new file mode 100644 index 0000000000..7e0fbf9110 --- /dev/null +++ b/drivers/painter/gc9xxx/qp_gc9xxx_opcodes.h @@ -0,0 +1,55 @@ +// Copyright 2021 Paul Cotter (@gr1mr3aver) +// Copyright 2024 Fernando Birra +// SPDX-License-Identifier: GPL-2.0-or-later +#pragma once + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// Quantum Painter GC9xxx command opcodes +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +#define GC9XXX_GET_ID_INFO 0x04 // Get ID information +#define GC9XXX_GET_STATUS 0x09 // Get status + +#define GC9XXX_CMD_SLEEP_ON 0x10 // Enter sleep mode +#define GC9XXX_CMD_SLEEP_OFF 0x11 // Exit sleep mode +#define GC9XXX_CMD_PARTIAL_ON 0x12 // Enter partial mode +#define GC9XXX_CMD_PARTIAL_OFF 0x13 // Exit partial mode + +#define GC9XXX_CMD_INVERT_OFF 0x20 // Exit inverted mode +#define GC9XXX_CMD_INVERT_ON 0x21 // Enter inverted mode +#define GC9XXX_CMD_DISPLAY_OFF 0x28 // Disable display +#define GC9XXX_CMD_DISPLAY_ON 0x29 // Enable display +#define GC9XXX_SET_COL_ADDR 0x2A // Set column address (MSB(StartCol),LSB(StartCol),MSB(EndCol),LSB(EndCol) +#define GC9XXX_SET_ROW_ADDR 0x2B // Set row address (MSB(StartRow),LSB(StartRow),MSB(EndRow),LSB(EndRow) +#define GC9XXX_SET_MEM 0x2C // Set (write) memory + +#define GC9XXX_SET_PARTIAL_AREA 0x30 // Set partial area (MSB(StartRow),LSB(StartRow),MSB(EndRow),LSB(EndRow) +#define GC9XXX_SET_VSCROLL 0x33 // Set vertical scroll MSB(TFA),LSB(TFA),MSB(VSA),LSB(VSA)+ GC9107 extra param: MSB(BFA),LSB(BFA) +#define GC9XXX_CMD_TEARING_OFF 0x34 // Tearing effect line OFF +#define GC9XXX_CMD_TEARING_ON 0x35 // Tearing effect line ON +#define GC9XXX_SET_MEM_ACS_CTL 0x36 // Set mem access ctl +#define GC9XXX_SET_VSCROLL_ADDR 0x37 // Set vscroll start addr +#define GC9XXX_CMD_IDLE_OFF 0x38 // Exit idle mode +#define GC9XXX_CMD_IDLE_ON 0x39 // Enter idle mode +#define GC9XXX_SET_PIXEL_FORMAT 0x3A // Set pixel format +#define GC9XXX_SET_TEAR_SCANLINE 0x44 // Set tearing scanline (Scanline = LS bit of Param 1 (GC9A01) + Param 2(GC9XXX)) +#define GC9XXX_GET_TEAR_SCANLINE 0x45 // Get tearing scanline (Scanline = LS bit of Param 1 (GC9A01) + Param 2(GC9XXX)) +#define GC9XXX_GET_ID1 0xDA // Get ID1 +#define GC9XXX_GET_ID2 0xDB // Get ID2 +#define GC9XXX_GET_ID3 0xDC // Get ID3 +#define GC9XXX_SET_INTER_REG_ENABLE1 0xFE // Enable Inter Register 1 +#define GC9XXX_SET_INTER_REG_ENABLE2 0xEF // Enable Inter Register 2 +#define GC9XXX_SET_GAMMA1 0xF0 // Set gamma 1 +#define GC9XXX_SET_GAMMA2 0xF1 // Set gamma 2 + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// MADCTL Flags +#define GC9XXX_MADCTL_MY 0b10000000 // Mirror Y (row address order) +#define GC9XXX_MADCTL_MX 0b01000000 // Mirror X (column address order) +#define GC9XXX_MADCTL_MV 0b00100000 // Vertical Refresh Order (bottom to top) +#define GC9XXX_MADCTL_ML 0b00010000 +#define GC9XXX_MADCTL_BGR 0b00001000 +#define GC9XXX_MADCTL_RGB 0b00000000 + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// GC9XXX Parameter constants diff --git a/drivers/sensors/adns9800.c b/drivers/sensors/adns9800.c index f34529ee90..0ba26a365a 100644 --- a/drivers/sensors/adns9800.c +++ b/drivers/sensors/adns9800.c @@ -115,6 +115,7 @@ void adns9800_init(void) { adns9800_read(REG_Delta_Y_L); adns9800_read(REG_Delta_Y_H); +#ifdef ADNS9800_UPLOAD_SROM // upload firmware // 3k firmware mode @@ -145,6 +146,16 @@ void adns9800_init(void) { spi_stop(); wait_ms(10); +#else + // write reset value to REG_Configuration_IV + adns9800_write(REG_Configuration_IV, 0x0); + + // write reset value to REG_SROM_Enable + adns9800_write(REG_SROM_Enable, 0x0); + + // wait a frame + wait_ms(10); +#endif // enable laser uint8_t laser_ctrl0 = adns9800_read(REG_LASER_CTRL0); diff --git a/drivers/sensors/cirque_pinnacle_gestures.h b/drivers/sensors/cirque_pinnacle_gestures.h index d2aa206b2b..1412c86f7e 100644 --- a/drivers/sensors/cirque_pinnacle_gestures.h +++ b/drivers/sensors/cirque_pinnacle_gestures.h @@ -28,7 +28,7 @@ typedef struct { # ifndef CIRQUE_PINNACLE_TAPPING_TERM # include "action.h" # include "action_tapping.h" -# define CIRQUE_PINNACLE_TAPPING_TERM GET_TAPPING_TERM(KC_BTN1, &(keyrecord_t){}) +# define CIRQUE_PINNACLE_TAPPING_TERM GET_TAPPING_TERM(QK_MOUSE_BUTTON_1, &(keyrecord_t){}) # endif # ifndef CIRQUE_PINNACLE_TOUCH_DEBOUNCE # define CIRQUE_PINNACLE_TOUCH_DEBOUNCE (CIRQUE_PINNACLE_TAPPING_TERM * 8) diff --git a/drivers/sensors/pmw33xx_common.c b/drivers/sensors/pmw33xx_common.c index 82a7ec3297..f1f2d0e865 100644 --- a/drivers/sensors/pmw33xx_common.c +++ b/drivers/sensors/pmw33xx_common.c @@ -154,10 +154,12 @@ bool pmw33xx_init(uint8_t sensor) { pmw33xx_read(sensor, REG_Delta_Y_L); pmw33xx_read(sensor, REG_Delta_Y_H); +#ifdef PMW33XX_UPLOAD_SROM if (!pmw33xx_upload_firmware(sensor)) { pd_dprintf("PMW33XX (%d): firmware upload failed!\n", sensor); return false; } +#endif spi_stop(); @@ -200,7 +202,7 @@ pmw33xx_report_t pmw33xx_read_burst(uint8_t sensor) { spi_write(REG_Motion_Burst); wait_us(35); // waits for tSRAD_MOTBR - spi_receive((uint8_t*)&report, sizeof(report)); + spi_receive((uint8_t *)&report, sizeof(report)); // panic recovery, sometimes burst mode works weird. if (report.motion.w & 0b111) { diff --git a/drivers/wear_leveling/wear_leveling_flash_spi.c b/drivers/wear_leveling/wear_leveling_flash_spi.c index 6191f8bf09..304aed1641 100644 --- a/drivers/wear_leveling/wear_leveling_flash_spi.c +++ b/drivers/wear_leveling/wear_leveling_flash_spi.c @@ -58,7 +58,7 @@ bool backing_store_read(uint32_t address, backing_store_int_t *value) { bool backing_store_read_bulk(uint32_t address, backing_store_int_t *values, size_t item_count) { bs_dprintf("Read "); uint32_t offset = (WEAR_LEVELING_EXTERNAL_FLASH_BLOCK_OFFSET) * (EXTERNAL_FLASH_BLOCK_SIZE) + address; - flash_status_t status = flash_read_block(offset, values, sizeof(backing_store_int_t) * item_count); + flash_status_t status = flash_read_range(offset, values, sizeof(backing_store_int_t) * item_count); if (status == FLASH_STATUS_SUCCESS) { for (size_t i = 0; i < item_count; ++i) { values[i] = ~values[i]; @@ -88,7 +88,7 @@ bool backing_store_write_bulk(uint32_t address, backing_store_int_t *values, siz } // Write out the block - if (flash_write_block(offset, temp, sizeof(backing_store_int_t) * this_loop) != FLASH_STATUS_SUCCESS) { + if (flash_write_range(offset, temp, sizeof(backing_store_int_t) * this_loop) != FLASH_STATUS_SUCCESS) { return false; } diff --git a/keyboards/0xcb/1337/1337.c b/keyboards/0xcb/1337/1337.c deleted file mode 100644 index d5937540b2..0000000000 --- a/keyboards/0xcb/1337/1337.c +++ /dev/null @@ -1,27 +0,0 @@ -/* -Copyright 2021 0xCB - Conor Burns - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ -#include "quantum.h" - -void eeconfig_init_kb(void) { -#ifdef BACKLIGHT_ENABLE - backlight_enable(); - backlight_level(5); -#endif - - eeconfig_update_kb(0); - eeconfig_init_user(); -} diff --git a/keyboards/0xcb/1337/keyboard.json b/keyboards/0xcb/1337/keyboard.json index f264d4ed06..b2ef00906b 100644 --- a/keyboards/0xcb/1337/keyboard.json +++ b/keyboards/0xcb/1337/keyboard.json @@ -9,6 +9,9 @@ "device_version": "0.0.1" }, "backlight": { + "default": { + "brightness": 5 + }, "pin": "B5", "levels": 7, "breathing": true diff --git a/keyboards/1upkeyboards/1upslider8/1upslider8.c b/keyboards/1upkeyboards/1upslider8/1upslider8.c index e6d6698ee9..2d69c64c0a 100644 --- a/keyboards/1upkeyboards/1upslider8/1upslider8.c +++ b/keyboards/1upkeyboards/1upslider8/1upslider8.c @@ -33,7 +33,6 @@ void slider(void) { void housekeeping_task_kb(void) { slider(); - housekeeping_task_user(); } static uint32_t oled_logo_timer = 0; diff --git a/keyboards/25keys/zinc/rev1/config.h b/keyboards/25keys/zinc/rev1/config.h index 27755e64c6..8d7fd3e26b 100644 --- a/keyboards/25keys/zinc/rev1/config.h +++ b/keyboards/25keys/zinc/rev1/config.h @@ -19,11 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define QUICK_TAP_TERM 0 -/* Select hand configuration */ -#define MASTER_LEFT -//#define MASTER_RIGHT -//#define EE_HANDS - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/25keys/zinc/rev1/keyboard.json b/keyboards/25keys/zinc/rev1/keyboard.json index c1bead2d8a..fd11273c18 100644 --- a/keyboards/25keys/zinc/rev1/keyboard.json +++ b/keyboards/25keys/zinc/rev1/keyboard.json @@ -22,7 +22,9 @@ }, "split": { "enabled": true, - "soft_serial_pin": "D2" + "serial": { + "pin": "D2" + } }, "tapping": { "term": 100 diff --git a/keyboards/25keys/zinc/reva/config.h b/keyboards/25keys/zinc/reva/config.h index 27755e64c6..8d7fd3e26b 100644 --- a/keyboards/25keys/zinc/reva/config.h +++ b/keyboards/25keys/zinc/reva/config.h @@ -19,11 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define QUICK_TAP_TERM 0 -/* Select hand configuration */ -#define MASTER_LEFT -//#define MASTER_RIGHT -//#define EE_HANDS - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/25keys/zinc/reva/keyboard.json b/keyboards/25keys/zinc/reva/keyboard.json index 01d2291c49..dedc8f22f8 100644 --- a/keyboards/25keys/zinc/reva/keyboard.json +++ b/keyboards/25keys/zinc/reva/keyboard.json @@ -22,7 +22,9 @@ }, "split": { "enabled": true, - "soft_serial_pin": "D2" + "serial": { + "pin": "D2" + } }, "tapping": { "term": 100 diff --git a/keyboards/40percentclub/25/config.h b/keyboards/40percentclub/25/config.h deleted file mode 100644 index 1710ba42ee..0000000000 --- a/keyboards/40percentclub/25/config.h +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright 2018 - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -#pragma once - -/* Select hand configuration */ -#define MASTER_LEFT -//#define MASTER_RIGHT -//#define EE_HANDS - -/* - * 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 diff --git a/keyboards/40percentclub/25/keyboard.json b/keyboards/40percentclub/25/keyboard.json index aede80ef17..e23d0578c3 100644 --- a/keyboards/40percentclub/25/keyboard.json +++ b/keyboards/40percentclub/25/keyboard.json @@ -28,7 +28,9 @@ }, "split": { "enabled": true, - "soft_serial_pin": "D0" + "serial": { + "pin": "D0" + } }, "processor": "atmega32u4", "bootloader": "caterina", diff --git a/keyboards/40percentclub/6lit/config.h b/keyboards/40percentclub/6lit/config.h deleted file mode 100644 index 1710ba42ee..0000000000 --- a/keyboards/40percentclub/6lit/config.h +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright 2018 - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -#pragma once - -/* Select hand configuration */ -#define MASTER_LEFT -//#define MASTER_RIGHT -//#define EE_HANDS - -/* - * 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 diff --git a/keyboards/40percentclub/6lit/keyboard.json b/keyboards/40percentclub/6lit/keyboard.json index 06ffc890d2..52a8914d7d 100644 --- a/keyboards/40percentclub/6lit/keyboard.json +++ b/keyboards/40percentclub/6lit/keyboard.json @@ -28,7 +28,9 @@ }, "split": { "enabled": true, - "soft_serial_pin": "D0" + "serial": { + "pin": "D0" + } }, "processor": "atmega32u4", "bootloader": "caterina", diff --git a/keyboards/40percentclub/foobar/config.h b/keyboards/40percentclub/foobar/config.h deleted file mode 100644 index 1710ba42ee..0000000000 --- a/keyboards/40percentclub/foobar/config.h +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright 2018 - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -#pragma once - -/* Select hand configuration */ -#define MASTER_LEFT -//#define MASTER_RIGHT -//#define EE_HANDS - -/* - * 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 diff --git a/keyboards/40percentclub/foobar/keyboard.json b/keyboards/40percentclub/foobar/keyboard.json index 0a2769e04a..ec568b2382 100644 --- a/keyboards/40percentclub/foobar/keyboard.json +++ b/keyboards/40percentclub/foobar/keyboard.json @@ -28,7 +28,9 @@ }, "split": { "enabled": true, - "soft_serial_pin": "D0" + "serial": { + "pin": "D0" + } }, "processor": "atmega32u4", "bootloader": "caterina", diff --git a/keyboards/40percentclub/half_n_half/keyboard.json b/keyboards/40percentclub/half_n_half/keyboard.json index 3e0c646a50..4f18d235b2 100644 --- a/keyboards/40percentclub/half_n_half/keyboard.json +++ b/keyboards/40percentclub/half_n_half/keyboard.json @@ -28,7 +28,9 @@ }, "split": { "enabled": true, - "soft_serial_pin": "D0" + "serial": { + "pin": "D0" + } }, "processor": "atmega32u4", "bootloader": "caterina", diff --git a/keyboards/40percentclub/ut47/ut47.c b/keyboards/40percentclub/ut47/ut47.c index d5675e1047..867d8c0202 100644 --- a/keyboards/40percentclub/ut47/ut47.c +++ b/keyboards/40percentclub/ut47/ut47.c @@ -19,6 +19,8 @@ void matrix_init_kb(void) { uart_init(9600); + + matrix_init_user(); } #endif diff --git a/keyboards/a_dux/keyboard.json b/keyboards/a_dux/keyboard.json index c4089fb035..97c8610155 100644 --- a/keyboards/a_dux/keyboard.json +++ b/keyboards/a_dux/keyboard.json @@ -25,7 +25,6 @@ }, "split": { "enabled": true, - "soft_serial_pin": "D1", "bootmagic": { "matrix": [4, 4] }, @@ -38,6 +37,9 @@ ["B5", "B4", null, null, null] ] } + }, + "serial": { + "pin": "D1" } }, "community_layouts": ["split_3x5_2"], diff --git a/keyboards/acheron/athena/alpha/alpha.c b/keyboards/acheron/athena/alpha/alpha.c index 8fe47eff82..4dea24b93d 100644 --- a/keyboards/acheron/athena/alpha/alpha.c +++ b/keyboards/acheron/athena/alpha/alpha.c @@ -24,6 +24,8 @@ void board_init(void) { void keyboard_post_init_kb(void){ // Defining the backlight pin (A6) as an floating (no pullup or pulldown resistor) opendrain output pin palSetLineMode(BACKLIGHT_PIN, PAL_MODE_ALTERNATE(2) | PAL_STM32_OTYPE_OPENDRAIN | PAL_STM32_OSPEED_HIGHEST | PAL_STM32_PUPDR_FLOATING); + + keyboard_post_init_user(); } void led_init_ports(void) { diff --git a/keyboards/acheron/austin/austin.c b/keyboards/acheron/austin/austin.c deleted file mode 100644 index 9a69d1c086..0000000000 --- a/keyboards/acheron/austin/austin.c +++ /dev/null @@ -1,18 +0,0 @@ -#include "quantum.h" - -void keyboard_pre_init_kb(void) { - gpio_set_pin_output(A0); - gpio_set_pin_output(A1); - gpio_set_pin_output(A2); - - keyboard_pre_init_user(); -} - -bool led_update_kb(led_t led_state) { - if (led_update_user(led_state)) { - gpio_write_pin(A2, led_state.num_lock); - gpio_write_pin(A0, led_state.caps_lock); - gpio_write_pin(A1, led_state.scroll_lock); - } - return true; -} diff --git a/keyboards/acheron/austin/keyboard.json b/keyboards/acheron/austin/keyboard.json index bee675472c..a3df5dd75d 100755 --- a/keyboards/acheron/austin/keyboard.json +++ b/keyboards/acheron/austin/keyboard.json @@ -33,6 +33,11 @@ "levels": 6, "breathing": true }, + "indicators": { + "caps_lock": "A0", + "num_lock": "A2", + "scroll_lock": "A1" + }, "processor": "STM32F072", "bootloader": "stm32-dfu", "layouts": { diff --git a/keyboards/acheron/elongate/delta/delta.c b/keyboards/acheron/elongate/delta/delta.c index 98b60bae61..839151521a 100755 --- a/keyboards/acheron/elongate/delta/delta.c +++ b/keyboards/acheron/elongate/delta/delta.c @@ -74,4 +74,6 @@ layer_state_t layer_state_set_kb(layer_state_t state) { // Since the keyboard starts at layer 0, the init function starts LED4 as lit up. void keyboard_post_init_kb(void){ gpio_write_pin(LED4_PIN, 0); + + keyboard_post_init_user(); } diff --git a/keyboards/adkb96/keymaps/default/config.h b/keyboards/adkb96/keymaps/default/config.h index 3f8d841423..a1c18568be 100644 --- a/keyboards/adkb96/keymaps/default/config.h +++ b/keyboards/adkb96/keymaps/default/config.h @@ -20,13 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once - //#define USE_I2C -/* Select hand configuration */ - -#define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS - #define FORCE_NKRO diff --git a/keyboards/adkb96/rev1/keyboard.json b/keyboards/adkb96/rev1/keyboard.json index 77f9177555..7cf92f1516 100644 --- a/keyboards/adkb96/rev1/keyboard.json +++ b/keyboards/adkb96/rev1/keyboard.json @@ -28,7 +28,9 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D0" + "serial": { + "pin": "D0" + } }, "tapping": { "term": 100 diff --git a/keyboards/aeboards/ext65/rev1/keyboard.json b/keyboards/aeboards/ext65/rev1/keyboard.json index c254a67142..1d105505e5 100644 --- a/keyboards/aeboards/ext65/rev1/keyboard.json +++ b/keyboards/aeboards/ext65/rev1/keyboard.json @@ -13,6 +13,11 @@ "extrakey": true, "nkro": true }, + "indicators": { + "caps_lock": "D3", + "num_lock": "D5", + "scroll_lock": "D2" + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "diode_direction": "COL2ROW", diff --git a/keyboards/aeboards/ext65/rev1/rev1.c b/keyboards/aeboards/ext65/rev1/rev1.c index 344a2bcb32..fc8280a5e4 100644 --- a/keyboards/aeboards/ext65/rev1/rev1.c +++ b/keyboards/aeboards/ext65/rev1/rev1.c @@ -16,23 +16,10 @@ #include "quantum.h" -void keyboard_pre_init_user(void) { - // Call the keyboard pre init code. - // Set our LED pins as output - gpio_set_pin_output(D5); - gpio_set_pin_output(D3); - gpio_set_pin_output(D2); - gpio_set_pin_output(D1); -} +void keyboard_pre_init_kb(void) { + gpio_set_pin_output(D1); -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if(res) { - gpio_write_pin(D5, led_state.num_lock); - gpio_write_pin(D3, led_state.caps_lock); - gpio_write_pin(D2, led_state.scroll_lock); - } - return res; + keyboard_pre_init_user(); } layer_state_t layer_state_set_kb(layer_state_t state) { diff --git a/keyboards/aeboards/ext65/rev2/keyboard.json b/keyboards/aeboards/ext65/rev2/keyboard.json index 0ab50f9258..ab7cceeefb 100644 --- a/keyboards/aeboards/ext65/rev2/keyboard.json +++ b/keyboards/aeboards/ext65/rev2/keyboard.json @@ -22,6 +22,11 @@ "levels": 6, "breathing": true }, + "indicators": { + "caps_lock": "B3", + "num_lock": "B4", + "scroll_lock": "A15" + }, "rgblight": { "led_count": 24, "animations": { diff --git a/keyboards/aeboards/ext65/rev2/rev2.c b/keyboards/aeboards/ext65/rev2/rev2.c index 5922b601cd..7b8ebb0087 100644 --- a/keyboards/aeboards/ext65/rev2/rev2.c +++ b/keyboards/aeboards/ext65/rev2/rev2.c @@ -69,26 +69,11 @@ bool oled_task_kb(void) { #else void keyboard_pre_init_kb(void) { - // Call the keyboard pre init code. - // Set our LED pins as output - gpio_set_pin_output(B4); - gpio_set_pin_output(B3); - gpio_set_pin_output(A15); gpio_set_pin_output(A14); keyboard_pre_init_user(); } -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if (res) { - gpio_write_pin(B4, led_state.num_lock); - gpio_write_pin(B3, led_state.caps_lock); - gpio_write_pin(A15, led_state.scroll_lock); - } - return res; -} - layer_state_t layer_state_set_kb(layer_state_t state) { switch (get_highest_layer(state)) { case 1: diff --git a/keyboards/aeboards/ext65/rev3/rev3.c b/keyboards/aeboards/ext65/rev3/rev3.c index f8fc2ef502..7b0f2018c2 100644 --- a/keyboards/aeboards/ext65/rev3/rev3.c +++ b/keyboards/aeboards/ext65/rev3/rev3.c @@ -19,10 +19,12 @@ // Tested and verified working on EXT65 Rev3 void matrix_io_delay(void) { __asm__ volatile("nop\nnop\nnop\n"); } -void keyboard_pre_init_user(void) { +void keyboard_pre_init_kb(void) { // Call the keyboard pre init code. // Set our LED pins as output gpio_set_pin_output(LED_LAYERS_PIN); + + keyboard_pre_init_user(); } layer_state_t layer_state_set_kb(layer_state_t state) { diff --git a/keyboards/afternoonlabs/breeze/rev0/keyboard.json b/keyboards/afternoonlabs/breeze/rev0/keyboard.json index f20f082ec9..6ff73b1c15 100644 --- a/keyboards/afternoonlabs/breeze/rev0/keyboard.json +++ b/keyboards/afternoonlabs/breeze/rev0/keyboard.json @@ -21,7 +21,12 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D2" + "handedness": { + "pin": "B3" + }, + "serial": { + "pin": "D2" + } }, "bootmagic": { "matrix": [0, 5] diff --git a/keyboards/afternoonlabs/breeze/rev1/keyboard.json b/keyboards/afternoonlabs/breeze/rev1/keyboard.json index ccb13551c1..a0a0395add 100644 --- a/keyboards/afternoonlabs/breeze/rev1/keyboard.json +++ b/keyboards/afternoonlabs/breeze/rev1/keyboard.json @@ -21,7 +21,12 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D2" + "handedness": { + "pin": "B3" + }, + "serial": { + "pin": "D2" + } }, "bootmagic": { "matrix": [0, 5] diff --git a/keyboards/afternoonlabs/oceanbreeze/rev1/keyboard.json b/keyboards/afternoonlabs/oceanbreeze/rev1/keyboard.json index 2a80a0bc2b..e70eb1169e 100644 --- a/keyboards/afternoonlabs/oceanbreeze/rev1/keyboard.json +++ b/keyboards/afternoonlabs/oceanbreeze/rev1/keyboard.json @@ -21,7 +21,12 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D2" + "handedness": { + "pin": "B3" + }, + "serial": { + "pin": "D2" + } }, "bootmagic": { "matrix": [0, 5] diff --git a/keyboards/afternoonlabs/southern_breeze/rev1/keyboard.json b/keyboards/afternoonlabs/southern_breeze/rev1/keyboard.json index c4d38a7a69..8de6b42470 100644 --- a/keyboards/afternoonlabs/southern_breeze/rev1/keyboard.json +++ b/keyboards/afternoonlabs/southern_breeze/rev1/keyboard.json @@ -21,7 +21,12 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D2" + "handedness": { + "pin": "B3" + }, + "serial": { + "pin": "D2" + } }, "bootmagic": { "matrix": [0, 5] diff --git a/keyboards/afternoonlabs/summer_breeze/rev1/config.h b/keyboards/afternoonlabs/summer_breeze/rev1/config.h deleted file mode 100644 index d6bb6df14c..0000000000 --- a/keyboards/afternoonlabs/summer_breeze/rev1/config.h +++ /dev/null @@ -1,19 +0,0 @@ -/* Copyright 2021 Afternoon Labs - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -#pragma once - -#define SPLIT_HAND_PIN B3 diff --git a/keyboards/afternoonlabs/summer_breeze/rev1/keyboard.json b/keyboards/afternoonlabs/summer_breeze/rev1/keyboard.json index 702a942a3c..f2285fb17b 100644 --- a/keyboards/afternoonlabs/summer_breeze/rev1/keyboard.json +++ b/keyboards/afternoonlabs/summer_breeze/rev1/keyboard.json @@ -21,7 +21,12 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D2" + "handedness": { + "pin": "B3" + }, + "serial": { + "pin": "D2" + } }, "bootmagic": { "matrix": [0, 5] diff --git a/keyboards/ai03/altair/keyboard.json b/keyboards/ai03/altair/keyboard.json index 9626716cde..a8cd8b02a7 100644 --- a/keyboards/ai03/altair/keyboard.json +++ b/keyboards/ai03/altair/keyboard.json @@ -37,7 +37,10 @@ "rows": ["GP5", "GP16", "GP20", "GP28", "GP14"] } }, - "soft_serial_pin": "GP29" + "serial": { + "driver": "vendor", + "pin": "GP29" + } }, "url": "https://ai03.com/", "usb": { diff --git a/keyboards/ai03/altair/rules.mk b/keyboards/ai03/altair/rules.mk deleted file mode 100644 index 161ec22b16..0000000000 --- a/keyboards/ai03/altair/rules.mk +++ /dev/null @@ -1 +0,0 @@ -SERIAL_DRIVER = vendor diff --git a/keyboards/ai03/altair_x/keyboard.json b/keyboards/ai03/altair_x/keyboard.json index d1448ab8c2..27f36af97b 100644 --- a/keyboards/ai03/altair_x/keyboard.json +++ b/keyboards/ai03/altair_x/keyboard.json @@ -37,7 +37,10 @@ "rows": ["GP16", "GP20", "GP28", "GP14"] } }, - "soft_serial_pin": "GP29" + "serial": { + "driver": "vendor", + "pin": "GP29" + } }, "url": "https://ai03.com/", "usb": { diff --git a/keyboards/ai03/altair_x/rules.mk b/keyboards/ai03/altair_x/rules.mk deleted file mode 100644 index 161ec22b16..0000000000 --- a/keyboards/ai03/altair_x/rules.mk +++ /dev/null @@ -1 +0,0 @@ -SERIAL_DRIVER = vendor diff --git a/keyboards/ai03/orbit/config.h b/keyboards/ai03/orbit/config.h deleted file mode 100644 index f3a4ae2db3..0000000000 --- a/keyboards/ai03/orbit/config.h +++ /dev/null @@ -1,38 +0,0 @@ -/* -Copyright 2018 Ryota Goto - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#pragma once - -#define SELECT_SOFT_SERIAL_SPEED 1 - -#define SPLIT_HAND_PIN D5 - -/* - * 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 diff --git a/keyboards/ai03/orbit/keyboard.json b/keyboards/ai03/orbit/keyboard.json index ec30802812..f13c95291d 100644 --- a/keyboards/ai03/orbit/keyboard.json +++ b/keyboards/ai03/orbit/keyboard.json @@ -31,13 +31,18 @@ }, "split": { "enabled": true, - "soft_serial_pin": "D0", + "handedness": { + "pin": "D5" + }, "matrix_pins": { "right": { "cols": ["D4", "D6", "F1", "F0", "F4", "F5", "C6"], "rows": ["B6", "B5", "B4", "D7", "E6"] } }, + "serial" :{ + "pin": "D0" + }, "transport":{ "sync" :{ "indicators": true, diff --git a/keyboards/ai03/orbit_x/config.h b/keyboards/ai03/orbit_x/config.h index 2c63852cbe..8de0482312 100644 --- a/keyboards/ai03/orbit_x/config.h +++ b/keyboards/ai03/orbit_x/config.h @@ -17,7 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -#define SPLIT_HAND_PIN D5 #define SPLIT_USB_DETECT #define SPLIT_USB_TIMEOUT 2500 diff --git a/keyboards/ai03/orbit_x/keyboard.json b/keyboards/ai03/orbit_x/keyboard.json index edfbbb2796..d039969b37 100644 --- a/keyboards/ai03/orbit_x/keyboard.json +++ b/keyboards/ai03/orbit_x/keyboard.json @@ -28,12 +28,17 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D0", + "handedness": { + "pin": "D5" + }, "matrix_pins": { "right": { "cols": ["D6", "B6", "B1", "B0", "B3", "B2"], "rows": ["B5", "D7", "B4", "D4"] } + }, + "serial": { + "pin": "D0" } }, "processor": "atmega32u4", diff --git a/keyboards/ai03/vega/keyboard.json b/keyboards/ai03/vega/keyboard.json index a58fa4fcae..bc220cc7a1 100644 --- a/keyboards/ai03/vega/keyboard.json +++ b/keyboards/ai03/vega/keyboard.json @@ -22,6 +22,11 @@ "resync": true } }, + "indicators": { + "caps_lock": "B7", + "scroll_lock": "A5", + "on_state": 0 + }, "matrix_pins": { "cols": ["B5", "A3", "A9", "A8", "B15", "B14", "B13", "B12", "B11", "B10", "B2", "B1", "B0", "A7", "A6"], "rows": ["A1", "A2", "B3", "A15", "A10"] diff --git a/keyboards/ai03/vega/vega.c b/keyboards/ai03/vega/vega.c deleted file mode 100644 index 44ded2c85c..0000000000 --- a/keyboards/ai03/vega/vega.c +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright 2020 ai03 - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -#include "quantum.h" - -void matrix_init_kb(void) { - // Initialize indicator LEDs to output - - gpio_set_pin_output(B7); // Caps - gpio_set_pin_output(A5); // Slck - - matrix_init_user(); -} - -bool led_update_kb(led_t led_state) { - - bool res = led_update_user(led_state); - - if(res) { - gpio_write_pin(B7, !led_state.caps_lock); - gpio_write_pin(A5, !led_state.scroll_lock); - } - return res; -}
\ No newline at end of file diff --git a/keyboards/aidansmithdotdev/sango/keyboard.json b/keyboards/aidansmithdotdev/sango/keyboard.json index deb26f86b6..f51eed7fd9 100644 --- a/keyboards/aidansmithdotdev/sango/keyboard.json +++ b/keyboards/aidansmithdotdev/sango/keyboard.json @@ -126,7 +126,10 @@ "rows": ["GP2", "GP3", "GP4", "GP5", "GP6"] } }, - "soft_serial_pin": "GP1" + "serial": { + "driver": "vendor", + "pin": "GP1" + } }, "url": "https://aidansmith.dev", "usb": { diff --git a/keyboards/aidansmithdotdev/sango/rules.mk b/keyboards/aidansmithdotdev/sango/rules.mk deleted file mode 100644 index 743228e94b..0000000000 --- a/keyboards/aidansmithdotdev/sango/rules.mk +++ /dev/null @@ -1 +0,0 @@ -SERIAL_DRIVER = vendor
\ No newline at end of file diff --git a/keyboards/aleblazer/zodiark/keyboard.json b/keyboards/aleblazer/zodiark/keyboard.json index 9f77049dee..fba239866e 100644 --- a/keyboards/aleblazer/zodiark/keyboard.json +++ b/keyboards/aleblazer/zodiark/keyboard.json @@ -60,13 +60,15 @@ }, "split": { "enabled": true, - "soft_serial_pin": "D3", "encoder": { "right": { "rotary": [ {"pin_a": "D4", "pin_b": "D2", "resolution": 3} ] } + }, + "serial": { + "pin": "D3" } }, "processor": "atmega32u4", diff --git a/keyboards/alt34/rev1/config.h b/keyboards/alt34/rev1/config.h index 9dd9e9bdde..d71179bed5 100644 --- a/keyboards/alt34/rev1/config.h +++ b/keyboards/alt34/rev1/config.h @@ -21,5 +21,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Select hand configuration */ #define EE_HANDS -/* #define MASTER_LEFT */ -/* #define MASTER_RIGHT */ + diff --git a/keyboards/arabica37/keymaps/default/config.h b/keyboards/arabica37/keymaps/default/config.h index 5654f4daf4..ff8c9caffc 100644 --- a/keyboards/arabica37/keymaps/default/config.h +++ b/keyboards/arabica37/keymaps/default/config.h @@ -22,12 +22,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //#define USE_MATRIX_I2C -/* Select hand configuration */ - -#define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS - #define QUICK_TAP_TERM 0 #define TAPPING_TERM 170 diff --git a/keyboards/arabica37/rev1/keyboard.json b/keyboards/arabica37/rev1/keyboard.json index 710a377ab9..63c4fe2940 100644 --- a/keyboards/arabica37/rev1/keyboard.json +++ b/keyboards/arabica37/rev1/keyboard.json @@ -21,7 +21,9 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D2" + "serial": { + "pin": "D2" + } }, "rgblight": { "led_count": 50, diff --git a/keyboards/argyle/matrix.c b/keyboards/argyle/matrix.c index d435b368c2..661310ade0 100644 --- a/keyboards/argyle/matrix.c +++ b/keyboards/argyle/matrix.c @@ -24,21 +24,21 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; -static inline void setPinOutput_writeLow(pin_t pin) { +static inline void gpio_atomic_set_pin_output_low(pin_t pin) { ATOMIC_BLOCK_FORCEON { gpio_set_pin_output(pin); gpio_write_pin_low(pin); } } -static inline void setPinOutput_writeHigh(pin_t pin) { +static inline void gpio_atomic_set_pin_output_high(pin_t pin) { ATOMIC_BLOCK_FORCEON { gpio_set_pin_output(pin); gpio_write_pin_high(pin); } } -static inline void setPinInputHigh_atomic(pin_t pin) { +static inline void gpio_atomic_set_pin_input_high(pin_t pin) { ATOMIC_BLOCK_FORCEON { gpio_set_pin_input_high(pin); } @@ -55,7 +55,7 @@ static inline uint8_t readMatrixPin(pin_t pin) { static bool select_row(uint8_t row) { pin_t pin = row_pins[row]; if (pin != NO_PIN) { - setPinOutput_writeLow(pin); + gpio_atomic_set_pin_output_low(pin); return true; } return false; @@ -64,7 +64,7 @@ static bool select_row(uint8_t row) { static void unselect_row(uint8_t row) { pin_t pin = row_pins[row]; if (pin != NO_PIN) { - setPinInputHigh_atomic(pin); + gpio_atomic_set_pin_input_high(pin); } } @@ -84,7 +84,7 @@ static void init_pins(void) { for (uint8_t x = 0; x < MATRIX_COLS; x++) { if (col_pins[x] != NO_PIN) { - setPinInputHigh_atomic(col_pins[x]); + gpio_atomic_set_pin_input_high(col_pins[x]); } } } diff --git a/keyboards/arrowmechanics/wings/keyboard.json b/keyboards/arrowmechanics/wings/keyboard.json index 1da4077baa..f0f0a9c442 100644 --- a/keyboards/arrowmechanics/wings/keyboard.json +++ b/keyboards/arrowmechanics/wings/keyboard.json @@ -188,6 +188,9 @@ }, "split": { "enabled": true, + "serial": { + "driver": "vendor" + }, "transport": { "sync": { "layer_state": true, diff --git a/keyboards/arrowmechanics/wings/rules.mk b/keyboards/arrowmechanics/wings/rules.mk deleted file mode 100644 index 161ec22b16..0000000000 --- a/keyboards/arrowmechanics/wings/rules.mk +++ /dev/null @@ -1 +0,0 @@ -SERIAL_DRIVER = vendor diff --git a/keyboards/atreus/astar_mirrored/config.h b/keyboards/atreus/astar_mirrored/config.h deleted file mode 100644 index 3bd163dec3..0000000000 --- a/keyboards/atreus/astar_mirrored/config.h +++ /dev/null @@ -1,19 +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 <http://www.gnu.org/licenses/>. - */ - -#pragma once - -#define PCBDOWN 1 diff --git a/keyboards/atreus/atreus.h b/keyboards/atreus/atreus.h deleted file mode 100644 index 2a966b8641..0000000000 --- a/keyboards/atreus/atreus.h +++ /dev/null @@ -1,51 +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 <http://www.gnu.org/licenses/>. - */ -#pragma once - -#include "quantum.h" -#define ___ KC_NO - -// This a shortcut to help you visually see your layout. -// The first section contains all of the arguments. -// The second converts the arguments into a two-dimensional array. -// In the PCBDOWN case we need to swap the middle two keys: k35 and k36. -#if defined(PCBDOWN) -#define LAYOUT( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, \ - k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \ -) \ -{ \ - { k00, k01, k02, k03, k04, KC_NO, k05, k06, k07, k08, k09 }, \ - { k10, k11, k12, k13, k14, KC_NO, k15, k16, k17, k18, k19 }, \ - { k20, k21, k22, k23, k24, k36, k25, k26, k27, k28, k29 }, \ - { k30, k31, k32, k33, k34, k35, k37, k38, k39, k3a, k3b } \ -} -#else -#define LAYOUT( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, \ - k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \ -) \ -{ \ - { k00, k01, k02, k03, k04, ___, k05, k06, k07, k08, k09 }, \ - { k10, k11, k12, k13, k14, ___, k15, k16, k17, k18, k19 }, \ - { k20, k21, k22, k23, k24, k35, k25, k26, k27, k28, k29 }, \ - { k30, k31, k32, k33, k34, k36, k37, k38, k39, k3a, k3b } \ -} -#endif diff --git a/keyboards/atreus/feather/config.h b/keyboards/atreus/feather/config.h deleted file mode 100644 index 505296a505..0000000000 --- a/keyboards/atreus/feather/config.h +++ /dev/null @@ -1,19 +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 <http://www.gnu.org/licenses/>. - */ - -#pragma once - -#define OUTPUT_AUTO_ENABLE diff --git a/keyboards/atreus/info.json b/keyboards/atreus/info.json index a0f592105f..1a33591ab5 100644 --- a/keyboards/atreus/info.json +++ b/keyboards/atreus/info.json @@ -23,58 +23,114 @@ "resync": true } }, + "layout_aliases": { + "LAYOUT": "LAYOUT_pcb_up" + }, "layouts": { - "LAYOUT": { + "LAYOUT_pcb_up": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0.6}, + {"matrix": [0, 1], "x": 1, "y": 0.35}, + {"matrix": [0, 2], "x": 2, "y": 0}, + {"matrix": [0, 3], "x": 3, "y": 0.35}, + {"matrix": [0, 4], "x": 4, "y": 0.7}, + + {"matrix": [0, 6], "x": 8, "y": 0.7}, + {"matrix": [0, 7], "x": 9, "y": 0.35}, + {"matrix": [0, 8], "x": 10, "y": 0}, + {"matrix": [0, 9], "x": 11, "y": 0.35}, + {"matrix": [0, 10], "x": 12, "y": 0.6}, + + {"matrix": [1, 0], "x": 0, "y": 1.6}, + {"matrix": [1, 1], "x": 1, "y": 1.35}, + {"matrix": [1, 2], "x": 2, "y": 1}, + {"matrix": [1, 3], "x": 3, "y": 1.35}, + {"matrix": [1, 4], "x": 4, "y": 1.7}, + + {"matrix": [1, 6], "x": 8, "y": 1.7}, + {"matrix": [1, 7], "x": 9, "y": 1.35}, + {"matrix": [1, 8], "x": 10, "y": 1}, + {"matrix": [1, 9], "x": 11, "y": 1.35}, + {"matrix": [1, 10], "x": 12, "y": 1.6}, + + {"matrix": [2, 0], "x": 0, "y": 2.6}, + {"matrix": [2, 1], "x": 1, "y": 2.35}, + {"matrix": [2, 2], "x": 2, "y": 2}, + {"matrix": [2, 3], "x": 3, "y": 2.35}, + {"matrix": [2, 4], "x": 4, "y": 2.7}, + + {"matrix": [2, 6], "x": 8, "y": 2.7}, + {"matrix": [2, 7], "x": 9, "y": 2.35}, + {"matrix": [2, 8], "x": 10, "y": 2}, + {"matrix": [2, 9], "x": 11, "y": 2.35}, + {"matrix": [2, 10], "x": 12, "y": 2.6}, + + {"matrix": [3, 0], "x": 0, "y": 3.6}, + {"matrix": [3, 1], "x": 1, "y": 3.35}, + {"matrix": [3, 2], "x": 2, "y": 3}, + {"matrix": [3, 3], "x": 3, "y": 3.35}, + {"matrix": [3, 4], "x": 4, "y": 3.7}, + {"matrix": [2, 5], "x": 5, "y": 2.95, "h": 1.5}, + + {"matrix": [3, 5], "x": 7, "y": 2.95, "h": 1.5}, + {"matrix": [3, 6], "x": 8, "y": 3.7}, + {"matrix": [3, 7], "x": 9, "y": 3.35}, + {"matrix": [3, 8], "x": 10, "y": 3}, + {"matrix": [3, 9], "x": 11, "y": 3.35}, + {"matrix": [3, 10], "x": 12, "y": 3.6} + ] + }, + "LAYOUT_pcb_down": { "layout": [ - {"x": 0, "y": 0.6}, - {"x": 1, "y": 0.35}, - {"x": 2, "y": 0}, - {"x": 3, "y": 0.35}, - {"x": 4, "y": 0.7}, + {"matrix": [0, 0], "x": 0, "y": 0.6}, + {"matrix": [0, 1], "x": 1, "y": 0.35}, + {"matrix": [0, 2], "x": 2, "y": 0}, + {"matrix": [0, 3], "x": 3, "y": 0.35}, + {"matrix": [0, 4], "x": 4, "y": 0.7}, - {"x": 8, "y": 0.7}, - {"x": 9, "y": 0.35}, - {"x": 10, "y": 0}, - {"x": 11, "y": 0.35}, - {"x": 12, "y": 0.6}, + {"matrix": [0, 6], "x": 8, "y": 0.7}, + {"matrix": [0, 7], "x": 9, "y": 0.35}, + {"matrix": [0, 8], "x": 10, "y": 0}, + {"matrix": [0, 9], "x": 11, "y": 0.35}, + {"matrix": [0, 10], "x": 12, "y": 0.6}, - {"x": 0, "y": 1.6}, - {"x": 1, "y": 1.35}, - {"x": 2, "y": 1}, - {"x": 3, "y": 1.35}, - {"x": 4, "y": 1.7}, + {"matrix": [1, 0], "x": 0, "y": 1.6}, + {"matrix": [1, 1], "x": 1, "y": 1.35}, + {"matrix": [1, 2], "x": 2, "y": 1}, + {"matrix": [1, 3], "x": 3, "y": 1.35}, + {"matrix": [1, 4], "x": 4, "y": 1.7}, - {"x": 8, "y": 1.7}, - {"x": 9, "y": 1.35}, - {"x": 10, "y": 1}, - {"x": 11, "y": 1.35}, - {"x": 12, "y": 1.6}, + {"matrix": [1, 6], "x": 8, "y": 1.7}, + {"matrix": [1, 7], "x": 9, "y": 1.35}, + {"matrix": [1, 8], "x": 10, "y": 1}, + {"matrix": [1, 9], "x": 11, "y": 1.35}, + {"matrix": [1, 10], "x": 12, "y": 1.6}, - {"x": 0, "y": 2.6}, - {"x": 1, "y": 2.35}, - {"x": 2, "y": 2}, - {"x": 3, "y": 2.35}, - {"x": 4, "y": 2.7}, + {"matrix": [2, 0], "x": 0, "y": 2.6}, + {"matrix": [2, 1], "x": 1, "y": 2.35}, + {"matrix": [2, 2], "x": 2, "y": 2}, + {"matrix": [2, 3], "x": 3, "y": 2.35}, + {"matrix": [2, 4], "x": 4, "y": 2.7}, - {"x": 8, "y": 2.7}, - {"x": 9, "y": 2.35}, - {"x": 10, "y": 2}, - {"x": 11, "y": 2.35}, - {"x": 12, "y": 2.6}, + {"matrix": [2, 6], "x": 8, "y": 2.7}, + {"matrix": [2, 7], "x": 9, "y": 2.35}, + {"matrix": [2, 8], "x": 10, "y": 2}, + {"matrix": [2, 9], "x": 11, "y": 2.35}, + {"matrix": [2, 10], "x": 12, "y": 2.6}, - {"x": 0, "y": 3.6}, - {"x": 1, "y": 3.35}, - {"x": 2, "y": 3}, - {"x": 3, "y": 3.35}, - {"x": 4, "y": 3.7}, - {"x": 5, "y": 2.95, "h": 1.5}, + {"matrix": [3, 0], "x": 0, "y": 3.6}, + {"matrix": [3, 1], "x": 1, "y": 3.35}, + {"matrix": [3, 2], "x": 2, "y": 3}, + {"matrix": [3, 3], "x": 3, "y": 3.35}, + {"matrix": [3, 4], "x": 4, "y": 3.7}, + {"matrix": [3, 5], "x": 5, "y": 2.95, "h": 1.5}, - {"x": 7, "y": 2.95, "h": 1.5}, - {"x": 8, "y": 3.7}, - {"x": 9, "y": 3.35}, - {"x": 10, "y": 3}, - {"x": 11, "y": 3.35}, - {"x": 12, "y": 3.6} + {"matrix": [2, 5], "x": 7, "y": 2.95, "h": 1.5}, + {"matrix": [3, 6], "x": 8, "y": 3.7}, + {"matrix": [3, 7], "x": 9, "y": 3.35}, + {"matrix": [3, 8], "x": 10, "y": 3}, + {"matrix": [3, 9], "x": 11, "y": 3.35}, + {"matrix": [3, 10], "x": 12, "y": 3.6} ] } } diff --git a/keyboards/atreus/keymaps/default/keymap.c b/keyboards/atreus/keymaps/default/keymap.c index ca1333230c..e458810537 100644 --- a/keyboards/atreus/keymaps/default/keymap.c +++ b/keyboards/atreus/keymaps/default/keymap.c @@ -12,7 +12,7 @@ #define _LW 2 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_QW] = LAYOUT( /* Qwerty */ + [_QW] = LAYOUT_pcb_up( /* Qwerty */ 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_SLSH , @@ -25,7 +25,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * [ ] ( ) & || ` 1 2 3 \ * lower insert super shift bksp ctrl || alt space fn . 0 = */ - [_RS] = LAYOUT( /* [> RAISE <] */ + [_RS] = LAYOUT_pcb_up( /* [> RAISE <] */ KC_EXLM, KC_AT, KC_UP, KC_LCBR, KC_RCBR, KC_PGUP, KC_7, KC_8, KC_9, KC_ASTR , KC_HASH, KC_LEFT, KC_DOWN, KC_RGHT, KC_DLR, KC_PGDN, KC_4, KC_5, KC_6, KC_PLUS , KC_LBRC, KC_RBRC, KC_LPRN, KC_RPRN, KC_AMPR, KC_GRV, KC_1, KC_2, KC_3, KC_BSLS , @@ -36,7 +36,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * volup reset || F1 F2 F3 F12 * voldn super shift bksp ctrl || alt space L0 prtsc scroll pause */ - [_LW] = LAYOUT( /* [> LOWER <] */ + [_LW] = LAYOUT_pcb_up( /* [> LOWER <] */ KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_UP, KC_F7, KC_F8, KC_F9, KC_F10 , KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_DOWN, KC_F4, KC_F5, KC_F6, KC_F11 , KC_NO, KC_VOLU, KC_NO, KC_NO, QK_BOOT, KC_NO, KC_F1, KC_F2, KC_F3, KC_F12 , diff --git a/keyboards/atreus/keymaps/via/keymap.c b/keyboards/atreus/keymaps/via/keymap.c index 52740c5bad..e6093d7ac1 100644 --- a/keyboards/atreus/keymaps/via/keymap.c +++ b/keyboards/atreus/keymaps/via/keymap.c @@ -27,7 +27,7 @@ enum custom_layers { }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_QW] = LAYOUT( /* Qwerty */ + [_QW] = LAYOUT_pcb_up( /* Qwerty */ 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_SLSH , @@ -40,7 +40,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * [ ] ( ) & || ` 1 2 3 \ * lower insert super shift bksp ctrl || alt space fn . 0 = */ - [_RS] = LAYOUT( /* [> RAISE <] */ + [_RS] = LAYOUT_pcb_up( /* [> RAISE <] */ KC_EXLM, KC_AT, KC_UP, KC_LCBR, KC_RCBR, KC_PGUP, KC_7, KC_8, KC_9, KC_ASTR , KC_HASH, KC_LEFT, KC_DOWN, KC_RGHT, KC_DLR, KC_PGDN, KC_4, KC_5, KC_6, KC_PLUS , KC_LBRC, KC_RBRC, KC_LPRN, KC_RPRN, KC_AMPR, KC_GRV, KC_1, KC_2, KC_3, KC_BSLS , @@ -51,13 +51,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * volup reset || F1 F2 F3 F12 * voldn super shift bksp ctrl || alt space L0 prtsc scroll pause */ - [_LW] = LAYOUT( /* [> LOWER <] */ + [_LW] = LAYOUT_pcb_up( /* [> LOWER <] */ KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_UP, KC_F7, KC_F8, KC_F9, KC_F10 , KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_DOWN, KC_F4, KC_F5, KC_F6, KC_F11 , KC_NO, KC_VOLU, KC_NO, KC_NO, QK_BOOT, KC_NO, KC_F1, KC_F2, KC_F3, KC_F12 , KC_NO, KC_VOLD, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_LALT, KC_SPC, TO(_QW), KC_PSCR, KC_SCRL, KC_PAUS ), - [_EM] = LAYOUT( /* [> EMPTY <] */ + [_EM] = LAYOUT_pcb_up( /* [> EMPTY <] */ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS , KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS , KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS , diff --git a/keyboards/atreus/keymaps/workman/config.h b/keyboards/atreus/keymaps/workman/config.h index cf0b5e2ac5..f75e442456 100644 --- a/keyboards/atreus/keymaps/workman/config.h +++ b/keyboards/atreus/keymaps/workman/config.h @@ -1,3 +1,2 @@ #define TAPPING_TOGGLE 1 #define ONESHOT_TAP_TOGGLE 1 -#define PCBDOWN 1 diff --git a/keyboards/atreus/keymaps/workman/keymap.c b/keyboards/atreus/keymaps/workman/keymap.c index c0633f6362..e8b5b6b4e3 100644 --- a/keyboards/atreus/keymaps/workman/keymap.c +++ b/keyboards/atreus/keymaps/workman/keymap.c @@ -25,7 +25,7 @@ enum custom_keycodes { */ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_QW] = LAYOUT( /* Workman */ + [_QW] = LAYOUT_pcb_down( /* Workman */ KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_SCLN, KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, KC_COMM, KC_DOT, KC_SLSH, @@ -39,7 +39,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * menu caps < > del || _ 0 = */ - [_RS] = LAYOUT( /* [> RAISE <] */ + [_RS] = LAYOUT_pcb_down( /* [> RAISE <] */ KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, KC_MINS, KC_7, KC_8, KC_9, KC_ASTR, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRV, KC_DOT, KC_4, KC_5, KC_6, KC_PLUS, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, @@ -52,7 +52,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * || – ¨ reset */ - [_LW] = LAYOUT( /* [> LOWER <] */ + [_LW] = LAYOUT_pcb_down( /* [> LOWER <] */ KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_VOLU, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_VOLD, KC_F4, KC_F5, KC_F6, KC_F11, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_F1, KC_F2, KC_F3, KC_F12, diff --git a/keyboards/atreus/promicro/keyboard.json b/keyboards/atreus/promicro/keyboard.json index e614b4e2a0..10c0ca1b22 100644 --- a/keyboards/atreus/promicro/keyboard.json +++ b/keyboards/atreus/promicro/keyboard.json @@ -4,6 +4,5 @@ "rows": ["F4", "B2", "B4", "B5"] }, "diode_direction": "COL2ROW", - "processor": "atmega32u4", - "bootloader": "caterina" + "development_board": "promicro" } diff --git a/keyboards/avalanche/v1/keyboard.json b/keyboards/avalanche/v1/keyboard.json index 97acaf0d9f..0e539bdefc 100644 --- a/keyboards/avalanche/v1/keyboard.json +++ b/keyboards/avalanche/v1/keyboard.json @@ -21,7 +21,9 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D2" + "serial": { + "pin": "D2" + } }, "processor": "atmega32u4", "bootloader": "caterina", diff --git a/keyboards/avalanche/v2/keyboard.json b/keyboards/avalanche/v2/keyboard.json index 219e5bb6c6..2c38fd1056 100644 --- a/keyboards/avalanche/v2/keyboard.json +++ b/keyboards/avalanche/v2/keyboard.json @@ -35,7 +35,9 @@ }, "split": { "enabled": true, - "soft_serial_pin": "D2" + "serial": { + "pin": "D2" + } }, "processor": "atmega32u4", "bootloader": "caterina", diff --git a/keyboards/avalanche/v3/keyboard.json b/keyboards/avalanche/v3/keyboard.json index 6104dbd793..84191a103f 100644 --- a/keyboards/avalanche/v3/keyboard.json +++ b/keyboards/avalanche/v3/keyboard.json @@ -27,7 +27,9 @@ }, "split": { "enabled": true, - "soft_serial_pin": "D2" + "serial": { + "pin": "D2" + } }, "rgblight": { "led_count": 12, diff --git a/keyboards/avalanche/v4/keyboard.json b/keyboards/avalanche/v4/keyboard.json index 2a4909ba36..2a548c5665 100644 --- a/keyboards/avalanche/v4/keyboard.json +++ b/keyboards/avalanche/v4/keyboard.json @@ -28,7 +28,9 @@ }, "split": { "enabled": true, - "soft_serial_pin": "D2" + "serial": { + "pin": "D2" + } }, "ws2812": { "pin": "D3" diff --git a/keyboards/aya/config.h b/keyboards/aya/config.h index 14fc201d49..1ab53d70ae 100644 --- a/keyboards/aya/config.h +++ b/keyboards/aya/config.h @@ -16,5 +16,4 @@ #pragma once -#define SPLIT_HAND_PIN B5 #define USE_I2C diff --git a/keyboards/aya/keyboard.json b/keyboards/aya/keyboard.json index 547f495ddd..6f9ad387bc 100644 --- a/keyboards/aya/keyboard.json +++ b/keyboards/aya/keyboard.json @@ -15,7 +15,10 @@ "command": true }, "split": { - "enabled": true + "enabled": true, + "handedness": { + "pin": "B5" + } }, "matrix_pins": { "cols": ["F4", "F5", "F6", "F7", "B1", "B3", "B2"], diff --git a/keyboards/bandominedoni/keyboard.json b/keyboards/bandominedoni/keyboard.json index c253da0c83..41212aedef 100644 --- a/keyboards/bandominedoni/keyboard.json +++ b/keyboards/bandominedoni/keyboard.json @@ -30,13 +30,15 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D2", "encoder": { "right": { "rotary": [ {"pin_a": "F5", "pin_b": "F4"} ] } + }, + "serial": { + "pin": "D2" } }, "qmk": { diff --git a/keyboards/basekeys/slice/rev1/config.h b/keyboards/basekeys/slice/rev1/config.h deleted file mode 100644 index aecd34737d..0000000000 --- a/keyboards/basekeys/slice/rev1/config.h +++ /dev/null @@ -1,23 +0,0 @@ -/* -Copyright 2020 2Moons - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#pragma once - -/* Select hand configuration */ -//#define EE_HANDS -#define MASTER_LEFT -//#define MASTER_RIGHT diff --git a/keyboards/basekeys/slice/rev1/keyboard.json b/keyboards/basekeys/slice/rev1/keyboard.json index c341597ee6..a6097e560a 100644 --- a/keyboards/basekeys/slice/rev1/keyboard.json +++ b/keyboards/basekeys/slice/rev1/keyboard.json @@ -26,7 +26,9 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D2" + "serial": { + "pin": "D2" + } }, "processor": "atmega32u4", "bootloader": "caterina", diff --git a/keyboards/basekeys/slice/rev1_rgb/config.h b/keyboards/basekeys/slice/rev1_rgb/config.h index 2594d39f2a..0f281a5718 100644 --- a/keyboards/basekeys/slice/rev1_rgb/config.h +++ b/keyboards/basekeys/slice/rev1_rgb/config.h @@ -16,9 +16,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #pragma once -/* Select hand configuration */ -//#define EE_HANDS -#define MASTER_LEFT -//#define MASTER_RIGHT - #define OLED_FONT_H "keyboards/basekeys/slice/slice_font.c" diff --git a/keyboards/basekeys/slice/rev1_rgb/keyboard.json b/keyboards/basekeys/slice/rev1_rgb/keyboard.json index a666f26661..d6d7b8ad45 100644 --- a/keyboards/basekeys/slice/rev1_rgb/keyboard.json +++ b/keyboards/basekeys/slice/rev1_rgb/keyboard.json @@ -31,7 +31,9 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D2" + "serial": { + "pin": "D2" + } }, "ws2812": { "pin": "D3" diff --git a/keyboards/bastardkb/tbk/config.h b/keyboards/bastardkb/tbk/config.h deleted file mode 100644 index 8515cac5ef..0000000000 --- a/keyboards/bastardkb/tbk/config.h +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright 2021 Quentin LEBASTARD <[email protected]> - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -#pragma once - -#define MASTER_RIGHT diff --git a/keyboards/bastardkb/tbk/keyboard.json b/keyboards/bastardkb/tbk/keyboard.json deleted file mode 100644 index 90e37478a1..0000000000 --- a/keyboards/bastardkb/tbk/keyboard.json +++ /dev/null @@ -1,111 +0,0 @@ -{ - "keyboard_name": "The Bastard Keyboard", - "url": "https://bastardkb.com/", - "usb": { - "device_version": "0.0.1", - "pid": "0x1828" - }, - "rgblight": { - "led_count": 38, - "split_count": [19, 19], - "animations": { - "breathing": true, - "rainbow_mood": true, - "rainbow_swirl": true, - "snake": true, - "knight": true, - "christmas": true, - "static_gradient": true, - "rgb_test": true, - "alternating": true, - "twinkle": true - } - }, - "ws2812": { - "pin": "D2" - }, - "features": { - "bootmagic": true, - "command": false, - "console": false, - "extrakey": true, - "mousekey": true, - "nkro": false, - "rgblight": true - }, - "matrix_pins": { - "cols": ["B4", "E6", "C6", "B1", "B3", "B2"], - "rows": ["D7", "B5", "F7", "F6", "B6"] - }, - "diode_direction": "ROW2COL", - "split": { - "enabled": true, - "soft_serial_pin": "D0" - }, - "processor": "atmega32u4", - "bootloader": "atmel-dfu", - "layouts": { - "LAYOUT_split_4x6_5": { - "layout": [ - {"matrix": [0, 0], "x": 0, "y": 0}, - {"matrix": [0, 1], "x": 1, "y": 0}, - {"matrix": [0, 2], "x": 2, "y": 0}, - {"matrix": [0, 3], "x": 3, "y": 0}, - {"matrix": [0, 4], "x": 4, "y": 0}, - {"matrix": [0, 5], "x": 5, "y": 0}, - {"matrix": [5, 5], "x": 11, "y": 0}, - {"matrix": [5, 4], "x": 12, "y": 0}, - {"matrix": [5, 3], "x": 13, "y": 0}, - {"matrix": [5, 2], "x": 14, "y": 0}, - {"matrix": [5, 1], "x": 15, "y": 0}, - {"matrix": [5, 0], "x": 16, "y": 0}, - {"matrix": [1, 0], "x": 0, "y": 1}, - {"matrix": [1, 1], "x": 1, "y": 1}, - {"matrix": [1, 2], "x": 2, "y": 1}, - {"matrix": [1, 3], "x": 3, "y": 1}, - {"matrix": [1, 4], "x": 4, "y": 1}, - {"matrix": [1, 5], "x": 5, "y": 1}, - {"matrix": [6, 5], "x": 11, "y": 1}, - {"matrix": [6, 4], "x": 12, "y": 1}, - {"matrix": [6, 3], "x": 13, "y": 1}, - {"matrix": [6, 2], "x": 14, "y": 1}, - {"matrix": [6, 1], "x": 15, "y": 1}, - {"matrix": [6, 0], "x": 16, "y": 1}, - {"matrix": [2, 0], "x": 0, "y": 2}, - {"matrix": [2, 1], "x": 1, "y": 2}, - {"matrix": [2, 2], "x": 2, "y": 2}, - {"matrix": [2, 3], "x": 3, "y": 2}, - {"matrix": [2, 4], "x": 4, "y": 2}, - {"matrix": [2, 5], "x": 5, "y": 2}, - {"matrix": [7, 5], "x": 11, "y": 2}, - {"matrix": [7, 4], "x": 12, "y": 2}, - {"matrix": [7, 3], "x": 13, "y": 2}, - {"matrix": [7, 2], "x": 14, "y": 2}, - {"matrix": [7, 1], "x": 15, "y": 2}, - {"matrix": [7, 0], "x": 16, "y": 2}, - {"matrix": [3, 0], "x": 0, "y": 3}, - {"matrix": [3, 1], "x": 1, "y": 3}, - {"matrix": [3, 2], "x": 2, "y": 3}, - {"matrix": [3, 3], "x": 3, "y": 3}, - {"matrix": [3, 4], "x": 4, "y": 3}, - {"matrix": [3, 5], "x": 5, "y": 3}, - {"matrix": [8, 5], "x": 11, "y": 3}, - {"matrix": [8, 4], "x": 12, "y": 3}, - {"matrix": [8, 3], "x": 13, "y": 3}, - {"matrix": [8, 2], "x": 14, "y": 3}, - {"matrix": [8, 1], "x": 15, "y": 3}, - {"matrix": [8, 0], "x": 16, "y": 3}, - {"matrix": [4, 3], "x": 5, "y": 4}, - {"matrix": [4, 4], "x": 6, "y": 4}, - {"matrix": [4, 1], "x": 7, "y": 4}, - {"matrix": [9, 1], "x": 9, "y": 4}, - {"matrix": [9, 4], "x": 10, "y": 4}, - {"matrix": [9, 3], "x": 11, "y": 4}, - {"matrix": [4, 5], "x": 6, "y": 5}, - {"matrix": [4, 2], "x": 7, "y": 5}, - {"matrix": [9, 2], "x": 9, "y": 5}, - {"matrix": [9, 5], "x": 10, "y": 5} - ] - } - } -} diff --git a/keyboards/bastardkb/tbk/keymaps/default/keymap.c b/keyboards/bastardkb/tbk/keymaps/default/keymap.c deleted file mode 100644 index 3227076c07..0000000000 --- a/keyboards/bastardkb/tbk/keymaps/default/keymap.c +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright 2021 Quentin LEBASTARD <[email protected]> - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -#include QMK_KEYBOARD_H - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - [0] = LAYOUT_split_4x6_5( - 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_BSLS, -//-------------------------------------------------//-----------------------------------------------------------// - KC_LCTL, KC_SPC, MO(1), MO(2), KC_ENT, KC_RGUI, - KC_HOME, KC_BSPC, KC_DEL, KC_RALT - ), - - [1] = LAYOUT_split_4x6_5( - KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, -//---------------------------------------------------------//-----------------------------------------------------------// - QK_BOOT, _______, _______, _______, _______, 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_LCTL, KC_HOME, KC_TRNS, KC_TRNS, KC_RALT, KC_RGUI, - KC_SPC, KC_BSPC, KC_RCTL, KC_ENT - ), - - [2] = LAYOUT_split_4x6_5( - 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_RMOD, RGB_TOG, RGB_MOD, KC_LBRC, KC_RBRC, _______, KC_NUM, KC_INS, KC_SCRL, 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_LCTL, KC_HOME, KC_TRNS, KC_TRNS, KC_RALT, QK_BOOT, - KC_SPC, KC_BSPC, KC_RCTL, KC_ENT - ), -}; diff --git a/keyboards/bastardkb/tbk/readme.md b/keyboards/bastardkb/tbk/readme.md deleted file mode 100644 index 0d552e5caf..0000000000 --- a/keyboards/bastardkb/tbk/readme.md +++ /dev/null @@ -1,22 +0,0 @@ -# The Bastard Keyboard - -A split ergonomic keyboard. - -* Keyboard Maintainer: [Bastard Keyboards](https://github.com/Bastardkb/) -* Hardware Supported: elite-C V4 -* Hardware Availability: [Bastard Keyboards](https://bastardkb.com/) - -Make example for this keyboard (after setting up your build environment): - - make bastardkb/tbk: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). - -See the [keyboard build instructions](https://docs.bastardkb.com) - - -## Important information regarding the reset - -If you modify this firmware, make sure to always have a QK_BOOT key that can be triggered using only the master side ! This way you ensure that you can always flash the keyboard, even if you mess up. - -Otherwise if you're stuck, open the case and reset manually by shorting Gnd and Rst, or pressing the RST button. diff --git a/keyboards/bear_face/info.json b/keyboards/bear_face/info.json index ad12468d56..90191299d8 100644 --- a/keyboards/bear_face/info.json +++ b/keyboards/bear_face/info.json @@ -1,22 +1,18 @@ { - "keyboard_name": "bear_face", - "manufacturer": "chemicalwill", - "url": "https://github.com/chemicalwill/bear_face_pcb", - "maintainer": "chemicalwill", - "debounce": 6, + "manufacturer": "will-hedges", + "url": "https://github.com/will-hedges", + "maintainer": "will-hedges", "usb": { "vid": "0xFEED", - "pid": "0x09F5", - "force_nkro": true + "pid": "0x09F5" }, "features": { "backlight": true, - "bootmagic": false, + "bootmagic": true, "command": false, "console": false, "extrakey": true, - "mousekey": false, - "nkro": true + "mousekey": false }, "qmk": { "locking": { @@ -30,7 +26,8 @@ }, "diode_direction": "COL2ROW", "backlight": { - "driver": "timer", + "as_caps_lock": true, + "driver": "software", "pin": "F7" }, "processor": "atmega32u4", diff --git a/keyboards/bear_face/rules.mk b/keyboards/bear_face/rules.mk deleted file mode 100644 index f11303978e..0000000000 --- a/keyboards/bear_face/rules.mk +++ /dev/null @@ -1 +0,0 @@ -DEFAULT_FOLDER = bear_face/v1 diff --git a/keyboards/bear_face/v1/keyboard.json b/keyboards/bear_face/v1/keyboard.json index 8dedc0b1c7..8c60089bbb 100644 --- a/keyboards/bear_face/v1/keyboard.json +++ b/keyboards/bear_face/v1/keyboard.json @@ -1,9 +1,13 @@ { + "keyboard_name": "bear_face v1", "usb": { "device_version": "1.0.0" }, + "backlight": { + "on_state": 0 + }, "layouts": { - "LAYOUT_83_ansi": { + "LAYOUT": { "layout": [ {"matrix": [0, 0], "x": 0, "y": 0, "w": 1.5}, {"matrix": [0, 1], "x": 1.5, "y": 0}, diff --git a/keyboards/bear_face/v1/keymaps/default/keymap.c b/keyboards/bear_face/v1/keymaps/default/keymap.c index fc92c783db..e615a3915d 100644 --- a/keyboards/bear_face/v1/keymaps/default/keymap.c +++ b/keyboards/bear_face/v1/keymaps/default/keymap.c @@ -1,19 +1,5 @@ -/* -Copyright 2020 chemicalwill <https://github.com/chemicalwill> - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ +/* Copyright 2024 will-hedges */ +/* SPDX-License-Identifier: GPL-2.0-or-later */ #include QMK_KEYBOARD_H @@ -28,13 +14,13 @@ enum layers { //custom keycode enums enum custom_keycodes { - BASE_QWER = SAFE_RANGE, + BASE_QWER = QK_USER, BASE_COLE, BASE_DVOR }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_QWER] = LAYOUT_83_ansi( + [_QWER] = LAYOUT( KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_DEL, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, @@ -43,7 +29,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT ), - [_COLE] = LAYOUT_83_ansi( + [_COLE] = LAYOUT( KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_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_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, @@ -52,7 +38,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT ), - [_DVOR] = LAYOUT_83_ansi( + [_DVOR] = LAYOUT( KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_DEL, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_BSPC, KC_HOME, KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSLS, KC_PGUP, @@ -61,7 +47,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT ), - [_FN1] = LAYOUT_83_ansi( + [_FN1] = LAYOUT( _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, KC_PSCR, KC_SCRL, KC_PAUS, _______, _______, KC_INS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_CALC, BASE_QWER, _______, _______, _______, _______, QK_BOOT, _______, _______, _______, _______, QK_BOOT, _______, _______, _______, _______, BASE_COLE, @@ -71,7 +57,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), /* - [_BLANK] = LAYOUT_83_ansi( + [_BLANK] = LAYOUT( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, @@ -82,8 +68,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ }; -//macros to allow the user to set whatever default layer they want, even after reboot +// macros to allow the user to set whatever default layer they want, even after reboot bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case BASE_QWER: diff --git a/keyboards/bear_face/v1/v1.c b/keyboards/bear_face/v1/v1.c deleted file mode 100644 index b64a63f0b4..0000000000 --- a/keyboards/bear_face/v1/v1.c +++ /dev/null @@ -1,34 +0,0 @@ -/* -Copyright 2020 chemicalwill <https://github.com/chemicalwill> - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#include "quantum.h" - -void keyboard_pre_init_kb(void) { - //Sets LED pin as output - gpio_set_pin_output(F7); - - keyboard_pre_init_user(); -} - -bool led_update_kb(led_t led_state) { - // Caps Lock LED indicator toggling code here - bool res = led_update_user(led_state); - if(res) { - gpio_write_pin(F7, led_state.caps_lock); - } - return res; -} diff --git a/keyboards/bear_face/v2/keyboard.json b/keyboards/bear_face/v2/keyboard.json index 908165babb..456c920066 100644 --- a/keyboards/bear_face/v2/keyboard.json +++ b/keyboards/bear_face/v2/keyboard.json @@ -1,8 +1,106 @@ { + "keyboard_name": "bear_face v2", "usb": { - "device_version": "2.0.0" + "device_version": "2.1.0" + }, + "backlight": { + "on_state": 0 }, "layouts": { + "LAYOUT_all": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "w": 1.5}, + {"matrix": [0, 1], "x": 1.5, "y": 0}, + {"matrix": [0, 2], "x": 2.5, "y": 0}, + {"matrix": [0, 3], "x": 3.5, "y": 0}, + {"matrix": [0, 4], "x": 4.5, "y": 0}, + {"matrix": [0, 5], "x": 5.5, "y": 0}, + {"matrix": [0, 6], "x": 6.5, "y": 0}, + {"matrix": [0, 7], "x": 7.5, "y": 0}, + {"matrix": [0, 8], "x": 8.5, "y": 0}, + {"matrix": [0, 9], "x": 9.5, "y": 0}, + {"matrix": [0, 10], "x": 10.5, "y": 0}, + {"matrix": [0, 11], "x": 11.5, "y": 0}, + {"matrix": [0, 12], "x": 12.5, "y": 0}, + {"matrix": [0, 13], "x": 13.5, "y": 0}, + {"matrix": [0, 14], "x": 14.5, "y": 0, "w": 1.5}, + + {"matrix": [1, 0], "x": 0, "y": 1}, + {"matrix": [1, 1], "x": 1, "y": 1}, + {"matrix": [1, 2], "x": 2, "y": 1}, + {"matrix": [1, 3], "x": 3, "y": 1}, + {"matrix": [1, 4], "x": 4, "y": 1}, + {"matrix": [1, 5], "x": 5, "y": 1}, + {"matrix": [1, 6], "x": 6, "y": 1}, + {"matrix": [1, 7], "x": 7, "y": 1}, + {"matrix": [1, 8], "x": 8, "y": 1}, + {"matrix": [1, 9], "x": 9, "y": 1}, + {"matrix": [1, 10], "x": 10, "y": 1}, + {"matrix": [1, 11], "x": 11, "y": 1}, + {"matrix": [1, 12], "x": 12, "y": 1}, + {"matrix": [1, 13], "x": 13, "y": 1, "w": 2}, + {"matrix": [1, 14], "x": 15, "y": 1}, + + {"matrix": [2, 0], "x": 0, "y": 2, "w": 1.5}, + {"matrix": [2, 1], "x": 1.5, "y": 2}, + {"matrix": [2, 2], "x": 2.5, "y": 2}, + {"matrix": [2, 3], "x": 3.5, "y": 2}, + {"matrix": [2, 4], "x": 4.5, "y": 2}, + {"matrix": [2, 5], "x": 5.5, "y": 2}, + {"matrix": [2, 6], "x": 6.5, "y": 2}, + {"matrix": [2, 7], "x": 7.5, "y": 2}, + {"matrix": [2, 8], "x": 8.5, "y": 2}, + {"matrix": [2, 9], "x": 9.5, "y": 2}, + {"matrix": [2, 10], "x": 10.5, "y": 2}, + {"matrix": [2, 11], "x": 11.5, "y": 2}, + {"matrix": [2, 12], "x": 12.5, "y": 2}, + {"matrix": [2, 13], "x": 13.5, "y": 2, "w": 1.5}, + {"matrix": [2, 14], "x": 15, "y": 2}, + + {"matrix": [3, 0], "x": 0, "y": 3, "w": 1.75}, + {"matrix": [3, 1], "x": 1.75, "y": 3}, + {"matrix": [3, 2], "x": 2.75, "y": 3}, + {"matrix": [3, 3], "x": 3.75, "y": 3}, + {"matrix": [3, 4], "x": 4.75, "y": 3}, + {"matrix": [3, 5], "x": 5.75, "y": 3}, + {"matrix": [3, 6], "x": 6.75, "y": 3}, + {"matrix": [3, 7], "x": 7.75, "y": 3}, + {"matrix": [3, 8], "x": 8.75, "y": 3}, + {"matrix": [3, 9], "x": 9.75, "y": 3}, + {"matrix": [3, 10], "x": 10.75, "y": 3}, + {"matrix": [3, 11], "x": 11.75, "y": 3}, + {"matrix": [3, 12], "x": 12.75, "y": 3}, + {"matrix": [3, 13], "x": 13.75, "y": 2, "w": 1.25, "h": 2}, + {"matrix": [3, 14], "x": 15, "y": 3}, + + {"matrix": [4, 0], "x": 0, "y": 4, "w": 1.25}, + {"matrix": [4, 1], "x": 1.25, "y": 4}, + {"matrix": [4, 2], "x": 2.25, "y": 4}, + {"matrix": [4, 3], "x": 3.25, "y": 4}, + {"matrix": [4, 4], "x": 4.25, "y": 4}, + {"matrix": [4, 5], "x": 5.25, "y": 4}, + {"matrix": [4, 6], "x": 6.25, "y": 4}, + {"matrix": [4, 7], "x": 7.25, "y": 4}, + {"matrix": [4, 8], "x": 8.25, "y": 4}, + {"matrix": [4, 9], "x": 9.25, "y": 4}, + {"matrix": [4, 10], "x": 10.25, "y": 4}, + {"matrix": [4, 11], "x": 11.25, "y": 4}, + {"matrix": [4, 12], "x": 12.25, "y": 4, "w": 1.75}, + {"matrix": [4, 13], "x": 14, "y": 4}, + {"matrix": [4, 14], "x": 15, "y": 4}, + + {"matrix": [5, 0], "x": 0, "y": 5, "w": 1.25}, + {"matrix": [5, 1], "x": 1.25, "y": 5, "w": 1.25}, + {"matrix": [5, 2], "x": 2.5, "y": 5, "w": 1.25}, + {"matrix": [5, 5], "x": 3.75, "y": 5, "w": 6.25}, + {"matrix": [5, 9], "x": 10, "y": 5}, + {"matrix": [5, 10], "x": 11, "y": 5}, + {"matrix": [5, 11], "x": 12, "y": 5}, + {"matrix": [5, 12], "x": 13, "y": 5}, + {"matrix": [5, 13], "x": 14, "y": 5}, + {"matrix": [5, 14], "x": 15, "y": 5} + ] + }, "LAYOUT_83_ansi": { "layout": [ {"matrix": [0, 0], "x": 0, "y": 0, "w": 1.5}, diff --git a/keyboards/bear_face/v2/keymaps/default/keymap.c b/keyboards/bear_face/v2/keymaps/default/keymap.c index 0d536b68f3..08f193052a 100644 --- a/keyboards/bear_face/v2/keymaps/default/keymap.c +++ b/keyboards/bear_face/v2/keymaps/default/keymap.c @@ -1,19 +1,5 @@ -/* -Copyright 2020 chemicalwill <https://github.com/chemicalwill> - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ +/* Copyright 2024 will-hedges */ +/* SPDX-License-Identifier: GPL-2.0-or-later */ #include QMK_KEYBOARD_H @@ -28,7 +14,7 @@ enum layers { //custom keycode enums enum custom_keycodes { - BASE_QWER = SAFE_RANGE, + BASE_QWER = QK_USER, BASE_COLE, BASE_DVOR }; @@ -82,8 +68,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ }; -//macros to allow the user to set whatever default layer they want, even after reboot +// macros to allow the user to set whatever default layer they want, even after reboot bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case BASE_QWER: diff --git a/keyboards/bear_face/v2/keymaps/default/readme.md b/keyboards/bear_face/v2/keymaps/default/readme.md index 5f9e635dfe..517baa5726 100644 --- a/keyboards/bear_face/v2/keymaps/default/readme.md +++ b/keyboards/bear_face/v2/keymaps/default/readme.md @@ -13,3 +13,7 @@ This layout replaces the stock layout on the Vortex Race 3. * 'Reset' will put the keyboard into DFU mode * 'APP' sends 'KC_APP' * Base layer toggles for QWERTY, COLEMAK, and DVORAK layouts (will persist after reboot) + +- New things in v2: + * Option of ANSI or ISO layout + * Optional stepped caps (will require compatible plate) diff --git a/keyboards/bear_face/v2/keymaps/default_iso/keymap.c b/keyboards/bear_face/v2/keymaps/default_iso/keymap.c index e9e6c837f4..a5e96207f6 100644 --- a/keyboards/bear_face/v2/keymaps/default_iso/keymap.c +++ b/keyboards/bear_face/v2/keymaps/default_iso/keymap.c @@ -1,19 +1,5 @@ -/* -Copyright 2020 chemicalwill <https://github.com/chemicalwill> - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ +/* Copyright 2024 will-hedges */ +/* SPDX-License-Identifier: GPL-2.0-or-later */ #include QMK_KEYBOARD_H @@ -28,7 +14,7 @@ enum layers { //custom keycode enums enum custom_keycodes { - BASE_QWER = SAFE_RANGE, + BASE_QWER = QK_USER, BASE_COLE, BASE_DVOR }; @@ -82,8 +68,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ }; -//macros to allow the user to set whatever default layer they want, even after reboot +//macros to allow the user to set whatever default layer they want, even after reboot bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case BASE_QWER: diff --git a/keyboards/bear_face/v2/v2.c b/keyboards/bear_face/v2/v2.c deleted file mode 100644 index b64a63f0b4..0000000000 --- a/keyboards/bear_face/v2/v2.c +++ /dev/null @@ -1,34 +0,0 @@ -/* -Copyright 2020 chemicalwill <https://github.com/chemicalwill> - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#include "quantum.h" - -void keyboard_pre_init_kb(void) { - //Sets LED pin as output - gpio_set_pin_output(F7); - - keyboard_pre_init_user(); -} - -bool led_update_kb(led_t led_state) { - // Caps Lock LED indicator toggling code here - bool res = led_update_user(led_state); - if(res) { - gpio_write_pin(F7, led_state.caps_lock); - } - return res; -} diff --git a/keyboards/bear_face/v3/keyboard.json b/keyboards/bear_face/v3/keyboard.json new file mode 100644 index 0000000000..0a0bda8df9 --- /dev/null +++ b/keyboards/bear_face/v3/keyboard.json @@ -0,0 +1,287 @@ +{ + "keyboard_name": "bear_face v3", + "usb": { + "device_version": "3.2.0" + }, + "layouts": { + "LAYOUT_all": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "w": 1.5}, + {"matrix": [0, 1], "x": 1.5, "y": 0}, + {"matrix": [0, 2], "x": 2.5, "y": 0}, + {"matrix": [0, 3], "x": 3.5, "y": 0}, + {"matrix": [0, 4], "x": 4.5, "y": 0}, + {"matrix": [0, 5], "x": 5.5, "y": 0}, + {"matrix": [0, 6], "x": 6.5, "y": 0}, + {"matrix": [0, 7], "x": 7.5, "y": 0}, + {"matrix": [0, 8], "x": 8.5, "y": 0}, + {"matrix": [0, 9], "x": 9.5, "y": 0}, + {"matrix": [0, 10], "x": 10.5, "y": 0}, + {"matrix": [0, 11], "x": 11.5, "y": 0}, + {"matrix": [0, 12], "x": 12.5, "y": 0}, + {"matrix": [0, 13], "x": 13.5, "y": 0}, + {"matrix": [0, 14], "x": 14.5, "y": 0, "w": 1.5}, + + {"matrix": [1, 0], "x": 0, "y": 1}, + {"matrix": [1, 1], "x": 1, "y": 1}, + {"matrix": [1, 2], "x": 2, "y": 1}, + {"matrix": [1, 3], "x": 3, "y": 1}, + {"matrix": [1, 4], "x": 4, "y": 1}, + {"matrix": [1, 5], "x": 5, "y": 1}, + {"matrix": [1, 6], "x": 6, "y": 1}, + {"matrix": [1, 7], "x": 7, "y": 1}, + {"matrix": [1, 8], "x": 8, "y": 1}, + {"matrix": [1, 9], "x": 9, "y": 1}, + {"matrix": [1, 10], "x": 10, "y": 1}, + {"matrix": [1, 11], "x": 11, "y": 1}, + {"matrix": [1, 12], "x": 12, "y": 1}, + {"matrix": [1, 13], "x": 13, "y": 1, "w": 2}, + {"matrix": [1, 14], "x": 15, "y": 1}, + + {"matrix": [2, 0], "x": 0, "y": 2, "w": 1.5}, + {"matrix": [2, 1], "x": 1.5, "y": 2}, + {"matrix": [2, 2], "x": 2.5, "y": 2}, + {"matrix": [2, 3], "x": 3.5, "y": 2}, + {"matrix": [2, 4], "x": 4.5, "y": 2}, + {"matrix": [2, 5], "x": 5.5, "y": 2}, + {"matrix": [2, 6], "x": 6.5, "y": 2}, + {"matrix": [2, 7], "x": 7.5, "y": 2}, + {"matrix": [2, 8], "x": 8.5, "y": 2}, + {"matrix": [2, 9], "x": 9.5, "y": 2}, + {"matrix": [2, 10], "x": 10.5, "y": 2}, + {"matrix": [2, 11], "x": 11.5, "y": 2}, + {"matrix": [2, 12], "x": 12.5, "y": 2}, + {"matrix": [2, 13], "x": 13.5, "y": 2, "w": 1.5}, + {"matrix": [2, 14], "x": 15, "y": 2}, + + {"matrix": [3, 0], "x": 0, "y": 3, "w": 1.75}, + {"matrix": [3, 1], "x": 1.75, "y": 3}, + {"matrix": [3, 2], "x": 2.75, "y": 3}, + {"matrix": [3, 3], "x": 3.75, "y": 3}, + {"matrix": [3, 4], "x": 4.75, "y": 3}, + {"matrix": [3, 5], "x": 5.75, "y": 3}, + {"matrix": [3, 6], "x": 6.75, "y": 3}, + {"matrix": [3, 7], "x": 7.75, "y": 3}, + {"matrix": [3, 8], "x": 8.75, "y": 3}, + {"matrix": [3, 9], "x": 9.75, "y": 3}, + {"matrix": [3, 10], "x": 10.75, "y": 3}, + {"matrix": [3, 11], "x": 11.75, "y": 3}, + {"matrix": [3, 12], "x": 12.75, "y": 3}, + {"matrix": [3, 13], "x": 13.75, "y": 2, "w": 1.25, "h": 2}, + {"matrix": [3, 14], "x": 15, "y": 3}, + + {"matrix": [4, 0], "x": 0, "y": 4, "w": 1.25}, + {"matrix": [4, 1], "x": 1.25, "y": 4}, + {"matrix": [4, 2], "x": 2.25, "y": 4}, + {"matrix": [4, 3], "x": 3.25, "y": 4}, + {"matrix": [4, 4], "x": 4.25, "y": 4}, + {"matrix": [4, 5], "x": 5.25, "y": 4}, + {"matrix": [4, 6], "x": 6.25, "y": 4}, + {"matrix": [4, 7], "x": 7.25, "y": 4}, + {"matrix": [4, 8], "x": 8.25, "y": 4}, + {"matrix": [4, 9], "x": 9.25, "y": 4}, + {"matrix": [4, 10], "x": 10.25, "y": 4}, + {"matrix": [4, 11], "x": 11.25, "y": 4}, + {"matrix": [4, 12], "x": 12.25, "y": 4, "w": 1.75}, + {"matrix": [4, 13], "x": 14, "y": 4}, + {"matrix": [4, 14], "x": 15, "y": 4}, + + {"matrix": [5, 0], "x": 0, "y": 5, "w": 1.25}, + {"matrix": [5, 1], "x": 1.25, "y": 5, "w": 1.25}, + {"matrix": [5, 2], "x": 2.5, "y": 5, "w": 1.25}, + {"matrix": [5, 5], "x": 3.75, "y": 5, "w": 6.25}, + {"matrix": [5, 9], "x": 10, "y": 5}, + {"matrix": [5, 10], "x": 11, "y": 5}, + {"matrix": [5, 11], "x": 12, "y": 5}, + {"matrix": [5, 12], "x": 13, "y": 5}, + {"matrix": [5, 13], "x": 14, "y": 5}, + {"matrix": [5, 14], "x": 15, "y": 5} + ] + }, + "LAYOUT_83_ansi": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "w": 1.5}, + {"matrix": [0, 1], "x": 1.5, "y": 0}, + {"matrix": [0, 2], "x": 2.5, "y": 0}, + {"matrix": [0, 3], "x": 3.5, "y": 0}, + {"matrix": [0, 4], "x": 4.5, "y": 0}, + {"matrix": [0, 5], "x": 5.5, "y": 0}, + {"matrix": [0, 6], "x": 6.5, "y": 0}, + {"matrix": [0, 7], "x": 7.5, "y": 0}, + {"matrix": [0, 8], "x": 8.5, "y": 0}, + {"matrix": [0, 9], "x": 9.5, "y": 0}, + {"matrix": [0, 10], "x": 10.5, "y": 0}, + {"matrix": [0, 11], "x": 11.5, "y": 0}, + {"matrix": [0, 12], "x": 12.5, "y": 0}, + {"matrix": [0, 13], "x": 13.5, "y": 0}, + {"matrix": [0, 14], "x": 14.5, "y": 0, "w": 1.5}, + + {"matrix": [1, 0], "x": 0, "y": 1}, + {"matrix": [1, 1], "x": 1, "y": 1}, + {"matrix": [1, 2], "x": 2, "y": 1}, + {"matrix": [1, 3], "x": 3, "y": 1}, + {"matrix": [1, 4], "x": 4, "y": 1}, + {"matrix": [1, 5], "x": 5, "y": 1}, + {"matrix": [1, 6], "x": 6, "y": 1}, + {"matrix": [1, 7], "x": 7, "y": 1}, + {"matrix": [1, 8], "x": 8, "y": 1}, + {"matrix": [1, 9], "x": 9, "y": 1}, + {"matrix": [1, 10], "x": 10, "y": 1}, + {"matrix": [1, 11], "x": 11, "y": 1}, + {"matrix": [1, 12], "x": 12, "y": 1}, + {"matrix": [1, 13], "x": 13, "y": 1, "w": 2}, + {"matrix": [1, 14], "x": 15, "y": 1}, + + {"matrix": [2, 0], "x": 0, "y": 2, "w": 1.5}, + {"matrix": [2, 1], "x": 1.5, "y": 2}, + {"matrix": [2, 2], "x": 2.5, "y": 2}, + {"matrix": [2, 3], "x": 3.5, "y": 2}, + {"matrix": [2, 4], "x": 4.5, "y": 2}, + {"matrix": [2, 5], "x": 5.5, "y": 2}, + {"matrix": [2, 6], "x": 6.5, "y": 2}, + {"matrix": [2, 7], "x": 7.5, "y": 2}, + {"matrix": [2, 8], "x": 8.5, "y": 2}, + {"matrix": [2, 9], "x": 9.5, "y": 2}, + {"matrix": [2, 10], "x": 10.5, "y": 2}, + {"matrix": [2, 11], "x": 11.5, "y": 2}, + {"matrix": [2, 12], "x": 12.5, "y": 2}, + {"matrix": [2, 13], "x": 13.5, "y": 2, "w": 1.5}, + {"matrix": [2, 14], "x": 15, "y": 2}, + + {"matrix": [3, 0], "x": 0, "y": 3, "w": 1.75}, + {"matrix": [3, 1], "x": 1.75, "y": 3}, + {"matrix": [3, 2], "x": 2.75, "y": 3}, + {"matrix": [3, 3], "x": 3.75, "y": 3}, + {"matrix": [3, 4], "x": 4.75, "y": 3}, + {"matrix": [3, 5], "x": 5.75, "y": 3}, + {"matrix": [3, 6], "x": 6.75, "y": 3}, + {"matrix": [3, 7], "x": 7.75, "y": 3}, + {"matrix": [3, 8], "x": 8.75, "y": 3}, + {"matrix": [3, 9], "x": 9.75, "y": 3}, + {"matrix": [3, 10], "x": 10.75, "y": 3}, + {"matrix": [3, 11], "x": 11.75, "y": 3}, + {"matrix": [3, 13], "x": 12.75, "y": 3, "w": 2.25}, + {"matrix": [3, 14], "x": 15, "y": 3}, + + {"matrix": [4, 0], "x": 0, "y": 4, "w": 2.25}, + {"matrix": [4, 2], "x": 2.25, "y": 4}, + {"matrix": [4, 3], "x": 3.25, "y": 4}, + {"matrix": [4, 4], "x": 4.25, "y": 4}, + {"matrix": [4, 5], "x": 5.25, "y": 4}, + {"matrix": [4, 6], "x": 6.25, "y": 4}, + {"matrix": [4, 7], "x": 7.25, "y": 4}, + {"matrix": [4, 8], "x": 8.25, "y": 4}, + {"matrix": [4, 9], "x": 9.25, "y": 4}, + {"matrix": [4, 10], "x": 10.25, "y": 4}, + {"matrix": [4, 11], "x": 11.25, "y": 4}, + {"matrix": [4, 12], "x": 12.25, "y": 4, "w": 1.75}, + {"matrix": [4, 13], "x": 14, "y": 4}, + {"matrix": [4, 14], "x": 15, "y": 4}, + + {"matrix": [5, 0], "x": 0, "y": 5, "w": 1.25}, + {"matrix": [5, 1], "x": 1.25, "y": 5, "w": 1.25}, + {"matrix": [5, 2], "x": 2.5, "y": 5, "w": 1.25}, + {"matrix": [5, 5], "x": 3.75, "y": 5, "w": 6.25}, + {"matrix": [5, 9], "x": 10, "y": 5}, + {"matrix": [5, 10], "x": 11, "y": 5}, + {"matrix": [5, 11], "x": 12, "y": 5}, + {"matrix": [5, 12], "x": 13, "y": 5}, + {"matrix": [5, 13], "x": 14, "y": 5}, + {"matrix": [5, 14], "x": 15, "y": 5} + ] + }, + "LAYOUT_84_iso": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "w": 1.5}, + {"matrix": [0, 1], "x": 1.5, "y": 0}, + {"matrix": [0, 2], "x": 2.5, "y": 0}, + {"matrix": [0, 3], "x": 3.5, "y": 0}, + {"matrix": [0, 4], "x": 4.5, "y": 0}, + {"matrix": [0, 5], "x": 5.5, "y": 0}, + {"matrix": [0, 6], "x": 6.5, "y": 0}, + {"matrix": [0, 7], "x": 7.5, "y": 0}, + {"matrix": [0, 8], "x": 8.5, "y": 0}, + {"matrix": [0, 9], "x": 9.5, "y": 0}, + {"matrix": [0, 10], "x": 10.5, "y": 0}, + {"matrix": [0, 11], "x": 11.5, "y": 0}, + {"matrix": [0, 12], "x": 12.5, "y": 0}, + {"matrix": [0, 13], "x": 13.5, "y": 0}, + {"matrix": [0, 14], "x": 14.5, "y": 0, "w": 1.5}, + + {"matrix": [1, 0], "x": 0, "y": 1}, + {"matrix": [1, 1], "x": 1, "y": 1}, + {"matrix": [1, 2], "x": 2, "y": 1}, + {"matrix": [1, 3], "x": 3, "y": 1}, + {"matrix": [1, 4], "x": 4, "y": 1}, + {"matrix": [1, 5], "x": 5, "y": 1}, + {"matrix": [1, 6], "x": 6, "y": 1}, + {"matrix": [1, 7], "x": 7, "y": 1}, + {"matrix": [1, 8], "x": 8, "y": 1}, + {"matrix": [1, 9], "x": 9, "y": 1}, + {"matrix": [1, 10], "x": 10, "y": 1}, + {"matrix": [1, 11], "x": 11, "y": 1}, + {"matrix": [1, 12], "x": 12, "y": 1}, + {"matrix": [1, 13], "x": 13, "y": 1, "w": 2}, + {"matrix": [1, 14], "x": 15, "y": 1}, + + {"matrix": [2, 0], "x": 0, "y": 2, "w": 1.5}, + {"matrix": [2, 1], "x": 1.5, "y": 2}, + {"matrix": [2, 2], "x": 2.5, "y": 2}, + {"matrix": [2, 3], "x": 3.5, "y": 2}, + {"matrix": [2, 4], "x": 4.5, "y": 2}, + {"matrix": [2, 5], "x": 5.5, "y": 2}, + {"matrix": [2, 6], "x": 6.5, "y": 2}, + {"matrix": [2, 7], "x": 7.5, "y": 2}, + {"matrix": [2, 8], "x": 8.5, "y": 2}, + {"matrix": [2, 9], "x": 9.5, "y": 2}, + {"matrix": [2, 10], "x": 10.5, "y": 2}, + {"matrix": [2, 11], "x": 11.5, "y": 2}, + {"matrix": [2, 12], "x": 12.5, "y": 2}, + {"matrix": [2, 14], "x": 15, "y": 2}, + + {"matrix": [3, 0], "x": 0, "y": 3, "w": 1.75}, + {"matrix": [3, 1], "x": 1.75, "y": 3}, + {"matrix": [3, 2], "x": 2.75, "y": 3}, + {"matrix": [3, 3], "x": 3.75, "y": 3}, + {"matrix": [3, 4], "x": 4.75, "y": 3}, + {"matrix": [3, 5], "x": 5.75, "y": 3}, + {"matrix": [3, 6], "x": 6.75, "y": 3}, + {"matrix": [3, 7], "x": 7.75, "y": 3}, + {"matrix": [3, 8], "x": 8.75, "y": 3}, + {"matrix": [3, 9], "x": 9.75, "y": 3}, + {"matrix": [3, 10], "x": 10.75, "y": 3}, + {"matrix": [3, 11], "x": 11.75, "y": 3}, + {"matrix": [3, 12], "x": 12.75, "y": 3}, + {"matrix": [3, 13], "x": 13.75, "y": 2, "w": 1.25, "h": 2}, + {"matrix": [3, 14], "x": 15, "y": 3}, + + {"matrix": [4, 0], "x": 0, "y": 4, "w": 1.25}, + {"matrix": [4, 1], "x": 1.25, "y": 4}, + {"matrix": [4, 2], "x": 2.25, "y": 4}, + {"matrix": [4, 3], "x": 3.25, "y": 4}, + {"matrix": [4, 4], "x": 4.25, "y": 4}, + {"matrix": [4, 5], "x": 5.25, "y": 4}, + {"matrix": [4, 6], "x": 6.25, "y": 4}, + {"matrix": [4, 7], "x": 7.25, "y": 4}, + {"matrix": [4, 8], "x": 8.25, "y": 4}, + {"matrix": [4, 9], "x": 9.25, "y": 4}, + {"matrix": [4, 10], "x": 10.25, "y": 4}, + {"matrix": [4, 11], "x": 11.25, "y": 4}, + {"matrix": [4, 12], "x": 12.25, "y": 4, "w": 1.75}, + {"matrix": [4, 13], "x": 14, "y": 4}, + {"matrix": [4, 14], "x": 15, "y": 4}, + + {"matrix": [5, 0], "x": 0, "y": 5, "w": 1.25}, + {"matrix": [5, 1], "x": 1.25, "y": 5, "w": 1.25}, + {"matrix": [5, 2], "x": 2.5, "y": 5, "w": 1.25}, + {"matrix": [5, 5], "x": 3.75, "y": 5, "w": 6.25}, + {"matrix": [5, 9], "x": 10, "y": 5}, + {"matrix": [5, 10], "x": 11, "y": 5}, + {"matrix": [5, 11], "x": 12, "y": 5}, + {"matrix": [5, 12], "x": 13, "y": 5}, + {"matrix": [5, 13], "x": 14, "y": 5}, + {"matrix": [5, 14], "x": 15, "y": 5} + ] + } + } +} diff --git a/keyboards/bear_face/v3/keymaps/default/keymap.c b/keyboards/bear_face/v3/keymaps/default/keymap.c new file mode 100644 index 0000000000..f6e71f1b34 --- /dev/null +++ b/keyboards/bear_face/v3/keymaps/default/keymap.c @@ -0,0 +1,92 @@ +/* Copyright 2024 will-hedges */ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#include QMK_KEYBOARD_H + +enum layers { + _QWER, + _COLE, + _DVOR, + _FN1, +}; + +#define FN1_CAPS LT(_FN1, KC_CAPS) + +//custom keycode enums +enum custom_keycodes { + BASE_QWER = QK_USER, + BASE_COLE, + BASE_DVOR +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWER] = LAYOUT_83_ansi( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_DEL, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, + FN1_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 + ), + + [_COLE] = LAYOUT_83_ansi( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, 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_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, + KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_ENT, KC_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [_DVOR] = LAYOUT_83_ansi( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, 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_LBRC, KC_RBRC, KC_BSPC, KC_HOME, + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSLS, KC_PGUP, + FN1_CAPS, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_ENT, KC_PGDN, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [_FN1] = LAYOUT_83_ansi( + _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, KC_PSCR, KC_SCRL, KC_PAUS, _______, KC_INS, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_CALC, BASE_QWER, + _______, _______, _______, _______, QK_BOOT, _______, _______, _______, _______, QK_BOOT, _______, _______, _______, _______, BASE_COLE, + _______, _______, QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, BASE_DVOR, + _______, KC_APP, _______, _______, _______, _______, _______, _______, _______, _______, KC_APP, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + +/* + [_BLANK] = LAYOUT_83_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +*/ +}; + + +// Macros to allow the user to set whatever default layer they want, even after reboot +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case BASE_QWER: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWER); + } + break; + case BASE_COLE: + if (record->event.pressed) { + set_single_persistent_default_layer(_COLE); + } + break; + case BASE_DVOR: + if (record->event.pressed) { + set_single_persistent_default_layer(_DVOR); + } + break; + } + return true; +}; diff --git a/keyboards/bear_face/v3/keymaps/default/readme.md b/keyboards/bear_face/v3/keymaps/default/readme.md new file mode 100644 index 0000000000..a86b77bb19 --- /dev/null +++ b/keyboards/bear_face/v3/keymaps/default/readme.md @@ -0,0 +1,18 @@ +# default bear_face layout + +This layout replaces the stock layout on the Vortex Race 3. + +- Caps Lock indicator LED is enabled by default +- Layer Tap on Caps Lock (tap for Caps Lock, hold for _FN1) +- FORCE_NKRO enabled by default + +- Pn key is set to 'KC_NO' by default + * Might be a good place for a macro, or to put your PC to sleep, etc. + +- A combined function layer that mimics the sublegends on the stock caps (regardless of layout) + * 'Reset' will put the keyboard into DFU mode + * 'APP' sends 'KC_APP' + * Base layer toggles for QWERTY, COLEMAK, and DVORAK layouts (will persist after reboot) + +- New things in v3: + * v3.1c PCB is compatible with both rev1 (Micro-USB) and rev2 (USB-C) stock cases diff --git a/keyboards/bear_face/v3/keymaps/default_iso/keymap.c b/keyboards/bear_face/v3/keymaps/default_iso/keymap.c new file mode 100644 index 0000000000..cc97d54a9b --- /dev/null +++ b/keyboards/bear_face/v3/keymaps/default_iso/keymap.c @@ -0,0 +1,92 @@ +/* Copyright 2024 will-hedges */ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#include QMK_KEYBOARD_H + +enum layers { + _QWER, + _COLE, + _DVOR, + _FN1, +}; + +#define FN1_CAPS LT(_FN1, KC_CAPS) + +//custom keycode enums +enum custom_keycodes { + BASE_QWER = QK_USER, + BASE_COLE, + BASE_DVOR +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWER] = LAYOUT_84_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_NO, 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_PGUP, + FN1_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(_FN1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [_COLE] = LAYOUT_84_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_NO, 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_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_PGUP, + KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_NUHS, KC_ENT, KC_PGDN, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [_DVOR] = LAYOUT_84_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_NO, 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_LBRC, KC_RBRC, KC_BSPC, KC_HOME, + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_PGUP, + FN1_CAPS, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_NUHS, KC_ENT, KC_PGDN, + KC_LSFT, KC_NUBS, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [_FN1] = LAYOUT_84_iso( + _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, KC_PSCR, KC_SCRL, KC_PAUS, _______, _______, KC_INS, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_CALC, BASE_QWER, + _______, _______, _______, _______, QK_BOOT, _______, _______, _______, _______, QK_BOOT, _______, _______, _______, BASE_COLE, + _______, _______, QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, BASE_DVOR, + _______, KC_APP, _______, _______, _______, _______, _______, _______, _______, _______, KC_APP, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + +/* + [_BLANK] = LAYOUT_84_iso( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +*/ +}; + + +// Macros to allow the user to set whatever default layer they want, even after reboot +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case BASE_QWER: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWER); + } + break; + case BASE_COLE: + if (record->event.pressed) { + set_single_persistent_default_layer(_COLE); + } + break; + case BASE_DVOR: + if (record->event.pressed) { + set_single_persistent_default_layer(_DVOR); + } + break; + } + return true; +}; diff --git a/keyboards/bear_face/v3/keymaps/default_iso/readme.md b/keyboards/bear_face/v3/keymaps/default_iso/readme.md new file mode 100644 index 0000000000..a86b77bb19 --- /dev/null +++ b/keyboards/bear_face/v3/keymaps/default_iso/readme.md @@ -0,0 +1,18 @@ +# default bear_face layout + +This layout replaces the stock layout on the Vortex Race 3. + +- Caps Lock indicator LED is enabled by default +- Layer Tap on Caps Lock (tap for Caps Lock, hold for _FN1) +- FORCE_NKRO enabled by default + +- Pn key is set to 'KC_NO' by default + * Might be a good place for a macro, or to put your PC to sleep, etc. + +- A combined function layer that mimics the sublegends on the stock caps (regardless of layout) + * 'Reset' will put the keyboard into DFU mode + * 'APP' sends 'KC_APP' + * Base layer toggles for QWERTY, COLEMAK, and DVORAK layouts (will persist after reboot) + +- New things in v3: + * v3.1c PCB is compatible with both rev1 (Micro-USB) and rev2 (USB-C) stock cases diff --git a/keyboards/beekeeb/piantor/keyboard.json b/keyboards/beekeeb/piantor/keyboard.json index e4ecd4207e..77bfc3678c 100644 --- a/keyboards/beekeeb/piantor/keyboard.json +++ b/keyboards/beekeeb/piantor/keyboard.json @@ -40,6 +40,9 @@ ["GP15", "GP14", "GP16", null, null, null] ] } + }, + "serial": { + "driver": "vendor" } }, "community_layouts": [ diff --git a/keyboards/beekeeb/piantor/rules.mk b/keyboards/beekeeb/piantor/rules.mk deleted file mode 100644 index 161ec22b16..0000000000 --- a/keyboards/beekeeb/piantor/rules.mk +++ /dev/null @@ -1 +0,0 @@ -SERIAL_DRIVER = vendor diff --git a/keyboards/beekeeb/piantor_pro/keyboard.json b/keyboards/beekeeb/piantor_pro/keyboard.json index c85247550e..ad4890ae68 100644 --- a/keyboards/beekeeb/piantor_pro/keyboard.json +++ b/keyboards/beekeeb/piantor_pro/keyboard.json @@ -24,7 +24,10 @@ "vid": "0xBEEB" }, "split": { - "enabled": true + "enabled": true, + "serial": { + "driver": "vendor" + } }, "community_layouts": [ "split_3x6_3" ], "layouts": { diff --git a/keyboards/beekeeb/piantor_pro/rules.mk b/keyboards/beekeeb/piantor_pro/rules.mk deleted file mode 100644 index 161ec22b16..0000000000 --- a/keyboards/beekeeb/piantor_pro/rules.mk +++ /dev/null @@ -1 +0,0 @@ -SERIAL_DRIVER = vendor diff --git a/keyboards/biacco42/ergo42/keymaps/default-illustrator/config.h b/keyboards/biacco42/ergo42/keymaps/default-illustrator/config.h deleted file mode 100644 index f0717a4632..0000000000 --- a/keyboards/biacco42/ergo42/keymaps/default-illustrator/config.h +++ /dev/null @@ -1,28 +0,0 @@ -/* -This is the c configuration file for the keymap - -Copyright 2012 Jun Wako <[email protected]> -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 <http://www.gnu.org/licenses/>. -*/ - -#pragma once - -/* Select hand configuration */ - -#define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS - diff --git a/keyboards/biacco42/ergo42/keymaps/default-underglow/config.h b/keyboards/biacco42/ergo42/keymaps/default-underglow/config.h index 2469b627e2..169a67d536 100644 --- a/keyboards/biacco42/ergo42/keymaps/default-underglow/config.h +++ b/keyboards/biacco42/ergo42/keymaps/default-underglow/config.h @@ -20,12 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Select hand configuration */ - -#define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS - // Underglow #undef RGBLIGHT_LED_COUNT #define RGBLIGHT_LED_COUNT 14 // Number of LEDs diff --git a/keyboards/biacco42/ergo42/keymaps/default/config.h b/keyboards/biacco42/ergo42/keymaps/default/config.h deleted file mode 100644 index f0717a4632..0000000000 --- a/keyboards/biacco42/ergo42/keymaps/default/config.h +++ /dev/null @@ -1,28 +0,0 @@ -/* -This is the c configuration file for the keymap - -Copyright 2012 Jun Wako <[email protected]> -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 <http://www.gnu.org/licenses/>. -*/ - -#pragma once - -/* Select hand configuration */ - -#define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS - diff --git a/keyboards/biacco42/ergo42/rev1/keyboard.json b/keyboards/biacco42/ergo42/rev1/keyboard.json index b3a53bb3a4..c75e9d1c51 100644 --- a/keyboards/biacco42/ergo42/rev1/keyboard.json +++ b/keyboards/biacco42/ergo42/rev1/keyboard.json @@ -33,7 +33,9 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D0" + "serial": { + "pin": "D0" + } }, "processor": "atmega32u4", "bootloader": "caterina", diff --git a/keyboards/bioi/g60/g60.c b/keyboards/bioi/g60/g60.c deleted file mode 100644 index 3fdfef8897..0000000000 --- a/keyboards/bioi/g60/g60.c +++ /dev/null @@ -1,28 +0,0 @@ -/* -Copyright 2019 Basic I/O Instruments(Scott Wei) <[email protected]> -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. -You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#include "quantum.h" - -void keyboard_pre_init_kb(void) { - gpio_set_pin_output(F0); - gpio_write_pin_high(F0); - keyboard_pre_init_user(); -} - -bool led_update_kb(led_t led_state) { - if (led_update_user(led_state)) { - gpio_write_pin(F0, !led_state.caps_lock); - } - return true; -} diff --git a/keyboards/bioi/g60/keyboard.json b/keyboards/bioi/g60/keyboard.json index 8d3dd58770..b98aee8273 100644 --- a/keyboards/bioi/g60/keyboard.json +++ b/keyboards/bioi/g60/keyboard.json @@ -35,6 +35,10 @@ "pin": "B7", "levels": 12 }, + "indicators": { + "caps_lock": "F0", + "on_state": 0 + }, "rgblight": { "saturation_steps": 8, "brightness_steps": 8, diff --git a/keyboards/bioi/morgan65/keyboard.json b/keyboards/bioi/morgan65/keyboard.json index 8f83237f82..5606233f2a 100644 --- a/keyboards/bioi/morgan65/keyboard.json +++ b/keyboards/bioi/morgan65/keyboard.json @@ -35,6 +35,10 @@ "pin": "B6", "levels": 12 }, + "indicators": { + "caps_lock": "F0", + "on_state": 0 + }, "rgblight": { "saturation_steps": 8, "brightness_steps": 8, diff --git a/keyboards/bioi/morgan65/morgan65.c b/keyboards/bioi/morgan65/morgan65.c deleted file mode 100644 index 3fdfef8897..0000000000 --- a/keyboards/bioi/morgan65/morgan65.c +++ /dev/null @@ -1,28 +0,0 @@ -/* -Copyright 2019 Basic I/O Instruments(Scott Wei) <[email protected]> -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. -You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#include "quantum.h" - -void keyboard_pre_init_kb(void) { - gpio_set_pin_output(F0); - gpio_write_pin_high(F0); - keyboard_pre_init_user(); -} - -bool led_update_kb(led_t led_state) { - if (led_update_user(led_state)) { - gpio_write_pin(F0, !led_state.caps_lock); - } - return true; -} diff --git a/keyboards/bioi/s65/keyboard.json b/keyboards/bioi/s65/keyboard.json index c55852f31c..56d53b54cf 100644 --- a/keyboards/bioi/s65/keyboard.json +++ b/keyboards/bioi/s65/keyboard.json @@ -35,6 +35,10 @@ "pin": "B6", "levels": 12 }, + "indicators": { + "caps_lock": "F0", + "on_state": 0 + }, "rgblight": { "saturation_steps": 8, "brightness_steps": 8, diff --git a/keyboards/bioi/s65/s65.c b/keyboards/bioi/s65/s65.c deleted file mode 100644 index e632f31eeb..0000000000 --- a/keyboards/bioi/s65/s65.c +++ /dev/null @@ -1,27 +0,0 @@ -/* -Copyright 2019 Basic I/O Instruments(Scott Wei) <[email protected]> -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. -You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#include "quantum.h" -void keyboard_pre_init_kb(void) { - gpio_set_pin_output(F0); - gpio_write_pin_high(F0); - keyboard_pre_init_user(); -} - -bool led_update_kb(led_t led_state) { - if (led_update_user(led_state)) { - gpio_write_pin(F0, !led_state.caps_lock); - } - return true; -} diff --git a/keyboards/blank_tehnologii/manibus/keyboard.json b/keyboards/blank_tehnologii/manibus/keyboard.json index f6cd41758d..eeabe64f36 100644 --- a/keyboards/blank_tehnologii/manibus/keyboard.json +++ b/keyboards/blank_tehnologii/manibus/keyboard.json @@ -24,12 +24,14 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D0", "matrix_pins": { "right": { "cols": ["B6", "B5", "D6", "D5", "D3", "D7", "B4"], "rows": ["F5", "F1", "B2", "B1", "C6"] } + }, + "serial": { + "pin": "D0" } }, "processor": "atmega32u4", diff --git a/keyboards/bluebell/swoop/keyboard.json b/keyboards/bluebell/swoop/keyboard.json index 5cc29818b8..08f61ac20d 100644 --- a/keyboards/bluebell/swoop/keyboard.json +++ b/keyboards/bluebell/swoop/keyboard.json @@ -42,13 +42,15 @@ }, "split": { "enabled": true, - "soft_serial_pin": "D2", "encoder": { "right": { "rotary": [ {"pin_a": "B5", "pin_b": "B4"} ] } + }, + "serial": { + "pin": "D2" } }, "processor": "atmega32u4", diff --git a/keyboards/boardsource/equals/equals.c b/keyboards/boardsource/equals/equals.c index 074fa3df3e..78f9ce30b8 100644 --- a/keyboards/boardsource/equals/equals.c +++ b/keyboards/boardsource/equals/equals.c @@ -49,6 +49,5 @@ void keyboard_post_init_kb(void) { void housekeeping_task_kb(void) { ui_task(); - housekeeping_task_user(); } #endif // QUANTUM_PAINTER_ENABLE diff --git a/keyboards/boardsource/lib/oled.c b/keyboards/boardsource/lib/oled.c new file mode 100644 index 0000000000..c0fb6ab4a6 --- /dev/null +++ b/keyboards/boardsource/lib/oled.c @@ -0,0 +1,20 @@ +// Copyright 2024 jack (@waffle87) +// SPDX-License-Identifier: GPL-2.0-or-later +#include "oled.h" + +void render_layer_state(void) { + switch (get_highest_layer(layer_state)) { + case 0: + oled_write_raw_P(layer0_img, sizeof(layer0_img)); + break; + case 1: + oled_write_raw_P(layer1_img, sizeof(layer1_img)); + break; + case 2: + oled_write_raw_P(layer2_img, sizeof(layer2_img)); + break; + case 3: + oled_write_raw_P(layer3_img, sizeof(layer3_img)); + break; + } +} diff --git a/keyboards/boardsource/unicorne/unicorne.h b/keyboards/boardsource/lib/oled.h index 68bbeeb18a..4778be20b0 100644 --- a/keyboards/boardsource/unicorne/unicorne.h +++ b/keyboards/boardsource/lib/oled.h @@ -1,54 +1,12 @@ -// Copyright 2023 jack (@waffle87) +// Copyright 2024 jack (@waffle87) // SPDX-License-Identifier: GPL-2.0-or-later #pragma once #include "quantum.h" -#ifdef OLED_ENABLE -// clang-format off -static const char PROGMEM logo[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, - 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, 0x80, 0xc0, 0xc0, 0xc0, 0xc0, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, - 0xc0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x01, 0xe3, 0xe7, 0xe7, 0xe3, - 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xc0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0x00, 0x00, 0x00, - 0x80, 0xc0, 0xc0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, - 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xc0, 0xc0, 0xe0, 0xe0, 0xe0, 0x00, 0x00, 0xe0, 0xe0, 0xe0, 0xe0, - 0x80, 0xc0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xe0, - 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xc0, 0xc0, 0xc0, - 0xc0, 0xc0, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, - 0x01, 0x01, 0x01, 0x01, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, - 0x00, 0x00, 0x00, 0x7e, 0xff, 0xff, 0xff, 0xe7, 0xc1, 0x81, 0x81, 0x81, 0xc1, 0x00, 0x00, 0x7f, - 0xff, 0xff, 0xff, 0xe3, 0xc1, 0x81, 0x81, 0xc1, 0xe3, 0xff, 0xff, 0xff, 0xff, 0x3c, 0x00, 0x00, - 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, - 0x03, 0x01, 0x01, 0x01, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xff, - 0xcd, 0x8c, 0x8c, 0x8c, 0x8d, 0xcf, 0xcf, 0xcf, 0xcf, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x03, 0x03, 0x07, 0x07, 0x07, - 0x07, 0x07, 0x07, 0x03, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x03, 0x03, 0x03, - 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x03, 0x03, 0x03, 0x00, 0x00, 0x00, 0x03, 0x03, 0x03, 0x03, - 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x03, 0x03, 0x07, 0x07, 0x07, 0x03, 0x03, 0x00, 0x00, 0x00, - 0x00, 0x01, 0x03, 0x03, 0x07, 0x07, 0x07, 0x07, 0x03, 0x03, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, - 0x03, 0x03, 0x03, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x03, 0x03, - 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x03, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x03, - 0x07, 0x07, 0x07, 0x07, 0x07, 0x03, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -}; +void render_layer_state(void); -static const char PROGMEM layer_zero[] = { +// clang-format off +static const char PROGMEM layer0_img[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0x18, 0x30, 0x60, 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, @@ -83,8 +41,7 @@ static const char PROGMEM layer_zero[] = { 0x00, 0x01, 0x03, 0x07, 0x06, 0x0c, 0x0c, 0x0c, 0x0c, 0x07, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00 }; - -static const char PROGMEM layer_one[] = { +static const char PROGMEM layer1_img[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0x18, 0x30, 0x60, 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, @@ -119,8 +76,7 @@ static const char PROGMEM layer_one[] = { 0x00, 0x01, 0x03, 0x07, 0x06, 0x0c, 0x0c, 0x0c, 0x0c, 0x07, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00 }; - -static const char PROGMEM layer_two[] = { +static const char PROGMEM layer2_img[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0x18, 0x30, 0x60, 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, @@ -155,8 +111,7 @@ static const char PROGMEM layer_two[] = { 0x00, 0x01, 0x03, 0x07, 0x06, 0x0c, 0x0c, 0x0c, 0x0c, 0x07, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00 }; - -static const char PROGMEM layer_three[] = { +static const char PROGMEM layer3_img[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0x18, 0x30, 0x60, 0xe0, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, @@ -190,5 +145,39 @@ static const char PROGMEM layer_three[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x01, 0x03, 0x07, 0x06, 0x0c, 0x0c, 0x0c, 0x0c, 0x07, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00 }; + +static const char PROGMEM bs_logo_img[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xc0, 0xc0, 0x60, 0x60, 0x60, + 0x60, 0x60, 0xc0, 0xc0, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xf0, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xf0, 0xe0, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, + 0x00, 0xe0, 0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0xfc, 0x1e, 0x07, 0x03, 0x01, 0x00, 0x00, 0x00, 0x80, 0xc0, + 0x80, 0x00, 0x00, 0x00, 0x01, 0x03, 0x07, 0x0e, 0xfc, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, + 0xe0, 0xc0, 0x80, 0x80, 0xc0, 0xc0, 0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, + 0x00, 0x1f, 0xff, 0xff, 0xc0, 0xc0, 0x80, 0xc0, 0xc0, 0xe0, 0xff, 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, 0x07, 0x1f, 0x78, 0xe0, 0xc0, 0x80, 0x80, 0x00, 0x00, 0x00, 0x01, + 0x01, 0x00, 0x00, 0x80, 0x80, 0xc0, 0xe0, 0x78, 0x3f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x00, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x03, 0x03, 0x03, 0x03, 0x03, + 0x03, 0x03, 0x03, 0x03, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +}; // clang-format on -#endif diff --git a/keyboards/boardsource/lulu/avr/keyboard.json b/keyboards/boardsource/lulu/avr/keyboard.json index 73f86a435f..ce9fa7c0a6 100644 --- a/keyboards/boardsource/lulu/avr/keyboard.json +++ b/keyboards/boardsource/lulu/avr/keyboard.json @@ -8,7 +8,9 @@ "rows": ["C6", "D7", "E6", "B4", "B5"] }, "split": { - "soft_serial_pin": "D2" + "serial": { + "pin": "D2" + } }, "ws2812": { "pin": "D3" diff --git a/keyboards/boardsource/lulu/avr/rules.mk b/keyboards/boardsource/lulu/avr/rules.mk new file mode 100644 index 0000000000..de6a3d8afc --- /dev/null +++ b/keyboards/boardsource/lulu/avr/rules.mk @@ -0,0 +1 @@ +SRC += lib/oled.c diff --git a/keyboards/boardsource/lulu/lulu.c b/keyboards/boardsource/lulu/lulu.c index 8d011268c4..b20228a7d7 100644 --- a/keyboards/boardsource/lulu/lulu.c +++ b/keyboards/boardsource/lulu/lulu.c @@ -1,6 +1,7 @@ // Copyright 2022 Cole Smith <[email protected]> // SPDX-License-Identifier: GPL-2.0-or-later #include "quantum.h" +#include "lib/oled.h" #ifdef ENCODER_ENABLE bool encoder_update_kb(uint8_t index, bool clockwise) { @@ -24,225 +25,20 @@ bool encoder_update_kb(uint8_t index, bool clockwise) { #ifdef OLED_ENABLE oled_rotation_t oled_init_kb(oled_rotation_t rotation) { - if (!is_keyboard_master()) { - return OLED_ROTATION_180; - } - return rotation; -} - -void render_layer1_logo(void){ - static const char PROGMEM layer_logo[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0x18, 0x30, 0x60, 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, 0x80, 0x80, 0x80, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0xc0, - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc8, 0xf8, 0xf0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x02, 0x02, 0x0f, 0x0f, 0x02, 0x02, 0x02, 0x02, 0x03, 0x03, - 0x03, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, - 0xfc, 0x0e, 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, 0xf0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0xc0, 0x80, 0x00, - 0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xf0, 0x60, - 0xe0, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x70, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x03, 0x07, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x07, 0x03, 0x01, 0x03, 0x07, - 0x07, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, - 0x00, 0x01, 0x03, 0x07, 0x06, 0x0c, 0x0c, 0x0c, 0x0c, 0x07, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00 - }; - oled_write_raw_P(layer_logo, sizeof(layer_logo)); -} - -void render_layer2_logo(void){ - static const char PROGMEM layer_logo[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0x18, 0x30, 0x60, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0xc0, - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc8, 0xf8, 0xf0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x02, 0x02, 0x0f, 0x0f, 0x02, 0x02, 0x02, 0x02, 0x03, 0x03, - 0x03, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0xc0, 0x80, 0x00, - 0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, - 0x3f, 0x70, 0xe0, 0xc0, 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, 0xf8, 0xf0, 0x60, - 0xe0, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x70, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x03, 0x07, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x07, 0x03, 0x01, 0x03, 0x07, - 0x07, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, - 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, - 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, - 0x00, 0x01, 0x03, 0x07, 0x06, 0x0c, 0x0c, 0x0c, 0x0c, 0x07, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00 - }; - oled_write_raw_P(layer_logo, sizeof(layer_logo)); -} - -void render_layer3_logo(void){ - static const char PROGMEM layer_logo[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0x18, 0x30, 0x60, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0xc0, - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc8, 0xf8, 0xf0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x02, 0x02, 0x0f, 0x0f, 0x02, 0x02, 0x02, 0x02, 0x03, 0x03, - 0x03, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0xc0, 0x80, 0x00, - 0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0xc0, 0xc0, 0xe0, 0x70, 0x38, 0x1f, 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, 0xf8, 0xf0, 0x60, - 0xe0, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x70, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x03, 0x07, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x07, 0x03, 0x01, 0x03, 0x07, - 0x07, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, - 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, - 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, 0x0f, 0x0f, 0x00, - 0x00, 0x01, 0x03, 0x07, 0x06, 0x0c, 0x0c, 0x0c, 0x0c, 0x07, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00 - }; - oled_write_raw_P(layer_logo, sizeof(layer_logo)); -} - -void render_layer4_logo(void){ - static const char PROGMEM layer_logo[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0x18, 0x30, 0x60, 0xe0, 0xc0, 0x80, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 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, 0xc0, 0xc0, 0xc0, - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc8, 0xf8, 0xf0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x02, 0x02, 0x0f, 0x0f, 0x02, 0x02, 0x02, 0x02, 0x03, 0x03, - 0x03, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 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, 0x03, 0x07, 0x0e, 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, 0x00, 0x00, 0x00, 0x00, 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, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0xc0, 0x80, 0x00, - 0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xf0, 0x60, - 0xe0, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x70, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x03, 0x07, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x07, 0x03, 0x01, 0x03, 0x07, - 0x07, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, - 0x00, 0x01, 0x03, 0x07, 0x06, 0x0c, 0x0c, 0x0c, 0x0c, 0x07, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00 - }; - oled_write_raw_P(layer_logo, sizeof(layer_logo)); -} - -void render_logo(void) { - static const char PROGMEM logo[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xc0, 0xc0, 0x60, 0x60, 0x60, - 0x60, 0x60, 0xc0, 0xc0, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xf0, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xf0, 0xe0, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, - 0x00, 0xe0, 0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0xfc, 0x1e, 0x07, 0x03, 0x01, 0x00, 0x00, 0x00, 0x80, 0xc0, - 0x80, 0x00, 0x00, 0x00, 0x01, 0x03, 0x07, 0x0e, 0xfc, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, - 0xe0, 0xc0, 0x80, 0x80, 0xc0, 0xc0, 0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x1f, 0xff, 0xff, 0xc0, 0xc0, 0x80, 0xc0, 0xc0, 0xe0, 0xff, 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, 0x07, 0x1f, 0x78, 0xe0, 0xc0, 0x80, 0x80, 0x00, 0x00, 0x00, 0x01, - 0x01, 0x00, 0x00, 0x80, 0x80, 0xc0, 0xe0, 0x78, 0x3f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, - 0x00, 0x00, 0x00, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x03, 0x03, 0x03, 0x03, 0x03, - 0x03, 0x03, 0x03, 0x03, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }; - oled_write_raw_P(logo, sizeof(logo)); -} - -void process_layer_state(void) { - switch (get_highest_layer(layer_state)) { - case 0: - render_layer1_logo(); - break; - case 1: - render_layer2_logo(); - break; - case 2: - render_layer3_logo(); - break; - case 3: - render_layer4_logo(); - break; + if (!is_keyboard_master()) { + return OLED_ROTATION_180; } + return rotation; } bool oled_task_kb(void) { - if (!oled_task_user()) { return false; } + if (!oled_task_user()) { + return false; + } if (is_keyboard_master()) { - process_layer_state(); + render_layer_state(); } else { - render_logo(); + oled_write_raw_P(bs_logo_img, sizeof(bs_logo_img)); } return false; } diff --git a/keyboards/boardsource/lulu/rp2040/keyboard.json b/keyboards/boardsource/lulu/rp2040/keyboard.json index a1e8db89a9..db0b7a50c6 100644 --- a/keyboards/boardsource/lulu/rp2040/keyboard.json +++ b/keyboards/boardsource/lulu/rp2040/keyboard.json @@ -10,6 +10,11 @@ {"pin_a": "GP8", "pin_b": "GP9"} ] }, + "split": { + "serial": { + "driver": "vendor" + } + }, "ws2812": { "pin": "GP29", "driver": "vendor" diff --git a/keyboards/boardsource/lulu/rp2040/rules.mk b/keyboards/boardsource/lulu/rp2040/rules.mk index 161ec22b16..de6a3d8afc 100644 --- a/keyboards/boardsource/lulu/rp2040/rules.mk +++ b/keyboards/boardsource/lulu/rp2040/rules.mk @@ -1 +1 @@ -SERIAL_DRIVER = vendor +SRC += lib/oled.c diff --git a/keyboards/boardsource/microdox/v1/keyboard.json b/keyboards/boardsource/microdox/v1/keyboard.json index d35a58777e..f13f943572 100644 --- a/keyboards/boardsource/microdox/v1/keyboard.json +++ b/keyboards/boardsource/microdox/v1/keyboard.json @@ -10,7 +10,9 @@ "device_version": "1.0.0" }, "split": { - "soft_serial_pin": "D2" + "serial": { + "pin": "D2" + } }, "rgblight": { "sleep": true, diff --git a/keyboards/boardsource/microdox/v2/keyboard.json b/keyboards/boardsource/microdox/v2/keyboard.json index 94577059c5..d733af7a03 100644 --- a/keyboards/boardsource/microdox/v2/keyboard.json +++ b/keyboards/boardsource/microdox/v2/keyboard.json @@ -19,7 +19,6 @@ ] }, "split": { - "soft_serial_pin": "D3", "matrix_pins": { "right": { "cols": ["F4", "B1", "D7", "C6", "B3"], @@ -32,6 +31,9 @@ {"pin_a": "B6", "pin_b": "B2"} ] } + }, + "serial": { + "pin": "D3" } }, "rgb_matrix": { diff --git a/keyboards/boardsource/the_q/keyboard.json b/keyboards/boardsource/the_q/keyboard.json new file mode 100644 index 0000000000..b48b5e080b --- /dev/null +++ b/keyboards/boardsource/the_q/keyboard.json @@ -0,0 +1,142 @@ +{ + "manufacturer": "Boardsource", + "keyboard_name": "The Q", + "maintainer": "waffle87", + "development_board": "promicro", + "diode_direction": "COL2ROW", + "features": { + "bootmagic": true, + "extrakey": true, + "mousekey": true, + "nkro": true, + "rgb_matrix": true, + "oled": true + }, + "matrix_pins": { + "rows": ["B2", "B3", "B1", "F7", "F6", "F5", "F4"], + "cols": ["D4", "C6", "D7", "E6", "B4", "B5"] + }, + "url": "https://boardsource.xyz", + "usb": { + "device_version": "1.0.0", + "pid": "0x7552", + "vid": "0x4273" + }, + "ws2812": { + "pin": "B6" + }, + "rgb_matrix": { + "animations": { + "alphas_mods": true, + "band_sat": true, + "band_val": true, + "breathing": true, + "gradient_left_right": true, + "gradient_up_down": true + }, + "default": { + "animation": "alphas_mods" + }, + "max_brightness": 150, + "driver": "ws2812", + "layout": [ + {"x": 112, "y": 10, "flags": 2}, + {"x": 181, "y": 5, "flags": 2}, + {"x": 215, "y": 53, "flags": 2}, + {"x": 112, "y": 64, "flags": 2}, + {"x": 26, "y": 53, "flags": 2}, + {"x": 43, "y": 5, "flags": 2}, + {"matrix": [0, 1], "x": 17, "y": 0, "flags": 4}, + {"matrix": [1, 1], "x": 17, "y": 42, "flags": 4}, + {"matrix": [2, 1], "x": 17, "y": 21, "flags": 4}, + {"matrix": [2, 2], "x": 34, "y": 21, "flags": 4}, + {"matrix": [1, 2], "x": 34, "y": 42, "flags": 4}, + {"matrix": [0, 2], "x": 34, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 52, "y": 0, "flags": 4}, + {"matrix": [1, 3], "x": 52, "y": 42, "flags": 4}, + {"matrix": [2, 3], "x": 52, "y": 21, "flags": 4}, + {"matrix": [2, 4], "x": 69, "y": 21, "flags": 4}, + {"matrix": [1, 4], "x": 69, "y": 42, "flags": 4}, + {"matrix": [0, 4], "x": 69, "y": 0, "flags": 4}, + {"matrix": [0, 5], "x": 86, "y": 0, "flags": 4}, + {"matrix": [1, 5], "x": 86, "y": 42, "flags": 4}, + {"matrix": [2, 5], "x": 86, "y": 21, "flags": 4}, + {"matrix": [3, 0], "x": 69, "y": 20, "flags": 1}, + {"matrix": [3, 1], "x": 86, "y": 20, "flags": 1}, + {"matrix": [3, 2], "x": 103, "y": 64, "flags": 1}, + {"matrix": [3, 3], "x": 120, "y": 64, "flags": 1}, + {"matrix": [3, 4], "x": 138, "y": 20, "flags": 1}, + {"matrix": [3, 5], "x": 155, "y": 20, "flags": 1}, + {"matrix": [4, 5], "x": 138, "y": 21, "flags": 4}, + {"matrix": [5, 5], "x": 138, "y": 42, "flags": 4}, + {"matrix": [6, 5], "x": 138, "y": 0, "flags": 4}, + {"matrix": [6, 4], "x": 155, "y": 0, "flags": 4}, + {"matrix": [5, 4], "x": 155, "y": 42, "flags": 4}, + {"matrix": [4, 4], "x": 155, "y": 21, "flags": 4}, + {"matrix": [4, 3], "x": 172, "y": 21, "flags": 4}, + {"matrix": [5, 3], "x": 172, "y": 42, "flags": 4}, + {"matrix": [6, 3], "x": 172, "y": 0, "flags": 4}, + {"matrix": [6, 2], "x": 189, "y": 0, "flags": 4}, + {"matrix": [5, 2], "x": 189, "y": 42, "flags": 4}, + {"matrix": [4, 2], "x": 189, "y": 21, "flags": 4}, + {"matrix": [4, 1], "x": 206, "y": 21, "flags": 4}, + {"matrix": [5, 1], "x": 206, "y": 42, "flags": 4}, + {"matrix": [6, 1], "x": 206, "y": 0, "flags": 4}, + {"matrix": [6, 0], "x": 224, "y": 0, "flags": 1}, + {"matrix": [5, 0], "x": 224, "y": 42, "flags": 1}, + {"matrix": [4, 0], "x": 224, "y": 21, "flags": 1}, + {"matrix": [2, 0], "x": 0, "y": 21, "flags": 1}, + {"matrix": [1, 0], "x": 0, "y": 42, "flags": 1}, + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1} + ] + }, + "community_layouts": ["split_3x6_3"], + "layouts": { + "LAYOUT_split_3x6_3": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0.25}, + {"matrix": [0, 1], "x": 1, "y": 0.25}, + {"matrix": [0, 2], "x": 2, "y": 0.125}, + {"matrix": [0, 3], "x": 3, "y": 0}, + {"matrix": [0, 4], "x": 4, "y": 0.125}, + {"matrix": [0, 5], "x": 5, "y": 0.25}, + {"matrix": [6, 5], "x": 8, "y": 0.25}, + {"matrix": [6, 4], "x": 9, "y": 0.125}, + {"matrix": [6, 3], "x": 10, "y": 0}, + {"matrix": [6, 2], "x": 11, "y": 0.125}, + {"matrix": [6, 1], "x": 12, "y": 0.25}, + {"matrix": [6, 0], "x": 13, "y": 0.25}, + {"matrix": [1, 0], "x": 0, "y": 1.25}, + {"matrix": [1, 1], "x": 1, "y": 1.25}, + {"matrix": [1, 2], "x": 2, "y": 1.125}, + {"matrix": [1, 3], "x": 3, "y": 1}, + {"matrix": [1, 4], "x": 4, "y": 1.125}, + {"matrix": [1, 5], "x": 5, "y": 1.25}, + {"matrix": [5, 5], "x": 8, "y": 1.25}, + {"matrix": [5, 4], "x": 9, "y": 1.125}, + {"matrix": [5, 3], "x": 10, "y": 1}, + {"matrix": [5, 2], "x": 11, "y": 1.125}, + {"matrix": [5, 1], "x": 12, "y": 1.25}, + {"matrix": [5, 0], "x": 13, "y": 1.25}, + {"matrix": [2, 0], "x": 0, "y": 2.25}, + {"matrix": [2, 1], "x": 1, "y": 2.25}, + {"matrix": [2, 2], "x": 2, "y": 2.125}, + {"matrix": [2, 3], "x": 3, "y": 2}, + {"matrix": [2, 4], "x": 4, "y": 2.125}, + {"matrix": [2, 5], "x": 5, "y": 2.25}, + {"matrix": [4, 5], "x": 8, "y": 2.25}, + {"matrix": [4, 4], "x": 9, "y": 2.125}, + {"matrix": [4, 3], "x": 10, "y": 2}, + {"matrix": [4, 2], "x": 11, "y": 2.125}, + {"matrix": [4, 1], "x": 12, "y": 2.25}, + {"matrix": [4, 0], "x": 13, "y": 2.25}, + {"matrix": [3, 0], "x": 3.5, "y": 3.25}, + {"matrix": [3, 1], "x": 4.5, "y": 3.5}, + {"matrix": [3, 2], "x": 5.5, "y": 3.75}, + {"matrix": [3, 3], "x": 7.5, "y": 3.75}, + {"matrix": [3, 4], "x": 8.5, "y": 3.5}, + {"matrix": [3, 5], "x": 9.5, "y": 3.25} + ] + } + } +} diff --git a/keyboards/boardsource/the_q/keymaps/default/keymap.json b/keyboards/boardsource/the_q/keymaps/default/keymap.json new file mode 100644 index 0000000000..69aa6f8629 --- /dev/null +++ b/keyboards/boardsource/the_q/keymaps/default/keymap.json @@ -0,0 +1,25 @@ +{ + "keyboard": "boardsource/the_q", + "keymap": "default", + "layout": "LAYOUT_split_3x6_3", + "layers": [ + [ + "KC_TAB", "KC_Q", "KC_W", "KC_E", "KC_R", "KC_T", "KC_Y", "KC_U", "KC_I", "KC_O", "KC_P", "KC_BSPC", + "KC_LCTL", "KC_A", "KC_S", "KC_D", "KC_F", "KC_G", "KC_H", "KC_J", "KC_K", "KC_L", "KC_SCLN", "KC_QUOT", + "KC_LSFT", "KC_Z", "KC_X", "KC_C", "KC_V", "KC_B", "KC_N", "KC_M", "KC_COMM", "KC_DOT", "KC_SLSH", "KC_ESC", + "KC_LGUI", "MO(1)", "KC_SPC", "KC_ENT", "MO(2)", "KC_RALT" + ], + [ + "_______", "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", "_______", + "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", + "_______", "_______", "_______", "_______", "_______", "_______" + ], + [ + "QK_BOOT", "_______", "_______", "_______", "_______", "_______", "RGB_VAI", "RGB_HUI", "RGB_SAI", "RGB_MOD", "RGB_TOG", "_______", + "EE_CLR", "_______", "_______", "_______", "_______", "_______", "RGB_VAD", "RGB_HUD", "RGB_SAD", "RGB_RMOD", "_______", "_______", + "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", + "_______", "_______", "_______", "_______", "_______", "_______" + ] + ] +} diff --git a/keyboards/boardsource/the_q/keymaps/via/keymap.json b/keyboards/boardsource/the_q/keymaps/via/keymap.json new file mode 100644 index 0000000000..40a68c3f51 --- /dev/null +++ b/keyboards/boardsource/the_q/keymaps/via/keymap.json @@ -0,0 +1,30 @@ +{ + "keyboard": "boardsource/the_q", + "keymap": "via", + "layout": "LAYOUT_split_3x6_3", + "config": { + "features": { + "via": true + } + }, + "layers": [ + [ + "KC_TAB", "KC_Q", "KC_W", "KC_E", "KC_R", "KC_T", "KC_Y", "KC_U", "KC_I", "KC_O", "KC_P", "KC_BSPC", + "KC_LCTL", "KC_A", "KC_S", "KC_D", "KC_F", "KC_G", "KC_H", "KC_J", "KC_K", "KC_L", "KC_SCLN", "KC_QUOT", + "KC_LSFT", "KC_Z", "KC_X", "KC_C", "KC_V", "KC_B", "KC_N", "KC_M", "KC_COMM", "KC_DOT", "KC_SLSH", "KC_ESC", + "KC_LGUI", "MO(1)", "KC_SPC", "KC_ENT", "MO(2)", "KC_RALT" + ], + [ + "_______", "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", "_______", + "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", + "_______", "_______", "_______", "_______", "_______", "_______" + ], + [ + "QK_BOOT", "_______", "_______", "_______", "_______", "_______", "RGB_VAI", "RGB_HUI", "RGB_SAI", "RGB_MOD", "RGB_TOG", "_______", + "EE_CLR", "_______", "_______", "_______", "_______", "_______", "RGB_VAD", "RGB_HUD", "RGB_SAD", "RGB_RMOD", "_______", "_______", + "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", + "_______", "_______", "_______", "_______", "_______", "_______" + ] + ] +} diff --git a/keyboards/boardsource/the_q/readme.md b/keyboards/boardsource/the_q/readme.md new file mode 100644 index 0000000000..9ec8fe8eda --- /dev/null +++ b/keyboards/boardsource/the_q/readme.md @@ -0,0 +1,23 @@ +# The Q + +* Keyboard Maintainer: [waffle87](https://github.com/waffle87) +* Hardware Supported: The Q PCB w/ Pro Micro style microcontroller +* Hardware Availability: [boardsource.xyz](https://boardsource.xyz) + +Make example for this keyboard (after setting up your build environment): + + make boardsource/the_q:default + +Flashing example for this keyboard: + + mke boardsource/the_q:default:flash + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). + +## Bootloader + +Enter the bootloader in 3 ways: + +* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (top left key) +* **Physical reset button**: Briefly press the button on the front of the PCB +* **Keycode in layout**: Press the key mapped to `QK_BOOT` diff --git a/keyboards/boardsource/the_q/rules.mk b/keyboards/boardsource/the_q/rules.mk new file mode 100644 index 0000000000..de6a3d8afc --- /dev/null +++ b/keyboards/boardsource/the_q/rules.mk @@ -0,0 +1 @@ +SRC += lib/oled.c diff --git a/keyboards/boardsource/the_q/the_q.c b/keyboards/boardsource/the_q/the_q.c new file mode 100644 index 0000000000..0929456911 --- /dev/null +++ b/keyboards/boardsource/the_q/the_q.c @@ -0,0 +1,14 @@ +// Copyright 2024 jack (@waffle87) +// SPDX-License-Identifier: GPL-2.0-or-later +#include "quantum.h" +#include "lib/oled.h" + +#ifdef OLED_ENABLE +bool oled_task_kb(void) { + if (!oled_task_user()) { + return false; + } + render_layer_state(); + return false; +} +#endif diff --git a/keyboards/boardsource/unicorne/keyboard.json b/keyboards/boardsource/unicorne/keyboard.json index 4fb63de9e3..da1c3a787e 100644 --- a/keyboards/boardsource/unicorne/keyboard.json +++ b/keyboards/boardsource/unicorne/keyboard.json @@ -20,7 +20,10 @@ }, "split": { "enabled": true, - "soft_serial_pin": "GP0", + "serial": { + "driver": "vendor", + "pin": "GP0" + }, "transport": { "sync": { "layer_state": true diff --git a/keyboards/boardsource/unicorne/rules.mk b/keyboards/boardsource/unicorne/rules.mk index 48b30dcd51..53d7e1b681 100644 --- a/keyboards/boardsource/unicorne/rules.mk +++ b/keyboards/boardsource/unicorne/rules.mk @@ -1,2 +1,2 @@ -SERIAL_DRIVER = vendor POINTING_DEVICE_DRIVER = analog_joystick +SRC += lib/oled.c diff --git a/keyboards/boardsource/unicorne/unicorne.c b/keyboards/boardsource/unicorne/unicorne.c index 22cd1e4a37..f9dac8d3ef 100644 --- a/keyboards/boardsource/unicorne/unicorne.c +++ b/keyboards/boardsource/unicorne/unicorne.c @@ -1,6 +1,7 @@ -// Copyright 2023 jack (@waffle87) +// Copyright 2024 jack (@waffle87) // SPDX-License-Identifier: GPL-2.0-or-later -#include "unicorne.h" +#include "quantum.h" +#include "lib/oled.h" #ifdef OLED_ENABLE oled_rotation_t oled_init_kb(oled_rotation_t rotation) { @@ -15,22 +16,9 @@ bool oled_task_kb(void) { return false; } if (is_keyboard_master()) { - switch (get_highest_layer(layer_state)) { - case 0: - oled_write_raw(layer_zero, sizeof(layer_zero)); - break; - case 1: - oled_write_raw(layer_one, sizeof(layer_one)); - break; - case 2: - oled_write_raw(layer_two, sizeof(layer_two)); - break; - case 3: - oled_write_raw(layer_three, sizeof(layer_three)); - break; - } + render_layer_state(); } else { - oled_write_raw(logo, sizeof(logo)); + oled_write_raw_P(bs_logo_img, sizeof(bs_logo_img)); } return false; } diff --git a/keyboards/boston_meetup/2019/config.h b/keyboards/boston_meetup/2019/config.h index a7dd952cd6..d5a476d999 100644 --- a/keyboards/boston_meetup/2019/config.h +++ b/keyboards/boston_meetup/2019/config.h @@ -85,6 +85,4 @@ #define DRV2605L_ZC_DET_TIME 0 #define DRV2605L_AUTO_CAL_TIME 3 -#define RGB_MATRIX_LED_COUNT 10 - #define SOLENOID_PIN A14 diff --git a/keyboards/budgy/keyboard.json b/keyboards/budgy/keyboard.json index 645336e8ad..0dc45c9da0 100644 --- a/keyboards/budgy/keyboard.json +++ b/keyboards/budgy/keyboard.json @@ -37,6 +37,9 @@ ["GP18", "GP17", null, null, null] ] } + }, + "serial": { + "driver": "vendor" } }, "community_layouts": ["split_3x5_2"], diff --git a/keyboards/budgy/rules.mk b/keyboards/budgy/rules.mk deleted file mode 100644 index 161ec22b16..0000000000 --- a/keyboards/budgy/rules.mk +++ /dev/null @@ -1 +0,0 @@ -SERIAL_DRIVER = vendor diff --git a/keyboards/buzzard/rev1/keyboard.json b/keyboards/buzzard/rev1/keyboard.json index dd17a82754..41c85de0fc 100644 --- a/keyboards/buzzard/rev1/keyboard.json +++ b/keyboards/buzzard/rev1/keyboard.json @@ -30,7 +30,9 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D2", + "serial": { + "pin": "D2" + }, "transport": { "sync": { "oled": true diff --git a/keyboards/cannonkeys/lib/satisfaction75/satisfaction_encoder.c b/keyboards/cannonkeys/lib/satisfaction75/satisfaction_encoder.c index aab005ebd8..7e0b82e9e7 100644 --- a/keyboards/cannonkeys/lib/satisfaction75/satisfaction_encoder.c +++ b/keyboards/cannonkeys/lib/satisfaction75/satisfaction_encoder.c @@ -101,7 +101,7 @@ uint16_t handle_encoder_clockwise(void){ mapped_code = KC_MEDIA_NEXT_TRACK; break; case ENC_MODE_SCROLL: - mapped_code = KC_WH_D; + mapped_code = QK_MOUSE_WHEEL_DOWN; break; #ifdef BACKLIGHT_ENABLE case ENC_MODE_BACKLIGHT: @@ -143,7 +143,7 @@ uint16_t handle_encoder_ccw(void){ mapped_code = KC_MEDIA_PREV_TRACK; break; case ENC_MODE_SCROLL: - mapped_code = KC_WH_U; + mapped_code = QK_MOUSE_WHEEL_UP; break; #ifdef BACKLIGHT_ENABLE case ENC_MODE_BACKLIGHT: @@ -186,7 +186,7 @@ uint16_t handle_encoder_press(void){ mapped_code = KC_MEDIA_PLAY_PAUSE; break; case ENC_MODE_SCROLL: - mapped_code = KC_BTN3; + mapped_code = QK_MOUSE_BUTTON_3; break; #ifdef BACKLIGHT_ENABLE case ENC_MODE_BACKLIGHT: diff --git a/keyboards/cantor/keyboard.json b/keyboards/cantor/keyboard.json index a9d84e6c8f..26b79c0280 100644 --- a/keyboards/cantor/keyboard.json +++ b/keyboards/cantor/keyboard.json @@ -39,6 +39,9 @@ ["A0", "A1", "A2", null, null, null] ] } + }, + "serial": { + "driver": "usart" } }, "community_layouts": ["split_3x6_3"], diff --git a/keyboards/cantor/rules.mk b/keyboards/cantor/rules.mk deleted file mode 100644 index c6e2988321..0000000000 --- a/keyboards/cantor/rules.mk +++ /dev/null @@ -1 +0,0 @@ -SERIAL_DRIVER = usart diff --git a/keyboards/capsunlocked/cu75/cu75.c b/keyboards/capsunlocked/cu75/cu75.c index e04dd74bc8..155b8958fc 100644 --- a/keyboards/capsunlocked/cu75/cu75.c +++ b/keyboards/capsunlocked/cu75/cu75.c @@ -29,12 +29,10 @@ void matrix_init_kb(void) #endif } -void matrix_scan_kb(void) -{ +void housekeeping_task_kb(void) { #ifdef WATCHDOG_ENABLE wdt_reset(); #endif - matrix_scan_user(); } void click(uint16_t freq, uint16_t duration){ @@ -56,17 +54,19 @@ bool process_record_kb(uint16_t keycode, keyrecord_t* record) if (click_toggle && record->event.pressed){ click(click_hz, click_time); } - if (keycode == QK_BOOT) { - reset_keyboard_kb(); - } return process_record_user(keycode, record); } -void reset_keyboard_kb(void){ +bool shutdown_kb(bool jump_to_bootloader) { #ifdef WATCHDOG_ENABLE + // Unconditionally run so shutdown_user can't mess up watchdog MCUSR = 0; wdt_disable(); wdt_reset(); #endif - reset_keyboard(); + + if (!shutdown_user(jump_to_bootloader)) { + return false; + } + return true; } diff --git a/keyboards/cheshire/curiosity/curiosity.c b/keyboards/cheshire/curiosity/curiosity.c deleted file mode 100644 index 2813cff9b4..0000000000 --- a/keyboards/cheshire/curiosity/curiosity.c +++ /dev/null @@ -1,17 +0,0 @@ -#include "quantum.h" - -void matrix_init_board(void){ - gpio_set_pin_output(A8); - gpio_set_pin_output(A9); - gpio_set_pin_output(A10); -} - -bool led_update_kb(led_t led_state) { - bool runDefault = led_update_user(led_state); - if (runDefault) { - gpio_write_pin(A8, !led_state.num_lock); - gpio_write_pin(A9, !led_state.caps_lock); - gpio_write_pin(A10, !led_state.scroll_lock); - } - return runDefault; -} diff --git a/keyboards/cheshire/curiosity/keyboard.json b/keyboards/cheshire/curiosity/keyboard.json index 679f2a45d1..b408a5b6e9 100644 --- a/keyboards/cheshire/curiosity/keyboard.json +++ b/keyboards/cheshire/curiosity/keyboard.json @@ -7,6 +7,12 @@ "pid": "0x0FAD", "device_version": "0.0.1" }, + "indicators": { + "caps_lock": "A9", + "num_lock": "A8", + "scroll_lock": "A10", + "on_state": 0 + }, "rgblight": { "led_count": 14, "animations": { diff --git a/keyboards/chew/config.h b/keyboards/chew/config.h index 22b43cf799..df672bc4e1 100644 --- a/keyboards/chew/config.h +++ b/keyboards/chew/config.h @@ -8,4 +8,3 @@ #define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 200U // In ms in which the double tap can occur #define EE_HANDS -#define SERIAL_USART_TX_PIN GP11 diff --git a/keyboards/chew/keyboard.json b/keyboards/chew/keyboard.json index f6ddaa627d..01175e6341 100644 --- a/keyboards/chew/keyboard.json +++ b/keyboards/chew/keyboard.json @@ -32,6 +32,10 @@ ] } }, + "serial": { + "driver": "vendor", + "pin": "GP11" + }, "transport": { "watchdog": true } diff --git a/keyboards/chew/rules.mk b/keyboards/chew/rules.mk deleted file mode 100644 index 161ec22b16..0000000000 --- a/keyboards/chew/rules.mk +++ /dev/null @@ -1 +0,0 @@ -SERIAL_DRIVER = vendor diff --git a/keyboards/cipulot/ec_980c/ec_980c.c b/keyboards/cipulot/ec_980c/ec_980c.c index 2b40d5a5e6..0e23c32335 100644 --- a/keyboards/cipulot/ec_980c/ec_980c.c +++ b/keyboards/cipulot/ec_980c/ec_980c.c @@ -86,6 +86,10 @@ void keyboard_post_init_kb(void) { * Num | Caps | Scroll | */ bool rgb_matrix_indicators_kb(void) { + if (!rgb_matrix_indicators_user()) { + return false; + } + if (eeprom_ec_config.num.enabled) { // The rgb_matrix_set_color function needs an RGB code to work, so first the indicator color is cast to an HSV value and then translated to RGB HSV hsv_num_indicator_color = {eeprom_ec_config.num.h, eeprom_ec_config.num.s, eeprom_ec_config.num.v}; diff --git a/keyboards/cipulot/ec_typek/config.h b/keyboards/cipulot/ec_typek/config.h index 1fad97e711..a6619c600c 100644 --- a/keyboards/cipulot/ec_typek/config.h +++ b/keyboards/cipulot/ec_typek/config.h @@ -73,7 +73,7 @@ #define WS2812_DMA_CHANNEL 6 #define WS2812_DMAMUX_ID STM32_DMAMUX1_TIM1_UP -#define RGBLIGHT_DEFAULT_VAL 175 +#define RGBLIGHT_DEFAULT_VAL 200 #define RGBLIGHT_DEFAULT_MODE (RGBLIGHT_MODE_RAINBOW_SWIRL + 5) #define NUM_INDICATOR_INDEX 2 diff --git a/keyboards/cipulot/ec_typek/ec_typek.c b/keyboards/cipulot/ec_typek/ec_typek.c index d8e0f9236e..b899ddbb8a 100644 --- a/keyboards/cipulot/ec_typek/ec_typek.c +++ b/keyboards/cipulot/ec_typek/ec_typek.c @@ -82,12 +82,14 @@ void keyboard_post_init_kb(void) { // This function gets called when caps, num, scroll change bool led_update_kb(led_t led_state) { - indicators_callback(); + if(led_update_user(led_state)) { + indicators_callback(); + } return true; } // This function is called when layers change -layer_state_t layer_state_set_user(layer_state_t state) { +__attribute__((weak)) layer_state_t layer_state_set_user(layer_state_t state) { indicators_callback(); return state; } diff --git a/keyboards/cipulot/ec_typek/keyboard.json b/keyboards/cipulot/ec_typek/keyboard.json index be8c6d0270..5ddf550432 100644 --- a/keyboards/cipulot/ec_typek/keyboard.json +++ b/keyboards/cipulot/ec_typek/keyboard.json @@ -1,6 +1,6 @@ { "manufacturer": "Cipulot", - "keyboard_name": "EC Type-K", + "keyboard_name": "Type-K EC", "maintainer": "Cipulot", "bootloader": "stm32-dfu", "build": { @@ -42,7 +42,7 @@ }, "led_count": 69, "led_map": [0, 1, 2, 3, 4, 5, 66, 67, 68, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 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], - "max_brightness": 175 + "max_brightness": 200 }, "usb": { "device_version": "0.0.1", diff --git a/keyboards/clickety_split/leeloo/info.json b/keyboards/clickety_split/leeloo/info.json index c83fedeb28..2c17a28c8d 100644 --- a/keyboards/clickety_split/leeloo/info.json +++ b/keyboards/clickety_split/leeloo/info.json @@ -26,13 +26,15 @@ }, "split": { "enabled": true, - "soft_serial_pin": "D2", "encoder": { "right": { "rotary": [ {"pin_a": "F4", "pin_b": "F5"} ] } + }, + "serial": { + "pin": "D2" } }, "development_board": "promicro", diff --git a/keyboards/clueboard/2x1800/2019/2019.c b/keyboards/clueboard/2x1800/2019/2019.c index 8b0ba6a71e..b7fb799ecb 100644 --- a/keyboards/clueboard/2x1800/2019/2019.c +++ b/keyboards/clueboard/2x1800/2019/2019.c @@ -18,9 +18,6 @@ void matrix_init_kb(void) { // Set our LED pins as output gpio_set_pin_output(D6); - gpio_set_pin_output(B4); - gpio_set_pin_output(B5); - gpio_set_pin_output(B6); // Set our Tilt Sensor pins as input gpio_set_pin_input_high(SHAKE_PIN_A); @@ -61,7 +58,7 @@ uint8_t detected_shakes = 0; static uint16_t shake_timer; #endif -void matrix_scan_kb(void) { +void housekeeping_task_kb(void) { #ifdef SHAKE_ENABLE // Read the current state of the tilt sensor. It is physically // impossible for both pins to register a low state at the same time. @@ -84,8 +81,6 @@ void matrix_scan_kb(void) { detected_shakes = 0; } #endif - - matrix_scan_user(); } bool process_record_kb(uint16_t keycode, keyrecord_t *record) { @@ -133,22 +128,8 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) { return process_record_user(keycode, record); } -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if(res) { - gpio_write_pin(B4, !led_state.num_lock); - gpio_write_pin(B5, !led_state.caps_lock); - gpio_write_pin(B6, !led_state.scroll_lock); - } - - return res; -} - -__attribute__((weak)) bool encoder_update_keymap(uint8_t index, bool clockwise) { return true; } -__attribute__((weak)) bool encoder_update_user(uint8_t index, bool clockwise) { return encoder_update_keymap(index, clockwise); } - bool encoder_update_kb(uint8_t index, bool clockwise) { - if (!encoder_update_user(index, clockwise)) { + if (encoder_update_user(index, clockwise)) { // Encoder 1, outside left if (index == 0 && clockwise) { tap_code(KC_MS_U); // turned right diff --git a/keyboards/clueboard/2x1800/2019/2019.h b/keyboards/clueboard/2x1800/2019/2019.h index c5869ff66f..d5867dacac 100644 --- a/keyboards/clueboard/2x1800/2019/2019.h +++ b/keyboards/clueboard/2x1800/2019/2019.h @@ -24,8 +24,5 @@ enum TWOx1800_keycodes { ENC_BTN4, }; -// Encoder update function that returns true/false -bool encoder_update_keymap(uint8_t index, bool clockwise); - // Encoder button combo check void check_encoder_buttons(void); diff --git a/keyboards/clueboard/2x1800/2019/keyboard.json b/keyboards/clueboard/2x1800/2019/keyboard.json index 6f33a11ca7..31ff448d17 100644 --- a/keyboards/clueboard/2x1800/2019/keyboard.json +++ b/keyboards/clueboard/2x1800/2019/keyboard.json @@ -32,6 +32,12 @@ {"pin_a": "A1", "pin_b": "A0"} ] }, + "indicators": { + "caps_lock": "B5", + "num_lock": "B4", + "scroll_lock": "B6", + "on_state": 0 + }, "layout_aliases": { "LAYOUT": "LAYOUT_all" }, diff --git a/keyboards/clueboard/2x1800/2021/2021.c b/keyboards/clueboard/2x1800/2021/2021.c index 2a3f1304c7..511c40a699 100644 --- a/keyboards/clueboard/2x1800/2021/2021.c +++ b/keyboards/clueboard/2x1800/2021/2021.c @@ -21,7 +21,7 @@ #ifndef DRAWING_TOY_MODE static uint16_t led_frame_timer = 0; -void matrix_scan_kb(void) { +void housekeeping_task_kb(void) { if (timer_elapsed(led_frame_timer) > 100) { max7219_message_sign_task(true); led_frame_timer = timer_read(); @@ -90,18 +90,15 @@ void matrix_init_kb(void) { #elif defined(DRAWING_TOY_MODE) max7219_set_led(0, 0, true); #endif -} -__attribute__ ((weak)) -bool encoder_update_keymap(int8_t index, bool clockwise) { - return false; + matrix_init_user(); } #define NUM_COLUMNS 8*MAX7219_CONTROLLERS uint8_t led_position[2] = {0,0}; // The location of the cursor in the matrix bool encoder_update_kb(uint8_t index, bool clockwise) { - if (!encoder_update_keymap(index, clockwise)) { + if (encoder_update_user(index, clockwise)) { #if defined(DRAWING_TOY_MODE) // Encoder 1, left if (index == 0 && clockwise) { diff --git a/keyboards/clueboard/66_hotswap/gen1/gen1.c b/keyboards/clueboard/66_hotswap/gen1/gen1.c index e13a05de05..e2da60b918 100644 --- a/keyboards/clueboard/66_hotswap/gen1/gen1.c +++ b/keyboards/clueboard/66_hotswap/gen1/gen1.c @@ -93,34 +93,4 @@ const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = { { 0, C5_14 }, // k96 KC_DOWN { 0, C5_15 } // k97 KC_RGHT }; - -led_config_t g_led_config = { - { - // Key Matrix to LED Index - { 0, 1, 2, 3, 4, 5, 6, 7 }, - { 15, 16, 17, 18, 19, 20, 21, 22 }, - { 30, 31, 32, 33, 34, 35, 36, 37 }, - { 43, NO_LED, 44, 45, 46, 47, 48, 49 }, - { 56, 57, 58, NO_LED, NO_LED, 60, 61, NO_LED }, - { 8, 9, 10, 11, 12, 13, NO_LED, 14 }, - { 23, 24, 25, 26, 27, 28, NO_LED, 29 }, - { 38, 39, 40, 41, NO_LED, 42, NO_LED, NO_LED }, - { 50, 51, 52, 53, NO_LED, 54, 55, NO_LED }, - { 64, NO_LED, 65, 66, 67, 68, 69, 70 } - }, { - // LED Index to Physical Position - { 0, 0 }, { 15, 0 }, { 29, 0 }, { 43, 0 }, { 58, 0 }, { 72, 0 }, { 87, 0 }, { 101, 0 }, { 116, 0 }, { 130, 0 }, { 145, 0 }, { 159, 0 }, { 173, 0 }, { 195, 0 }, { 224, 0 }, - { 4, 16 }, { 22, 16 }, { 36, 16 }, { 51, 16 }, { 65, 16 }, { 80, 16 }, { 94, 16 }, { 108, 16 }, { 123, 16 }, { 137, 16 }, { 152, 16 }, { 166, 16 }, { 181, 16 }, { 199, 16 }, { 224, 16 }, - { 5, 32 }, { 25, 32 }, { 40, 32 }, { 54, 32 }, { 69, 32 }, { 83, 32 }, { 98, 32 }, { 112, 32 }, { 126, 32 }, { 141, 32 }, { 155, 32 }, { 170, 32 }, { 184, 32 }, - { 16, 48 }, { 33, 48 }, { 47, 48 }, { 61, 48 }, { 76, 48 }, { 90, 48 }, { 105, 48 }, { 119, 48 }, { 134, 48 }, { 148, 48 }, { 163, 48 }, { 188, 48 }, { 210, 48 }, - { 9, 64 }, { 27, 64 }, { 45, 64 }, { 60, 64 }, { 74, 64 }, { 88, 64 }, { 103, 64 }, { 117, 64 }, { 136, 64 }, { 154, 64 }, { 168, 64 }, { 186, 64 }, { 195, 64 }, { 210, 64 }, { 224, 64 } - }, { - // LED Index to Flag - 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, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - } -}; #endif diff --git a/keyboards/clueboard/66_hotswap/gen1/keyboard.json b/keyboards/clueboard/66_hotswap/gen1/keyboard.json index 17e47e66fe..de858443cc 100644 --- a/keyboards/clueboard/66_hotswap/gen1/keyboard.json +++ b/keyboards/clueboard/66_hotswap/gen1/keyboard.json @@ -39,6 +39,79 @@ "wave_left_right": true, "wave_up_down": true }, + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}, + {"matrix": [0, 1], "x": 15, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 29, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 43, "y": 0, "flags": 4}, + {"matrix": [0, 4], "x": 58, "y": 0, "flags": 4}, + {"matrix": [0, 5], "x": 72, "y": 0, "flags": 4}, + {"matrix": [0, 6], "x": 87, "y": 0, "flags": 4}, + {"matrix": [0, 7], "x": 101, "y": 0, "flags": 4}, + {"matrix": [5, 0], "x": 116, "y": 0, "flags": 4}, + {"matrix": [5, 1], "x": 130, "y": 0, "flags": 4}, + {"matrix": [5, 2], "x": 145, "y": 0, "flags": 4}, + {"matrix": [5, 3], "x": 159, "y": 0, "flags": 4}, + {"matrix": [5, 4], "x": 173, "y": 0, "flags": 4}, + {"matrix": [5, 5], "x": 195, "y": 0, "flags": 1}, + {"matrix": [5, 7], "x": 224, "y": 0, "flags": 1}, + {"matrix": [1, 0], "x": 4, "y": 16, "flags": 1}, + {"matrix": [1, 1], "x": 22, "y": 16, "flags": 4}, + {"matrix": [1, 2], "x": 36, "y": 16, "flags": 4}, + {"matrix": [1, 3], "x": 51, "y": 16, "flags": 4}, + {"matrix": [1, 4], "x": 65, "y": 16, "flags": 4}, + {"matrix": [1, 5], "x": 80, "y": 16, "flags": 4}, + {"matrix": [1, 6], "x": 94, "y": 16, "flags": 4}, + {"matrix": [1, 7], "x": 108, "y": 16, "flags": 4}, + {"matrix": [6, 0], "x": 123, "y": 16, "flags": 4}, + {"matrix": [6, 1], "x": 137, "y": 16, "flags": 4}, + {"matrix": [6, 2], "x": 152, "y": 16, "flags": 4}, + {"matrix": [6, 3], "x": 166, "y": 16, "flags": 4}, + {"matrix": [6, 4], "x": 181, "y": 16, "flags": 4}, + {"matrix": [6, 5], "x": 199, "y": 16, "flags": 1}, + {"matrix": [6, 7], "x": 224, "y": 16, "flags": 1}, + {"matrix": [2, 0], "x": 5, "y": 32, "flags": 1}, + {"matrix": [2, 1], "x": 25, "y": 32, "flags": 4}, + {"matrix": [2, 2], "x": 40, "y": 32, "flags": 4}, + {"matrix": [2, 3], "x": 54, "y": 32, "flags": 4}, + {"matrix": [2, 4], "x": 69, "y": 32, "flags": 4}, + {"matrix": [2, 5], "x": 83, "y": 32, "flags": 4}, + {"matrix": [2, 6], "x": 98, "y": 32, "flags": 4}, + {"matrix": [2, 7], "x": 112, "y": 32, "flags": 4}, + {"matrix": [7, 0], "x": 126, "y": 32, "flags": 4}, + {"matrix": [7, 1], "x": 141, "y": 32, "flags": 4}, + {"matrix": [7, 2], "x": 155, "y": 32, "flags": 4}, + {"matrix": [7, 3], "x": 170, "y": 32, "flags": 4}, + {"matrix": [7, 5], "x": 184, "y": 32, "flags": 1}, + {"matrix": [3, 0], "x": 16, "y": 48, "flags": 1}, + {"matrix": [3, 2], "x": 33, "y": 48, "flags": 4}, + {"matrix": [3, 3], "x": 47, "y": 48, "flags": 4}, + {"matrix": [3, 4], "x": 61, "y": 48, "flags": 4}, + {"matrix": [3, 5], "x": 76, "y": 48, "flags": 4}, + {"matrix": [3, 6], "x": 90, "y": 48, "flags": 4}, + {"matrix": [3, 7], "x": 105, "y": 48, "flags": 4}, + {"matrix": [8, 0], "x": 119, "y": 48, "flags": 4}, + {"matrix": [8, 1], "x": 134, "y": 48, "flags": 4}, + {"matrix": [8, 2], "x": 148, "y": 48, "flags": 4}, + {"matrix": [8, 3], "x": 163, "y": 48, "flags": 4}, + {"matrix": [8, 5], "x": 188, "y": 48, "flags": 1}, + {"matrix": [8, 6], "x": 210, "y": 48, "flags": 1}, + {"matrix": [4, 0], "x": 9, "y": 64, "flags": 1}, + {"matrix": [4, 1], "x": 27, "y": 64, "flags": 1}, + {"matrix": [4, 2], "x": 45, "y": 64, "flags": 1}, + {"x": 60, "y": 64, "flags": 1}, + {"matrix": [4, 5], "x": 74, "y": 64, "flags": 1}, + {"matrix": [4, 6], "x": 88, "y": 64, "flags": 1}, + {"x": 103, "y": 64, "flags": 1}, + {"x": 117, "y": 64, "flags": 1}, + {"matrix": [9, 0], "x": 136, "y": 64, "flags": 1}, + {"matrix": [9, 2], "x": 154, "y": 64, "flags": 1}, + {"matrix": [9, 3], "x": 168, "y": 64, "flags": 1}, + {"matrix": [9, 4], "x": 186, "y": 64, "flags": 1}, + {"matrix": [9, 5], "x": 195, "y": 64, "flags": 1}, + {"matrix": [9, 6], "x": 210, "y": 64, "flags": 1}, + {"matrix": [9, 7], "x": 224, "y": 64, "flags": 1} + ], "driver": "is31fl3731" }, "matrix_pins": { diff --git a/keyboards/controllerworks/mini36/keyboard.json b/keyboards/controllerworks/mini36/keyboard.json index a3b5365109..8039025a28 100644 --- a/keyboards/controllerworks/mini36/keyboard.json +++ b/keyboards/controllerworks/mini36/keyboard.json @@ -39,9 +39,11 @@ ] } }, - "soft_serial_pin": "GP1", + "serial": { + "driver": "vendor", + "pin": "GP1" + }, "transport": { - "protocol": "serial", "sync": { "indicators": true, "layer_state": true, diff --git a/keyboards/controllerworks/mini36/rules.mk b/keyboards/controllerworks/mini36/rules.mk deleted file mode 100644 index 161ec22b16..0000000000 --- a/keyboards/controllerworks/mini36/rules.mk +++ /dev/null @@ -1 +0,0 @@ -SERIAL_DRIVER = vendor diff --git a/keyboards/controllerworks/mini42/config.h b/keyboards/controllerworks/mini42/config.h index 3e5f7fd357..d29e3e449f 100644 --- a/keyboards/controllerworks/mini42/config.h +++ b/keyboards/controllerworks/mini42/config.h @@ -1,16 +1,16 @@ /* * Copyright 2022 Kevin Gee <[email protected]> - * + * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ @@ -25,7 +25,3 @@ #define I2C1_SCL_PIN GP25 #undef I2C1_SDA_PIN #define I2C1_SDA_PIN GP24 - -/* #define EE_HANDS */ -/* #define MASTER_LEFT */ -/* #define MASTER_RIGHT */ diff --git a/keyboards/controllerworks/mini42/keyboard.json b/keyboards/controllerworks/mini42/keyboard.json index 5d1d56db1a..ceb7f8ce1f 100644 --- a/keyboards/controllerworks/mini42/keyboard.json +++ b/keyboards/controllerworks/mini42/keyboard.json @@ -39,9 +39,11 @@ ] } }, - "soft_serial_pin": "GP1", + "serial": { + "driver": "vendor", + "pin": "GP1" + }, "transport": { - "protocol": "serial", "sync": { "indicators": true, "layer_state": true, diff --git a/keyboards/controllerworks/mini42/rules.mk b/keyboards/controllerworks/mini42/rules.mk deleted file mode 100644 index 161ec22b16..0000000000 --- a/keyboards/controllerworks/mini42/rules.mk +++ /dev/null @@ -1 +0,0 @@ -SERIAL_DRIVER = vendor diff --git a/keyboards/converter/ibm_terminal/led.c b/keyboards/converter/ibm_terminal/led.c index 1bcde277a2..1639388ff9 100644 --- a/keyboards/converter/ibm_terminal/led.c +++ b/keyboards/converter/ibm_terminal/led.c @@ -19,16 +19,16 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "ps2.h" #include "led.h" - -bool led_update_kb(led_t led_state) -{ - uint8_t ps2_led = 0; - if (led_state.scroll_lock) - ps2_led |= (1<<PS2_LED_SCROLL_LOCK); - if (led_state.num_lock) - ps2_led |= (1<<PS2_LED_NUM_LOCK); - if (led_state.caps_lock) - ps2_led |= (1<<PS2_LED_CAPS_LOCK); - ps2_host_set_led(ps2_led); +bool led_update_kb(led_t led_state) { + if(led_update_user(led_state)) { + uint8_t ps2_led = 0; + if (led_state.scroll_lock) + ps2_led |= (1<<PS2_LED_SCROLL_LOCK); + if (led_state.num_lock) + ps2_led |= (1<<PS2_LED_NUM_LOCK); + if (led_state.caps_lock) + ps2_led |= (1<<PS2_LED_CAPS_LOCK); + ps2_host_set_led(ps2_led); + } return false; } diff --git a/keyboards/converter/usb_usb/custom_matrix.cpp b/keyboards/converter/usb_usb/custom_matrix.cpp index ca0855a82b..e1ef695570 100644 --- a/keyboards/converter/usb_usb/custom_matrix.cpp +++ b/keyboards/converter/usb_usb/custom_matrix.cpp @@ -229,7 +229,6 @@ extern "C" { if (kbd2.isReady()) kbd2.SetReport(0, 0, 2, 0, 1, &usb_led); if (kbd3.isReady()) kbd3.SetReport(0, 0, 2, 0, 1, &usb_led); if (kbd4.isReady()) kbd4.SetReport(0, 0, 2, 0, 1, &usb_led); - led_set_user(usb_led); led_update_kb((led_t){.raw = usb_led}); } } diff --git a/keyboards/converter/xmk/xmk.c b/keyboards/converter/xmk/xmk.c index e0df96fc2d..8a24e5f964 100644 --- a/keyboards/converter/xmk/xmk.c +++ b/keyboards/converter/xmk/xmk.c @@ -10,5 +10,7 @@ void keyboard_post_init_kb(void) { debug_enable=true; debug_matrix=true; debug_keyboard=true; + + keyboard_post_init_user(); } #endif diff --git a/keyboards/cradio/keyboard.json b/keyboards/cradio/keyboard.json index 6241995c04..433c6e96e9 100644 --- a/keyboards/cradio/keyboard.json +++ b/keyboards/cradio/keyboard.json @@ -43,9 +43,8 @@ ] } }, - "soft_serial_pin": "D2", - "transport": { - "protocol": "serial" + "serial": { + "pin": "D2" } }, "community_layouts": ["split_3x5_2"], diff --git a/keyboards/crkbd/keymaps/default/config.h b/keyboards/crkbd/keymaps/default/config.h index 9d4be81fa3..aae511b036 100644 --- a/keyboards/crkbd/keymaps/default/config.h +++ b/keyboards/crkbd/keymaps/default/config.h @@ -22,12 +22,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //#define USE_MATRIX_I2C -/* Select hand configuration */ - -#define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS - //#define QUICK_TAP_TERM 0 //#define TAPPING_TERM 100 diff --git a/keyboards/crkbd/keymaps/via/config.h b/keyboards/crkbd/keymaps/via/config.h index 806b77d013..c197a1bfdd 100644 --- a/keyboards/crkbd/keymaps/via/config.h +++ b/keyboards/crkbd/keymaps/via/config.h @@ -18,12 +18,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Select hand configuration */ - -#define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS - #ifdef RGBLIGHT_ENABLE #define RGBLIGHT_EFFECT_BREATHING #define RGBLIGHT_EFFECT_RAINBOW_MOOD diff --git a/keyboards/crkbd/keymaps/via_mechboards/config.h b/keyboards/crkbd/keymaps/via_mechboards/config.h deleted file mode 100644 index cdc04f6908..0000000000 --- a/keyboards/crkbd/keymaps/via_mechboards/config.h +++ /dev/null @@ -1,26 +0,0 @@ -/* -Copyright 2019 @foostan -Copyright 2020 Drashna Jaelre <@drashna> -Copyright 2021 Elliot Powell <@e11i0t23> - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#pragma once - -/* Select hand configuration */ - -#define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS diff --git a/keyboards/crkbd/r2g/keyboard.json b/keyboards/crkbd/r2g/keyboard.json index 991a5301f4..e6c49d5fc8 100644 --- a/keyboards/crkbd/r2g/keyboard.json +++ b/keyboards/crkbd/r2g/keyboard.json @@ -3,7 +3,9 @@ "rgb_matrix": true }, "split": { - "soft_serial_pin": "D2", + "serial": { + "pin": "D2" + }, "transport": { "sync": { "matrix_state": true diff --git a/keyboards/crkbd/rev1/keyboard.json b/keyboards/crkbd/rev1/keyboard.json index 108bfb7370..c9b5c27884 100644 --- a/keyboards/crkbd/rev1/keyboard.json +++ b/keyboards/crkbd/rev1/keyboard.json @@ -3,7 +3,9 @@ "rgblight": true }, "split": { - "soft_serial_pin": "D2", + "serial": { + "pin": "D2" + }, "transport": { "sync": { "matrix_state": true diff --git a/keyboards/custommk/evo70/evo70.c b/keyboards/custommk/evo70/evo70.c index f2874c4e8a..a8df4a7d1d 100644 --- a/keyboards/custommk/evo70/evo70.c +++ b/keyboards/custommk/evo70/evo70.c @@ -740,8 +740,7 @@ bool encoder_update_kb(uint8_t index, bool clockwise) { } -void matrix_scan_kb(void) { - matrix_scan_user(); +void housekeeping_task_kb(void) { led_t current_led_state = host_keyboard_led_state(); uint8_t current_layer = get_highest_layer(layer_state); if (startup_delay) { diff --git a/keyboards/dailycraft/claw44/keymaps/default/config.h b/keyboards/dailycraft/claw44/keymaps/default/config.h deleted file mode 100644 index 98469e4ccf..0000000000 --- a/keyboards/dailycraft/claw44/keymaps/default/config.h +++ /dev/null @@ -1,21 +0,0 @@ -/* -Copyright 2012 Jun Wako <[email protected]> -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 <http://www.gnu.org/licenses/>. -*/ - -#pragma once - -#define MASTER_LEFT diff --git a/keyboards/dailycraft/claw44/keymaps/oled/config.h b/keyboards/dailycraft/claw44/keymaps/oled/config.h index f84bf23dd8..bafb8239cf 100644 --- a/keyboards/dailycraft/claw44/keymaps/oled/config.h +++ b/keyboards/dailycraft/claw44/keymaps/oled/config.h @@ -18,5 +18,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -#define MASTER_LEFT #define OLED_FONT_H "claw44/lib/glcdfont.c" diff --git a/keyboards/dailycraft/claw44/keymaps/via/config.h b/keyboards/dailycraft/claw44/keymaps/via/config.h deleted file mode 100644 index 98469e4ccf..0000000000 --- a/keyboards/dailycraft/claw44/keymaps/via/config.h +++ /dev/null @@ -1,21 +0,0 @@ -/* -Copyright 2012 Jun Wako <[email protected]> -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 <http://www.gnu.org/licenses/>. -*/ - -#pragma once - -#define MASTER_LEFT diff --git a/keyboards/dailycraft/claw44/rev1/keyboard.json b/keyboards/dailycraft/claw44/rev1/keyboard.json index 724cf5979f..62b069a490 100644 --- a/keyboards/dailycraft/claw44/rev1/keyboard.json +++ b/keyboards/dailycraft/claw44/rev1/keyboard.json @@ -15,7 +15,9 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D2" + "serial": { + "pin": "D2" + } }, "processor": "atmega32u4", "bootloader": "caterina", diff --git a/keyboards/dailycraft/sandbox/rev2/keyboard.json b/keyboards/dailycraft/sandbox/rev2/keyboard.json index c9f2b8f567..1eb61ee12c 100644 --- a/keyboards/dailycraft/sandbox/rev2/keyboard.json +++ b/keyboards/dailycraft/sandbox/rev2/keyboard.json @@ -15,7 +15,9 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D2" + "serial": { + "pin": "D2" + } }, "processor": "atmega32u4", "bootloader": "caterina", diff --git a/keyboards/dailycraft/wings42/rev1/keyboard.json b/keyboards/dailycraft/wings42/rev1/keyboard.json index 6b19954d88..f4a3949c61 100644 --- a/keyboards/dailycraft/wings42/rev1/keyboard.json +++ b/keyboards/dailycraft/wings42/rev1/keyboard.json @@ -15,7 +15,9 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D2" + "serial": { + "pin": "D2" + } }, "processor": "atmega32u4", "bootloader": "caterina", diff --git a/keyboards/dailycraft/wings42/rev1_extkeys/keyboard.json b/keyboards/dailycraft/wings42/rev1_extkeys/keyboard.json index 1d77f044fb..bebe264cc0 100644 --- a/keyboards/dailycraft/wings42/rev1_extkeys/keyboard.json +++ b/keyboards/dailycraft/wings42/rev1_extkeys/keyboard.json @@ -15,7 +15,9 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D2" + "serial": { + "pin": "D2" + } }, "processor": "atmega32u4", "bootloader": "caterina", diff --git a/keyboards/dailycraft/wings42/rev2/keyboard.json b/keyboards/dailycraft/wings42/rev2/keyboard.json index c3b686cec4..3f2cb1b766 100644 --- a/keyboards/dailycraft/wings42/rev2/keyboard.json +++ b/keyboards/dailycraft/wings42/rev2/keyboard.json @@ -15,7 +15,9 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D2" + "serial": { + "pin": "D2" + } }, "encoder": { "rotary": [ diff --git a/keyboards/dailycraft/wings42/rev2/keymaps/via/config.h b/keyboards/dailycraft/wings42/rev2/keymaps/via/config.h index 3e0c8d146a..6a9ab04738 100644 --- a/keyboards/dailycraft/wings42/rev2/keymaps/via/config.h +++ b/keyboards/dailycraft/wings42/rev2/keymaps/via/config.h @@ -15,6 +15,6 @@ */ #pragma once -#define ENCODERS_PAD_A { B5, B6 } -#define ENCODERS_PAD_B { B4, B2 } +#define ENCODER_A_PINS { B5, B6 } +#define ENCODER_B_PINS { B4, B2 } #define ENCODER_RESOLUTION 4 diff --git a/keyboards/deltasplit75/keymaps/default/config.h b/keyboards/deltasplit75/keymaps/default/config.h deleted file mode 100644 index 7a05469173..0000000000 --- a/keyboards/deltasplit75/keymaps/default/config.h +++ /dev/null @@ -1,23 +0,0 @@ -/* -Copyright 2012 Jun Wako <[email protected]> - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - - -#pragma once - -#define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS diff --git a/keyboards/deltasplit75/v2/keyboard.json b/keyboards/deltasplit75/v2/keyboard.json index 4d3d42ad04..031d2b9185 100644 --- a/keyboards/deltasplit75/v2/keyboard.json +++ b/keyboards/deltasplit75/v2/keyboard.json @@ -14,7 +14,9 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D0" + "serial": { + "pin": "D0" + } }, "rgblight": { "led_count": 12 diff --git a/keyboards/dichotomy/keymaps/default/keymap.c b/keyboards/dichotomy/keymaps/default/keymap.c index b83f7b82e9..b92beb73cc 100755 --- a/keyboards/dichotomy/keymaps/default/keymap.c +++ b/keyboards/dichotomy/keymaps/default/keymap.c @@ -28,9 +28,9 @@ enum dichotomy_keycodes NUMKEY, SFTKEY, MOUKEY, - MS_BTN1, - MS_BTN2, - MS_BTN3 + CK_MSE1, + CK_MSE2, + CK_MSE3 }; #define CUSTOM_LONGPRESS 150 @@ -46,7 +46,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { NUMKEY, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, CK_QE, SFTKEY, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MOUKEY, KC_LCTL, KC_LALT, KC_LGUI, KC_RGUI, KC_RALT, KC_RCTL, - MS_BTN3, KC_LBRC, KC_LPRN, KC_SPC, KC_SPC, KC_RPRN, KC_RBRC, MS_BTN3 + CK_MSE3, KC_LBRC, KC_LPRN, KC_SPC, KC_SPC, KC_RPRN, KC_RBRC, CK_MSE3 ), [_SF] = LAYOUT( /* Shifted layout, small changes (because angle brackets have been moved to thumb cluster buttons) */ @@ -75,7 +75,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_MS] = LAYOUT( /* Mouse layer, including buttons for clicking. */ _______, _______, _______, _______, _______, _______, KC_VOLU, KC_HOME, KC_PGUP, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, MS_BTN1, MS_BTN2, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, CK_MSE1, CK_MSE2, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_END, KC_PGDN, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______ @@ -311,7 +311,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { break; //mouse buttons, for 1-3, to update the mouse report: - case MS_BTN1: + case CK_MSE1: currentReport = pointing_device_get_report(); if (record->event.pressed) { if (shift_held && shift_suspended){ @@ -327,7 +327,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { pointing_device_set_report(currentReport); returnVal = false; break; - case MS_BTN2: + case CK_MSE2: currentReport = pointing_device_get_report(); if (record->event.pressed) { if (shift_held && shift_suspended){ @@ -343,7 +343,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { pointing_device_set_report(currentReport); returnVal = false; break; - case MS_BTN3: + case CK_MSE3: currentReport = pointing_device_get_report(); if (record->event.pressed) { if (shift_held && shift_suspended){ diff --git a/keyboards/dm9records/ergoinu/config.h b/keyboards/dm9records/ergoinu/config.h index b6a3484a26..ec72ce23ff 100644 --- a/keyboards/dm9records/ergoinu/config.h +++ b/keyboards/dm9records/ergoinu/config.h @@ -19,11 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Select hand configuration */ -#define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS - #ifndef IOS_DEVICE_ENABLE #if RGBLIGHT_LED_COUNT <= 7 #define RGBLIGHT_LIMIT_VAL 255 diff --git a/keyboards/dm9records/ergoinu/keyboard.json b/keyboards/dm9records/ergoinu/keyboard.json index c132f18268..1f91a06600 100644 --- a/keyboards/dm9records/ergoinu/keyboard.json +++ b/keyboards/dm9records/ergoinu/keyboard.json @@ -15,7 +15,9 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D2" + "serial": { + "pin": "D2" + } }, "rgblight": { "hue_steps": 10, diff --git a/keyboards/dnworks/9973/config.h b/keyboards/dnworks/tkl87/config.h index 77970ce4d3..77970ce4d3 100644 --- a/keyboards/dnworks/9973/config.h +++ b/keyboards/dnworks/tkl87/config.h diff --git a/keyboards/dnworks/9973/keyboard.json b/keyboards/dnworks/tkl87/keyboard.json index 6169606026..6b56435ae3 100644 --- a/keyboards/dnworks/9973/keyboard.json +++ b/keyboards/dnworks/tkl87/keyboard.json @@ -1,5 +1,5 @@ { - "keyboard_name": "DN 997.3", + "keyboard_name": "DN TKL F12", "maintainer": "itsme-zeix", "manufacturer": "dnworks", "processor": "RP2040", diff --git a/keyboards/dnworks/9973/keymaps/default/keymap.c b/keyboards/dnworks/tkl87/keymaps/default/keymap.c index 8307bf9e76..8307bf9e76 100644 --- a/keyboards/dnworks/9973/keymaps/default/keymap.c +++ b/keyboards/dnworks/tkl87/keymaps/default/keymap.c diff --git a/keyboards/dnworks/9973/keymaps/via/keymap.c b/keyboards/dnworks/tkl87/keymaps/via/keymap.c index 8307bf9e76..8307bf9e76 100644 --- a/keyboards/dnworks/9973/keymaps/via/keymap.c +++ b/keyboards/dnworks/tkl87/keymaps/via/keymap.c diff --git a/keyboards/dnworks/9973/keymaps/via/rules.mk b/keyboards/dnworks/tkl87/keymaps/via/rules.mk index 1e5b99807c..1e5b99807c 100644 --- a/keyboards/dnworks/9973/keymaps/via/rules.mk +++ b/keyboards/dnworks/tkl87/keymaps/via/rules.mk diff --git a/keyboards/dnworks/9973/readme.md b/keyboards/dnworks/tkl87/readme.md index 790f236cb7..121cdccddf 100644 --- a/keyboards/dnworks/9973/readme.md +++ b/keyboards/dnworks/tkl87/readme.md @@ -1,20 +1,20 @@ -# 997.3 TKL +# dnworks TKL (F12) ![997.3 TKL](https://i.imgur.com/iPPLKg1h.jpeg) -PCB that supports the 997.3 TKL designed by dnworks, including its variants. +PCB that supports the F12 TKLs designed by dnworks. * Keyboard Maintainer: [Zeix](https://github.com/itsme-zeix) -* Hardware Supported: 997.3 Solder PCB rev1 -* Hardware Availability: dnworks.co +* Hardware Supported: 997.3 Solder PCB rev1, 765LT Solder PCB rev1 and Best Friend Solder PCB Rev1. +* Hardware Availability: https://dnworks.co/products Make example for this keyboard (after setting up your build environment): - make dnworks/997pt3:default + make dnworks/tkl87:default Flashing example for this keyboard: - make dnworks/997pt3:default:flash + make dnworks/tkl87: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). @@ -22,6 +22,6 @@ See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_to Enter the bootloader in 3 ways: -* **Bootmagic reset**: Hold down the top left key and plug in the keyboard -* **Physical reset button**: Briefly press the `RESET` button twice or short the `USB_BOOT` and `GND` pads and plug in the keyboard +* **Bootmagic reset**: Hold down escape and plug in the keyboard +* **Physical reset button**: Short the 'USB_BOOT' button and plug in keyboard or press the 'RESET' button twice with the keyboard plugged in. * **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available
\ No newline at end of file diff --git a/keyboards/doio/kb30/config.h b/keyboards/doio/kb30/config.h index 04730a1f18..3dc7a76367 100644 --- a/keyboards/doio/kb30/config.h +++ b/keyboards/doio/kb30/config.h @@ -27,8 +27,6 @@ # define I2C_DRIVER I2CD2 #endif -#define RGB_MATRIX_LED_COUNT 36 - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/doio/kb30/kb30.c b/keyboards/doio/kb30/kb30.c index 53a4546e06..671f49e8ab 100644 --- a/keyboards/doio/kb30/kb30.c +++ b/keyboards/doio/kb30/kb30.c @@ -17,34 +17,6 @@ #include "quantum.h" - -#ifdef RGB_MATRIX_ENABLE - - 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, NO_LED }, - { 20, 21, 22, 23, NO_LED, 24, NO_LED}, - { 25, 26, 27, 28, 29, NO_LED, NO_LED}, - { 30, 31, 32, 33, 34, 35} -}, { -{0,0}, {37,0}, {75,0}, {112,0}, {149,0}, {187,0}, {224,0}, -{0,16}, {37,16}, {75,16}, {112,16}, {149,16}, {187,16}, {224,16}, -{0,32}, {37,32}, {75,32}, {112,32}, {149,32}, {187,32}, -{0,48}, {37,48}, {75,48}, {112,48}, {187,48}, -{0,64}, {37,64}, {65,64}, {112,64}, {149,64}, -{187,64}, {173,64}, {186,64}, {198,64}, {211,64},{224,64}, -}, { - 4,4,4,4,4,4,4, - 4,4,4,4,4,4,4, - 4,4,4,4,4,4, - 4,4,4,4,4, - 4,4,4,4,4, - 4,4,4,4,4,4 -} }; -#endif - /* OLED */ #ifdef OLED_ENABLE uint16_t startup_timer = 0; diff --git a/keyboards/doio/kb30/keyboard.json b/keyboards/doio/kb30/keyboard.json index b14eab1c33..388df2d9e3 100644 --- a/keyboards/doio/kb30/keyboard.json +++ b/keyboards/doio/kb30/keyboard.json @@ -46,7 +46,50 @@ }, "driver": "ws2812", "max_brightness": 200, - "sleep": true + "sleep": true, + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 4}, + {"matrix": [0, 1], "x": 37, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 75, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 112, "y": 0, "flags": 4}, + {"matrix": [0, 4], "x": 149, "y": 0, "flags": 4}, + {"matrix": [0, 5], "x": 187, "y": 0, "flags": 4}, + {"matrix": [0, 6], "x": 224, "y": 0, "flags": 4}, + + {"matrix": [1, 0], "x": 0, "y": 16, "flags": 4}, + {"matrix": [1, 1], "x": 37, "y": 16, "flags": 4}, + {"matrix": [1, 2], "x": 75, "y": 16, "flags": 4}, + {"matrix": [1, 3], "x": 112, "y": 16, "flags": 4}, + {"matrix": [1, 4], "x": 149, "y": 16, "flags": 4}, + {"matrix": [1, 5], "x": 187, "y": 16, "flags": 4}, + {"matrix": [1, 6], "x": 224, "y": 16, "flags": 4}, + + {"matrix": [2, 0], "x": 0, "y": 32, "flags": 4}, + {"matrix": [2, 1], "x": 37, "y": 32, "flags": 4}, + {"matrix": [2, 2], "x": 75, "y": 32, "flags": 4}, + {"matrix": [2, 3], "x": 112, "y": 32, "flags": 4}, + {"matrix": [2, 4], "x": 149, "y": 32, "flags": 4}, + {"matrix": [2, 5], "x": 187, "y": 32, "flags": 4}, + + {"matrix": [3, 0], "x": 0, "y": 48, "flags": 4}, + {"matrix": [3, 1], "x": 37, "y": 48, "flags": 4}, + {"matrix": [3, 2], "x": 75, "y": 48, "flags": 4}, + {"matrix": [3, 3], "x": 112, "y": 48, "flags": 4}, + {"matrix": [3, 5], "x": 187, "y": 48, "flags": 4}, + + {"matrix": [4, 0], "x": 18, "y": 64, "flags": 4}, + {"matrix": [4, 1], "x": 75, "y": 64, "flags": 4}, + {"matrix": [4, 2], "x": 149, "y": 64, "flags": 4}, + {"matrix": [4, 3], "x": 187, "y": 64, "flags": 4}, + {"matrix": [4, 4], "x": 224, "y": 64, "flags": 4}, + + {"x": 224, "y": 56, "flags": 2}, + {"x": 112, "y": 56, "flags": 2}, + {"x": 0, "y": 56, "flags": 2}, + {"x": 0, "y": 8, "flags": 2}, + {"x": 112, "y": 8, "flags": 2}, + {"x": 224, "y": 8, "flags": 2} + ] }, "features": { "bootmagic": true, diff --git a/keyboards/doppelganger/config.h b/keyboards/doppelganger/config.h deleted file mode 100644 index 20a23ab6da..0000000000 --- a/keyboards/doppelganger/config.h +++ /dev/null @@ -1,38 +0,0 @@ -/* -Copyright 2019 Yiancar-Designs - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#pragma once - -#define SPLIT_HAND_PIN D4 - -// #define USE_I2C - -/* - * 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 diff --git a/keyboards/doppelganger/doppelganger.c b/keyboards/doppelganger/doppelganger.c index 4a62fdf45f..de0e2cc755 100644 --- a/keyboards/doppelganger/doppelganger.c +++ b/keyboards/doppelganger/doppelganger.c @@ -16,21 +16,9 @@ #include "quantum.h" void keyboard_pre_init_kb(void) { - gpio_set_pin_output(C6); gpio_set_pin_output(B0); -} -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if (res) { - // gpio_write_pin sets the pin high for 1 and low for 0. - // In this example the pins are inverted, setting - // it low/0 turns it on, and high/1 turns the LED off. - // This behavior depends on whether the LED is between the pin - // and VCC or the pin and GND. - gpio_write_pin(C6, !led_state.caps_lock); - } - return res; + keyboard_pre_init_user(); } __attribute__((weak)) layer_state_t layer_state_set_user(layer_state_t state) { diff --git a/keyboards/doppelganger/keyboard.json b/keyboards/doppelganger/keyboard.json index 9ea2241a80..8856927012 100644 --- a/keyboards/doppelganger/keyboard.json +++ b/keyboards/doppelganger/keyboard.json @@ -8,6 +8,10 @@ "pid": "0x4447", "device_version": "0.0.1" }, + "indicators": { + "caps_lock": "C6", + "on_state": 0 + }, "matrix_pins": { "cols": ["F4", "F0", "B7", "B3", "B2", "B1", "D5", "D3", "D2"], "rows": ["E6", "F1", "C7", "F7", "F6"] @@ -15,7 +19,12 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D1", + "handedness": { + "pin": "D4" + }, + "serial": { + "pin": "D1" + }, "matrix_pins": { "right": { "cols": ["F1", "F0", "F4", "F5", "F6", "F7", "C7", "C6", "B6"], diff --git a/keyboards/draculad/keyboard.json b/keyboards/draculad/keyboard.json index bfaa8a4979..3ba2f0efae 100644 --- a/keyboards/draculad/keyboard.json +++ b/keyboards/draculad/keyboard.json @@ -37,7 +37,6 @@ }, "split": { "enabled": true, - "soft_serial_pin": "D2", "encoder": { "right": { "rotary": [ @@ -45,6 +44,9 @@ {"pin_a": "B4", "pin_b": "B5", "resolution": 1} ] } + }, + "serial": { + "pin": "D2" } }, "processor": "atmega32u4", diff --git a/keyboards/duck/orion/v3/keyboard.json b/keyboards/duck/orion/v3/keyboard.json index 280cd8b07f..ba479aa0a2 100644 --- a/keyboards/duck/orion/v3/keyboard.json +++ b/keyboards/duck/orion/v3/keyboard.json @@ -16,6 +16,12 @@ "bootmagic": { "matrix": [4, 10] }, + "indicators": { + "caps_lock": "B0", + "num_lock": "B4", + "scroll_lock": "D7", + "on_state": 0 + }, "rgblight": { "led_count": 18, "animations": { diff --git a/keyboards/duck/orion/v3/matrix.c b/keyboards/duck/orion/v3/matrix.c index 1dd07a6567..acd4fe0349 100644 --- a/keyboards/duck/orion/v3/matrix.c +++ b/keyboards/duck/orion/v3/matrix.c @@ -53,20 +53,7 @@ __attribute__ ((weak)) void matrix_scan_user(void) { } -void indicator_init_ports(void) { - - // Num LED - gpio_set_pin_output(B4); - - // Caps Lock - gpio_set_pin_output(B0); - - // Scroll Lock - gpio_set_pin_output(D7); -} - void matrix_init(void) { - indicator_init_ports(); unselect_cols(); init_rows(); diff --git a/keyboards/duck/orion/v3/v3.c b/keyboards/duck/orion/v3/v3.c deleted file mode 100644 index c0ca9ddd06..0000000000 --- a/keyboards/duck/orion/v3/v3.c +++ /dev/null @@ -1,39 +0,0 @@ -/* Copyright 2019 MechMerlin <[email protected]> - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ -#include "quantum.h" -#include "indicator_leds.h" - -// Alphas PB1 -// Navigation Cluster: PB2 -// Number Row, Mods: PB3 -// Function Row: PE6 - -// Other than using RGB or LED matrix, QMK cannot turn on specific zones -// of backlight LEDs. Unfortunately, Duck PCBs do not follow this design -// and instead use multiple pins connected to each of these zones. QMK is -// only able to control them ALL with the current default mechanisms. - -// Locking indicator LEDs -// The Duck Orion V3 has 3 locking indicator LEDs and are located to the right -// of the Escape key. -bool led_update_kb(led_t led_state) { - if(led_update_user(led_state)) { - gpio_write_pin(B0, !led_state.caps_lock); - gpio_write_pin(B4, !led_state.num_lock); - gpio_write_pin(D7, !led_state.scroll_lock); - } - return true; -} diff --git a/keyboards/dumbo/keyboard.json b/keyboards/dumbo/keyboard.json index df0f110012..b833915d80 100644 --- a/keyboards/dumbo/keyboard.json +++ b/keyboards/dumbo/keyboard.json @@ -21,7 +21,6 @@ }, "split": { "enabled": true, - "soft_serial_pin": "D2", "encoder": { "right": { "rotary": [ @@ -29,6 +28,9 @@ {"pin_a": "B5", "pin_b": "C6"} ] } + }, + "serial": { + "pin": "D2" } }, "processor": "atmega32u4", diff --git a/keyboards/durgod/k310/k310.c b/keyboards/durgod/k310/k310.c index 7879b13f4e..c176587ef2 100644 --- a/keyboards/durgod/k310/k310.c +++ b/keyboards/durgod/k310/k310.c @@ -87,4 +87,6 @@ void keyboard_pre_init_kb(void) { bootloader_jump(); } #endif + + keyboard_pre_init_user(); } diff --git a/keyboards/durgod/k320/k320.c b/keyboards/durgod/k320/k320.c index 0a544fe318..50b87d7241 100644 --- a/keyboards/durgod/k320/k320.c +++ b/keyboards/durgod/k320/k320.c @@ -87,4 +87,6 @@ void keyboard_pre_init_kb(void) { bootloader_jump(); } #endif + + keyboard_pre_init_user(); } diff --git a/keyboards/dztech/bocc/bocc.c b/keyboards/dztech/bocc/bocc.c deleted file mode 100644 index 646a7861f8..0000000000 --- a/keyboards/dztech/bocc/bocc.c +++ /dev/null @@ -1,29 +0,0 @@ -/* Copyright 2020 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 <http://www.gnu.org/licenses/>. - */ -#include "quantum.h" - -void matrix_init_kb(void) { - gpio_set_pin_output(E6); - matrix_init_user(); -} - -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if(res) { - gpio_write_pin(E6, !led_state.caps_lock); - } - return res; -} diff --git a/keyboards/dztech/bocc/keyboard.json b/keyboards/dztech/bocc/keyboard.json index 7e40fde49c..a6208b2bf7 100644 --- a/keyboards/dztech/bocc/keyboard.json +++ b/keyboards/dztech/bocc/keyboard.json @@ -33,6 +33,10 @@ "pin": "B7", "levels": 5 }, + "indicators": { + "caps_lock": "E6", + "on_state": 0 + }, "rgblight": { "saturation_steps": 8, "brightness_steps": 8, diff --git a/keyboards/ealdin/quadrant/keyboard.json b/keyboards/ealdin/quadrant/keyboard.json index 9f7a6143d2..7a8bcf0db2 100644 --- a/keyboards/ealdin/quadrant/keyboard.json +++ b/keyboards/ealdin/quadrant/keyboard.json @@ -34,6 +34,9 @@ {"pin_a": "D5", "pin_b": "F1"} ] }, + "indicators": { + "caps_lock": "F0" + }, "rgblight": { "saturation_steps": 8, "brightness_steps": 8, diff --git a/keyboards/ealdin/quadrant/quadrant.c b/keyboards/ealdin/quadrant/quadrant.c index 23be00b96f..328c92e02e 100644 --- a/keyboards/ealdin/quadrant/quadrant.c +++ b/keyboards/ealdin/quadrant/quadrant.c @@ -52,16 +52,3 @@ bool encoder_update_kb(uint8_t index, bool clockwise) { } return true; } - -void keyboard_pre_init_kb(void) { - gpio_set_pin_output(F0); - - keyboard_pre_init_user(); -} - -bool led_update_kb(led_t led_state) { - if (led_update_user(led_state)) { - gpio_write_pin(F0, led_state.caps_lock); - } - return true; -} diff --git a/keyboards/elcantorhs/keyboard.json b/keyboards/elcantorhs/keyboard.json index 6ed958463e..c0d52b915b 100644 --- a/keyboards/elcantorhs/keyboard.json +++ b/keyboards/elcantorhs/keyboard.json @@ -37,6 +37,9 @@ ["B12", "A0", "A1", "A2", null, null] ] } + }, + "serial": { + "driver": "usart" } }, "layouts": { diff --git a/keyboards/elcantorhs/rules.mk b/keyboards/elcantorhs/rules.mk deleted file mode 100644 index c6e2988321..0000000000 --- a/keyboards/elcantorhs/rules.mk +++ /dev/null @@ -1 +0,0 @@ -SERIAL_DRIVER = usart diff --git a/keyboards/elephant42/keyboard.json b/keyboards/elephant42/keyboard.json index e71f143813..d1d321623e 100644 --- a/keyboards/elephant42/keyboard.json +++ b/keyboards/elephant42/keyboard.json @@ -42,7 +42,9 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D2", + "serial": { + "pin": "D2" + }, "transport": { "sync": { "matrix_state": true diff --git a/keyboards/enviousdesign/commissions/mini1800/mini1800.c b/keyboards/enviousdesign/commissions/mini1800/mini1800.c index 86757dab8a..4f4be779ca 100644 --- a/keyboards/enviousdesign/commissions/mini1800/mini1800.c +++ b/keyboards/enviousdesign/commissions/mini1800/mini1800.c @@ -1,23 +1,27 @@ -/* SPDX-License-Identifier: GPL-2.0-or-later */ +// SPDX-License-Identifier: GPL-2.0-or-later #include "quantum.h" -void matrix_init_user(void) { +void matrix_init_kb(void) { gpio_set_pin_output(GP9); //init gpio gpio_write_pin_low(GP9); gpio_set_pin_output(GP11); //init and turn off inverted power led gpio_write_pin_high(GP11); + + matrix_init_user(); } //layer, capslock and numlock -layer_state_t layer_state_set_user(layer_state_t state) { +__attribute__((weak)) layer_state_t layer_state_set_user(layer_state_t state) { gpio_write_pin(GP9, layer_state_cmp(state, 1)); - return state; + return state; } -bool led_update_user(led_t led_state) { +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if(res) { led_state.num_lock = !led_state.num_lock; led_update_ports(led_state); - return false; + } + return res; } - diff --git a/keyboards/era/sirind/tomak/config.h b/keyboards/era/sirind/tomak/config.h index 7bb5610705..0f34f674df 100644 --- a/keyboards/era/sirind/tomak/config.h +++ b/keyboards/era/sirind/tomak/config.h @@ -4,7 +4,6 @@ #pragma once /* Split configuration */ -#define SPLIT_HAND_PIN GP21 #define USB_VBUS_PIN GP29 #define SERIAL_USART_FULL_DUPLEX #define SERIAL_USART_TX_PIN GP0 diff --git a/keyboards/era/sirind/tomak/keyboard.json b/keyboards/era/sirind/tomak/keyboard.json index 1d0d5b79b2..cfd933bfe6 100644 --- a/keyboards/era/sirind/tomak/keyboard.json +++ b/keyboards/era/sirind/tomak/keyboard.json @@ -175,6 +175,9 @@ "bootmagic": { "matrix": [6, 0] }, + "handedness": { + "pin": "GP21" + }, "enabled": true, "matrix_pins": { "right": { @@ -182,6 +185,9 @@ "rows": ["GP10", "GP11", "GP12", "GP28", "GP19", "GP16"] } }, + "serial": { + "driver": "vendor" + }, "transport": { "sync": { "indicators": true, diff --git a/keyboards/era/sirind/tomak/rules.mk b/keyboards/era/sirind/tomak/rules.mk deleted file mode 100644 index 743228e94b..0000000000 --- a/keyboards/era/sirind/tomak/rules.mk +++ /dev/null @@ -1 +0,0 @@ -SERIAL_DRIVER = vendor
\ No newline at end of file diff --git a/keyboards/ergodox_ez/ergodox_ez.c b/keyboards/ergodox_ez/ergodox_ez.c index 5fc173917f..e23231ecb8 100644 --- a/keyboards/ergodox_ez/ergodox_ez.c +++ b/keyboards/ergodox_ez/ergodox_ez.c @@ -382,15 +382,23 @@ static bool is_on = false; static bool is_dynamic_recording = false; static uint16_t dynamic_loop_timer; -void dynamic_macro_record_start_user(int8_t direction) { +bool dynamic_macro_record_start_kb(int8_t direction) { + if (!dynamic_macro_record_start_user(direction)) { + return false; + } is_dynamic_recording = true; dynamic_loop_timer = timer_read(); ergodox_right_led_1_on(); + return true; } -void dynamic_macro_record_end_user(int8_t direction) { +bool dynamic_macro_record_end_kb(int8_t direction) { + if (!dynamic_macro_record_end_user(direction)) { + return false; + } is_dynamic_recording = false; layer_state_set_user(layer_state); + return true; } #endif diff --git a/keyboards/ergoslab/keymaps/default/config.h b/keyboards/ergoslab/keymaps/default/config.h index e15fd605f4..8c198fd830 100644 --- a/keyboards/ergoslab/keymaps/default/config.h +++ b/keyboards/ergoslab/keymaps/default/config.h @@ -18,7 +18,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once /* Select hand configuration */ - -// #define MASTER_LEFT #define MASTER_RIGHT -// #define EE_HANDS diff --git a/keyboards/ergoslab/rev1/keyboard.json b/keyboards/ergoslab/rev1/keyboard.json index ef40c1d960..0d017d7a97 100644 --- a/keyboards/ergoslab/rev1/keyboard.json +++ b/keyboards/ergoslab/rev1/keyboard.json @@ -15,7 +15,9 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D2" + "serial": { + "pin": "D2" + } }, "rgblight": { "led_count": 2 diff --git a/keyboards/ergotravel/keymaps/default/config.h b/keyboards/ergotravel/keymaps/default/config.h index 746e60da5a..62da533a87 100644 --- a/keyboards/ergotravel/keymaps/default/config.h +++ b/keyboards/ergotravel/keymaps/default/config.h @@ -17,12 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Select hand configuration */ - -#define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS - #undef RGBLIGHT_LED_COUNT #define RGBLIGHT_EFFECT_BREATHING #define RGBLIGHT_EFFECT_RAINBOW_MOOD diff --git a/keyboards/ergotravel/keymaps/via/config.h b/keyboards/ergotravel/keymaps/via/config.h deleted file mode 100644 index d42b738adc..0000000000 --- a/keyboards/ergotravel/keymaps/via/config.h +++ /dev/null @@ -1,30 +0,0 @@ -/* -Copyright 2017 Pierre Constantineau <[email protected]> - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#pragma once - -/* Select hand configuration */ - -#define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS - -// #undef RGBLIGHT_LED_COUNT -// #define RGBLIGHT_LED_COUNT 14 -// #define RGBLIGHT_HUE_STEP 8 -// #define RGBLIGHT_SAT_STEP 8 -// #define RGBLIGHT_VAL_STEP 8 diff --git a/keyboards/ergotravel/rev1/keyboard.json b/keyboards/ergotravel/rev1/keyboard.json index 7a6710c7bd..0c34bf04bd 100644 --- a/keyboards/ergotravel/rev1/keyboard.json +++ b/keyboards/ergotravel/rev1/keyboard.json @@ -15,7 +15,9 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D0" + "serial": { + "pin": "D0" + } }, "rgblight": { "led_count": 12 diff --git a/keyboards/etiennecollin/wave/keyboard.json b/keyboards/etiennecollin/wave/keyboard.json index 5e31a1ca2a..272cbdd002 100644 --- a/keyboards/etiennecollin/wave/keyboard.json +++ b/keyboards/etiennecollin/wave/keyboard.json @@ -37,7 +37,9 @@ "community_layouts": ["split_3x5_3"], "split": { "enabled": true, - "soft_serial_pin": "D2", + "serial": { + "pin": "D2" + }, "usb_detect": { "enabled": true }, diff --git a/keyboards/evyd13/gh80_3700/gh80_3700.c b/keyboards/evyd13/gh80_3700/gh80_3700.c index 6d903e48e1..8c4c81fe64 100644 --- a/keyboards/evyd13/gh80_3700/gh80_3700.c +++ b/keyboards/evyd13/gh80_3700/gh80_3700.c @@ -15,24 +15,16 @@ */ #include "quantum.h" -void led_init_ports(void) { - gpio_set_pin_output(E6); +void keyboard_pre_init_kb(void) { gpio_set_pin_output(B1); gpio_set_pin_output(D0); gpio_set_pin_output(D1); gpio_set_pin_output(F0); - gpio_write_pin_high(E6); gpio_write_pin_high(B1); gpio_write_pin_high(D0); gpio_write_pin_high(D1); gpio_write_pin_high(F0); -} - -bool led_update_kb(led_t led_state) { - if(led_update_user(led_state)) { - gpio_write_pin(E6, !led_state.num_lock); - } - return true; -}
\ No newline at end of file + keyboard_pre_init_user(); +} diff --git a/keyboards/evyd13/gh80_3700/keyboard.json b/keyboards/evyd13/gh80_3700/keyboard.json index fa11a482df..a647f46118 100644 --- a/keyboards/evyd13/gh80_3700/keyboard.json +++ b/keyboards/evyd13/gh80_3700/keyboard.json @@ -23,6 +23,10 @@ "resync": true } }, + "indicators": { + "num_lock": "E6", + "on_state": 0 + }, "matrix_pins": { "cols": ["B0", "D7", "D6", "D4"], "rows": ["B3", "C7", "C6", "B6", "B5", "B4"] diff --git a/keyboards/evyd13/gud70/gud70.c b/keyboards/evyd13/gud70/gud70.c index 5c40045521..118c68e566 100644 --- a/keyboards/evyd13/gud70/gud70.c +++ b/keyboards/evyd13/gud70/gud70.c @@ -19,4 +19,6 @@ void keyboard_pre_init_kb(void) { // Enable top LED gpio_set_pin_output(B3); gpio_write_pin_low(B3); + + keyboard_pre_init_user(); } diff --git a/keyboards/exclusive/e6_rgb/e6_rgb.c b/keyboards/exclusive/e6_rgb/e6_rgb.c index 19dd96a073..9a7856306b 100644 --- a/keyboards/exclusive/e6_rgb/e6_rgb.c +++ b/keyboards/exclusive/e6_rgb/e6_rgb.c @@ -168,6 +168,10 @@ led_config_t g_led_config = { { #endif bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + if (!process_record_user(keycode, record)) { + return false; + } + if (record->event.pressed) { switch(keycode) { #if defined(RGBLIGHT_ENABLE) && defined(RGB_MATRIX_ENABLE) diff --git a/keyboards/exclusive/e85/hotswap/hotswap.c b/keyboards/exclusive/e85/hotswap/hotswap.c deleted file mode 100644 index 18ca30b44c..0000000000 --- a/keyboards/exclusive/e85/hotswap/hotswap.c +++ /dev/null @@ -1,32 +0,0 @@ -/* Copyright 2020 MechMerlin - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -#include "quantum.h" - -void keyboard_pre_init_kb(void) { - gpio_set_pin_output(C7); - gpio_set_pin_output(B5); - - keyboard_pre_init_user(); -} - -bool led_update_kb(led_t led_state) { - if (led_update_user(led_state)) { - gpio_write_pin(C7, led_state.caps_lock); - gpio_write_pin(B5, led_state.scroll_lock); - } - return true; -} diff --git a/keyboards/exclusive/e85/hotswap/keyboard.json b/keyboards/exclusive/e85/hotswap/keyboard.json index 4bd8e73882..7fcd61c843 100644 --- a/keyboards/exclusive/e85/hotswap/keyboard.json +++ b/keyboards/exclusive/e85/hotswap/keyboard.json @@ -18,6 +18,10 @@ "levels": 6, "breathing": true }, + "indicators": { + "caps_lock": "C7", + "scroll_lock": "B5" + }, "rgblight": { "saturation_steps": 8, "brightness_steps": 8, diff --git a/keyboards/exclusive/e85/soldered/keyboard.json b/keyboards/exclusive/e85/soldered/keyboard.json index 8b4ebbfc57..dfd6d18826 100644 --- a/keyboards/exclusive/e85/soldered/keyboard.json +++ b/keyboards/exclusive/e85/soldered/keyboard.json @@ -18,6 +18,10 @@ "levels": 6, "breathing": true }, + "indicators": { + "caps_lock": "C7", + "scroll_lock": "B5" + }, "rgblight": { "saturation_steps": 8, "brightness_steps": 8, diff --git a/keyboards/exclusive/e85/soldered/soldered.c b/keyboards/exclusive/e85/soldered/soldered.c deleted file mode 100644 index bdee95c26c..0000000000 --- a/keyboards/exclusive/e85/soldered/soldered.c +++ /dev/null @@ -1,32 +0,0 @@ -/* Copyright 2020 VashtaNerada - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -#include "quantum.h" - -void keyboard_pre_init_kb(void) { - gpio_set_pin_output(C7); - gpio_set_pin_output(B5); - - keyboard_pre_init_user(); -} - -bool led_update_kb(led_t led_state) { - if (led_update_user(led_state)) { - gpio_write_pin(C7, led_state.caps_lock); - gpio_write_pin(B5, led_state.scroll_lock); - } - return true; -} diff --git a/keyboards/fallacy/fallacy.c b/keyboards/fallacy/fallacy.c index 05f68a0f99..9ed484d69a 100755 --- a/keyboards/fallacy/fallacy.c +++ b/keyboards/fallacy/fallacy.c @@ -22,9 +22,8 @@ void matrix_init_kb(void) { matrix_init_user(); } -void matrix_scan_kb(void) { +void housekeeping_task_kb(void) { update_fallacy_leds(); - matrix_scan_user(); } /* update LED driver with usb led_state diff --git a/keyboards/fatotesa/keyboard.json b/keyboards/fatotesa/keyboard.json index bdd5e40478..ba6fc08d0c 100644 --- a/keyboards/fatotesa/keyboard.json +++ b/keyboards/fatotesa/keyboard.json @@ -21,7 +21,9 @@ }, "split": { "enabled": true, - "soft_serial_pin": "D2", + "serial": { + "pin": "D2" + }, "usb_detect": { "enabled": true, "timeout": 2500 diff --git a/keyboards/ferris/0_2/bling/bling.c b/keyboards/ferris/0_2/bling/bling.c index 69fbe411eb..b33b05c727 100644 --- a/keyboards/ferris/0_2/bling/bling.c +++ b/keyboards/ferris/0_2/bling/bling.c @@ -16,8 +16,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include "quantum.h" -#include "drivers/led/issi/is31fl3731.h" - +#ifdef RGB_MATRIX_ENABLE /* | Left || Right | | | 3 | | 0 || 0 | | 3 | | @@ -49,36 +48,4 @@ const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = { {0, C9_11, C8_11, C7_11}, // Left RGB 4 {0, C9_9, C8_9, C7_9}, // Left RGB 6 }; -// clang-format off -led_config_t g_led_config = { - // Key Matrix to LED Index - { - { 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. The unit is roughly milimiters in the real world - // | Left || Right | - // x->| 10 | 32 | 64 || 160 | 192 | 214 | - // y |_____|_____|____||_____|_____|_____| - // 0 | | 1 | 2 || 3 | 4 | | - // 16 | 0 | | || | | 5 | - // 35 | | | 11 || 8 | | | - // 45 | | 12 | || | 7 | | - // 50 | 13 | | 10 || 9 | | 6 | - // 0 1 2 3 4 5 - {10, 16}, {32, 0}, {64, 0}, {160, 0}, {192, 0}, {214, 16}, - // 6 7 8 9 - {214, 50}, {192, 45}, {160, 35}, {160, 50}, - // 10 11 12 13 - {64, 50}, {64, 35}, {32, 45}, {10, 50}, - }, { - // LED Index to Flag - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 - } -}; +#endif diff --git a/keyboards/ferris/0_2/bling/config.h b/keyboards/ferris/0_2/bling/config.h index 2325463e1f..e1365033fc 100644 --- a/keyboards/ferris/0_2/bling/config.h +++ b/keyboards/ferris/0_2/bling/config.h @@ -20,5 +20,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* LED Drivers */ #define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND #define IS31FL3731_I2C_ADDRESS_2 IS31FL3731_I2C_ADDRESS_SCL - -#define RGB_MATRIX_LED_COUNT 14 diff --git a/keyboards/ferris/0_2/bling/keyboard.json b/keyboards/ferris/0_2/bling/keyboard.json index 22ef500d6d..ce35aef2ae 100644 --- a/keyboards/ferris/0_2/bling/keyboard.json +++ b/keyboards/ferris/0_2/bling/keyboard.json @@ -49,7 +49,23 @@ "solid_splash": true, "solid_multisplash": true }, - "driver": "is31fl3731" + "driver": "is31fl3731", + "layout": [ + {"x": 0, "y": 16, "flags": 4}, + {"x": 36, "y": 0, "flags": 4}, + {"x": 72, "y": 0, "flags": 4}, + {"x": 152, "y": 0, "flags": 4}, + {"x": 188, "y": 0, "flags": 4}, + {"x": 224, "y": 16, "flags": 4}, + {"x": 224, "y": 64, "flags": 4}, + {"x": 188, "y": 48, "flags": 4}, + {"x": 152, "y": 36, "flags": 4}, + {"x": 152, "y": 64, "flags": 4}, + {"x": 72, "y": 64, "flags": 4}, + {"x": 72, "y": 36, "flags": 4}, + {"x": 36, "y": 48, "flags": 4}, + {"x": 0, "y": 64, "flags": 4} + ] }, "features": { "rgb_matrix": true diff --git a/keyboards/ferris/sweep/keyboard.json b/keyboards/ferris/sweep/keyboard.json index 567ef16a86..0bb407cb79 100644 --- a/keyboards/ferris/sweep/keyboard.json +++ b/keyboards/ferris/sweep/keyboard.json @@ -23,7 +23,6 @@ }, "split": { "enabled": true, - "soft_serial_pin": "D2", "bootmagic": { "matrix": [4, 4] }, @@ -36,6 +35,9 @@ ["B5", "B4", null, null, null] ] } + }, + "serial": { + "pin": "D2" } }, "community_layouts": ["split_3x5_2"], diff --git a/keyboards/fjlabs/bolsa65/bolsa65.c b/keyboards/fjlabs/bolsa65/bolsa65.c deleted file mode 100644 index 669404192c..0000000000 --- a/keyboards/fjlabs/bolsa65/bolsa65.c +++ /dev/null @@ -1,28 +0,0 @@ -/* -Copyright 2020 <[email protected]> -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. -You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ -#include "quantum.h" - -void matrix_init_kb(void) { - // Initialize indicator LEDs to output - gpio_set_pin_output(F7); // Caps - matrix_init_user(); -} - -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if(res) { - gpio_write_pin(F7, led_state.caps_lock); - } - return res; -} diff --git a/keyboards/fjlabs/bolsa65/keyboard.json b/keyboards/fjlabs/bolsa65/keyboard.json index dfa47e90bb..63281ae9f6 100644 --- a/keyboards/fjlabs/bolsa65/keyboard.json +++ b/keyboards/fjlabs/bolsa65/keyboard.json @@ -8,6 +8,9 @@ "pid": "0x0001", "device_version": "0.0.1" }, + "indicators": { + "caps_lock": "F7" + }, "matrix_pins": { "cols": ["C7", "B1", "B2", "B3", "B7", "D0", "D1", "D2", "D3", "D5", "D4", "D6", "D7", "B4", "B5"], "rows": ["F1", "F0", "F6", "F5", "F4"] diff --git a/keyboards/fluorite/keyboard.json b/keyboards/fluorite/keyboard.json index 2338c72671..37e74c387c 100644 --- a/keyboards/fluorite/keyboard.json +++ b/keyboards/fluorite/keyboard.json @@ -15,7 +15,9 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D2" + "serial": { + "pin": "D2" + } }, "processor": "atmega32u4", "bootloader": "atmel-dfu", diff --git a/keyboards/flx/virgo/keyboard.json b/keyboards/flx/virgo/keyboard.json index 8396ce51da..996425282d 100644 --- a/keyboards/flx/virgo/keyboard.json +++ b/keyboards/flx/virgo/keyboard.json @@ -30,6 +30,11 @@ "pin": "B7", "levels": 5 }, + "indicators": { + "caps_lock": "E6", + "scroll_lock": "B2", + "on_state": 0 + }, "rgblight": { "saturation_steps": 8, "brightness_steps": 8, diff --git a/keyboards/flx/virgo/virgo.c b/keyboards/flx/virgo/virgo.c deleted file mode 100644 index 2f875531d0..0000000000 --- a/keyboards/flx/virgo/virgo.c +++ /dev/null @@ -1,34 +0,0 @@ -/* Copyright 2019 MechMerlin - * Edits etc 2020 Flexerm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ -#include "quantum.h" - -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - - gpio_set_pin_output(E6); - gpio_set_pin_output(B2); - matrix_init_user(); -} - -bool led_update_kb(led_t led_state) { - if(led_update_user(led_state)) { - gpio_write_pin(E6, !led_state.caps_lock); - gpio_write_pin(B2, !led_state.scroll_lock); - } - return true; -} diff --git a/keyboards/flxlb/zplit/keyboard.json b/keyboards/flxlb/zplit/keyboard.json index 2fcbd81742..cd16ef7a15 100644 --- a/keyboards/flxlb/zplit/keyboard.json +++ b/keyboards/flxlb/zplit/keyboard.json @@ -56,7 +56,9 @@ }, "split": { "enabled": true, - "soft_serial_pin": "D0" + "serial": { + "pin": "D0" + } }, "processor": "atmega32u4", "bootloader": "atmel-dfu", diff --git a/keyboards/flxlb/zplit/keymaps/default/config.h b/keyboards/flxlb/zplit/keymaps/default/config.h deleted file mode 100644 index a157047f7a..0000000000 --- a/keyboards/flxlb/zplit/keymaps/default/config.h +++ /dev/null @@ -1,28 +0,0 @@ -/* -This is the c configuration file for the keymap - -Copyright 2012 Jun Wako <[email protected]> -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 <http://www.gnu.org/licenses/>. -*/ - -#pragma once - -//#define USE_I2C - -/* Select hand configuration */ -#define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS diff --git a/keyboards/flxlb/zplit/keymaps/via/config.h b/keyboards/flxlb/zplit/keymaps/via/config.h deleted file mode 100644 index a157047f7a..0000000000 --- a/keyboards/flxlb/zplit/keymaps/via/config.h +++ /dev/null @@ -1,28 +0,0 @@ -/* -This is the c configuration file for the keymap - -Copyright 2012 Jun Wako <[email protected]> -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 <http://www.gnu.org/licenses/>. -*/ - -#pragma once - -//#define USE_I2C - -/* Select hand configuration */ -#define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS diff --git a/keyboards/for_science/keyboard.json b/keyboards/for_science/keyboard.json index da36bf9188..5ae7808d42 100644 --- a/keyboards/for_science/keyboard.json +++ b/keyboards/for_science/keyboard.json @@ -10,7 +10,9 @@ }, "split": { "enabled": true, - "soft_serial_pin": "D0" + "serial": { + "pin": "D0" + } }, "features": { "bootmagic": true, diff --git a/keyboards/fortitude60/rev1/keyboard.json b/keyboards/fortitude60/rev1/keyboard.json index cf3af329a8..4ad8a723b7 100644 --- a/keyboards/fortitude60/rev1/keyboard.json +++ b/keyboards/fortitude60/rev1/keyboard.json @@ -25,7 +25,9 @@ }, "split": { "enabled": true, - "soft_serial_pin": "D2" + "serial": { + "pin": "D2" + } }, "processor": "atmega32u4", "bootloader": "caterina", diff --git a/keyboards/fungo/rev1/keyboard.json b/keyboards/fungo/rev1/keyboard.json index 06ebf87f05..0970a027c8 100644 --- a/keyboards/fungo/rev1/keyboard.json +++ b/keyboards/fungo/rev1/keyboard.json @@ -25,12 +25,14 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D3", "matrix_pins": { "right": { "cols": ["F7", "F6", "F5", "F4", "B5", "B4", "E6"], "rows": ["D1", "D0", "D4", "C6", "D7", "D3"] } + }, + "serial": { + "pin": "D3" } }, "qmk": { diff --git a/keyboards/gboards/butterstick/butterstick.c b/keyboards/gboards/butterstick/butterstick.c deleted file mode 100644 index e19edc69ac..0000000000 --- a/keyboards/gboards/butterstick/butterstick.c +++ /dev/null @@ -1,26 +0,0 @@ -/* Copyright 2019 Jane Bernhardt - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ -#include "quantum.h" - -void matrix_scan_kb(void) { -#ifdef DEBUG_MATRIX - for (uint8_t c = 0; c < MATRIX_COLS; c++) - for (uint8_t r = 0; r < MATRIX_ROWS; r++) - if (matrix_is_on(r, c)) xprintf("r:%d c:%d \n", r, c); -#endif - - matrix_scan_user(); -} diff --git a/keyboards/geekboards/macropad_v2/macropad_v2.c b/keyboards/geekboards/macropad_v2/macropad_v2.c index 191290d3fa..ba65697988 100644 --- a/keyboards/geekboards/macropad_v2/macropad_v2.c +++ b/keyboards/geekboards/macropad_v2/macropad_v2.c @@ -53,13 +53,4 @@ led_config_t g_led_config = { { 2, 2, 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 diff --git a/keyboards/geekboards/tester/keyboard.json b/keyboards/geekboards/tester/keyboard.json index 60c6b34e00..743e5e2392 100644 --- a/keyboards/geekboards/tester/keyboard.json +++ b/keyboards/geekboards/tester/keyboard.json @@ -50,7 +50,8 @@ "solid_reactive_nexus": true, "solid_reactive_multinexus": true }, - "driver": "is31fl3731" + "driver": "is31fl3731", + "sleep": true }, "features": { "bootmagic": true, diff --git a/keyboards/geekboards/tester/tester.c b/keyboards/geekboards/tester/tester.c index 11d2eb4db2..4daa4ef062 100644 --- a/keyboards/geekboards/tester/tester.c +++ b/keyboards/geekboards/tester/tester.c @@ -29,13 +29,3 @@ led_config_t g_led_config = { 4, 4, 4, 4, 4, 4, 4, 4 } }; - -void suspend_power_down_kb(void) { - rgb_matrix_set_suspend_state(true); - suspend_power_down_user(); -} - -void suspend_wakeup_init_kb(void) { - rgb_matrix_set_suspend_state(false); - suspend_wakeup_init_user(); -} diff --git a/keyboards/ghs/rar/keyboard.json b/keyboards/ghs/rar/keyboard.json index 22b133c8f9..96184abe6a 100644 --- a/keyboards/ghs/rar/keyboard.json +++ b/keyboards/ghs/rar/keyboard.json @@ -8,6 +8,10 @@ "pid": "0x0001", "device_version": "0.0.1" }, + "indicators": { + "caps_lock": "B1", + "scroll_lock": "B3" + }, "rgblight": { "led_count": 17, "animations": { diff --git a/keyboards/ghs/rar/rar.c b/keyboards/ghs/rar/rar.c deleted file mode 100644 index 591932c99c..0000000000 --- a/keyboards/ghs/rar/rar.c +++ /dev/null @@ -1,36 +0,0 @@ -/* Copyright 2020 Gone Hacking 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 <http://www.gnu.org/licenses/>. - */ - -#include "quantum.h" - -void keyboard_pre_init_kb(void) { - // Set our LED pins as output. - gpio_set_pin_output(B1); - gpio_set_pin_output(B3); - - keyboard_pre_init_user(); -} - -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - - if (res) { - gpio_write_pin(B1, led_state.caps_lock); - gpio_write_pin(B3, led_state.scroll_lock); - } - - return res; -} diff --git a/keyboards/giabalanai/keyboard.json b/keyboards/giabalanai/keyboard.json index 6cadf02328..ae43139dad 100644 --- a/keyboards/giabalanai/keyboard.json +++ b/keyboards/giabalanai/keyboard.json @@ -51,7 +51,6 @@ }, "split": { "enabled": true, - "soft_serial_pin": "D2", "encoder": { "right": { "rotary": [ @@ -64,6 +63,9 @@ "cols": ["F4", "F5", "F6", "F7", "B1", "B3", "B2", "C7", "B7", "F1"], "rows": ["D1", "D0", "D4", "C6", "D7", "E6"] } + }, + "serial": { + "pin": "D2" } }, "qmk": { diff --git a/keyboards/giabalanai/keymaps/2firmware/config.h b/keyboards/giabalanai/keymaps/2firmware/config.h index e5ec1d73e2..a60cb59368 100644 --- a/keyboards/giabalanai/keymaps/2firmware/config.h +++ b/keyboards/giabalanai/keymaps/2firmware/config.h @@ -19,7 +19,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //#define USE_MATRIX_I2C /* Select hand configuration */ - -// #define MASTER_LEFT -// #define MASTER_RIGHT #define EE_HANDS diff --git a/keyboards/gmmk/numpad/matrix.c b/keyboards/gmmk/numpad/matrix.c index 4ec41bdb73..8d6e641a77 100644 --- a/keyboards/gmmk/numpad/matrix.c +++ b/keyboards/gmmk/numpad/matrix.c @@ -19,21 +19,21 @@ static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; #define MATRIX_ROW_SHIFTER ((matrix_row_t)1) -static inline void setPinOutput_writeLow(pin_t pin) { +static inline void gpio_atomic_set_pin_output_low(pin_t pin) { ATOMIC_BLOCK_FORCEON { gpio_set_pin_output(pin); gpio_write_pin_low(pin); } } -static inline void setPinOutput_writeHigh(pin_t pin) { +static inline void gpio_atomic_set_pin_output_high(pin_t pin) { ATOMIC_BLOCK_FORCEON { gpio_set_pin_output(pin); gpio_write_pin_high(pin); } } -static inline void setPinInputHigh_atomic(pin_t pin) { +static inline void gpio_atomic_set_pin_input_high(pin_t pin) { ATOMIC_BLOCK_FORCEON { gpio_set_pin_input_high(pin); } @@ -50,7 +50,7 @@ static inline uint8_t readMatrixPin(pin_t pin) { static bool select_col(uint8_t col) { pin_t pin = col_pins[col]; if (pin != NO_PIN) { - setPinOutput_writeLow(pin); + gpio_atomic_set_pin_output_low(pin); return true; } return false; @@ -60,9 +60,9 @@ static void unselect_col(uint8_t col) { pin_t pin = col_pins[col]; if (pin != NO_PIN) { # ifdef MATRIX_UNSELECT_DRIVE_HIGH - setPinOutput_writeHigh(pin); + gpio_atomic_set_pin_output_high(pin); # else - setPinInputHigh_atomic(pin); + gpio_atomic_set_pin_input_high(pin); # endif } } @@ -78,10 +78,10 @@ __attribute__((weak)) void matrix_init_custom(void) { unselect_cols(); for (uint8_t x = 0; x < MATRIX_ROWS; x++) { if (row_pins[x] != NO_PIN) { - setPinInputHigh_atomic(row_pins[x]); + gpio_atomic_set_pin_input_high(row_pins[x]); } } - setPinInputHigh_atomic(B8); + gpio_atomic_set_pin_input_high(B8); } __attribute__((weak)) void matrix_read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col, matrix_row_t row_shifter) { // Start with a clear matrix row diff --git a/keyboards/gray_studio/think65/solder/keyboard.json b/keyboards/gray_studio/think65/solder/keyboard.json index 9706e8b4b4..09096a854e 100644 --- a/keyboards/gray_studio/think65/solder/keyboard.json +++ b/keyboards/gray_studio/think65/solder/keyboard.json @@ -41,6 +41,10 @@ "nkro": false, "rgblight": true }, + "indicators": { + "caps_lock": "C7", + "on_state": 0 + }, "matrix_pins": { "cols": ["D1", "D0", "D2", "D3", "D5", "D4", "D6", "D7", "B4", "B5", "F0", "F1", "B6", "F4", "F5", "F6"], "rows": ["B0", "B1", "B2", "B3", "E6"] diff --git a/keyboards/gray_studio/think65/solder/solder.c b/keyboards/gray_studio/think65/solder/solder.c deleted file mode 100644 index 84267b9db0..0000000000 --- a/keyboards/gray_studio/think65/solder/solder.c +++ /dev/null @@ -1,36 +0,0 @@ -/* Copyright 2019 MechMerlin - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ -#include "quantum.h" - -// Optional override functions below. -// You can leave any or all of these undefined. -// These are only required if you want to perform custom actions. - - -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - - gpio_set_pin_output(C7); - matrix_init_user(); -} - -bool led_update_kb(led_t led_state) { - if(led_update_user(led_state)) { - gpio_write_pin(C7, !led_state.caps_lock); - } - return true; -} diff --git a/keyboards/gregandcin/teaqueen/keyboard.json b/keyboards/gregandcin/teaqueen/keyboard.json index 841c524e62..871c34587d 100644 --- a/keyboards/gregandcin/teaqueen/keyboard.json +++ b/keyboards/gregandcin/teaqueen/keyboard.json @@ -25,7 +25,10 @@ "rows": ["GP5", "GP6", "GP7", "GP8", "GP9"] } }, - "soft_serial_pin": "GP3" + "serial": { + "driver": "vendor", + "pin": "GP3" + } }, "url": "https://github.com/gregandcin/teaqueen", "usb": { diff --git a/keyboards/gregandcin/teaqueen/rules.mk b/keyboards/gregandcin/teaqueen/rules.mk deleted file mode 100644 index 161ec22b16..0000000000 --- a/keyboards/gregandcin/teaqueen/rules.mk +++ /dev/null @@ -1 +0,0 @@ -SERIAL_DRIVER = vendor diff --git a/keyboards/halfcliff/keyboard.json b/keyboards/halfcliff/keyboard.json index a864c4ce33..7d780c016a 100644 --- a/keyboards/halfcliff/keyboard.json +++ b/keyboards/halfcliff/keyboard.json @@ -15,7 +15,9 @@ }, "split": { "enabled": true, - "soft_serial_pin": "D2" + "serial": { + "pin": "D2" + } }, "rgblight": { "saturation_steps": 8, diff --git a/keyboards/halfcliff/matrix.c b/keyboards/halfcliff/matrix.c index ad3ad6ba09..790f8c41bb 100644 --- a/keyboards/halfcliff/matrix.c +++ b/keyboards/halfcliff/matrix.c @@ -50,25 +50,25 @@ matrix_row_t matrix_get_row(uint8_t row) { return matrix[row]; } void matrix_print(void) {} -static inline void setPinOutput_writeLow(pin_t pin) { +static inline void gpio_atomic_set_pin_output_low(pin_t pin) { ATOMIC_BLOCK_FORCEON { gpio_set_pin_output(pin); gpio_write_pin_low(pin); } } -static inline void setPinInputHigh_atomic(pin_t pin) { +static inline void gpio_atomic_set_pin_input_high(pin_t pin) { ATOMIC_BLOCK_FORCEON { gpio_set_pin_input_high(pin); } } // matrix code -static void select_row(uint8_t row) { setPinOutput_writeLow(row_pins[row]); } +static void select_row(uint8_t row) { gpio_atomic_set_pin_output_low(row_pins[row]); } -static void unselect_row(uint8_t row) { setPinInputHigh_atomic(row_pins[row]); } +static void unselect_row(uint8_t row) { gpio_atomic_set_pin_input_high(row_pins[row]); } static void unselect_rows(void) { for (uint8_t x = 0; x < ROWS_PER_HAND; x++) { - setPinInputHigh_atomic(row_pins[x]); + gpio_atomic_set_pin_input_high(row_pins[x]); } } @@ -103,24 +103,24 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) return false; } -static void select_col(uint8_t col) { setPinOutput_writeLow(col_pins[col]); } +static void select_col(uint8_t col) { gpio_atomic_set_pin_output_low(col_pins[col]); } -static void unselect_col(uint8_t col) { setPinInputHigh_atomic(col_pins[col]); } +static void unselect_col(uint8_t col) { gpio_atomic_set_pin_input_high(col_pins[col]); } static void unselect_cols(void) { for (uint8_t x = 0; x < MATRIX_COLS; x++) { - setPinInputHigh_atomic(col_pins[x]); + gpio_atomic_set_pin_input_high(col_pins[x]); } } static void init_pins(void) { unselect_rows(); for (uint8_t x = 0; x < MATRIX_COLS; x++) { - setPinInputHigh_atomic(col_pins[x]); + gpio_atomic_set_pin_input_high(col_pins[x]); } unselect_cols(); for (uint8_t x = 0; x < ROWS_PER_HAND; x++) { - setPinInputHigh_atomic(row_pins[x]); + gpio_atomic_set_pin_input_high(row_pins[x]); } } diff --git a/keyboards/handwired/aek64/aek64.c b/keyboards/handwired/aek64/aek64.c index 130d014616..21589b6910 100644 --- a/keyboards/handwired/aek64/aek64.c +++ b/keyboards/handwired/aek64/aek64.c @@ -16,21 +16,18 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include "quantum.h" -/* - * Hardware function pre initialisation. - * See https://docs.qmk.fm/#/custom_quantum_functions?id=example-keyboard_pre_init_user-implementation - */ -void keyboard_pre_init_user(void) { - // Call the keyboard pre init code. - +void keyboard_pre_init_kb(void) { // Set our LED pins as output gpio_set_pin_output(C3); + + keyboard_pre_init_user(); } void matrix_init_kb(void) { - // Flash the led 1 sec on startup. gpio_write_pin_high(C3); wait_ms(1000); gpio_write_pin_low(C3); + + matrix_init_user(); } diff --git a/keyboards/handwired/alcor_dactyl/keyboard.json b/keyboards/handwired/alcor_dactyl/keyboard.json index c179278c09..b38d39bfcc 100644 --- a/keyboards/handwired/alcor_dactyl/keyboard.json +++ b/keyboards/handwired/alcor_dactyl/keyboard.json @@ -19,7 +19,10 @@ "rgb_matrix": true }, "split": { - "enabled": true + "enabled": true, + "serial": { + "driver": "vendor" + } }, "diode_direction": "COL2ROW", "matrix_pins": { diff --git a/keyboards/handwired/alcor_dactyl/rules.mk b/keyboards/handwired/alcor_dactyl/rules.mk deleted file mode 100644 index 161ec22b16..0000000000 --- a/keyboards/handwired/alcor_dactyl/rules.mk +++ /dev/null @@ -1 +0,0 @@ -SERIAL_DRIVER = vendor diff --git a/keyboards/handwired/battleship_gamepad/battleship_gamepad.c b/keyboards/handwired/battleship_gamepad/battleship_gamepad.c index cccc03a287..6bfcb17fd4 100644 --- a/keyboards/handwired/battleship_gamepad/battleship_gamepad.c +++ b/keyboards/handwired/battleship_gamepad/battleship_gamepad.c @@ -16,13 +16,9 @@ #include "quantum.h" -/* joystick config */ -joystick_config_t joystick_axes[JOYSTICK_AXIS_COUNT] = { - [0] = JOYSTICK_AXIS_IN(F5, 1023, 512, 0), - [1] = JOYSTICK_AXIS_IN(F4, 0, 512, 1023) -}; - /* joystick button code (thumbstick pressed) */ void keyboard_pre_init_kb(void) { gpio_set_pin_input_high(F6); + + keyboard_pre_init_user(); } diff --git a/keyboards/handwired/battleship_gamepad/config.h b/keyboards/handwired/battleship_gamepad/config.h deleted file mode 100644 index b785c80aad..0000000000 --- a/keyboards/handwired/battleship_gamepad/config.h +++ /dev/null @@ -1,21 +0,0 @@ -/* Copyright 2021 Andrew Braini - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -#pragma once - -/* joystick configuration */ -#define JOYSTICK_BUTTON_COUNT 25 -#define JOYSTICK_AXIS_RESOLUTION 10 diff --git a/keyboards/handwired/battleship_gamepad/keyboard.json b/keyboards/handwired/battleship_gamepad/keyboard.json index 2832741875..8350f31fdd 100644 --- a/keyboards/handwired/battleship_gamepad/keyboard.json +++ b/keyboards/handwired/battleship_gamepad/keyboard.json @@ -13,6 +13,14 @@ "rows": ["B6", "B2", "B3", "B1", "F7"] }, "diode_direction": "COL2ROW", + "joystick": { + "button_count": 25, + "axis_resolution": 10, + "axes": { + "x": {"input_pin": "F5", "low": 1023, "rest": 512, "high": 0}, + "y": {"input_pin": "F4", "low": 0, "rest": 512, "high": 1023} + } + }, "processor": "atmega32u4", "bootloader": "caterina", "features": { diff --git a/keyboards/handwired/battleship_gamepad/rules.mk b/keyboards/handwired/battleship_gamepad/rules.mk deleted file mode 100644 index c5ab560bca..0000000000 --- a/keyboards/handwired/battleship_gamepad/rules.mk +++ /dev/null @@ -1 +0,0 @@ -JOYSTICK_DRIVER = analog diff --git a/keyboards/handwired/bento/rev1/config.h b/keyboards/handwired/bento/rev1/config.h new file mode 100644 index 0000000000..aeb48915b9 --- /dev/null +++ b/keyboards/handwired/bento/rev1/config.h @@ -0,0 +1,18 @@ +/* Copyright 2020 GhostSeven <[email protected]> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ +#pragma once + +#define RGBLIGHT_DEFAULT_MODE (RGBLIGHT_MODE_RAINBOW_SWIRL + 2) diff --git a/keyboards/handwired/bento/rev1/rev1.c b/keyboards/handwired/bento/rev1/rev1.c deleted file mode 100644 index 1dd5b683f1..0000000000 --- a/keyboards/handwired/bento/rev1/rev1.c +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright 2020 GhostSeven <[email protected]> - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ -#include "quantum.h" - -void eeconfig_init_kb(void) { -#ifdef RGBLIGHT_ENABLE - rgblight_enable(); // Enable RGB by default - rgblight_sethsv(0, 255, 255); // Set default HSV - red hue, full saturation, full brightness -#ifdef RGBLIGHT_EFFECT_RAINBOW_SWIRL - rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL + 2); // set to RGB_RAINBOW_SWIRL by default -#endif -#endif - - eeconfig_init_user(); -} diff --git a/keyboards/handwired/brain/keyboard.json b/keyboards/handwired/brain/keyboard.json index 95c09ecfc9..c5f8c3682c 100644 --- a/keyboards/handwired/brain/keyboard.json +++ b/keyboards/handwired/brain/keyboard.json @@ -40,7 +40,6 @@ }, "split": { "enabled": true, - "soft_serial_pin": "D0", "bootmagic": { "matrix": [5, 0] }, @@ -48,6 +47,9 @@ "right": { "cols": ["B5", "B4", "E6", "D7", "C6", "D4", "D1"] } + }, + "serial": { + "pin": "D0" } }, "processor": "atmega32u4", diff --git a/keyboards/handwired/chiron/config.h b/keyboards/handwired/chiron/config.h deleted file mode 100644 index 254bed5c74..0000000000 --- a/keyboards/handwired/chiron/config.h +++ /dev/null @@ -1,21 +0,0 @@ -/* -Copyright 2019 Mike Hix - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#pragma once - -// Pro Micro Pins RX1 -#define SPLIT_HAND_PIN D2 diff --git a/keyboards/handwired/chiron/keyboard.json b/keyboards/handwired/chiron/keyboard.json index f02c8cea28..1685a9d477 100644 --- a/keyboards/handwired/chiron/keyboard.json +++ b/keyboards/handwired/chiron/keyboard.json @@ -41,7 +41,12 @@ }, "split": { "enabled": true, - "soft_serial_pin": "D0" + "handedness": { + "pin": "D2" + }, + "serial": { + "pin": "D0" + } }, "processor": "atmega32u4", "bootloader": "atmel-dfu", diff --git a/keyboards/handwired/chiron/keymaps/default/config.h b/keyboards/handwired/chiron/keymaps/default/config.h index 5d8a8a083d..b636b8de81 100644 --- a/keyboards/handwired/chiron/keymaps/default/config.h +++ b/keyboards/handwired/chiron/keymaps/default/config.h @@ -17,7 +17,6 @@ #pragma once #define MASTER_RIGHT -//#define MASTER_LEFT #define PERMISSIVE_HOLD diff --git a/keyboards/handwired/colorlice/colorlice.c b/keyboards/handwired/colorlice/colorlice.c index ede3fba82f..81e87d8c7a 100644 --- a/keyboards/handwired/colorlice/colorlice.c +++ b/keyboards/handwired/colorlice/colorlice.c @@ -37,32 +37,3 @@ led_config_t g_led_config = { { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } }; #endif - -#ifdef RGB_MATRIX_ENABLE -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 - -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if(res) { - // gpio_write_pin sets the pin high for 1 and low for 0. - // In this example the pins are inverted, setting - // it low/0 turns it on, and high/1 turns the LED off. - // This behavior depends on whether the LED is between the pin - // and VCC or the pin and GND. - gpio_write_pin(B2, !led_state.num_lock); - gpio_write_pin(C6, !led_state.caps_lock); - gpio_write_pin(B7, !led_state.scroll_lock); - } - return res; -} diff --git a/keyboards/handwired/colorlice/keyboard.json b/keyboards/handwired/colorlice/keyboard.json index 77f5ded097..4ccc10527c 100644 --- a/keyboards/handwired/colorlice/keyboard.json +++ b/keyboards/handwired/colorlice/keyboard.json @@ -65,6 +65,12 @@ "build": { "lto": true }, + "indicators": { + "caps_lock": "C6", + "num_lock": "B2", + "scroll_lock": "B7", + "on_state": 0 + }, "features": { "bootmagic": true, "command": false, diff --git a/keyboards/handwired/dactyl_manuform/4x5/keymaps/default/config.h b/keyboards/handwired/dactyl_manuform/4x5/keymaps/default/config.h index 335ac8cd3e..b0e65f08c9 100644 --- a/keyboards/handwired/dactyl_manuform/4x5/keymaps/default/config.h +++ b/keyboards/handwired/dactyl_manuform/4x5/keymaps/default/config.h @@ -21,7 +21,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once /* Select hand configuration */ -//#define MASTER_LEFT -//#define MASTER_RIGHT - #define EE_HANDS diff --git a/keyboards/handwired/dactyl_manuform/4x5/keymaps/dvorak/config.h b/keyboards/handwired/dactyl_manuform/4x5/keymaps/dvorak/config.h index cbacb25ca4..b0e65f08c9 100644 --- a/keyboards/handwired/dactyl_manuform/4x5/keymaps/dvorak/config.h +++ b/keyboards/handwired/dactyl_manuform/4x5/keymaps/dvorak/config.h @@ -21,7 +21,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once /* Select hand configuration */ - -// #define MASTER_LEFT -// #define MASTER_RIGHT #define EE_HANDS diff --git a/keyboards/handwired/dactyl_manuform/4x6/keymaps/default/config.h b/keyboards/handwired/dactyl_manuform/4x6/keymaps/default/config.h index 335ac8cd3e..b0e65f08c9 100644 --- a/keyboards/handwired/dactyl_manuform/4x6/keymaps/default/config.h +++ b/keyboards/handwired/dactyl_manuform/4x6/keymaps/default/config.h @@ -21,7 +21,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once /* Select hand configuration */ -//#define MASTER_LEFT -//#define MASTER_RIGHT - #define EE_HANDS diff --git a/keyboards/handwired/dactyl_manuform/4x6/keymaps/via/config.h b/keyboards/handwired/dactyl_manuform/4x6/keymaps/via/config.h index ce7fd324eb..1972348cef 100644 --- a/keyboards/handwired/dactyl_manuform/4x6/keymaps/via/config.h +++ b/keyboards/handwired/dactyl_manuform/4x6/keymaps/via/config.h @@ -22,7 +22,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once /* Select hand configuration */ -// #define MASTER_LEFT -// #define MASTER_RIGHT - #define EE_HANDS diff --git a/keyboards/handwired/dactyl_manuform/4x6_4_3/keymaps/default/config.h b/keyboards/handwired/dactyl_manuform/4x6_4_3/keymaps/default/config.h deleted file mode 100644 index 4d83c191f3..0000000000 --- a/keyboards/handwired/dactyl_manuform/4x6_4_3/keymaps/default/config.h +++ /dev/null @@ -1,23 +0,0 @@ -/* -Copyright 2012 Jun Wako <[email protected]> - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#pragma once - -#define MASTER_LEFT -//#define MASTER_RIGHT - -//#define EE_HANDS diff --git a/keyboards/handwired/dactyl_manuform/5x6/keymaps/default/config.h b/keyboards/handwired/dactyl_manuform/5x6/keymaps/default/config.h deleted file mode 100644 index 4d83c191f3..0000000000 --- a/keyboards/handwired/dactyl_manuform/5x6/keymaps/default/config.h +++ /dev/null @@ -1,23 +0,0 @@ -/* -Copyright 2012 Jun Wako <[email protected]> - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#pragma once - -#define MASTER_LEFT -//#define MASTER_RIGHT - -//#define EE_HANDS diff --git a/keyboards/handwired/dactyl_manuform/5x6/keymaps/swedish/config.h b/keyboards/handwired/dactyl_manuform/5x6/keymaps/swedish/config.h deleted file mode 100644 index b63c5788d1..0000000000 --- a/keyboards/handwired/dactyl_manuform/5x6/keymaps/swedish/config.h +++ /dev/null @@ -1,24 +0,0 @@ -/* -Copyright 2012 Jun Wako <[email protected]> - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - - -#pragma once - -#define MASTER_LEFT -// #define MASTER_RIGHT -//#define EE_HANDS -// Rows are doubled-up diff --git a/keyboards/handwired/dactyl_manuform/5x7/keymaps/default/config.h b/keyboards/handwired/dactyl_manuform/5x7/keymaps/default/config.h deleted file mode 100644 index 4d83c191f3..0000000000 --- a/keyboards/handwired/dactyl_manuform/5x7/keymaps/default/config.h +++ /dev/null @@ -1,23 +0,0 @@ -/* -Copyright 2012 Jun Wako <[email protected]> - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#pragma once - -#define MASTER_LEFT -//#define MASTER_RIGHT - -//#define EE_HANDS diff --git a/keyboards/handwired/dactyl_manuform/5x7/keymaps/via/config.h b/keyboards/handwired/dactyl_manuform/5x7/keymaps/via/config.h deleted file mode 100644 index 4d83c191f3..0000000000 --- a/keyboards/handwired/dactyl_manuform/5x7/keymaps/via/config.h +++ /dev/null @@ -1,23 +0,0 @@ -/* -Copyright 2012 Jun Wako <[email protected]> - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#pragma once - -#define MASTER_LEFT -//#define MASTER_RIGHT - -//#define EE_HANDS diff --git a/keyboards/handwired/dactyl_manuform/6x6/blackpill_f411/config.h b/keyboards/handwired/dactyl_manuform/6x6/blackpill_f411/config.h index 9639d4ba1d..2258a17c2e 100644 --- a/keyboards/handwired/dactyl_manuform/6x6/blackpill_f411/config.h +++ b/keyboards/handwired/dactyl_manuform/6x6/blackpill_f411/config.h @@ -19,7 +19,6 @@ // in col2row col is input, and row is output // #define SPLIT_HAND_MATRIX_GRID A10, A4 // 68kohm -#define SPLIT_HAND_PIN B10 /* connection */ #define SERIAL_USART_FULL_DUPLEX // Enable full duplex operation mode. diff --git a/keyboards/handwired/dactyl_manuform/6x6/blackpill_f411/keyboard.json b/keyboards/handwired/dactyl_manuform/6x6/blackpill_f411/keyboard.json index 73ce0d27d5..efefb5e550 100644 --- a/keyboards/handwired/dactyl_manuform/6x6/blackpill_f411/keyboard.json +++ b/keyboards/handwired/dactyl_manuform/6x6/blackpill_f411/keyboard.json @@ -8,6 +8,12 @@ "enabled": true, "bootmagic": { "matrix": [7, 0] + }, + "serial": { + "driver": "usart" + }, + "handedness": { + "pin": "B10" } }, "development_board": "blackpill_f411", diff --git a/keyboards/handwired/dactyl_manuform/6x6/blackpill_f411/rules.mk b/keyboards/handwired/dactyl_manuform/6x6/blackpill_f411/rules.mk deleted file mode 100644 index c018471cad..0000000000 --- a/keyboards/handwired/dactyl_manuform/6x6/blackpill_f411/rules.mk +++ /dev/null @@ -1,3 +0,0 @@ -# split settings -# https://beta.docs.qmk.fm/developing-qmk/c-development/hardware_drivers/serial_driver -SERIAL_DRIVER = usart diff --git a/keyboards/handwired/dactyl_manuform/6x6/keymaps/default/config.h b/keyboards/handwired/dactyl_manuform/6x6/keymaps/default/config.h deleted file mode 100644 index 4d83c191f3..0000000000 --- a/keyboards/handwired/dactyl_manuform/6x6/keymaps/default/config.h +++ /dev/null @@ -1,23 +0,0 @@ -/* -Copyright 2012 Jun Wako <[email protected]> - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#pragma once - -#define MASTER_LEFT -//#define MASTER_RIGHT - -//#define EE_HANDS diff --git a/keyboards/handwired/dactyl_minidox/config.h b/keyboards/handwired/dactyl_minidox/config.h deleted file mode 100644 index 21ef0b32c2..0000000000 --- a/keyboards/handwired/dactyl_minidox/config.h +++ /dev/null @@ -1,25 +0,0 @@ -/* -Copyright 2012 Jun Wako <[email protected]> -Copyright 2015 Jack Humbert -Copyright 2021 @dlford -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. -You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#pragma once - -/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ -#undef LOCKING_SUPPORT_ENABLE -/* Locking resynchronize hack */ -#undef LOCKING_RESYNC_ENABLE - -/* Enables This makes it easier for fast typists to use dual-function keys */ -#undef PERMISSIVE_HOLD diff --git a/keyboards/handwired/dactyl_minidox/dactyl_minidox.c b/keyboards/handwired/dactyl_minidox/dactyl_minidox.c deleted file mode 100644 index 5afb908d02..0000000000 --- a/keyboards/handwired/dactyl_minidox/dactyl_minidox.c +++ /dev/null @@ -1,66 +0,0 @@ -/* -Copyright 2021 @dlford - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ -#include "quantum.h" - -#ifdef RGB_MATRIX_ENABLE - -// LED Layout -// Columns -// 0 1 2 3 4 5 6 7 8 9 10 11 -// Physical (Center: 133) -// 20 41 61 81 102 122 143 163 183 204 224 244 -// Rows Physical (Center: 54) -// 17 12 11 06 05 23 24 29 30 35 0 21 -// 16 13 10 07 04 22 25 28 31 34 1 43 -// 15 14 09 08 03 21 26 27 32 33 2 64 -// 02 01 00 18 19 20 3 85 - -led_config_t g_led_config = { { - // Key matrix to LED index - // Left 1-18 - {17, 12, 11, 6, 5}, - {16, 13, 10, 7, 4}, - {15, 14, 9, 8, 3}, - {NO_LED, NO_LED, 2, 1, 0}, - // Right 1-18 - {23, 24, 29, 30, 35}, - {22, 25, 28, 31, 34}, - {21, 26, 27, 32, 33}, - {18, 19, 20, NO_LED, NO_LED}, -}, { - // LED index to physical position - // Left 1-18 - {122,85},{102,85},{81,85},{102,64},{102,43},{102,21}, - {81,21},{81,43},{81,64},{61,64},{61,43},{61,21}, - {41,21},{41,43},{41,64},{20,64},{20,43},{20,21}, - // Right 1-18 - {143,85},{163,85},{183,85},{163,64},{163,43},{163,21}, - {183,21},{183,43},{183,64},{204,64},{204,43},{204,21}, - {224,21},{224,43},{224,64},{244,64},{244,43},{244,21} -}, { - // LED index to flag - // Left 1-18 - 4,4,4,4,4,4, - 4,4,4,4,4,4, - 4,4,4,4,4,4, - // Right 1-18 - 4,4,4,4,4,4, - 4,4,4,4,4,4, - 4,4,4,4,4,4 -} }; - -#endif diff --git a/keyboards/handwired/dactyl_minidox/keyboard.json b/keyboards/handwired/dactyl_minidox/keyboard.json index 36f71ea525..5bd5c5c05a 100644 --- a/keyboards/handwired/dactyl_minidox/keyboard.json +++ b/keyboards/handwired/dactyl_minidox/keyboard.json @@ -10,19 +10,55 @@ }, "features": { "bootmagic": true, - "console": false, - "command": false, "extrakey": true, "mousekey": true, - "nkro": true + "nkro": true, + "rgb_matrix": true }, "ws2812": { "pin": "D3" }, "rgb_matrix": { - "center_point": [133, 54], "driver": "ws2812", - "split_count": [18, 18] + "split_count": [18, 18], + "layout": [ + {"matrix": [3, 4], "x": 102, "y": 64, "flags": 4}, + {"matrix": [3, 3], "x": 82, "y": 64, "flags": 4}, + {"matrix": [3, 2], "x": 61, "y": 64, "flags": 4}, + {"matrix": [2, 4], "x": 82, "y": 43, "flags": 4}, + {"matrix": [1, 4], "x": 82, "y": 22, "flags": 4}, + {"matrix": [0, 4], "x": 82, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 61, "y": 0, "flags": 4}, + {"matrix": [1, 3], "x": 61, "y": 22, "flags": 4}, + {"matrix": [2, 3], "x": 61, "y": 43, "flags": 4}, + {"matrix": [2, 2], "x": 41, "y": 43, "flags": 4}, + {"matrix": [1, 2], "x": 41, "y": 22, "flags": 4}, + {"matrix": [0, 2], "x": 41, "y": 0, "flags": 4}, + {"matrix": [0, 1], "x": 21, "y": 0, "flags": 4}, + {"matrix": [1, 1], "x": 21, "y": 22, "flags": 4}, + {"matrix": [2, 1], "x": 21, "y": 43, "flags": 4}, + {"matrix": [2, 0], "x": 0, "y": 43, "flags": 4}, + {"matrix": [1, 0], "x": 0, "y": 22, "flags": 4}, + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 4}, + {"matrix": [7, 0], "x": 123, "y": 64, "flags": 4}, + {"matrix": [7, 1], "x": 143, "y": 64, "flags": 4}, + {"matrix": [7, 2], "x": 163, "y": 64, "flags": 4}, + {"matrix": [6, 0], "x": 143, "y": 43, "flags": 4}, + {"matrix": [5, 0], "x": 143, "y": 22, "flags": 4}, + {"matrix": [4, 0], "x": 143, "y": 0, "flags": 4}, + {"matrix": [4, 1], "x": 163, "y": 0, "flags": 4}, + {"matrix": [5, 1], "x": 163, "y": 22, "flags": 4}, + {"matrix": [6, 1], "x": 163, "y": 43, "flags": 4}, + {"matrix": [6, 2], "x": 184, "y": 43, "flags": 4}, + {"matrix": [5, 2], "x": 184, "y": 22, "flags": 4}, + {"matrix": [4, 2], "x": 184, "y": 0, "flags": 4}, + {"matrix": [4, 3], "x": 204, "y": 0, "flags": 4}, + {"matrix": [5, 3], "x": 204, "y": 22, "flags": 4}, + {"matrix": [6, 3], "x": 204, "y": 43, "flags": 4}, + {"matrix": [6, 4], "x": 224, "y": 43, "flags": 4}, + {"matrix": [5, 4], "x": 224, "y": 22, "flags": 4}, + {"matrix": [4, 4], "x": 224, "y": 0, "flags": 4} + ] }, "matrix_pins": { "cols": ["C6", "D7", "E6", "B4", "B5"], @@ -34,9 +70,6 @@ "soft_serial_pin": "D0" }, "development_board": "promicro", - "layout_aliases": { - "LAYOUT": "LAYOUT_split_3x5_3" - }, "community_layouts": ["split_3x5_3"], "layouts": { "LAYOUT_split_3x5_3": { @@ -46,41 +79,34 @@ {"matrix": [0, 2], "x": 2, "y": 0}, {"matrix": [0, 3], "x": 3, "y": 0}, {"matrix": [0, 4], "x": 4, "y": 0}, - {"matrix": [4, 0], "x": 10, "y": 0}, {"matrix": [4, 1], "x": 11, "y": 0}, {"matrix": [4, 2], "x": 12, "y": 0}, {"matrix": [4, 3], "x": 13, "y": 0}, {"matrix": [4, 4], "x": 14, "y": 0}, - {"matrix": [1, 0], "x": 0, "y": 1}, {"matrix": [1, 1], "x": 1, "y": 1}, {"matrix": [1, 2], "x": 2, "y": 1}, {"matrix": [1, 3], "x": 3, "y": 1}, {"matrix": [1, 4], "x": 4, "y": 1}, - {"matrix": [5, 0], "x": 10, "y": 1}, {"matrix": [5, 1], "x": 11, "y": 1}, {"matrix": [5, 2], "x": 12, "y": 1}, {"matrix": [5, 3], "x": 13, "y": 1}, {"matrix": [5, 4], "x": 14, "y": 1}, - {"matrix": [2, 0], "x": 0, "y": 2}, {"matrix": [2, 1], "x": 1, "y": 2}, {"matrix": [2, 2], "x": 2, "y": 2}, {"matrix": [2, 3], "x": 3, "y": 2}, {"matrix": [2, 4], "x": 4, "y": 2}, - {"matrix": [6, 0], "x": 10, "y": 2}, {"matrix": [6, 1], "x": 11, "y": 2}, {"matrix": [6, 2], "x": 12, "y": 2}, {"matrix": [6, 3], "x": 13, "y": 2}, {"matrix": [6, 4], "x": 14, "y": 2}, - {"matrix": [3, 2], "x": 2, "y": 3}, {"matrix": [3, 3], "x": 3, "y": 3}, {"matrix": [3, 4], "x": 4, "y": 3}, - {"matrix": [7, 0], "x": 10, "y": 3}, {"matrix": [7, 1], "x": 11, "y": 3}, {"matrix": [7, 2], "x": 12, "y": 3} diff --git a/keyboards/handwired/dactyl_minidox/keymaps/default/keymap.c b/keyboards/handwired/dactyl_minidox/keymaps/default/keymap.c deleted file mode 100644 index abd6433558..0000000000 --- a/keyboards/handwired/dactyl_minidox/keymaps/default/keymap.c +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright 2022 QMK -// SPDX-License-Identifier: GPL-2.0-or-later -#include QMK_KEYBOARD_H - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* - * ┌───┬───┬───┬───┬───┐ ┌───┬───┬───┬───┬───┐ - * │ Q │ W │ E │ R │ T │ │ Y │ U │ I │ O │ P │ - * ├───┼───┼───┼───┼───┤ ├───┼───┼───┼───┼───┤ - * │ A │ S │ D │ F │ G │ │ H │ J │ K │ L │ ; │ - * ├───┼───┼───┼───┼───┤ ├───┼───┼───┼───┼───┤ - * │ Z │ X │ C │ V │ B │ │ N │ M │ , │ . │ / │ - * └───┴───┴───┴───┴───┘ └───┴───┴───┴───┴───┘ - * ┌───┐ ┌───┐ - * │GUI├───┐ ┌───┤Alt│ - * └───┤Bsp├───┐ ┌───┤Ent├───┘ - * └───┤ │ │ ├───┘ - * └───┘ └───┘ - */ - [0] = LAYOUT_split_3x5_3( - KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, - 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_SLSH, - KC_LGUI, KC_BSPC, KC_SPC, KC_SPC, KC_ENT, KC_RALT - ) -}; diff --git a/keyboards/handwired/dactyl_minidox/keymaps/default/keymap.json b/keyboards/handwired/dactyl_minidox/keymaps/default/keymap.json new file mode 100644 index 0000000000..a7cdca3654 --- /dev/null +++ b/keyboards/handwired/dactyl_minidox/keymaps/default/keymap.json @@ -0,0 +1,13 @@ +{ + "keyboard": "handwired/dactyl_minidox", + "keymap": "default", + "layout": "LAYOUT_split_3x5_3", + "layers": [ + [ + "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_SLSH", + "KC_LGUI", "KC_BSPC", "KC_SPC", "KC_SPC", "KC_ENT", "KC_RALT" + ] + ] +} diff --git a/keyboards/handwired/dactyl_minidox/keymaps/dlford/config.h b/keyboards/handwired/dactyl_minidox/keymaps/dlford/config.h deleted file mode 100644 index a37a54c8fc..0000000000 --- a/keyboards/handwired/dactyl_minidox/keymaps/dlford/config.h +++ /dev/null @@ -1,105 +0,0 @@ -/* -Copyright 2012 Jun Wako <[email protected]> -Copyright 2021 @dlford -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. -You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#pragma once - -//#define USE_MATRIX_I2C - -/* Select hand configuration */ - -// #define MASTER_LEFT -// #define MASTER_RIGHT -#define EE_HANDS // ./util/docker_build.sh crkbd:dlford:dfu-split-[left|right] (or avrdude-split[left|right]) - -#define TAPPING_TOGGLE 2 // number of taps to toggle TT -#define TAPPING_TERM_PER_KEY // milliseconds from tap to hold for mod tap per key -#define PERMISSIVE_HOLD_PER_KEY // activate mod top hold earlier if another key is pressed AND released per key -#define QUICK_TAP_TERM_PER_KEY // disable double tap hold key repeat per key -#undef MOUSEKEY_INTERVAL -#undef MOUSEKEY_DELAY -#undef MOUSEKEY_TIME_TO_MAX -#undef MOUSEKEY_MAX_SPEED -#undef MOUSEKEY_WHEEL_DELAY -#define MK_KINETIC_SPEED -#define MOUSEKEY_DELAY 100 -#define MOUSEKEY_INTERVAL 35 -#define MOUSEKEY_MOVE_DELTA 5 -#define MOUSEKEY_INITIAL_SPEED 1 -#define MOUSEKEY_DECELERATED_SPEED 10 -#define MOUSEKEY_BASE_SPEED 1200 -#define MOUSEKEY_ACCELERATED_SPEED 4800 - -#ifdef RGB_MATRIX_ENABLE -// # define RGB_MATRIX_TIMEOUT 300000 // number of milliseconds to wait until disabling effects -// # define RGB_MATRIX_SLEEP // turn off effects when suspended -# define RGB_MATRIX_LED_PROCESS_LIMIT (RGB_MATRIX_LED_COUNT + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness) -# define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) -# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash. -# define RGB_MATRIX_HUE_STEP 8 -# define RGB_MATRIX_SAT_STEP 8 -# define RGB_MATRIX_VAL_STEP 8 -# define RGB_MATRIX_SPD_STEP 10 - -// Enable animations -// # define ENABLE_RGB_MATRIX_ALPHAS_MODS // Static dual hue speed is hue for secondary hue -// # define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN // Static gradient top to bottom speed controls how much gradient changes -// # define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT // Static gradient left to right speed controls how much gradient changes -// # define ENABLE_RGB_MATRIX_BREATHING // Single hue brightness cycling animation -// # define ENABLE_RGB_MATRIX_BAND_SAT // Single hue band fading saturation scrolling left to right -// # define ENABLE_RGB_MATRIX_BAND_VAL // Single hue band fading brightness scrolling left to right -// # define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT // Single hue 3 blade spinning pinwheel fades saturation -// # define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL // Single hue 3 blade spinning pinwheel fades brightness -// # define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT // Single hue spinning spiral fades saturation -// # define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL // Single hue spinning spiral fades brightness -// # define ENABLE_RGB_MATRIX_CYCLE_ALL // Full keyboard solid hue cycling through full gradient -// # define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT // Full gradient scrolling left to right -// # define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN // Full gradient scrolling top to bottom -// # define ENABLE_RGB_MATRIX_CYCLE_OUT_IN // Full gradient scrolling out to in -// # define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL // Full dual gradients scrolling out to in -// # define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON // Full gradent Chevron shapped scrolling left to right -// # define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL // Full gradient spinning pinwheel around center of keyboard -# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL // Full gradient spinning spiral around center of keyboard -// # define ENABLE_RGB_MATRIX_DUAL_BEACON // Full gradient spinning around center of keyboard -// # define ENABLE_RGB_MATRIX_RAINBOW_BEACON // Full tighter gradient spinning around center of keyboard -// # define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS // Full dual gradients spinning two halfs of keyboard -// # define ENABLE_RGB_MATRIX_RAINDROPS // Randomly changes a single key's hue -// # define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS // Randomly changes a single key's hue and saturation -// # define ENABLE_RGB_MATRIX_HUE_BREATHING // Hue shifts up a slight ammount at the same time then shifts back -// # define ENABLE_RGB_MATRIX_HUE_PENDULUM // Hue shifts up a slight ammount in a wave to the right then back to the left -# define ENABLE_RGB_MATRIX_HUE_WAVE // Hue shifts up a slight ammount and then back down in a wave to the right -// # define RGB_MATRIX_FRAMEBUFFER_EFFECTS // Required for the following two effects -// # define ENABLE_RGB_MATRIX_TYPING_HEATMAP // How hot is your WPM! -// # define ENABLE_RGB_MATRIX_DIGITAL_RAIN // That famous computer simulation -// # define RGB_MATRIX_KEYPRESSES // reacts to keypresses, required for the remaining effects -// # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) -// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE // Pulses keys hit to hue & value then fades value out -// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE // Static single hue pulses keys hit to shifted hue then fades to current hue -// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE // Hue & value pulse near a single key hit then fades value out -// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE // Hue & value pulse near multiple key hits then fades value out -// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS // Hue & value pulse the same column and row of a single key hit then fades value out -// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS // Hue & value pulse the same column and row of multiple key hits then fades value out -// # define ENABLE_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 ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS // Hue & value pulse away on the same column and row of multiple key hits then fades value out -// # define ENABLE_RGB_MATRIX_SPLASH // Full gradient & value pulse away from a single key hit then fades value out -// # define ENABLE_RGB_MATRIX_MULTISPLASH // Full gradient & value pulse away from multiple key hits then fades value out -// # define ENABLE_RGB_MATRIX_SOLID_SPLASH // Hue & value pulse away from a single key hit then fades value out -// # define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH // Hue & value pulse away from multiple key hits then fades value out -#endif - -// Features I don't want, remove to save space -// #define NO_ACTION_ONESHOT // Used by caps word -#define NO_ACTION_FUNCTION -#define NO_ACTION_MACRO -#define NO_USB_STARTUP_CHECK diff --git a/keyboards/handwired/dactyl_minidox/keymaps/dlford/features/caps_word.c b/keyboards/handwired/dactyl_minidox/keymaps/dlford/features/caps_word.c deleted file mode 100644 index ee295c7305..0000000000 --- a/keyboards/handwired/dactyl_minidox/keymaps/dlford/features/caps_word.c +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright 2021 Google LLC -// -// 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 -// -// https://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. -// -// -// For full documentation, see -// https://getreuer.info/posts/keyboards/caps-word - -#include "caps_word.h" -bool caps_word_enabled = false; - -bool process_caps_word(uint16_t keycode, keyrecord_t* record) { - static bool shifted = false; - - if (!caps_word_enabled) { - // Pressing both shift keys at the same time enables caps word. - if (((get_mods() | get_oneshot_mods()) & MOD_MASK_SHIFT) - == MOD_MASK_SHIFT) { - clear_mods(); - clear_oneshot_mods(); - shifted = false; - caps_word_enabled = true; - return false; - } - return true; - } - - if (!record->event.pressed) { return true; } - - if (!((get_mods() | get_oneshot_mods()) & ~MOD_MASK_SHIFT)) { - switch (keycode) { - case QK_MOD_TAP ... QK_MOD_TAP_MAX: - case QK_LAYER_TAP ... QK_LAYER_TAP_MAX: - // Earlier return if this has not been considered tapped yet. - if (record->tap.count == 0) { return true; } - // Get the base tapping keycode of a mod- or layer-tap key. - keycode &= 0xff; - } - - switch (keycode) { - // Letter keys should be shifted. - case KC_A ... KC_Z: - if (!shifted) { register_code(KC_LSFT); } - shifted = true; - return true; - - // Keycodes that continue caps word but shouldn't get shifted. - case KC_1 ... KC_0: - case KC_BSPC: - case KC_MINS: - case KC_UNDS: - if (shifted) { unregister_code(KC_LSFT); } - shifted = false; - return true; - - // Any other keycode disables caps word. - } - } - - // Disable caps word. - caps_word_enabled = false; - if (shifted) { unregister_code(KC_LSFT); } - shifted = false; - return true; -} - diff --git a/keyboards/handwired/dactyl_minidox/keymaps/dlford/features/caps_word.h b/keyboards/handwired/dactyl_minidox/keymaps/dlford/features/caps_word.h deleted file mode 100644 index a609a32544..0000000000 --- a/keyboards/handwired/dactyl_minidox/keymaps/dlford/features/caps_word.h +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright 2021 Google LLC -// -// 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 -// -// https://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. -// -// -// Caps Word, activated by pressing both shift keys at the same time. -// -// This library implements "Caps Word", which is like conventional Caps Lock, -// but automatically disables itself at the end of the word. This is useful for -// typing all-caps identifiers like `MOD_MASK_ALT`. -// -// Caps Word is activated by pressing the left and right shift keys at the same -// time. This way you don't need a dedicated key for using Caps Word. I've -// tested that this works as expected with one-shot mods and Space Cadet Shift. -// If your shift keys are mod-taps, activate Caps Word by holding both shift -// mod-tap keys until the tapping term, release them, then begin typing. -// -// For full documentation, see -// https://getreuer.info/posts/keyboards/caps-word - -#pragma once - -#include QMK_KEYBOARD_H - -bool process_caps_word(uint16_t keycode, keyrecord_t* record); -extern bool caps_word_enabled; diff --git a/keyboards/handwired/dactyl_minidox/keymaps/dlford/keymap.c b/keyboards/handwired/dactyl_minidox/keymaps/dlford/keymap.c deleted file mode 100644 index bdacde1a85..0000000000 --- a/keyboards/handwired/dactyl_minidox/keymaps/dlford/keymap.c +++ /dev/null @@ -1,386 +0,0 @@ -/* -Copyright 2019 @foostan -Copyright 2020 Drashna Jaelre <@drashna> -Copyright 2021 @dlford - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#include QMK_KEYBOARD_H -#include "features/caps_word.h" - -// Layers -enum layers { - _QWERTY = 0, - _COLEMAK, - _NAVIGATION, - _SPECIAL, - _MOUSE, -}; - -static uint16_t default_animation = RGB_MATRIX_CYCLE_SPIRAL; -static int default_speed = 50; -static uint16_t secondary_animation = RGB_MATRIX_HUE_WAVE; -static int secondary_speed = 150; -static bool is_macro_recording = false; - -// Init -void keyboard_post_init_user(void) { - rgb_matrix_sethsv_noeeprom(HSV_PURPLE); - rgb_matrix_mode_noeeprom(default_animation); - rgb_matrix_set_speed_noeeprom(default_speed); -} - -// Permissive hold per key -bool get_permissive_hold(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case LT(3, KC_SPC): - return true; // Enable permissive hold - case LT(2, KC_TAB): - return true; - default: - return false; // Disable permissive hold - } -} - -// Tapping force hold per key -uint16_t get_quick_tap_term(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case LT(3, KC_SPC): - return 0; // Enable force hold - case LT(2, KC_TAB): - return 0; - default: - return QUICK_TAP_TERM; // Disable force hold - } -} - -// Tapping term per key -uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case C_S_T(KC_E): - case C_S_T(KC_I): - return 215; - default: - return 190; - } -} - -// RGB timeout -#define RGB_CUSTOM_TIMEOUT 5 // in minutes -static uint16_t idle_timer = 0; -static uint8_t halfmin_counter = 0; -static bool led_on = true; -void matrix_scan_user(void) { - if (is_keyboard_master()) { - // idle_timer needs to be set one time - if (idle_timer == 0) idle_timer = timer_read(); - - if (led_on && timer_elapsed(idle_timer) > 30000) { - halfmin_counter++; - idle_timer = timer_read(); - } - - if (led_on && halfmin_counter >= RGB_CUSTOM_TIMEOUT * 2) { - rgb_matrix_disable_noeeprom(); - led_on = false; - halfmin_counter = 0; - } - } -} - -// Macros -enum macro_events { - M_KEYMAP = SAFE_RANGE, - M_COMM, - M_DOT, -}; - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - // RGB resume - if (is_keyboard_master()) { - if (record->event.pressed) { - if (led_on == false) { - rgb_matrix_enable_noeeprom(); - led_on = true; - } - idle_timer = timer_read(); - halfmin_counter = 0; - } - } - - // Caps word - if (!process_caps_word(keycode, record)) { return false; } - - // Macros - const uint8_t mods = get_mods(); - static uint8_t backstepCounter = 0; - static bool keyDown = false; - switch (keycode) { - case M_KEYMAP: - if (record->event.pressed) { - SEND_STRING("https://raw.githubusercontent.com/dlford/qmk_firmware/master/keyboards/crkbd/keymaps/dlford/legends.svg"); - } - return false; - case M_COMM: - if (record->event.pressed) { - if ((mods & MOD_BIT(KC_LCTL)) && (mods & MOD_BIT(KC_LSFT) && (mods & MOD_BIT(KC_LALT)))) { - backstepCounter = 1; - clear_mods(); - SEND_STRING("<>"); - } else if ((mods & MOD_BIT(KC_LCTL)) && (mods & MOD_BIT(KC_LALT))) { - backstepCounter = 1; - clear_mods(); - SEND_STRING("()"); - } else if ((mods & MOD_BIT(KC_LCTL)) && (mods & MOD_BIT(KC_LSFT))) { - backstepCounter = 2; - clear_mods(); - SEND_STRING("{};"); - } else if (mods & MOD_BIT(KC_LCTL)) { - backstepCounter = 1; - clear_mods(); - SEND_STRING("{}"); - } else if ((mods & MOD_BIT(KC_LALT)) && (mods & MOD_BIT(KC_LSFT))) { - backstepCounter = 2; - clear_mods(); - SEND_STRING("[];"); - } else if (mods & MOD_BIT(KC_LALT)) { - backstepCounter = 1; - clear_mods(); - SEND_STRING("[]"); - } else { - keyDown = true; - register_code(KC_COMM); - return true; - } - if (backstepCounter) { - while (backstepCounter > 0) { - tap_code(KC_LEFT); - backstepCounter--; - } - set_mods(mods); - } - } else { - if (keyDown) { - unregister_code(KC_COMM); - keyDown = false; - return true; - } - } - return false; - case M_DOT: - if (record->event.pressed) { - if (mods & MOD_BIT(KC_LCTL)) { - clear_mods(); - SEND_STRING("=>"); - } else if (mods & MOD_BIT(KC_LALT)) { - clear_mods(); - SEND_STRING("->"); - } else { - keyDown = true; - register_code(KC_DOT); - return true; - } - } else { - if (keyDown) { - unregister_code(KC_DOT); - keyDown = false; - return true; - } - } - set_mods(mods); - return false; - } - - return true; -} - -// RGB Layers (Enable animations in config.h) -layer_state_t layer_state_set_user(layer_state_t state) { - switch (get_highest_layer(state)) { - case _SPECIAL: - rgb_matrix_sethsv_noeeprom(HSV_ORANGE); - rgb_matrix_set_speed_noeeprom(secondary_speed); - rgb_matrix_mode_noeeprom(secondary_animation); - break; - case _NAVIGATION: - rgb_matrix_sethsv_noeeprom(HSV_BLUE); - rgb_matrix_set_speed_noeeprom(secondary_speed); - rgb_matrix_mode_noeeprom(secondary_animation); - break; - case _MOUSE: - rgb_matrix_sethsv_noeeprom(HSV_GREEN); - rgb_matrix_set_speed_noeeprom(secondary_speed); - rgb_matrix_mode_noeeprom(secondary_animation); - break; - default: - rgb_matrix_sethsv_noeeprom(HSV_PURPLE); - rgb_matrix_set_speed_noeeprom(default_speed); - rgb_matrix_mode_noeeprom(default_animation); - break; - } - return state; -} - -// Dynamic Macro Recording Backlight -void dynamic_macro_record_start_user(int8_t direction) { - is_macro_recording = true; -} - -void dynamic_macro_record_end_user(int8_t direction) { - is_macro_recording = false; -} - -// Indicators -bool rgb_matrix_indicators_user(void) { - if (host_keyboard_led_state().caps_lock || caps_word_enabled) { - // Left master - rgb_matrix_set_color(3, RGB_RED); - // Right master - rgb_matrix_set_color(21, RGB_RED); - } - if (is_macro_recording) { - // Left master - rgb_matrix_set_color(4, RGB_ORANGE); - // Right master - rgb_matrix_set_color(22, RGB_ORANGE); - } - if (default_layer_state - 1 == _COLEMAK) { - // Left master - rgb_matrix_set_color(5, RGB_GREEN); - // Right master - rgb_matrix_set_color(23, RGB_GREEN); - } - return false; -} - -// Quantum keys / Abbreviations -enum custom_keycodes { - VVV = KC_TRNS, - XXX = KC_NO, - CSA_Q = MEH_T(KC_Q), - CSA_F1 = MEH_T(KC_F1), - CSA_1 = MEH_T(KC_1), - CA_W = LCA_T(KC_W), - CA_F2 = LCA_T(KC_F2), - CA_2 = LCA_T(KC_2), - CS_E = C_S_T(KC_E), - CS_F = C_S_T(KC_F), - CS_I = C_S_T(KC_I), - CS_U = C_S_T(KC_U), - CS_F3 = C_S_T(KC_F3), - CS_3 = C_S_T(KC_3), - CS_F8 = C_S_T(KC_F8), - CS_8 = C_S_T(KC_8), - CA_O = LCA_T(KC_O), - CA_Y = LCA_T(KC_Y), - CA_F9 = LCA_T(KC_F9), - CA_9 = LCA_T(KC_9), - CSA_P = MEH_T(KC_P), - CSA_SCLN = MEH_T(KC_SCLN), - CSA_F10 = MEH_T(KC_F10), - CSA_0 = MEH_T(KC_0), - LGUI_A = LGUI_T(KC_A), - LGUI_FIND = LGUI_T(KC_FIND), - LGUI_GRV = LGUI_T(KC_GRV), - LALT_S = LALT_T(KC_S), - LALT_R = LALT_T(KC_R), - LALT_HOME = LALT_T(KC_HOME), - LCTL_D = LCTL_T(KC_D), - LCTL_S = LCTL_T(KC_S), - LCTL_PGUP = LCTL_T(KC_PGUP), - LCTL_LBRC = LCTL_T(KC_LBRC), - LSFT_F = LSFT_T(KC_F), - _LSFT_T = LSFT_T(KC_T), - LSFT_PGDN = LSFT_T(KC_PGDN), - LSFT_RBRC = LSFT_T(KC_RBRC), - RSFT_J = RSFT_T(KC_J), - RSFT_N = RSFT_T(KC_N), - RSFT_DOWN = RSFT_T(KC_DOWN), - RSFT_MINS = RSFT_T(KC_MINS), - RCTL_K = RCTL_T(KC_K), - RCTL_E = RCTL_T(KC_E), - RCTL_UP = RCTL_T(KC_UP), - RCTL_EQL = RCTL_T(KC_EQL), - RALT_L = RALT_T(KC_L), - RALT_I = RALT_T(KC_I), - RALT_RGHT = RALT_T(KC_RGHT), - RALT_BSLS = RALT_T(KC_BSLS), - RGUI_SCLN = RGUI_T(KC_SCLN), - RGUI_O = RGUI_T(KC_O), - RGUI_F11 = RGUI_T(KC_F11), - RGUI_QUOT = RGUI_T(KC_QUOT), - LT3_SPC = LT(3,KC_SPC), - LT2_TAB = LT(2,KC_TAB), - DF_QWERTY = DF(0), - DF_COLEMAK = DF(1), -}; - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_QWERTY] = LAYOUT_split_3x5_3( - //|--------------------------------------------| |--------------------------------------------| - CSA_Q, CA_W, CS_E, KC_R, KC_T, KC_Y, KC_U, CS_I, CA_O, CSA_P, - //|--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------| - LGUI_A, LALT_S, LCTL_D, LSFT_F, KC_G, KC_H, RSFT_J, RCTL_K, RALT_L, RGUI_SCLN, - //|--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------| - KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, M_COMM, M_DOT, KC_SLSH, - //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - KC_ESC, LT3_SPC, KC_BSPC, KC_DEL, LT2_TAB, KC_ENT - // |--------+--------+--------| |--------+--------+--------| - ), - [_COLEMAK] = LAYOUT_split_3x5_3( - //|--------------------------------------------| |--------------------------------------------| - CSA_Q, CA_W, CS_F, KC_P, KC_G, KC_J, KC_L, CS_U, CA_Y, CSA_SCLN, - //|--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------| - LGUI_A, LALT_R, LCTL_S, _LSFT_T, KC_D, KC_H, RSFT_N, RCTL_E, RALT_I, RGUI_O, - //|--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------| - KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, M_COMM, M_DOT, KC_SLSH, - //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - KC_ESC, LT3_SPC, KC_BSPC, KC_DEL, LT2_TAB, KC_ENT - // |--------+--------+--------| |--------+--------+--------| - ), - [_NAVIGATION] = LAYOUT_split_3x5_3( - //|--------------------------------------------| |--------------------------------------------| - CSA_F1, CA_F2, CS_F3, KC_F4, KC_F5, KC_F6, KC_F7, CS_F8, CA_F9, CSA_F10, - //|--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------| - LGUI_FIND,LALT_HOME,LCTL_PGUP,LSFT_PGDN,KC_END, KC_LEFT,RSFT_DOWN,RCTL_UP,RALT_RGHT,RGUI_F11, - //|--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------| - DF_QWERTY,DF_COLEMAK,KC_VOLD, KC_VOLU, QK_BOOT, KC_MUTE, KC_MPLY, KC_MPRV, KC_MNXT, KC_F12, - //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - VVV, TG(4), VVV, VVV, VVV, VVV - // |--------+--------+--------| |--------+--------+--------| - ), - [_SPECIAL] = LAYOUT_split_3x5_3( - //|--------------------------------------------| |--------------------------------------------| - CSA_1, CA_2, CS_3, KC_4, KC_5, KC_6, KC_7, CS_8, CA_9, CSA_0, - //|--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------| - LGUI_GRV,KC_LALT,LCTL_LBRC,LSFT_RBRC,KC_LPRN, KC_RPRN,RSFT_MINS,RCTL_EQL,RALT_BSLS,RGUI_QUOT, - //|--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------| - KC_TILD, KC_CAPS, KC_LCBR, KC_RCBR,TG(_MOUSE), EE_CLR, KC_UNDS, KC_PLUS, KC_PIPE, KC_DQUO, - //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - VVV, VVV, VVV, VVV, TG(4), VVV - // |--------+--------+--------| |--------+--------+--------| - ), - [_MOUSE] = LAYOUT_split_3x5_3( - //|--------------------------------------------| |--------------------------------------------| - KC_WH_U, KC_WH_L, KC_MS_U, KC_WH_R, DM_REC1, KC_WSTP, KC_ACL2, KC_ACL1, KC_ACL0, KC_WFWD, - //|--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------| - KC_WH_D, KC_MS_L, KC_MS_D, KC_MS_R, DM_PLY1, KC_WREF, KC_BTN1, KC_BTN2, KC_BTN3, KC_WBAK, - //|--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------| - M_KEYMAP,KC_BTN3, KC_BTN2, KC_BTN1, XXX, XXX, XXX, XXX, XXX, XXX, - //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - VVV, TG(4), VVV, VVV, TG(4), VVV - // |--------+--------+--------| |--------+--------+--------| - ), -}; diff --git a/keyboards/handwired/dactyl_minidox/keymaps/dlford/rules.mk b/keyboards/handwired/dactyl_minidox/keymaps/dlford/rules.mk deleted file mode 100644 index 78e059df96..0000000000 --- a/keyboards/handwired/dactyl_minidox/keymaps/dlford/rules.mk +++ /dev/null @@ -1,18 +0,0 @@ -# Includes -SRC += features/caps_word.c - -# Build Options -# change yes to no to disable -# -# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -DYNAMIC_MACRO_ENABLE = yes # Create macros on the fly -INDICATOR_LIGHTS = yes # Enable indicator lights for caps lock, etc. -# TAP_DANCE_ENABLE = yes # Send different keycodes if tapped multiple times -# KEY_OVERRIDE_ENABLE = yes # Override key combos -# COMBO_ENABLE = yes # Custom key combos - -RGB_MATRIX_ENABLE = yes - -LTO_ENABLE = yes -RGBLIGHT_SUPPORTED = yes -RGB_MATRIX_SUPPORTED = yes diff --git a/keyboards/handwired/dactyl_minidox/keymaps/via/config.h b/keyboards/handwired/dactyl_minidox/keymaps/via/config.h index bb5b0bf6af..b2ea2ca256 100644 --- a/keyboards/handwired/dactyl_minidox/keymaps/via/config.h +++ b/keyboards/handwired/dactyl_minidox/keymaps/via/config.h @@ -1,23 +1,5 @@ -/* -Copyright 2012 Jun Wako <[email protected]> -Copyright 2015 Jack Humbert -Copyright 2021 @dlford -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. -You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - +// Copyright 2024 @dlford +// SPDX-License-Identifier: GPL-2.0-or-later #pragma once -/* Select hand configuration */ -// #define MASTER_LEFT -// #define MASTER_RIGHT - #define EE_HANDS diff --git a/keyboards/handwired/dactyl_minidox/keymaps/via/keymap.c b/keyboards/handwired/dactyl_minidox/keymaps/via/keymap.c deleted file mode 100644 index 80b9b62b53..0000000000 --- a/keyboards/handwired/dactyl_minidox/keymaps/via/keymap.c +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright 2022 QMK -// SPDX-License-Identifier: GPL-2.0-or-later -#include QMK_KEYBOARD_H - -enum layers{ - _BASE, - _RAISE, - _LOWER, - _BLANK -}; - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_BASE] = LAYOUT_split_3x5_3( - 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_SLSH, - KC_LGUI, KC_BSPC, KC_SPC, KC_SPC, KC_ENT, KC_RALT - ), - [_RAISE] = LAYOUT_split_3x5_3( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______ - ), - [_LOWER] = LAYOUT_split_3x5_3( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______ - ), - [_BLANK] = LAYOUT_split_3x5_3( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______ - ) -}; diff --git a/keyboards/handwired/dactyl_minidox/keymaps/via/keymap.json b/keyboards/handwired/dactyl_minidox/keymaps/via/keymap.json new file mode 100644 index 0000000000..332048c3e3 --- /dev/null +++ b/keyboards/handwired/dactyl_minidox/keymaps/via/keymap.json @@ -0,0 +1,18 @@ +{ + "keyboard": "handwired/dactyl_minidox", + "keymap": "via", + "layout": "LAYOUT_split_3x5_3", + "config": { + "features": { + "via": true + } + }, + "layers": [ + [ + "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_SLSH", + "KC_LGUI", "KC_BSPC", "KC_SPC", "KC_SPC", "KC_ENT", "KC_RALT" + ] + ] +} diff --git a/keyboards/handwired/dactyl_minidox/readme.md b/keyboards/handwired/dactyl_minidox/readme.md index 5826403a80..e3941ad295 100644 --- a/keyboards/handwired/dactyl_minidox/readme.md +++ b/keyboards/handwired/dactyl_minidox/readme.md @@ -1,6 +1,6 @@ # Dactyl Minidox -![DactylMinidox](https://i.imgur.com/PqjgeRfh.jpg) +![DactylMinidox](https://i.imgur.com/PqjgeRf.jpeg) A 36 key (3x5+3), split bodied keyboard derived from the [Dactyl ManuForm](/keyboards/handwired/dactyl_manuform/). diff --git a/keyboards/handwired/dmote/keyboard.json b/keyboards/handwired/dmote/keyboard.json index fc52fee11e..e6514b17ba 100644 --- a/keyboards/handwired/dmote/keyboard.json +++ b/keyboards/handwired/dmote/keyboard.json @@ -36,7 +36,9 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D0" + "serial": { + "pin": "D0" + } }, "layouts": { "LAYOUT": { diff --git a/keyboards/handwired/elrgo_s/keyboard.json b/keyboards/handwired/elrgo_s/keyboard.json index 0da809d2ac..c0ae4beadb 100644 --- a/keyboards/handwired/elrgo_s/keyboard.json +++ b/keyboards/handwired/elrgo_s/keyboard.json @@ -23,7 +23,9 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D0" + "serial": { + "pin": "D0" + } }, "processor": "atmega32u4", "bootloader": "caterina", diff --git a/keyboards/handwired/elrgo_s/keymaps/default/config.h b/keyboards/handwired/elrgo_s/keymaps/default/config.h deleted file mode 100644 index b5f8c85421..0000000000 --- a/keyboards/handwired/elrgo_s/keymaps/default/config.h +++ /dev/null @@ -1,20 +0,0 @@ -/* Copyright 2021 Yaroslav Smirnov <[email protected]> - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -#pragma once - -#define MASTER_LEFT -// #define MASTER_RIGHT diff --git a/keyboards/handwired/evk/v1_3/v1_3.c b/keyboards/handwired/evk/v1_3/v1_3.c index a568ba3f86..575bf33759 100644 --- a/keyboards/handwired/evk/v1_3/v1_3.c +++ b/keyboards/handwired/evk/v1_3/v1_3.c @@ -33,12 +33,3 @@ __attribute__((weak)) layer_state_t layer_state_set_user(layer_state_t state) { gpio_write_pin(D5, layer_state_cmp(state, 1)); return state; } - -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if (res) { - // gpio_write_pin sets the pin high for 1 and low for 0. - gpio_write_pin(D4, led_state.caps_lock); - } - return res; -} diff --git a/keyboards/handwired/freoduo/keyboard.json b/keyboards/handwired/freoduo/keyboard.json index 0d23776f4a..d9f4ad4808 100644 --- a/keyboards/handwired/freoduo/keyboard.json +++ b/keyboards/handwired/freoduo/keyboard.json @@ -25,7 +25,9 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D0" + "serial": { + "pin": "D0" + } }, "rgblight": { "hue_steps": 16, diff --git a/keyboards/handwired/jankrp2040dactyl/keyboard.json b/keyboards/handwired/jankrp2040dactyl/keyboard.json index c4543b5d12..0d155a70bd 100644 --- a/keyboards/handwired/jankrp2040dactyl/keyboard.json +++ b/keyboards/handwired/jankrp2040dactyl/keyboard.json @@ -6,7 +6,10 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "GP0" + "soft_serial_pin": "GP0", + "serial": { + "driver": "vendor" + } }, "features": { diff --git a/keyboards/handwired/jankrp2040dactyl/rules.mk b/keyboards/handwired/jankrp2040dactyl/rules.mk deleted file mode 100644 index 743228e94b..0000000000 --- a/keyboards/handwired/jankrp2040dactyl/rules.mk +++ /dev/null @@ -1 +0,0 @@ -SERIAL_DRIVER = vendor
\ No newline at end of file diff --git a/keyboards/handwired/jotlily60/keyboard.json b/keyboards/handwired/jotlily60/keyboard.json index 65faa354a5..7a8a2a50d9 100644 --- a/keyboards/handwired/jotlily60/keyboard.json +++ b/keyboards/handwired/jotlily60/keyboard.json @@ -24,7 +24,9 @@ }, "split": { "enabled": true, - "soft_serial_pin": "D3" + "serial": { + "pin": "D3" + } }, "layouts": { "LAYOUT": { diff --git a/keyboards/handwired/jtallbean/split_65/config.h b/keyboards/handwired/jtallbean/split_65/config.h deleted file mode 100644 index 2ae835db9d..0000000000 --- a/keyboards/handwired/jtallbean/split_65/config.h +++ /dev/null @@ -1,36 +0,0 @@ -/* -Copyright 2020 jtallbean - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#pragma once - -#define SPLIT_HAND_PIN D5 - -/* - * 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 diff --git a/keyboards/handwired/jtallbean/split_65/keyboard.json b/keyboards/handwired/jtallbean/split_65/keyboard.json index c8be82da8d..b10e6c6cc0 100644 --- a/keyboards/handwired/jtallbean/split_65/keyboard.json +++ b/keyboards/handwired/jtallbean/split_65/keyboard.json @@ -27,14 +27,22 @@ "rows": ["F4", "F1", "F0", "C7", "B6"] }, "diode_direction": "COL2ROW", + "indicators": { + "caps_lock": "B0" + }, "split": { "enabled": true, - "soft_serial_pin": "D0", + "handedness": { + "pin": "D5" + }, "matrix_pins": { "right": { "cols": ["B4", "B5", "B6", "C6", "C7", "D4", "D6", "D3", "D2"], "rows": ["E6", "F0", "F1", "F7", "D7"] } + }, + "serial": { + "pin": "D0" } }, "processor": "atmega32u4", diff --git a/keyboards/handwired/jtallbean/split_65/split_65.c b/keyboards/handwired/jtallbean/split_65/split_65.c deleted file mode 100644 index b75b12137f..0000000000 --- a/keyboards/handwired/jtallbean/split_65/split_65.c +++ /dev/null @@ -1,43 +0,0 @@ -/* Copyright 2020 jtallbean - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -#include "quantum.h" - -// Optional override functions below. -// You can leave any or all of these undefined. -// These are only required if you want to perform custom actions. - -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - - // Set our LED pins as output - gpio_set_pin_output(B0); - gpio_write_pin_low(B0); - - matrix_init_user(); -} - -bool led_update_kb(led_t led_state) { - // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here - - bool res = led_update_user(led_state); - if(res) { - // gpio_write_pin sets the pin high for 1 and low for 0. - gpio_write_pin(B0, led_state.caps_lock); - } - return res; -} diff --git a/keyboards/handwired/ks63/config.h b/keyboards/handwired/ks63/config.h index 9b05e85d64..e35e4a7e5e 100644 --- a/keyboards/handwired/ks63/config.h +++ b/keyboards/handwired/ks63/config.h @@ -44,5 +44,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //#define NO_ACTION_TAPPING //#define NO_ACTION_ONESHOT -#define MASTER_LEFT diff --git a/keyboards/handwired/ks63/keyboard.json b/keyboards/handwired/ks63/keyboard.json index 6040074f07..09e59975e8 100644 --- a/keyboards/handwired/ks63/keyboard.json +++ b/keyboards/handwired/ks63/keyboard.json @@ -29,7 +29,9 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D0" + "serial": { + "pin": "D0" + } }, "processor": "atmega32u4", "bootloader": "caterina", diff --git a/keyboards/handwired/myskeeb/keyboard.json b/keyboards/handwired/myskeeb/keyboard.json index f2da286f19..c75f40cf46 100644 --- a/keyboards/handwired/myskeeb/keyboard.json +++ b/keyboards/handwired/myskeeb/keyboard.json @@ -16,11 +16,13 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D3", "matrix_pins": { "right": { "cols": ["F5", "B3", "F7", "B1", "F6", "B2", "B6"] } + }, + "serial": { + "pin": "D3" } }, "processor": "atmega32u4", diff --git a/keyboards/handwired/not_so_minidox/config.h b/keyboards/handwired/not_so_minidox/config.h deleted file mode 100644 index 7b7d4c06ae..0000000000 --- a/keyboards/handwired/not_so_minidox/config.h +++ /dev/null @@ -1,34 +0,0 @@ -/* -Copyright 2012 Jun Wako <[email protected]> - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#pragma once - -//#define EE_HANDS - -#define MASTER_LEFT -//#define MASTER_RIGHT - -/* 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 diff --git a/keyboards/handwired/not_so_minidox/keyboard.json b/keyboards/handwired/not_so_minidox/keyboard.json index c3cc598840..fa68a823af 100644 --- a/keyboards/handwired/not_so_minidox/keyboard.json +++ b/keyboards/handwired/not_so_minidox/keyboard.json @@ -29,7 +29,9 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D0" + "serial": { + "pin": "D0" + } }, "processor": "atmega32u4", "bootloader": "caterina", diff --git a/keyboards/handwired/p65rgb/p65rgb.c b/keyboards/handwired/p65rgb/p65rgb.c deleted file mode 100644 index 3d7185f9d1..0000000000 --- a/keyboards/handwired/p65rgb/p65rgb.c +++ /dev/null @@ -1,31 +0,0 @@ -/* Copyright 2019 marhalloweenvt - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -#include "quantum.h" - -#ifdef RGB_MATRIX_ENABLE -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 diff --git a/keyboards/handwired/prime_exl_plus/keyboard.json b/keyboards/handwired/prime_exl_plus/keyboard.json index 43825a0ad8..a234bceb02 100644 --- a/keyboards/handwired/prime_exl_plus/keyboard.json +++ b/keyboards/handwired/prime_exl_plus/keyboard.json @@ -8,6 +8,10 @@ "pid": "0x6579", "device_version": "0.0.1" }, + "indicators": { + "caps_lock": "B0", + "num_lock": "B1" + }, "rgblight": { "led_count": 10, "animations": { diff --git a/keyboards/handwired/prime_exl_plus/prime_exl_plus.c b/keyboards/handwired/prime_exl_plus/prime_exl_plus.c index 1865b6c502..164c954b8b 100644 --- a/keyboards/handwired/prime_exl_plus/prime_exl_plus.c +++ b/keyboards/handwired/prime_exl_plus/prime_exl_plus.c @@ -16,32 +16,17 @@ #include "quantum.h" void matrix_init_kb(void) { - // set CapsLock LED to output and low - gpio_set_pin_output(B0); - gpio_write_pin_low(B0); - // set NumLock LED to output and low - gpio_set_pin_output(B1); - gpio_write_pin_low(B1); - // set ScrollLock LED to output and low gpio_set_pin_output(B2); gpio_write_pin_low(B2); -} -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if(res) { - gpio_write_pin(B1, led_state.num_lock); - gpio_write_pin(B0, led_state.caps_lock); - //gpio_write_pin(B2, led_state.scroll_lock); - } - return res; + matrix_init_user(); } //function for layer indicator LED layer_state_t layer_state_set_kb(layer_state_t state) { if (get_highest_layer(state) == 1) { - gpio_write_pin_high(B2); + gpio_write_pin_high(B2); } else { gpio_write_pin_low(B2); } diff --git a/keyboards/handwired/promethium/promethium.c b/keyboards/handwired/promethium/promethium.c index e9df7dfe87..63139ac09d 100644 --- a/keyboards/handwired/promethium/promethium.c +++ b/keyboards/handwired/promethium/promethium.c @@ -17,7 +17,7 @@ __attribute__ ((weak)) void battery_poll(uint8_t level) { } -void matrix_scan_kb(void) { +void housekeeping_task_kb(void) { static uint16_t counter = BATTERY_POLL; counter++; @@ -25,6 +25,4 @@ void matrix_scan_kb(void) { counter = 0; battery_poll(battery_level()); } - - matrix_scan_user(); } diff --git a/keyboards/handwired/pytest/has_template/keymaps/default/keymap.c b/keyboards/handwired/pytest/has_template/keymaps/default/keymap.c deleted file mode 100644 index a5782f7a13..0000000000 --- a/keyboards/handwired/pytest/has_template/keymaps/default/keymap.c +++ /dev/null @@ -1,5 +0,0 @@ -#include QMK_KEYBOARD_H - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - LAYOUT_ortho_1x1(KC_A) -}; diff --git a/keyboards/handwired/pytest/has_template/keymaps/default_json/keymap.json b/keyboards/handwired/pytest/has_template/keymaps/default_json/keymap.json deleted file mode 100644 index cbdce6db32..0000000000 --- a/keyboards/handwired/pytest/has_template/keymaps/default_json/keymap.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "keyboard": "handwired/pytest/has_template", - "keymap": "default_json", - "layout": "LAYOUT_ortho_1x1", - "layers": [["KC_A"]], - "author": "qmk", - "notes": "This file is a keymap.json file for handwired/pytest/has_template", - "version": 1 -} diff --git a/keyboards/handwired/pytest/has_template/keymaps/nocpp/keymap.c b/keyboards/handwired/pytest/has_template/keymaps/nocpp/keymap.c deleted file mode 100644 index 65cd4cebea..0000000000 --- a/keyboards/handwired/pytest/has_template/keymaps/nocpp/keymap.c +++ /dev/null @@ -1,23 +0,0 @@ -#include QMK_KEYBOARD_H -#include "audio.h" - -/* THIS FILE WAS GENERATED AND IS EXPERIMENTAL! - * - * This file was generated by qmk-compile-json. You may or may not want to - * edit it directly. - */ - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT(KC_ENTER) -}; - -bool encoder_update_user(uint8_t index, bool clockwise) { - if (index == 0) { - if (clockwise) { - tap_code(KC_UP); - } else { - tap_code(KC_DOWN); - } - } - return true; -}; diff --git a/keyboards/handwired/pytest/has_template/rules.mk b/keyboards/handwired/pytest/has_template/rules.mk deleted file mode 100644 index e69de29bb2..0000000000 --- a/keyboards/handwired/pytest/has_template/rules.mk +++ /dev/null diff --git a/keyboards/handwired/pytest/has_template/templates/keymap.c b/keyboards/handwired/pytest/has_template/templates/keymap.c deleted file mode 100644 index 6cb25d5226..0000000000 --- a/keyboards/handwired/pytest/has_template/templates/keymap.c +++ /dev/null @@ -1,2 +0,0 @@ -#include QMK_KEYBOARD_H -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {__KEYMAP_GOES_HERE__}; diff --git a/keyboards/handwired/pytest/has_template/templates/keymap.json b/keyboards/handwired/pytest/has_template/templates/keymap.json deleted file mode 100644 index 04928564e9..0000000000 --- a/keyboards/handwired/pytest/has_template/templates/keymap.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "documentation": "This file is a keymap.json file for handwired/pytest/has_template" -} diff --git a/keyboards/handwired/qc60/keymaps/default/config.h b/keyboards/handwired/qc60/keymaps/default/config.h index 6202f57ec5..eaf0f1b249 100644 --- a/keyboards/handwired/qc60/keymaps/default/config.h +++ b/keyboards/handwired/qc60/keymaps/default/config.h @@ -2,4 +2,3 @@ #define USE_I2C -#define MASTER_LEFT diff --git a/keyboards/handwired/qc60/proto/keyboard.json b/keyboards/handwired/qc60/proto/keyboard.json index 0015ac5f66..810df8b7ae 100644 --- a/keyboards/handwired/qc60/proto/keyboard.json +++ b/keyboards/handwired/qc60/proto/keyboard.json @@ -30,7 +30,9 @@ "diode_direction": "ROW2COL", "split": { "enabled": true, - "soft_serial_pin": "D0" + "serial": { + "pin": "D0" + } }, "processor": "atmega32u4", "bootloader": "caterina", diff --git a/keyboards/handwired/retro_refit/keyboard.json b/keyboards/handwired/retro_refit/keyboard.json index 1e7812d578..7acdb48b44 100644 --- a/keyboards/handwired/retro_refit/keyboard.json +++ b/keyboards/handwired/retro_refit/keyboard.json @@ -23,6 +23,12 @@ "resync": true } }, + "indicators": { + "caps_lock": "D0", + "num_lock": "D1", + "scroll_lock": "C6", + "on_state": 0 + }, "matrix_pins": { "cols": ["B0", "B1", "B2", "B3", "D2", "D3", "C7", "D5"], "rows": ["D4", "D7", "B4", "B5", "B6", "F7", "F6", "F5", "F4", "F1", "F0"] diff --git a/keyboards/handwired/retro_refit/retro_refit.c b/keyboards/handwired/retro_refit/retro_refit.c index b62d94d741..08e8e1d528 100644 --- a/keyboards/handwired/retro_refit/retro_refit.c +++ b/keyboards/handwired/retro_refit/retro_refit.c @@ -1,5 +1,4 @@ #include "quantum.h" -#include "led.h" void matrix_init_kb(void) { // put your keyboard start-up code here @@ -11,14 +10,3 @@ void matrix_init_kb(void) { matrix_init_user(); }; - -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if(res) { - gpio_write_pin(D0, !led_state.caps_lock); - gpio_write_pin(D1, !led_state.num_lock); - gpio_write_pin(C6, !led_state.scroll_lock); - - } - return res; -}
\ No newline at end of file diff --git a/keyboards/handwired/riblee_split/config.h b/keyboards/handwired/riblee_split/config.h index c3b0720ba5..f0fa2b1f2f 100644 --- a/keyboards/handwired/riblee_split/config.h +++ b/keyboards/handwired/riblee_split/config.h @@ -3,9 +3,6 @@ #pragma once -// If the pin is high, then the controller assumes it is the left hand, and if it’s low, it’s assumed to be the right side. -#define SPLIT_HAND_PIN C15 - #define SERIAL_USART_FULL_DUPLEX #define SERIAL_USART_TX_PIN B6 #define SERIAL_USART_RX_PIN B7 diff --git a/keyboards/handwired/riblee_split/keyboard.json b/keyboards/handwired/riblee_split/keyboard.json index 49b5ca3a54..f24dbe2ce6 100644 --- a/keyboards/handwired/riblee_split/keyboard.json +++ b/keyboards/handwired/riblee_split/keyboard.json @@ -25,6 +25,12 @@ }, "split": { "enabled": true, + "handedness": { + "pin": "C15" + }, + "serial": { + "driver": "usart" + }, "transport": { "sync_matrix_state": true } diff --git a/keyboards/handwired/riblee_split/rules.mk b/keyboards/handwired/riblee_split/rules.mk deleted file mode 100644 index c6e2988321..0000000000 --- a/keyboards/handwired/riblee_split/rules.mk +++ /dev/null @@ -1 +0,0 @@ -SERIAL_DRIVER = usart diff --git a/keyboards/handwired/selene/keyboard.json b/keyboards/handwired/selene/keyboard.json index 592b51aaf4..34eec11664 100644 --- a/keyboards/handwired/selene/keyboard.json +++ b/keyboards/handwired/selene/keyboard.json @@ -8,6 +8,11 @@ "pid": "0x0001", "device_version": "0.0.1" }, + "indicators": { + "caps_lock": "A2", + "num_lock": "A0", + "scroll_lock": "A1" + }, "rgblight": { "led_count": 50 }, diff --git a/keyboards/handwired/selene/selene.c b/keyboards/handwired/selene/selene.c index b0924c06f4..49df43314b 100644 --- a/keyboards/handwired/selene/selene.c +++ b/keyboards/handwired/selene/selene.c @@ -15,24 +15,10 @@ */ -#include "selene.h" +#include "quantum.h" -void matrix_init_kb(void){ - gpio_set_pin_output(NUM_LOCK_PIN); - gpio_set_pin_output(CAPS_LOCK_PIN); - gpio_set_pin_output(SCROLL_LOCK_PIN); -} - -void keyboard_post_init_user(void) { +void keyboard_post_init_kb(void) { rgblight_setrgb(0xff, 0xff, 0xff); -} -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if(res) { - gpio_write_pin(NUM_LOCK_PIN, led_state.num_lock); - gpio_write_pin(CAPS_LOCK_PIN, led_state.caps_lock); - gpio_write_pin(SCROLL_LOCK_PIN, led_state.scroll_lock); - } - return res; + keyboard_post_init_user(); } diff --git a/keyboards/handwired/selene/selene.h b/keyboards/handwired/selene/selene.h deleted file mode 100644 index bcd4215e36..0000000000 --- a/keyboards/handwired/selene/selene.h +++ /dev/null @@ -1,23 +0,0 @@ -/* Copyright 2020 Bpendragon - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -#pragma once - -#include "quantum.h" - -#define NUM_LOCK_PIN A0 -#define CAPS_LOCK_PIN A2 -#define SCROLL_LOCK_PIN A1 diff --git a/keyboards/handwired/sick68/keymaps/via/config.h b/keyboards/handwired/sick68/keymaps/via/config.h index 4ce1e3e785..bf6fd3ea4f 100644 --- a/keyboards/handwired/sick68/keymaps/via/config.h +++ b/keyboards/handwired/sick68/keymaps/via/config.h @@ -15,6 +15,6 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#define ENCODERS_PAD_A { F0 } -#define ENCODERS_PAD_B { F1 } +#define ENCODER_A_PINS { F0 } +#define ENCODER_B_PINS { F1 } #define ENCODER_RESOLUTION 4 diff --git a/keyboards/handwired/split65/promicro/keyboard.json b/keyboards/handwired/split65/promicro/keyboard.json index 5efdd93629..8b50ea8429 100644 --- a/keyboards/handwired/split65/promicro/keyboard.json +++ b/keyboards/handwired/split65/promicro/keyboard.json @@ -16,7 +16,9 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D3" + "serial": { + "pin": "D3" + } }, "processor": "atmega32u4", "bootloader": "caterina", diff --git a/keyboards/handwired/split65/stm32/keyboard.json b/keyboards/handwired/split65/stm32/keyboard.json index 6763c5eb88..5d838de5f7 100644 --- a/keyboards/handwired/split65/stm32/keyboard.json +++ b/keyboards/handwired/split65/stm32/keyboard.json @@ -7,7 +7,10 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "A9" + "serial": { + "driver": "usart", + "pin": "A9" + } }, "development_board": "proton_c", "features": { diff --git a/keyboards/handwired/split65/stm32/rules.mk b/keyboards/handwired/split65/stm32/rules.mk deleted file mode 100644 index c6e2988321..0000000000 --- a/keyboards/handwired/split65/stm32/rules.mk +++ /dev/null @@ -1 +0,0 @@ -SERIAL_DRIVER = usart diff --git a/keyboards/handwired/split89/config.h b/keyboards/handwired/split89/config.h deleted file mode 100644 index e12db37b97..0000000000 --- a/keyboards/handwired/split89/config.h +++ /dev/null @@ -1,36 +0,0 @@ -/* Copyright 2021 jurassic73 - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#pragma once - -/* this will be tied to high (VCC with a 2k to 10k resistor) on the left keyboard half and tied to low (GND using a wire jumper only) on the right keyboard half. This allows a user to plug in a USB cable to either side and function correctly with or without a TRS/TRRS cable with a single hex file. */ -#define SPLIT_HAND_PIN D1 - -/* - * 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 diff --git a/keyboards/handwired/split89/keyboard.json b/keyboards/handwired/split89/keyboard.json index d28953ab5f..fdd092745f 100644 --- a/keyboards/handwired/split89/keyboard.json +++ b/keyboards/handwired/split89/keyboard.json @@ -29,12 +29,17 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D0", + "handedness": { + "pin": "D1" + }, "matrix_pins": { "right": { "cols": ["F5", "F4", "B5", "B4", "E6", "D7", "C6", "D4", "D2", "D3"], "rows": ["F6", "F7", "B1", "B3", "B2", "B6"] } + }, + "serial": { + "pin": "D0" } }, "processor": "atmega32u4", diff --git a/keyboards/handwired/split_cloud/keyboard.json b/keyboards/handwired/split_cloud/keyboard.json index 8d242cc6e6..fc1d2498df 100644 --- a/keyboards/handwired/split_cloud/keyboard.json +++ b/keyboards/handwired/split_cloud/keyboard.json @@ -29,7 +29,9 @@ }, "split": { "enabled": true, - "soft_serial_pin": "D3", + "serial": { + "pin": "D3" + }, "matrix_pins": { "right": { "cols": ["D4", "C6", "D7", "E6", "B4", "B5"], diff --git a/keyboards/handwired/splittest/bluepill/config.h b/keyboards/handwired/splittest/bluepill/config.h index d19bb3dee8..af29e34088 100644 --- a/keyboards/handwired/splittest/bluepill/config.h +++ b/keyboards/handwired/splittest/bluepill/config.h @@ -3,8 +3,6 @@ #pragma once -#define SPLIT_HAND_PIN A7 - #if !(defined(USE_SDI1_ON_STANDARD_ROLE_PINS) || defined(USE_SDI1_ON_ALTERNATE_ROLE_PINS) || defined(USE_SDI2)) #define USE_SDI1_ON_STANDARD_ROLE_PINS #endif diff --git a/keyboards/handwired/splittest/bluepill/keyboard.json b/keyboards/handwired/splittest/bluepill/keyboard.json index 5c061a7119..42859f5ee8 100644 --- a/keyboards/handwired/splittest/bluepill/keyboard.json +++ b/keyboards/handwired/splittest/bluepill/keyboard.json @@ -3,6 +3,11 @@ "cols": ["B1"], "rows": ["B10"] }, + "split": { + "handedness": { + "pin": "A7" + } + }, "diode_direction": "COL2ROW", "development_board": "bluepill", "features": { diff --git a/keyboards/handwired/splittest/promicro/config.h b/keyboards/handwired/splittest/promicro/config.h index 4458ddaffe..2c39af2df7 100644 --- a/keyboards/handwired/splittest/promicro/config.h +++ b/keyboards/handwired/splittest/promicro/config.h @@ -16,8 +16,5 @@ #pragma once - // use I2C on AVR #define USE_I2C - -#define SPLIT_HAND_PIN F6 diff --git a/keyboards/handwired/splittest/promicro/keyboard.json b/keyboards/handwired/splittest/promicro/keyboard.json index 2f5929cc00..8aca1c3de7 100644 --- a/keyboards/handwired/splittest/promicro/keyboard.json +++ b/keyboards/handwired/splittest/promicro/keyboard.json @@ -5,6 +5,9 @@ }, "diode_direction": "COL2ROW", "split": { + "handedness": { + "pin": "F6" + }, "soft_serial_pin": "D1" }, "ws2812": { diff --git a/keyboards/handwired/splittest/teensy_2/config.h b/keyboards/handwired/splittest/teensy_2/config.h index 20672a381f..f7033863e0 100644 --- a/keyboards/handwired/splittest/teensy_2/config.h +++ b/keyboards/handwired/splittest/teensy_2/config.h @@ -16,11 +16,8 @@ #pragma once - // use I2C on AVR #define USE_I2C -#define SPLIT_HAND_PIN F0 - // teensy has vbus detection issues - use usb detection instead #define SPLIT_USB_DETECT diff --git a/keyboards/handwired/splittest/teensy_2/keyboard.json b/keyboards/handwired/splittest/teensy_2/keyboard.json index 68ab3f92c4..c10b20a173 100644 --- a/keyboards/handwired/splittest/teensy_2/keyboard.json +++ b/keyboards/handwired/splittest/teensy_2/keyboard.json @@ -5,6 +5,9 @@ }, "diode_direction": "COL2ROW", "split": { + "handedness": { + "pin": "F0" + }, "soft_serial_pin": "D1" }, "ws2812": { diff --git a/keyboards/handwired/stef9998/split_5x7/keymaps/default/config.h b/keyboards/handwired/stef9998/split_5x7/keymaps/default/config.h index 4afee280a0..a0dfe233aa 100644 --- a/keyboards/handwired/stef9998/split_5x7/keymaps/default/config.h +++ b/keyboards/handwired/stef9998/split_5x7/keymaps/default/config.h @@ -20,7 +20,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define USE_I2C /* Select hand configuration */ -// #define MASTER_LEFT -// #define MASTER_RIGHT #define EE_HANDS diff --git a/keyboards/handwired/stef9998/split_5x7/keymaps/stef9998/config.h b/keyboards/handwired/stef9998/split_5x7/keymaps/stef9998/config.h index 22d68ab390..b0d6f7113e 100644 --- a/keyboards/handwired/stef9998/split_5x7/keymaps/stef9998/config.h +++ b/keyboards/handwired/stef9998/split_5x7/keymaps/stef9998/config.h @@ -20,8 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define USE_I2C /* Select hand configuration */ -// #define MASTER_LEFT -// #define MASTER_RIGHT #define EE_HANDS #define LCPO_KEYS KC_LCTL,KC_TRNS,KC_LBRC diff --git a/keyboards/handwired/stef9998/split_5x7/rev1/keyboard.json b/keyboards/handwired/stef9998/split_5x7/rev1/keyboard.json index fe277ebde0..5f524ea445 100644 --- a/keyboards/handwired/stef9998/split_5x7/rev1/keyboard.json +++ b/keyboards/handwired/stef9998/split_5x7/rev1/keyboard.json @@ -23,12 +23,14 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D0", "matrix_pins": { "right": { "cols": ["F5", "F6", "F7", "B1", "B3", "B2", "B6"], "rows": ["B5", "B4", "E6", "D7", "C6"] } + }, + "serial": { + "pin": "D0" } }, "processor": "atmega32u4", diff --git a/keyboards/handwired/symmetric70_proto/matrix_debug/matrix.c b/keyboards/handwired/symmetric70_proto/matrix_debug/matrix.c index 786c1b4a73..fa9b6ef0fd 100644 --- a/keyboards/handwired/symmetric70_proto/matrix_debug/matrix.c +++ b/keyboards/handwired/symmetric70_proto/matrix_debug/matrix.c @@ -60,14 +60,14 @@ static const uint8_t delay_sel[] = {MATRIX_IO_DELAY_MULSEL}; extern matrix_row_t raw_matrix[MATRIX_ROWS]; // raw values extern matrix_row_t matrix[MATRIX_ROWS]; // debounced values -static inline void setPinOutput_writeLow(pin_t pin) { +static inline void gpio_atomic_set_pin_output_low(pin_t pin) { ATOMIC_BLOCK_FORCEON { gpio_set_pin_output(pin); gpio_write_pin_low(pin); } } -static inline void setPinInputHigh_atomic(pin_t pin) { +static inline void gpio_atomic_set_pin_input_high(pin_t pin) { ATOMIC_BLOCK_FORCEON { gpio_set_pin_input_high(pin); } } @@ -108,13 +108,13 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) #elif defined(DIODE_DIRECTION) # if (DIODE_DIRECTION == COL2ROW) -static void select_row(uint8_t row) { setPinOutput_writeLow(row_pins[row]); } +static void select_row(uint8_t row) { gpio_atomic_set_pin_output_low(row_pins[row]); } -static void unselect_row(uint8_t row) { setPinInputHigh_atomic(row_pins[row]); } +static void unselect_row(uint8_t row) { gpio_atomic_set_pin_input_high(row_pins[row]); } static void unselect_rows(void) { for (uint8_t x = 0; x < MATRIX_ROWS; x++) { - setPinInputHigh_atomic(row_pins[x]); + gpio_atomic_set_pin_input_high(row_pins[x]); } } @@ -125,7 +125,7 @@ static void init_pins(void) { # endif unselect_rows(); for (uint8_t x = 0; x < MATRIX_COLS; x++) { - setPinInputHigh_atomic(col_pins[x]); + gpio_atomic_set_pin_input_high(col_pins[x]); } } @@ -218,20 +218,20 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) # elif (DIODE_DIRECTION == ROW2COL) -static void select_col(uint8_t col) { setPinOutput_writeLow(col_pins[col]); } +static void select_col(uint8_t col) { gpio_atomic_set_pin_output_low(col_pins[col]); } -static void unselect_col(uint8_t col) { setPinInputHigh_atomic(col_pins[col]); } +static void unselect_col(uint8_t col) { gpio_atomic_set_pin_input_high(col_pins[col]); } static void unselect_cols(void) { for (uint8_t x = 0; x < MATRIX_COLS; x++) { - setPinInputHigh_atomic(col_pins[x]); + gpio_atomic_set_pin_input_high(col_pins[x]); } } static void init_pins(void) { unselect_cols(); for (uint8_t x = 0; x < MATRIX_ROWS; x++) { - setPinInputHigh_atomic(row_pins[x]); + gpio_atomic_set_pin_input_high(row_pins[x]); } } diff --git a/keyboards/handwired/tractyl_manuform/4x6_right/config.h b/keyboards/handwired/tractyl_manuform/4x6_right/config.h index 9d283866b4..ba187a8376 100644 --- a/keyboards/handwired/tractyl_manuform/4x6_right/config.h +++ b/keyboards/handwired/tractyl_manuform/4x6_right/config.h @@ -19,7 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once #define SPLIT_TRANSPORT_MIRROR -#define SPLIT_HAND_PIN A6 // #define DEBUG_LED_PIN D6 diff --git a/keyboards/handwired/tractyl_manuform/4x6_right/keyboard.json b/keyboards/handwired/tractyl_manuform/4x6_right/keyboard.json index 825c59ac72..e5730a4586 100644 --- a/keyboards/handwired/tractyl_manuform/4x6_right/keyboard.json +++ b/keyboards/handwired/tractyl_manuform/4x6_right/keyboard.json @@ -19,6 +19,9 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, + "handedness": { + "pin": "A6" + }, "soft_serial_pin": "D3", "bootmagic": { "matrix": [4, 5] diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/f303/config.h b/keyboards/handwired/tractyl_manuform/5x6_right/f303/config.h index a2818e7176..b10fe7de74 100644 --- a/keyboards/handwired/tractyl_manuform/5x6_right/f303/config.h +++ b/keyboards/handwired/tractyl_manuform/5x6_right/f303/config.h @@ -19,7 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once // #define USB_VBUS_PIN B10 -#define SPLIT_HAND_PIN C14 // high = left, low = right // WS2812 RGB LED strip input and number of LEDs #define WS2812_PWM_DRIVER PWMD3 // default: PWMD2 diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/f303/keyboard.json b/keyboards/handwired/tractyl_manuform/5x6_right/f303/keyboard.json index 499390c610..a9070f2cc7 100644 --- a/keyboards/handwired/tractyl_manuform/5x6_right/f303/keyboard.json +++ b/keyboards/handwired/tractyl_manuform/5x6_right/f303/keyboard.json @@ -15,6 +15,14 @@ "audio": { "driver": "dac_additive" }, + "split": { + "handedness": { + "pin": "C14" + }, + "serial": { + "driver": "usart" + } + }, "ws2812": { "pin": "A6", "driver": "pwm" diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/f303/rules.mk b/keyboards/handwired/tractyl_manuform/5x6_right/f303/rules.mk deleted file mode 100644 index 22915ec000..0000000000 --- a/keyboards/handwired/tractyl_manuform/5x6_right/f303/rules.mk +++ /dev/null @@ -1,3 +0,0 @@ -# KEYBOARD_SHARED_EP = yes - -SERIAL_DRIVER = usart diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/f411/config.h b/keyboards/handwired/tractyl_manuform/5x6_right/f411/config.h index 87f830e175..64169da7e5 100644 --- a/keyboards/handwired/tractyl_manuform/5x6_right/f411/config.h +++ b/keyboards/handwired/tractyl_manuform/5x6_right/f411/config.h @@ -19,7 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once // #define USB_VBUS_PIN B10 // doesn't seem to work for me on one of my controllers... */ -#define SPLIT_HAND_PIN C14 // high = left, low = right // WS2812 RGB LED strip input and number of LEDs #define WS2812_PWM_DRIVER PWMD2 // default: PWMD2 diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/f411/keyboard.json b/keyboards/handwired/tractyl_manuform/5x6_right/f411/keyboard.json index 7182ee1701..c7d38c0daf 100644 --- a/keyboards/handwired/tractyl_manuform/5x6_right/f411/keyboard.json +++ b/keyboards/handwired/tractyl_manuform/5x6_right/f411/keyboard.json @@ -18,6 +18,14 @@ "audio": { "driver": "pwm_hardware" }, + "split": { + "handedness": { + "pin": "C14" + }, + "serial": { + "driver": "usart" + }, + }, "ws2812": { "pin": "A1", "driver": "pwm" diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/f411/rules.mk b/keyboards/handwired/tractyl_manuform/5x6_right/f411/rules.mk index f26cbbced1..4aa582e7a2 100644 --- a/keyboards/handwired/tractyl_manuform/5x6_right/f411/rules.mk +++ b/keyboards/handwired/tractyl_manuform/5x6_right/f411/rules.mk @@ -1,4 +1,2 @@ KEYBOARD_SHARED_EP = yes MOUSE_SHARED_EP = yes - -SERIAL_DRIVER = usart diff --git a/keyboards/handwired/tsubasa/keyboard.json b/keyboards/handwired/tsubasa/keyboard.json index 05fd05968a..31e6bb72cc 100644 --- a/keyboards/handwired/tsubasa/keyboard.json +++ b/keyboards/handwired/tsubasa/keyboard.json @@ -46,7 +46,6 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D3", "encoder": { "right": { "rotary": [ @@ -54,6 +53,9 @@ ] } }, + "serial": { + "pin": "D3" + }, "transport": { "sync": { "layer_state": true, diff --git a/keyboards/handwired/unk/keymaps/default/config.h b/keyboards/handwired/unk/keymaps/default/config.h deleted file mode 100644 index 3d8851ac43..0000000000 --- a/keyboards/handwired/unk/keymaps/default/config.h +++ /dev/null @@ -1,23 +0,0 @@ -/* -Copyright 2020 Herpiko Dwi Aguno <[email protected]> - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - - -#pragma once - -#define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS diff --git a/keyboards/handwired/unk/rev1/config.h b/keyboards/handwired/unk/rev1/config.h deleted file mode 100644 index 4e339bd553..0000000000 --- a/keyboards/handwired/unk/rev1/config.h +++ /dev/null @@ -1,37 +0,0 @@ -/* -Copyright 2020 Herpiko Dwi Aguno <[email protected]> - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#pragma once - - -#define MASTER_LEFT // Comment this line for the right half firmware - -/* - * 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 diff --git a/keyboards/handwired/unk/rev1/keyboard.json b/keyboards/handwired/unk/rev1/keyboard.json index bfc4ee3c79..0de8b29f41 100644 --- a/keyboards/handwired/unk/rev1/keyboard.json +++ b/keyboards/handwired/unk/rev1/keyboard.json @@ -21,12 +21,14 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D0", "matrix_pins": { "right": { "cols": ["B1", "B3", "B2", "B6", "F7", "B5", "F6", "F5"], "rows": ["C6", "D7", "B4", "E6", "D4"] } + }, + "serial": { + "pin": "D0" } }, "processor": "atmega32u4", diff --git a/keyboards/handwired/xealous/config.h b/keyboards/handwired/xealous/config.h index a8788a8ad7..6cc6b4d1de 100644 --- a/keyboards/handwired/xealous/config.h +++ b/keyboards/handwired/xealous/config.h @@ -21,9 +21,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define USE_I2C #define SCL_CLOCK 800000UL -/* Select hand configuration */ -#define MASTER_LEFT - //#define DEBUG_MATRIX_SCAN_RATE //Use this to determine scan-rate. #ifdef AUDIO_ENABLE diff --git a/keyboards/handwired/z150/config.h b/keyboards/handwired/z150/config.h deleted file mode 100644 index 7a054266ea..0000000000 --- a/keyboards/handwired/z150/config.h +++ /dev/null @@ -1,38 +0,0 @@ -/* -Copyright 2020 DmNosachev - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#pragma once - -#define NUM_LOCK_LED_PIN B5 -#define SCROLL_LOCK_LED_PIN B4 -#define CAPS_LOCK_LED_PIN B3 - -/* - * 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 diff --git a/keyboards/handwired/z150/keyboard.json b/keyboards/handwired/z150/keyboard.json index 0658bb5233..38c92a6537 100644 --- a/keyboards/handwired/z150/keyboard.json +++ b/keyboards/handwired/z150/keyboard.json @@ -16,6 +16,12 @@ "mousekey": true, "nkro": false }, + "indicators": { + "caps_lock": "B3", + "num_lock": "B5", + "scroll_lock": "B4", + "on_state": 0 + }, "matrix_pins": { "cols": ["B11", "B10", "B1", "B0", "A7", "A6", "A5", "A4"], "rows": ["B13", "B14", "B15", "A8", "A9", "A3", "A10", "A1", "A2", "A15", "A0"] diff --git a/keyboards/handwired/z150/z150.c b/keyboards/handwired/z150/z150.c deleted file mode 100644 index ab6709eed7..0000000000 --- a/keyboards/handwired/z150/z150.c +++ /dev/null @@ -1,39 +0,0 @@ -/* Copyright 2020 DmNosachev - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -#include "quantum.h" - -void matrix_init_kb(void) { - gpio_set_pin_output(NUM_LOCK_LED_PIN); - gpio_set_pin_output(CAPS_LOCK_LED_PIN); - gpio_set_pin_output(SCROLL_LOCK_LED_PIN); - - gpio_write_pin_low(NUM_LOCK_LED_PIN); - gpio_write_pin_low(CAPS_LOCK_LED_PIN); - gpio_write_pin_low(SCROLL_LOCK_LED_PIN); - - matrix_init_user(); -} - -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if(res) { - gpio_write_pin(NUM_LOCK_LED_PIN, !led_state.num_lock); - gpio_write_pin(CAPS_LOCK_LED_PIN, !led_state.caps_lock); - gpio_write_pin(SCROLL_LOCK_LED_PIN, !led_state.scroll_lock); - } - return res; -} diff --git a/keyboards/hardwareabstraction/handwire/handwire.c b/keyboards/hardwareabstraction/handwire/handwire.c index d5ebd6ac13..b31c0a7091 100644 --- a/keyboards/hardwareabstraction/handwire/handwire.c +++ b/keyboards/hardwareabstraction/handwire/handwire.c @@ -39,7 +39,6 @@ void housekeeping_task_kb(void){ gpio_write_pin_low(BUZZER_PIN); } } - housekeeping_task_user(); } bool process_record_kb(uint16_t keycode, keyrecord_t *record) { diff --git a/keyboards/heliar/wm1_hotswap/keyboard.json b/keyboards/heliar/wm1_hotswap/keyboard.json index 3fa1a8e6cb..789a3c7d2b 100644 --- a/keyboards/heliar/wm1_hotswap/keyboard.json +++ b/keyboards/heliar/wm1_hotswap/keyboard.json @@ -25,6 +25,12 @@ "backlight": { "pin": "B7" }, + "indicators": { + "caps_lock": "D6", + "num_lock": "D7", + "scroll_lock": "D4", + "on_state": 0 + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/heliar/wm1_hotswap/wm1_hotswap.c b/keyboards/heliar/wm1_hotswap/wm1_hotswap.c deleted file mode 100644 index d2d10b0b1f..0000000000 --- a/keyboards/heliar/wm1_hotswap/wm1_hotswap.c +++ /dev/null @@ -1,39 +0,0 @@ -/* Copyright 2019 HELIAR MK - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -#include "quantum.h" - - -void keyboard_pre_init_kb(void) -{ - gpio_set_pin_output(D7); - gpio_write_pin_high(D7); - gpio_set_pin_output(D6); - gpio_write_pin_high(D6); - gpio_set_pin_output(D4); - gpio_write_pin_high(D4); -} - -bool led_update_kb(led_t led_state) { - - if (led_update_user(led_state)){ - gpio_write_pin(D7, !led_state.num_lock); - gpio_write_pin(D6, !led_state.caps_lock); - gpio_write_pin(D4, !led_state.scroll_lock); - } - - return true; -} diff --git a/keyboards/helix/pico/config.h b/keyboards/helix/pico/config.h index e1cd9c2e90..6ba88a559c 100644 --- a/keyboards/helix/pico/config.h +++ b/keyboards/helix/pico/config.h @@ -24,11 +24,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define SERIAL_SLAVE_BUFFER_LENGTH ((MATRIX_ROWS)/2) #define SERIAL_MASTER_BUFFER_LENGTH ((MATRIX_ROWS)/2) -/* Select hand configuration */ -#define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS - /* key matrix size */ // Rows are doubled-up #define MATRIX_ROWS 8 diff --git a/keyboards/helix/rev2/config.h b/keyboards/helix/rev2/config.h index 8af2a44ecc..67af503882 100644 --- a/keyboards/helix/rev2/config.h +++ b/keyboards/helix/rev2/config.h @@ -21,11 +21,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define QUICK_TAP_TERM 0 -/* Select hand configuration */ -#define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS - #define OLED_UPDATE_INTERVAL 50 // Helix keyboard RGB LED support diff --git a/keyboards/helix/rev2/keymaps/led_test/keymap.c b/keyboards/helix/rev2/keymaps/led_test/keymap.c index 2811c7707a..0074153ccf 100644 --- a/keyboards/helix/rev2/keymaps/led_test/keymap.c +++ b/keyboards/helix/rev2/keymaps/led_test/keymap.c @@ -1 +1,341 @@ -#include "../default/keymap.c" +/* Copyright 2020 yushakobo + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include QMK_KEYBOARD_H + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +enum layer_number { + _QWERTY = 0, + _COLEMAK, + _DVORAK, + _LOWER, + _RAISE, + _ADJUST +}; + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + LOWER, + RAISE, + ADJUST, + BACKLIT, + EISU, + KANA, + RGBRST +}; + +enum macro_keycodes { + KC_SAMPLEMACRO, +}; + +//Macros +#define M_SAMPLE M(KC_SAMPLEMACRO) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Qwerty + * ,-----------------------------------------. ,-----------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Ctrl | A | S | D | F | G | | H | J | K | L | ; | ' | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | [ | ] | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Esc | Alt | GUI | EISU |Lower |Space |Space |Raise | KANA | Left | Down | Up |Right | + * `-------------------------------------------------------------------------------------------------' + */ + [_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_DEL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + 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_LBRC, KC_RBRC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , + ADJUST, KC_ESC, KC_LALT, KC_LGUI, EISU, LOWER, KC_SPC, KC_SPC, RAISE, KANA, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + ), + + /* Colemak + * ,-----------------------------------------. ,-----------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Tab | Q | W | F | P | G | | J | L | U | Y | ; | Bksp | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Ctrl | A | R | S | T | D | | H | N | E | I | O | ' | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | [ | ] | K | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Esc | Alt | GUI | EISU |Lower |Space |Space |Raise | KANA | Left | Down | Up |Right | + * `-------------------------------------------------------------------------------------------------' + */ + [_COLEMAK] = 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_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, + KC_LCTL, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LBRC, KC_RBRC, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , + ADJUST, KC_ESC, KC_LALT, KC_LGUI, EISU, LOWER, KC_SPC, KC_SPC, RAISE, KANA, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + ), + + /* Dvorak + * ,-----------------------------------------. ,-----------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Tab | ' | , | . | P | Y | | F | G | C | R | L | Del | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Ctrl | A | O | E | U | I | | D | H | T | N | S | / | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | [ | ] | B | M | W | V | Z |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Esc | Alt | GUI | EISU |Lower |Space |Space |Raise | KANA | Left | Down | Up |Right | + * `-------------------------------------------------------------------------------------------------' + */ + [_DVORAK] = LAYOUT( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_DEL, + KC_LCTL, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_LBRC, KC_RBRC, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT , + ADJUST, KC_ESC, KC_LALT, KC_LGUI, EISU, LOWER, KC_SPC, KC_SPC, RAISE, KANA, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + ), + + /* Lower + * ,-----------------------------------------. ,-----------------------------------------. + * | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | F1 | F2 | F3 | F4 | F5 | | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | CAPS | F7 | F8 | F9 | F10 | F11 | ( | ) | F12 | | | Home | End | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | Next | Vol- | Vol+ | Play | + * `-------------------------------------------------------------------------------------------------' + */ + [_LOWER] = LAYOUT( + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + KC_TILD, 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_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + KC_CAPS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_LPRN, KC_RPRN, KC_F12, _______, _______, KC_HOME, KC_END, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY + ), + + /* Raise + * ,-----------------------------------------. ,-----------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | F1 | F2 | F3 | F4 | F5 | | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | CAPS | F7 | F8 | F9 | F10 | F11 | | | F12 | | |PageDn|PageUp| | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | Next | Vol- | Vol+ | Play | + * `-------------------------------------------------------------------------------------------------' + */ + [_RAISE] = LAYOUT( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + KC_CAPS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______, _______, KC_F12, _______, _______, KC_PGDN, KC_PGUP, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY + ), + + /* Adjust (Lower + Raise) + * ,-----------------------------------------. ,-----------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | Reset|RGBRST| | | | | | | | | | Del | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | |Aud on|Audoff| Mac | | Win |Qwerty|Colemk|Dvorak| | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | |RGB ON| HUE+ | SAT+ | VAL+ | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | MODE | HUE- | SAT- | VAL- | + * `-------------------------------------------------------------------------------------------------' + */ + [_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, + _______, QK_BOOT, RGBRST, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, + _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD + ) +}; + +#ifdef AUDIO_ENABLE + +float tone_qwerty[][2] = SONG(QWERTY_SOUND); +float tone_dvorak[][2] = SONG(DVORAK_SOUND); +float tone_colemak[][2] = SONG(COLEMAK_SOUND); +float tone_plover[][2] = SONG(PLOVER_SOUND); +float tone_plover_gb[][2] = SONG(PLOVER_GOODBYE_SOUND); +#endif + +// define variables for reactive RGB +bool TOG_STATUS = false; +int RGB_current_mode; + +// Setting ADJUST layer RGB back to default +void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) { + if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) { + #ifdef RGBLIGHT_ENABLE + //rgblight_mode(RGB_current_mode); + #endif + layer_on(layer3); + } else { + layer_off(layer3); + } +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(tone_qwerty); + #endif + set_single_persistent_default_layer(_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(tone_colemak); + #endif + set_single_persistent_default_layer(_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(tone_dvorak); + #endif + set_single_persistent_default_layer(_DVORAK); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + //not sure how to have keyboard check mode and set it to a variable, so my work around + //uses another variable that would be set to true after the first time a reactive key is pressed. + if (TOG_STATUS) { //TOG_STATUS checks is another reactive key currently pressed, only changes RGB mode if returns false + } else { + TOG_STATUS = !TOG_STATUS; + #ifdef RGBLIGHT_ENABLE + //rgblight_mode(RGBLIGHT_MODE_SNAKE + 1); + #endif + } + layer_on(_LOWER); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } else { + #ifdef RGBLIGHT_ENABLE + //rgblight_mode(RGB_current_mode); // revert RGB to initial mode prior to RGB mode change + #endif + TOG_STATUS = false; + layer_off(_LOWER); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + //not sure how to have keyboard check mode and set it to a variable, so my work around + //uses another variable that would be set to true after the first time a reactive key is pressed. + if (TOG_STATUS) { //TOG_STATUS checks is another reactive key currently pressed, only changes RGB mode if returns false + } else { + TOG_STATUS = !TOG_STATUS; + #ifdef RGBLIGHT_ENABLE + //rgblight_mode(RGBLIGHT_MODE_SNAKE); + #endif + } + layer_on(_RAISE); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } else { + #ifdef RGBLIGHT_ENABLE + //rgblight_mode(RGB_current_mode); // revert RGB to initial mode prior to RGB mode change + #endif + layer_off(_RAISE); + TOG_STATUS = false; + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + break; + //led operations - RGB mode change now updates the RGB_current_mode to allow the right RGB mode to be set after reactive keys are released + case RGB_MOD: + #ifdef RGBLIGHT_ENABLE + if (record->event.pressed) { + rgblight_mode(RGB_current_mode); + rgblight_step(); + RGB_current_mode = rgblight_get_mode(); + } + #endif + return false; + break; + case EISU: + if (record->event.pressed) { + if (is_mac_mode()) { + register_code(KC_LNG2); + } else { + SEND_STRING(SS_LALT("`")); + } + } else { + unregister_code(KC_LNG2); + } + return false; + break; + case KANA: + if (record->event.pressed) { + if (is_mac_mode()) { + register_code(KC_LNG1); + } else { + SEND_STRING(SS_LALT("`")); + } + } else { + unregister_code(KC_LNG1); + } + return false; + break; + case RGBRST: + #ifdef RGBLIGHT_ENABLE + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + RGB_current_mode = rgblight_get_mode(); + } + #endif + break; + } + return true; +} + +void matrix_init_user(void) { + #ifdef RGBLIGHT_ENABLE + RGB_current_mode = rgblight_get_mode(); + #endif +} diff --git a/keyboards/hidtech/bastyl/keyboard.json b/keyboards/hidtech/bastyl/keyboard.json index 7ebb915739..1155caa320 100644 --- a/keyboards/hidtech/bastyl/keyboard.json +++ b/keyboards/hidtech/bastyl/keyboard.json @@ -30,7 +30,9 @@ "diode_direction": "ROW2COL", "split": { "enabled": true, - "soft_serial_pin": "D0" + "serial": { + "pin": "D0" + } }, "ws2812": { "pin": "D2" diff --git a/keyboards/hillside/46/0_1/keyboard.json b/keyboards/hillside/46/0_1/keyboard.json index 7cb7150f3f..663eeb25f4 100644 --- a/keyboards/hillside/46/0_1/keyboard.json +++ b/keyboards/hillside/46/0_1/keyboard.json @@ -26,13 +26,15 @@ }, "split": { "enabled": true, - "soft_serial_pin": "D2", "encoder": { "right": { "rotary": [ {"pin_a": "F4", "pin_b": "F5"} ] } + }, + "serial": { + "pin": "D2" } }, "rgblight": { diff --git a/keyboards/hillside/48/0_1/keyboard.json b/keyboards/hillside/48/0_1/keyboard.json index b640bc0cbf..4dd2e01361 100644 --- a/keyboards/hillside/48/0_1/keyboard.json +++ b/keyboards/hillside/48/0_1/keyboard.json @@ -26,13 +26,15 @@ }, "split": { "enabled": true, - "soft_serial_pin": "D2", "encoder": { "right": { "rotary": [ {"pin_a": "F4", "pin_b": "F5"} ] } + }, + "serial": { + "pin": "D2" } }, "rgblight": { diff --git a/keyboards/hillside/52/0_1/keyboard.json b/keyboards/hillside/52/0_1/keyboard.json index 0949fa9bb8..c8db3917d6 100644 --- a/keyboards/hillside/52/0_1/keyboard.json +++ b/keyboards/hillside/52/0_1/keyboard.json @@ -26,13 +26,15 @@ }, "split": { "enabled": true, - "soft_serial_pin": "D2", "encoder": { "right": { "rotary": [ {"pin_a": "F4", "pin_b": "F5"} ] } + }, + "serial": { + "pin": "D2" } }, "rgblight": { diff --git a/keyboards/hineybush/h10/h10.c b/keyboards/hineybush/h10/h10.c deleted file mode 100644 index 2170a8b2d7..0000000000 --- a/keyboards/hineybush/h10/h10.c +++ /dev/null @@ -1,34 +0,0 @@ -/* Copyright 2020 hineybush - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -#include "quantum.h" - -// Optional override functions below. -// You can leave any or all of these undefined. -// These are only required if you want to perform custom actions. - -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - gpio_set_pin_output(F7); -} - -bool led_update_kb(led_t led_state) { - if(led_update_user(led_state)) { - gpio_write_pin(F7, !led_state.num_lock); - } - return true; -} diff --git a/keyboards/hineybush/h10/keyboard.json b/keyboards/hineybush/h10/keyboard.json index 73205f85ff..63a109f484 100644 --- a/keyboards/hineybush/h10/keyboard.json +++ b/keyboards/hineybush/h10/keyboard.json @@ -32,6 +32,10 @@ "pin": "B7", "breathing": true }, + "indicators": { + "caps_lock": "F7", + "on_state": 0 + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "community_layouts": ["ortho_6x4", "numpad_6x4"], diff --git a/keyboards/hineybush/h60/h60.c b/keyboards/hineybush/h60/h60.c deleted file mode 100644 index 472b99d8ba..0000000000 --- a/keyboards/hineybush/h60/h60.c +++ /dev/null @@ -1,31 +0,0 @@ -/* Copyright 2020 hineybush - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -#include "quantum.h" - -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - gpio_set_pin_output(C6); -} - -bool led_update_kb(led_t led_state) { - if(led_update_user(led_state)) { - gpio_write_pin(C6, !led_state.caps_lock); - } - return true; -} - diff --git a/keyboards/hineybush/h60/keyboard.json b/keyboards/hineybush/h60/keyboard.json index 8a019d42da..ea058b6d64 100644 --- a/keyboards/hineybush/h60/keyboard.json +++ b/keyboards/hineybush/h60/keyboard.json @@ -34,6 +34,10 @@ "pin": "B7", "levels": 12 }, + "indicators": { + "caps_lock": "C6", + "on_state": 0 + }, "rgblight": { "saturation_steps": 8, "brightness_steps": 8, diff --git a/keyboards/afternoonlabs/oceanbreeze/rev1/config.h b/keyboards/hineybush/h660s/config.h index d6bb6df14c..2ac1c1bae5 100644 --- a/keyboards/afternoonlabs/oceanbreeze/rev1/config.h +++ b/keyboards/hineybush/h660s/config.h @@ -1,4 +1,4 @@ -/* Copyright 2021 Afternoon Labs +/* Copyright 2018 Josh Hinnebusch * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -13,7 +13,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ - #pragma once -#define SPLIT_HAND_PIN B3 +#define RGBLIGHT_DEFAULT_MODE (RGBLIGHT_MODE_RAINBOW_SWIRL + 2) diff --git a/keyboards/hineybush/h660s/h660s.c b/keyboards/hineybush/h660s/h660s.c deleted file mode 100644 index 0e774b9c57..0000000000 --- a/keyboards/hineybush/h660s/h660s.c +++ /dev/null @@ -1,27 +0,0 @@ -/* Copyright 2020 Josh Hinnebusch - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -#include "quantum.h" - -void eeconfig_init_kb(void) { // EEPROM is getting reset! - rgblight_enable(); // Enable RGB by default - rgblight_sethsv(0, 255, 128); // Set default HSV - red hue, full saturation, medium brightness - rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL + 2); // set to RGB_RAINBOW_SWIRL by default - - eeconfig_update_kb(0); - eeconfig_init_user(); -} - diff --git a/keyboards/hineybush/h660s/keyboard.json b/keyboards/hineybush/h660s/keyboard.json index d76664080e..44e8c8c21a 100644 --- a/keyboards/hineybush/h660s/keyboard.json +++ b/keyboards/hineybush/h660s/keyboard.json @@ -35,6 +35,9 @@ "breathing": true }, "rgblight": { + "default": { + "val": 128 + }, "saturation_steps": 8, "brightness_steps": 8, "led_count": 16, diff --git a/keyboards/afternoonlabs/breeze/rev0/config.h b/keyboards/hineybush/h75_singa/config.h index 3500564544..6be72d4d9f 100644 --- a/keyboards/afternoonlabs/breeze/rev0/config.h +++ b/keyboards/hineybush/h75_singa/config.h @@ -1,4 +1,4 @@ -/* Copyright 2021 eithanshavit +/* Copyright 2019 hineybush * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -13,7 +13,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ - #pragma once -#define SPLIT_HAND_PIN B3 +#define RGBLIGHT_DEFAULT_MODE (RGBLIGHT_MODE_RAINBOW_SWIRL + 2) diff --git a/keyboards/hineybush/h75_singa/h75_singa.c b/keyboards/hineybush/h75_singa/h75_singa.c deleted file mode 100644 index badd12849d..0000000000 --- a/keyboards/hineybush/h75_singa/h75_singa.c +++ /dev/null @@ -1,26 +0,0 @@ -/* Copyright 2019 hineybush - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -#include "quantum.h" - -void eeconfig_init_kb(void) { // EEPROM is getting reset! - rgblight_enable(); // Enable RGB by default - rgblight_sethsv(0, 255, 128); // Set default HSV - red hue, full saturation, medium brightness - rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL + 2); // set to RGB_RAINBOW_SWIRL by default - - eeconfig_update_kb(0); - eeconfig_init_user(); -} diff --git a/keyboards/hineybush/h75_singa/keyboard.json b/keyboards/hineybush/h75_singa/keyboard.json index 30dbd8d6a1..0c3ca31e28 100644 --- a/keyboards/hineybush/h75_singa/keyboard.json +++ b/keyboards/hineybush/h75_singa/keyboard.json @@ -34,6 +34,9 @@ "breathing": true }, "rgblight": { + "default": { + "val": 128 + }, "saturation_steps": 8, "brightness_steps": 8, "led_count": 22, diff --git a/keyboards/afternoonlabs/southern_breeze/rev1/config.h b/keyboards/hineybush/h87a/config.h index d6bb6df14c..9ff1e426bd 100644 --- a/keyboards/afternoonlabs/southern_breeze/rev1/config.h +++ b/keyboards/hineybush/h87a/config.h @@ -1,4 +1,4 @@ -/* Copyright 2021 Afternoon Labs +/* Copyright 2020 Josh Hinnebusch * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -13,7 +13,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ - #pragma once -#define SPLIT_HAND_PIN B3 +#define RGBLIGHT_DEFAULT_MODE (RGBLIGHT_MODE_RAINBOW_SWIRL + 2) diff --git a/keyboards/hineybush/h87a/h87a.c b/keyboards/hineybush/h87a/h87a.c deleted file mode 100644 index f2d0c62813..0000000000 --- a/keyboards/hineybush/h87a/h87a.c +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright 2018 Josh Hinnebusch - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ -#include "quantum.h" - -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - gpio_set_pin_output(D5); - gpio_set_pin_output(E6); - matrix_init_user(); -} - -bool led_update_kb(led_t led_state) { - if(led_update_user(led_state)) { - gpio_write_pin(D5, !led_state.caps_lock); - gpio_write_pin(E6, !led_state.scroll_lock); - } - return true; -} - -void eeconfig_init_kb(void) { // EEPROM is getting reset! - rgblight_enable(); // Enable RGB by default - rgblight_sethsv(0, 255, 128); // Set default HSV - red hue, full saturation, medium brightness - rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL + 2); // set to RGB_RAINBOW_SWIRL by default - - eeconfig_update_kb(0); - eeconfig_init_user(); -} diff --git a/keyboards/hineybush/h87a/keyboard.json b/keyboards/hineybush/h87a/keyboard.json index e9096201d9..42a50bf001 100644 --- a/keyboards/hineybush/h87a/keyboard.json +++ b/keyboards/hineybush/h87a/keyboard.json @@ -35,10 +35,18 @@ "backlight": { "pin": "B7" }, + "indicators": { + "caps_lock": "D5", + "scroll_lock": "E6", + "on_state": 0 + }, "ws2812": { "pin": "D3" }, "rgblight": { + "default": { + "val": 128 + }, "saturation_steps": 8, "brightness_steps": 8, "led_count": 24, diff --git a/keyboards/hineybush/h88/config.h b/keyboards/hineybush/h88/config.h new file mode 100644 index 0000000000..2537b3f36c --- /dev/null +++ b/keyboards/hineybush/h88/config.h @@ -0,0 +1,18 @@ +/* Copyright 2019 Josh Hinnebusch + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ +#pragma once + +#define RGBLIGHT_DEFAULT_MODE (RGBLIGHT_MODE_RAINBOW_SWIRL + 2) diff --git a/keyboards/hineybush/h88/h88.c b/keyboards/hineybush/h88/h88.c deleted file mode 100644 index a916609d75..0000000000 --- a/keyboards/hineybush/h88/h88.c +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright 2019 Josh Hinnebusch - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ -#include "quantum.h" - -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - gpio_set_pin_output(D5); - gpio_set_pin_output(E6); - matrix_init_user(); -} - -bool led_update_kb(led_t led_state) { - if(led_update_user(led_state)) { - gpio_write_pin(D5, !led_state.caps_lock); - gpio_write_pin(E6, !led_state.scroll_lock); - } - return true; -} - -void eeconfig_init_kb(void) { // EEPROM is getting reset! - rgblight_enable(); // Enable RGB by default - rgblight_sethsv(0, 255, 128); // Set default HSV - red hue, full saturation, medium brightness - rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL + 2); // set to RGB_RAINBOW_SWIRL by default - - eeconfig_update_kb(0); - eeconfig_init_user(); -} diff --git a/keyboards/hineybush/h88/keyboard.json b/keyboards/hineybush/h88/keyboard.json index e74a3f3623..6a9b3142e3 100644 --- a/keyboards/hineybush/h88/keyboard.json +++ b/keyboards/hineybush/h88/keyboard.json @@ -35,7 +35,15 @@ "backlight": { "pin": "B7" }, + "indicators": { + "caps_lock": "D5", + "scroll_lock": "E6", + "on_state": 0 + }, "rgblight": { + "default": { + "val": 128 + }, "saturation_steps": 8, "brightness_steps": 8, "led_count": 24, diff --git a/keyboards/hineybush/hbcp/config.h b/keyboards/hineybush/hbcp/config.h index bde356232d..d3274f8c5a 100644 --- a/keyboards/hineybush/hbcp/config.h +++ b/keyboards/hineybush/hbcp/config.h @@ -34,3 +34,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B1, B6, D0, C7, C6, C5 } #define MATRIX_COL_PINS { F0, F1, F2, F3, F4, F5, F6, F7, A0, A1, A2, A3, A4, A5, B5, B4, B3, B2 } + +#define RGBLIGHT_DEFAULT_MODE (RGBLIGHT_MODE_RAINBOW_SWIRL + 2) diff --git a/keyboards/hineybush/hbcp/hbcp.c b/keyboards/hineybush/hbcp/hbcp.c index e422b46fdc..a9eff65030 100644 --- a/keyboards/hineybush/hbcp/hbcp.c +++ b/keyboards/hineybush/hbcp/hbcp.c @@ -34,15 +34,6 @@ // #define HSV_custom_color H, S, V -void eeconfig_init_kb(void) { // EEPROM is getting reset! - rgblight_enable(); // Enable RGB by default - rgblight_sethsv(0, 255, 128); // Set default HSV - red hue, full saturation, medium brightness - rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL + 2); // set to RGB_RAINBOW_SWIRL by default - - eeconfig_update_kb(0); - eeconfig_init_user(); -} - #ifdef RGBLIGHT_ENABLE bool led_update_kb(led_t led_state) { diff --git a/keyboards/hineybush/hbcp/keyboard.json b/keyboards/hineybush/hbcp/keyboard.json index f03c4d5754..e8771ea9a7 100644 --- a/keyboards/hineybush/hbcp/keyboard.json +++ b/keyboards/hineybush/hbcp/keyboard.json @@ -16,6 +16,9 @@ "pin": "B0" }, "rgblight": { + "default": { + "val": 128 + }, "saturation_steps": 8, "brightness_steps": 8, "led_count": 27, diff --git a/keyboards/hineybush/physix/keyboard.json b/keyboards/hineybush/physix/keyboard.json index b7b1c05393..79a0bea7ab 100644 --- a/keyboards/hineybush/physix/keyboard.json +++ b/keyboards/hineybush/physix/keyboard.json @@ -33,6 +33,10 @@ "pin": "B7", "breathing": true }, + "indicators": { + "caps_lock": "D3", + "scroll_lock": "D5" + }, "rgblight": { "saturation_steps": 8, "brightness_steps": 8, diff --git a/keyboards/hineybush/physix/physix.c b/keyboards/hineybush/physix/physix.c deleted file mode 100644 index cd920a72b3..0000000000 --- a/keyboards/hineybush/physix/physix.c +++ /dev/null @@ -1,49 +0,0 @@ -/* Copyright 2019 hineybush - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -#include "quantum.h" - -// Optional override functions below. -// You can leave any or all of these undefined. -// These are only required if you want to perform custom actions. - - -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - gpio_set_pin_output(D3); - gpio_set_pin_output(D5); - matrix_init_user(); -} - -bool led_update_kb(led_t led_state) { - // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here - bool res = led_update_user(led_state); - if(res) { - // gpio_write_pin sets the pin high for 1 and low for 0. - // In this example the pins are inverted, setting - // it low/0 turns it on, and high/1 turns the LED off. - // This behavior depends on whether the LED is between the pin - // and VCC or the pin and GND. - gpio_write_pin(D3, led_state.caps_lock); - gpio_write_pin(D5, led_state.scroll_lock); - } - return res; - return led_update_user(led_state); -} - - - diff --git a/keyboards/horrortroll/handwired_k552/config.h b/keyboards/horrortroll/handwired_k552/config.h index bc7924165d..44233133cb 100644 --- a/keyboards/horrortroll/handwired_k552/config.h +++ b/keyboards/horrortroll/handwired_k552/config.h @@ -39,5 +39,3 @@ /* Use the custom font */ #define OLED_FONT_H "lib/glcdfont.c" #endif - -#define RGB_MATRIX_LED_COUNT 24 diff --git a/keyboards/hotdox76v2/hotdox76v2.c b/keyboards/hotdox76v2/hotdox76v2.c index 57ed81b128..3ee5894107 100644 --- a/keyboards/hotdox76v2/hotdox76v2.c +++ b/keyboards/hotdox76v2/hotdox76v2.c @@ -248,13 +248,6 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) { return true; } -void matrix_scan_kb(void) { - if (!is_oled_on()) { - m2s.cur_alp_index = 1; - } - matrix_scan_user(); -} - void user_sync_alpa_slave_handler(uint8_t in_buflen, const void *in_data, uint8_t out_buflen, void *out_data) { const master_to_slave_t *m2s_p = (const master_to_slave_t *)in_data; s2m.cur_alp_index = m2s_p->cur_alp_index; @@ -270,6 +263,9 @@ void keyboard_post_init_kb(void) { void housekeeping_task_kb(void) { if (is_keyboard_master()) { + if (!is_oled_on()) { + m2s.cur_alp_index = 1; + } // Interact with slave every 200ms static uint32_t last_sync = 0; if (timer_elapsed32(last_sync) > 200) { @@ -281,7 +277,6 @@ void housekeeping_task_kb(void) { } } } - housekeeping_task_user(); } #endif diff --git a/keyboards/hotdox76v2/keyboard.json b/keyboards/hotdox76v2/keyboard.json index 30fd71f62a..438099827e 100644 --- a/keyboards/hotdox76v2/keyboard.json +++ b/keyboards/hotdox76v2/keyboard.json @@ -36,7 +36,9 @@ }, "split": { "enabled": true, - "soft_serial_pin": "D2", + "serial": { + "pin": "D2" + }, "transport": { "sync": { "indicators": true, diff --git a/keyboards/hs60/v1/ansi/ansi.c b/keyboards/hs60/v1/ansi/ansi.c new file mode 100644 index 0000000000..a1c04831a7 --- /dev/null +++ b/keyboards/hs60/v1/ansi/ansi.c @@ -0,0 +1,81 @@ +// Copyright 2024 QMK +// SPDX-License-Identifier: GPL-3.0-or-later + +#include "quantum.h" + +#ifdef RGB_MATRIX_ENABLE +const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = { +/* Refer to IS31 manual for these locations + * driver + * | R location + * | | G location + * | | | B location + * | | | | */ + {1, C1_7, C2_7, C3_7}, //C7 + {1, C1_6, C2_6, C3_6}, //C6 + {1, C1_5, C2_5, C3_5}, //C5 + {1, C1_4, C2_4, C3_4}, //C4 + {1, C1_3, C2_3, C3_3}, //C3 + {1, C1_2, C2_2, C4_3}, //C2 + {1, C1_1, C3_2, C4_2}, //C1 + {0, C1_7, C2_7, C3_7}, //A7 + {0, C1_6, C2_6, C3_6}, //A6 + {0, C1_5, C2_5, C3_5}, //A5 + {0, C1_4, C2_4, C3_4}, //A4 + {0, C1_3, C2_3, C3_3}, //A3 + {0, C1_2, C2_2, C4_3}, //A2 + {0, C1_1, C3_2, C4_2}, //A1 + + {1, C1_8, C2_8, C3_8}, //C8 + {1, C9_1, C8_1, C7_1}, //C9 + {1, C9_2, C8_2, C7_2}, //C10 + {1, C9_3, C8_3, C7_3}, //C11 + {1, C9_4, C8_4, C7_4}, //C12 + {1, C9_5, C8_5, C7_5}, //C13 + {1, C9_6, C8_6, C7_6}, //C14 + {0, C1_8, C2_8, C3_8}, //A8 + {0, C9_1, C8_1, C7_1}, //A9 + {0, C9_2, C8_2, C7_2}, //A10 + {0, C9_3, C8_3, C7_3}, //A11 + {0, C9_4, C8_4, C7_4}, //A12 + {0, C9_5, C8_5, C7_5}, //A13 + {0, C9_7, C8_7, C6_6}, //A15 + + {1, C1_12, C2_12, C3_12}, //D4 + {1, C1_13, C2_13, C3_13}, //D5 + {1, C1_14, C2_14, C3_14}, //D6 + {1, C1_15, C2_15, C3_15}, //D7 + {1, C1_16, C2_16, C3_16}, //D8 + {1, C9_8, C7_7, C6_7}, //C16 + {1, C9_7, C8_7, C6_6}, //C15 + {0, C1_13, C2_13, C3_13}, //B5 + {0, C1_14, C2_14, C3_14}, //B6 + {0, C1_15, C2_15, C3_15}, //B7 + {0, C1_16, C2_16, C3_16}, //B8 + {0, C9_8, C7_7, C6_7}, //A16 + {0, C9_6, C8_6, C7_6}, //A14 + + {1, C1_11, C2_11, C3_11}, //D3 + {1, C1_9, C3_10, C4_10}, //D1 + {1, C9_9, C8_9, C7_9}, //D9 + {1, C9_10, C8_10, C7_10}, //D10 + {1, C9_11, C8_11, C7_11}, //D11 + {1, C9_12, C8_12, C7_12}, //D12 + {0, C1_12, C2_12, C3_12}, //B4 + {0, C1_11, C2_11, C3_11}, //B3 + {0, C1_10, C2_10, C4_11}, //B2 + {0, C1_9, C3_10, C4_10}, //B1 + {0, C9_9, C8_9, C7_9}, //B9 + {0, C9_10, C8_10, C7_10}, //B10 + + {1, C9_16, C7_15, C6_15}, //D16 + {1, C9_15, C8_15, C6_14}, //D15 + {1, C9_14, C8_14, C7_14}, //D14 + {1, C9_13, C8_13, C7_13}, //D13 + {0, C9_14, C8_14, C7_14}, //B14 + {0, C9_13, C8_13, C7_13}, //B13 + {0, C9_12, C8_12, C7_12}, //B12 + {0, C9_11, C8_11, C7_11} //B11 +}; + +#endif diff --git a/keyboards/hs60/v1/ansi/keyboard.json b/keyboards/hs60/v1/ansi/keyboard.json new file mode 100644 index 0000000000..8512aa176d --- /dev/null +++ b/keyboards/hs60/v1/ansi/keyboard.json @@ -0,0 +1,143 @@ +{ + "rgb_matrix": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}, + {"matrix": [0, 1], "x": 16, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 32, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 48, "y": 0, "flags": 4}, + {"matrix": [0, 4], "x": 64, "y": 0, "flags": 4}, + {"matrix": [0, 5], "x": 80, "y": 0, "flags": 4}, + {"matrix": [0, 6], "x": 96, "y": 0, "flags": 4}, + {"matrix": [0, 7], "x": 112, "y": 0, "flags": 4}, + {"matrix": [0, 8], "x": 128, "y": 0, "flags": 4}, + {"matrix": [0, 9], "x": 144, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 160, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 176, "y": 0, "flags": 4}, + {"matrix": [0, 12], "x": 192, "y": 0, "flags": 4}, + {"matrix": [0, 13], "x": 216, "y": 0, "flags": 1}, + + {"matrix": [1, 0], "x": 4, "y": 16, "flags": 1}, + {"matrix": [1, 1], "x": 24, "y": 16, "flags": 4}, + {"matrix": [1, 2], "x": 40, "y": 16, "flags": 4}, + {"matrix": [1, 3], "x": 56, "y": 16, "flags": 4}, + {"matrix": [1, 4], "x": 72, "y": 16, "flags": 4}, + {"matrix": [1, 5], "x": 88, "y": 16, "flags": 4}, + {"matrix": [1, 6], "x": 104, "y": 16, "flags": 4}, + {"matrix": [1, 7], "x": 120, "y": 16, "flags": 4}, + {"matrix": [1, 8], "x": 136, "y": 16, "flags": 4}, + {"matrix": [1, 9], "x": 152, "y": 16, "flags": 4}, + {"matrix": [1, 10], "x": 168, "y": 16, "flags": 4}, + {"matrix": [1, 11], "x": 184, "y": 16, "flags": 4}, + {"matrix": [1, 12], "x": 200, "y": 16, "flags": 4}, + {"matrix": [2, 12], "x": 220, "y": 16, "flags": 4}, + + {"matrix": [2, 0], "x": 6, "y": 32, "flags": 1}, + {"matrix": [2, 1], "x": 28, "y": 32, "flags": 4}, + {"matrix": [2, 2], "x": 44, "y": 32, "flags": 4}, + {"matrix": [2, 3], "x": 60, "y": 32, "flags": 4}, + {"matrix": [2, 4], "x": 76, "y": 32, "flags": 4}, + {"matrix": [2, 5], "x": 92, "y": 32, "flags": 4}, + {"matrix": [2, 6], "x": 108, "y": 32, "flags": 4}, + {"matrix": [2, 7], "x": 124, "y": 32, "flags": 4}, + {"matrix": [2, 8], "x": 140, "y": 32, "flags": 4}, + {"matrix": [2, 9], "x": 156, "y": 32, "flags": 4}, + {"matrix": [2, 10], "x": 172, "y": 32, "flags": 4}, + {"matrix": [2, 11], "x": 188, "y": 32, "flags": 4}, + {"matrix": [2, 13], "x": 214, "y": 32, "flags": 1}, + + {"matrix": [3, 0], "x": 10, "y": 48, "flags": 1}, + {"matrix": [3, 2], "x": 36, "y": 48, "flags": 4}, + {"matrix": [3, 3], "x": 52, "y": 48, "flags": 4}, + {"matrix": [3, 4], "x": 68, "y": 48, "flags": 4}, + {"matrix": [3, 5], "x": 84, "y": 48, "flags": 4}, + {"matrix": [3, 6], "x": 100, "y": 48, "flags": 4}, + {"matrix": [3, 7], "x": 116, "y": 48, "flags": 4}, + {"matrix": [3, 8], "x": 132, "y": 48, "flags": 4}, + {"matrix": [3, 9], "x": 148, "y": 48, "flags": 4}, + {"matrix": [3, 10], "x": 164, "y": 48, "flags": 4}, + {"matrix": [3, 11], "x": 180, "y": 48, "flags": 4}, + {"matrix": [3, 13], "x": 210, "y": 48, "flags": 1}, + + {"matrix": [4, 0], "x": 2, "y": 64, "flags": 1}, + {"matrix": [4, 1], "x": 22, "y": 64, "flags": 1}, + {"matrix": [4, 2], "x": 42, "y": 64, "flags": 1}, + {"matrix": [4, 6], "x": 102, "y": 64, "flags": 4}, + {"matrix": [4, 10], "x": 162, "y": 64, "flags": 1}, + {"matrix": [4, 11], "x": 182, "y": 64, "flags": 1}, + {"matrix": [4, 12], "x": 202, "y": 64, "flags": 1}, + {"matrix": [4, 13], "x": 222, "y": 64, "flags": 1} + ] + }, + "community_layouts": ["60_ansi"], + "layouts": { + "LAYOUT_60_ansi": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0}, + {"matrix": [0, 1], "x": 1, "y": 0}, + {"matrix": [0, 2], "x": 2, "y": 0}, + {"matrix": [0, 3], "x": 3, "y": 0}, + {"matrix": [0, 4], "x": 4, "y": 0}, + {"matrix": [0, 5], "x": 5, "y": 0}, + {"matrix": [0, 6], "x": 6, "y": 0}, + {"matrix": [0, 7], "x": 7, "y": 0}, + {"matrix": [0, 8], "x": 8, "y": 0}, + {"matrix": [0, 9], "x": 9, "y": 0}, + {"matrix": [0, 10], "x": 10, "y": 0}, + {"matrix": [0, 11], "x": 11, "y": 0}, + {"matrix": [0, 12], "x": 12, "y": 0}, + {"matrix": [0, 13], "x": 13, "y": 0, "w": 2}, + + {"matrix": [1, 0], "x": 0, "y": 1, "w": 1.5}, + {"matrix": [1, 1], "x": 1.5, "y": 1}, + {"matrix": [1, 2], "x": 2.5, "y": 1}, + {"matrix": [1, 3], "x": 3.5, "y": 1}, + {"matrix": [1, 4], "x": 4.5, "y": 1}, + {"matrix": [1, 5], "x": 5.5, "y": 1}, + {"matrix": [1, 6], "x": 6.5, "y": 1}, + {"matrix": [1, 7], "x": 7.5, "y": 1}, + {"matrix": [1, 8], "x": 8.5, "y": 1}, + {"matrix": [1, 9], "x": 9.5, "y": 1}, + {"matrix": [1, 10], "x": 10.5, "y": 1}, + {"matrix": [1, 11], "x": 11.5, "y": 1}, + {"matrix": [1, 12], "x": 12.5, "y": 1}, + {"matrix": [2, 12], "x": 13.5, "y": 1, "w": 1.5}, + + {"matrix": [2, 0], "x": 0, "y": 2, "w": 1.75}, + {"matrix": [2, 1], "x": 1.75, "y": 2}, + {"matrix": [2, 2], "x": 2.75, "y": 2}, + {"matrix": [2, 3], "x": 3.75, "y": 2}, + {"matrix": [2, 4], "x": 4.75, "y": 2}, + {"matrix": [2, 5], "x": 5.75, "y": 2}, + {"matrix": [2, 6], "x": 6.75, "y": 2}, + {"matrix": [2, 7], "x": 7.75, "y": 2}, + {"matrix": [2, 8], "x": 8.75, "y": 2}, + {"matrix": [2, 9], "x": 9.75, "y": 2}, + {"matrix": [2, 10], "x": 10.75, "y": 2}, + {"matrix": [2, 11], "x": 11.75, "y": 2}, + {"matrix": [2, 13], "x": 12.75, "y": 2, "w": 2.25}, + + {"matrix": [3, 0], "x": 0, "y": 3, "w": 2.25}, + {"matrix": [3, 2], "x": 2.25, "y": 3}, + {"matrix": [3, 3], "x": 3.25, "y": 3}, + {"matrix": [3, 4], "x": 4.25, "y": 3}, + {"matrix": [3, 5], "x": 5.25, "y": 3}, + {"matrix": [3, 6], "x": 6.25, "y": 3}, + {"matrix": [3, 7], "x": 7.25, "y": 3}, + {"matrix": [3, 8], "x": 8.25, "y": 3}, + {"matrix": [3, 9], "x": 9.25, "y": 3}, + {"matrix": [3, 10], "x": 10.25, "y": 3}, + {"matrix": [3, 11], "x": 11.25, "y": 3}, + {"matrix": [3, 13], "x": 12.25, "y": 3, "w": 2.75}, + + {"matrix": [4, 0], "x": 0, "y": 4, "w": 1.25}, + {"matrix": [4, 1], "x": 1.25, "y": 4, "w": 1.25}, + {"matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.25}, + {"matrix": [4, 6], "x": 3.75, "y": 4, "w": 6.25}, + {"matrix": [4, 10], "x": 10, "y": 4, "w": 1.25}, + {"matrix": [4, 11], "x": 11.25, "y": 4, "w": 1.25}, + {"matrix": [4, 12], "x": 12.5, "y": 4, "w": 1.25}, + {"matrix": [4, 13], "x": 13.75, "y": 4, "w": 1.25} + ] + } + } +} diff --git a/keyboards/hs60/v1/keymaps/ansi/keymap.c b/keyboards/hs60/v1/ansi/keymaps/default/keymap.c index 3d52fe4d52..3d52fe4d52 100644 --- a/keyboards/hs60/v1/keymaps/ansi/keymap.c +++ b/keyboards/hs60/v1/ansi/keymaps/default/keymap.c diff --git a/keyboards/hs60/v1/keymaps/ansi/readme.md b/keyboards/hs60/v1/ansi/keymaps/default/readme.md index fa811319d3..fa811319d3 100644 --- a/keyboards/hs60/v1/keymaps/ansi/readme.md +++ b/keyboards/hs60/v1/ansi/keymaps/default/readme.md diff --git a/keyboards/hs60/v1/rules.mk b/keyboards/hs60/v1/ansi/rules.mk index 5cde06a483..5cde06a483 100644 --- a/keyboards/hs60/v1/rules.mk +++ b/keyboards/hs60/v1/ansi/rules.mk diff --git a/keyboards/hs60/v1/config.h b/keyboards/hs60/v1/config.h index 1bbc88ac1d..3c4f470d8a 100644 --- a/keyboards/hs60/v1/config.h +++ b/keyboards/hs60/v1/config.h @@ -17,22 +17,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* - * Feature disable options - * These options are also useful to firmware size reduction. - */ - -/* disable debug print */ -//#define NO_DEBUG - -/* disable print */ -//#define NO_PRINT - #define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND #define IS31FL3731_I2C_ADDRESS_2 IS31FL3731_I2C_ADDRESS_SCL - -#ifdef HS60_ANSI -#define RGB_MATRIX_LED_COUNT 61 -#else -#define RGB_MATRIX_LED_COUNT 62 -#endif diff --git a/keyboards/hs60/v1/info.json b/keyboards/hs60/v1/info.json new file mode 100644 index 0000000000..c6ebae97ce --- /dev/null +++ b/keyboards/hs60/v1/info.json @@ -0,0 +1,85 @@ +{ + "keyboard_name": "HS60", + "manufacturer": "Yiancar-Designs", + "url": "", + "maintainer": "qmk", + "usb": { + "vid": "0xFEED", + "pid": "0x0257", + "device_version": "0.0.1" + }, + "rgb_matrix": { + "animations": { + "alphas_mods": true, + "gradient_up_down": true, + "gradient_left_right": true, + "breathing": true, + "band_sat": true, + "band_val": true, + "band_pinwheel_sat": true, + "band_pinwheel_val": true, + "band_spiral_sat": true, + "band_spiral_val": true, + "cycle_all": true, + "cycle_left_right": true, + "cycle_up_down": true, + "rainbow_moving_chevron": true, + "cycle_out_in": true, + "cycle_out_in_dual": true, + "cycle_pinwheel": true, + "cycle_spiral": true, + "dual_beacon": true, + "rainbow_beacon": true, + "rainbow_pinwheels": true, + "raindrops": true, + "jellybean_raindrops": true, + "hue_breathing": true, + "hue_pendulum": true, + "hue_wave": true, + "pixel_rain": true, + "pixel_flow": true, + "pixel_fractal": true, + "typing_heatmap": true, + "digital_rain": true, + "solid_reactive_simple": true, + "solid_reactive": true, + "solid_reactive_wide": true, + "solid_reactive_multiwide": true, + "solid_reactive_cross": true, + "solid_reactive_multicross": true, + "solid_reactive_nexus": true, + "solid_reactive_multinexus": true, + "splash": true, + "multisplash": true, + "solid_splash": true, + "solid_multisplash": true + }, + "driver": "is31fl3731", + "max_brightness": 215, + "sleep": true + }, + "matrix_pins": { + "cols": ["F1", "F4", "F5", "E6", "F0", "B7", "D2", "D3", "D5", "D4", "D6", "D7", "B4", "B5"], + "rows": ["B0", "B1", "B2", "B3", "F7"] + }, + "diode_direction": "COL2ROW", + "qmk_lufa_bootloader": { + "esc_input": "B2", + "esc_output": "B5" + }, + "processor": "atmega32u4", + "bootloader": "qmk-dfu", + "features": { + "bootmagic": false, + "mousekey": false, + "extrakey": true, + "nkro": true, + "rgb_matrix": true + }, + "qmk": { + "locking": { + "enabled": true, + "resync": true + } + } +} diff --git a/keyboards/hs60/v1/iso/iso.c b/keyboards/hs60/v1/iso/iso.c new file mode 100644 index 0000000000..f1f5ad7240 --- /dev/null +++ b/keyboards/hs60/v1/iso/iso.c @@ -0,0 +1,81 @@ +// Copyright 2024 QMK +// SPDX-License-Identifier: GPL-3.0-or-later + +#include "quantum.h" + +#ifdef RGB_MATRIX_ENABLE +const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = { +/* Refer to IS31 manual for these locations + * driver + * | R location + * | | G location + * | | | B location + * | | | | */ + {1, C1_7, C2_7, C3_7}, //C7 + {1, C1_6, C2_6, C3_6}, //C6 + {1, C1_5, C2_5, C3_5}, //C5 + {1, C1_4, C2_4, C3_4}, //C4 + {1, C1_3, C2_3, C3_3}, //C3 + {1, C1_2, C2_2, C4_3}, //C2 + {1, C1_1, C3_2, C4_2}, //C1 + {0, C1_7, C2_7, C3_7}, //A7 + {0, C1_6, C2_6, C3_6}, //A6 + {0, C1_5, C2_5, C3_5}, //A5 + {0, C1_4, C2_4, C3_4}, //A4 + {0, C1_3, C2_3, C3_3}, //A3 + {0, C1_2, C2_2, C4_3}, //A2 + {0, C1_1, C3_2, C4_2}, //A1 + + {1, C1_8, C2_8, C3_8}, //C8 + {1, C9_1, C8_1, C7_1}, //C9 + {1, C9_2, C8_2, C7_2}, //C10 + {1, C9_3, C8_3, C7_3}, //C11 + {1, C9_4, C8_4, C7_4}, //C12 + {1, C9_5, C8_5, C7_5}, //C13 + {1, C9_6, C8_6, C7_6}, //C14 + {0, C1_8, C2_8, C3_8}, //A8 + {0, C9_1, C8_1, C7_1}, //A9 + {0, C9_2, C8_2, C7_2}, //A10 + {0, C9_3, C8_3, C7_3}, //A11 + {0, C9_4, C8_4, C7_4}, //A12 + {0, C9_5, C8_5, C7_5}, //A13 + + {1, C1_12, C2_12, C3_12}, //D4 + {1, C1_13, C2_13, C3_13}, //D5 + {1, C1_14, C2_14, C3_14}, //D6 + {1, C1_15, C2_15, C3_15}, //D7 + {1, C1_16, C2_16, C3_16}, //D8 + {1, C9_8, C7_7, C6_7}, //C16 + {1, C9_7, C8_7, C6_6}, //C15 + {0, C1_13, C2_13, C3_13}, //B5 + {0, C1_14, C2_14, C3_14}, //B6 + {0, C1_15, C2_15, C3_15}, //B7 + {0, C1_16, C2_16, C3_16}, //B8 + {0, C9_8, C7_7, C6_7}, //A16 + {0, C9_7, C8_7, C6_6}, //A15 + {0, C9_6, C8_6, C7_6}, //A14 + + {1, C1_11, C2_11, C3_11}, //D3 + {1, C1_10, C2_10, C4_11}, //D2 + {1, C1_9, C3_10, C4_10}, //D1 + {1, C9_9, C8_9, C7_9}, //D9 + {1, C9_10, C8_10, C7_10}, //D10 + {1, C9_11, C8_11, C7_11}, //D11 + {1, C9_12, C8_12, C7_12}, //D12 + {0, C1_12, C2_12, C3_12}, //B4 + {0, C1_11, C2_11, C3_11}, //B3 + {0, C1_10, C2_10, C4_11}, //B2 + {0, C1_9, C3_10, C4_10}, //B1 + {0, C9_9, C8_9, C7_9}, //B9 + {0, C9_10, C8_10, C7_10}, //B10 + + {1, C9_16, C7_15, C6_15}, //D16 + {1, C9_15, C8_15, C6_14}, //D15 + {1, C9_14, C8_14, C7_14}, //D14 + {1, C9_13, C8_13, C7_13}, //D13 + {0, C9_14, C8_14, C7_14}, //B14 + {0, C9_13, C8_13, C7_13}, //B13 + {0, C9_12, C8_12, C7_12}, //B12 + {0, C9_11, C8_11, C7_11} //B11 +}; +#endif diff --git a/keyboards/hs60/v1/iso/keyboard.json b/keyboards/hs60/v1/iso/keyboard.json new file mode 100644 index 0000000000..b83de6627c --- /dev/null +++ b/keyboards/hs60/v1/iso/keyboard.json @@ -0,0 +1,145 @@ +{ + "rgb_matrix": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}, + {"matrix": [0, 1], "x": 16, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 32, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 48, "y": 0, "flags": 4}, + {"matrix": [0, 4], "x": 64, "y": 0, "flags": 4}, + {"matrix": [0, 5], "x": 80, "y": 0, "flags": 4}, + {"matrix": [0, 6], "x": 96, "y": 0, "flags": 4}, + {"matrix": [0, 7], "x": 112, "y": 0, "flags": 4}, + {"matrix": [0, 8], "x": 128, "y": 0, "flags": 4}, + {"matrix": [0, 9], "x": 144, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 160, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 176, "y": 0, "flags": 4}, + {"matrix": [0, 12], "x": 192, "y": 0, "flags": 4}, + {"matrix": [0, 13], "x": 216, "y": 0, "flags": 1}, + + {"matrix": [1, 0], "x": 4, "y": 16, "flags": 1}, + {"matrix": [1, 1], "x": 24, "y": 16, "flags": 4}, + {"matrix": [1, 2], "x": 40, "y": 16, "flags": 4}, + {"matrix": [1, 3], "x": 56, "y": 16, "flags": 4}, + {"matrix": [1, 4], "x": 72, "y": 16, "flags": 4}, + {"matrix": [1, 5], "x": 88, "y": 16, "flags": 4}, + {"matrix": [1, 6], "x": 104, "y": 16, "flags": 4}, + {"matrix": [1, 7], "x": 120, "y": 16, "flags": 4}, + {"matrix": [1, 8], "x": 136, "y": 16, "flags": 4}, + {"matrix": [1, 9], "x": 152, "y": 16, "flags": 4}, + {"matrix": [1, 10], "x": 168, "y": 16, "flags": 4}, + {"matrix": [1, 11], "x": 184, "y": 16, "flags": 4}, + {"matrix": [1, 12], "x": 200, "y": 16, "flags": 4}, + + {"matrix": [2, 0], "x": 6, "y": 32, "flags": 1}, + {"matrix": [2, 1], "x": 28, "y": 32, "flags": 4}, + {"matrix": [2, 2], "x": 44, "y": 32, "flags": 4}, + {"matrix": [2, 3], "x": 60, "y": 32, "flags": 4}, + {"matrix": [2, 4], "x": 76, "y": 32, "flags": 4}, + {"matrix": [2, 5], "x": 92, "y": 32, "flags": 4}, + {"matrix": [2, 6], "x": 108, "y": 32, "flags": 4}, + {"matrix": [2, 7], "x": 124, "y": 32, "flags": 4}, + {"matrix": [2, 8], "x": 140, "y": 32, "flags": 4}, + {"matrix": [2, 9], "x": 156, "y": 32, "flags": 4}, + {"matrix": [2, 10], "x": 172, "y": 32, "flags": 4}, + {"matrix": [2, 11], "x": 188, "y": 32, "flags": 4}, + {"matrix": [2, 12], "x": 204, "y": 32, "flags": 4}, + {"matrix": [2, 13], "x": 222, "y": 24, "flags": 1}, + + {"matrix": [3, 0], "x": 2, "y": 48, "flags": 1}, + {"matrix": [3, 1], "x": 20, "y": 48, "flags": 4}, + {"matrix": [3, 2], "x": 36, "y": 48, "flags": 4}, + {"matrix": [3, 3], "x": 52, "y": 48, "flags": 4}, + {"matrix": [3, 4], "x": 68, "y": 48, "flags": 4}, + {"matrix": [3, 5], "x": 84, "y": 48, "flags": 4}, + {"matrix": [3, 6], "x": 100, "y": 48, "flags": 4}, + {"matrix": [3, 7], "x": 116, "y": 48, "flags": 4}, + {"matrix": [3, 8], "x": 132, "y": 48, "flags": 4}, + {"matrix": [3, 9], "x": 148, "y": 48, "flags": 4}, + {"matrix": [3, 10], "x": 164, "y": 48, "flags": 4}, + {"matrix": [3, 11], "x": 180, "y": 48, "flags": 4}, + {"matrix": [3, 13], "x": 210, "y": 48, "flags": 1}, + + {"matrix": [4, 0], "x": 2, "y": 64, "flags": 1}, + {"matrix": [4, 1], "x": 22, "y": 64, "flags": 1}, + {"matrix": [4, 2], "x": 42, "y": 64, "flags": 1}, + {"matrix": [4, 6], "x": 102, "y": 64, "flags": 4}, + {"matrix": [4, 10], "x": 162, "y": 64, "flags": 1}, + {"matrix": [4, 11], "x": 182, "y": 64, "flags": 1}, + {"matrix": [4, 12], "x": 202, "y": 64, "flags": 1}, + {"matrix": [4, 13], "x": 222, "y": 64, "flags": 1} + ] + }, + "community_layouts": ["60_iso"], + "layouts": { + "LAYOUT_60_iso": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0}, + {"matrix": [0, 1], "x": 1, "y": 0}, + {"matrix": [0, 2], "x": 2, "y": 0}, + {"matrix": [0, 3], "x": 3, "y": 0}, + {"matrix": [0, 4], "x": 4, "y": 0}, + {"matrix": [0, 5], "x": 5, "y": 0}, + {"matrix": [0, 6], "x": 6, "y": 0}, + {"matrix": [0, 7], "x": 7, "y": 0}, + {"matrix": [0, 8], "x": 8, "y": 0}, + {"matrix": [0, 9], "x": 9, "y": 0}, + {"matrix": [0, 10], "x": 10, "y": 0}, + {"matrix": [0, 11], "x": 11, "y": 0}, + {"matrix": [0, 12], "x": 12, "y": 0}, + {"matrix": [0, 13], "x": 13, "y": 0, "w": 2}, + + {"matrix": [1, 0], "x": 0, "y": 1, "w": 1.5}, + {"matrix": [1, 1], "x": 1.5, "y": 1}, + {"matrix": [1, 2], "x": 2.5, "y": 1}, + {"matrix": [1, 3], "x": 3.5, "y": 1}, + {"matrix": [1, 4], "x": 4.5, "y": 1}, + {"matrix": [1, 5], "x": 5.5, "y": 1}, + {"matrix": [1, 6], "x": 6.5, "y": 1}, + {"matrix": [1, 7], "x": 7.5, "y": 1}, + {"matrix": [1, 8], "x": 8.5, "y": 1}, + {"matrix": [1, 9], "x": 9.5, "y": 1}, + {"matrix": [1, 10], "x": 10.5, "y": 1}, + {"matrix": [1, 11], "x": 11.5, "y": 1}, + {"matrix": [1, 12], "x": 12.5, "y": 1}, + + {"matrix": [2, 0], "x": 0, "y": 2, "w": 1.75}, + {"matrix": [2, 1], "x": 1.75, "y": 2}, + {"matrix": [2, 2], "x": 2.75, "y": 2}, + {"matrix": [2, 3], "x": 3.75, "y": 2}, + {"matrix": [2, 4], "x": 4.75, "y": 2}, + {"matrix": [2, 5], "x": 5.75, "y": 2}, + {"matrix": [2, 6], "x": 6.75, "y": 2}, + {"matrix": [2, 7], "x": 7.75, "y": 2}, + {"matrix": [2, 8], "x": 8.75, "y": 2}, + {"matrix": [2, 9], "x": 9.75, "y": 2}, + {"matrix": [2, 10], "x": 10.75, "y": 2}, + {"matrix": [2, 11], "x": 11.75, "y": 2}, + {"matrix": [2, 12], "x": 12.75, "y": 2}, + {"matrix": [2, 13], "x": 13.75, "y": 1, "w": 1.25, "h": 2}, + + {"matrix": [3, 0], "x": 0, "y": 3, "w": 1.25}, + {"matrix": [3, 1], "x": 1.25, "y": 3}, + {"matrix": [3, 2], "x": 2.25, "y": 3}, + {"matrix": [3, 3], "x": 3.25, "y": 3}, + {"matrix": [3, 4], "x": 4.25, "y": 3}, + {"matrix": [3, 5], "x": 5.25, "y": 3}, + {"matrix": [3, 6], "x": 6.25, "y": 3}, + {"matrix": [3, 7], "x": 7.25, "y": 3}, + {"matrix": [3, 8], "x": 8.25, "y": 3}, + {"matrix": [3, 9], "x": 9.25, "y": 3}, + {"matrix": [3, 10], "x": 10.25, "y": 3}, + {"matrix": [3, 11], "x": 11.25, "y": 3}, + {"matrix": [3, 13], "x": 12.25, "y": 3, "w": 2.75}, + + {"matrix": [4, 0], "x": 0, "y": 4, "w": 1.25}, + {"matrix": [4, 1], "x": 1.25, "y": 4, "w": 1.25}, + {"matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.25}, + {"matrix": [4, 6], "x": 3.75, "y": 4, "w": 6.25}, + {"matrix": [4, 10], "x": 10, "y": 4, "w": 1.25}, + {"matrix": [4, 11], "x": 11.25, "y": 4, "w": 1.25}, + {"matrix": [4, 12], "x": 12.5, "y": 4, "w": 1.25}, + {"matrix": [4, 13], "x": 13.75, "y": 4, "w": 1.25} + ] + } + } +} diff --git a/keyboards/hs60/v1/keymaps/default/keymap.c b/keyboards/hs60/v1/iso/keymaps/default/keymap.c index 5059aabe20..5059aabe20 100644 --- a/keyboards/hs60/v1/keymaps/default/keymap.c +++ b/keyboards/hs60/v1/iso/keymaps/default/keymap.c diff --git a/keyboards/hs60/v1/keymaps/default/readme.md b/keyboards/hs60/v1/iso/keymaps/default/readme.md index 9125cb349e..9125cb349e 100644 --- a/keyboards/hs60/v1/keymaps/default/readme.md +++ b/keyboards/hs60/v1/iso/keymaps/default/readme.md diff --git a/keyboards/hs60/v1/iso/rules.mk b/keyboards/hs60/v1/iso/rules.mk new file mode 100644 index 0000000000..5cde06a483 --- /dev/null +++ b/keyboards/hs60/v1/iso/rules.mk @@ -0,0 +1,4 @@ +# Do not put the microcontroller into power saving mode +# when we get USB suspend event. We want it to keep updating +# backlight effects. +NO_SUSPEND_POWER_DOWN = yes diff --git a/keyboards/hs60/v1/keyboard.json b/keyboards/hs60/v1/keyboard.json deleted file mode 100644 index f4a05dfe27..0000000000 --- a/keyboards/hs60/v1/keyboard.json +++ /dev/null @@ -1,226 +0,0 @@ -{ - "keyboard_name": "HS60", - "manufacturer": "Yiancar-Designs", - "url": "", - "maintainer": "qmk", - "usb": { - "vid": "0xFEED", - "pid": "0x0257", - "device_version": "0.0.1" - }, - "rgb_matrix": { - "animations": { - "alphas_mods": true, - "gradient_up_down": true, - "gradient_left_right": true, - "breathing": true, - "band_sat": true, - "band_val": true, - "band_pinwheel_sat": true, - "band_pinwheel_val": true, - "band_spiral_sat": true, - "band_spiral_val": true, - "cycle_all": true, - "cycle_left_right": true, - "cycle_up_down": true, - "rainbow_moving_chevron": true, - "cycle_out_in": true, - "cycle_out_in_dual": true, - "cycle_pinwheel": true, - "cycle_spiral": true, - "dual_beacon": true, - "rainbow_beacon": true, - "rainbow_pinwheels": true, - "raindrops": true, - "jellybean_raindrops": true, - "hue_breathing": true, - "hue_pendulum": true, - "hue_wave": true, - "pixel_rain": true, - "pixel_flow": true, - "pixel_fractal": true, - "typing_heatmap": true, - "digital_rain": true, - "solid_reactive_simple": true, - "solid_reactive": true, - "solid_reactive_wide": true, - "solid_reactive_multiwide": true, - "solid_reactive_cross": true, - "solid_reactive_multicross": true, - "solid_reactive_nexus": true, - "solid_reactive_multinexus": true, - "splash": true, - "multisplash": true, - "solid_splash": true, - "solid_multisplash": true - }, - "driver": "is31fl3731", - "max_brightness": 215 - }, - "matrix_pins": { - "cols": ["F1", "F4", "F5", "E6", "F0", "B7", "D2", "D3", "D5", "D4", "D6", "D7", "B4", "B5"], - "rows": ["B0", "B1", "B2", "B3", "F7"] - }, - "diode_direction": "COL2ROW", - "qmk_lufa_bootloader": { - "esc_input": "B2", - "esc_output": "B5" - }, - "processor": "atmega32u4", - "bootloader": "qmk-dfu", - "features": { - "bootmagic": false, - "mousekey": false, - "extrakey": true, - "nkro": true, - "rgb_matrix": true - }, - "qmk": { - "locking": { - "enabled": true, - "resync": true - } - }, - "community_layouts": ["60_ansi", "60_iso"], - "layouts": { - "LAYOUT_60_iso": { - "layout": [ - {"matrix": [0, 0], "x": 0, "y": 0}, - {"matrix": [0, 1], "x": 1, "y": 0}, - {"matrix": [0, 2], "x": 2, "y": 0}, - {"matrix": [0, 3], "x": 3, "y": 0}, - {"matrix": [0, 4], "x": 4, "y": 0}, - {"matrix": [0, 5], "x": 5, "y": 0}, - {"matrix": [0, 6], "x": 6, "y": 0}, - {"matrix": [0, 7], "x": 7, "y": 0}, - {"matrix": [0, 8], "x": 8, "y": 0}, - {"matrix": [0, 9], "x": 9, "y": 0}, - {"matrix": [0, 10], "x": 10, "y": 0}, - {"matrix": [0, 11], "x": 11, "y": 0}, - {"matrix": [0, 12], "x": 12, "y": 0}, - {"matrix": [0, 13], "x": 13, "y": 0, "w": 2}, - - {"matrix": [1, 0], "x": 0, "y": 1, "w": 1.5}, - {"matrix": [1, 1], "x": 1.5, "y": 1}, - {"matrix": [1, 2], "x": 2.5, "y": 1}, - {"matrix": [1, 3], "x": 3.5, "y": 1}, - {"matrix": [1, 4], "x": 4.5, "y": 1}, - {"matrix": [1, 5], "x": 5.5, "y": 1}, - {"matrix": [1, 6], "x": 6.5, "y": 1}, - {"matrix": [1, 7], "x": 7.5, "y": 1}, - {"matrix": [1, 8], "x": 8.5, "y": 1}, - {"matrix": [1, 9], "x": 9.5, "y": 1}, - {"matrix": [1, 10], "x": 10.5, "y": 1}, - {"matrix": [1, 11], "x": 11.5, "y": 1}, - {"matrix": [1, 12], "x": 12.5, "y": 1}, - - {"matrix": [2, 0], "x": 0, "y": 2, "w": 1.75}, - {"matrix": [2, 1], "x": 1.75, "y": 2}, - {"matrix": [2, 2], "x": 2.75, "y": 2}, - {"matrix": [2, 3], "x": 3.75, "y": 2}, - {"matrix": [2, 4], "x": 4.75, "y": 2}, - {"matrix": [2, 5], "x": 5.75, "y": 2}, - {"matrix": [2, 6], "x": 6.75, "y": 2}, - {"matrix": [2, 7], "x": 7.75, "y": 2}, - {"matrix": [2, 8], "x": 8.75, "y": 2}, - {"matrix": [2, 9], "x": 9.75, "y": 2}, - {"matrix": [2, 10], "x": 10.75, "y": 2}, - {"matrix": [2, 11], "x": 11.75, "y": 2}, - {"matrix": [2, 12], "x": 12.75, "y": 2}, - {"matrix": [2, 13], "x": 13.75, "y": 1, "w": 1.25, "h": 2}, - - {"matrix": [3, 0], "x": 0, "y": 3, "w": 1.25}, - {"matrix": [3, 1], "x": 1.25, "y": 3}, - {"matrix": [3, 2], "x": 2.25, "y": 3}, - {"matrix": [3, 3], "x": 3.25, "y": 3}, - {"matrix": [3, 4], "x": 4.25, "y": 3}, - {"matrix": [3, 5], "x": 5.25, "y": 3}, - {"matrix": [3, 6], "x": 6.25, "y": 3}, - {"matrix": [3, 7], "x": 7.25, "y": 3}, - {"matrix": [3, 8], "x": 8.25, "y": 3}, - {"matrix": [3, 9], "x": 9.25, "y": 3}, - {"matrix": [3, 10], "x": 10.25, "y": 3}, - {"matrix": [3, 11], "x": 11.25, "y": 3}, - {"matrix": [3, 13], "x": 12.25, "y": 3, "w": 2.75}, - - {"matrix": [4, 0], "x": 0, "y": 4, "w": 1.25}, - {"matrix": [4, 1], "x": 1.25, "y": 4, "w": 1.25}, - {"matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.25}, - {"matrix": [4, 6], "x": 3.75, "y": 4, "w": 6.25}, - {"matrix": [4, 10], "x": 10, "y": 4, "w": 1.25}, - {"matrix": [4, 11], "x": 11.25, "y": 4, "w": 1.25}, - {"matrix": [4, 12], "x": 12.5, "y": 4, "w": 1.25}, - {"matrix": [4, 13], "x": 13.75, "y": 4, "w": 1.25} - ] - }, - "LAYOUT_60_ansi": { - "layout": [ - {"matrix": [0, 0], "x": 0, "y": 0}, - {"matrix": [0, 1], "x": 1, "y": 0}, - {"matrix": [0, 2], "x": 2, "y": 0}, - {"matrix": [0, 3], "x": 3, "y": 0}, - {"matrix": [0, 4], "x": 4, "y": 0}, - {"matrix": [0, 5], "x": 5, "y": 0}, - {"matrix": [0, 6], "x": 6, "y": 0}, - {"matrix": [0, 7], "x": 7, "y": 0}, - {"matrix": [0, 8], "x": 8, "y": 0}, - {"matrix": [0, 9], "x": 9, "y": 0}, - {"matrix": [0, 10], "x": 10, "y": 0}, - {"matrix": [0, 11], "x": 11, "y": 0}, - {"matrix": [0, 12], "x": 12, "y": 0}, - {"matrix": [0, 13], "x": 13, "y": 0, "w": 2}, - - {"matrix": [1, 0], "x": 0, "y": 1, "w": 1.5}, - {"matrix": [1, 1], "x": 1.5, "y": 1}, - {"matrix": [1, 2], "x": 2.5, "y": 1}, - {"matrix": [1, 3], "x": 3.5, "y": 1}, - {"matrix": [1, 4], "x": 4.5, "y": 1}, - {"matrix": [1, 5], "x": 5.5, "y": 1}, - {"matrix": [1, 6], "x": 6.5, "y": 1}, - {"matrix": [1, 7], "x": 7.5, "y": 1}, - {"matrix": [1, 8], "x": 8.5, "y": 1}, - {"matrix": [1, 9], "x": 9.5, "y": 1}, - {"matrix": [1, 10], "x": 10.5, "y": 1}, - {"matrix": [1, 11], "x": 11.5, "y": 1}, - {"matrix": [1, 12], "x": 12.5, "y": 1}, - {"matrix": [2, 12], "x": 13.5, "y": 1, "w": 1.5}, - - {"matrix": [2, 0], "x": 0, "y": 2, "w": 1.75}, - {"matrix": [2, 1], "x": 1.75, "y": 2}, - {"matrix": [2, 2], "x": 2.75, "y": 2}, - {"matrix": [2, 3], "x": 3.75, "y": 2}, - {"matrix": [2, 4], "x": 4.75, "y": 2}, - {"matrix": [2, 5], "x": 5.75, "y": 2}, - {"matrix": [2, 6], "x": 6.75, "y": 2}, - {"matrix": [2, 7], "x": 7.75, "y": 2}, - {"matrix": [2, 8], "x": 8.75, "y": 2}, - {"matrix": [2, 9], "x": 9.75, "y": 2}, - {"matrix": [2, 10], "x": 10.75, "y": 2}, - {"matrix": [2, 11], "x": 11.75, "y": 2}, - {"matrix": [2, 13], "x": 12.75, "y": 2, "w": 2.25}, - - {"matrix": [3, 0], "x": 0, "y": 3, "w": 2.25}, - {"matrix": [3, 2], "x": 2.25, "y": 3}, - {"matrix": [3, 3], "x": 3.25, "y": 3}, - {"matrix": [3, 4], "x": 4.25, "y": 3}, - {"matrix": [3, 5], "x": 5.25, "y": 3}, - {"matrix": [3, 6], "x": 6.25, "y": 3}, - {"matrix": [3, 7], "x": 7.25, "y": 3}, - {"matrix": [3, 8], "x": 8.25, "y": 3}, - {"matrix": [3, 9], "x": 9.25, "y": 3}, - {"matrix": [3, 10], "x": 10.25, "y": 3}, - {"matrix": [3, 11], "x": 11.25, "y": 3}, - {"matrix": [3, 13], "x": 12.25, "y": 3, "w": 2.75}, - - {"matrix": [4, 0], "x": 0, "y": 4, "w": 1.25}, - {"matrix": [4, 1], "x": 1.25, "y": 4, "w": 1.25}, - {"matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.25}, - {"matrix": [4, 6], "x": 3.75, "y": 4, "w": 6.25}, - {"matrix": [4, 10], "x": 10, "y": 4, "w": 1.25}, - {"matrix": [4, 11], "x": 11.25, "y": 4, "w": 1.25}, - {"matrix": [4, 12], "x": 12.5, "y": 4, "w": 1.25}, - {"matrix": [4, 13], "x": 13.75, "y": 4, "w": 1.25} - ] - } - } -} diff --git a/keyboards/hs60/v1/keymaps/ansi/config.h b/keyboards/hs60/v1/keymaps/ansi/config.h deleted file mode 100644 index 82cdc2689c..0000000000 --- a/keyboards/hs60/v1/keymaps/ansi/config.h +++ /dev/null @@ -1,23 +0,0 @@ -/* -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 <http://www.gnu.org/licenses/>. -*/ -#pragma once - -/* Include overwrites for specific keymap */ - -#ifdef KEYBOARD_hs60 - #define HS60_ANSI -#endif diff --git a/keyboards/hs60/v1/readme.md b/keyboards/hs60/v1/readme.md index 4b613e2a52..e9c8e2d6ee 100644 --- a/keyboards/hs60/v1/readme.md +++ b/keyboards/hs60/v1/readme.md @@ -1,22 +1,16 @@ -HS60 -==== +# HS60 [HS60](https://mechboards.co.uk/wp-content/uploads/2018/04/IMG_20180420_140353.jpg) -This is a standard fixed layout 60% PCB. It comes in two varians, ISO and ANSI and support full per-key RGB. +This is a standard fixed layout 60% PCB. It comes in two variants, ISO and ANSI and support full per-key RGB. -Keyboard Maintainer: [Yiancar](http://yiancar-designs.com/) and on [GitHub](https://github.com/yiancar) -Hardware Supported: HS60 ISO and ANSI PCBs with Atmega 32u4 -Hardware Availability: https://mechboards.co.uk/shop/all/hs60-pcb/ - -If you're using the [community layouts feature](https://docs.qmk.fm/#/feature_layouts) and using the 60_ansi layout, you need to make sure that you include this on your config.h to ensure that the RGB Matrix is properly configured: - - #ifdef KEYBOARD_hs60 - #define HS60_ANSI - #endif +* Keyboard Maintainer: [Yiancar](http://yiancar-designs.com/) and on [GitHub](https://github.com/yiancar) +* Hardware Supported: HS60 ISO and ANSI PCBs with Atmega 32u4 +* Hardware Availability: https://mechboards.co.uk/shop/all/hs60-pcb/ Make example for this keyboard (after setting up your build environment): - make hs60/v1:default + make hs60/v1/ansi:default + make hs60/v1/iso:default -See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/hs60/v1/v1.c b/keyboards/hs60/v1/v1.c index 7a43784ad9..ecb78c70d0 100644 --- a/keyboards/hs60/v1/v1.c +++ b/keyboards/hs60/v1/v1.c @@ -15,224 +15,6 @@ */ #include "quantum.h" -#ifdef HS60_ANSI - -const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = { -/* Refer to IS31 manual for these locations - * driver - * | R location - * | | G location - * | | | B location - * | | | | */ - {0, C1_1, C3_2, C4_2}, //A1 - {0, C1_2, C2_2, C4_3}, //A2 - {0, C1_3, C2_3, C3_3}, //A3 - {0, C1_4, C2_4, C3_4}, //A4 - {0, C1_5, C2_5, C3_5}, //A5 - {0, C1_6, C2_6, C3_6}, //A6 - {0, C1_7, C2_7, C3_7}, //A7 - {0, C1_8, C2_8, C3_8}, //A8 - {0, C9_1, C8_1, C7_1}, //A9 - {0, C9_2, C8_2, C7_2}, //A10 - {0, C9_3, C8_3, C7_3}, //A11 - {0, C9_4, C8_4, C7_4}, //A12 - {0, C9_5, C8_5, C7_5}, //A13 - {0, C9_6, C8_6, C7_6}, //A14 - {0, C9_7, C8_7, C6_6}, //A15 - {0, C9_8, C7_7, C6_7}, //A16 - - {0, C1_9, C3_10, C4_10}, //B1 - {0, C1_10, C2_10, C4_11}, //B2 - {0, C1_11, C2_11, C3_11}, //B3 - {0, C1_12, C2_12, C3_12}, //B4 - {0, C1_13, C2_13, C3_13}, //B5 - {0, C1_14, C2_14, C3_14}, //B6 - {0, C1_15, C2_15, C3_15}, //B7 - {0, C1_16, C2_16, C3_16}, //B8 - {0, C9_9, C8_9, C7_9}, //B9 - {0, C9_10, C8_10, C7_10}, //B10 - {0, C9_11, C8_11, C7_11}, //B11 - {0, C9_12, C8_12, C7_12}, //B12 - {0, C9_13, C8_13, C7_13}, //B13 - {0, C9_14, C8_14, C7_14}, //B14 - - {1, C1_1, C3_2, C4_2}, //C1 - {1, C1_2, C2_2, C4_3}, //C2 - {1, C1_3, C2_3, C3_3}, //C3 - {1, C1_4, C2_4, C3_4}, //C4 - {1, C1_5, C2_5, C3_5}, //C5 - {1, C1_6, C2_6, C3_6}, //C6 - {1, C1_7, C2_7, C3_7}, //C7 - {1, C1_8, C2_8, C3_8}, //C8 - {1, C9_1, C8_1, C7_1}, //C9 - {1, C9_2, C8_2, C7_2}, //C10 - {1, C9_3, C8_3, C7_3}, //C11 - {1, C9_4, C8_4, C7_4}, //C12 - {1, C9_5, C8_5, C7_5}, //C13 - {1, C9_6, C8_6, C7_6}, //C14 - {1, C9_7, C8_7, C6_6}, //C15 - {1, C9_8, C7_7, C6_7}, //C16 - - {1, C1_9, C3_10, C4_10}, //D1 - //D2 - {1, C1_11, C2_11, C3_11}, //D3 - {1, C1_12, C2_12, C3_12}, //D4 - {1, C1_13, C2_13, C3_13}, //D5 - {1, C1_14, C2_14, C3_14}, //D6 - {1, C1_15, C2_15, C3_15}, //D7 - {1, C1_16, C2_16, C3_16}, //D8 - {1, C9_9, C8_9, C7_9}, //D9 - {1, C9_10, C8_10, C7_10}, //D10 - {1, C9_11, C8_11, C7_11}, //D11 - {1, C9_12, C8_12, C7_12}, //D12 - {1, C9_13, C8_13, C7_13}, //D13 - {1, C9_14, C8_14, C7_14}, //D14 - {1, C9_15, C8_15, C6_14}, //D15 - {1, C9_16, C7_15, C6_15} //D16 -}; - -led_config_t g_led_config = { { - { 36, 35, 34, 33, 32, 31, 30, 6, 5, 4, 3, 2, 1, 0 }, - { 37, 38, 39, 40, 41, 42, 43, 7, 8, 9, 10, 11, 12, NO_LED }, - { 48, 49, 50, 51, 52, 45, 44, 20, 21, 22, 23, 15, 14, 13 }, - { 47, NO_LED, 46, 53, 54, 55, 56, 19, 18, 17, 16, 24, NO_LED, 25 }, - { 60, 59, 58, 57, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, 29, 28, 27, 26 } -}, { - //A1-A16 - { 224, 0 }, { 204, 0 }, { 187, 0 }, { 170, 0 }, { 153, 0 }, { 136, 0 }, { 119, 0 }, { 119, 16 }, { 136, 16 }, { 153, 16 }, { 170, 16 }, { 187, 16 }, { 204, 16 }, { 224, 32 }, - { 224, 16 }, { 197, 32 }, - //B1-B14 - { 170, 48 }, { 153, 48 }, { 136, 48 }, { 119, 48 }, { 119, 32 }, { 136, 32 }, { 153, 32 }, { 170, 32 }, { 187, 48 }, { 214, 48 }, { 224, 64 }, { 204, 64 }, { 187, 64 }, { 170, 64 }, - //C1-C16 - { 102, 0 }, { 85, 0 }, { 68, 0 }, { 51, 0 }, { 34, 0 }, { 17, 0 }, { 0, 0 }, { 0, 16 }, { 17, 16 }, { 34, 16 }, { 51, 16 }, { 68, 16 }, { 85, 16 }, { 102, 16 }, - { 102, 32 }, { 85, 32 }, - //D1-D16 - { 32, 48 }, { 10, 48 }, { 0, 32 }, { 17, 32 }, { 34, 32 }, { 51, 32 }, { 68, 32 }, { 51, 48 }, { 68, 48 }, { 85, 48 }, { 102, 48 }, { 102, 64 }, { 34, 68 }, { 17, 68 }, - { 0, 68 } -}, { - //A1-A16 - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 4, 4, - //B1-B14 - 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, 1, 1, - //C1-C16 - 4, 4, 4, 4, 4, 4, 1, 1, 4, 4, 4, 4, 4, 4, - 4, 4, - //D1-D16 - 4, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, - 1 -} }; - -#else - -const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = { -/* Refer to IS31 manual for these locations - * driver - * | R location - * | | G location - * | | | B location - * | | | | */ - {0, C1_1, C3_2, C4_2}, //A1 - {0, C1_2, C2_2, C4_3}, //A2 - {0, C1_3, C2_3, C3_3}, //A3 - {0, C1_4, C2_4, C3_4}, //A4 - {0, C1_5, C2_5, C3_5}, //A5 - {0, C1_6, C2_6, C3_6}, //A6 - {0, C1_7, C2_7, C3_7}, //A7 - {0, C1_8, C2_8, C3_8}, //A8 - {0, C9_1, C8_1, C7_1}, //A9 - {0, C9_2, C8_2, C7_2}, //A10 - {0, C9_3, C8_3, C7_3}, //A11 - {0, C9_4, C8_4, C7_4}, //A12 - {0, C9_5, C8_5, C7_5}, //A13 - {0, C9_6, C8_6, C7_6}, //A14 - {0, C9_7, C8_7, C6_6}, //A15 - {0, C9_8, C7_7, C6_7}, //A16 - - {0, C1_9, C3_10, C4_10}, //B1 - {0, C1_10, C2_10, C4_11}, //B2 - {0, C1_11, C2_11, C3_11}, //B3 - {0, C1_12, C2_12, C3_12}, //B4 - {0, C1_13, C2_13, C3_13}, //B5 - {0, C1_14, C2_14, C3_14}, //B6 - {0, C1_15, C2_15, C3_15}, //B7 - {0, C1_16, C2_16, C3_16}, //B8 - {0, C9_9, C8_9, C7_9}, //B9 - {0, C9_10, C8_10, C7_10}, //B10 - {0, C9_11, C8_11, C7_11}, //B11 - {0, C9_12, C8_12, C7_12}, //B12 - {0, C9_13, C8_13, C7_13}, //B13 - {0, C9_14, C8_14, C7_14}, //B14 - - {1, C1_1, C3_2, C4_2}, //C1 - {1, C1_2, C2_2, C4_3}, //C2 - {1, C1_3, C2_3, C3_3}, //C3 - {1, C1_4, C2_4, C3_4}, //C4 - {1, C1_5, C2_5, C3_5}, //C5 - {1, C1_6, C2_6, C3_6}, //C6 - {1, C1_7, C2_7, C3_7}, //C7 - {1, C1_8, C2_8, C3_8}, //C8 - {1, C9_1, C8_1, C7_1}, //C9 - {1, C9_2, C8_2, C7_2}, //C10 - {1, C9_3, C8_3, C7_3}, //C11 - {1, C9_4, C8_4, C7_4}, //C12 - {1, C9_5, C8_5, C7_5}, //C13 - {1, C9_6, C8_6, C7_6}, //C14 - {1, C9_7, C8_7, C6_6}, //C15 - {1, C9_8, C7_7, C6_7}, //C16 - - {1, C1_9, C3_10, C4_10}, //D1 - {1, C1_10, C2_10, C4_11}, //D2 - {1, C1_11, C2_11, C3_11}, //D3 - {1, C1_12, C2_12, C3_12}, //D4 - {1, C1_13, C2_13, C3_13}, //D5 - {1, C1_14, C2_14, C3_14}, //D6 - {1, C1_15, C2_15, C3_15}, //D7 - {1, C1_16, C2_16, C3_16}, //D8 - {1, C9_9, C8_9, C7_9}, //D9 - {1, C9_10, C8_10, C7_10}, //D10 - {1, C9_11, C8_11, C7_11}, //D11 - {1, C9_12, C8_12, C7_12}, //D12 - {1, C9_13, C8_13, C7_13}, //D13 - {1, C9_14, C8_14, C7_14}, //D14 - {1, C9_15, C8_15, C6_14}, //D15 - {1, C9_16, C7_15, C6_15} //D16 -}; - -led_config_t g_led_config = { { - { 36, 35, 34, 33, 32, 31, 30, 6, 5, 4, 3, 2, 1, 0 }, - { 37, 38, 39, 40, 41, 42, 43, 7, 8, 9, 10, 11, 12, NO_LED }, - { 49, 50, 51, 52, 53, 45, 44, 20, 21, 22, 23, 15, 14, 13 }, - { 48, 47, 46, 54, 55, 56, 57, 19, 18, 17, 16, 24, NO_LED, 25 }, - { 61, 60, 59, 58, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, 29, 28, 27, 26 } -}, { - //A1-A16 - { 224, 0 }, { 204, 0 }, { 187, 0 }, { 170, 0 }, { 153, 0 }, { 136, 0 }, { 119, 0 }, { 119, 16 }, { 136, 16 }, { 153, 16 }, { 170, 16 }, { 187, 16 }, { 204, 16 }, { 224, 8 }, - { 204, 32 }, { 187, 32 }, - //B1-B14 - { 170, 48 }, { 153, 48 }, { 136, 48 }, { 119, 48 }, { 119, 32 }, { 136, 32 }, { 153, 32 }, { 170, 32 }, { 187, 48 }, { 214, 48 }, { 224, 64 }, { 204, 64 }, { 187, 64 }, { 170, 64 }, - //C1-C16 - { 102, 0 }, { 85, 0 }, { 68, 0 }, { 51, 0 }, { 34, 0 }, { 17, 0 }, { 0, 0 }, { 0, 16 }, { 17, 16 }, { 34, 16 }, { 51, 16 }, { 68, 16 }, { 85, 16 }, { 102, 16 }, - { 102, 32 }, { 85, 32 }, - //D1-D16 - { 32, 48 }, { 17, 48 }, { 0, 48 }, { 0, 32 }, { 17, 32 }, { 34, 32 }, { 51, 32 }, { 68, 32 }, { 51, 48 }, { 68, 48 }, { 85, 48 }, { 102, 48 }, { 102, 64 }, { 34, 68 }, - { 17, 68 }, { 0, 68 } -}, { - //A1-A16 - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 4, 4, - //B1-B14 - 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, 1, 1, - //C1-C16 - 4, 4, 4, 4, 4, 4, 1, 1, 4, 4, 4, 4, 4, 4, - 4, 4, - //D1-D16 - 4, 4, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 1 -} }; - -#endif - #ifndef DEBOUNCE # define DEBOUNCE 5 #endif @@ -307,13 +89,3 @@ void matrix_init_kb(void) { matrix_init_user(); } - -void suspend_power_down_kb(void) -{ - rgb_matrix_set_suspend_state(true); -} - -void suspend_wakeup_init_kb(void) -{ - rgb_matrix_set_suspend_state(false); -} diff --git a/keyboards/ibm/model_m/ashpil_usbc/ashpil_usbc.c b/keyboards/ibm/model_m/ashpil_usbc/ashpil_usbc.c deleted file mode 100644 index 8bdcfe070a..0000000000 --- a/keyboards/ibm/model_m/ashpil_usbc/ashpil_usbc.c +++ /dev/null @@ -1,36 +0,0 @@ -/* Copyright 2019 ashpil - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www./gnu.org/licenses/>. - */ - -#include "quantum.h" - -void keyboard_pre_init_kb(void) { - /* Setting status LEDs pins to output and +5V (off) */ - gpio_set_pin_output(D5); - gpio_set_pin_output(D6); - gpio_set_pin_output(D7); - gpio_write_pin_high(D5); - gpio_write_pin_high(D6); - gpio_write_pin_high(D7); -} - -bool led_update_kb(led_t led_state) { - if(led_update_user(led_state)) { - gpio_write_pin(D5, !led_state.num_lock); - gpio_write_pin(D6, !led_state.caps_lock); - gpio_write_pin(D7, !led_state.scroll_lock); - } - return true; -} diff --git a/keyboards/ibm/model_m/ashpil_usbc/keyboard.json b/keyboards/ibm/model_m/ashpil_usbc/keyboard.json index 451589017e..a43e16a04c 100644 --- a/keyboards/ibm/model_m/ashpil_usbc/keyboard.json +++ b/keyboards/ibm/model_m/ashpil_usbc/keyboard.json @@ -16,6 +16,12 @@ "mousekey": false, "nkro": false }, + "indicators": { + "caps_lock": "D6", + "num_lock": "D5", + "scroll_lock": "D7", + "on_state": 0 + }, "matrix_pins": { "cols": ["E6", "E7", "F0", "F1", "F2", "F3", "F4", "F5", "F6", "F7", "A0", "A1", "A2", "A3", "A4", "A5"], "rows": ["C7", "C6", "C5", "C4", "C3", "C2", "C1", "C0"] diff --git a/keyboards/ibm/model_m/mschwingen/mschwingen.c b/keyboards/ibm/model_m/mschwingen/mschwingen.c index 7112ab63a5..7c0f1b2565 100644 --- a/keyboards/ibm/model_m/mschwingen/mschwingen.c +++ b/keyboards/ibm/model_m/mschwingen/mschwingen.c @@ -114,6 +114,8 @@ void keyboard_pre_init_kb(void) { gpio_set_pin_output(SR_CLK_PIN); gpio_set_pin_output(SR_DOUT_PIN); // MOSI - unused gpio_write_pin_low(SR_CLK_PIN); + + keyboard_pre_init_user(); } #ifdef KEYBOARD_ibm_model_m_mschwingen_led_ws2812 @@ -204,11 +206,19 @@ void update_layer_leds(void) { #endif -void dynamic_macro_record_start_user(int8_t direction) { +bool dynamic_macro_record_start_kb(int8_t direction) { + if (!dynamic_macro_record_start_user(direction)) { + return false; + } isRecording++; blink_cycle_timer = timer_read(); + return true; } -void dynamic_macro_record_end_user(int8_t direction) { +bool dynamic_macro_record_end_kb(int8_t direction) { + if (!dynamic_macro_record_end_user(direction)) { + return false; + } if (isRecording) isRecording--; + return true; } diff --git a/keyboards/ibm/model_m/teensypp/keyboard.json b/keyboards/ibm/model_m/teensypp/keyboard.json index 4464a299f6..e77c43483b 100644 --- a/keyboards/ibm/model_m/teensypp/keyboard.json +++ b/keyboards/ibm/model_m/teensypp/keyboard.json @@ -8,6 +8,12 @@ "pid": "0x0000", "device_version": "0.0.1" }, + "indicators": { + "caps_lock": "B6", + "num_lock": "B4", + "scroll_lock": "B5", + "on_state": 0 + }, "matrix_pins": { "cols": ["C7", "C6", "C5", "C4", "C3", "C2", "C1", "C0", "E1", "E0", "D7", "D6", "D5", "D4", "D3", "D2"], "rows": ["F7", "F6", "F5", "F4", "F3", "F2", "F1", "F0"] diff --git a/keyboards/ibm/model_m/teensypp/teensypp.c b/keyboards/ibm/model_m/teensypp/teensypp.c deleted file mode 100644 index aac85424bf..0000000000 --- a/keyboards/ibm/model_m/teensypp/teensypp.c +++ /dev/null @@ -1,36 +0,0 @@ -/* Copyright 2019 iw0rm3r - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ -#include "quantum.h" - -void led_init_ports(void) { - /* Setting status LEDs pins to output and +5V (off) */ - gpio_set_pin_output(B4); - gpio_set_pin_output(B5); - gpio_set_pin_output(B6); - gpio_write_pin_high(B4); - gpio_write_pin_high(B5); - gpio_write_pin_high(B6); -} - -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if(res) { - gpio_write_pin(B4, !led_state.num_lock); - gpio_write_pin(B6, !led_state.caps_lock); - gpio_write_pin(B5, !led_state.scroll_lock); - } - return res; -} diff --git a/keyboards/ibm/model_m/yugo_m/keyboard.json b/keyboards/ibm/model_m/yugo_m/keyboard.json index 968c637b78..10fe637f03 100644 --- a/keyboards/ibm/model_m/yugo_m/keyboard.json +++ b/keyboards/ibm/model_m/yugo_m/keyboard.json @@ -16,6 +16,12 @@ "mousekey": true, "nkro": false }, + "indicators": { + "caps_lock": "A1", + "num_lock": "A2", + "scroll_lock": "A0", + "on_state": 0 + }, "matrix_pins": { "cols": ["A9", "A8", "B15", "B14", "B13", "B12", "B11", "B10", "B2", "B1", "B0", "A7", "A6", "A5", "A4", "A3"], "rows": ["B8", "B7", "B6", "B5", "B4", "B3", "A15", "A14"] diff --git a/keyboards/ibm/model_m/yugo_m/yugo_m.c b/keyboards/ibm/model_m/yugo_m/yugo_m.c deleted file mode 100644 index a725a3657b..0000000000 --- a/keyboards/ibm/model_m/yugo_m/yugo_m.c +++ /dev/null @@ -1,35 +0,0 @@ -/* Copyright 2020 Nidzo Tomic <[email protected]> - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ -#include "quantum.h" - -void keyboard_pre_init_kb(void) { - // Set our LED pins as output - gpio_set_pin_output(A2); - gpio_set_pin_output(A1); - gpio_set_pin_output(A0); - - keyboard_pre_init_user(); -} - -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if(res) { - gpio_write_pin(A2, !led_state.num_lock); - gpio_write_pin(A1, !led_state.caps_lock); - gpio_write_pin(A0, !led_state.scroll_lock); - } - return res; -} diff --git a/keyboards/ibnuda/squiggle/rev1/config.h b/keyboards/ibnuda/squiggle/rev1/config.h deleted file mode 100644 index 10887bdf18..0000000000 --- a/keyboards/ibnuda/squiggle/rev1/config.h +++ /dev/null @@ -1,3 +0,0 @@ -#pragma once - -#define MASTER_LEFT diff --git a/keyboards/ibnuda/squiggle/rev1/keyboard.json b/keyboards/ibnuda/squiggle/rev1/keyboard.json index 3baafefc84..41061674a9 100644 --- a/keyboards/ibnuda/squiggle/rev1/keyboard.json +++ b/keyboards/ibnuda/squiggle/rev1/keyboard.json @@ -15,7 +15,9 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D0" + "serial": { + "pin": "D0" + } }, "processor": "atmega32u4", "bootloader": "caterina", diff --git a/keyboards/idank/spankbd/keyboard.json b/keyboards/idank/spankbd/keyboard.json index fc9dce4631..89e28e1533 100644 --- a/keyboards/idank/spankbd/keyboard.json +++ b/keyboards/idank/spankbd/keyboard.json @@ -22,7 +22,9 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D2" + "serial": { + "pin": "D2" + } }, "layouts": { "LAYOUT_split_3x5_3": { diff --git a/keyboards/idank/sweeq/keyboard.json b/keyboards/idank/sweeq/keyboard.json index 0de9cd3aaf..a9b8d7411e 100644 --- a/keyboards/idank/sweeq/keyboard.json +++ b/keyboards/idank/sweeq/keyboard.json @@ -24,7 +24,9 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D2" + "serial": { + "pin": "D2" + } }, "community_layouts": ["split_3x5_2"], "layout_aliases": { diff --git a/keyboards/idb/idb_60/idb_60.c b/keyboards/idb/idb_60/idb_60.c index 77485a4273..183892f363 100644 --- a/keyboards/idb/idb_60/idb_60.c +++ b/keyboards/idb/idb_60/idb_60.c @@ -3,6 +3,8 @@ void keyboard_pre_init_kb(void) { gpio_set_pin_output(C4); gpio_set_pin_output(C5); + + keyboard_pre_init_user(); } inline void _idb_60_caps_led_on(void) { diff --git a/keyboards/ilumkb/volcano660/keyboard.json b/keyboards/ilumkb/volcano660/keyboard.json index 297b28a5f9..fa74e46fed 100644 --- a/keyboards/ilumkb/volcano660/keyboard.json +++ b/keyboards/ilumkb/volcano660/keyboard.json @@ -32,6 +32,12 @@ "pin": "B7", "levels": 5 }, + "indicators": { + "caps_lock": "D2", + "num_lock": "D0", + "scroll_lock": "D1", + "on_state": 0 + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "community_layouts": [ diff --git a/keyboards/ilumkb/volcano660/volcano660.c b/keyboards/ilumkb/volcano660/volcano660.c deleted file mode 100644 index 5e6d67c9ba..0000000000 --- a/keyboards/ilumkb/volcano660/volcano660.c +++ /dev/null @@ -1,34 +0,0 @@ -/* Copyright 2020 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 <http://www.gnu.org/licenses/>. - */ -#include "quantum.h" - -void matrix_init_kb(void) { - gpio_set_pin_output(D0); - gpio_set_pin_output(D1); - gpio_set_pin_output(D2); - matrix_init_user(); -} - -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if(res) { - gpio_write_pin(D0, !led_state.num_lock); - gpio_write_pin(D2, !led_state.caps_lock); - gpio_write_pin(D1, !led_state.scroll_lock); - - } - return res; -} diff --git a/keyboards/inett_studio/sqx/hotswap/hotswap.c b/keyboards/inett_studio/sqx/hotswap/hotswap.c index 079889e727..c04d7ef02c 100644 --- a/keyboards/inett_studio/sqx/hotswap/hotswap.c +++ b/keyboards/inett_studio/sqx/hotswap/hotswap.c @@ -165,6 +165,10 @@ bool rgb_matrix_indicators_kb(void) { #endif //RGB_MATRIX_ENABLE bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + if (!process_record_user(keycode, record)) { + return false; + } + if (record->event.pressed) { switch(keycode) { #if defined(RGB_MATRIX_DISABLE_KEYCODES) diff --git a/keyboards/inett_studio/sqx/universal/universal.c b/keyboards/inett_studio/sqx/universal/universal.c index 519df57505..6c2af3a3b9 100644 --- a/keyboards/inett_studio/sqx/universal/universal.c +++ b/keyboards/inett_studio/sqx/universal/universal.c @@ -169,6 +169,10 @@ bool rgb_matrix_indicators_kb(void) { #endif //RGB_MATRIX_ENABLE bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + if (!process_record_user(keycode, record)) { + return false; + } + if (record->event.pressed) { switch(keycode) { #if defined(RGB_MATRIX_DISABLE_KEYCODES) diff --git a/keyboards/input_club/ergodox_infinity/ergodox_infinity.c b/keyboards/input_club/ergodox_infinity/ergodox_infinity.c index 7660a41f56..2e8d0b9763 100644 --- a/keyboards/input_club/ergodox_infinity/ergodox_infinity.c +++ b/keyboards/input_club/ergodox_infinity/ergodox_infinity.c @@ -209,72 +209,6 @@ const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = { // 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 diff --git a/keyboards/input_club/ergodox_infinity/keyboard.json b/keyboards/input_club/ergodox_infinity/keyboard.json index fd89806b00..b7667d192c 100644 --- a/keyboards/input_club/ergodox_infinity/keyboard.json +++ b/keyboards/input_club/ergodox_infinity/keyboard.json @@ -29,6 +29,84 @@ "wave_left_right": true, "wave_up_down": true }, + "layout": [ + {"matrix": [8, 0], "x": 0, "y": 3, "flags": 1}, + {"matrix": [7, 0], "x": 15, "y": 3, "flags": 4}, + {"matrix": [6, 0], "x": 27, "y": 1, "flags": 4}, + {"matrix": [5, 0], "x": 39, "y": 0, "flags": 4}, + {"matrix": [4, 0], "x": 51, "y": 1, "flags": 4}, + {"matrix": [3, 0], "x": 63, "y": 2, "flags": 4}, + {"matrix": [2, 0], "x": 75, "y": 2, "flags": 1}, + {"matrix": [8, 1], "x": 0, "y": 13, "flags": 1}, + {"matrix": [7, 1], "x": 15, "y": 13, "flags": 4}, + {"matrix": [6, 1], "x": 27, "y": 11, "flags": 4}, + {"matrix": [5, 1], "x": 39, "y": 10, "flags": 4}, + {"matrix": [4, 1], "x": 51, "y": 11, "flags": 4}, + {"matrix": [3, 1], "x": 63, "y": 12, "flags": 4}, + {"matrix": [2, 1], "x": 78, "y": 17, "flags": 1}, + {"matrix": [8, 2], "x": 0, "y": 23, "flags": 1}, + {"matrix": [7, 2], "x": 15, "y": 23, "flags": 4}, + {"matrix": [6, 2], "x": 27, "y": 21, "flags": 4}, + {"matrix": [5, 2], "x": 39, "y": 20, "flags": 4}, + {"matrix": [4, 2], "x": 51, "y": 21, "flags": 4}, + {"matrix": [3, 2], "x": 63, "y": 22, "flags": 4}, + {"matrix": [8, 3], "x": 0, "y": 33, "flags": 1}, + {"matrix": [7, 3], "x": 15, "y": 33, "flags": 4}, + {"matrix": [6, 3], "x": 27, "y": 31, "flags": 4}, + {"matrix": [5, 3], "x": 39, "y": 30, "flags": 4}, + {"matrix": [4, 3], "x": 51, "y": 31, "flags": 4}, + {"matrix": [3, 3], "x": 63, "y": 32, "flags": 4}, + {"matrix": [2, 3], "x": 78, "y": 32, "flags": 1}, + {"matrix": [8, 4], "x": 4, "y": 43, "flags": 1}, + {"matrix": [7, 4], "x": 15, "y": 43, "flags": 1}, + {"matrix": [6, 4], "x": 27, "y": 41, "flags": 1}, + {"matrix": [5, 4], "x": 39, "y": 40, "flags": 1}, + {"matrix": [4, 4], "x": 51, "y": 41, "flags": 1}, + {"matrix": [1, 3], "x": 89, "y": 41, "flags": 1}, + {"matrix": [0, 3], "x": 100, "y": 46, "flags": 1}, + {"matrix": [0, 4], "x": 95, "y": 55, "flags": 1}, + {"matrix": [3, 4], "x": 72, "y": 54, "flags": 1}, + {"matrix": [2, 4], "x": 83, "y": 59, "flags": 1}, + {"matrix": [1, 4], "x": 90, "y": 64, "flags": 1}, + {"matrix": [17, 0], "x": 224, "y": 3, "flags": 1}, + {"matrix": [16, 0], "x": 209, "y": 3, "flags": 4}, + {"matrix": [15, 0], "x": 197, "y": 1, "flags": 4}, + {"matrix": [14, 0], "x": 185, "y": 0, "flags": 4}, + {"matrix": [13, 0], "x": 173, "y": 1, "flags": 4}, + {"matrix": [12, 0], "x": 161, "y": 2, "flags": 4}, + {"matrix": [11, 0], "x": 149, "y": 2, "flags": 1}, + {"matrix": [17, 1], "x": 224, "y": 13, "flags": 1}, + {"matrix": [16, 1], "x": 209, "y": 13, "flags": 4}, + {"matrix": [15, 1], "x": 197, "y": 11, "flags": 4}, + {"matrix": [14, 1], "x": 185, "y": 10, "flags": 4}, + {"matrix": [13, 1], "x": 173, "y": 11, "flags": 4}, + {"matrix": [12, 1], "x": 161, "y": 12, "flags": 4}, + {"matrix": [11, 1], "x": 146, "y": 17, "flags": 1}, + {"matrix": [17, 2], "x": 224, "y": 23, "flags": 1}, + {"matrix": [16, 2], "x": 209, "y": 23, "flags": 4}, + {"matrix": [15, 2], "x": 197, "y": 21, "flags": 4}, + {"matrix": [14, 2], "x": 185, "y": 20, "flags": 4}, + {"matrix": [13, 2], "x": 173, "y": 21, "flags": 4}, + {"matrix": [12, 2], "x": 161, "y": 22, "flags": 4}, + {"matrix": [17, 3], "x": 224, "y": 33, "flags": 1}, + {"matrix": [16, 3], "x": 209, "y": 33, "flags": 4}, + {"matrix": [15, 3], "x": 197, "y": 31, "flags": 4}, + {"matrix": [14, 3], "x": 185, "y": 30, "flags": 4}, + {"matrix": [13, 3], "x": 173, "y": 31, "flags": 4}, + {"matrix": [12, 3], "x": 161, "y": 32, "flags": 4}, + {"matrix": [11, 3], "x": 146, "y": 32, "flags": 1}, + {"matrix": [17, 4], "x": 220, "y": 43, "flags": 1}, + {"matrix": [16, 4], "x": 209, "y": 43, "flags": 1}, + {"matrix": [15, 4], "x": 197, "y": 41, "flags": 1}, + {"matrix": [14, 4], "x": 185, "y": 40, "flags": 1}, + {"matrix": [13, 4], "x": 173, "y": 41, "flags": 1}, + {"matrix": [10, 3], "x": 135, "y": 41, "flags": 1}, + {"matrix": [9, 3], "x": 124, "y": 46, "flags": 1}, + {"matrix": [9, 4], "x": 129, "y": 55, "flags": 1}, + {"matrix": [12, 4], "x": 152, "y": 54, "flags": 1}, + {"matrix": [11, 4], "x": 141, "y": 59, "flags": 1}, + {"matrix": [10, 4], "x": 134, "y": 64, "flags": 1} + ], "driver": "is31fl3731", "sleep": true, "split_count": [38, 38] @@ -39,7 +117,10 @@ }, "diode_direction": "ROW2COL", "split": { - "enabled": true + "enabled": true, + "serial": { + "driver": "usart" + } }, "processor": "MK20DX256", "bootloader": "kiibohd", diff --git a/keyboards/input_club/ergodox_infinity/rules.mk b/keyboards/input_club/ergodox_infinity/rules.mk deleted file mode 100644 index c6e2988321..0000000000 --- a/keyboards/input_club/ergodox_infinity/rules.mk +++ /dev/null @@ -1 +0,0 @@ -SERIAL_DRIVER = usart diff --git a/keyboards/input_club/infinity60/led/keyboard.json b/keyboards/input_club/infinity60/led/keyboard.json index f16554d245..6c97da82e3 100644 --- a/keyboards/input_club/infinity60/led/keyboard.json +++ b/keyboards/input_club/infinity60/led/keyboard.json @@ -43,57 +43,57 @@ {"matrix": [1, 4], "x": 208, "y": 0, "flags": 1}, {"matrix": [1, 5], "x": 224, "y": 0, "flags": 1}, - {"matrix": [1, 6], "x": 0, "y": 16, "flags": 1}, - {"matrix": [1, 7], "x": 17, "y": 16, "flags": 4}, - {"matrix": [1, 8], "x": 35, "y": 16, "flags": 4}, - {"matrix": [2, 0], "x": 52, "y": 16, "flags": 4}, - {"matrix": [2, 1], "x": 69, "y": 16, "flags": 4}, - {"matrix": [2, 2], "x": 86, "y": 16, "flags": 4}, - {"matrix": [2, 3], "x": 103, "y": 16, "flags": 4}, - {"matrix": [2, 4], "x": 121, "y": 16, "flags": 4}, - {"matrix": [2, 5], "x": 138, "y": 16, "flags": 4}, - {"matrix": [2, 6], "x": 155, "y": 16, "flags": 4}, - {"matrix": [2, 7], "x": 172, "y": 16, "flags": 4}, - {"matrix": [2, 8], "x": 190, "y": 16, "flags": 4}, - {"matrix": [3, 0], "x": 207, "y": 16, "flags": 4}, - {"matrix": [3, 1], "x": 224, "y": 16, "flags": 4}, + {"matrix": [1, 6], "x": 4, "y": 16, "flags": 1}, + {"matrix": [1, 7], "x": 24, "y": 16, "flags": 4}, + {"matrix": [1, 8], "x": 40, "y": 16, "flags": 4}, + {"matrix": [2, 0], "x": 56, "y": 16, "flags": 4}, + {"matrix": [2, 1], "x": 72, "y": 16, "flags": 4}, + {"matrix": [2, 2], "x": 88, "y": 16, "flags": 4}, + {"matrix": [2, 3], "x": 104, "y": 16, "flags": 4}, + {"matrix": [2, 4], "x": 120, "y": 16, "flags": 4}, + {"matrix": [2, 5], "x": 136, "y": 16, "flags": 4}, + {"matrix": [2, 6], "x": 152, "y": 16, "flags": 4}, + {"matrix": [2, 7], "x": 168, "y": 16, "flags": 4}, + {"matrix": [2, 8], "x": 184, "y": 16, "flags": 4}, + {"matrix": [3, 0], "x": 200, "y": 16, "flags": 4}, + {"matrix": [3, 1], "x": 220, "y": 16, "flags": 4}, - {"matrix": [3, 2], "x": 0, "y": 32, "flags": 9}, - {"matrix": [3, 3], "x": 19, "y": 32, "flags": 4}, - {"matrix": [3, 4], "x": 37, "y": 32, "flags": 4}, - {"matrix": [3, 5], "x": 56, "y": 32, "flags": 4}, - {"matrix": [3, 6], "x": 75, "y": 32, "flags": 4}, - {"matrix": [3, 7], "x": 93, "y": 32, "flags": 4}, - {"matrix": [3, 8], "x": 112, "y": 32, "flags": 4}, - {"matrix": [4, 0], "x": 131, "y": 32, "flags": 4}, - {"matrix": [4, 1], "x": 149, "y": 32, "flags": 4}, - {"matrix": [4, 2], "x": 168, "y": 32, "flags": 4}, - {"matrix": [4, 3], "x": 187, "y": 32, "flags": 4}, - {"matrix": [4, 4], "x": 205, "y": 32, "flags": 4}, - {"matrix": [4, 5], "x": 224, "y": 32, "flags": 1}, + {"matrix": [3, 2], "x": 6, "y": 32, "flags": 9}, + {"matrix": [3, 3], "x": 28, "y": 32, "flags": 4}, + {"matrix": [3, 4], "x": 44, "y": 32, "flags": 4}, + {"matrix": [3, 5], "x": 60, "y": 32, "flags": 4}, + {"matrix": [3, 6], "x": 76, "y": 32, "flags": 4}, + {"matrix": [3, 7], "x": 92, "y": 32, "flags": 4}, + {"matrix": [3, 8], "x": 108, "y": 32, "flags": 4}, + {"matrix": [4, 0], "x": 124, "y": 32, "flags": 4}, + {"matrix": [4, 1], "x": 140, "y": 32, "flags": 4}, + {"matrix": [4, 2], "x": 156, "y": 32, "flags": 4}, + {"matrix": [4, 3], "x": 172, "y": 32, "flags": 4}, + {"matrix": [4, 4], "x": 188, "y": 32, "flags": 4}, + {"matrix": [4, 5], "x": 214, "y": 32, "flags": 1}, - {"matrix": [4, 6], "x": 0, "y": 48, "flags": 1}, - {"matrix": [4, 7], "x": 19, "y": 48, "flags": 4}, - {"matrix": [4, 8], "x": 37, "y": 48, "flags": 4}, - {"matrix": [5, 0], "x": 56, "y": 48, "flags": 4}, - {"matrix": [5, 1], "x": 75, "y": 48, "flags": 4}, - {"matrix": [5, 2], "x": 93, "y": 48, "flags": 4}, - {"matrix": [5, 3], "x": 112, "y": 48, "flags": 4}, - {"matrix": [5, 4], "x": 131, "y": 48, "flags": 4}, - {"matrix": [5, 5], "x": 149, "y": 48, "flags": 4}, - {"matrix": [5, 6], "x": 168, "y": 48, "flags": 4}, - {"matrix": [5, 7], "x": 187, "y": 48, "flags": 4}, - {"matrix": [5, 8], "x": 205, "y": 48, "flags": 1}, + {"matrix": [4, 6], "x": 10, "y": 48, "flags": 1}, + {"matrix": [4, 7], "x": 36, "y": 48, "flags": 4}, + {"matrix": [4, 8], "x": 52, "y": 48, "flags": 4}, + {"matrix": [5, 0], "x": 68, "y": 48, "flags": 4}, + {"matrix": [5, 1], "x": 84, "y": 48, "flags": 4}, + {"matrix": [5, 2], "x": 100, "y": 48, "flags": 4}, + {"matrix": [5, 3], "x": 116, "y": 48, "flags": 4}, + {"matrix": [5, 4], "x": 132, "y": 48, "flags": 4}, + {"matrix": [5, 5], "x": 148, "y": 48, "flags": 4}, + {"matrix": [5, 6], "x": 164, "y": 48, "flags": 4}, + {"matrix": [5, 7], "x": 180, "y": 48, "flags": 4}, + {"matrix": [5, 8], "x": 202, "y": 48, "flags": 1}, {"matrix": [6, 0], "x": 224, "y": 48, "flags": 1}, - {"matrix": [6, 1], "x": 0, "y": 64, "flags": 1}, - {"matrix": [6, 2], "x": 32, "y": 64, "flags": 1}, - {"matrix": [6, 3], "x": 64, "y": 64, "flags": 1}, - {"matrix": [6, 4], "x": 96, "y": 64, "flags": 4}, - {"matrix": [6, 5], "x": 128, "y": 64, "flags": 1}, - {"matrix": [6, 6], "x": 160, "y": 64, "flags": 1}, - {"matrix": [6, 7], "x": 192, "y": 64, "flags": 1}, - {"matrix": [6, 8], "x": 224, "y": 64, "flags": 1} + {"matrix": [6, 1], "x": 4, "y": 64, "flags": 1}, + {"matrix": [6, 2], "x": 24, "y": 64, "flags": 1}, + {"matrix": [6, 3], "x": 44, "y": 64, "flags": 1}, + {"matrix": [6, 4], "x": 104, "y": 64, "flags": 4}, + {"matrix": [6, 5], "x": 164, "y": 64, "flags": 1}, + {"matrix": [6, 6], "x": 184, "y": 64, "flags": 1}, + {"matrix": [6, 7], "x": 200, "y": 64, "flags": 1}, + {"matrix": [6, 8], "x": 220, "y": 64, "flags": 1} ] } } diff --git a/keyboards/input_club/whitefox/keyboard.json b/keyboards/input_club/whitefox/keyboard.json index d2fd36bbd5..1d3799b867 100644 --- a/keyboards/input_club/whitefox/keyboard.json +++ b/keyboards/input_club/whitefox/keyboard.json @@ -30,6 +30,83 @@ "wave_left_right": true, "wave_up_down": true }, + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}, + {"matrix": [0, 1], "x": 15, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 30, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 45, "y": 0, "flags": 4}, + {"matrix": [0, 4], "x": 60, "y": 0, "flags": 4}, + {"matrix": [0, 5], "x": 75, "y": 0, "flags": 4}, + {"matrix": [0, 6], "x": 90, "y": 0, "flags": 4}, + {"matrix": [0, 7], "x": 105, "y": 0, "flags": 4}, + {"matrix": [0, 8], "x": 119, "y": 0, "flags": 4}, + {"matrix": [1, 0], "x": 134, "y": 0, "flags": 4}, + {"matrix": [1, 1], "x": 149, "y": 0, "flags": 4}, + {"matrix": [1, 2], "x": 164, "y": 0, "flags": 4}, + {"matrix": [1, 3], "x": 179, "y": 0, "flags": 4}, + {"matrix": [1, 4], "x": 194, "y": 0, "flags": 4}, + {"matrix": [1, 5], "x": 209, "y": 0, "flags": 4}, + {"matrix": [1, 6], "x": 224, "y": 0, "flags": 1}, + + {"matrix": [1, 7], "x": 4, "y": 16, "flags": 1}, + {"matrix": [1, 8], "x": 22, "y": 16, "flags": 4}, + {"matrix": [2, 0], "x": 37, "y": 16, "flags": 4}, + {"matrix": [2, 1], "x": 52, "y": 16, "flags": 4}, + {"matrix": [2, 2], "x": 67, "y": 16, "flags": 4}, + {"matrix": [2, 3], "x": 82, "y": 16, "flags": 4}, + {"matrix": [2, 4], "x": 97, "y": 16, "flags": 4}, + {"matrix": [2, 5], "x": 112, "y": 16, "flags": 4}, + {"matrix": [2, 6], "x": 127, "y": 16, "flags": 4}, + {"matrix": [2, 7], "x": 142, "y": 16, "flags": 4}, + {"matrix": [2, 8], "x": 157, "y": 16, "flags": 4}, + {"matrix": [3, 0], "x": 172, "y": 16, "flags": 4}, + {"matrix": [3, 1], "x": 187, "y": 16, "flags": 4}, + {"matrix": [3, 2], "x": 205, "y": 16, "flags": 1}, + {"matrix": [3, 3], "x": 224, "y": 16, "flags": 1}, + + {"matrix": [3, 4], "x": 6, "y": 32, "flags": 1}, + {"matrix": [3, 5], "x": 26, "y": 32, "flags": 4}, + {"matrix": [3, 6], "x": 41, "y": 32, "flags": 4}, + {"matrix": [3, 7], "x": 56, "y": 32, "flags": 4}, + {"matrix": [3, 8], "x": 71, "y": 32, "flags": 4}, + {"matrix": [4, 0], "x": 86, "y": 32, "flags": 4}, + {"matrix": [4, 1], "x": 101, "y": 32, "flags": 4}, + {"matrix": [4, 2], "x": 116, "y": 32, "flags": 4}, + {"matrix": [4, 3], "x": 131, "y": 32, "flags": 4}, + {"matrix": [4, 4], "x": 146, "y": 32, "flags": 4}, + {"matrix": [4, 5], "x": 161, "y": 32, "flags": 4}, + {"matrix": [4, 6], "x": 175, "y": 32, "flags": 4}, + {"matrix": [4, 7], "x": 190, "y": 32, "flags": 4}, + {"matrix": [4, 8], "x": 207, "y": 32, "flags": 1}, + {"matrix": [5, 0], "x": 224, "y": 32, "flags": 1}, + + {"matrix": [5, 1], "x": 2, "y": 48, "flags": 1}, + {"matrix": [5, 2], "x": 19, "y": 48, "flags": 4}, + {"matrix": [5, 3], "x": 34, "y": 48, "flags": 4}, + {"matrix": [5, 4], "x": 49, "y": 48, "flags": 4}, + {"matrix": [5, 5], "x": 63, "y": 48, "flags": 4}, + {"matrix": [5, 6], "x": 78, "y": 48, "flags": 4}, + {"matrix": [5, 7], "x": 93, "y": 48, "flags": 4}, + {"matrix": [5, 8], "x": 108, "y": 48, "flags": 4}, + {"matrix": [6, 0], "x": 123, "y": 48, "flags": 4}, + {"matrix": [6, 1], "x": 138, "y": 48, "flags": 4}, + {"matrix": [6, 2], "x": 153, "y": 48, "flags": 4}, + {"matrix": [6, 3], "x": 168, "y": 48, "flags": 4}, + {"matrix": [6, 4], "x": 189, "y": 48, "flags": 1}, + {"matrix": [6, 5], "x": 209, "y": 48, "flags": 1}, + {"matrix": [6, 6], "x": 224, "y": 48, "flags": 1}, + + {"matrix": [6, 7], "x": 2, "y": 64, "flags": 1}, + {"matrix": [6, 8], "x": 21, "y": 64, "flags": 1}, + {"matrix": [7, 0], "x": 39, "y": 64, "flags": 1}, + {"matrix": [7, 1], "x": 95, "y": 64, "flags": 1}, + {"matrix": [7, 2], "x": 149, "y": 64, "flags": 1}, + {"matrix": [7, 3], "x": 164, "y": 64, "flags": 1}, + {"matrix": [7, 4], "x": 179, "y": 64, "flags": 1}, + {"matrix": [7, 5], "x": 194, "y": 64, "flags": 1}, + {"matrix": [7, 6], "x": 209, "y": 64, "flags": 1}, + {"matrix": [7, 7], "x": 224, "y": 64, "flags": 1} + ], "driver": "is31fl3731", "sleep": true }, diff --git a/keyboards/input_club/whitefox/whitefox.c b/keyboards/input_club/whitefox/whitefox.c index 773dbd3dc9..9d0497b2f9 100644 --- a/keyboards/input_club/whitefox/whitefox.c +++ b/keyboards/input_club/whitefox/whitefox.c @@ -36,47 +36,14 @@ const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = { { 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 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. */ led_matrix_set_speed(LED_MATRIX_DEFAULT_SPD), led_matrix_set_flags(LED_FLAG_ALL); -#endif matrix_init_user(); } +#endif diff --git a/keyboards/jae/j01/j01.c b/keyboards/jae/j01/j01.c deleted file mode 100644 index 4d3f8ced46..0000000000 --- a/keyboards/jae/j01/j01.c +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright Evy Dekkers - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -#include "quantum.h" - -// Optional override functions below. -// You can leave any or all of these undefined. -// These are only required if you want to perform custom actions. - - -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - - matrix_init_user(); - gpio_set_pin_output(E6); -} - -bool led_update_kb(led_t led_state) { - if(led_update_user(led_state)) { - gpio_write_pin(E6, !led_state.caps_lock); - } - - return true; -} diff --git a/keyboards/jae/j01/keyboard.json b/keyboards/jae/j01/keyboard.json index 56a5062c94..fd16f2a46e 100644 --- a/keyboards/jae/j01/keyboard.json +++ b/keyboards/jae/j01/keyboard.json @@ -33,6 +33,10 @@ "levels": 4, "breathing": true }, + "indicators": { + "caps_lock": "E6", + "on_state": 0 + }, "bootmagic": { "matrix": [0, 2] }, diff --git a/keyboards/janus/keyboard.json b/keyboards/janus/keyboard.json index 29000b9ef2..8c4f522b86 100644 --- a/keyboards/janus/keyboard.json +++ b/keyboards/janus/keyboard.json @@ -25,7 +25,10 @@ "nkro": true }, "split": { - "enabled": true + "enabled": true, + "serial": { + "driver": "usart" + } }, "community_layouts": [ "split_3x5_2" diff --git a/keyboards/janus/rules.mk b/keyboards/janus/rules.mk deleted file mode 100644 index 59b74ac86b..0000000000 --- a/keyboards/janus/rules.mk +++ /dev/null @@ -1 +0,0 @@ -SERIAL_DRIVER = usart
\ No newline at end of file diff --git a/keyboards/jaykeeb/kamigakushi/rules.mk b/keyboards/jaykeeb/kamigakushi/rules.mk deleted file mode 100644 index 161ec22b16..0000000000 --- a/keyboards/jaykeeb/kamigakushi/rules.mk +++ /dev/null @@ -1 +0,0 @@ -SERIAL_DRIVER = vendor diff --git a/keyboards/jels/jels88/jels88.c b/keyboards/jels/jels88/jels88.c deleted file mode 100644 index ceb187ab17..0000000000 --- a/keyboards/jels/jels88/jels88.c +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright 2021 Joah Nelson (Jels) - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -// not much here ... just indicator LEDs - -#include "quantum.h" - -// LED indicator pins -#define CAPS_LED D5 -#define SCROLL_LED D4 - -void keyboard_pre_init_kb(void) { - gpio_set_pin_output(CAPS_LED); - gpio_set_pin_output(SCROLL_LED); - keyboard_pre_init_user(); -} - -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if (res) { - gpio_write_pin(CAPS_LED, led_state.caps_lock); - gpio_write_pin(SCROLL_LED, led_state.scroll_lock); - } - return res; -} diff --git a/keyboards/jels/jels88/keyboard.json b/keyboards/jels/jels88/keyboard.json index ee9b64ed6a..e4d2c6e273 100644 --- a/keyboards/jels/jels88/keyboard.json +++ b/keyboards/jels/jels88/keyboard.json @@ -23,6 +23,10 @@ "resync": true } }, + "indicators": { + "caps_lock": "D5", + "scroll_lock": "D4" + }, "matrix_pins": { "cols": ["C7", "C6", "F7", "F6", "F5", "F4", "B1", "D2", "D3"], "rows": ["B3", "B2", "D1", "D0", "E6", "B0", "F0", "F1", "B5", "B4", "D7", "D6"] diff --git a/keyboards/jian/rev1/config.h b/keyboards/jian/rev1/config.h index 7ee2effd51..9d45e84064 100644 --- a/keyboards/jian/rev1/config.h +++ b/keyboards/jian/rev1/config.h @@ -20,8 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define USE_I2C /* Select hand configuration */ -// #define MASTER_LEFT -// #define MASTER_RIGHT #define EE_HANDS // different Jian configs diff --git a/keyboards/jian/rev2/config.h b/keyboards/jian/rev2/config.h index 33ba0ecbc5..b236a8cbe1 100644 --- a/keyboards/jian/rev2/config.h +++ b/keyboards/jian/rev2/config.h @@ -18,7 +18,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once //#define EE_HANDS -#define SPLIT_HAND_PIN E6 #define PHYSICAL_LEDS_ENABLE #define IOS_DEVICE_ENABLE diff --git a/keyboards/jian/rev2/keyboard.json b/keyboards/jian/rev2/keyboard.json index e64df224a5..8f04cdae45 100644 --- a/keyboards/jian/rev2/keyboard.json +++ b/keyboards/jian/rev2/keyboard.json @@ -39,7 +39,12 @@ }, "split": { "enabled": true, - "soft_serial_pin": "D1" + "handedness": { + "pin": "E6" + }, + "serial": { + "pin": "D1" + } }, "processor": "atmega32u4", "bootloader": "qmk-dfu", diff --git a/keyboards/jiran/config.h b/keyboards/jiran/config.h deleted file mode 100644 index 16a45b256b..0000000000 --- a/keyboards/jiran/config.h +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 2020 Vladislav Morozov <[email protected]> - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#pragma once - -#define MASTER_LEFT diff --git a/keyboards/jiran/info.json b/keyboards/jiran/info.json index 061ac2cc7c..b06266ec8c 100644 --- a/keyboards/jiran/info.json +++ b/keyboards/jiran/info.json @@ -15,7 +15,9 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D1" + "serial": { + "pin": "D1" + } }, "processor": "atmega32u4", "bootloader": "caterina" diff --git a/keyboards/jones/v03/matrix.c b/keyboards/jones/v03/matrix.c index 5663f1a8fc..d8bc134cf7 100644 --- a/keyboards/jones/v03/matrix.c +++ b/keyboards/jones/v03/matrix.c @@ -79,8 +79,6 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) void matrix_init_custom(void) { // initialize key pins init_pins(); - - matrix_init_kb(); } bool matrix_scan_custom(matrix_row_t current_matrix[]) { @@ -91,6 +89,5 @@ bool matrix_scan_custom(matrix_row_t current_matrix[]) { changed |= read_cols_on_row(current_matrix, current_row); } - matrix_scan_kb(); return changed; } diff --git a/keyboards/jones/v03_1/matrix.c b/keyboards/jones/v03_1/matrix.c index 5663f1a8fc..d8bc134cf7 100644 --- a/keyboards/jones/v03_1/matrix.c +++ b/keyboards/jones/v03_1/matrix.c @@ -79,8 +79,6 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) void matrix_init_custom(void) { // initialize key pins init_pins(); - - matrix_init_kb(); } bool matrix_scan_custom(matrix_row_t current_matrix[]) { @@ -91,6 +89,5 @@ bool matrix_scan_custom(matrix_row_t current_matrix[]) { changed |= read_cols_on_row(current_matrix, current_row); } - matrix_scan_kb(); return changed; } diff --git a/keyboards/jorne/rev1/keyboard.json b/keyboards/jorne/rev1/keyboard.json index 7f67edc6ec..4e905e4bfc 100644 --- a/keyboards/jorne/rev1/keyboard.json +++ b/keyboards/jorne/rev1/keyboard.json @@ -15,7 +15,9 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D2", + "serial": { + "pin": "D2" + }, "transport": { "sync": { "indicators": true, diff --git a/keyboards/jukaie/jk01/jk01.c b/keyboards/jukaie/jk01/jk01.c index 3c6daabf02..595f6bf43f 100644 --- a/keyboards/jukaie/jk01/jk01.c +++ b/keyboards/jukaie/jk01/jk01.c @@ -155,7 +155,8 @@ void housekeeping_task_kb(void) { gpio_write_pin(C15, keymap_config.no_gui); }; -bool process_record_user(uint16_t keycode, keyrecord_t *record) { +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + if (!process_record_user(keycode, record)) { return false; } switch (keycode) { @@ -166,8 +167,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { host_consumer_send(0); } return false; /* Skip all further processing of this key */ - - default: - return true; /* Process all other keycodes normally */ } + + return true; /* Process all other keycodes normally */ };
\ No newline at end of file diff --git a/keyboards/junco/rev1/keyboard.json b/keyboards/junco/rev1/keyboard.json index 855628d3b1..936a0bf29c 100644 --- a/keyboards/junco/rev1/keyboard.json +++ b/keyboards/junco/rev1/keyboard.json @@ -39,6 +39,9 @@ {"pin_a": "GP16", "pin_b": "GP17"} ] } + }, + "serial": { + "driver": "vendor" } }, "processor": "RP2040", diff --git a/keyboards/junco/rev1/rules.mk b/keyboards/junco/rev1/rules.mk deleted file mode 100644 index 161ec22b16..0000000000 --- a/keyboards/junco/rev1/rules.mk +++ /dev/null @@ -1 +0,0 @@ -SERIAL_DRIVER = vendor diff --git a/keyboards/kabedon/kabedon980/kabedon980.c b/keyboards/kabedon/kabedon980/kabedon980.c deleted file mode 100644 index 7024a2eaa9..0000000000 --- a/keyboards/kabedon/kabedon980/kabedon980.c +++ /dev/null @@ -1,8 +0,0 @@ -#include "quantum.h" - - bool led_update_kb(led_t led_state) { - if (led_update_user(led_state)) { - gpio_write_pin(E6, !led_state.caps_lock); - } - return true; -} diff --git a/keyboards/kabedon/kabedon980/keyboard.json b/keyboards/kabedon/kabedon980/keyboard.json index cf9def2b8f..b8e100ceac 100644 --- a/keyboards/kabedon/kabedon980/keyboard.json +++ b/keyboards/kabedon/kabedon980/keyboard.json @@ -8,6 +8,10 @@ "pid": "0x3938", "device_version": "0.0.1" }, + "indicators": { + "caps_lock": "E6", + "on_state": 0 + }, "rgblight": { "saturation_steps": 8, "brightness_steps": 8, diff --git a/keyboards/kagizaraya/miniaxe/config.h b/keyboards/kagizaraya/miniaxe/config.h deleted file mode 100644 index a0e31b0f1a..0000000000 --- a/keyboards/kagizaraya/miniaxe/config.h +++ /dev/null @@ -1,38 +0,0 @@ -/* -Copyright 2018 ENDO Katsuhiro <[email protected]> - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#pragma once - -/* - * 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 EE_HANDS -#define I2C_MASTER_LEFT -//#define I2C_MASTER_RIGHT diff --git a/keyboards/kagizaraya/miniaxe/keyboard.json b/keyboards/kagizaraya/miniaxe/keyboard.json index c1de30ea79..b2e3b14d0e 100644 --- a/keyboards/kagizaraya/miniaxe/keyboard.json +++ b/keyboards/kagizaraya/miniaxe/keyboard.json @@ -10,7 +10,9 @@ }, "split": { "enabled": true, - "soft_serial_pin": "D0" + "serial": { + "pin": "D0" + } }, "rgblight": { "saturation_steps": 8, diff --git a/keyboards/kagizaraya/scythe/config.h b/keyboards/kagizaraya/scythe/config.h deleted file mode 100644 index e9f7198f44..0000000000 --- a/keyboards/kagizaraya/scythe/config.h +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright 2019 ENDO Katsuhiro <[email protected]> - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#pragma once - -/* - * 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 - -/* Serial settings */ -//#define EE_HANDS -#define I2C_MASTER_LEFT -//#define I2C_MASTER_RIGHT diff --git a/keyboards/kagizaraya/scythe/keyboard.json b/keyboards/kagizaraya/scythe/keyboard.json index 36b9a5a2d6..ed1bd99f66 100644 --- a/keyboards/kagizaraya/scythe/keyboard.json +++ b/keyboards/kagizaraya/scythe/keyboard.json @@ -18,7 +18,9 @@ }, "split": { "enabled": true, - "soft_serial_pin": "D0" + "serial": { + "pin": "D0" + } }, "rgblight": { "saturation_steps": 8, diff --git a/keyboards/kakunpc/rabbit_capture_plan/keyboard.json b/keyboards/kakunpc/rabbit_capture_plan/keyboard.json index 3d6e7958f4..8bf5d708c9 100644 --- a/keyboards/kakunpc/rabbit_capture_plan/keyboard.json +++ b/keyboards/kakunpc/rabbit_capture_plan/keyboard.json @@ -53,7 +53,9 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D2" + "serial": { + "pin": "D2" + } }, "processor": "atmega32u4", "bootloader": "caterina", diff --git a/keyboards/kakunpc/suihankey/split/alpha/config.h b/keyboards/kakunpc/suihankey/split/alpha/config.h index ebccdcca30..23900d8ab2 100644 --- a/keyboards/kakunpc/suihankey/split/alpha/config.h +++ b/keyboards/kakunpc/suihankey/split/alpha/config.h @@ -19,8 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define USE_I2C -#define SPLIT_HAND_PIN D2 - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/kakunpc/suihankey/split/info.json b/keyboards/kakunpc/suihankey/split/info.json index c186263123..d76df308fe 100644 --- a/keyboards/kakunpc/suihankey/split/info.json +++ b/keyboards/kakunpc/suihankey/split/info.json @@ -10,7 +10,12 @@ }, "split": { "enabled": true, - "soft_serial_pin": "D0" + "handedness": { + "pin": "D2" + }, + "serial": { + "pin": "D0" + } }, "processor": "atmega32u4", "bootloader": "atmel-dfu", diff --git a/keyboards/kakunpc/suihankey/split/rev1/config.h b/keyboards/kakunpc/suihankey/split/rev1/config.h index ebccdcca30..23900d8ab2 100644 --- a/keyboards/kakunpc/suihankey/split/rev1/config.h +++ b/keyboards/kakunpc/suihankey/split/rev1/config.h @@ -19,8 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define USE_I2C -#define SPLIT_HAND_PIN D2 - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/kaly/kaly42/keyboard.json b/keyboards/kaly/kaly42/keyboard.json index 38de4ccea5..3115d051df 100644 --- a/keyboards/kaly/kaly42/keyboard.json +++ b/keyboards/kaly/kaly42/keyboard.json @@ -33,6 +33,9 @@ ["A0", "A1", "A2", "NO_PIN", "NO_PIN", "NO_PIN"] ] } + }, + "serial": { + "driver": "usart" } }, "url": "https://github.com/Dwctor/Kaly", diff --git a/keyboards/kaly/kaly42/rules.mk b/keyboards/kaly/kaly42/rules.mk deleted file mode 100644 index c6e2988321..0000000000 --- a/keyboards/kaly/kaly42/rules.mk +++ /dev/null @@ -1 +0,0 @@ -SERIAL_DRIVER = usart diff --git a/keyboards/kapcave/gskt00/keymaps/default-poly/config.h b/keyboards/kapcave/gskt00/keymaps/default-poly/config.h index 40a7c6ec47..9d03a669c8 100644 --- a/keyboards/kapcave/gskt00/keymaps/default-poly/config.h +++ b/keyboards/kapcave/gskt00/keymaps/default-poly/config.h @@ -16,8 +16,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #pragma once -#define ENCODERS_PAD_A { D5 } -#define ENCODERS_PAD_B { D3 } +#define ENCODER_A_PINS { D5 } +#define ENCODER_B_PINS { D3 } #define WS2812_DI_PIN D0 #define RGBLIGHT_EFFECT_BREATHING diff --git a/keyboards/kapl/rev1/config.h b/keyboards/kapl/rev1/config.h deleted file mode 100644 index 80db6dce60..0000000000 --- a/keyboards/kapl/rev1/config.h +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright 2022 Alexander Lozyuk (@keyzog) -// SPDX-License-Identifier: GPL-2.0-or-later -#pragma once - -/* Select hand configuration */ -#define MASTER_LEFT diff --git a/keyboards/kapl/rev1/keyboard.json b/keyboards/kapl/rev1/keyboard.json index 71e0678a42..820c647ccf 100644 --- a/keyboards/kapl/rev1/keyboard.json +++ b/keyboards/kapl/rev1/keyboard.json @@ -61,7 +61,9 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D2", + "serial": { + "pin": "D2" + }, "transport": { "sync": { "indicators": true, diff --git a/keyboards/karn/keyboard.json b/keyboards/karn/keyboard.json index b088f61425..1ddd8e5a98 100644 --- a/keyboards/karn/keyboard.json +++ b/keyboards/karn/keyboard.json @@ -21,7 +21,10 @@ "matrix": [0, 1] }, "split": { - "enabled": true + "enabled": true, + "serial": { + "driver": "usart" + } }, "layouts": { "LAYOUT": { diff --git a/keyboards/karn/rules.mk b/keyboards/karn/rules.mk deleted file mode 100644 index c6e2988321..0000000000 --- a/keyboards/karn/rules.mk +++ /dev/null @@ -1 +0,0 @@ -SERIAL_DRIVER = usart diff --git a/keyboards/kb58/keyboard.json b/keyboards/kb58/keyboard.json index 70581c2d8a..3a4698a3d2 100644 --- a/keyboards/kb58/keyboard.json +++ b/keyboards/kb58/keyboard.json @@ -15,12 +15,14 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D2", "matrix_pins": { "right": { "cols": ["F6", "B1", "E6", "D7", "C6", "D4", "D0"], "rows": ["F7", "B5", "B3", "B2", "B6"] } + }, + "serial": { + "pin": "D2" } }, "processor": "atmega32u4", diff --git a/keyboards/kbdfans/bella/soldered/keyboard.json b/keyboards/kbdfans/bella/soldered/keyboard.json index 31d8e9ffb7..aa5d915980 100644 --- a/keyboards/kbdfans/bella/soldered/keyboard.json +++ b/keyboards/kbdfans/bella/soldered/keyboard.json @@ -31,6 +31,10 @@ "backlight": { "pin": "B7" }, + "indicators": { + "caps_lock": "E6", + "on_state": 0 + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/kbdfans/bella/soldered/soldered.c b/keyboards/kbdfans/bella/soldered/soldered.c deleted file mode 100755 index bfe9f8f5d4..0000000000 --- a/keyboards/kbdfans/bella/soldered/soldered.c +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright 2020 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 <http://www.gnu.org/licenses/>. - */ -#include "quantum.h" -void matrix_init_kb(void) { - gpio_set_pin_output(E6); - matrix_init_user(); -} - -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if(res) { - gpio_write_pin(E6, !led_state.caps_lock); - } - return res; -} diff --git a/keyboards/kbdfans/kbdmini/kbdmini.c b/keyboards/kbdfans/kbdmini/kbdmini.c index 7aec00cbdc..18acc21da4 100644 --- a/keyboards/kbdfans/kbdmini/kbdmini.c +++ b/keyboards/kbdfans/kbdmini/kbdmini.c @@ -76,13 +76,3 @@ led_config_t g_led_config = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } }; - -void suspend_power_down_kb(void) { - rgb_matrix_set_suspend_state(true); - suspend_power_down_user(); -} - -void suspend_wakeup_init_kb(void) { - rgb_matrix_set_suspend_state(false); - suspend_wakeup_init_user(); -} diff --git a/keyboards/kbdfans/maja_soldered/keyboard.json b/keyboards/kbdfans/maja_soldered/keyboard.json index bf73f04d8a..f182ef97d1 100644 --- a/keyboards/kbdfans/maja_soldered/keyboard.json +++ b/keyboards/kbdfans/maja_soldered/keyboard.json @@ -31,6 +31,10 @@ "backlight": { "pin": "B5" }, + "indicators": { + "caps_lock": "D4", + "on_state": 0 + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "debounce": 3, diff --git a/keyboards/kbdfans/maja_soldered/maja_soldered.c b/keyboards/kbdfans/maja_soldered/maja_soldered.c deleted file mode 100755 index 41d80e2cc8..0000000000 --- a/keyboards/kbdfans/maja_soldered/maja_soldered.c +++ /dev/null @@ -1,29 +0,0 @@ -/* Copyright 2020 dztech kbdfans - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ -#include "quantum.h" - -void matrix_init_kb(void) { - gpio_set_pin_output(D4); - matrix_init_user(); -} - -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if(res) { - gpio_write_pin(D4, !led_state.caps_lock); - } - return res; -} diff --git a/keyboards/kbdfans/phaseone/phaseone.c b/keyboards/kbdfans/phaseone/phaseone.c index a44e501109..97cc7d2d2a 100644 --- a/keyboards/kbdfans/phaseone/phaseone.c +++ b/keyboards/kbdfans/phaseone/phaseone.c @@ -18,4 +18,6 @@ void keyboard_pre_init_kb(void) { gpio_set_pin_output(D4); + + keyboard_pre_init_user(); } diff --git a/keyboards/kc60se/kc60se.c b/keyboards/kc60se/kc60se.c deleted file mode 100644 index a7d60079b2..0000000000 --- a/keyboards/kc60se/kc60se.c +++ /dev/null @@ -1,30 +0,0 @@ -/* Copyright 2017 Blake C. 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 <http://www.gnu.org/licenses/>. - */ - -#include "quantum.h" - -void matrix_init_kb(void){ - gpio_set_pin_output(B2); -} - -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if(res) { - gpio_write_pin(B2, !led_state.caps_lock); - } - return res; -} - diff --git a/keyboards/kc60se/keyboard.json b/keyboards/kc60se/keyboard.json index b7123b5749..c8bdf24a4b 100644 --- a/keyboards/kc60se/keyboard.json +++ b/keyboards/kc60se/keyboard.json @@ -27,6 +27,10 @@ "pin": "F5", "levels": 6 }, + "indicators": { + "caps_lock": "B2", + "on_state": 0 + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "community_layouts": ["60_ansi", "60_ansi_split_bs_rshift", "60_iso", "60_iso_split_bs_rshift"], diff --git a/keyboards/keaboard/rev1/keyboard.json b/keyboards/keaboard/rev1/keyboard.json index 5eee555e4b..1b5b492075 100644 --- a/keyboards/keaboard/rev1/keyboard.json +++ b/keyboards/keaboard/rev1/keyboard.json @@ -17,7 +17,9 @@ "processor": "atmega32u4", "split": { "enabled": true, - "soft_serial_pin": "D0" + "serial": { + "pin": "D0" + } }, "features": { "extrakey": true, diff --git a/keyboards/keebio/bfo9000/keyboard.json b/keyboards/keebio/bfo9000/keyboard.json index 36fd272b90..2dcc6076a0 100644 --- a/keyboards/keebio/bfo9000/keyboard.json +++ b/keyboards/keebio/bfo9000/keyboard.json @@ -29,7 +29,9 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D0" + "serial": { + "pin": "D0" + } }, "rgblight": { "led_count": 20, diff --git a/keyboards/keebio/cepstrum/rev1/config.h b/keyboards/keebio/cepstrum/rev1/config.h index 7c3bb16bad..5ece396104 100644 --- a/keyboards/keebio/cepstrum/rev1/config.h +++ b/keyboards/keebio/cepstrum/rev1/config.h @@ -3,8 +3,6 @@ #pragma once -#define SPLIT_HAND_PIN GP4 - #define USB_VBUS_PIN GP12 #define SERIAL_USART_FULL_DUPLEX diff --git a/keyboards/keebio/cepstrum/rev1/keyboard.json b/keyboards/keebio/cepstrum/rev1/keyboard.json index 0b53d12792..26289f6236 100644 --- a/keyboards/keebio/cepstrum/rev1/keyboard.json +++ b/keyboards/keebio/cepstrum/rev1/keyboard.json @@ -9,12 +9,18 @@ }, "split": { "enabled": true, + "handedness": { + "pin": "GP4" + }, "matrix_pins": { "right": { "cols": ["GP29", "GP28", "GP27", "GP26", "GP25", "GP21", "GP15", "GP9", "GP10"], "rows": ["GP2", "GP3", "GP5", "GP8", "GP19"] } }, + "serial": { + "driver": "vendor" + }, "transport": { "sync": { "matrix_state": true diff --git a/keyboards/keebio/cepstrum/rev1/rules.mk b/keyboards/keebio/cepstrum/rev1/rules.mk deleted file mode 100644 index 161ec22b16..0000000000 --- a/keyboards/keebio/cepstrum/rev1/rules.mk +++ /dev/null @@ -1 +0,0 @@ -SERIAL_DRIVER = vendor diff --git a/keyboards/keebio/chiri_ce/rev1/keyboard.json b/keyboards/keebio/chiri_ce/rev1/keyboard.json index 8b46dd7d6d..f118a4dd1e 100644 --- a/keyboards/keebio/chiri_ce/rev1/keyboard.json +++ b/keyboards/keebio/chiri_ce/rev1/keyboard.json @@ -124,6 +124,9 @@ "rows": ["GP24", "GP23", "GP21", "GP3"] } }, + "serial": { + "driver": "vendor" + }, "transport": { "sync_matrix_state": true } diff --git a/keyboards/keebio/chiri_ce/rev1/rules.mk b/keyboards/keebio/chiri_ce/rev1/rules.mk deleted file mode 100644 index 161ec22b16..0000000000 --- a/keyboards/keebio/chiri_ce/rev1/rules.mk +++ /dev/null @@ -1 +0,0 @@ -SERIAL_DRIVER = vendor diff --git a/keyboards/keebio/foldkb/rev1/config.h b/keyboards/keebio/foldkb/rev1/config.h index 0435a34e7f..572ff9a83a 100644 --- a/keyboards/keebio/foldkb/rev1/config.h +++ b/keyboards/keebio/foldkb/rev1/config.h @@ -16,6 +16,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -#define SPLIT_HAND_PIN F7 - #define RGBLIGHT_DEFAULT_MODE (RGBLIGHT_MODE_RAINBOW_SWIRL + 2) diff --git a/keyboards/keebio/foldkb/rev1/keyboard.json b/keyboards/keebio/foldkb/rev1/keyboard.json index c7055400a5..70808c2662 100644 --- a/keyboards/keebio/foldkb/rev1/keyboard.json +++ b/keyboards/keebio/foldkb/rev1/keyboard.json @@ -23,7 +23,12 @@ }, "split": { "enabled": true, - "soft_serial_pin": "D0" + "handedness": { + "pin": "F7" + }, + "serial": { + "pin": "D0" + } }, "rgblight": { "led_count": 16, diff --git a/keyboards/keebio/fourier/config.h b/keyboards/keebio/fourier/config.h deleted file mode 100644 index 49d868c968..0000000000 --- a/keyboards/keebio/fourier/config.h +++ /dev/null @@ -1,38 +0,0 @@ -/* -Copyright 2012 Jun Wako <[email protected]> -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 <http://www.gnu.org/licenses/>. -*/ - -#pragma once - -/* Split Defines */ -#define SPLIT_HAND_PIN D2 - -/* - * 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 diff --git a/keyboards/keebio/fourier/keyboard.json b/keyboards/keebio/fourier/keyboard.json index 189276b877..057598a259 100644 --- a/keyboards/keebio/fourier/keyboard.json +++ b/keyboards/keebio/fourier/keyboard.json @@ -36,7 +36,12 @@ }, "split": { "enabled": true, - "soft_serial_pin": "D0" + "handedness": { + "pin": "D2" + }, + "serial": { + "pin": "D0" + } }, "rgblight": { "led_count": 14, diff --git a/keyboards/keebio/iris/keymaps/dvorak/config.h b/keyboards/keebio/iris/keymaps/dvorak/config.h deleted file mode 100644 index 0776d7e179..0000000000 --- a/keyboards/keebio/iris/keymaps/dvorak/config.h +++ /dev/null @@ -1,38 +0,0 @@ -/* -Copyright 2017 Danny Nguyen <[email protected]> - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#pragma once - -/* Select hand configuration */ - -#define MASTER_LEFT - -#undef RGBLIGHT_LED_COUNT -#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 -#define RGBLIGHT_LED_COUNT 12 -#define RGBLIGHT_HUE_STEP 8 -#define RGBLIGHT_SAT_STEP 8 -#define RGBLIGHT_VAL_STEP 8 diff --git a/keyboards/keebio/iris/keymaps/dvorak/keebio_iris_rev2_layout_dvorak.json b/keyboards/keebio/iris/keymaps/dvorak/keebio_iris_rev2_layout_dvorak.json deleted file mode 100644 index 8f55ce3a4c..0000000000 --- a/keyboards/keebio/iris/keymaps/dvorak/keebio_iris_rev2_layout_dvorak.json +++ /dev/null @@ -1,192 +0,0 @@ -{ - "author": "", - "layers": [ - [ - "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_QUOT", - "KC_COMM", - "KC_DOT", - "KC_P", - "KC_Y", - "KC_F", - "KC_G", - "KC_C", - "KC_R", - "KC_L", - "KC_SLSH", - "KC_LCTL", - "KC_A", - "KC_O", - "KC_E", - "KC_U", - "KC_I", - "KC_D", - "KC_H", - "KC_T", - "KC_N", - "KC_S", - "KC_MINS", - "KC_LSFT", - "KC_SCLN", - "KC_Q", - "KC_J", - "KC_K", - "KC_X", - "KC_HOME", - "KC_END", - "KC_B", - "KC_M", - "KC_W", - "KC_V", - "KC_Z", - "KC_RSFT", - "MO(1)", - "KC_LGUI", - "KC_ENT", - "KC_SPC", - "KC_RALT", - "MO(2)" - ], - [ - "KC_TILD", - "KC_EXLM", - "KC_AT", - "KC_HASH", - "KC_DLR", - "KC_PERC", - "KC_CIRC", - "KC_AMPR", - "KC_ASTR", - "KC_LPRN", - "KC_RPRN", - "KC_BSPC", - "QK_BOOT", - "KC_1", - "KC_2", - "KC_3", - "KC_4", - "KC_5", - "KC_6", - "KC_7", - "KC_8", - "KC_9", - "KC_0", - "KC_GRV", - "KC_DEL", - "KC_NO", - "KC_LEFT", - "KC_RGHT", - "KC_UP", - "KC_LCBR", - "KC_RCBR", - "KC_P4", - "KC_P5", - "KC_P6", - "KC_PPLS", - "KC_BSPC", - "BL_UP", - "KC_NO", - "KC_NO", - "KC_NO", - "KC_DOWN", - "KC_LBRC", - "KC_LPRN", - "KC_RPRN", - "KC_RBRC", - "KC_P1", - "KC_P2", - "KC_P3", - "KC_PMNS", - "KC_PIPE", - "KC_NO", - "KC_NO", - "KC_DEL", - "KC_DEL", - "KC_NO", - "KC_P0" - ], - [ - "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_TOG", - "KC_EXLM", - "KC_AT", - "KC_HASH", - "KC_DLR", - "KC_PERC", - "KC_CIRC", - "KC_AMPR", - "KC_ASTR", - "KC_LPRN", - "KC_RPRN", - "KC_NO", - "RGB_MOD", - "KC_MRWD", - "KC_MFFD", - "KC_VOLU", - "KC_PGUP", - "KC_UNDS", - "KC_PEQL", - "KC_HOME", - "RGB_HUI", - "RGB_SAI", - "RGB_VAI", - "KC_BSLS", - "KC_MUTE", - "KC_MSTP", - "KC_MPLY", - "KC_VOLD", - "KC_PGDN", - "KC_PMNS", - "KC_NO", - "KC_NO", - "KC_PPLS", - "KC_END", - "RGB_HUD", - "RGB_SAD", - "RGB_VAD", - "KC_NO", - "KC_NO", - "KC_NO", - "KC_NO", - "KC_NO", - "KC_NO", - "KC_NO" - ] - ], - "layout": "LAYOUT", - "keymap": "keebio_iris_rev2_layout_dvorak.json", - "keyboard": "keebio/iris/rev2", - "documentation": "\"This file is a QMK Configurator export. You can import this at <https://config.qmk.fm>. It can also be used directly with QMK's source code. - -To setup your QMK environment check out the tutorial: <https://docs.qmk.fm/#/newbs> - -You can convert this file to a keymap.c using this command: `qmk json2c {keymap}` - -You can compile this keymap using this command: `qmk compile {keymap}`\" -", - "notes": "", - "version": 1 -} diff --git a/keyboards/keebio/iris/keymaps/dvorak/keymap.c b/keyboards/keebio/iris/keymaps/dvorak/keymap.c deleted file mode 100644 index ce99d1a563..0000000000 --- a/keyboards/keebio/iris/keymaps/dvorak/keymap.c +++ /dev/null @@ -1,73 +0,0 @@ -#include QMK_KEYBOARD_H -enum my_layers { - _DVORAK, - _LOWER, - _RAISE, - _ADJUST -}; - -#define RAISE MO(_RAISE) -#define LOWER MO(_LOWER) - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - [_DVORAK] = LAYOUT( - //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, - //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ - KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, - //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ - KC_LCTL, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, - //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_HOME, KC_END, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, - //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ - LOWER, KC_LGUI, KC_ENT, KC_SPC, KC_RALT, RAISE - // └────────┴────────┴────────┘ └────────┴────────┴────────┘ - ), - - [_LOWER] = LAYOUT( - //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ - KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, - //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ - QK_BOOT, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRAVE, - //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ - KC_DEL, _______, KC_LEFT, KC_RGHT, KC_UP, KC_LBRC, KC_RBRC, KC_P4, KC_P5, KC_P6, KC_PLUS, KC_BSPC, - //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - BL_STEP, _______, _______, _______, KC_DOWN, KC_LCBR, KC_LPRN, KC_RPRN, KC_RCBR, KC_P1, KC_P2, KC_P3, KC_MINS, KC_PIPE, - //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ - _______, _______, KC_DEL, KC_DEL, _______, KC_P0 - // └────────┴────────┴────────┘ └────────┴────────┴────────┘ - ), - - [_RAISE] = LAYOUT( - //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ - KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, - //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ - RGB_TOG, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, - //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ - RGB_MOD, KC_MPRV, KC_MNXT, KC_VOLU, KC_PGUP, KC_UNDS, KC_EQL, KC_HOME, RGB_HUI, RGB_SAI, RGB_VAI, KC_BSLS, - //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - KC_MUTE, KC_MSTP, KC_MPLY, KC_VOLD, KC_PGDN, KC_MINS, _______, _______, KC_PLUS, KC_END, RGB_HUD, RGB_SAD, RGB_VAD, _______, - //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ - _______, _______, _______, _______, _______, _______ - // └────────┴────────┴────────┘ └────────┴────────┴────────┘ - ), - - [_ADJUST] = LAYOUT( - //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ - _______, _______, _______, _______, _______, _______ - // └────────┴────────┴────────┘ └────────┴────────┴────────┘ - ) -}; - -layer_state_t layer_state_set_user(layer_state_t state) { - return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); -} diff --git a/keyboards/keebio/iris/keymaps/dvorak/readme.md b/keyboards/keebio/iris/keymaps/dvorak/readme.md deleted file mode 100644 index 8397ef84ac..0000000000 --- a/keyboards/keebio/iris/keymaps/dvorak/readme.md +++ /dev/null @@ -1,16 +0,0 @@ - -![Iris Dvorak keymap](https://i.imgur.com/DXESYqV.png) - -# Dvorak - -``` -make keebio/iris/rev2:dvorak -``` -``` -make keebio/iris/rev3:dvorak -``` -``` -make keebio/iris/rev4:dvorak -``` - -Tested with Iris rev. 2 diff --git a/keyboards/keebio/iris/keymaps/dvorak/rules.mk b/keyboards/keebio/iris/keymaps/dvorak/rules.mk deleted file mode 100644 index d7463419b4..0000000000 --- a/keyboards/keebio/iris/keymaps/dvorak/rules.mk +++ /dev/null @@ -1,2 +0,0 @@ -RGBLIGHT_ENABLE = yes -BACKLIGHT_ENABLE = yes diff --git a/keyboards/keebio/iris/rev1/keyboard.json b/keyboards/keebio/iris/rev1/keyboard.json index 334fbdfc93..f9c1573a15 100644 --- a/keyboards/keebio/iris/rev1/keyboard.json +++ b/keyboards/keebio/iris/rev1/keyboard.json @@ -32,7 +32,9 @@ }, "split": { "enabled": true, - "soft_serial_pin": "D0" + "serial": { + "pin": "D0" + } }, "rgblight": { "led_count": 12, diff --git a/keyboards/keebio/iris/rev1_led/keyboard.json b/keyboards/keebio/iris/rev1_led/keyboard.json index fe934c6c03..69f14d8494 100644 --- a/keyboards/keebio/iris/rev1_led/keyboard.json +++ b/keyboards/keebio/iris/rev1_led/keyboard.json @@ -31,7 +31,9 @@ }, "split": { "enabled": true, - "soft_serial_pin": "D0" + "serial": { + "pin": "D0" + } }, "rgblight": { "led_count": 12, diff --git a/keyboards/keebio/iris/rev2/keyboard.json b/keyboards/keebio/iris/rev2/keyboard.json index 7afe1c5cae..37a4764c6b 100644 --- a/keyboards/keebio/iris/rev2/keyboard.json +++ b/keyboards/keebio/iris/rev2/keyboard.json @@ -15,7 +15,9 @@ }, "split": { "enabled": true, - "soft_serial_pin": "D0" + "serial": { + "pin": "D0" + } }, "rgblight": { "led_count": 12, diff --git a/keyboards/keebio/iris/rev3/config.h b/keyboards/keebio/iris/rev3/config.h deleted file mode 100644 index ff730d345c..0000000000 --- a/keyboards/keebio/iris/rev3/config.h +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 2017 Danny Nguyen <[email protected]> - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#pragma once - -#define SPLIT_HAND_PIN F0 diff --git a/keyboards/keebio/iris/rev3/keyboard.json b/keyboards/keebio/iris/rev3/keyboard.json index e2353d751f..f7b3f894fe 100644 --- a/keyboards/keebio/iris/rev3/keyboard.json +++ b/keyboards/keebio/iris/rev3/keyboard.json @@ -45,7 +45,12 @@ }, "split": { "enabled": true, - "soft_serial_pin": "D0" + "handedness": { + "pin": "F0" + }, + "serial": { + "pin": "D0" + } }, "processor": "atmega32u4", "bootloader": "qmk-dfu", diff --git a/keyboards/keebio/iris/rev4/config.h b/keyboards/keebio/iris/rev4/config.h deleted file mode 100644 index 246049a730..0000000000 --- a/keyboards/keebio/iris/rev4/config.h +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 2019 Danny Nguyen <[email protected]> - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#pragma once - -#define SPLIT_HAND_PIN D5 diff --git a/keyboards/keebio/iris/rev4/keyboard.json b/keyboards/keebio/iris/rev4/keyboard.json index ee06554d08..3acd3d0a14 100644 --- a/keyboards/keebio/iris/rev4/keyboard.json +++ b/keyboards/keebio/iris/rev4/keyboard.json @@ -45,7 +45,6 @@ }, "split": { "enabled": true, - "soft_serial_pin": "D0", "encoder": { "right": { "rotary": [ @@ -53,11 +52,17 @@ ] } }, + "handedness": { + "pin": "D5" + }, "matrix_pins": { "right": { "cols": ["D4", "D7", "D3", "B7", "F0", "B3"], "rows": ["B1", "B2", "D2", "F1", "F4"] } + }, + "serial": { + "pin": "D0" } }, "processor": "atmega32u4", diff --git a/keyboards/keebio/iris/rev5/config.h b/keyboards/keebio/iris/rev5/config.h index 4b67b6632f..71d2044aa6 100644 --- a/keyboards/keebio/iris/rev5/config.h +++ b/keyboards/keebio/iris/rev5/config.h @@ -17,6 +17,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -#define SPLIT_HAND_PIN D5 - #define RGBLIGHT_DEFAULT_MODE (RGBLIGHT_MODE_RAINBOW_SWIRL + 2) diff --git a/keyboards/keebio/iris/rev5/keyboard.json b/keyboards/keebio/iris/rev5/keyboard.json index a1f97a7831..043ecdb95e 100644 --- a/keyboards/keebio/iris/rev5/keyboard.json +++ b/keyboards/keebio/iris/rev5/keyboard.json @@ -62,7 +62,6 @@ }, "split": { "enabled": true, - "soft_serial_pin": "D0", "encoder": { "right": { "rotary": [ @@ -70,11 +69,17 @@ ] } }, + "handedness": { + "pin": "D5" + }, "matrix_pins": { "right": { "cols": ["D4", "D7", "D3", "B7", "F0", "B3"], "rows": ["B1", "B2", "D2", "F1", "F4"] } + }, + "serial": { + "pin": "D0" } }, "processor": "atmega32u4", diff --git a/keyboards/keebio/iris/rev6/config.h b/keyboards/keebio/iris/rev6/config.h index f52c020dee..867a96ad95 100644 --- a/keyboards/keebio/iris/rev6/config.h +++ b/keyboards/keebio/iris/rev6/config.h @@ -17,6 +17,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -#define SPLIT_HAND_PIN D5 - #define RGBLIGHT_DEFAULT_MODE (RGBLIGHT_MODE_RAINBOW_SWIRL + 2) diff --git a/keyboards/keebio/iris/rev6/keyboard.json b/keyboards/keebio/iris/rev6/keyboard.json index 7bbaabe277..ef240c5ab9 100644 --- a/keyboards/keebio/iris/rev6/keyboard.json +++ b/keyboards/keebio/iris/rev6/keyboard.json @@ -85,12 +85,17 @@ }, "split": { "enabled": true, - "soft_serial_pin": "D0", + "handedness": { + "pin": "D5" + }, "matrix_pins": { "right": { "cols": ["D4", "D6", "D7", "C7", "F1", "F4"], "rows": ["B1", "F0", "F5", "B4", "B5"] } + }, + "serial": { + "pin": "D0" } }, "processor": "atmega32u4", diff --git a/keyboards/keebio/iris/rev7/config.h b/keyboards/keebio/iris/rev7/config.h index eec56a2620..b5f24925c0 100644 --- a/keyboards/keebio/iris/rev7/config.h +++ b/keyboards/keebio/iris/rev7/config.h @@ -17,6 +17,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -#define SPLIT_HAND_PIN D5 - #define RGBLIGHT_DEFAULT_MODE (RGBLIGHT_MODE_RAINBOW_SWIRL + 2) diff --git a/keyboards/keebio/iris/rev7/keyboard.json b/keyboards/keebio/iris/rev7/keyboard.json index decb81a18e..79b410cd94 100644 --- a/keyboards/keebio/iris/rev7/keyboard.json +++ b/keyboards/keebio/iris/rev7/keyboard.json @@ -84,12 +84,17 @@ }, "split": { "enabled": true, - "soft_serial_pin": "D0", + "handedness": { + "pin": "D5" + }, "matrix_pins": { "right": { "cols": ["D4", "D6", "D7", "C7", "F1", "F4"], "rows": ["B1", "F0", "F5", "B4", "B5"] } + }, + "serial": { + "pin": "D0" } }, "processor": "atmega32u4", diff --git a/keyboards/keebio/iris/rev8/config.h b/keyboards/keebio/iris/rev8/config.h index 3ea59ffcf6..e9eb512981 100644 --- a/keyboards/keebio/iris/rev8/config.h +++ b/keyboards/keebio/iris/rev8/config.h @@ -3,8 +3,6 @@ #pragma once -#define SPLIT_HAND_PIN GP4 - #define USB_VBUS_PIN GP8 #define SERIAL_USART_FULL_DUPLEX diff --git a/keyboards/keebio/iris/rev8/keyboard.json b/keyboards/keebio/iris/rev8/keyboard.json index 85676067c0..7ff198afa7 100644 --- a/keyboards/keebio/iris/rev8/keyboard.json +++ b/keyboards/keebio/iris/rev8/keyboard.json @@ -24,12 +24,18 @@ }, "split": { "enabled": true, + "handedness": { + "pin": "GP4" + }, "matrix_pins": { "right": { "cols": ["GP27", "GP28", "GP3", "GP6", "GP29", "GP16"], "rows": ["GP22", "GP19", "GP18", "GP17", "GP7"] } }, + "serial": { + "driver": "vendor" + }, "transport": { "sync" :{ "matrix_state": true diff --git a/keyboards/keebio/iris/rev8/rules.mk b/keyboards/keebio/iris/rev8/rules.mk deleted file mode 100644 index 161ec22b16..0000000000 --- a/keyboards/keebio/iris/rev8/rules.mk +++ /dev/null @@ -1 +0,0 @@ -SERIAL_DRIVER = vendor diff --git a/keyboards/keebio/iris_ce/rev1/config.h b/keyboards/keebio/iris_ce/rev1/config.h index e5f43f001e..2a9d57b061 100644 --- a/keyboards/keebio/iris_ce/rev1/config.h +++ b/keyboards/keebio/iris_ce/rev1/config.h @@ -3,7 +3,6 @@ #pragma once -#define SPLIT_HAND_PIN GP4 #define USB_VBUS_PIN GP0 #define SERIAL_USART_FULL_DUPLEX #define SERIAL_USART_TX_PIN GP12 diff --git a/keyboards/keebio/iris_ce/rev1/keyboard.json b/keyboards/keebio/iris_ce/rev1/keyboard.json index 6086f948b1..c5cab98778 100644 --- a/keyboards/keebio/iris_ce/rev1/keyboard.json +++ b/keyboards/keebio/iris_ce/rev1/keyboard.json @@ -135,12 +135,18 @@ }, "split": { "enabled": true, + "handedness": { + "pin": "GP4" + }, "matrix_pins": { "right": { "cols": ["GP29", "GP28", "GP2", "GP27", "GP18", "GP7"], "rows": ["GP26", "GP24", "GP23", "GP21", "GP3"] } }, + "serial": { + "driver": "vendor" + }, "transport": { "sync_matrix_state": true } diff --git a/keyboards/keebio/iris_ce/rev1/rules.mk b/keyboards/keebio/iris_ce/rev1/rules.mk deleted file mode 100644 index 161ec22b16..0000000000 --- a/keyboards/keebio/iris_ce/rev1/rules.mk +++ /dev/null @@ -1 +0,0 @@ -SERIAL_DRIVER = vendor diff --git a/keyboards/keebio/irispad/rev8/rules.mk b/keyboards/keebio/irispad/rev8/rules.mk deleted file mode 100644 index 161ec22b16..0000000000 --- a/keyboards/keebio/irispad/rev8/rules.mk +++ /dev/null @@ -1 +0,0 @@ -SERIAL_DRIVER = vendor diff --git a/keyboards/keebio/kbo5000/rev1/config.h b/keyboards/keebio/kbo5000/rev1/config.h index edc732d668..12f7f76c87 100644 --- a/keyboards/keebio/kbo5000/rev1/config.h +++ b/keyboards/keebio/kbo5000/rev1/config.h @@ -18,6 +18,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -#define SPLIT_HAND_PIN F7 - #define CAPS_LOCK_LED_PIN B6 diff --git a/keyboards/keebio/kbo5000/rev1/keyboard.json b/keyboards/keebio/kbo5000/rev1/keyboard.json index b42b7116db..a74aef9485 100644 --- a/keyboards/keebio/kbo5000/rev1/keyboard.json +++ b/keyboards/keebio/kbo5000/rev1/keyboard.json @@ -43,7 +43,6 @@ }, "split": { "enabled": true, - "soft_serial_pin": "D0", "encoder": { "right": { "rotary": [ @@ -52,11 +51,17 @@ ] } }, + "handedness": { + "pin": "F7" + }, "matrix_pins": { "right": { "cols": ["F1", "F0", "F4", "F5", "F6", "D5", "D2", "D3", "B7", "B1"], "rows": ["B3", "B2", "B6", "B4", "D7", "B0"] } + }, + "serial": { + "pin": "D0" } }, "processor": "atmega32u4", diff --git a/keyboards/keebio/levinson/rev1/keyboard.json b/keyboards/keebio/levinson/rev1/keyboard.json index ef4996615c..798f2fc6f1 100644 --- a/keyboards/keebio/levinson/rev1/keyboard.json +++ b/keyboards/keebio/levinson/rev1/keyboard.json @@ -1,7 +1,9 @@ { "keyboard_name": "Levinson Rev. 1", "split": { - "soft_serial_pin": "D0" + "serial": { + "pin": "D0" + } }, "usb": { "pid": "0x1146", diff --git a/keyboards/keebio/levinson/rev2/keyboard.json b/keyboards/keebio/levinson/rev2/keyboard.json index a5d3cad844..dd71186837 100644 --- a/keyboards/keebio/levinson/rev2/keyboard.json +++ b/keyboards/keebio/levinson/rev2/keyboard.json @@ -1,7 +1,9 @@ { "keyboard_name": "Levinson Rev. 2", "split": { - "soft_serial_pin": "D0" + "serial": { + "pin": "D0" + } }, "usb": { "pid": "0x2146", diff --git a/keyboards/keebio/levinson/rev3/config.h b/keyboards/keebio/levinson/rev3/config.h deleted file mode 100644 index 2c1ea67b7a..0000000000 --- a/keyboards/keebio/levinson/rev3/config.h +++ /dev/null @@ -1,22 +0,0 @@ -/* -Copyright 2012 Jun Wako <[email protected]> -Copyright 2015 Jack Humbert -Copyright 2018 Danny Nguyen <[email protected]> - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#pragma once - -#define SPLIT_HAND_PIN D2 diff --git a/keyboards/keebio/levinson/rev3/keyboard.json b/keyboards/keebio/levinson/rev3/keyboard.json index 995fb8327d..7930727755 100644 --- a/keyboards/keebio/levinson/rev3/keyboard.json +++ b/keyboards/keebio/levinson/rev3/keyboard.json @@ -1,12 +1,17 @@ { "keyboard_name": "Levinson Rev. 3", "split": { - "soft_serial_pin": "D0", + "handedness": { + "pin": "D2" + }, "matrix_pins": { "right": { "cols": ["F4", "F7", "D3", "B5", "B4", "E6"], "rows": ["D4", "B2", "B3", "B1"] } + }, + "serial": { + "pin": "D0" } }, "usb": { diff --git a/keyboards/keebio/nyquist/rev1/keyboard.json b/keyboards/keebio/nyquist/rev1/keyboard.json index 7714e4a11c..ef20252c53 100644 --- a/keyboards/keebio/nyquist/rev1/keyboard.json +++ b/keyboards/keebio/nyquist/rev1/keyboard.json @@ -25,7 +25,9 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D0" + "serial": { + "pin": "D0" + } }, "rgblight": { "led_count": 12, diff --git a/keyboards/keebio/nyquist/rev2/keyboard.json b/keyboards/keebio/nyquist/rev2/keyboard.json index bfabd92c55..d327d74599 100644 --- a/keyboards/keebio/nyquist/rev2/keyboard.json +++ b/keyboards/keebio/nyquist/rev2/keyboard.json @@ -38,7 +38,9 @@ }, "split": { "enabled": true, - "soft_serial_pin": "D0" + "serial": { + "pin": "D0" + } }, "processor": "atmega32u4", "bootloader": "caterina", diff --git a/keyboards/keebio/nyquist/rev3/config.h b/keyboards/keebio/nyquist/rev3/config.h deleted file mode 100644 index 177b2832f5..0000000000 --- a/keyboards/keebio/nyquist/rev3/config.h +++ /dev/null @@ -1,36 +0,0 @@ -/* -Copyright 2017 Danny Nguyen <[email protected]> - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#pragma once - -#define SPLIT_HAND_PIN D5 - -/* - * 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 diff --git a/keyboards/keebio/nyquist/rev3/keyboard.json b/keyboards/keebio/nyquist/rev3/keyboard.json index 062b7ebeae..f1aa1522f7 100644 --- a/keyboards/keebio/nyquist/rev3/keyboard.json +++ b/keyboards/keebio/nyquist/rev3/keyboard.json @@ -31,7 +31,12 @@ }, "split": { "enabled": true, - "soft_serial_pin": "D0" + "handedness": { + "pin": "D5" + }, + "serial": { + "pin": "D0" + } }, "rgblight": { "led_count": 12, diff --git a/keyboards/keebio/nyquist/rev4/config.h b/keyboards/keebio/nyquist/rev4/config.h index 37b015f821..e1e2d99458 100644 --- a/keyboards/keebio/nyquist/rev4/config.h +++ b/keyboards/keebio/nyquist/rev4/config.h @@ -3,8 +3,6 @@ #pragma once -#define SPLIT_HAND_PIN GP23 - #define USB_VBUS_PIN GP18 #define SERIAL_USART_FULL_DUPLEX diff --git a/keyboards/keebio/nyquist/rev4/keyboard.json b/keyboards/keebio/nyquist/rev4/keyboard.json index 804d1aa5d4..cb5c3a39f9 100644 --- a/keyboards/keebio/nyquist/rev4/keyboard.json +++ b/keyboards/keebio/nyquist/rev4/keyboard.json @@ -21,12 +21,18 @@ ] } }, + "handedness": { + "pin": "GP23" + }, "matrix_pins": { "right":{ "cols": ["GP25", "GP29", "GP20", "GP11", "GP3", "GP2"], "rows": ["GP24", "GP17", "GP15", "GP14", "GP12"] } }, + "serial": { + "driver": "vendor" + }, "transport": { "sync" :{ "matrix_state": true diff --git a/keyboards/keebio/nyquist/rev4/rules.mk b/keyboards/keebio/nyquist/rev4/rules.mk deleted file mode 100644 index 161ec22b16..0000000000 --- a/keyboards/keebio/nyquist/rev4/rules.mk +++ /dev/null @@ -1 +0,0 @@ -SERIAL_DRIVER = vendor diff --git a/keyboards/keebio/nyquist/rev5/keyboard.json b/keyboards/keebio/nyquist/rev5/keyboard.json index 83d88b37b8..fc03c00e29 100644 --- a/keyboards/keebio/nyquist/rev5/keyboard.json +++ b/keyboards/keebio/nyquist/rev5/keyboard.json @@ -31,6 +31,9 @@ "rows": ["GP24", "GP17", "GP15", "GP14", "GP12"] } }, + "serial": { + "driver": "vendor" + }, "transport": { "sync" :{ "matrix_state": true diff --git a/keyboards/keebio/nyquist/rev5/rules.mk b/keyboards/keebio/nyquist/rev5/rules.mk deleted file mode 100644 index 161ec22b16..0000000000 --- a/keyboards/keebio/nyquist/rev5/rules.mk +++ /dev/null @@ -1 +0,0 @@ -SERIAL_DRIVER = vendor diff --git a/keyboards/keebio/quefrency/rev1/config.h b/keyboards/keebio/quefrency/rev1/config.h deleted file mode 100644 index c62ff4fef9..0000000000 --- a/keyboards/keebio/quefrency/rev1/config.h +++ /dev/null @@ -1,21 +0,0 @@ -/* -Copyright 2012 Jun Wako <[email protected]> -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 <http://www.gnu.org/licenses/>. -*/ - -#pragma once - -#define SPLIT_HAND_PIN D2 diff --git a/keyboards/keebio/quefrency/rev1/keyboard.json b/keyboards/keebio/quefrency/rev1/keyboard.json index 598fc55000..73f6d0d660 100644 --- a/keyboards/keebio/quefrency/rev1/keyboard.json +++ b/keyboards/keebio/quefrency/rev1/keyboard.json @@ -33,12 +33,17 @@ }, "diode_direction": "COL2ROW", "split": { - "soft_serial_pin": "D0", + "handedness": { + "pin": "D2" + }, "matrix_pins": { "right": { "cols": ["F5", "F6", "F7", "B1", "B3", "B2", "B6", "C6"], "rows": ["F4", "D4", "D7", "E6", "B4", "B5"] } + }, + "serial": { + "pin": "D0" } }, "processor": "atmega32u4", diff --git a/keyboards/keebio/quefrency/rev2/config.h b/keyboards/keebio/quefrency/rev2/config.h index edc732d668..12f7f76c87 100644 --- a/keyboards/keebio/quefrency/rev2/config.h +++ b/keyboards/keebio/quefrency/rev2/config.h @@ -18,6 +18,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -#define SPLIT_HAND_PIN F7 - #define CAPS_LOCK_LED_PIN B6 diff --git a/keyboards/keebio/quefrency/rev2/keyboard.json b/keyboards/keebio/quefrency/rev2/keyboard.json index 0529fa13a6..f9645b044b 100644 --- a/keyboards/keebio/quefrency/rev2/keyboard.json +++ b/keyboards/keebio/quefrency/rev2/keyboard.json @@ -42,7 +42,6 @@ "pin": "E6" }, "split": { - "soft_serial_pin": "D0", "encoder": { "right": { "rotary": [ @@ -50,11 +49,17 @@ ] } }, + "handedness": { + "pin": "F7" + }, "matrix_pins": { "right": { "cols": ["F1", "F0", "F4", "F5", "F6", "D5", "C7", "D3", "B7"], "rows": ["B3", "B2", "B6", "B4", "D7"] } + }, + "serial": { + "pin": "D0" } }, "processor": "atmega32u4", diff --git a/keyboards/keebio/quefrency/rev3/config.h b/keyboards/keebio/quefrency/rev3/config.h index edc732d668..12f7f76c87 100644 --- a/keyboards/keebio/quefrency/rev3/config.h +++ b/keyboards/keebio/quefrency/rev3/config.h @@ -18,6 +18,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -#define SPLIT_HAND_PIN F7 - #define CAPS_LOCK_LED_PIN B6 diff --git a/keyboards/keebio/quefrency/rev3/keyboard.json b/keyboards/keebio/quefrency/rev3/keyboard.json index bd8d86f884..cd967977d5 100644 --- a/keyboards/keebio/quefrency/rev3/keyboard.json +++ b/keyboards/keebio/quefrency/rev3/keyboard.json @@ -42,7 +42,6 @@ "pin": "E6" }, "split": { - "soft_serial_pin": "D0", "encoder": { "right": { "rotary": [ @@ -50,11 +49,17 @@ ] } }, + "handedness": { + "pin": "F7" + }, "matrix_pins": { "right": { "cols": ["F1", "F0", "F4", "F5", "F6", "D5", "C7", "D3", "B7"], "rows": ["B3", "B2", "B6", "B4", "D7"] } + }, + "serial": { + "pin": "D0" } }, "processor": "atmega32u4", diff --git a/keyboards/keebio/quefrency/rev4/config.h b/keyboards/keebio/quefrency/rev4/config.h index 0435a34e7f..572ff9a83a 100644 --- a/keyboards/keebio/quefrency/rev4/config.h +++ b/keyboards/keebio/quefrency/rev4/config.h @@ -16,6 +16,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -#define SPLIT_HAND_PIN F7 - #define RGBLIGHT_DEFAULT_MODE (RGBLIGHT_MODE_RAINBOW_SWIRL + 2) diff --git a/keyboards/keebio/quefrency/rev4/keyboard.json b/keyboards/keebio/quefrency/rev4/keyboard.json index 8cf21b4962..4b68841f3d 100644 --- a/keyboards/keebio/quefrency/rev4/keyboard.json +++ b/keyboards/keebio/quefrency/rev4/keyboard.json @@ -39,7 +39,6 @@ "pin": "E6" }, "split": { - "soft_serial_pin": "D0", "encoder": { "right": { "rotary": [ @@ -47,11 +46,17 @@ ] } }, + "handedness": { + "pin": "F7" + }, "matrix_pins": { "right": { "cols": ["F1", "F0", "F4", "F5", "F6", "D5", "C7", "D3", "B7"], "rows": ["B3", "B2", "B6", "B4", "D7"] } + }, + "serial": { + "pin": "D0" } }, "processor": "atmega32u4", diff --git a/keyboards/keebio/quefrency/rev5/config.h b/keyboards/keebio/quefrency/rev5/config.h index 0435a34e7f..572ff9a83a 100644 --- a/keyboards/keebio/quefrency/rev5/config.h +++ b/keyboards/keebio/quefrency/rev5/config.h @@ -16,6 +16,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -#define SPLIT_HAND_PIN F7 - #define RGBLIGHT_DEFAULT_MODE (RGBLIGHT_MODE_RAINBOW_SWIRL + 2) diff --git a/keyboards/keebio/quefrency/rev5/keyboard.json b/keyboards/keebio/quefrency/rev5/keyboard.json index b5f9c994af..4760510f8c 100644 --- a/keyboards/keebio/quefrency/rev5/keyboard.json +++ b/keyboards/keebio/quefrency/rev5/keyboard.json @@ -39,7 +39,6 @@ "pin": "E6" }, "split": { - "soft_serial_pin": "D0", "encoder": { "right": { "rotary": [ @@ -47,11 +46,17 @@ ] } }, + "handedness": { + "pin": "F7" + }, "matrix_pins": { "right": { "cols": ["F1", "F0", "F4", "F5", "F6", "D5", "C7", "D3", "B7"], "rows": ["B3", "B2", "B6", "B4", "D7"] } + }, + "serial": { + "pin": "D0" } }, "processor": "atmega32u4", diff --git a/keyboards/keebio/rorschach/rev1/keyboard.json b/keyboards/keebio/rorschach/rev1/keyboard.json index 8286a79174..63fe877246 100644 --- a/keyboards/keebio/rorschach/rev1/keyboard.json +++ b/keyboards/keebio/rorschach/rev1/keyboard.json @@ -39,7 +39,9 @@ }, "split": { "enabled": true, - "soft_serial_pin": "D0" + "serial": { + "pin": "D0" + } }, "processor": "atmega32u4", "bootloader": "caterina", diff --git a/keyboards/keebio/sinc/rev1/config.h b/keyboards/keebio/sinc/rev1/config.h index 80762574ab..572ff9a83a 100644 --- a/keyboards/keebio/sinc/rev1/config.h +++ b/keyboards/keebio/sinc/rev1/config.h @@ -16,7 +16,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -// wiring of each half -#define SPLIT_HAND_PIN F7 - #define RGBLIGHT_DEFAULT_MODE (RGBLIGHT_MODE_RAINBOW_SWIRL + 2) diff --git a/keyboards/keebio/sinc/rev1/keyboard.json b/keyboards/keebio/sinc/rev1/keyboard.json index a026aea007..e8703abdc1 100644 --- a/keyboards/keebio/sinc/rev1/keyboard.json +++ b/keyboards/keebio/sinc/rev1/keyboard.json @@ -25,9 +25,7 @@ }, "split": { "enabled": true, - "soft_serial_pin": "D0", "transport": { - "protocol": "serial", "sync" :{ "indicators": true } @@ -39,11 +37,17 @@ ] } }, + "handedness": { + "pin": "F7" + }, "matrix_pins": { "right": { "cols": ["F1", "F0", "F4", "F5", "F6", "D5", "C7", "D3", "B7"], "rows": ["B3", "B2", "B6", "B4", "D7", "B0"] } + }, + "serial": { + "pin": "D0" } }, "matrix_pins": { @@ -57,6 +61,9 @@ ] }, "backlight": { + "default": { + "brightness": 3 + }, "pin": "B5" }, "rgblight": { diff --git a/keyboards/keebio/sinc/rev2/config.h b/keyboards/keebio/sinc/rev2/config.h index 80762574ab..572ff9a83a 100644 --- a/keyboards/keebio/sinc/rev2/config.h +++ b/keyboards/keebio/sinc/rev2/config.h @@ -16,7 +16,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -// wiring of each half -#define SPLIT_HAND_PIN F7 - #define RGBLIGHT_DEFAULT_MODE (RGBLIGHT_MODE_RAINBOW_SWIRL + 2) diff --git a/keyboards/keebio/sinc/rev2/keyboard.json b/keyboards/keebio/sinc/rev2/keyboard.json index 77f8f3c9ca..fed181982e 100644 --- a/keyboards/keebio/sinc/rev2/keyboard.json +++ b/keyboards/keebio/sinc/rev2/keyboard.json @@ -25,9 +25,7 @@ }, "split": { "enabled": true, - "soft_serial_pin": "D0", "transport": { - "protocol": "serial", "sync" :{ "indicators": true } @@ -39,11 +37,17 @@ ] } }, + "handedness": { + "pin": "F7" + }, "matrix_pins": { "right": { "cols": ["F1", "F0", "F4", "F5", "F6", "D5", "C7", "D3", "B7"], "rows": ["B3", "B2", "B6", "B4", "D7", "B0"] } + }, + "serial": { + "pin": "D0" } }, "matrix_pins": { @@ -57,6 +61,9 @@ ] }, "backlight": { + "default": { + "brightness": 3 + }, "pin": "B5" }, "rgblight": { diff --git a/keyboards/keebio/sinc/rev3/config.h b/keyboards/keebio/sinc/rev3/config.h index 89c8c0f3d8..3771f8da1d 100644 --- a/keyboards/keebio/sinc/rev3/config.h +++ b/keyboards/keebio/sinc/rev3/config.h @@ -16,8 +16,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -#define SPLIT_HAND_PIN GP4 - #define SERIAL_USART_FULL_DUPLEX #define SERIAL_USART_TX_PIN GP0 #define SERIAL_USART_RX_PIN GP1 diff --git a/keyboards/keebio/sinc/rev3/keyboard.json b/keyboards/keebio/sinc/rev3/keyboard.json index da828dbb35..9ee599dd20 100644 --- a/keyboards/keebio/sinc/rev3/keyboard.json +++ b/keyboards/keebio/sinc/rev3/keyboard.json @@ -20,12 +20,18 @@ ] } }, + "handedness": { + "pin": "GP4" + }, "matrix_pins": { "right": { "cols": ["GP29", "GP28", "GP27", "GP7", "GP2", "GP3", "GP11", "GP12", "GP13"], "rows": ["GP16", "GP19", "GP17", "GP9", "GP8", "GP26"] } }, + "serial": { + "driver": "vendor" + }, "transport": { "sync": { "matrix_state": true diff --git a/keyboards/keebio/sinc/rev3/rules.mk b/keyboards/keebio/sinc/rev3/rules.mk deleted file mode 100644 index 161ec22b16..0000000000 --- a/keyboards/keebio/sinc/rev3/rules.mk +++ /dev/null @@ -1 +0,0 @@ -SERIAL_DRIVER = vendor diff --git a/keyboards/keebio/sinc/rev4/config.h b/keyboards/keebio/sinc/rev4/config.h index 0a9b9846eb..5042d0c924 100644 --- a/keyboards/keebio/sinc/rev4/config.h +++ b/keyboards/keebio/sinc/rev4/config.h @@ -3,8 +3,6 @@ #pragma once -#define SPLIT_HAND_PIN GP4 - #define USB_VBUS_PIN GP14 #define SERIAL_USART_FULL_DUPLEX diff --git a/keyboards/keebio/sinc/rev4/keyboard.json b/keyboards/keebio/sinc/rev4/keyboard.json index 15b28fb012..63b8994e8b 100644 --- a/keyboards/keebio/sinc/rev4/keyboard.json +++ b/keyboards/keebio/sinc/rev4/keyboard.json @@ -20,12 +20,18 @@ ] } }, + "handedness": { + "pin": "GP4" + }, "matrix_pins": { "right": { "cols": ["GP29", "GP28", "GP27", "GP7", "GP2", "GP3", "GP11", "GP12", "GP13"], "rows": ["GP16", "GP19", "GP17", "GP9", "GP8", "GP26"] } }, + "serial": { + "driver": "vendor" + }, "transport": { "sync": { "matrix_state": true diff --git a/keyboards/keebio/sinc/rev4/rules.mk b/keyboards/keebio/sinc/rev4/rules.mk deleted file mode 100644 index 161ec22b16..0000000000 --- a/keyboards/keebio/sinc/rev4/rules.mk +++ /dev/null @@ -1 +0,0 @@ -SERIAL_DRIVER = vendor diff --git a/keyboards/keebio/sinc/sinc.c b/keyboards/keebio/sinc/sinc.c index c1ebd1a206..faa3540af9 100644 --- a/keyboards/keebio/sinc/sinc.c +++ b/keyboards/keebio/sinc/sinc.c @@ -28,15 +28,6 @@ bool led_update_kb(led_t led_state) { } #endif -void eeconfig_init_kb(void) { -#ifdef BACKLIGHT_ENABLE - backlight_enable(); - backlight_level(3); -#endif - eeconfig_update_kb(0); - eeconfig_init_user(); -} - #ifdef ENCODER_ENABLE bool encoder_update_kb(uint8_t index, bool clockwise) { if (!encoder_update_user(index, clockwise)) { return false; } diff --git a/keyboards/keebio/viterbi/rev1/keyboard.json b/keyboards/keebio/viterbi/rev1/keyboard.json index b369066fc5..28177b2897 100644 --- a/keyboards/keebio/viterbi/rev1/keyboard.json +++ b/keyboards/keebio/viterbi/rev1/keyboard.json @@ -1,7 +1,9 @@ { "keyboard_name": "Viterbi Rev. 1", "split": { - "soft_serial_pin": "D0" + "serial": { + "pin": "D0" + } }, "usb": { "pid": "0x1157", diff --git a/keyboards/keebio/viterbi/rev2/config.h b/keyboards/keebio/viterbi/rev2/config.h deleted file mode 100644 index 5b609ab777..0000000000 --- a/keyboards/keebio/viterbi/rev2/config.h +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 2017 Danny Nguyen <[email protected]> - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#pragma once - -#define SPLIT_HAND_PIN D2 diff --git a/keyboards/keebio/viterbi/rev2/keyboard.json b/keyboards/keebio/viterbi/rev2/keyboard.json index 599529a365..a3e2d055b2 100644 --- a/keyboards/keebio/viterbi/rev2/keyboard.json +++ b/keyboards/keebio/viterbi/rev2/keyboard.json @@ -1,7 +1,12 @@ { "keyboard_name": "Viterbi Rev. 2", "split": { - "soft_serial_pin": "D0" + "handedness": { + "pin": "D2" + }, + "serial": { + "pin": "D0" + } }, "usb": { "pid": "0x2157", diff --git a/keyboards/keycapsss/3w6_2040/keyboard.json b/keyboards/keycapsss/3w6_2040/keyboard.json index 88bc275a69..f29b3753c6 100644 --- a/keyboards/keycapsss/3w6_2040/keyboard.json +++ b/keyboards/keycapsss/3w6_2040/keyboard.json @@ -50,6 +50,9 @@ }, "split": { "enabled": true, + "serial": { + "driver": "vendor" + }, "transport": { "sync": { "indicators": true, diff --git a/keyboards/keycapsss/3w6_2040/rules.mk b/keyboards/keycapsss/3w6_2040/rules.mk index 7b11b23005..0cac88f7f7 100644 --- a/keyboards/keycapsss/3w6_2040/rules.mk +++ b/keyboards/keycapsss/3w6_2040/rules.mk @@ -1,2 +1 @@ -SERIAL_DRIVER = vendor POINTING_DEVICE_DRIVER = pimoroni_trackball diff --git a/keyboards/keycapsss/kimiko/keymaps/default/config.h b/keyboards/keycapsss/kimiko/keymaps/default/config.h index 52faaf2b65..8be15d964a 100644 --- a/keyboards/keycapsss/kimiko/keymaps/default/config.h +++ b/keyboards/keycapsss/kimiko/keymaps/default/config.h @@ -17,11 +17,6 @@ #pragma once -/* Select hand configuration */ -#define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS - #define OLED_FONT_H "keyboards/keycapsss/kimiko/keymaps/default/glcdfont.c" // #define OLED_FONT_WIDTH 5 // #define OLED_FONT_HEIGHT 7 diff --git a/keyboards/keycapsss/kimiko/rev1/keyboard.json b/keyboards/keycapsss/kimiko/rev1/keyboard.json index 81427517bd..ae09eb83c8 100644 --- a/keyboards/keycapsss/kimiko/rev1/keyboard.json +++ b/keyboards/keycapsss/kimiko/rev1/keyboard.json @@ -25,13 +25,15 @@ ] }, "split": { - "soft_serial_pin": "D2", "encoder": { "right": { "rotary": [ {"pin_a": "F4", "pin_b": "F5"} ] } + }, + "serial": { + "pin": "D2" } }, "rgblight": { diff --git a/keyboards/keycapsss/kimiko/rev2/keyboard.json b/keyboards/keycapsss/kimiko/rev2/keyboard.json index f595bd9cc4..12a7a2c726 100644 --- a/keyboards/keycapsss/kimiko/rev2/keyboard.json +++ b/keyboards/keycapsss/kimiko/rev2/keyboard.json @@ -117,7 +117,9 @@ "rows": ["D4", "C6", "D7", "E6", "B4", "B5"] } }, - "soft_serial_pin": "D2" + "serial": { + "pin": "D2" + } }, "url": "https://keycapsss.com", "usb": { diff --git a/keyboards/keychron/c1_pro/ansi/white/keyboard.json b/keyboards/keychron/c1_pro/ansi/white/keyboard.json index c64183a739..466de1d6e3 100644 --- a/keyboards/keychron/c1_pro/ansi/white/keyboard.json +++ b/keyboards/keychron/c1_pro/ansi/white/keyboard.json @@ -190,9 +190,9 @@ {"matrix":[3, 11], "flags":4, "x":153, "y":39}, {"matrix":[3, 13], "flags":1, "x":174, "y":39}, - {"matrix":[4, 12], "flags":8, "x":198, "y":39}, - {"matrix":[4, 12], "flags":8, "x":211, "y":39}, - {"matrix":[4, 12], "flags":8, "x":224, "y":39}, + {"flags":8, "x":198, "y":39}, + {"flags":8, "x":211, "y":39}, + {"flags":8, "x":224, "y":39}, {"matrix":[4, 0], "flags":1, "x":8, "y":52}, {"matrix":[4, 2], "flags":4, "x":29, "y":52}, diff --git a/keyboards/keychron/c2_pro/ansi/white/keyboard.json b/keyboards/keychron/c2_pro/ansi/white/keyboard.json index 4c103e966d..cd05e77aa2 100644 --- a/keyboards/keychron/c2_pro/ansi/white/keyboard.json +++ b/keyboards/keychron/c2_pro/ansi/white/keyboard.json @@ -157,10 +157,10 @@ {"matrix":[0, 15], "flags":1, "x":169, "y":0}, {"matrix":[0, 16], "flags":1, "x":180, "y":0}, - {"matrix":[0, 13], "flags":8, "x":193, "y":0}, - {"matrix":[0, 13], "flags":8, "x":203, "y":0}, - {"matrix":[0, 13], "flags":8, "x":214, "y":0}, - {"matrix":[0, 13], "flags":8, "x":224, "y":0}, + {"flags":8, "x":193, "y":0}, + {"flags":8, "x":203, "y":0}, + {"flags":8, "x":214, "y":0}, + {"flags":8, "x":224, "y":0}, {"matrix":[1, 0], "flags":4, "x":0, "y":15}, {"matrix":[1, 1], "flags":4, "x":10, "y":15}, diff --git a/keyboards/keychron/c2_pro/matrix.c b/keyboards/keychron/c2_pro/matrix.c index 7d5b3e4e79..e05ac5e061 100644 --- a/keyboards/keychron/c2_pro/matrix.c +++ b/keyboards/keychron/c2_pro/matrix.c @@ -41,21 +41,21 @@ pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; -static inline void setPinOutput_writeLow(pin_t pin) { +static inline void gpio_atomic_set_pin_output_low(pin_t pin) { ATOMIC_BLOCK_FORCEON { gpio_set_pin_output(pin); gpio_write_pin_low(pin); } } -static inline void setPinOutput_writeHigh(pin_t pin) { +static inline void gpio_atomic_set_pin_output_high(pin_t pin) { ATOMIC_BLOCK_FORCEON { gpio_set_pin_output(pin); gpio_write_pin_high(pin); } } -static inline void setPinInput_high(pin_t pin) { +static inline void gpio_atomic_set_pin_input_high(pin_t pin) { ATOMIC_BLOCK_FORCEON { gpio_set_pin_input_high(pin); } @@ -106,7 +106,7 @@ static bool select_col(uint8_t col) { pin_t pin = col_pins[col]; if (col < SHIFT_COL_START || col > SHIFT_COL_END) { - setPinOutput_writeLow(pin); + gpio_atomic_set_pin_output_low(pin); return true; } else { if (col == SHIFT_COL_START) { @@ -122,9 +122,9 @@ static void unselect_col(uint8_t col) { if (col < SHIFT_COL_START || col > SHIFT_COL_END) { #ifdef MATRIX_UNSELECT_DRIVE_HIGH - setPinOutput_writeHigh(pin); + gpio_atomic_set_pin_output_high(pin); #else - setPinInput_high(pin); + gpio_atomic_set_pin_input_high(pin); #endif } else { HC595_output(0x01, 1); @@ -136,9 +136,9 @@ static void unselect_cols(void) { pin_t pin = col_pins[x]; if (x < SHIFT_COL_START || x > SHIFT_COL_END) { #ifdef MATRIX_UNSELECT_DRIVE_HIGH - setPinOutput_writeHigh(pin); + gpio_atomic_set_pin_output_high(pin); #else - setPinInput_high(pin); + gpio_atomic_set_pin_input_high(pin); #endif } else { if (x == SHIFT_COL_START) HC595_output(UNSELECT_ALL_COL, 0); @@ -181,7 +181,7 @@ void matrix_init_custom(void) { for (uint8_t x = 0; x < MATRIX_ROWS; x++) { if (row_pins[x] != NO_PIN) { - setPinInput_high(row_pins[x]); + gpio_atomic_set_pin_input_high(row_pins[x]); } } diff --git a/keyboards/keychron/q10/matrix.c b/keyboards/keychron/q10/matrix.c index b772fd7889..cd6e842e15 100644 --- a/keyboards/keychron/q10/matrix.c +++ b/keyboards/keychron/q10/matrix.c @@ -34,21 +34,21 @@ static pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; #define ROWS_PER_HAND (MATRIX_ROWS) -static inline void setPinOutput_writeLow(pin_t pin) { +static inline void gpio_atomic_set_pin_output_low(pin_t pin) { ATOMIC_BLOCK_FORCEON { gpio_set_pin_output(pin); gpio_write_pin_low(pin); } } -static inline void setPinOutput_writeHigh(pin_t pin) { +static inline void gpio_atomic_set_pin_output_high(pin_t pin) { ATOMIC_BLOCK_FORCEON { gpio_set_pin_output(pin); gpio_write_pin_high(pin); } } -static inline void setPinInputHigh_atomic(pin_t pin) { +static inline void gpio_atomic_set_pin_input_high(pin_t pin) { ATOMIC_BLOCK_FORCEON { gpio_set_pin_input_high(pin); } @@ -65,35 +65,35 @@ static inline uint8_t readMatrixPin(pin_t pin) { static void shiftOutMultiple(uint16_t dataOut) { for (uint8_t i = 0; i < 8; i++) { if (dataOut & 0x1) { - setPinOutput_writeHigh(DATA_PIN); + gpio_atomic_set_pin_output_high(DATA_PIN); } else { - setPinOutput_writeLow(DATA_PIN); + gpio_atomic_set_pin_output_low(DATA_PIN); } dataOut = dataOut >> 1; - setPinOutput_writeHigh(CLOCK_PIN); - setPinOutput_writeLow(CLOCK_PIN); + gpio_atomic_set_pin_output_high(CLOCK_PIN); + gpio_atomic_set_pin_output_low(CLOCK_PIN); } - setPinOutput_writeHigh(LATCH_PIN); - setPinOutput_writeLow(LATCH_PIN); + gpio_atomic_set_pin_output_high(LATCH_PIN); + gpio_atomic_set_pin_output_low(LATCH_PIN); } static void shiftOut_single(uint8_t dataOut) { if (dataOut & 0x1) { - setPinOutput_writeHigh(DATA_PIN); + gpio_atomic_set_pin_output_high(DATA_PIN); } else { - setPinOutput_writeLow(DATA_PIN); + gpio_atomic_set_pin_output_low(DATA_PIN); } - setPinOutput_writeHigh(CLOCK_PIN); - setPinOutput_writeLow(CLOCK_PIN); - setPinOutput_writeHigh(LATCH_PIN); - setPinOutput_writeLow(LATCH_PIN); + gpio_atomic_set_pin_output_high(CLOCK_PIN); + gpio_atomic_set_pin_output_low(CLOCK_PIN); + gpio_atomic_set_pin_output_high(LATCH_PIN); + gpio_atomic_set_pin_output_low(LATCH_PIN); } static bool select_col(uint8_t col) { pin_t pin = col_pins[col]; if (pin != NO_PIN) { - setPinOutput_writeLow(pin); + gpio_atomic_set_pin_output_low(pin); return true; } else { if (col == (MATRIX_COLS - 8)) { @@ -111,16 +111,16 @@ static void unselect_col(uint8_t col) { if (pin != NO_PIN) { #ifdef MATRIX_UNSELECT_DRIVE_HIGH - setPinOutput_writeHigh(pin); + gpio_atomic_set_pin_output_high(pin); #else - setPinInputHigh_atomic(pin); + gpio_atomic_set_pin_input_high(pin); #endif } else { if (col == (MATRIX_COLS - 1)) { - setPinOutput_writeHigh(CLOCK_PIN); - setPinOutput_writeLow(CLOCK_PIN); - setPinOutput_writeHigh(LATCH_PIN); - setPinOutput_writeLow(LATCH_PIN); + gpio_atomic_set_pin_output_high(CLOCK_PIN); + gpio_atomic_set_pin_output_low(CLOCK_PIN); + gpio_atomic_set_pin_output_high(LATCH_PIN); + gpio_atomic_set_pin_output_low(LATCH_PIN); } } } @@ -131,9 +131,9 @@ static void unselect_cols(void) { pin_t pin = col_pins[x]; if (pin != NO_PIN) { #ifdef MATRIX_UNSELECT_DRIVE_HIGH - setPinOutput_writeHigh(pin); + gpio_atomic_set_pin_output_high(pin); #else - setPinInputHigh_atomic(pin); + gpio_atomic_set_pin_input_high(pin); #endif } else { if (x == (MATRIX_COLS - 1)) { @@ -148,7 +148,7 @@ static void matrix_init_pins(void) { unselect_cols(); for (uint8_t x = 0; x < MATRIX_ROWS; x++) { if (row_pins[x] != NO_PIN) { - setPinInputHigh_atomic(row_pins[x]); + gpio_atomic_set_pin_input_high(row_pins[x]); } } } diff --git a/keyboards/keychron/q11/ansi_encoder/rules.mk b/keyboards/keychron/q11/ansi_encoder/rules.mk deleted file mode 100644 index c6e2988321..0000000000 --- a/keyboards/keychron/q11/ansi_encoder/rules.mk +++ /dev/null @@ -1 +0,0 @@ -SERIAL_DRIVER = usart diff --git a/keyboards/keychron/q11/config.h b/keyboards/keychron/q11/config.h index b1b40c98ab..1fda4b18d7 100755 --- a/keyboards/keychron/q11/config.h +++ b/keyboards/keychron/q11/config.h @@ -29,9 +29,6 @@ #define SNLED27351_CURRENT_TUNE \ { 0x80, 0xFF, 0xFF, 0x80, 0xFF, 0xFF, 0x80, 0xFF, 0xFF, 0x80, 0xFF, 0xFF } // 300mA -/* Split Keyboard specific options. */ -#define SERIAL_USART_TX_PIN A9 // USART TX pin - /* Encoder Configuration */ #define ENCODER_DEFAULT_POS 0x3 diff --git a/keyboards/keychron/q11/info.json b/keyboards/keychron/q11/info.json index 51a8e5937e..73c4233876 100755 --- a/keyboards/keychron/q11/info.json +++ b/keyboards/keychron/q11/info.json @@ -53,6 +53,10 @@ "rows": ["B5", "B4", "B3", "A15", "A14", "A13"] } }, + "serial": { + "driver": "usart", + "pin": "A9" + }, "transport": { "sync" :{ "matrix_state": true diff --git a/keyboards/keychron/q11/iso_encoder/rules.mk b/keyboards/keychron/q11/iso_encoder/rules.mk deleted file mode 100755 index c6e2988321..0000000000 --- a/keyboards/keychron/q11/iso_encoder/rules.mk +++ /dev/null @@ -1 +0,0 @@ -SERIAL_DRIVER = usart diff --git a/keyboards/keychron/q12/matrix.c b/keyboards/keychron/q12/matrix.c index 9d5e9c4d39..bfb51703a0 100644 --- a/keyboards/keychron/q12/matrix.c +++ b/keyboards/keychron/q12/matrix.c @@ -34,21 +34,21 @@ static pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; #define ROWS_PER_HAND (MATRIX_ROWS) -static inline void setPinOutput_writeLow(pin_t pin) { +static inline void gpio_atomic_set_pin_output_low(pin_t pin) { ATOMIC_BLOCK_FORCEON { gpio_set_pin_output(pin); gpio_write_pin_low(pin); } } -static inline void setPinOutput_writeHigh(pin_t pin) { +static inline void gpio_atomic_set_pin_output_high(pin_t pin) { ATOMIC_BLOCK_FORCEON { gpio_set_pin_output(pin); gpio_write_pin_high(pin); } } -static inline void setPinInputHigh_atomic(pin_t pin) { +static inline void gpio_atomic_set_pin_input_high(pin_t pin) { ATOMIC_BLOCK_FORCEON { gpio_set_pin_input_high(pin); } @@ -65,36 +65,36 @@ static inline uint8_t readMatrixPin(pin_t pin) { static void shiftOut(uint8_t dataOut) { for (uint8_t i = 0; i < 8; i++) { if (dataOut & 0x1) { - setPinOutput_writeHigh(DATA_PIN); + gpio_atomic_set_pin_output_high(DATA_PIN); } else { - setPinOutput_writeLow(DATA_PIN); + gpio_atomic_set_pin_output_low(DATA_PIN); } dataOut = dataOut >> 1; - setPinOutput_writeHigh(CLOCK_PIN); - setPinOutput_writeLow(CLOCK_PIN); + gpio_atomic_set_pin_output_high(CLOCK_PIN); + gpio_atomic_set_pin_output_low(CLOCK_PIN); } - setPinOutput_writeHigh(LATCH_PIN); - setPinOutput_writeLow(LATCH_PIN); + gpio_atomic_set_pin_output_high(LATCH_PIN); + gpio_atomic_set_pin_output_low(LATCH_PIN); } static void shiftout_single(uint8_t data) { if (data & 0x1) { - setPinOutput_writeHigh(DATA_PIN); + gpio_atomic_set_pin_output_high(DATA_PIN); } else { - setPinOutput_writeLow(DATA_PIN); + gpio_atomic_set_pin_output_low(DATA_PIN); } - setPinOutput_writeHigh(CLOCK_PIN); - setPinOutput_writeLow(CLOCK_PIN); + gpio_atomic_set_pin_output_high(CLOCK_PIN); + gpio_atomic_set_pin_output_low(CLOCK_PIN); - setPinOutput_writeHigh(LATCH_PIN); - setPinOutput_writeLow(LATCH_PIN); + gpio_atomic_set_pin_output_high(LATCH_PIN); + gpio_atomic_set_pin_output_low(LATCH_PIN); } static bool select_col(uint8_t col) { pin_t pin = col_pins[col]; if (pin != NO_PIN) { - setPinOutput_writeLow(pin); + gpio_atomic_set_pin_output_low(pin); return true; } else { if (col == 10) { @@ -112,16 +112,16 @@ static void unselect_col(uint8_t col) { if (pin != NO_PIN) { #ifdef MATRIX_UNSELECT_DRIVE_HIGH - setPinOutput_writeHigh(pin); + gpio_atomic_set_pin_output_high(pin); #else - setPinInputHigh_atomic(pin); + gpio_atomic_set_pin_input_high(pin); #endif } else { if (col == (MATRIX_COLS - 1)) - setPinOutput_writeHigh(CLOCK_PIN); - setPinOutput_writeLow(CLOCK_PIN); - setPinOutput_writeHigh(LATCH_PIN); - setPinOutput_writeLow(LATCH_PIN); + gpio_atomic_set_pin_output_high(CLOCK_PIN); + gpio_atomic_set_pin_output_low(CLOCK_PIN); + gpio_atomic_set_pin_output_high(LATCH_PIN); + gpio_atomic_set_pin_output_low(LATCH_PIN); } } @@ -131,9 +131,9 @@ static void unselect_cols(void) { pin_t pin = col_pins[x]; if (pin != NO_PIN) { #ifdef MATRIX_UNSELECT_DRIVE_HIGH - setPinOutput_writeHigh(pin); + gpio_atomic_set_pin_output_high(pin); #else - setPinInputHigh_atomic(pin); + gpio_atomic_set_pin_input_high(pin); #endif } if (x == 10) @@ -146,7 +146,7 @@ static void matrix_init_pins(void) { unselect_cols(); for (uint8_t x = 0; x < MATRIX_ROWS; x++) { if (row_pins[x] != NO_PIN) { - setPinInputHigh_atomic(row_pins[x]); + gpio_atomic_set_pin_input_high(row_pins[x]); } } } diff --git a/keyboards/keychron/q1v2/matrix.c b/keyboards/keychron/q1v2/matrix.c index 8e01bdb73e..5fa60c1b1d 100644 --- a/keyboards/keychron/q1v2/matrix.c +++ b/keyboards/keychron/q1v2/matrix.c @@ -34,21 +34,21 @@ static pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; #define ROWS_PER_HAND (MATRIX_ROWS) -static inline void setPinOutput_writeLow(pin_t pin) { +static inline void gpio_atomic_set_pin_output_low(pin_t pin) { ATOMIC_BLOCK_FORCEON { gpio_set_pin_output(pin); gpio_write_pin_low(pin); } } -static inline void setPinOutput_writeHigh(pin_t pin) { +static inline void gpio_atomic_set_pin_output_high(pin_t pin) { ATOMIC_BLOCK_FORCEON { gpio_set_pin_output(pin); gpio_write_pin_high(pin); } } -static inline void setPinInputHigh_atomic(pin_t pin) { +static inline void gpio_atomic_set_pin_input_high(pin_t pin) { ATOMIC_BLOCK_FORCEON { gpio_set_pin_input_high(pin); } @@ -65,37 +65,37 @@ static inline uint8_t readMatrixPin(pin_t pin) { static void shiftOut(uint8_t dataOut) { for (uint8_t i = 0; i < 8; i++) { if (dataOut & 0x1) { - setPinOutput_writeHigh(DATA_PIN); + gpio_atomic_set_pin_output_high(DATA_PIN); } else { - setPinOutput_writeLow(DATA_PIN); + gpio_atomic_set_pin_output_low(DATA_PIN); } dataOut = dataOut >> 1; - setPinOutput_writeHigh(CLOCK_PIN); - setPinOutput_writeLow(CLOCK_PIN); + gpio_atomic_set_pin_output_high(CLOCK_PIN); + gpio_atomic_set_pin_output_low(CLOCK_PIN); } - setPinOutput_writeHigh(LATCH_PIN); - setPinOutput_writeLow(LATCH_PIN); + gpio_atomic_set_pin_output_high(LATCH_PIN); + gpio_atomic_set_pin_output_low(LATCH_PIN); } static void shiftout_single(uint8_t data) { if (data & 0x1) { - setPinOutput_writeHigh(DATA_PIN); + gpio_atomic_set_pin_output_high(DATA_PIN); } else { - setPinOutput_writeLow(DATA_PIN); + gpio_atomic_set_pin_output_low(DATA_PIN); } - setPinOutput_writeHigh(CLOCK_PIN); - setPinOutput_writeLow(CLOCK_PIN); + gpio_atomic_set_pin_output_high(CLOCK_PIN); + gpio_atomic_set_pin_output_low(CLOCK_PIN); - setPinOutput_writeHigh(LATCH_PIN); - setPinOutput_writeLow(LATCH_PIN); + gpio_atomic_set_pin_output_high(LATCH_PIN); + gpio_atomic_set_pin_output_low(LATCH_PIN); } static bool select_col(uint8_t col) { pin_t pin = col_pins[col]; if (pin != NO_PIN) { - setPinOutput_writeLow(pin); + gpio_atomic_set_pin_output_low(pin); return true; } else { if (col == 8) { @@ -113,9 +113,9 @@ static void unselect_col(uint8_t col) { if (pin != NO_PIN) { #ifdef MATRIX_UNSELECT_DRIVE_HIGH - setPinOutput_writeHigh(pin); + gpio_atomic_set_pin_output_high(pin); #else - setPinInputHigh_atomic(pin); + gpio_atomic_set_pin_input_high(pin); #endif } else { if (col == (MATRIX_COLS - 1)) shiftout_single(0x01); @@ -129,9 +129,9 @@ static void unselect_cols(void) { if (pin != NO_PIN) { #ifdef MATRIX_UNSELECT_DRIVE_HIGH - setPinOutput_writeHigh(pin); + gpio_atomic_set_pin_output_high(pin); #else - setPinInputHigh_atomic(pin); + gpio_atomic_set_pin_input_high(pin); #endif } if (x == (MATRIX_COLS - 1)) @@ -144,7 +144,7 @@ static void matrix_init_pins(void) { unselect_cols(); for (uint8_t x = 0; x < MATRIX_ROWS; x++) { if (row_pins[x] != NO_PIN) { - setPinInputHigh_atomic(row_pins[x]); + gpio_atomic_set_pin_input_high(row_pins[x]); } } } diff --git a/keyboards/keychron/q3/matrix.c b/keyboards/keychron/q3/matrix.c index 25b3f6ed4e..5ed8d7bc4f 100644 --- a/keyboards/keychron/q3/matrix.c +++ b/keyboards/keychron/q3/matrix.c @@ -34,21 +34,21 @@ static pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; #define ROWS_PER_HAND (MATRIX_ROWS) -static inline void setPinOutput_writeLow(pin_t pin) { +static inline void gpio_atomic_set_pin_output_low(pin_t pin) { ATOMIC_BLOCK_FORCEON { gpio_set_pin_output(pin); gpio_write_pin_low(pin); } } -static inline void setPinOutput_writeHigh(pin_t pin) { +static inline void gpio_atomic_set_pin_output_high(pin_t pin) { ATOMIC_BLOCK_FORCEON { gpio_set_pin_output(pin); gpio_write_pin_high(pin); } } -static inline void setPinInputHigh_atomic(pin_t pin) { +static inline void gpio_atomic_set_pin_input_high(pin_t pin) { ATOMIC_BLOCK_FORCEON { gpio_set_pin_input_high(pin); } @@ -65,37 +65,37 @@ static inline uint8_t readMatrixPin(pin_t pin) { static void shiftOut(uint8_t dataOut) { for (uint8_t i = 0; i < 8; i++) { if (dataOut & 0x1) { - setPinOutput_writeHigh(DATA_PIN); + gpio_atomic_set_pin_output_high(DATA_PIN); } else { - setPinOutput_writeLow(DATA_PIN); + gpio_atomic_set_pin_output_low(DATA_PIN); } dataOut = dataOut >> 1; - setPinOutput_writeHigh(CLOCK_PIN); - setPinOutput_writeLow(CLOCK_PIN); + gpio_atomic_set_pin_output_high(CLOCK_PIN); + gpio_atomic_set_pin_output_low(CLOCK_PIN); } - setPinOutput_writeHigh(LATCH_PIN); - setPinOutput_writeLow(LATCH_PIN); + gpio_atomic_set_pin_output_high(LATCH_PIN); + gpio_atomic_set_pin_output_low(LATCH_PIN); } static void shiftout_single(uint8_t data) { if (data & 0x1) { - setPinOutput_writeHigh(DATA_PIN); + gpio_atomic_set_pin_output_high(DATA_PIN); } else { - setPinOutput_writeLow(DATA_PIN); + gpio_atomic_set_pin_output_low(DATA_PIN); } - setPinOutput_writeHigh(CLOCK_PIN); - setPinOutput_writeLow(CLOCK_PIN); + gpio_atomic_set_pin_output_high(CLOCK_PIN); + gpio_atomic_set_pin_output_low(CLOCK_PIN); - setPinOutput_writeHigh(LATCH_PIN); - setPinOutput_writeLow(LATCH_PIN); + gpio_atomic_set_pin_output_high(LATCH_PIN); + gpio_atomic_set_pin_output_low(LATCH_PIN); } static bool select_col(uint8_t col) { pin_t pin = col_pins[col]; if (pin != NO_PIN) { - setPinOutput_writeLow(pin); + gpio_atomic_set_pin_output_low(pin); return true; } else { if (col == 8) { @@ -113,9 +113,9 @@ static void unselect_col(uint8_t col) { if (pin != NO_PIN) { #ifdef MATRIX_UNSELECT_DRIVE_HIGH - setPinOutput_writeHigh(pin); + gpio_atomic_set_pin_output_high(pin); #else - setPinInputHigh_atomic(pin); + gpio_atomic_set_pin_input_high(pin); #endif } else { if (col == (MATRIX_COLS - 1)) @@ -130,9 +130,9 @@ static void unselect_cols(void) { if (pin != NO_PIN) { #ifdef MATRIX_UNSELECT_DRIVE_HIGH - setPinOutput_writeHigh(pin); + gpio_atomic_set_pin_output_high(pin); #else - setPinInputHigh_atomic(pin); + gpio_atomic_set_pin_input_high(pin); #endif } if (x == (MATRIX_COLS - 1)) @@ -145,7 +145,7 @@ static void matrix_init_pins(void) { unselect_cols(); for (uint8_t x = 0; x < MATRIX_ROWS; x++) { if (row_pins[x] != NO_PIN) { - setPinInputHigh_atomic(row_pins[x]); + gpio_atomic_set_pin_input_high(row_pins[x]); } } } diff --git a/keyboards/keychron/q5/matrix.c b/keyboards/keychron/q5/matrix.c index e7f69d9821..e38301f00f 100644 --- a/keyboards/keychron/q5/matrix.c +++ b/keyboards/keychron/q5/matrix.c @@ -34,21 +34,21 @@ static pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; #define ROWS_PER_HAND (MATRIX_ROWS) -static inline void setPinOutput_writeLow(pin_t pin) { +static inline void gpio_atomic_set_pin_output_low(pin_t pin) { ATOMIC_BLOCK_FORCEON { gpio_set_pin_output(pin); gpio_write_pin_low(pin); } } -static inline void setPinOutput_writeHigh(pin_t pin) { +static inline void gpio_atomic_set_pin_output_high(pin_t pin) { ATOMIC_BLOCK_FORCEON { gpio_set_pin_output(pin); gpio_write_pin_high(pin); } } -static inline void setPinInputHigh_atomic(pin_t pin) { +static inline void gpio_atomic_set_pin_input_high(pin_t pin) { ATOMIC_BLOCK_FORCEON { gpio_set_pin_input_high(pin); } @@ -65,36 +65,36 @@ static inline uint8_t readMatrixPin(pin_t pin) { static void shiftOut(uint8_t dataOut) { for (uint8_t i = 0; i < 8; i++) { if (dataOut & 0x1) { - setPinOutput_writeHigh(DATA_PIN); + gpio_atomic_set_pin_output_high(DATA_PIN); } else { - setPinOutput_writeLow(DATA_PIN); + gpio_atomic_set_pin_output_low(DATA_PIN); } dataOut = dataOut >> 1; - setPinOutput_writeHigh(CLOCK_PIN); - setPinOutput_writeLow(CLOCK_PIN); + gpio_atomic_set_pin_output_high(CLOCK_PIN); + gpio_atomic_set_pin_output_low(CLOCK_PIN); } - setPinOutput_writeHigh(LATCH_PIN); - setPinOutput_writeLow(LATCH_PIN); + gpio_atomic_set_pin_output_high(LATCH_PIN); + gpio_atomic_set_pin_output_low(LATCH_PIN); } static void shiftout_single(uint8_t data) { if (data & 0x1) { - setPinOutput_writeHigh(DATA_PIN); + gpio_atomic_set_pin_output_high(DATA_PIN); } else { - setPinOutput_writeLow(DATA_PIN); + gpio_atomic_set_pin_output_low(DATA_PIN); } - setPinOutput_writeHigh(CLOCK_PIN); - setPinOutput_writeLow(CLOCK_PIN); + gpio_atomic_set_pin_output_high(CLOCK_PIN); + gpio_atomic_set_pin_output_low(CLOCK_PIN); - setPinOutput_writeHigh(LATCH_PIN); - setPinOutput_writeLow(LATCH_PIN); + gpio_atomic_set_pin_output_high(LATCH_PIN); + gpio_atomic_set_pin_output_low(LATCH_PIN); } static bool select_col(uint8_t col) { pin_t pin = col_pins[col]; if (pin != NO_PIN) { - setPinOutput_writeLow(pin); + gpio_atomic_set_pin_output_low(pin); return true; } else { if (col == 10) { @@ -112,16 +112,16 @@ static void unselect_col(uint8_t col) { if (pin != NO_PIN) { #ifdef MATRIX_UNSELECT_DRIVE_HIGH - setPinOutput_writeHigh(pin); + gpio_atomic_set_pin_output_high(pin); #else - setPinInputHigh_atomic(pin); + gpio_atomic_set_pin_input_high(pin); #endif } else { if (col == (MATRIX_COLS - 1)) - setPinOutput_writeHigh(CLOCK_PIN); - setPinOutput_writeLow(CLOCK_PIN); - setPinOutput_writeHigh(LATCH_PIN); - setPinOutput_writeLow(LATCH_PIN); + gpio_atomic_set_pin_output_high(CLOCK_PIN); + gpio_atomic_set_pin_output_low(CLOCK_PIN); + gpio_atomic_set_pin_output_high(LATCH_PIN); + gpio_atomic_set_pin_output_low(LATCH_PIN); } } @@ -131,9 +131,9 @@ static void unselect_cols(void) { pin_t pin = col_pins[x]; if (pin != NO_PIN) { #ifdef MATRIX_UNSELECT_DRIVE_HIGH - setPinOutput_writeHigh(pin); + gpio_atomic_set_pin_output_high(pin); #else - setPinInputHigh_atomic(pin); + gpio_atomic_set_pin_input_high(pin); #endif } if (x == (MATRIX_COLS - 1)) @@ -146,7 +146,7 @@ static void matrix_init_pins(void) { unselect_cols(); for (uint8_t x = 0; x < MATRIX_ROWS; x++) { if (row_pins[x] != NO_PIN) { - setPinInputHigh_atomic(row_pins[x]); + gpio_atomic_set_pin_input_high(row_pins[x]); } } } diff --git a/keyboards/keychron/q6/matrix.c b/keyboards/keychron/q6/matrix.c index 95e00405b4..c61a38ad73 100644 --- a/keyboards/keychron/q6/matrix.c +++ b/keyboards/keychron/q6/matrix.c @@ -46,21 +46,21 @@ static pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; # define CLR_REG_VAL 0xFF #endif -static inline void setPinOutput_writeLow(pin_t pin) { +static inline void gpio_atomic_set_pin_output_low(pin_t pin) { ATOMIC_BLOCK_FORCEON { gpio_set_pin_output(pin); gpio_write_pin_low(pin); } } -static inline void setPinOutput_writeHigh(pin_t pin) { +static inline void gpio_atomic_set_pin_output_high(pin_t pin) { ATOMIC_BLOCK_FORCEON { gpio_set_pin_output(pin); gpio_write_pin_high(pin); } } -static inline void setPinInputHigh_atomic(pin_t pin) { +static inline void gpio_atomic_set_pin_input_high(pin_t pin) { ATOMIC_BLOCK_FORCEON { gpio_set_pin_input_high(pin); } @@ -77,36 +77,36 @@ static inline uint8_t readMatrixPin(pin_t pin) { static void shiftOut(uint16_t dataOut) { for (uint8_t i = 0; i < NO_PIN_NUM; i++) { if (dataOut & 0x1) { - setPinOutput_writeHigh(DATA_PIN); + gpio_atomic_set_pin_output_high(DATA_PIN); } else { - setPinOutput_writeLow(DATA_PIN); + gpio_atomic_set_pin_output_low(DATA_PIN); } dataOut = dataOut >> 1; - setPinOutput_writeHigh(CLOCK_PIN); - setPinOutput_writeLow(CLOCK_PIN); + gpio_atomic_set_pin_output_high(CLOCK_PIN); + gpio_atomic_set_pin_output_low(CLOCK_PIN); } - setPinOutput_writeHigh(LATCH_PIN); - setPinOutput_writeLow(LATCH_PIN); + gpio_atomic_set_pin_output_high(LATCH_PIN); + gpio_atomic_set_pin_output_low(LATCH_PIN); } static void shiftout_single(uint8_t data) { if (data & 0x1) { - setPinOutput_writeHigh(DATA_PIN); + gpio_atomic_set_pin_output_high(DATA_PIN); } else { - setPinOutput_writeLow(DATA_PIN); + gpio_atomic_set_pin_output_low(DATA_PIN); } - setPinOutput_writeHigh(CLOCK_PIN); - setPinOutput_writeLow(CLOCK_PIN); + gpio_atomic_set_pin_output_high(CLOCK_PIN); + gpio_atomic_set_pin_output_low(CLOCK_PIN); - setPinOutput_writeHigh(LATCH_PIN); - setPinOutput_writeLow(LATCH_PIN); + gpio_atomic_set_pin_output_high(LATCH_PIN); + gpio_atomic_set_pin_output_low(LATCH_PIN); } static bool select_col(uint8_t col) { pin_t pin = col_pins[col]; if (pin != NO_PIN) { - setPinOutput_writeLow(pin); + gpio_atomic_set_pin_output_low(pin); return true; } else { if (col == NO_PIN_START) { @@ -124,16 +124,16 @@ static void unselect_col(uint8_t col) { if (pin != NO_PIN) { #ifdef MATRIX_UNSELECT_DRIVE_HIGH - setPinOutput_writeHigh(pin); + gpio_atomic_set_pin_output_high(pin); #else - setPinInputHigh_atomic(pin); + gpio_atomic_set_pin_input_high(pin); #endif } else { if (col == (MATRIX_COLS - NO_PIN_OFFSET - 1)) - setPinOutput_writeHigh(CLOCK_PIN); - setPinOutput_writeLow(CLOCK_PIN); - setPinOutput_writeHigh(LATCH_PIN); - setPinOutput_writeLow(LATCH_PIN); + gpio_atomic_set_pin_output_high(CLOCK_PIN); + gpio_atomic_set_pin_output_low(CLOCK_PIN); + gpio_atomic_set_pin_output_high(LATCH_PIN); + gpio_atomic_set_pin_output_low(LATCH_PIN); } } @@ -142,9 +142,9 @@ static void unselect_cols(void) { pin_t pin = col_pins[x]; if (pin != NO_PIN) { #ifdef MATRIX_UNSELECT_DRIVE_HIGH - setPinOutput_writeHigh(pin); + gpio_atomic_set_pin_output_high(pin); #else - setPinInputHigh_atomic(pin); + gpio_atomic_set_pin_input_high(pin); #endif } if (x == (MATRIX_COLS - NO_PIN_OFFSET - 1)) @@ -157,7 +157,7 @@ static void matrix_init_pins(void) { unselect_cols(); for (uint8_t x = 0; x < MATRIX_ROWS; x++) { if (row_pins[x] != NO_PIN) { - setPinInputHigh_atomic(row_pins[x]); + gpio_atomic_set_pin_input_high(row_pins[x]); } } } diff --git a/keyboards/keychron/q65/matrix.c b/keyboards/keychron/q65/matrix.c index c9f9888689..4cbdd346ec 100644 --- a/keyboards/keychron/q65/matrix.c +++ b/keyboards/keychron/q65/matrix.c @@ -34,26 +34,26 @@ static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; #define ROWS_PER_HAND (MATRIX_ROWS) -static inline void writePinLow_atomic(pin_t pin) { +static inline void gpio_atomic_write_pin_low(pin_t pin) { ATOMIC_BLOCK_FORCEON { gpio_write_pin_low(pin); } } -static inline void writePinHigh_atomic(pin_t pin) { +static inline void gpio_atomic_write_pin_high(pin_t pin) { ATOMIC_BLOCK_FORCEON { gpio_write_pin_high(pin); } } -static inline void setPinOutput_writeLow(pin_t pin) { +static inline void gpio_atomic_set_pin_output_low(pin_t pin) { ATOMIC_BLOCK_FORCEON { gpio_set_pin_output(pin); gpio_write_pin_low(pin); } } -static inline void setPinInputHigh_atomic(pin_t pin) { +static inline void gpio_atomic_set_pin_input_high(pin_t pin) { ATOMIC_BLOCK_FORCEON { gpio_set_pin_input_high(pin); } @@ -119,9 +119,9 @@ static bool select_col(uint8_t col) { if (pin != NO_PIN) { #ifdef MATRIX_UNSELECT_DRIVE_HIGH - writePinLow_atomic(pin); + gpio_atomic_write_pin_low(pin); #else - setPinOutput_writeLow(pin); + gpio_atomic_set_pin_output_low(pin); #endif return true; } else { @@ -138,9 +138,9 @@ static void unselect_col(uint8_t col) { if (pin != NO_PIN) { #ifdef MATRIX_UNSELECT_DRIVE_HIGH - writePinHigh_atomic(pin); + gpio_atomic_write_pin_high(pin); #else - setPinInputHigh_atomic(pin); + gpio_atomic_set_pin_input_high(pin); #endif } else { shiftout_single(0x01); @@ -152,9 +152,9 @@ static void unselect_cols(void) { pin_t pin = col_pins[x]; if (pin != NO_PIN) { #ifdef MATRIX_UNSELECT_DRIVE_HIGH - setPinOutput_writeHigh(pin); + gpio_atomic_set_pin_output_high(pin); #else - setPinInputHigh_atomic(pin); + gpio_atomic_set_pin_input_high(pin); #endif } else { if (x == 0) @@ -178,7 +178,7 @@ static void matrix_init_pins(void) { unselect_cols(); for (uint8_t x = 0; x < MATRIX_ROWS; x++) { if (row_pins[x] != NO_PIN) { - setPinInputHigh_atomic(row_pins[x]); + gpio_atomic_set_pin_input_high(row_pins[x]); } } } diff --git a/keyboards/keychron/s1/ansi/white/keyboard.json b/keyboards/keychron/s1/ansi/white/keyboard.json index cab38a4ae6..40cc99a23f 100644 --- a/keyboards/keychron/s1/ansi/white/keyboard.json +++ b/keyboards/keychron/s1/ansi/white/keyboard.json @@ -31,6 +31,92 @@ "wave_left_right": true, "wave_up_down": true }, + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}, + {"matrix": [0, 1], "x": 15, "y": 0, "flags": 1}, + {"matrix": [0, 2], "x": 30, "y": 0, "flags": 1}, + {"matrix": [0, 3], "x": 45, "y": 0, "flags": 1}, + {"matrix": [0, 4], "x": 60, "y": 0, "flags": 1}, + {"matrix": [0, 5], "x": 75, "y": 0, "flags": 1}, + {"matrix": [0, 6], "x": 90, "y": 0, "flags": 1}, + {"matrix": [0, 7], "x": 105, "y": 0, "flags": 1}, + {"matrix": [0, 8], "x": 119, "y": 0, "flags": 1}, + {"matrix": [0, 9], "x": 134, "y": 0, "flags": 1}, + {"matrix": [0, 10], "x": 149, "y": 0, "flags": 1}, + {"matrix": [0, 11], "x": 164, "y": 0, "flags": 1}, + {"matrix": [0, 12], "x": 179, "y": 0, "flags": 1}, + {"matrix": [0, 13], "x": 194, "y": 0, "flags": 1}, + {"matrix": [3, 12], "x": 209, "y": 0, "flags": 1}, + {"matrix": [0, 14], "x": 224, "y": 0, "flags": 1}, + {"matrix": [1, 0], "x": 0, "y": 13, "flags": 1}, + {"matrix": [1, 1], "x": 15, "y": 13, "flags": 4}, + {"matrix": [1, 2], "x": 30, "y": 13, "flags": 4}, + {"matrix": [1, 3], "x": 45, "y": 13, "flags": 4}, + {"matrix": [1, 4], "x": 60, "y": 13, "flags": 4}, + {"matrix": [1, 5], "x": 75, "y": 13, "flags": 4}, + {"matrix": [1, 6], "x": 90, "y": 13, "flags": 4}, + {"matrix": [1, 7], "x": 105, "y": 13, "flags": 4}, + {"matrix": [1, 8], "x": 119, "y": 13, "flags": 4}, + {"matrix": [1, 9], "x": 134, "y": 13, "flags": 4}, + {"matrix": [1, 10], "x": 149, "y": 13, "flags": 4}, + {"matrix": [1, 11], "x": 164, "y": 13, "flags": 4}, + {"matrix": [1, 12], "x": 179, "y": 13, "flags": 4}, + {"matrix": [1, 13], "x": 202, "y": 13, "flags": 1}, + {"matrix": [1, 14], "x": 224, "y": 13, "flags": 1}, + {"matrix": [2, 0], "x": 4, "y": 26, "flags": 1}, + {"matrix": [2, 1], "x": 22, "y": 26, "flags": 4}, + {"matrix": [2, 2], "x": 37, "y": 26, "flags": 4}, + {"matrix": [2, 3], "x": 52, "y": 26, "flags": 4}, + {"matrix": [2, 4], "x": 67, "y": 26, "flags": 4}, + {"matrix": [2, 5], "x": 82, "y": 26, "flags": 4}, + {"matrix": [2, 6], "x": 97, "y": 26, "flags": 4}, + {"matrix": [2, 7], "x": 112, "y": 26, "flags": 4}, + {"matrix": [2, 8], "x": 127, "y": 26, "flags": 4}, + {"matrix": [2, 9], "x": 142, "y": 26, "flags": 4}, + {"matrix": [2, 10], "x": 157, "y": 26, "flags": 4}, + {"matrix": [2, 11], "x": 172, "y": 26, "flags": 4}, + {"matrix": [2, 12], "x": 187, "y": 26, "flags": 4}, + {"matrix": [2, 13], "x": 205, "y": 26, "flags": 4}, + {"matrix": [2, 14], "x": 224, "y": 26, "flags": 1}, + {"matrix": [3, 0], "x": 6, "y": 38, "flags": 1}, + {"matrix": [3, 1], "x": 26, "y": 38, "flags": 4}, + {"matrix": [3, 2], "x": 41, "y": 38, "flags": 4}, + {"matrix": [3, 3], "x": 56, "y": 38, "flags": 4}, + {"matrix": [3, 4], "x": 71, "y": 38, "flags": 4}, + {"matrix": [3, 5], "x": 86, "y": 38, "flags": 4}, + {"matrix": [3, 6], "x": 101, "y": 38, "flags": 4}, + {"matrix": [3, 7], "x": 116, "y": 38, "flags": 4}, + {"matrix": [3, 8], "x": 131, "y": 38, "flags": 4}, + {"matrix": [3, 9], "x": 146, "y": 38, "flags": 4}, + {"matrix": [3, 10], "x": 160, "y": 38, "flags": 4}, + {"matrix": [3, 11], "x": 175, "y": 38, "flags": 4}, + {"matrix": [3, 13], "x": 200, "y": 38, "flags": 1}, + {"matrix": [3, 14], "x": 224, "y": 38, "flags": 1}, + {"matrix": [4, 0], "x": 9, "y": 51, "flags": 1}, + {"matrix": [4, 2], "x": 34, "y": 51, "flags": 4}, + {"matrix": [4, 3], "x": 48, "y": 51, "flags": 4}, + {"matrix": [4, 4], "x": 63, "y": 51, "flags": 4}, + {"matrix": [4, 5], "x": 78, "y": 51, "flags": 4}, + {"matrix": [4, 6], "x": 93, "y": 51, "flags": 4}, + {"matrix": [4, 7], "x": 108, "y": 51, "flags": 4}, + {"matrix": [4, 8], "x": 123, "y": 51, "flags": 4}, + {"matrix": [4, 9], "x": 138, "y": 51, "flags": 4}, + {"matrix": [4, 10], "x": 153, "y": 51, "flags": 4}, + {"matrix": [4, 11], "x": 168, "y": 51, "flags": 4}, + {"matrix": [4, 12], "x": 189, "y": 51, "flags": 1}, + {"matrix": [4, 13], "x": 209, "y": 51, "flags": 1}, + {"matrix": [4, 14], "x": 224, "y": 51, "flags": 1}, + {"matrix": [5, 0], "x": 2, "y": 64, "flags": 1}, + {"matrix": [5, 1], "x": 21, "y": 64, "flags": 1}, + {"matrix": [5, 2], "x": 39, "y": 64, "flags": 1}, + {"matrix": [5, 6], "x": 95, "y": 64, "flags": 4}, + {"matrix": [5, 9], "x": 149, "y": 64, "flags": 1}, + {"matrix": [5, 10], "x": 164, "y": 64, "flags": 1}, + {"matrix": [5, 11], "x": 179, "y": 64, "flags": 1}, + {"matrix": [5, 12], "x": 194, "y": 64, "flags": 1}, + {"matrix": [5, 13], "x": 209, "y": 64, "flags": 1}, + {"matrix": [5, 14], "x": 224, "y": 64, "flags": 1} + ], "driver": "snled27351", "sleep": true, "react_on_keyup": true diff --git a/keyboards/keychron/s1/ansi/white/white.c b/keyboards/keychron/s1/ansi/white/white.c index 69623863d1..543544c878 100644 --- a/keyboards/keychron/s1/ansi/white/white.c +++ b/keyboards/keychron/s1/ansi/white/white.c @@ -115,37 +115,4 @@ const snled27351_led_t PROGMEM g_snled27351_leds[SNLED27351_LED_COUNT] = { {0, CB1_CA14}, // down {0, CB1_CA16}, // right }; - -#define __ NO_LED - -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, 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, 14, 58, 59 }, - { 60, __, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73 }, - { 74, 75, 76, __, __, __, 77, __, __, 78, 79, 80, 81, 82, 83 } - }, - { - // 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}, - {0,13}, {15,13}, {30,13}, {45,13}, {60,13}, {75,13}, {90,13}, {105,13}, {119,13}, {134,13}, {149,13}, {164,13}, {179,13}, {202,13}, {224,13}, - {4,26}, {22,26}, {37,26}, {52,26}, {67,26}, {82,26}, {97,26}, {112,26}, {127,26}, {142,26}, {157,26}, {172,26}, {187,26}, {205,26}, {224,26}, - {6,38}, {26,38}, {41,38}, {56,38}, {71,38}, {86,38}, {101,38}, {116,38}, {131,38}, {146,38}, {160,38}, {175,38}, {200,38}, {224,38}, - {9,51}, {34,51}, {48,51}, {63,51}, {78,51}, {93,51}, {108,51}, {123,51}, {138,51}, {153,51}, {168,51}, {189,51}, {209,51}, {224,51}, - {2,64}, {21,64}, {39,64}, {95,64}, {149,64}, {164,64}, {179,64}, {194,64}, {209,64}, {224,64} - }, - { - // RGB LED Index to Flag - 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, 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, 1, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, - 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, - } -}; - -#endif // RGB_MATRIX_ENABLE +#endif diff --git a/keyboards/keychron/v1/matrix.c b/keyboards/keychron/v1/matrix.c index 32d9cfdbb0..01875ae44e 100644 --- a/keyboards/keychron/v1/matrix.c +++ b/keyboards/keychron/v1/matrix.c @@ -34,21 +34,21 @@ static pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; #define ROWS_PER_HAND MATRIX_ROWS -static inline void setPinOutput_writeLow(pin_t pin) { +static inline void gpio_atomic_set_pin_output_low(pin_t pin) { ATOMIC_BLOCK_FORCEON { gpio_set_pin_output(pin); gpio_write_pin_low(pin); } } -static inline void setPinOutput_writeHigh(pin_t pin) { +static inline void gpio_atomic_set_pin_output_high(pin_t pin) { ATOMIC_BLOCK_FORCEON { gpio_set_pin_output(pin); gpio_write_pin_high(pin); } } -static inline void setPinInputHigh_atomic(pin_t pin) { +static inline void gpio_atomic_set_pin_input_high(pin_t pin) { ATOMIC_BLOCK_FORCEON { gpio_set_pin_input_high(pin); } @@ -113,7 +113,7 @@ static bool select_col(uint8_t col) { pin_t pin = col_pins[col]; if (pin != NO_PIN) { - setPinOutput_writeLow(pin); + gpio_atomic_set_pin_output_low(pin); return true; } else { if (col == 8) { @@ -129,9 +129,9 @@ static void unselect_col(uint8_t col) { if (pin != NO_PIN) { #ifdef MATRIX_UNSELECT_DRIVE_HIGH - setPinOutput_writeHigh(pin); + gpio_atomic_set_pin_output_high(pin); #else - setPinInputHigh_atomic(pin); + gpio_atomic_set_pin_input_high(pin); #endif } else { shiftOut_single(0x01); @@ -143,9 +143,9 @@ static void unselect_cols(void) { pin_t pin = col_pins[x]; if (pin != NO_PIN) { #ifdef MATRIX_UNSELECT_DRIVE_HIGH - setPinOutput_writeHigh(pin); + gpio_atomic_set_pin_output_high(pin); #else - setPinInputHigh_atomic(pin); + gpio_atomic_set_pin_input_high(pin); #endif } else { if (x == 8) @@ -169,7 +169,7 @@ static void matrix_init_pins(void) { unselect_cols(); for (uint8_t x = 0; x < MATRIX_ROWS; x++) { if (row_pins[x] != NO_PIN) { - setPinInputHigh_atomic(row_pins[x]); + gpio_atomic_set_pin_input_high(row_pins[x]); } } } diff --git a/keyboards/keychron/v10/matrix.c b/keyboards/keychron/v10/matrix.c index bb6504fa78..ee7d0a38c6 100644 --- a/keyboards/keychron/v10/matrix.c +++ b/keyboards/keychron/v10/matrix.c @@ -34,21 +34,21 @@ static pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; #define ROWS_PER_HAND (MATRIX_ROWS) -static inline void setPinOutput_writeLow(pin_t pin) { +static inline void gpio_atomic_set_pin_output_low(pin_t pin) { ATOMIC_BLOCK_FORCEON { gpio_set_pin_output(pin); gpio_write_pin_low(pin); } } -static inline void setPinOutput_writeHigh(pin_t pin) { +static inline void gpio_atomic_set_pin_output_high(pin_t pin) { ATOMIC_BLOCK_FORCEON { gpio_set_pin_output(pin); gpio_write_pin_high(pin); } } -static inline void setPinInputHigh_atomic(pin_t pin) { +static inline void gpio_atomic_set_pin_input_high(pin_t pin) { ATOMIC_BLOCK_FORCEON { gpio_set_pin_input_high(pin); } @@ -105,7 +105,7 @@ static bool select_col(uint8_t col) { pin_t pin = col_pins[col]; if (pin != NO_PIN) { - setPinOutput_writeLow(pin); + gpio_atomic_set_pin_output_low(pin); return true; } else { if (col == PIN_START_74HC595) { @@ -121,9 +121,9 @@ static void unselect_col(uint8_t col) { if (pin != NO_PIN) { #ifdef MATRIX_UNSELECT_DRIVE_HIGH - setPinOutput_writeHigh(pin); + gpio_atomic_set_pin_output_high(pin); #else - setPinInputHigh_atomic(pin); + gpio_atomic_set_pin_input_high(pin); #endif } else { shiftOut_single(0x01); @@ -137,9 +137,9 @@ static void unselect_cols(void) { if (pin != NO_PIN) { #ifdef MATRIX_UNSELECT_DRIVE_HIGH - setPinOutput_writeHigh(pin); + gpio_atomic_set_pin_output_high(pin); #else - setPinInputHigh_atomic(pin); + gpio_atomic_set_pin_input_high(pin); #endif } if (x == PIN_START_74HC595) @@ -162,7 +162,7 @@ static void matrix_init_pins(void) { unselect_cols(); for (uint8_t x = 0; x < MATRIX_ROWS; x++) { if (row_pins[x] != NO_PIN) { - setPinInputHigh_atomic(row_pins[x]); + gpio_atomic_set_pin_input_high(row_pins[x]); } } } diff --git a/keyboards/keychron/v3/matrix.c b/keyboards/keychron/v3/matrix.c index 5ee860afd2..b127465290 100644 --- a/keyboards/keychron/v3/matrix.c +++ b/keyboards/keychron/v3/matrix.c @@ -34,21 +34,21 @@ static pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; #define ROWS_PER_HAND (MATRIX_ROWS) -static inline void setPinOutput_writeLow(pin_t pin) { +static inline void gpio_atomic_set_pin_output_low(pin_t pin) { ATOMIC_BLOCK_FORCEON { gpio_set_pin_output(pin); gpio_write_pin_low(pin); } } -static inline void setPinOutput_writeHigh(pin_t pin) { +static inline void gpio_atomic_set_pin_output_high(pin_t pin) { ATOMIC_BLOCK_FORCEON { gpio_set_pin_output(pin); gpio_write_pin_high(pin); } } -static inline void setPinInputHigh_atomic(pin_t pin) { +static inline void gpio_atomic_set_pin_input_high(pin_t pin) { ATOMIC_BLOCK_FORCEON { gpio_set_pin_input_high(pin); } @@ -113,7 +113,7 @@ static bool select_col(uint8_t col) { pin_t pin = col_pins[col]; if (pin != NO_PIN) { - setPinOutput_writeLow(pin); + gpio_atomic_set_pin_output_low(pin); return true; } else { if (col == 8) { @@ -129,9 +129,9 @@ static void unselect_col(uint8_t col) { if (pin != NO_PIN) { #ifdef MATRIX_UNSELECT_DRIVE_HIGH - setPinOutput_writeHigh(pin); + gpio_atomic_set_pin_output_high(pin); #else - setPinInputHigh_atomic(pin); + gpio_atomic_set_pin_input_high(pin); #endif } else { shiftOut_single(0x01); @@ -143,9 +143,9 @@ static void unselect_cols(void) { pin_t pin = col_pins[x]; if (pin != NO_PIN) { #ifdef MATRIX_UNSELECT_DRIVE_HIGH - setPinOutput_writeHigh(pin); + gpio_atomic_set_pin_output_high(pin); #else - setPinInputHigh_atomic(pin); + gpio_atomic_set_pin_input_high(pin); #endif } else { if (x == 8) @@ -169,7 +169,7 @@ static void matrix_init_pins(void) { unselect_cols(); for (uint8_t x = 0; x < MATRIX_ROWS; x++) { if (row_pins[x] != NO_PIN) { - setPinInputHigh_atomic(row_pins[x]); + gpio_atomic_set_pin_input_high(row_pins[x]); } } } diff --git a/keyboards/keychron/v5/matrix.c b/keyboards/keychron/v5/matrix.c index 255201af12..810fdfb8e6 100644 --- a/keyboards/keychron/v5/matrix.c +++ b/keyboards/keychron/v5/matrix.c @@ -34,21 +34,21 @@ static pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; #define ROWS_PER_HAND (MATRIX_ROWS) -static inline void setPinOutput_writeLow(pin_t pin) { +static inline void gpio_atomic_set_pin_output_low(pin_t pin) { ATOMIC_BLOCK_FORCEON { gpio_set_pin_output(pin); gpio_write_pin_low(pin); } } -static inline void setPinOutput_writeHigh(pin_t pin) { +static inline void gpio_atomic_set_pin_output_high(pin_t pin) { ATOMIC_BLOCK_FORCEON { gpio_set_pin_output(pin); gpio_write_pin_high(pin); } } -static inline void setPinInputHigh_atomic(pin_t pin) { +static inline void gpio_atomic_set_pin_input_high(pin_t pin) { ATOMIC_BLOCK_FORCEON { gpio_set_pin_input_high(pin); } @@ -113,7 +113,7 @@ static bool select_col(uint8_t col) { pin_t pin = col_pins[col]; if (pin != NO_PIN) { - setPinOutput_writeLow(pin); + gpio_atomic_set_pin_output_low(pin); return true; } else { if (col == 10) { @@ -129,9 +129,9 @@ static void unselect_col(uint8_t col) { if (pin != NO_PIN) { #ifdef MATRIX_UNSELECT_DRIVE_HIGH - setPinOutput_writeHigh(pin); + gpio_atomic_set_pin_output_high(pin); #else - setPinInputHigh_atomic(pin); + gpio_atomic_set_pin_input_high(pin); #endif } else { shiftOut_single(0x01); @@ -143,9 +143,9 @@ static void unselect_cols(void) { pin_t pin = col_pins[x]; if (pin != NO_PIN) { #ifdef MATRIX_UNSELECT_DRIVE_HIGH - setPinOutput_writeHigh(pin); + gpio_atomic_set_pin_output_high(pin); #else - setPinInputHigh_atomic(pin); + gpio_atomic_set_pin_input_high(pin); #endif } else { if (x == 10) @@ -169,7 +169,7 @@ static void matrix_init_pins(void) { unselect_cols(); for (uint8_t x = 0; x < MATRIX_ROWS; x++) { if (row_pins[x] != NO_PIN) { - setPinInputHigh_atomic(row_pins[x]); + gpio_atomic_set_pin_input_high(row_pins[x]); } } } diff --git a/keyboards/keychron/v6/matrix.c b/keyboards/keychron/v6/matrix.c index bb6504fa78..ee7d0a38c6 100644 --- a/keyboards/keychron/v6/matrix.c +++ b/keyboards/keychron/v6/matrix.c @@ -34,21 +34,21 @@ static pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; #define ROWS_PER_HAND (MATRIX_ROWS) -static inline void setPinOutput_writeLow(pin_t pin) { +static inline void gpio_atomic_set_pin_output_low(pin_t pin) { ATOMIC_BLOCK_FORCEON { gpio_set_pin_output(pin); gpio_write_pin_low(pin); } } -static inline void setPinOutput_writeHigh(pin_t pin) { +static inline void gpio_atomic_set_pin_output_high(pin_t pin) { ATOMIC_BLOCK_FORCEON { gpio_set_pin_output(pin); gpio_write_pin_high(pin); } } -static inline void setPinInputHigh_atomic(pin_t pin) { +static inline void gpio_atomic_set_pin_input_high(pin_t pin) { ATOMIC_BLOCK_FORCEON { gpio_set_pin_input_high(pin); } @@ -105,7 +105,7 @@ static bool select_col(uint8_t col) { pin_t pin = col_pins[col]; if (pin != NO_PIN) { - setPinOutput_writeLow(pin); + gpio_atomic_set_pin_output_low(pin); return true; } else { if (col == PIN_START_74HC595) { @@ -121,9 +121,9 @@ static void unselect_col(uint8_t col) { if (pin != NO_PIN) { #ifdef MATRIX_UNSELECT_DRIVE_HIGH - setPinOutput_writeHigh(pin); + gpio_atomic_set_pin_output_high(pin); #else - setPinInputHigh_atomic(pin); + gpio_atomic_set_pin_input_high(pin); #endif } else { shiftOut_single(0x01); @@ -137,9 +137,9 @@ static void unselect_cols(void) { if (pin != NO_PIN) { #ifdef MATRIX_UNSELECT_DRIVE_HIGH - setPinOutput_writeHigh(pin); + gpio_atomic_set_pin_output_high(pin); #else - setPinInputHigh_atomic(pin); + gpio_atomic_set_pin_input_high(pin); #endif } if (x == PIN_START_74HC595) @@ -162,7 +162,7 @@ static void matrix_init_pins(void) { unselect_cols(); for (uint8_t x = 0; x < MATRIX_ROWS; x++) { if (row_pins[x] != NO_PIN) { - setPinInputHigh_atomic(row_pins[x]); + gpio_atomic_set_pin_input_high(row_pins[x]); } } } diff --git a/keyboards/keyprez/bison/keyboard.json b/keyboards/keyprez/bison/keyboard.json index dd35c3c503..5fd2de1ff5 100644 --- a/keyboards/keyprez/bison/keyboard.json +++ b/keyboards/keyprez/bison/keyboard.json @@ -35,13 +35,15 @@ }, "split": { "enabled": true, - "soft_serial_pin": "D0", "encoder": { "right": { "rotary": [ {"pin_a": "B5", "pin_b": "B6"} ] } + }, + "serial": { + "pin": "D0" } }, "processor": "atmega32u4", diff --git a/keyboards/keyprez/unicorn/keyboard.json b/keyboards/keyprez/unicorn/keyboard.json index 238560321d..7fa855e240 100644 --- a/keyboards/keyprez/unicorn/keyboard.json +++ b/keyboards/keyprez/unicorn/keyboard.json @@ -35,12 +35,14 @@ }, "split": { "enabled": true, - "soft_serial_pin": "D0", "matrix_pins": { "right": { "cols": ["F5", "D3", "B5", "D7", "B4", "B6", "E6", "C6"], "rows": ["F4", "B2", "F6", "F7", "B1", "B3"] } + }, + "serial": { + "pin": "D0" } }, "processor": "atmega32u4", diff --git a/keyboards/keystonecaps/gameroyadvance/keyboard.json b/keyboards/keystonecaps/gameroyadvance/keyboard.json index 5a1d9f4921..15cce9afd5 100644 --- a/keyboards/keystonecaps/gameroyadvance/keyboard.json +++ b/keyboards/keystonecaps/gameroyadvance/keyboard.json @@ -55,7 +55,6 @@ }, "split": { "enabled": true, - "soft_serial_pin": "D2", "encoder": { "right": { "rotary": [ @@ -68,6 +67,9 @@ "cols": ["C6", "D4", "D0", "D1", "B1", "F7", "F4", "F5", "F6"], "rows": ["D7", "E6", "B4", "B5", "B6"] } + }, + "serial": { + "pin": "D2" } }, "processor": "atmega32u4", diff --git a/keyboards/kkatano/wallaby/keyboard.json b/keyboards/kkatano/wallaby/keyboard.json index ee475a54bc..636fdba042 100644 --- a/keyboards/kkatano/wallaby/keyboard.json +++ b/keyboards/kkatano/wallaby/keyboard.json @@ -22,6 +22,10 @@ "resync": true } }, + "indicators": { + "caps_lock": "B6", + "scroll_lock": "B7" + }, "matrix_pins": { "cols": ["D5", "C7", "C6", "D4", "D0", "E6", "F0", "F1", "F4", "F5", "F6", "F7", "D7", "D6", "D1", "D2", "D3"], "rows": ["B5", "B4", "B3", "B2", "B1", "B0"] diff --git a/keyboards/kkatano/wallaby/wallaby.c b/keyboards/kkatano/wallaby/wallaby.c deleted file mode 100644 index de2583903b..0000000000 --- a/keyboards/kkatano/wallaby/wallaby.c +++ /dev/null @@ -1,25 +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 <http://www.gnu.org/licenses/>. - */ - -#include "quantum.h" - -bool led_update_kb(led_t led_state) { - if (led_update_user(led_state)) { - gpio_write_pin(B6, led_state.caps_lock); - gpio_write_pin(B7, led_state.scroll_lock); - } - return true; -} diff --git a/keyboards/kkatano/yurei/keyboard.json b/keyboards/kkatano/yurei/keyboard.json index 7bf0895787..59084920da 100644 --- a/keyboards/kkatano/yurei/keyboard.json +++ b/keyboards/kkatano/yurei/keyboard.json @@ -22,6 +22,10 @@ "resync": true } }, + "indicators": { + "caps_lock": "B6", + "scroll_lock": "B7" + }, "matrix_pins": { "cols": ["D5", "C7", "C6", "D4", "D0", "E6", "F0", "F1", "F4", "F5", "F6", "F7", "D7", "D6", "D1", "D2", "D3"], "rows": ["B5", "B4", "B3", "B2", "B1", "B0"] diff --git a/keyboards/kkatano/yurei/yurei.c b/keyboards/kkatano/yurei/yurei.c deleted file mode 100644 index 283726a884..0000000000 --- a/keyboards/kkatano/yurei/yurei.c +++ /dev/null @@ -1,25 +0,0 @@ -/* Copyright 2019 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 <http://www.gnu.org/licenses/>. - */ - -#include "quantum.h" - -bool led_update_kb(led_t led_state) { - if (led_update_user(led_state)) { - gpio_write_pin(B6, led_state.caps_lock); - gpio_write_pin(B7, led_state.scroll_lock); - } - return true; -} diff --git a/keyboards/kopibeng/mnk88/mnk88.c b/keyboards/kopibeng/mnk88/mnk88.c deleted file mode 100644 index efe32f8bfd..0000000000 --- a/keyboards/kopibeng/mnk88/mnk88.c +++ /dev/null @@ -1,36 +0,0 @@ -/* Copyright 2021 Samuel Lu - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -#include "quantum.h" - -void matrix_init_kb(void) { - - gpio_set_pin_output(LED_CAPS_LOCK_PIN); - gpio_set_pin_output(LED_SCROLL_LOCK_PIN); - - matrix_init_user(); -} - -bool led_update_kb(led_t led_state) { - - bool res = led_update_user(led_state); - - if(res) { - gpio_write_pin(LED_CAPS_LOCK_PIN, led_state.caps_lock); - gpio_write_pin(LED_SCROLL_LOCK_PIN, led_state.scroll_lock); - } - return res; -} diff --git a/keyboards/kopibeng/xt8x/xt8x.c b/keyboards/kopibeng/xt8x/xt8x.c index 2c4f246b6a..03342c40af 100644 --- a/keyboards/kopibeng/xt8x/xt8x.c +++ b/keyboards/kopibeng/xt8x/xt8x.c @@ -17,26 +17,11 @@ #include "quantum.h" void matrix_init_kb(void) { - // Initialize indicator LEDs to output - - gpio_set_pin_output(LED_CAPS_LOCK_PIN); // Caps - gpio_set_pin_output(LED_SCROLL_LOCK_PIN); // Scroll lock gpio_set_pin_output(INDICATOR_PIN_0); // Layer indicator on F13 matrix_init_user(); } -bool led_update_kb(led_t led_state) { - - bool res = led_update_user(led_state); - - if(res) { - gpio_write_pin(LED_CAPS_LOCK_PIN, led_state.caps_lock); - gpio_write_pin(LED_SCROLL_LOCK_PIN, led_state.scroll_lock); - } - return res; -} - __attribute__((weak)) layer_state_t layer_state_set_user(layer_state_t state) { gpio_write_pin(INDICATOR_PIN_0, layer_state_cmp(state, 1)); return state; diff --git a/keyboards/kprepublic/bm40hsrgb/rev1/rev1.c b/keyboards/kprepublic/bm40hsrgb/rev1/rev1.c index 16e515042d..f6df97ebf1 100755 --- a/keyboards/kprepublic/bm40hsrgb/rev1/rev1.c +++ b/keyboards/kprepublic/bm40hsrgb/rev1/rev1.c @@ -40,14 +40,4 @@ led_config_t g_led_config = { } }; - -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 diff --git a/keyboards/kumaokobo/kudox/columner/keyboard.json b/keyboards/kumaokobo/kudox/columner/keyboard.json index 2fde419205..4345866382 100644 --- a/keyboards/kumaokobo/kudox/columner/keyboard.json +++ b/keyboards/kumaokobo/kudox/columner/keyboard.json @@ -15,7 +15,9 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D0" + "serial": { + "pin": "D0" + } }, "rgblight": { "saturation_steps": 8, diff --git a/keyboards/kumaokobo/kudox/config.h b/keyboards/kumaokobo/kudox/config.h deleted file mode 100644 index ba80a92797..0000000000 --- a/keyboards/kumaokobo/kudox/config.h +++ /dev/null @@ -1,24 +0,0 @@ -/* Copyright 2019 Kumao Kobo <[email protected]> - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -#pragma once - - -/* Select hand configuration */ -#define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS - diff --git a/keyboards/kumaokobo/kudox/rev1/keyboard.json b/keyboards/kumaokobo/kudox/rev1/keyboard.json index ba4dbe7ae3..65c01a798e 100644 --- a/keyboards/kumaokobo/kudox/rev1/keyboard.json +++ b/keyboards/kumaokobo/kudox/rev1/keyboard.json @@ -15,7 +15,9 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D0" + "serial": { + "pin": "D0" + } }, "rgblight": { "saturation_steps": 8, diff --git a/keyboards/kumaokobo/kudox/rev2/keyboard.json b/keyboards/kumaokobo/kudox/rev2/keyboard.json index a7423adf11..9df232c641 100644 --- a/keyboards/kumaokobo/kudox/rev2/keyboard.json +++ b/keyboards/kumaokobo/kudox/rev2/keyboard.json @@ -15,7 +15,9 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D0" + "serial": { + "pin": "D0" + } }, "rgblight": { "saturation_steps": 8, diff --git a/keyboards/kumaokobo/kudox/rev3/keyboard.json b/keyboards/kumaokobo/kudox/rev3/keyboard.json index 25ead43505..cfd1511123 100644 --- a/keyboards/kumaokobo/kudox/rev3/keyboard.json +++ b/keyboards/kumaokobo/kudox/rev3/keyboard.json @@ -15,7 +15,9 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D0" + "serial": { + "pin": "D0" + } }, "rgblight": { "saturation_steps": 8, diff --git a/keyboards/kumaokobo/kudox_full/config.h b/keyboards/kumaokobo/kudox_full/config.h deleted file mode 100644 index 9512ffea8a..0000000000 --- a/keyboards/kumaokobo/kudox_full/config.h +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright 2021 Kumao Kobo (@kumaokobo) -// SPDX-License-Identifier: GPL-2.0+ - -#pragma once - - -/* Select hand configuration */ -#define MASTER_LEFT -// #define MASTER_RIGHT - diff --git a/keyboards/kumaokobo/kudox_full/kudox_full.c b/keyboards/kumaokobo/kudox_full/kudox_full.c index d69f679822..caa2190600 100644 --- a/keyboards/kumaokobo/kudox_full/kudox_full.c +++ b/keyboards/kumaokobo/kudox_full/kudox_full.c @@ -3,12 +3,6 @@ #include "quantum.h" -#ifdef RGBLIGHT_ENABLE -void eeconfig_init_kb(void) { - rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL); -}; -#endif - #ifdef OLED_ENABLE bool oled_task_kb(void) { if (!oled_task_user()) { return false; } diff --git a/keyboards/kumaokobo/kudox_full/rev1/keyboard.json b/keyboards/kumaokobo/kudox_full/rev1/keyboard.json index 09d1cd152c..b79deec7dc 100644 --- a/keyboards/kumaokobo/kudox_full/rev1/keyboard.json +++ b/keyboards/kumaokobo/kudox_full/rev1/keyboard.json @@ -15,7 +15,9 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D2" + "serial": { + "pin": "D2" + } }, "rgblight": { "saturation_steps": 8, @@ -29,6 +31,9 @@ "knight": true, "christmas": true, "static_gradient": true + }, + "default": { + "animation": "rainbow_swirl" } }, "ws2812": { diff --git a/keyboards/kumaokobo/kudox_game/config.h b/keyboards/kumaokobo/kudox_game/config.h deleted file mode 100644 index f998de9534..0000000000 --- a/keyboards/kumaokobo/kudox_game/config.h +++ /dev/null @@ -1,24 +0,0 @@ -/* -Copyright 2019 Kumao Kobo <[email protected]> - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#pragma once - - -/* Select hand configuration */ -#define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS diff --git a/keyboards/kumaokobo/pico/65keys/keyboard.json b/keyboards/kumaokobo/pico/65keys/keyboard.json index 00113a931f..db2ca9fdca 100644 --- a/keyboards/kumaokobo/pico/65keys/keyboard.json +++ b/keyboards/kumaokobo/pico/65keys/keyboard.json @@ -15,7 +15,9 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D0" + "serial": { + "pin": "D0" + } }, "rgblight": { "saturation_steps": 8, diff --git a/keyboards/kumaokobo/pico/70keys/keyboard.json b/keyboards/kumaokobo/pico/70keys/keyboard.json index a820c7eee3..00add13874 100644 --- a/keyboards/kumaokobo/pico/70keys/keyboard.json +++ b/keyboards/kumaokobo/pico/70keys/keyboard.json @@ -15,7 +15,9 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D0" + "serial": { + "pin": "D0" + } }, "rgblight": { "saturation_steps": 8, diff --git a/keyboards/kumaokobo/pico/config.h b/keyboards/kumaokobo/pico/config.h deleted file mode 100644 index ba80a92797..0000000000 --- a/keyboards/kumaokobo/pico/config.h +++ /dev/null @@ -1,24 +0,0 @@ -/* Copyright 2019 Kumao Kobo <[email protected]> - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -#pragma once - - -/* Select hand configuration */ -#define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS - diff --git a/keyboards/latincompass/latin60rgb/latin60rgb.c b/keyboards/latincompass/latin60rgb/latin60rgb.c index 305aaff5f2..78052eccb6 100644 --- a/keyboards/latincompass/latin60rgb/latin60rgb.c +++ b/keyboards/latincompass/latin60rgb/latin60rgb.c @@ -83,16 +83,6 @@ const is31fl3733_led_t PROGMEM g_is31fl3733_leds[IS31FL3733_LED_COUNT] = { { 0, SW11_CS13, SW10_CS13, SW12_CS13 } }; -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(); -} - bool rgb_matrix_indicators_kb(void) { if (!rgb_matrix_indicators_user()) { return false; diff --git a/keyboards/lets_split/keymaps/default/config.h b/keyboards/lets_split/keymaps/default/config.h index d9787a247f..0bf36b324c 100644 --- a/keyboards/lets_split/keymaps/default/config.h +++ b/keyboards/lets_split/keymaps/default/config.h @@ -25,8 +25,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. SONG(COLEMAK_SOUND), \ SONG(DVORAK_SOUND) \ } - -/* Select hand configuration */ -#define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS diff --git a/keyboards/lets_split/keymaps/via/config.h b/keyboards/lets_split/keymaps/via/config.h index 03853dc391..020ddacf7b 100644 --- a/keyboards/lets_split/keymaps/via/config.h +++ b/keyboards/lets_split/keymaps/via/config.h @@ -26,10 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. SONG(DVORAK_SOUND) \ } -/* Select hand configuration */ -#define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS #undef RGBLIGHT_LED_COUNT #define RGBLIGHT_EFFECT_BREATHING diff --git a/keyboards/lets_split/rev1/keyboard.json b/keyboards/lets_split/rev1/keyboard.json index 49bbcbabc9..885ed7c2b9 100644 --- a/keyboards/lets_split/rev1/keyboard.json +++ b/keyboards/lets_split/rev1/keyboard.json @@ -13,7 +13,9 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D0" + "serial": { + "pin": "D0" + } }, "rgblight": { "led_count": 16 diff --git a/keyboards/lets_split/rev2/keyboard.json b/keyboards/lets_split/rev2/keyboard.json index 13da4f9624..7f7c75d1a7 100644 --- a/keyboards/lets_split/rev2/keyboard.json +++ b/keyboards/lets_split/rev2/keyboard.json @@ -13,7 +13,9 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D0" + "serial": { + "pin": "D0" + } }, "rgblight": { "led_count": 12 diff --git a/keyboards/lets_split/sockets/keyboard.json b/keyboards/lets_split/sockets/keyboard.json index 1354d9cf70..a385df3c78 100644 --- a/keyboards/lets_split/sockets/keyboard.json +++ b/keyboards/lets_split/sockets/keyboard.json @@ -13,7 +13,9 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D0" + "serial": { + "pin": "D0" + } }, "rgblight": { "led_count": 12 diff --git a/keyboards/lfkeyboards/lfk65_hs/lfk65_hs.c b/keyboards/lfkeyboards/lfk65_hs/lfk65_hs.c deleted file mode 100644 index ee8d8b2e73..0000000000 --- a/keyboards/lfkeyboards/lfk65_hs/lfk65_hs.c +++ /dev/null @@ -1,19 +0,0 @@ -#include "lfk65_hs.h" -#include <avr/wdt.h> - -bool process_record_kb(uint16_t keycode, keyrecord_t* record) -{ - if (keycode == QK_BOOT) { - reset_keyboard_kb(); - } - return process_record_user(keycode, record); -} - -void reset_keyboard_kb(void){ -#ifdef WATCHDOG_ENABLE - MCUSR = 0; - wdt_disable(); - wdt_reset(); -#endif - reset_keyboard(); -} diff --git a/keyboards/lfkeyboards/lfk78/lfk78.c b/keyboards/lfkeyboards/lfk78/lfk78.c index 3bf7c40d15..6fe282bb0b 100644 --- a/keyboards/lfkeyboards/lfk78/lfk78.c +++ b/keyboards/lfkeyboards/lfk78/lfk78.c @@ -21,12 +21,10 @@ void matrix_init_kb(void) { #endif } -void matrix_scan_kb(void) { +void housekeeping_task_kb(void) { #ifdef WATCHDOG_ENABLE wdt_reset(); #endif - - matrix_scan_user(); } void clicking_notes(uint16_t freq, uint16_t duration) { @@ -45,20 +43,19 @@ bool process_record_kb(uint16_t keycode, keyrecord_t* record) { if (click_toggle && record->event.pressed) { clicking_notes(click_hz, click_time); } - - if (keycode == QK_BOOT) { - reset_keyboard_kb(); - } - return process_record_user(keycode, record); } -void reset_keyboard_kb(void) { +bool shutdown_kb(bool jump_to_bootloader) { #ifdef WATCHDOG_ENABLE + // Unconditionally run so shutdown_user can't mess up watchdog MCUSR = 0; wdt_disable(); wdt_reset(); #endif - reset_keyboard(); + if (!shutdown_user(jump_to_bootloader)) { + return false; + } + return true; } diff --git a/keyboards/lfkeyboards/lfk87/lfk87.c b/keyboards/lfkeyboards/lfk87/lfk87.c index 480a44ea84..ff0a038114 100644 --- a/keyboards/lfkeyboards/lfk87/lfk87.c +++ b/keyboards/lfkeyboards/lfk87/lfk87.c @@ -22,12 +22,10 @@ void matrix_init_kb(void) #endif } -void matrix_scan_kb(void) -{ +void housekeeping_task_kb(void) { #ifdef WATCHDOG_ENABLE wdt_reset(); #endif - matrix_scan_user(); } void clicking_notes(uint16_t freq, uint16_t duration){ @@ -47,17 +45,19 @@ bool process_record_kb(uint16_t keycode, keyrecord_t* record) if (click_toggle && record->event.pressed){ clicking_notes(click_hz, click_time); } - if (keycode == QK_BOOT) { - reset_keyboard_kb(); - } return process_record_user(keycode, record); } -void reset_keyboard_kb(void){ +bool shutdown_kb(bool jump_to_bootloader) { #ifdef WATCHDOG_ENABLE + // Unconditionally run so shutdown_user can't mess up watchdog MCUSR = 0; wdt_disable(); wdt_reset(); #endif - reset_keyboard(); + + if (!shutdown_user(jump_to_bootloader)) { + return false; + } + return true; } diff --git a/keyboards/lfkeyboards/lfkpad/lfkpad.c b/keyboards/lfkeyboards/lfkpad/lfkpad.c index 8769c2c531..a169f7aa96 100644 --- a/keyboards/lfkeyboards/lfkpad/lfkpad.c +++ b/keyboards/lfkeyboards/lfkpad/lfkpad.c @@ -11,10 +11,8 @@ void matrix_init_kb(void) { #endif } -void matrix_scan_kb(void) { +void housekeeping_task_kb(void) { #ifdef WATCHDOG_ENABLE wdt_reset(); #endif - - matrix_scan_user(); } diff --git a/keyboards/lfkeyboards/mini1800/mini1800.c b/keyboards/lfkeyboards/mini1800/mini1800.c index 6ac615f871..1d07ea7b0d 100644 --- a/keyboards/lfkeyboards/mini1800/mini1800.c +++ b/keyboards/lfkeyboards/mini1800/mini1800.c @@ -24,12 +24,10 @@ void matrix_init_kb(void) #endif } -void matrix_scan_kb(void) -{ +void housekeeping_task_kb(void) { #ifdef WATCHDOG_ENABLE wdt_reset(); #endif - matrix_scan_user(); } void click(uint16_t freq, uint16_t duration){ @@ -49,17 +47,19 @@ bool process_record_kb(uint16_t keycode, keyrecord_t* record) if (click_toggle && record->event.pressed){ click(click_hz, click_time); } - if (keycode == QK_BOOT) { - reset_keyboard_kb(); - } return process_record_user(keycode, record); } -void reset_keyboard_kb(void){ +bool shutdown_kb(bool jump_to_bootloader) { #ifdef WATCHDOG_ENABLE + // Unconditionally run so shutdown_user can't mess up watchdog MCUSR = 0; wdt_disable(); wdt_reset(); #endif - reset_keyboard(); + + if (!shutdown_user(jump_to_bootloader)) { + return false; + } + return true; } diff --git a/keyboards/lfkeyboards/smk65/revb/revb.c b/keyboards/lfkeyboards/smk65/revb/revb.c index f519b413b5..970a4d3a10 100644 --- a/keyboards/lfkeyboards/smk65/revb/revb.c +++ b/keyboards/lfkeyboards/smk65/revb/revb.c @@ -36,12 +36,10 @@ void matrix_init_kb(void) #endif } -void matrix_scan_kb(void) -{ +void housekeeping_task_kb(void) { #ifdef WATCHDOG_ENABLE wdt_reset(); #endif - matrix_scan_user(); } void click(uint16_t freq, uint16_t duration){ @@ -63,17 +61,19 @@ bool process_record_kb(uint16_t keycode, keyrecord_t* record) if (click_toggle && record->event.pressed){ click(click_hz, click_time); } - if (keycode == QK_BOOT) { - reset_keyboard_kb(); - } return process_record_user(keycode, record); } -void reset_keyboard_kb(void){ +bool shutdown_kb(bool jump_to_bootloader) { #ifdef WATCHDOG_ENABLE + // Unconditionally run so shutdown_user can't mess up watchdog MCUSR = 0; wdt_disable(); wdt_reset(); #endif - reset_keyboard(); + + if (!shutdown_user(jump_to_bootloader)) { + return false; + } + return true; } diff --git a/keyboards/lily58/glow_enc/keyboard.json b/keyboards/lily58/glow_enc/keyboard.json index 7778069833..9f7a2760aa 100644 --- a/keyboards/lily58/glow_enc/keyboard.json +++ b/keyboards/lily58/glow_enc/keyboard.json @@ -25,13 +25,15 @@ }, "split": { "enabled": true, - "soft_serial_pin": "D2", "encoder": { "right": { "rotary": [ {"pin_a": "D4", "pin_b": "F5"} ] } + }, + "serial": { + "pin": "D2" } }, "ws2812": { diff --git a/keyboards/lily58/keymaps/default/config.h b/keyboards/lily58/keymaps/default/config.h index 5b45770f38..10330a16af 100644 --- a/keyboards/lily58/keymaps/default/config.h +++ b/keyboards/lily58/keymaps/default/config.h @@ -20,12 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Select hand configuration */ - -#define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS - #define QUICK_TAP_TERM 0 #define TAPPING_TERM 100 diff --git a/keyboards/lily58/keymaps/lily58l/config.h b/keyboards/lily58/keymaps/lily58l/config.h index c61a32042b..1fe44f8d39 100644 --- a/keyboards/lily58/keymaps/lily58l/config.h +++ b/keyboards/lily58/keymaps/lily58l/config.h @@ -21,11 +21,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Select hand configuration */ -#define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS - #ifdef RGBLIGHT_ENABLE # define RGBLIGHT_EFFECT_BREATHING # define RGBLIGHT_EFFECT_RAINBOW_MOOD diff --git a/keyboards/lily58/keymaps/via/config.h b/keyboards/lily58/keymaps/via/config.h index 284d3944b9..fbe8af6406 100644 --- a/keyboards/lily58/keymaps/via/config.h +++ b/keyboards/lily58/keymaps/via/config.h @@ -22,12 +22,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //#define USE_MATRIX_I2C -/* Select hand configuration */ - -#define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS - #define QUICK_TAP_TERM 0 #define TAPPING_TERM 100 diff --git a/keyboards/lily58/keymaps/via_mechboards/config.h b/keyboards/lily58/keymaps/via_mechboards/config.h index bd4e11fb0e..959e6b1543 100644 --- a/keyboards/lily58/keymaps/via_mechboards/config.h +++ b/keyboards/lily58/keymaps/via_mechboards/config.h @@ -21,12 +21,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Select hand configuration */ - -#define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS - #define TAPPING_FORCE_HOLD #define TAPPING_TERM 100 diff --git a/keyboards/lily58/light/keyboard.json b/keyboards/lily58/light/keyboard.json index 34c4e28b18..0eadf11eb6 100644 --- a/keyboards/lily58/light/keyboard.json +++ b/keyboards/lily58/light/keyboard.json @@ -26,13 +26,15 @@ }, "split": { "enabled": true, - "soft_serial_pin": "D2", "encoder": { "right": { "rotary": [ {"pin_a": "F5", "pin_b": "F4"} ] } + }, + "serial": { + "pin": "D2" } }, "ws2812": { diff --git a/keyboards/lily58/r2g/keyboard.json b/keyboards/lily58/r2g/keyboard.json index dbe5cfa9e0..bb825b1d9e 100644 --- a/keyboards/lily58/r2g/keyboard.json +++ b/keyboards/lily58/r2g/keyboard.json @@ -25,7 +25,9 @@ }, "split": { "enabled": true, - "soft_serial_pin": "D2", + "serial": { + "pin": "D2" + }, "transport": { "sync": { "matrix_state": true diff --git a/keyboards/lily58/rev1/keyboard.json b/keyboards/lily58/rev1/keyboard.json index 6f341915bf..9ee51b8ba3 100644 --- a/keyboards/lily58/rev1/keyboard.json +++ b/keyboards/lily58/rev1/keyboard.json @@ -18,7 +18,9 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D2" + "serial": { + "pin": "D2" + } }, "rgblight": { "led_count": 12 diff --git a/keyboards/lime/rev1/keyboard.json b/keyboards/lime/rev1/keyboard.json index e7d6231a6b..50fc82ae19 100644 --- a/keyboards/lime/rev1/keyboard.json +++ b/keyboards/lime/rev1/keyboard.json @@ -20,7 +20,6 @@ }, "split": { "enabled": true, - "soft_serial_pin": "D2", "encoder": { "right": { "rotary": [ @@ -28,6 +27,9 @@ ] } }, + "serial": { + "pin": "D2" + }, "transport": { "sync": { "wpm": true diff --git a/keyboards/majistic/keyboard.json b/keyboards/majistic/keyboard.json index 2a93a99e86..adf18792c7 100644 --- a/keyboards/majistic/keyboard.json +++ b/keyboards/majistic/keyboard.json @@ -29,12 +29,14 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D2", "matrix_pins": { "right": { "cols": ["B6", "B2", "B3", "B1", "F7", "F6", "F5", "F4"], "rows": ["D4", "C6", "D7", "E6", "B4"] } + }, + "serial": { + "pin": "D2" } }, "processor": "atmega32u4", diff --git a/keyboards/makeymakey/makeymakey.c b/keyboards/makeymakey/makeymakey.c index bfc8788375..6f8839f76e 100644 --- a/keyboards/makeymakey/makeymakey.c +++ b/keyboards/makeymakey/makeymakey.c @@ -108,9 +108,8 @@ void cycle_leds(void) { } } -void matrix_scan_kb(void) { +void housekeeping_task_kb(void) { cycle_leds(); - matrix_scan_user(); } bool process_record_kb(uint16_t keycode, keyrecord_t *record) { diff --git a/keyboards/malevolti/lyra/keymaps/default/config.h b/keyboards/malevolti/lyra/keymaps/default/config.h index 3e8db641e1..caaeea52c0 100644 --- a/keyboards/malevolti/lyra/keymaps/default/config.h +++ b/keyboards/malevolti/lyra/keymaps/default/config.h @@ -20,11 +20,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Select hand configuration */ - -#define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS - #define QUICK_TAP_TERM 0 #define TAPPING_TERM 100 diff --git a/keyboards/malevolti/lyra/keymaps/via/config.h b/keyboards/malevolti/lyra/keymaps/via/config.h index 3e8db641e1..caaeea52c0 100644 --- a/keyboards/malevolti/lyra/keymaps/via/config.h +++ b/keyboards/malevolti/lyra/keymaps/via/config.h @@ -20,11 +20,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Select hand configuration */ - -#define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS - #define QUICK_TAP_TERM 0 #define TAPPING_TERM 100 diff --git a/keyboards/malevolti/lyra/rev1/keyboard.json b/keyboards/malevolti/lyra/rev1/keyboard.json index 4c88b71692..cce0ad7bb7 100644 --- a/keyboards/malevolti/lyra/rev1/keyboard.json +++ b/keyboards/malevolti/lyra/rev1/keyboard.json @@ -15,7 +15,9 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D2" + "serial": { + "pin": "D2" + } }, "tapping": { "term": 100 diff --git a/keyboards/manta60/keyboard.json b/keyboards/manta60/keyboard.json index dbeb6628a5..d2f308e89c 100644 --- a/keyboards/manta60/keyboard.json +++ b/keyboards/manta60/keyboard.json @@ -30,7 +30,9 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D2" + "serial": { + "pin": "D2" + } }, "rgblight": { "saturation_steps": 8, diff --git a/keyboards/maple_computing/lets_split_eh/eh/config.h b/keyboards/maple_computing/lets_split_eh/config.h index 38cf73ae1e..22b97cfb6a 100644 --- a/keyboards/maple_computing/lets_split_eh/eh/config.h +++ b/keyboards/maple_computing/lets_split_eh/config.h @@ -18,9 +18,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Split Defines */ -#define SPLIT_HAND_PIN D3 - // The 'EH' has previously forced use of I2C so this default has been kept // however users can undef to use serial #define USE_I2C diff --git a/keyboards/maple_computing/lets_split_eh/eh/rules.mk b/keyboards/maple_computing/lets_split_eh/eh/rules.mk deleted file mode 100644 index 271780b75e..0000000000 --- a/keyboards/maple_computing/lets_split_eh/eh/rules.mk +++ /dev/null @@ -1,2 +0,0 @@ -# Disable unsupported hardware -AUDIO_SUPPORTED = no diff --git a/keyboards/maple_computing/lets_split_eh/eh/keyboard.json b/keyboards/maple_computing/lets_split_eh/keyboard.json index f40b15098f..42a1cf3e77 100644 --- a/keyboards/maple_computing/lets_split_eh/eh/keyboard.json +++ b/keyboards/maple_computing/lets_split_eh/keyboard.json @@ -19,6 +19,7 @@ "rgblight": { "led_count": 12, "split_count": [6, 6], + "sleep": true, "animations": { "breathing": true, "rainbow_mood": true, @@ -37,12 +38,17 @@ }, "split": { "enabled": true, - "soft_serial_pin": "D0" + "handedness": { + "pin": "D3" + }, + "serial": { + "pin": "D0" + } }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "features": { - "bootmagic": false, + "bootmagic": true, "mousekey": false, "extrakey": true, "nkro": true, diff --git a/keyboards/maple_computing/lets_split_eh/eh/eh.c b/keyboards/maple_computing/lets_split_eh/lets_split_eh.c index 37e8b3ab9b..37e8b3ab9b 100644 --- a/keyboards/maple_computing/lets_split_eh/eh/eh.c +++ b/keyboards/maple_computing/lets_split_eh/lets_split_eh.c diff --git a/keyboards/maple_computing/lets_split_eh/readme.md b/keyboards/maple_computing/lets_split_eh/readme.md index 90ae5393d1..dc769b72c4 100644 --- a/keyboards/maple_computing/lets_split_eh/readme.md +++ b/keyboards/maple_computing/lets_split_eh/readme.md @@ -8,6 +8,6 @@ Keyboard Maintainer: [Christopher Poole (That-Canadian)](https://github.com/That Make example for this keyboard (after setting up your build environment): - make maple_computing/lets_split_eh/eh:default + make maple_computing/lets_split_eh: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/maple_computing/lets_split_eh/rules.mk b/keyboards/maple_computing/lets_split_eh/rules.mk index 9bae45fde8..271780b75e 100644 --- a/keyboards/maple_computing/lets_split_eh/rules.mk +++ b/keyboards/maple_computing/lets_split_eh/rules.mk @@ -1 +1,2 @@ -DEFAULT_FOLDER = maple_computing/lets_split_eh/eh +# Disable unsupported hardware +AUDIO_SUPPORTED = no diff --git a/keyboards/maple_computing/minidox/rev1/keyboard.json b/keyboards/maple_computing/minidox/rev1/keyboard.json index 7fc69dd9dd..b64f26e834 100644 --- a/keyboards/maple_computing/minidox/rev1/keyboard.json +++ b/keyboards/maple_computing/minidox/rev1/keyboard.json @@ -15,7 +15,9 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D0" + "serial": { + "pin": "D0" + } }, "processor": "atmega32u4", "bootloader": "caterina", diff --git a/keyboards/marksard/leftover30/keyboard.json b/keyboards/marksard/leftover30/keyboard.json index 546b3dbdd3..ae2250a5f2 100644 --- a/keyboards/marksard/leftover30/keyboard.json +++ b/keyboards/marksard/leftover30/keyboard.json @@ -33,6 +33,10 @@ {"pin_a": "F4", "pin_b": "F5"} ] }, + "indicators": { + "caps_lock": "D1", + "num_lock": "D2" + }, "rgblight": { "saturation_steps": 8, "brightness_steps": 8, diff --git a/keyboards/marksard/leftover30/leftover30.c b/keyboards/marksard/leftover30/leftover30.c deleted file mode 100644 index cea0de703a..0000000000 --- a/keyboards/marksard/leftover30/leftover30.c +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright 2020 marksard - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -#include "quantum.h" - -// Optional override functions below. -// You can leave any or all of these undefined. -// These are only required if you want to perform custom actions. - -void keyboard_pre_init_user(void) { - /* Set CAPSLOCK indicator pin as output */ - gpio_set_pin_output(D1); - /* Set NUMLOCK indicator pin as output */ - gpio_set_pin_output(D2); -} - -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if(res) { - gpio_write_pin(D2, led_state.num_lock); - gpio_write_pin(D1, led_state.caps_lock); - } - return res; -} diff --git a/keyboards/marksard/rhymestone/rev1/keyboard.json b/keyboards/marksard/rhymestone/rev1/keyboard.json index 86af26b072..3fe23d6d94 100644 --- a/keyboards/marksard/rhymestone/rev1/keyboard.json +++ b/keyboards/marksard/rhymestone/rev1/keyboard.json @@ -23,7 +23,9 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D2" + "serial": { + "pin": "D2" + } }, "ws2812": { "pin": "D3" diff --git a/keyboards/marksard/treadstone48/rev1/keyboard.json b/keyboards/marksard/treadstone48/rev1/keyboard.json index d841e12cbe..ea9f108f0b 100644 --- a/keyboards/marksard/treadstone48/rev1/keyboard.json +++ b/keyboards/marksard/treadstone48/rev1/keyboard.json @@ -15,7 +15,9 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D2" + "serial": { + "pin": "D2" + } }, "ws2812": { "pin": "D3" diff --git a/keyboards/masterworks/classy_tkl/rev_a/keyboard.json b/keyboards/masterworks/classy_tkl/rev_a/keyboard.json index d3e723d413..889aa6d3f9 100644 --- a/keyboards/masterworks/classy_tkl/rev_a/keyboard.json +++ b/keyboards/masterworks/classy_tkl/rev_a/keyboard.json @@ -22,6 +22,10 @@ "resync": true } }, + "indicators": { + "caps_lock": "B5", + "scroll_lock": "B6" + }, "matrix_pins": { "cols": ["B4", "D7", "D6", "D4", "C6", "D5", "D3", "D2", "D1", "D0", "B7", "B3", "B2", "B1", "B0", "E6", "F7"], "rows": ["C7", "F0", "F1", "F4", "F5", "F6"] diff --git a/keyboards/masterworks/classy_tkl/rev_a/rev_a.c b/keyboards/masterworks/classy_tkl/rev_a/rev_a.c deleted file mode 100644 index 6e01c217d2..0000000000 --- a/keyboards/masterworks/classy_tkl/rev_a/rev_a.c +++ /dev/null @@ -1,42 +0,0 @@ -/* Copyright 2020 Mathias Andersson <[email protected]> - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ -#include "quantum.h" - -#define CAPS_PIN B5 -#define SCROLL_PIN B6 - -// Optional override functions below. -// You can leave any or all of these undefined. -// These are only required if you want to perform custom actions. - -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - - gpio_set_pin_output(CAPS_PIN); - gpio_set_pin_output(SCROLL_PIN); - - matrix_init_user(); -} - -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if(res) { - gpio_write_pin(CAPS_PIN, led_state.caps_lock); - gpio_write_pin(SCROLL_PIN, led_state.scroll_lock); - } - return res; -} diff --git a/keyboards/matrix/cain_re/cain_re.c b/keyboards/matrix/cain_re/cain_re.c deleted file mode 100644 index 6dc24f2292..0000000000 --- a/keyboards/matrix/cain_re/cain_re.c +++ /dev/null @@ -1,40 +0,0 @@ -/** - * cain_re.c - * - Copyright 2020 astro <[email protected]> - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -#include "quantum.h" - -void matrix_init_kb(void) -{ - gpio_set_pin_output(NUM_PIN); - gpio_set_pin_output(CAPS_PIN); - gpio_set_pin_output(SCROLL_PIN); - - matrix_init_user(); -} - -bool led_update_kb(led_t led_state) -{ - bool res = led_update_user(led_state); - if (res) { - gpio_write_pin(NUM_PIN, led_state.num_lock); - gpio_write_pin(CAPS_PIN, led_state.caps_lock); - gpio_write_pin(SCROLL_PIN, led_state.scroll_lock); - } - return res; -} diff --git a/keyboards/matrix/cain_re/config.h b/keyboards/matrix/cain_re/config.h deleted file mode 100644 index 9469d689d0..0000000000 --- a/keyboards/matrix/cain_re/config.h +++ /dev/null @@ -1,24 +0,0 @@ -/** - * config.h - * - Copyright 2020 astro <[email protected]> - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -#pragma once - -#define CAPS_PIN D3 -#define NUM_PIN F7 -#define SCROLL_PIN B0 diff --git a/keyboards/matrix/cain_re/keyboard.json b/keyboards/matrix/cain_re/keyboard.json index 02c6cbbeb5..7d93e806c2 100644 --- a/keyboards/matrix/cain_re/keyboard.json +++ b/keyboards/matrix/cain_re/keyboard.json @@ -8,6 +8,11 @@ "pid": "0x0106", "device_version": "0.0.1" }, + "indicators": { + "caps_lock": "D3", + "num_lock": "F7", + "scroll_lock": "B0" + }, "rgblight": { "saturation_steps": 8, "brightness_steps": 8, diff --git a/keyboards/matrix/falcon/falcon.c b/keyboards/matrix/falcon/falcon.c index 74677ab0d1..bfc878a79c 100644 --- a/keyboards/matrix/falcon/falcon.c +++ b/keyboards/matrix/falcon/falcon.c @@ -25,4 +25,5 @@ void matrix_init_kb(void) gpio_set_pin_output(LED_POWER_PIN); gpio_write_pin_high(LED_POWER_PIN); + matrix_init_user(); } diff --git a/keyboards/matrix/m12og/rev2/keyboard.json b/keyboards/matrix/m12og/rev2/keyboard.json index 42df6a75e8..45fcffe9eb 100644 --- a/keyboards/matrix/m12og/rev2/keyboard.json +++ b/keyboards/matrix/m12og/rev2/keyboard.json @@ -8,6 +8,12 @@ "pid": "0x8712", "device_version": "0.0.1" }, + "indicators": { + "caps_lock": "C6", + "num_lock": "B1", + "scroll_lock": "B2", + "on_state": 0 + }, "rgblight": { "saturation_steps": 8, "brightness_steps": 8, diff --git a/keyboards/matrix/m12og/rev2/rev2.c b/keyboards/matrix/m12og/rev2/rev2.c deleted file mode 100644 index e64640b2d2..0000000000 --- a/keyboards/matrix/m12og/rev2/rev2.c +++ /dev/null @@ -1,23 +0,0 @@ -/** - * rev2.c - */ - -#include "quantum.h" - -void matrix_init_kb(void) { - gpio_set_pin_output(C6); - gpio_set_pin_output(B2); - gpio_set_pin_output(B1); - - matrix_init_user(); -} - -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if (res) { - gpio_write_pin(B1, !led_state.num_lock); - gpio_write_pin(C6, !led_state.caps_lock); - gpio_write_pin(B2, !led_state.scroll_lock); - } - return res; -} diff --git a/keyboards/matrix/m20add/m20add.c b/keyboards/matrix/m20add/m20add.c index ac483e8aab..267c8e5134 100644 --- a/keyboards/matrix/m20add/m20add.c +++ b/keyboards/matrix/m20add/m20add.c @@ -34,11 +34,10 @@ void matrix_init_kb(void) { matrix_init_user(); } -void matrix_scan_kb(void) { +void housekeeping_task_kb(void) { #ifdef RGBLIGHT_ENABLE rgb_ring_task(); #endif - matrix_scan_user(); } static uint16_t caps_lock_pin = DEF_PIN(TCA6424_PORT2, 3); diff --git a/keyboards/mc_76k/keyboard.json b/keyboards/mc_76k/keyboard.json index 049483bed9..18aef48d01 100644 --- a/keyboards/mc_76k/keyboard.json +++ b/keyboards/mc_76k/keyboard.json @@ -22,6 +22,10 @@ "resync": true } }, + "indicators": { + "caps_lock": "D2", + "on_state": 0 + }, "matrix_pins": { "cols": ["D5", "D3", "D4", "B1", "D6", "D7", "B4", "B5", "F7", "F6", "F5", "F4", "F1", "F0"], "rows": ["C7", "C6", "B6", "B0", "D1", "D0"] diff --git a/keyboards/mc_76k/mc_76k.c b/keyboards/mc_76k/mc_76k.c deleted file mode 100644 index 44d2374b1c..0000000000 --- a/keyboards/mc_76k/mc_76k.c +++ /dev/null @@ -1,34 +0,0 @@ -/* Copyright 2020 Yiancar-Designs - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -#include "quantum.h" - -void keyboard_pre_init_kb (void) { - gpio_set_pin_output(D2); -} - -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if(res) { - // gpio_write_pin sets the pin high for 1 and low for 0. - // In this example the pins are inverted, setting - // it low/0 turns it on, and high/1 turns the LED off. - // This behavior depends on whether the LED is between the pin - // and VCC or the pin and GND. - gpio_write_pin(D2, !led_state.caps_lock); - } - return res; -} diff --git a/keyboards/mechlovin/adelais/rgb_led/rev2/rev2.c b/keyboards/mechlovin/adelais/rgb_led/rev2/rev2.c index d49d16e85a..cc3853cacd 100644 --- a/keyboards/mechlovin/adelais/rgb_led/rev2/rev2.c +++ b/keyboards/mechlovin/adelais/rgb_led/rev2/rev2.c @@ -131,6 +131,10 @@ bool rgb_matrix_indicators_kb(void) { #endif bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + if (!process_record_user(keycode, record)) { + return false; + } + if (record->event.pressed) { switch(keycode) { #ifdef RGBLIGHT_ENABLE diff --git a/keyboards/mechlovin/hannah60rgb/rev2/rev2.c b/keyboards/mechlovin/hannah60rgb/rev2/rev2.c index c6943cc357..3fdc571380 100644 --- a/keyboards/mechlovin/hannah60rgb/rev2/rev2.c +++ b/keyboards/mechlovin/hannah60rgb/rev2/rev2.c @@ -223,6 +223,10 @@ layer_state_t layer_state_set_user(layer_state_t state) { #endif bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + if (!process_record_user(keycode, record)) { + return false; + } + if (record->event.pressed) { switch(keycode) { #ifdef RGB_MATRIX_DISABLE_KEYCODES diff --git a/keyboards/mechlovin/kay65/kay65.c b/keyboards/mechlovin/kay65/kay65.c index f59f23e13d..b125cf1f79 100644 --- a/keyboards/mechlovin/kay65/kay65.c +++ b/keyboards/mechlovin/kay65/kay65.c @@ -17,9 +17,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "quantum.h" -void keyboard_pre_init_user(void) { - // Call the keyboard pre init code. - +void keyboard_pre_init_kb(void) { // Set our LED pins as output gpio_set_pin_output(D7); + + keyboard_pre_init_user(); } diff --git a/keyboards/mechlovin/olly/jf/rev2/keyboard.json b/keyboards/mechlovin/olly/jf/rev2/keyboard.json index 3771188638..aa87d59847 100644 --- a/keyboards/mechlovin/olly/jf/rev2/keyboard.json +++ b/keyboards/mechlovin/olly/jf/rev2/keyboard.json @@ -42,111 +42,130 @@ "driver": "is31fl3731", "layout": [ {"matrix": [0, 0], "x": 0, "y": 0, "flags": 4}, - {"matrix": [0, 2], "x": 24, "y": 0, "flags": 4}, - {"matrix": [0, 3], "x": 37, "y": 0, "flags": 4}, - {"matrix": [0, 4], "x": 49, "y": 0, "flags": 4}, - {"matrix": [0, 5], "x": 62, "y": 0, "flags": 4}, - {"matrix": [0, 6], "x": 74, "y": 0, "flags": 4}, - {"matrix": [0, 7], "x": 87, "y": 0, "flags": 4}, - {"matrix": [0, 8], "x": 99, "y": 0, "flags": 4}, - {"matrix": [0, 9], "x": 122, "y": 0, "flags": 4}, - {"matrix": [0, 10], "x": 124, "y": 0, "flags": 4}, - {"matrix": [0, 11], "x": 137, "y": 0, "flags": 4}, - {"matrix": [0, 12], "x": 140, "y": 0, "flags": 4}, - {"matrix": [0, 13], "x": 162, "y": 0, "flags": 4}, - {"matrix": [0, 14], "x": 174, "y": 0, "flags": 4}, - {"matrix": [0, 15], "x": 186, "y": 0, "flags": 4}, - {"matrix": [0, 16], "x": 199, "y": 0, "flags": 4}, - {"matrix": [0, 17], "x": 211, "y": 0, "flags": 4}, + + {"matrix": [0, 2], "x": 17, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 29, "y": 0, "flags": 4}, + {"matrix": [0, 4], "x": 40, "y": 0, "flags": 4}, + {"matrix": [0, 5], "x": 52, "y": 0, "flags": 4}, + + {"matrix": [0, 6], "x": 69, "y": 0, "flags": 4}, + {"matrix": [0, 7], "x": 80, "y": 0, "flags": 4}, + {"matrix": [0, 8], "x": 92, "y": 0, "flags": 4}, + {"matrix": [0, 9], "x": 103, "y": 0, "flags": 4}, + + {"matrix": [0, 10], "x": 121, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 132, "y": 0, "flags": 4}, + {"matrix": [0, 12], "x": 144, "y": 0, "flags": 4}, + {"matrix": [0, 13], "x": 155, "y": 0, "flags": 4}, + + {"matrix": [0, 14], "x": 175, "y": 0, "flags": 4}, + + {"matrix": [0, 15], "x": 190, "y": 0, "flags": 4}, + {"matrix": [0, 16], "x": 201, "y": 0, "flags": 4}, + {"matrix": [0, 17], "x": 213, "y": 0, "flags": 4}, {"matrix": [0, 18], "x": 224, "y": 0, "flags": 4}, - {"matrix": [1, 0], "x": 0, "y": 13, "flags": 4}, - {"matrix": [1, 1], "x": 12, "y": 13, "flags": 4}, - {"matrix": [1, 2], "x": 24, "y": 13, "flags": 4}, - {"matrix": [1, 3], "x": 37, "y": 13, "flags": 4}, - {"matrix": [1, 4], "x": 49, "y": 13, "flags": 4}, - {"matrix": [1, 5], "x": 62, "y": 13, "flags": 4}, - {"matrix": [1, 6], "x": 74, "y": 13, "flags": 4}, - {"matrix": [1, 7], "x": 87, "y": 13, "flags": 4}, - {"matrix": [1, 8], "x": 99, "y": 13, "flags": 4}, - {"matrix": [1, 9], "x": 122, "y": 13, "flags": 4}, - {"matrix": [1, 10], "x": 124, "y": 13, "flags": 4}, - {"matrix": [1, 11], "x": 137, "y": 13, "flags": 4}, - {"matrix": [1, 12], "x": 140, "y": 13, "flags": 4}, - {"matrix": [1, 13], "x": 162, "y": 13, "flags": 4}, - {"matrix": [1, 14], "x": 174, "y": 13, "flags": 4}, - {"matrix": [1, 15], "x": 186, "y": 13, "flags": 4}, - {"matrix": [1, 16], "x": 199, "y": 13, "flags": 4}, - {"matrix": [1, 17], "x": 211, "y": 13, "flags": 4}, - {"matrix": [1, 18], "x": 224, "y": 13, "flags": 4}, - {"matrix": [2, 0], "x": 0, "y": 25, "flags": 4}, - {"matrix": [2, 1], "x": 12, "y": 25, "flags": 4}, - {"matrix": [2, 2], "x": 24, "y": 25, "flags": 4}, - {"matrix": [2, 3], "x": 37, "y": 25, "flags": 4}, - {"matrix": [2, 4], "x": 49, "y": 25, "flags": 4}, - {"matrix": [2, 5], "x": 62, "y": 25, "flags": 4}, - {"matrix": [2, 6], "x": 74, "y": 25, "flags": 4}, - {"matrix": [2, 7], "x": 87, "y": 25, "flags": 4}, - {"matrix": [2, 8], "x": 99, "y": 25, "flags": 4}, - {"matrix": [2, 9], "x": 122, "y": 25, "flags": 4}, - {"matrix": [2, 10], "x": 124, "y": 25, "flags": 4}, - {"matrix": [2, 11], "x": 137, "y": 25, "flags": 4}, - {"matrix": [2, 12], "x": 140, "y": 25, "flags": 4}, - {"matrix": [2, 13], "x": 162, "y": 25, "flags": 4}, - {"matrix": [2, 14], "x": 174, "y": 25, "flags": 4}, - {"matrix": [2, 15], "x": 186, "y": 25, "flags": 4}, - {"matrix": [2, 16], "x": 199, "y": 25, "flags": 4}, - {"matrix": [2, 17], "x": 211, "y": 25, "flags": 4}, - {"matrix": [2, 18], "x": 224, "y": 25, "flags": 4}, - {"matrix": [3, 0], "x": 0, "y": 38, "flags": 4}, - {"matrix": [3, 1], "x": 12, "y": 38, "flags": 4}, - {"matrix": [3, 2], "x": 24, "y": 38, "flags": 4}, - {"matrix": [3, 3], "x": 37, "y": 38, "flags": 4}, - {"matrix": [3, 4], "x": 49, "y": 38, "flags": 4}, - {"matrix": [3, 5], "x": 62, "y": 38, "flags": 4}, - {"matrix": [3, 6], "x": 74, "y": 38, "flags": 4}, - {"matrix": [3, 7], "x": 87, "y": 38, "flags": 4}, - {"matrix": [3, 8], "x": 99, "y": 38, "flags": 4}, - {"matrix": [3, 9], "x": 122, "y": 38, "flags": 4}, - {"matrix": [3, 10], "x": 124, "y": 38, "flags": 4}, - {"matrix": [3, 11], "x": 137, "y": 38, "flags": 4}, - {"matrix": [3, 12], "x": 140, "y": 38, "flags": 4}, - {"matrix": [3, 13], "x": 162, "y": 38, "flags": 4}, - {"matrix": [3, 15], "x": 186, "y": 38, "flags": 4}, - {"matrix": [3, 16], "x": 199, "y": 38, "flags": 4}, - {"matrix": [3, 17], "x": 211, "y": 38, "flags": 4}, - {"matrix": [3, 18], "x": 224, "y": 38, "flags": 4}, - {"matrix": [4, 0], "x": 0, "y": 51, "flags": 4}, - {"matrix": [4, 1], "x": 12, "y": 51, "flags": 4}, - {"matrix": [4, 2], "x": 24, "y": 51, "flags": 4}, - {"matrix": [4, 3], "x": 37, "y": 51, "flags": 4}, - {"matrix": [4, 4], "x": 49, "y": 51, "flags": 4}, - {"matrix": [4, 5], "x": 62, "y": 51, "flags": 4}, - {"matrix": [4, 6], "x": 74, "y": 51, "flags": 4}, - {"matrix": [4, 7], "x": 87, "y": 51, "flags": 4}, - {"matrix": [4, 8], "x": 99, "y": 51, "flags": 4}, - {"matrix": [4, 9], "x": 122, "y": 51, "flags": 4}, - {"matrix": [4, 10], "x": 124, "y": 51, "flags": 4}, - {"matrix": [4, 11], "x": 137, "y": 51, "flags": 4}, - {"matrix": [4, 12], "x": 140, "y": 51, "flags": 4}, - {"matrix": [4, 13], "x": 162, "y": 51, "flags": 4}, - {"matrix": [4, 14], "x": 174, "y": 51, "flags": 4}, - {"matrix": [4, 15], "x": 186, "y": 51, "flags": 4}, - {"matrix": [4, 16], "x": 199, "y": 51, "flags": 4}, - {"matrix": [4, 17], "x": 211, "y": 51, "flags": 4}, - {"matrix": [4, 18], "x": 224, "y": 51, "flags": 4}, - {"matrix": [5, 0], "x": 0, "y": 64, "flags": 4}, - {"matrix": [5, 1], "x": 12, "y": 64, "flags": 4}, - {"matrix": [5, 3], "x": 37, "y": 64, "flags": 4}, - {"matrix": [5, 6], "x": 74, "y": 64, "flags": 4}, - {"matrix": [5, 10], "x": 124, "y": 64, "flags": 4}, - {"matrix": [5, 11], "x": 137, "y": 64, "flags": 4}, - {"matrix": [5, 12], "x": 140, "y": 64, "flags": 4}, - {"matrix": [5, 13], "x": 162, "y": 64, "flags": 4}, - {"matrix": [5, 14], "x": 174, "y": 64, "flags": 4}, - {"matrix": [5, 15], "x": 186, "y": 64, "flags": 4}, - {"matrix": [5, 16], "x": 199, "y": 64, "flags": 4}, - {"matrix": [5, 17], "x": 211, "y": 64, "flags": 4}, - {"matrix": [5, 18], "x": 224, "y": 64, "flags": 4} + + {"matrix": [1, 0], "x": 0, "y": 17, "flags": 4}, + {"matrix": [1, 1], "x": 11, "y": 17, "flags": 4}, + {"matrix": [1, 2], "x": 23, "y": 17, "flags": 4}, + {"matrix": [1, 3], "x": 34, "y": 17, "flags": 4}, + {"matrix": [1, 4], "x": 46, "y": 17, "flags": 4}, + {"matrix": [1, 5], "x": 57, "y": 17, "flags": 4}, + {"matrix": [1, 6], "x": 69, "y": 17, "flags": 4}, + {"matrix": [1, 7], "x": 80, "y": 17, "flags": 4}, + {"matrix": [1, 8], "x": 92, "y": 17, "flags": 4}, + {"matrix": [1, 9], "x": 103, "y": 17, "flags": 4}, + {"matrix": [1, 10], "x": 115, "y": 17, "flags": 4}, + {"matrix": [1, 11], "x": 126, "y": 17, "flags": 4}, + {"matrix": [1, 12], "x": 138, "y": 17, "flags": 4}, + {"matrix": [1, 13], "x": 149, "y": 17, "flags": 4}, + + {"matrix": [1, 14], "x": 175, "y": 17, "flags": 4}, + + {"matrix": [1, 15], "x": 190, "y": 17, "flags": 4}, + {"matrix": [1, 16], "x": 201, "y": 17, "flags": 4}, + {"matrix": [1, 17], "x": 213, "y": 17, "flags": 4}, + {"matrix": [1, 18], "x": 224, "y": 17, "flags": 4}, + + {"matrix": [2, 0], "x": 3, "y": 28, "flags": 4}, + {"matrix": [2, 1], "x": 17, "y": 28, "flags": 4}, + {"matrix": [2, 2], "x": 29, "y": 28, "flags": 4}, + {"matrix": [2, 3], "x": 40, "y": 28, "flags": 4}, + {"matrix": [2, 4], "x": 52, "y": 28, "flags": 4}, + {"matrix": [2, 5], "x": 63, "y": 28, "flags": 4}, + {"matrix": [2, 6], "x": 75, "y": 28, "flags": 4}, + {"matrix": [2, 7], "x": 86, "y": 28, "flags": 4}, + {"matrix": [2, 8], "x": 98, "y": 28, "flags": 4}, + {"matrix": [2, 9], "x": 109, "y": 28, "flags": 4}, + {"matrix": [2, 10], "x": 121, "y": 28, "flags": 4}, + {"matrix": [2, 11], "x": 132, "y": 28, "flags": 4}, + {"matrix": [2, 12], "x": 144, "y": 28, "flags": 4}, + {"matrix": [2, 13], "x": 161, "y": 17, "flags": 4}, + + {"matrix": [2, 14], "x": 175, "y": 28, "flags": 4}, + + {"matrix": [2, 15], "x": 190, "y": 28, "flags": 4}, + {"matrix": [2, 16], "x": 201, "y": 28, "flags": 4}, + {"matrix": [2, 17], "x": 213, "y": 28, "flags": 4}, + {"matrix": [2, 18], "x": 224, "y": 28, "flags": 4}, + + {"matrix": [3, 0], "x": 4, "y": 39, "flags": 4}, + {"matrix": [3, 1], "x": 20, "y": 39, "flags": 4}, + {"matrix": [3, 2], "x": 32, "y": 39, "flags": 4}, + {"matrix": [3, 3], "x": 43, "y": 39, "flags": 4}, + {"matrix": [3, 4], "x": 55, "y": 39, "flags": 4}, + {"matrix": [3, 5], "x": 66, "y": 39, "flags": 4}, + {"matrix": [3, 6], "x": 78, "y": 39, "flags": 4}, + {"matrix": [3, 7], "x": 89, "y": 39, "flags": 4}, + {"matrix": [3, 8], "x": 101, "y": 39, "flags": 4}, + {"matrix": [3, 9], "x": 112, "y": 39, "flags": 4}, + {"matrix": [3, 10], "x": 123, "y": 39, "flags": 4}, + {"matrix": [3, 11], "x": 135, "y": 39, "flags": 4}, + {"matrix": [3, 12], "x": 146, "y": 39, "flags": 4}, + {"matrix": [3, 13], "x": 154, "y": 39, "flags": 4}, + + {"matrix": [3, 15], "x": 190, "y": 39, "flags": 4}, + {"matrix": [3, 16], "x": 201, "y": 39, "flags": 4}, + {"matrix": [3, 17], "x": 213, "y": 39, "flags": 4}, + {"matrix": [3, 18], "x": 224, "y": 39, "flags": 4}, + + {"matrix": [4, 0], "x": 1, "y": 50, "flags": 4}, + {"matrix": [4, 1], "x": 14, "y": 50, "flags": 4}, + {"matrix": [4, 2], "x": 26, "y": 50, "flags": 4}, + {"matrix": [4, 3], "x": 37, "y": 50, "flags": 4}, + {"matrix": [4, 4], "x": 49, "y": 50, "flags": 4}, + {"matrix": [4, 5], "x": 60, "y": 50, "flags": 4}, + {"matrix": [4, 6], "x": 72, "y": 50, "flags": 4}, + {"matrix": [4, 7], "x": 83, "y": 50, "flags": 4}, + {"matrix": [4, 8], "x": 95, "y": 50, "flags": 4}, + {"matrix": [4, 9], "x": 106, "y": 50, "flags": 4}, + {"matrix": [4, 10], "x": 118, "y": 50, "flags": 4}, + {"matrix": [4, 11], "x": 129, "y": 50, "flags": 4}, + {"matrix": [4, 12], "x": 145, "y": 50, "flags": 4}, + {"matrix": [4, 13], "x": 161, "y": 50, "flags": 4}, + + {"matrix": [4, 14], "x": 175, "y": 53, "flags": 4}, + + {"matrix": [4, 15], "x": 190, "y": 50, "flags": 4}, + {"matrix": [4, 16], "x": 201, "y": 50, "flags": 4}, + {"matrix": [4, 17], "x": 213, "y": 50, "flags": 4}, + {"matrix": [4, 18], "x": 224, "y": 50, "flags": 4}, + + {"matrix": [5, 0], "x": 3, "y": 61, "flags": 4}, + {"matrix": [5, 1], "x": 17, "y": 61, "flags": 4}, + {"matrix": [5, 3], "x": 32, "y": 61, "flags": 4}, + {"matrix": [5, 6], "x": 76, "y": 61, "flags": 4}, + {"matrix": [5, 10], "x": 119, "y": 61, "flags": 4}, + {"matrix": [5, 11], "x": 134, "y": 61, "flags": 4}, + {"matrix": [5, 12], "x": 148, "y": 61, "flags": 4}, + + {"matrix": [5, 13], "x": 164, "y": 64, "flags": 4}, + {"matrix": [5, 14], "x": 175, "y": 64, "flags": 4}, + {"matrix": [5, 15], "x": 187, "y": 64, "flags": 4}, + + {"matrix": [5, 16], "x": 201, "y": 61, "flags": 4}, + {"matrix": [5, 17], "x": 213, "y": 61, "flags": 4}, + {"matrix": [5, 18], "x": 224, "y": 61, "flags": 4} ] }, "matrix_pins": { diff --git a/keyboards/mechlovin/olly/jf/rev2/rev2.c b/keyboards/mechlovin/olly/jf/rev2/rev2.c index 04cf3b836d..0f8bc0be48 100644 --- a/keyboards/mechlovin/olly/jf/rev2/rev2.c +++ b/keyboards/mechlovin/olly/jf/rev2/rev2.c @@ -85,7 +85,7 @@ bool led_matrix_indicators_kb(void) { if (layer_state_is(4)) { led_matrix_set_value(113, 0xFF); } else { - led_matrix_set_value(114, 0x00); + led_matrix_set_value(113, 0x00); } return true; diff --git a/keyboards/mechlovin/zed1800/zed1800.c b/keyboards/mechlovin/zed1800/zed1800.c index e86b4d5a5a..975c8914dd 100644 --- a/keyboards/mechlovin/zed1800/zed1800.c +++ b/keyboards/mechlovin/zed1800/zed1800.c @@ -27,13 +27,19 @@ RGBLIGHT_LAYERS_LIST( my_numlock_layer, my_scroll_layer ); + void keyboard_post_init_kb(void) { rgblight_layers = my_rgb_layers; + + keyboard_post_init_user(); } + // Activate rgb layer for caps when capslock is enabled bool led_update_kb(led_t led_state) { - rgblight_set_layer_state(0, led_state.caps_lock); - rgblight_set_layer_state(1, led_state.num_lock); - rgblight_set_layer_state(2, led_state.scroll_lock); + if(led_update_user(led_state)) { + rgblight_set_layer_state(0, led_state.caps_lock); + rgblight_set_layer_state(1, led_state.num_lock); + rgblight_set_layer_state(2, led_state.scroll_lock); + } return true; }
\ No newline at end of file diff --git a/keyboards/mechlovin/zed65/mono_led/keyboard.json b/keyboards/mechlovin/zed65/mono_led/keyboard.json index 0cf13002d9..763fbe9f4c 100644 --- a/keyboards/mechlovin/zed65/mono_led/keyboard.json +++ b/keyboards/mechlovin/zed65/mono_led/keyboard.json @@ -62,6 +62,82 @@ "wave_left_right": true, "wave_up_down": true }, + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}, + {"matrix": [0, 1], "x": 15, "y": 0, "flags": 1}, + {"matrix": [0, 2], "x": 30, "y": 0, "flags": 1}, + {"matrix": [0, 3], "x": 45, "y": 0, "flags": 1}, + {"matrix": [0, 4], "x": 60, "y": 0, "flags": 1}, + {"matrix": [0, 5], "x": 75, "y": 0, "flags": 1}, + {"matrix": [0, 6], "x": 90, "y": 0, "flags": 1}, + {"matrix": [0, 7], "x": 105, "y": 0, "flags": 1}, + {"matrix": [0, 8], "x": 119, "y": 0, "flags": 1}, + {"matrix": [0, 9], "x": 134, "y": 0, "flags": 1}, + {"matrix": [0, 10], "x": 149, "y": 0, "flags": 1}, + {"matrix": [0, 11], "x": 164, "y": 0, "flags": 1}, + {"matrix": [0, 12], "x": 179, "y": 0, "flags": 1}, + {"matrix": [0, 13], "x": 194, "y": 0, "flags": 1}, + {"matrix": [0, 14], "x": 209, "y": 0, "flags": 1}, + {"matrix": [0, 15], "x": 224, "y": 0, "flags": 1}, + + {"matrix": [1, 0], "x": 4, "y": 16, "flags": 1}, + {"matrix": [1, 1], "x": 22, "y": 16, "flags": 1}, + {"matrix": [1, 2], "x": 37, "y": 16, "flags": 1}, + {"matrix": [1, 3], "x": 52, "y": 16, "flags": 1}, + {"matrix": [1, 4], "x": 67, "y": 16, "flags": 1}, + {"matrix": [1, 5], "x": 82, "y": 16, "flags": 1}, + {"matrix": [1, 6], "x": 97, "y": 16, "flags": 1}, + {"matrix": [1, 7], "x": 112, "y": 16, "flags": 1}, + {"matrix": [1, 8], "x": 127, "y": 16, "flags": 1}, + {"matrix": [1, 9], "x": 142, "y": 16, "flags": 1}, + {"matrix": [1, 10], "x": 157, "y": 16, "flags": 1}, + {"matrix": [1, 11], "x": 172, "y": 16, "flags": 1}, + {"matrix": [1, 12], "x": 187, "y": 16, "flags": 1}, + {"matrix": [1, 14], "x": 205, "y": 16, "flags": 1}, + {"matrix": [1, 15], "x": 224, "y": 16, "flags": 1}, + + {"matrix": [2, 0], "x": 6, "y": 32, "flags": 1}, + {"matrix": [2, 1], "x": 26, "y": 32, "flags": 1}, + {"matrix": [2, 2], "x": 41, "y": 32, "flags": 1}, + {"matrix": [2, 3], "x": 56, "y": 32, "flags": 1}, + {"matrix": [2, 4], "x": 71, "y": 32, "flags": 1}, + {"matrix": [2, 5], "x": 86, "y": 32, "flags": 1}, + {"matrix": [2, 6], "x": 101, "y": 32, "flags": 1}, + {"matrix": [2, 7], "x": 116, "y": 32, "flags": 1}, + {"matrix": [2, 8], "x": 131, "y": 32, "flags": 1}, + {"matrix": [2, 9], "x": 146, "y": 32, "flags": 1}, + {"matrix": [2, 10], "x": 161, "y": 32, "flags": 1}, + {"matrix": [2, 11], "x": 175, "y": 32, "flags": 1}, + {"matrix": [2, 12], "x": 190, "y": 32, "flags": 1}, + {"matrix": [2, 13], "x": 207, "y": 32, "flags": 1}, + {"matrix": [2, 15], "x": 224, "y": 32, "flags": 1}, + + {"matrix": [3, 0], "x": 2, "y": 48, "flags": 1}, + {"matrix": [3, 1], "x": 19, "y": 48, "flags": 1}, + {"matrix": [3, 2], "x": 34, "y": 48, "flags": 1}, + {"matrix": [3, 3], "x": 49, "y": 48, "flags": 1}, + {"matrix": [3, 4], "x": 63, "y": 48, "flags": 1}, + {"matrix": [3, 5], "x": 78, "y": 48, "flags": 1}, + {"matrix": [3, 6], "x": 93, "y": 48, "flags": 1}, + {"matrix": [3, 7], "x": 108, "y": 48, "flags": 1}, + {"matrix": [3, 8], "x": 123, "y": 48, "flags": 1}, + {"matrix": [3, 9], "x": 138, "y": 48, "flags": 1}, + {"matrix": [3, 10], "x": 153, "y": 48, "flags": 1}, + {"matrix": [3, 11], "x": 168, "y": 48, "flags": 1}, + {"matrix": [3, 12], "x": 189, "y": 48, "flags": 1}, + {"matrix": [3, 14], "x": 209, "y": 48, "flags": 1}, + {"matrix": [3, 15], "x": 224, "y": 48, "flags": 1}, + + {"matrix": [4, 0], "x": 2, "y": 64, "flags": 1}, + {"matrix": [4, 1], "x": 21, "y": 64, "flags": 1}, + {"matrix": [4, 2], "x": 39, "y": 64, "flags": 1}, + {"matrix": [4, 6], "x": 95, "y": 64, "flags": 1}, + {"matrix": [4, 10], "x": 151, "y": 64, "flags": 1}, + {"matrix": [4, 11], "x": 170, "y": 64, "flags": 1}, + {"matrix": [4, 13], "x": 194, "y": 64, "flags": 1}, + {"matrix": [4, 14], "x": 209, "y": 64, "flags": 1}, + {"matrix": [4, 15], "x": 224, "y": 64, "flags": 1} + ], "driver": "is31fl3731", "react_on_keyup": true }, diff --git a/keyboards/mechlovin/zed65/mono_led/mono_led.c b/keyboards/mechlovin/zed65/mono_led/mono_led.c index d8570fa0a6..7ba47912ec 100644 --- a/keyboards/mechlovin/zed65/mono_led/mono_led.c +++ b/keyboards/mechlovin/zed65/mono_led/mono_led.c @@ -31,30 +31,6 @@ const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = { { 0, C6_1 }, { 0, C6_2 }, { 0, C6_3 }, { 0, C6_7 }, { 0, C6_11 }, { 0, C6_12 }, { 0, C6_14 }, { 0, C6_15 }, { 0, C6_16 }, }; -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, NO_LED, 29, 30}, - {31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, NO_LED, 45}, - {46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, NO_LED, 59, 60}, - {61, 62, 63, NO_LED, NO_LED, NO_LED, 64, NO_LED, NO_LED, NO_LED, 65, 66, NO_LED, 67, 68, 69}, -}, { - //LED Index to Physical Positon - {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}, - {0,16}, {15, 16}, {30, 16}, {45, 16}, {60, 16}, {75, 16}, {90, 16}, {105,16}, {119,16}, {134,16}, {149,16}, {164,16}, {179,16}, {209,16}, {224,16}, - {0,32}, {15, 32}, {30, 32}, {45, 32}, {60, 32}, {75, 32}, {90, 32}, {105,32}, {119,32}, {134,32}, {149,32}, {164,32}, {179,32}, {194,32}, {224,32}, - {0,48}, {15, 48}, {30, 48}, {45, 48}, {60, 48}, {75, 48}, {90, 48}, {105,48}, {119,48}, {134,48}, {149,48}, {164,48}, {179,48}, {209,48}, {224,48}, - {0,64}, {15, 64}, {30, 64}, {90, 64}, {149,64}, {164,64}, {194,64}, {209,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, 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, 1, 1, 1, 1, - } -}; - bool led_matrix_indicators_kb(void) { if (!led_matrix_indicators_user()) { return false; @@ -63,4 +39,4 @@ bool led_matrix_indicators_kb(void) { led_matrix_set_value(31, 0xFF); } return true; -}
\ No newline at end of file +} diff --git a/keyboards/mechlovin/zed65/no_backlight/wearhaus66/wearhaus66.c b/keyboards/mechlovin/zed65/no_backlight/wearhaus66/wearhaus66.c index a6942a2cb8..de1c73a0e0 100644 --- a/keyboards/mechlovin/zed65/no_backlight/wearhaus66/wearhaus66.c +++ b/keyboards/mechlovin/zed65/no_backlight/wearhaus66/wearhaus66.c @@ -17,8 +17,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "quantum.h" -void keyboard_pre_init_user(void) { - // Call the keyboard pre init code. +void keyboard_pre_init_kb(void) { // Set our LED pins as output gpio_set_pin_output(B7); + + keyboard_pre_init_user(); } diff --git a/keyboards/mechwild/mokulua/mirrored/config.h b/keyboards/mechwild/mokulua/mirrored/config.h index c6504ff392..135b9ad908 100644 --- a/keyboards/mechwild/mokulua/mirrored/config.h +++ b/keyboards/mechwild/mokulua/mirrored/config.h @@ -5,5 +5,3 @@ #define OLED_FONT_H "keyboards/mechwild/mokulua/glcdfont.c" -#define MASTER_LEFT -//#define MASTER_RIGHT diff --git a/keyboards/mechwild/mokulua/mirrored/keyboard.json b/keyboards/mechwild/mokulua/mirrored/keyboard.json index e1ca30efdb..dc66c0c53a 100644 --- a/keyboards/mechwild/mokulua/mirrored/keyboard.json +++ b/keyboards/mechwild/mokulua/mirrored/keyboard.json @@ -35,7 +35,9 @@ }, "split": { "enabled": true, - "soft_serial_pin": "D3", + "serial": { + "pin": "D3" + }, "transport": { "sync": { "indicators": true, diff --git a/keyboards/mechwild/mokulua/standard/config.h b/keyboards/mechwild/mokulua/standard/config.h index c3b067e5ba..adab4e6dea 100644 --- a/keyboards/mechwild/mokulua/standard/config.h +++ b/keyboards/mechwild/mokulua/standard/config.h @@ -5,9 +5,6 @@ #define OLED_FONT_H "keyboards/mechwild/mokulua/glcdfont.c" -#define MASTER_LEFT -//#define MASTER_RIGHT - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/mechwild/mokulua/standard/keyboard.json b/keyboards/mechwild/mokulua/standard/keyboard.json index bd248712e7..f3eccd921f 100644 --- a/keyboards/mechwild/mokulua/standard/keyboard.json +++ b/keyboards/mechwild/mokulua/standard/keyboard.json @@ -35,7 +35,9 @@ }, "split": { "enabled": true, - "soft_serial_pin": "D3", + "serial": { + "pin": "D3" + }, "transport": { "sync": { "indicators": true, diff --git a/keyboards/meetlab/kafkasplit/keyboard.json b/keyboards/meetlab/kafkasplit/keyboard.json index d71d405f33..375d4f7a03 100644 --- a/keyboards/meetlab/kafkasplit/keyboard.json +++ b/keyboards/meetlab/kafkasplit/keyboard.json @@ -130,6 +130,9 @@ "rows": ["GP11", "GP13", "GP12", "GP14"] } }, + "serial": { + "driver": "vendor" + }, "transport": { "sync": { "indicators": true, diff --git a/keyboards/meetlab/kafkasplit/rules.mk b/keyboards/meetlab/kafkasplit/rules.mk deleted file mode 100644 index 161ec22b16..0000000000 --- a/keyboards/meetlab/kafkasplit/rules.mk +++ /dev/null @@ -1 +0,0 @@ -SERIAL_DRIVER = vendor diff --git a/keyboards/melgeek/mj61/rev1/rev1.c b/keyboards/melgeek/mj61/rev1/rev1.c index 3ee0da5183..8e0be62127 100644 --- a/keyboards/melgeek/mj61/rev1/rev1.c +++ b/keyboards/melgeek/mj61/rev1/rev1.c @@ -106,13 +106,4 @@ led_config_t g_led_config = { } }; -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 diff --git a/keyboards/melgeek/mj61/rev2/rev2.c b/keyboards/melgeek/mj61/rev2/rev2.c index 71d41c16b3..7b27fa44c3 100644 --- a/keyboards/melgeek/mj61/rev2/rev2.c +++ b/keyboards/melgeek/mj61/rev2/rev2.c @@ -116,13 +116,4 @@ led_config_t g_led_config = { } }; -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 diff --git a/keyboards/melgeek/mj63/rev1/rev1.c b/keyboards/melgeek/mj63/rev1/rev1.c index e3baf32de7..d6caeac0c1 100644 --- a/keyboards/melgeek/mj63/rev1/rev1.c +++ b/keyboards/melgeek/mj63/rev1/rev1.c @@ -110,13 +110,4 @@ led_config_t g_led_config = { } }; -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 diff --git a/keyboards/melgeek/mj63/rev2/rev2.c b/keyboards/melgeek/mj63/rev2/rev2.c index 418092ec9f..95f0b28f5d 100644 --- a/keyboards/melgeek/mj63/rev2/rev2.c +++ b/keyboards/melgeek/mj63/rev2/rev2.c @@ -116,13 +116,4 @@ led_config_t g_led_config = { } }; -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 diff --git a/keyboards/melgeek/mj64/rev1/rev1.c b/keyboards/melgeek/mj64/rev1/rev1.c index b9609cad1e..ea3376a8c7 100644 --- a/keyboards/melgeek/mj64/rev1/rev1.c +++ b/keyboards/melgeek/mj64/rev1/rev1.c @@ -107,13 +107,4 @@ led_config_t g_led_config = { } }; -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 diff --git a/keyboards/melgeek/mj64/rev2/rev2.c b/keyboards/melgeek/mj64/rev2/rev2.c index 16c8e1f612..17947282ce 100644 --- a/keyboards/melgeek/mj64/rev2/rev2.c +++ b/keyboards/melgeek/mj64/rev2/rev2.c @@ -110,13 +110,4 @@ led_config_t g_led_config = { } }; -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 diff --git a/keyboards/melgeek/mj64/rev3/rev3.c b/keyboards/melgeek/mj64/rev3/rev3.c index 7af80c7388..8555082e7d 100644 --- a/keyboards/melgeek/mj64/rev3/rev3.c +++ b/keyboards/melgeek/mj64/rev3/rev3.c @@ -116,13 +116,4 @@ led_config_t g_led_config = { } }; -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 diff --git a/keyboards/melgeek/mj65/rev3/rev3.c b/keyboards/melgeek/mj65/rev3/rev3.c index 1392d5af4e..0a020fad74 100644 --- a/keyboards/melgeek/mj65/rev3/rev3.c +++ b/keyboards/melgeek/mj65/rev3/rev3.c @@ -120,14 +120,4 @@ led_config_t g_led_config = { } }; -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 diff --git a/keyboards/melgeek/mojo75/rev1/rev1.c b/keyboards/melgeek/mojo75/rev1/rev1.c index 18daafebf8..60bb6eb850 100644 --- a/keyboards/melgeek/mojo75/rev1/rev1.c +++ b/keyboards/melgeek/mojo75/rev1/rev1.c @@ -139,14 +139,4 @@ led_config_t g_led_config = { } }; - -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 diff --git a/keyboards/merge/um70/config.h b/keyboards/merge/um70/config.h index 2d9f73d61a..5f999594cf 100644 --- a/keyboards/merge/um70/config.h +++ b/keyboards/merge/um70/config.h @@ -1,23 +1,22 @@ -/* Copyright 2021 duoshock - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License +/* Copyright 2021 duoshock + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #pragma once #define SPLIT_USB_DETECT -#define MASTER_LEFT #define SPLIT_MODS_ENABLE #define B6_AUDIO diff --git a/keyboards/merge/um70/keyboard.json b/keyboards/merge/um70/keyboard.json index c349abc788..afb52d3d4f 100644 --- a/keyboards/merge/um70/keyboard.json +++ b/keyboards/merge/um70/keyboard.json @@ -31,7 +31,9 @@ }, "split": { "enabled": true, - "soft_serial_pin": "D2" + "serial": { + "pin": "D2" + } }, "ws2812": { "pin": "D3" diff --git a/keyboards/merge/um80/config.h b/keyboards/merge/um80/config.h index d23f9163a7..d8e896c14b 100644 --- a/keyboards/merge/um80/config.h +++ b/keyboards/merge/um80/config.h @@ -1,23 +1,22 @@ -/* Copyright 2021 duoshock - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License +/* Copyright 2021 duoshock + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #pragma once #define SPLIT_USB_DETECT -#define MASTER_LEFT #define SPLIT_MODS_ENABLE #define AUDIO_PIN B6 diff --git a/keyboards/merge/um80/keyboard.json b/keyboards/merge/um80/keyboard.json index 1cbac749f7..ea233e8f1c 100644 --- a/keyboards/merge/um80/keyboard.json +++ b/keyboards/merge/um80/keyboard.json @@ -31,7 +31,9 @@ }, "split": { "enabled": true, - "soft_serial_pin": "D2" + "serial": { + "pin": "D2" + } }, "ws2812": { "pin": "D3" diff --git a/keyboards/merge/uma/keyboard.json b/keyboards/merge/uma/keyboard.json index d5fea75fb4..9bd9e54582 100644 --- a/keyboards/merge/uma/keyboard.json +++ b/keyboards/merge/uma/keyboard.json @@ -35,7 +35,9 @@ }, "split": { "enabled": true, - "soft_serial_pin": "D2" + "serial": { + "pin": "D2" + } }, "processor": "atmega32u4", "bootloader": "atmel-dfu", diff --git a/keyboards/meson/keyboard.json b/keyboards/meson/keyboard.json index 88bbc18886..62640890ca 100644 --- a/keyboards/meson/keyboard.json +++ b/keyboards/meson/keyboard.json @@ -29,7 +29,9 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D0" + "serial": { + "pin": "D0" + } }, "rgblight": { "saturation_steps": 8, diff --git a/keyboards/mint60/keyboard.json b/keyboards/mint60/keyboard.json index 98f91a4469..c5bfe27365 100644 --- a/keyboards/mint60/keyboard.json +++ b/keyboards/mint60/keyboard.json @@ -30,7 +30,9 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D2" + "serial": { + "pin": "D2" + } }, "rgblight": { "hue_steps": 10, diff --git a/keyboards/mixi/config.h b/keyboards/mixi/config.h index e5c829d811..cf7c89abb1 100644 --- a/keyboards/mixi/config.h +++ b/keyboards/mixi/config.h @@ -1,4 +1,6 @@ #pragma once +#define RGBLIGHT_DEFAULT_MODE (RGBLIGHT_MODE_RAINBOW_SWIRL + 5) + #define RGBLIGHT_LAYERS #define RGBLIGHT_LAYER_BLINK diff --git a/keyboards/mixi/mixi.c b/keyboards/mixi/mixi.c deleted file mode 100644 index e8da7fdac2..0000000000 --- a/keyboards/mixi/mixi.c +++ /dev/null @@ -1,14 +0,0 @@ -#include "quantum.h" - -void eeconfig_init_kb(void) { -#ifdef RGBLIGHT_ENABLE - rgblight_enable(); // Enable RGB underglow by default - rgblight_sethsv(0, 255, 255); -#ifdef RGBLIGHT_EFFECT_RAINBOW_SWIRL - rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL + 5); // Set to RGB_RAINBOW_SWIRL animation by default -#endif -#endif - - eeconfig_update_kb(0); - eeconfig_init_user(); -} diff --git a/keyboards/mlego/m60_split/rev1/config.h b/keyboards/mlego/m60_split/rev1/config.h index 564add296d..406ff66e5a 100644 --- a/keyboards/mlego/m60_split/rev1/config.h +++ b/keyboards/mlego/m60_split/rev1/config.h @@ -15,6 +15,4 @@ */ #pragma once -#define SPLIT_HAND_PIN B9 -#define SERIAL_USART_TX_PIN B6 #define SERIAL_USART_SPEED 921600 diff --git a/keyboards/mlego/m60_split/rev1/keyboard.json b/keyboards/mlego/m60_split/rev1/keyboard.json index d0c6275dc9..fd98df8bf9 100644 --- a/keyboards/mlego/m60_split/rev1/keyboard.json +++ b/keyboards/mlego/m60_split/rev1/keyboard.json @@ -63,12 +63,19 @@ "bootmagic": { "matrix": [5, 0] }, + "handedness": { + "pin": "B9" + }, "matrix_pins": { "right": { "cols": ["B0", "A3", "A2", "A1", "B7", "B5"], "rows": ["B1", "A4", "A5", "A6", "A7"] } }, + "serial": { + "driver": "usart", + "pin": "B6" + }, "transport": { "sync": { "indicators": true, diff --git a/keyboards/mlego/m60_split/rev1/rules.mk b/keyboards/mlego/m60_split/rev1/rules.mk deleted file mode 100644 index c6e2988321..0000000000 --- a/keyboards/mlego/m60_split/rev1/rules.mk +++ /dev/null @@ -1 +0,0 @@ -SERIAL_DRIVER = usart diff --git a/keyboards/mlego/m60_split/rev2/config.h b/keyboards/mlego/m60_split/rev2/config.h index 82ea1b37e3..7d22252451 100644 --- a/keyboards/mlego/m60_split/rev2/config.h +++ b/keyboards/mlego/m60_split/rev2/config.h @@ -15,9 +15,6 @@ */ #pragma once -#define SPLIT_HAND_PIN B9 -#define SERIAL_USART_TX_PIN B6 - #define SERIAL_USART_SPEED 921600 #define RGBLIGHT_LAYERS diff --git a/keyboards/mlego/m60_split/rev2/keyboard.json b/keyboards/mlego/m60_split/rev2/keyboard.json index 48d962f9cc..269373033f 100644 --- a/keyboards/mlego/m60_split/rev2/keyboard.json +++ b/keyboards/mlego/m60_split/rev2/keyboard.json @@ -56,12 +56,19 @@ "bootmagic": { "matrix": [5, 0] }, + "handedness": { + "pin": "B9" + }, "matrix_pins": { "right": { "cols": ["B0", "A3", "A2", "A1", "B7", "B5"], "rows": ["B1", "A4", "A5", "A6", "A7"] } }, + "serial": { + "driver": "usart", + "pin": "B6" + }, "transport": { "sync": { "indicators": true, diff --git a/keyboards/mlego/m60_split/rev2/rules.mk b/keyboards/mlego/m60_split/rev2/rules.mk deleted file mode 100644 index c6e2988321..0000000000 --- a/keyboards/mlego/m60_split/rev2/rules.mk +++ /dev/null @@ -1 +0,0 @@ -SERIAL_DRIVER = usart diff --git a/keyboards/mlego/m65/m65.c b/keyboards/mlego/m65/m65.c index 506ac2e30d..fd9ee5b947 100644 --- a/keyboards/mlego/m65/m65.c +++ b/keyboards/mlego/m65/m65.c @@ -167,8 +167,7 @@ bool oled_task_kb(void) { #endif -void matrix_scan_kb(void) { - matrix_scan_user(); +void housekeeping_task_kb(void) { toggle_leds(toggle_lwr, toggle_rse); } diff --git a/keyboards/mode/m256wh/config.h b/keyboards/mode/m256wh/config.h index 06f1658ea5..5bb3d6d1f3 100644 --- a/keyboards/mode/m256wh/config.h +++ b/keyboards/mode/m256wh/config.h @@ -23,5 +23,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define WS2812_PWM_PAL_MODE 1 #define WS2812_PWM_DMA_STREAM STM32_DMA2_STREAM5 #define WS2812_PWM_DMA_CHANNEL 6 - -#define EECONFIG_KB_DATA_SIZE (1) diff --git a/keyboards/recompile_keys/cocoa40/config.h b/keyboards/mode/m256wh/keymaps/via/config.h index 976a698c5d..31dfebf49a 100644 --- a/keyboards/recompile_keys/cocoa40/config.h +++ b/keyboards/mode/m256wh/keymaps/via/config.h @@ -1,5 +1,5 @@ /* -Copyright 2019 'Naoto Takai' +Copyright 2022 Gondolindrim This 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,4 +17,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -#define SPLIT_HAND_PIN D3 +#define EECONFIG_USER_DATA_SIZE (1) diff --git a/keyboards/mode/m256wh/keymaps/via/keymap.c b/keyboards/mode/m256wh/keymaps/via/keymap.c index a81d663450..6adb5cfffa 100644 --- a/keyboards/mode/m256wh/keymaps/via/keymap.c +++ b/keyboards/mode/m256wh/keymaps/via/keymap.c @@ -31,3 +31,135 @@ 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 ) }; + +bool is_second_rgb_row_active; + +enum via_secondrow_enable { + id_is_second_rgb_row_active = 0 +}; + +// Sets the second RGB row on or off; done by setting effect range. +void set_second_rgb_row(bool is_active) { + rgblight_disable_noeeprom(); + switch (is_active) + { + case true: + { + rgblight_set_effect_range(0,30); + break; + } + case false: + { + rgblight_set_effect_range(0,15); + break; + } + } + rgblight_enable_noeeprom(); +} + +// At the keyboard start, retrieves PMEM stored configs +void keyboard_post_init_user(void) { + rgblight_disable_noeeprom(); + wait_ms(20); + eeconfig_read_user_datablock(&is_second_rgb_row_active); + set_second_rgb_row(is_second_rgb_row_active); + rgblight_reload_from_eeprom(); + rgblight_set(); +} + +void eeconfig_init_user(void) { // EEPROM is getting reset! + // rgblight_disable(); // Enable RGB by default + // Define the defualt value and write it to EEPROM + is_second_rgb_row_active = true; + set_second_rgb_row(is_second_rgb_row_active); + eeconfig_update_user_datablock(&is_second_rgb_row_active); + + // Disable rgblight by default on EEPROM initialization + rgblight_disable(); +} + +void secondrow_config_set_value( uint8_t *data ) +{ + // data = [ value_id, value_data ] + uint8_t *value_id = &(data[0]); + uint8_t *value_data = &(data[1]); + + switch ( *value_id ) + { + case id_is_second_rgb_row_active: + { + is_second_rgb_row_active = (bool) *value_data; + break; + } + default: + { + is_second_rgb_row_active = true; + } + } + set_second_rgb_row(is_second_rgb_row_active); +} + +void secondrow_config_get_value( uint8_t *data ) +{ + // data = [ value_id, value_data ] + uint8_t *value_id = &(data[0]); + uint8_t *value_data = &(data[1]); + + switch ( *value_id ) + { + case id_is_second_rgb_row_active: + { + *value_data = is_second_rgb_row_active; + break; + } + default: + { + *value_data = false; + } + } +} + +void secondrow_config_save(void) +{ + eeconfig_update_user_datablock(&is_second_rgb_row_active); +} + +void via_custom_value_command_kb(uint8_t *data, uint8_t length) { + // data = [ command_id, channel_id, value_id, value_data ] + uint8_t *command_id = &(data[0]); + uint8_t *channel_id = &(data[1]); + uint8_t *value_id_and_data = &(data[2]); + + if ( *channel_id == id_custom_channel ) { + switch ( *command_id ) + { + case id_custom_set_value: + { + secondrow_config_set_value(value_id_and_data); + break; + } + case id_custom_get_value: + { + secondrow_config_get_value(value_id_and_data); + break; + } + case id_custom_save: + { + secondrow_config_save(); + break; + } + default: + { + // Unhandled message. + *command_id = id_unhandled; + break; + } + } + return; + } + + // Return the unhandled state + *command_id = id_unhandled; + + // DO NOT call raw_hid_send(data,length) here, let caller do this +} diff --git a/keyboards/mode/m256wh/m256wh.c b/keyboards/mode/m256wh/m256wh.c deleted file mode 100644 index cec427f329..0000000000 --- a/keyboards/mode/m256wh/m256wh.c +++ /dev/null @@ -1,154 +0,0 @@ -/* Copyright 2022 Gondolindrim - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -#include "quantum.h" - -#ifdef VIA_ENABLE -bool is_second_rgb_row_active; -enum via_secondrow_enable { - id_is_second_rgb_row_active = 0 -}; - -// Sets the second RGB row on or off; done by setting effect range. -void set_second_rgb_row(bool is_active) { - rgblight_disable_noeeprom(); - switch (is_active) - { - case true: - { - rgblight_set_effect_range(0,30); - break; - } - case false: - { - rgblight_set_effect_range(0,15); - break; - } - } - rgblight_enable_noeeprom(); -} - -// At the keyboard start, retrieves PMEM stored configs -void keyboard_post_init_kb(void) { - rgblight_disable_noeeprom(); - wait_ms(20); - eeconfig_read_kb_datablock(&is_second_rgb_row_active); - set_second_rgb_row(is_second_rgb_row_active); - rgblight_reload_from_eeprom(); - rgblight_set(); -} - -void eeconfig_init_kb(void) { // EEPROM is getting reset! - // rgblight_disable(); // Enable RGB by default - // Define the defualt value and write it to EEPROM - is_second_rgb_row_active = true; - set_second_rgb_row(is_second_rgb_row_active); - eeconfig_update_kb_datablock(&is_second_rgb_row_active); - - // Disable rgblight by default on EEPROM initialization - rgblight_disable(); - - // Run user code if any - eeconfig_init_user(); -} - -void secondrow_config_set_value( uint8_t *data ) -{ - // data = [ value_id, value_data ] - uint8_t *value_id = &(data[0]); - uint8_t *value_data = &(data[1]); - - switch ( *value_id ) - { - case id_is_second_rgb_row_active: - { - is_second_rgb_row_active = (bool) *value_data; - break; - } - default: - { - is_second_rgb_row_active = true; - } - } - set_second_rgb_row(is_second_rgb_row_active); -} - -void secondrow_config_get_value( uint8_t *data ) -{ - // data = [ value_id, value_data ] - uint8_t *value_id = &(data[0]); - uint8_t *value_data = &(data[1]); - - switch ( *value_id ) - { - case id_is_second_rgb_row_active: - { - *value_data = is_second_rgb_row_active; - break; - } - default: - { - *value_data = false; - } - } -} - -void secondrow_config_save(void) -{ - - eeconfig_update_kb_datablock(&is_second_rgb_row_active); -} - -void via_custom_value_command_kb(uint8_t *data, uint8_t length) { - // data = [ command_id, channel_id, value_id, value_data ] - uint8_t *command_id = &(data[0]); - uint8_t *channel_id = &(data[1]); - uint8_t *value_id_and_data = &(data[2]); - - if ( *channel_id == id_custom_channel ) { - switch ( *command_id ) - { - case id_custom_set_value: - { - secondrow_config_set_value(value_id_and_data); - break; - } - case id_custom_get_value: - { - secondrow_config_get_value(value_id_and_data); - break; - } - case id_custom_save: - { - secondrow_config_save(); - break; - } - default: - { - // Unhandled message. - *command_id = id_unhandled; - break; - } - } - return; - } - - // Return the unhandled state - *command_id = id_unhandled; - - // DO NOT call raw_hid_send(data,length) here, let caller do this -} -#endif diff --git a/keyboards/mode/m256ws/config.h b/keyboards/mode/m256ws/config.h index 06f1658ea5..5bb3d6d1f3 100644 --- a/keyboards/mode/m256ws/config.h +++ b/keyboards/mode/m256ws/config.h @@ -23,5 +23,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define WS2812_PWM_PAL_MODE 1 #define WS2812_PWM_DMA_STREAM STM32_DMA2_STREAM5 #define WS2812_PWM_DMA_CHANNEL 6 - -#define EECONFIG_KB_DATA_SIZE (1) diff --git a/keyboards/ogre/ergo_split/config.h b/keyboards/mode/m256ws/keymaps/via/config.h index 9c0eb3b7a9..31dfebf49a 100644 --- a/keyboards/ogre/ergo_split/config.h +++ b/keyboards/mode/m256ws/keymaps/via/config.h @@ -1,5 +1,5 @@ /* -Copyright 2020 ctrlshiftba +Copyright 2022 Gondolindrim This 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,4 +17,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -#define SPLIT_HAND_PIN D1 +#define EECONFIG_USER_DATA_SIZE (1) diff --git a/keyboards/mode/m256ws/keymaps/via/keymap.c b/keyboards/mode/m256ws/keymaps/via/keymap.c index ab77f7af20..6766852f78 100644 --- a/keyboards/mode/m256ws/keymaps/via/keymap.c +++ b/keyboards/mode/m256ws/keymaps/via/keymap.c @@ -31,3 +31,135 @@ 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_VOLU, KC_TRNS ) }; + +bool is_second_rgb_row_active; + +enum via_secondrow_enable { + id_is_second_rgb_row_active = 0 +}; + +// Sets the second RGB row on or off; done by setting effect range. +void set_second_rgb_row(bool is_active) { + rgblight_disable_noeeprom(); + switch (is_active) + { + case true: + { + rgblight_set_effect_range(0,30); + break; + } + case false: + { + rgblight_set_effect_range(0,15); + break; + } + } + rgblight_enable_noeeprom(); +} + +// At the keyboard start, retrieves PMEM stored configs +void keyboard_post_init_user(void) { + rgblight_disable_noeeprom(); + wait_ms(20); + eeconfig_read_user_datablock(&is_second_rgb_row_active); + set_second_rgb_row(is_second_rgb_row_active); + rgblight_reload_from_eeprom(); + rgblight_set(); +} + +void eeconfig_init_user(void) { // EEPROM is getting reset! + // rgblight_disable(); // Enable RGB by default + // Define the defualt value and write it to EEPROM + is_second_rgb_row_active = true; + set_second_rgb_row(is_second_rgb_row_active); + eeconfig_update_user_datablock(&is_second_rgb_row_active); + + // Disable rgblight by default on EEPROM initialization + rgblight_disable(); +} + +void secondrow_config_set_value( uint8_t *data ) +{ + // data = [ value_id, value_data ] + uint8_t *value_id = &(data[0]); + uint8_t *value_data = &(data[1]); + + switch ( *value_id ) + { + case id_is_second_rgb_row_active: + { + is_second_rgb_row_active = (bool) *value_data; + break; + } + default: + { + is_second_rgb_row_active = true; + } + } + set_second_rgb_row(is_second_rgb_row_active); +} + +void secondrow_config_get_value( uint8_t *data ) +{ + // data = [ value_id, value_data ] + uint8_t *value_id = &(data[0]); + uint8_t *value_data = &(data[1]); + + switch ( *value_id ) + { + case id_is_second_rgb_row_active: + { + *value_data = is_second_rgb_row_active; + break; + } + default: + { + *value_data = false; + } + } +} + +void secondrow_config_save(void) +{ + eeconfig_update_user_datablock(&is_second_rgb_row_active); +} + +void via_custom_value_command_kb(uint8_t *data, uint8_t length) { + // data = [ command_id, channel_id, value_id, value_data ] + uint8_t *command_id = &(data[0]); + uint8_t *channel_id = &(data[1]); + uint8_t *value_id_and_data = &(data[2]); + + if ( *channel_id == id_custom_channel ) { + switch ( *command_id ) + { + case id_custom_set_value: + { + secondrow_config_set_value(value_id_and_data); + break; + } + case id_custom_get_value: + { + secondrow_config_get_value(value_id_and_data); + break; + } + case id_custom_save: + { + secondrow_config_save(); + break; + } + default: + { + // Unhandled message. + *command_id = id_unhandled; + break; + } + } + return; + } + + // Return the unhandled state + *command_id = id_unhandled; + + // DO NOT call raw_hid_send(data,length) here, let caller do this +} diff --git a/keyboards/mode/m256ws/m256ws.c b/keyboards/mode/m256ws/m256ws.c deleted file mode 100644 index 5603de7b01..0000000000 --- a/keyboards/mode/m256ws/m256ws.c +++ /dev/null @@ -1,153 +0,0 @@ -/* Copyright 2022 Gondolindrim - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -#include "quantum.h" - -#ifdef VIA_ENABLE -bool is_second_rgb_row_active; -enum via_secondrow_enable { - id_is_second_rgb_row_active = 0 -}; - -// Sets the second RGB row on or off; done by setting effect range. -void set_second_rgb_row(bool is_active) { - rgblight_disable_noeeprom(); - switch (is_active) - { - case true: - { - rgblight_set_effect_range(0,30); - break; - } - case false: - { - rgblight_set_effect_range(0,15); - break; - } - } - rgblight_enable_noeeprom(); -} - -// At the keyboard start, retrieves PMEM stored configs -void keyboard_post_init_kb(void) { - rgblight_disable_noeeprom(); - wait_ms(20); - eeconfig_read_kb_datablock(&is_second_rgb_row_active); - set_second_rgb_row(is_second_rgb_row_active); - rgblight_reload_from_eeprom(); - rgblight_set(); -} - -void eeconfig_init_kb(void) { // EEPROM is getting reset! - // rgblight_disable(); // Enable RGB by default - // Define the defualt value and write it to EEPROM - is_second_rgb_row_active = true; - set_second_rgb_row(is_second_rgb_row_active); - eeconfig_update_kb_datablock(&is_second_rgb_row_active); - - // Disable rgblight by default on EEPROM initialization - rgblight_disable(); - - // Run user code, if any - eeconfig_init_user(); -} - -void secondrow_config_set_value( uint8_t *data ) -{ - // data = [ value_id, value_data ] - uint8_t *value_id = &(data[0]); - uint8_t *value_data = &(data[1]); - - switch ( *value_id ) - { - case id_is_second_rgb_row_active: - { - is_second_rgb_row_active = (bool) *value_data; - break; - } - default: - { - is_second_rgb_row_active = true; - } - } - set_second_rgb_row(is_second_rgb_row_active); -} - -void secondrow_config_get_value( uint8_t *data ) -{ - // data = [ value_id, value_data ] - uint8_t *value_id = &(data[0]); - uint8_t *value_data = &(data[1]); - - switch ( *value_id ) - { - case id_is_second_rgb_row_active: - { - *value_data = is_second_rgb_row_active; - break; - } - default: - { - *value_data = false; - } - } -} - -void secondrow_config_save(void) -{ - - eeconfig_update_kb_datablock(&is_second_rgb_row_active); -} - -void via_custom_value_command_kb(uint8_t *data, uint8_t length) { - // data = [ command_id, channel_id, value_id, value_data ] - uint8_t *command_id = &(data[0]); - uint8_t *channel_id = &(data[1]); - uint8_t *value_id_and_data = &(data[2]); - - if ( *channel_id == id_custom_channel ) { - switch ( *command_id ) - { - case id_custom_set_value: - { - secondrow_config_set_value(value_id_and_data); - break; - } - case id_custom_get_value: - { - secondrow_config_get_value(value_id_and_data); - break; - } - case id_custom_save: - { - secondrow_config_save(); - break; - } - default: - { - // Unhandled message. - *command_id = id_unhandled; - break; - } - } - return; - } - - // Return the unhandled state - *command_id = id_unhandled; - -} -#endif // VIA ENABLE diff --git a/keyboards/momoka_ergo/keyboard.json b/keyboards/momoka_ergo/keyboard.json index 68fe1b308f..a24430ee82 100644 --- a/keyboards/momoka_ergo/keyboard.json +++ b/keyboards/momoka_ergo/keyboard.json @@ -30,7 +30,9 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D1" + "serial": { + "pin": "D1" + } }, "rgblight": { "saturation_steps": 8, diff --git a/keyboards/monsgeek/m3/m3.c b/keyboards/monsgeek/m3/m3.c index 04a9f0ca96..1752ddc3b3 100644 --- a/keyboards/monsgeek/m3/m3.c +++ b/keyboards/monsgeek/m3/m3.c @@ -140,6 +140,8 @@ void matrix_init_kb(void) { gpio_write_pin_low(LED_MAC_OS_PIN); gpio_set_pin_output(LED_WIN_LOCK_PIN); // LED3 Win Lock gpio_write_pin_low(LED_WIN_LOCK_PIN); + + matrix_init_user(); } void housekeeping_task_kb(void){ diff --git a/keyboards/mothwing/keyboard.json b/keyboards/mothwing/keyboard.json index 350c52c72e..c52d9df00e 100644 --- a/keyboards/mothwing/keyboard.json +++ b/keyboards/mothwing/keyboard.json @@ -15,7 +15,9 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D2" + "serial": { + "pin": "D2" + } }, "development_board": "promicro", "layouts": { diff --git a/keyboards/mt/mt84/config.h b/keyboards/mt/mt84/config.h index e2b30400a9..99449b14cc 100644 --- a/keyboards/mt/mt84/config.h +++ b/keyboards/mt/mt84/config.h @@ -1,18 +1,6 @@ - /* Copyright 2020 MT <[email protected]> - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ +// Copyright 2020 MaiKong<[email protected]> +// SPDX-License-Identifier: GPL-2.0+ + #pragma once #define IS31FL3737_I2C_ADDRESS_1 IS31FL3737_I2C_ADDRESS_GND diff --git a/keyboards/mt/mt84/keyboard.json b/keyboards/mt/mt84/keyboard.json index fd03c2cf71..26f66b31db 100644 --- a/keyboards/mt/mt84/keyboard.json +++ b/keyboards/mt/mt84/keyboard.json @@ -43,7 +43,6 @@ "hue_wave": true, "pixel_rain": true, "pixel_flow": true, - "pixel_fractal": true, "solid_reactive_simple": true, "solid_reactive": true, "solid_reactive_wide": true, diff --git a/keyboards/mt/mt84/keymaps/default/keymap.c b/keyboards/mt/mt84/keymaps/default/keymap.c index e3c7fa8b87..2b3371257c 100644 --- a/keyboards/mt/mt84/keymaps/default/keymap.c +++ b/keyboards/mt/mt84/keymaps/default/keymap.c @@ -1,18 +1,6 @@ - /* Copyright 2020 mt<[email protected]> - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ +// Copyright 2020 MaiKong<[email protected]> +// SPDX-License-Identifier: GPL-2.0 + #include QMK_KEYBOARD_H diff --git a/keyboards/mt/mt84/keymaps/via/keymap.c b/keyboards/mt/mt84/keymaps/via/keymap.c index 6906ddf9fe..906ed635ad 100644 --- a/keyboards/mt/mt84/keymaps/via/keymap.c +++ b/keyboards/mt/mt84/keymaps/via/keymap.c @@ -1,18 +1,6 @@ - /* Copyright 2020 MaiKong<[email protected]> - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ +// Copyright 2020 MaiKong<[email protected]> +// SPDX-License-Identifier: GPL-2.0+ + #include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/mt/mt84/mt84.c b/keyboards/mt/mt84/mt84.c index 1ac61e87c0..230559af4c 100644 --- a/keyboards/mt/mt84/mt84.c +++ b/keyboards/mt/mt84/mt84.c @@ -1,18 +1,6 @@ - /* Copyright 2020 MT<[email protected]> - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ +// Copyright 2020 MaiKong<[email protected]> +// SPDX-License-Identifier: GPL-2.0+ + #include "quantum.h" #ifdef RGB_MATRIX_ENABLE diff --git a/keyboards/mt/ncr80/hotswap/keyboard.json b/keyboards/mt/ncr80/hotswap/keyboard.json deleted file mode 100644 index 6f82bb0e78..0000000000 --- a/keyboards/mt/ncr80/hotswap/keyboard.json +++ /dev/null @@ -1,150 +0,0 @@ -{ - "keyboard_name": "NCR-80 Hotswap", - "manufacturer": "NCR", - "url": "https://www.aliexpress.com/item/1005003345941543.html", - "maintainer": "qmk", - "usb": { - "vid": "0x4D54", - "pid": "0x2002", - "device_version": "0.0.1" - }, - "features": { - "bootmagic": true, - "mousekey": false, - "extrakey": true, - "nkro": true - }, - "matrix_pins": { - "cols": ["D0", "D1", "D2", "D3", "D5", "D4", "D6", "D7", "B4"], - "rows": ["E6", "B0", "B1", "B2", "B3", "B7", "F7", "F6", "F5", "F4", "F1"] - }, - "diode_direction": "ROW2COL", - "indicators": { - "caps_lock": "C6", - "num_lock": "B5", - "scroll_lock": "C7", - "on_state": 0 - }, - "ws2812": { - "pin": "E2" - }, - "rgblight": { - "saturation_steps": 8, - "brightness_steps": 8, - "led_count": 81, - "max_brightness": 180, - "animations": { - "breathing": true, - "rainbow_mood": true, - "rainbow_swirl": true, - "snake": true, - "knight": true, - "christmas": true, - "static_gradient": true, - "rgb_test": true, - "alternating": true, - "twinkle": true - } - }, - "processor": "atmega32u4", - "bootloader": "atmel-dfu", - "layouts": { - "LAYOUT": { - "layout": [ - {"x": 0, "y": 0, "matrix": [0, 0]}, - - {"x": 2, "y": 0, "matrix": [0, 2]}, - {"x": 3, "y": 0, "matrix": [0, 3]}, - {"x": 4, "y": 0, "matrix": [0, 4]}, - {"x": 5, "y": 0, "matrix": [0, 5]}, - - {"x": 6.5, "y": 0, "matrix": [0, 6]}, - {"x": 7.5, "y": 0, "matrix": [0, 7]}, - {"x": 8.5, "y": 0, "matrix": [0, 8]}, - {"x": 9.5, "y": 0, "matrix": [6, 8]}, - - {"x": 11, "y": 0, "matrix": [6, 7]}, - {"x": 12, "y": 0, "matrix": [6, 5]}, - {"x": 13, "y": 0, "matrix": [6, 4]}, - {"x": 14, "y": 0, "matrix": [6, 3]}, - - {"x": 0, "y": 1.5, "matrix": [1, 0]}, - {"x": 1, "y": 1.5, "matrix": [1, 1]}, - {"x": 2, "y": 1.5, "matrix": [1, 2]}, - {"x": 3, "y": 1.5, "matrix": [1, 3]}, - {"x": 4, "y": 1.5, "matrix": [1, 4]}, - {"x": 5, "y": 1.5, "matrix": [1, 5]}, - {"x": 6, "y": 1.5, "matrix": [1, 6]}, - {"x": 7, "y": 1.5, "matrix": [1, 7]}, - {"x": 8, "y": 1.5, "matrix": [1, 8]}, - {"x": 9, "y": 1.5, "matrix": [7, 8]}, - {"x": 10, "y": 1.5, "matrix": [7, 0]}, - {"x": 11, "y": 1.5, "matrix": [7, 7]}, - {"x": 12, "y": 1.5, "matrix": [7, 5]}, - {"x": 13, "y": 1.5, "w": 2, "matrix": [7, 3]}, - - {"x": 15.25, "y": 1.5, "matrix": [7, 6]}, - {"x": 16.25, "y": 1.5, "matrix": [7, 2]}, - {"x": 17.25, "y": 1.5, "matrix": [7, 1]}, - - {"x": 0, "y": 2.5, "w": 1.5, "matrix": [2, 0]}, - {"x": 1.5, "y": 2.5, "matrix": [2, 1]}, - {"x": 2.5, "y": 2.5, "matrix": [2, 2]}, - {"x": 3.5, "y": 2.5, "matrix": [2, 3]}, - {"x": 4.5, "y": 2.5, "matrix": [2, 4]}, - {"x": 5.5, "y": 2.5, "matrix": [2, 5]}, - {"x": 6.5, "y": 2.5, "matrix": [2, 6]}, - {"x": 7.5, "y": 2.5, "matrix": [2, 7]}, - {"x": 8.5, "y": 2.5, "matrix": [2, 8]}, - {"x": 9.5, "y": 2.5, "matrix": [8, 8]}, - {"x": 10.5, "y": 2.5, "matrix": [8, 7]}, - {"x": 11.5, "y": 2.5, "matrix": [8, 5]}, - {"x": 12.5, "y": 2.5, "matrix": [8, 4]}, - {"x": 13.5, "y": 2.5, "w": 1.5, "matrix": [8, 3]}, - - {"x": 15.25, "y": 2.5, "matrix": [8, 6]}, - {"x": 16.25, "y": 2.5, "matrix": [8, 2]}, - {"x": 17.25, "y": 2.5, "matrix": [8, 1]}, - - {"x": 0, "y": 3.5, "w": 1.75, "matrix": [3, 0]}, - {"x": 1.75, "y": 3.5, "matrix": [3, 1]}, - {"x": 2.75, "y": 3.5, "matrix": [3, 2]}, - {"x": 3.75, "y": 3.5, "matrix": [3, 3]}, - {"x": 4.75, "y": 3.5, "matrix": [3, 4]}, - {"x": 5.75, "y": 3.5, "matrix": [3, 5]}, - {"x": 6.75, "y": 3.5, "matrix": [3, 6]}, - {"x": 7.75, "y": 3.5, "matrix": [3, 7]}, - {"x": 8.75, "y": 3.5, "matrix": [3, 8]}, - {"x": 9.75, "y": 3.5, "matrix": [9, 8]}, - {"x": 10.75, "y": 3.5, "matrix": [9, 7]}, - {"x": 11.75, "y": 3.5, "matrix": [9, 5]}, - {"x": 12.75, "y": 3.5, "w": 2.25, "matrix": [9, 3]}, - - {"x": 0, "y": 4.5, "w": 2.25, "matrix": [4, 0]}, - {"x": 2.25, "y": 4.5, "matrix": [4, 2]}, - {"x": 3.25, "y": 4.5, "matrix": [4, 3]}, - {"x": 4.25, "y": 4.5, "matrix": [4, 4]}, - {"x": 5.25, "y": 4.5, "matrix": [4, 5]}, - {"x": 6.25, "y": 4.5, "matrix": [4, 6]}, - {"x": 7.25, "y": 4.5, "matrix": [4, 7]}, - {"x": 8.25, "y": 4.5, "matrix": [4, 8]}, - {"x": 9.25, "y": 4.5, "matrix": [10, 8]}, - {"x": 10.25, "y": 4.5, "matrix": [10, 7]}, - {"x": 11.25, "y": 4.5, "matrix": [10, 5]}, - {"x": 12.25, "y": 4.5, "w": 2.75, "matrix": [10, 4]}, - - {"x": 16.25, "y": 4.5, "matrix": [9, 2]}, - - {"x": 0, "y": 5.5, "w": 1.5, "matrix": [5, 0]}, - {"x": 2.5, "y": 5.5, "w": 1.5, "matrix": [5, 2]}, - {"x": 4, "y": 5.5, "w": 7, "matrix": [5, 6]}, - {"x": 11, "y": 5.5, "w": 1.5, "matrix": [5, 7]}, - {"x": 13.5, "y": 5.5, "w": 1.5, "matrix": [5, 3]}, - - {"x": 15.25, "y": 5.5, "matrix": [10, 6]}, - {"x": 16.25, "y": 5.5, "matrix": [10, 2]}, - {"x": 17.25, "y": 5.5, "matrix": [10, 1]} - ] - } - } -} diff --git a/keyboards/mt/ncr80/hotswap/keymaps/via/keymap.c b/keyboards/mt/ncr80/hotswap/keymaps/via/keymap.c deleted file mode 100644 index e23de81b78..0000000000 --- a/keyboards/mt/ncr80/hotswap/keymaps/via/keymap.c +++ /dev/null @@ -1,49 +0,0 @@ -/* Copyright 2022 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 <http://www.gnu.org/licenses/>. - */ - -#include QMK_KEYBOARD_H - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT( - KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, - KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, - KC_LCTL, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), - [1] = LAYOUT( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______), - [2] = LAYOUT( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______), - [3] = LAYOUT( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______), - -}; diff --git a/keyboards/mt/ncr80/hotswap/readme.md b/keyboards/mt/ncr80/hotswap/readme.md deleted file mode 100644 index 5f9aa43c3e..0000000000 --- a/keyboards/mt/ncr80/hotswap/readme.md +++ /dev/null @@ -1,31 +0,0 @@ -# NCR-80 - -![NCR-80](https://i.imgur.com/kAjbAPLl.jpg) - -> Re-imagination of the classic rebranded Cherry G81-3000 by NCR - -NCR-80 is an affordable keyboard kit inspired by iconic vintage keyboards. - -* Keyboard Maintainer: QMK Community -* Hardware Supported: ATmega32U4 -* Hardware Availability: [AliExpress](https://www.aliexpress.com/item/1005003345941543.html) [Taobao 淘宝](https://item.taobao.com/item.htm?id=657482028672) - -Make example for this keyboard (after setting up your build environment): - - make ncr80/hotswap:default - -Flashing example for this keyboard: - - make ncr80/hotswap:default:flash - -See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). - -## Bootloader - -Enter the bootloader in 3 ways: - -* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard -* **Physical reset button**: Briefly press the button on the back of the PCB -* **Keycode in layout**: Press the key mapped to `RESET` if it is available - -See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.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/mt/ncr80/info.json b/keyboards/mt/ncr80/info.json new file mode 100644 index 0000000000..3573e72012 --- /dev/null +++ b/keyboards/mt/ncr80/info.json @@ -0,0 +1,8 @@ +{ + "manufacturer": "MT", + "keyboard_name": "NCR-80", + "maintainer": "qmk", + "usb": { + "vid": "0x4D54" + } +} diff --git a/keyboards/mt/ncr80/r2/hotswap/keyboard.json b/keyboards/mt/ncr80/r2/hotswap/keyboard.json new file mode 100644 index 0000000000..fbd10e0ee8 --- /dev/null +++ b/keyboards/mt/ncr80/r2/hotswap/keyboard.json @@ -0,0 +1,122 @@ +{ + "features": { + "bootmagic": true, + "extrakey": true, + "mousekey": true, + "nkro": true, + "rgblight": true + }, + "rgblight": { + "animations": { + "alternating": true, + "breathing": true, + "christmas": true, + "knight": true, + "rainbow_mood": true, + "rainbow_swirl": true, + "rgb_test": true, + "snake": true, + "static_gradient": true, + "twinkle": true + }, + "brightness_steps": 8, + "led_count": 81, + "max_brightness": 180, + "saturation_steps": 8 + }, + "url": "https://www.aliexpress.com/item/1005003345941543.html", + "usb": { + "device_version": "0.0.1", + "pid": "0x2002" + }, + "ws2812": { + "pin": "E2" + }, + "layouts": { + "LAYOUT": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0}, + {"matrix": [0, 2], "x": 2, "y": 0}, + {"matrix": [0, 3], "x": 3, "y": 0}, + {"matrix": [0, 4], "x": 4, "y": 0}, + {"matrix": [0, 5], "x": 5, "y": 0}, + {"matrix": [0, 6], "x": 6.5, "y": 0}, + {"matrix": [0, 7], "x": 7.5, "y": 0}, + {"matrix": [0, 8], "x": 8.5, "y": 0}, + {"matrix": [6, 8], "x": 9.5, "y": 0}, + {"matrix": [6, 7], "x": 11, "y": 0}, + {"matrix": [6, 5], "x": 12, "y": 0}, + {"matrix": [6, 4], "x": 13, "y": 0}, + {"matrix": [6, 3], "x": 14, "y": 0}, + {"matrix": [1, 0], "x": 0, "y": 1.5}, + {"matrix": [1, 1], "x": 1, "y": 1.5}, + {"matrix": [1, 2], "x": 2, "y": 1.5}, + {"matrix": [1, 3], "x": 3, "y": 1.5}, + {"matrix": [1, 4], "x": 4, "y": 1.5}, + {"matrix": [1, 5], "x": 5, "y": 1.5}, + {"matrix": [1, 6], "x": 6, "y": 1.5}, + {"matrix": [1, 7], "x": 7, "y": 1.5}, + {"matrix": [1, 8], "x": 8, "y": 1.5}, + {"matrix": [7, 8], "x": 9, "y": 1.5}, + {"matrix": [7, 0], "x": 10, "y": 1.5}, + {"matrix": [7, 7], "x": 11, "y": 1.5}, + {"matrix": [7, 5], "x": 12, "y": 1.5}, + {"matrix": [7, 3], "x": 13, "y": 1.5, "w": 2}, + {"matrix": [7, 6], "x": 15.25, "y": 1.5}, + {"matrix": [7, 2], "x": 16.25, "y": 1.5}, + {"matrix": [7, 1], "x": 17.25, "y": 1.5}, + {"matrix": [2, 0], "x": 0, "y": 2.5, "w": 1.5}, + {"matrix": [2, 1], "x": 1.5, "y": 2.5}, + {"matrix": [2, 2], "x": 2.5, "y": 2.5}, + {"matrix": [2, 3], "x": 3.5, "y": 2.5}, + {"matrix": [2, 4], "x": 4.5, "y": 2.5}, + {"matrix": [2, 5], "x": 5.5, "y": 2.5}, + {"matrix": [2, 6], "x": 6.5, "y": 2.5}, + {"matrix": [2, 7], "x": 7.5, "y": 2.5}, + {"matrix": [2, 8], "x": 8.5, "y": 2.5}, + {"matrix": [8, 8], "x": 9.5, "y": 2.5}, + {"matrix": [8, 7], "x": 10.5, "y": 2.5}, + {"matrix": [8, 5], "x": 11.5, "y": 2.5}, + {"matrix": [8, 4], "x": 12.5, "y": 2.5}, + {"matrix": [8, 3], "x": 13.5, "y": 2.5, "w": 1.5}, + {"matrix": [8, 6], "x": 15.25, "y": 2.5}, + {"matrix": [8, 2], "x": 16.25, "y": 2.5}, + {"matrix": [8, 1], "x": 17.25, "y": 2.5}, + {"matrix": [3, 0], "x": 0, "y": 3.5, "w": 1.75}, + {"matrix": [3, 1], "x": 1.75, "y": 3.5}, + {"matrix": [3, 2], "x": 2.75, "y": 3.5}, + {"matrix": [3, 3], "x": 3.75, "y": 3.5}, + {"matrix": [3, 4], "x": 4.75, "y": 3.5}, + {"matrix": [3, 5], "x": 5.75, "y": 3.5}, + {"matrix": [3, 6], "x": 6.75, "y": 3.5}, + {"matrix": [3, 7], "x": 7.75, "y": 3.5}, + {"matrix": [3, 8], "x": 8.75, "y": 3.5}, + {"matrix": [9, 8], "x": 9.75, "y": 3.5}, + {"matrix": [9, 7], "x": 10.75, "y": 3.5}, + {"matrix": [9, 5], "x": 11.75, "y": 3.5}, + {"matrix": [9, 3], "x": 12.75, "y": 3.5, "w": 2.25}, + {"matrix": [4, 0], "x": 0, "y": 4.5, "w": 2.25}, + {"matrix": [4, 2], "x": 2.25, "y": 4.5}, + {"matrix": [4, 3], "x": 3.25, "y": 4.5}, + {"matrix": [4, 4], "x": 4.25, "y": 4.5}, + {"matrix": [4, 5], "x": 5.25, "y": 4.5}, + {"matrix": [4, 6], "x": 6.25, "y": 4.5}, + {"matrix": [4, 7], "x": 7.25, "y": 4.5}, + {"matrix": [4, 8], "x": 8.25, "y": 4.5}, + {"matrix": [10, 8], "x": 9.25, "y": 4.5}, + {"matrix": [10, 7], "x": 10.25, "y": 4.5}, + {"matrix": [10, 5], "x": 11.25, "y": 4.5}, + {"matrix": [10, 4], "x": 12.25, "y": 4.5, "w": 2.75}, + {"matrix": [9, 2], "x": 16.25, "y": 4.5}, + {"matrix": [5, 0], "x": 0, "y": 5.5, "w": 1.5}, + {"matrix": [5, 2], "x": 2.5, "y": 5.5, "w": 1.5}, + {"matrix": [5, 6], "x": 4, "y": 5.5, "w": 7}, + {"matrix": [5, 7], "x": 11, "y": 5.5, "w": 1.5}, + {"matrix": [5, 3], "x": 13.5, "y": 5.5, "w": 1.5}, + {"matrix": [10, 6], "x": 15.25, "y": 5.5}, + {"matrix": [10, 2], "x": 16.25, "y": 5.5}, + {"matrix": [10, 1], "x": 17.25, "y": 5.5} + ] + } + } +} diff --git a/keyboards/mt/ncr80/hotswap/keymaps/default/keymap.c b/keyboards/mt/ncr80/r2/hotswap/keymaps/default/keymap.c index 33f98796e3..33f98796e3 100644 --- a/keyboards/mt/ncr80/hotswap/keymaps/default/keymap.c +++ b/keyboards/mt/ncr80/r2/hotswap/keymaps/default/keymap.c diff --git a/keyboards/mt/ncr80/r2/hotswap/keymaps/via/keymap.c b/keyboards/mt/ncr80/r2/hotswap/keymaps/via/keymap.c new file mode 100644 index 0000000000..91afb7c4f7 --- /dev/null +++ b/keyboards/mt/ncr80/r2/hotswap/keymaps/via/keymap.c @@ -0,0 +1,28 @@ +/* Copyright 2022 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 <http://www.gnu.org/licenses/>. + */ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ) +}; diff --git a/keyboards/mt/ncr80/hotswap/keymaps/via/rules.mk b/keyboards/mt/ncr80/r2/hotswap/keymaps/via/rules.mk index 36b7ba9cbc..36b7ba9cbc 100644 --- a/keyboards/mt/ncr80/hotswap/keymaps/via/rules.mk +++ b/keyboards/mt/ncr80/r2/hotswap/keymaps/via/rules.mk diff --git a/keyboards/mt/ncr80/r2/info.json b/keyboards/mt/ncr80/r2/info.json new file mode 100644 index 0000000000..214153235e --- /dev/null +++ b/keyboards/mt/ncr80/r2/info.json @@ -0,0 +1,15 @@ +{ + "bootloader": "atmel-dfu", + "diode_direction": "ROW2COL", + "indicators": { + "caps_lock": "C6", + "num_lock": "B5", + "on_state": 0, + "scroll_lock": "C7" + }, + "matrix_pins": { + "cols": ["D0", "D1", "D2", "D3", "D5", "D4", "D6", "D7", "B4"], + "rows": ["E6", "B0", "B1", "B2", "B3", "B7", "F7", "F6", "F5", "F4", "F1"] + }, + "processor": "atmega32u4" +} diff --git a/keyboards/mt/ncr80/r2/solder/keyboard.json b/keyboards/mt/ncr80/r2/solder/keyboard.json new file mode 100644 index 0000000000..8c7265614a --- /dev/null +++ b/keyboards/mt/ncr80/r2/solder/keyboard.json @@ -0,0 +1,1209 @@ +{ + "backlight": { + "levels": 5, + "pin": "B6" + }, + "features": { + "backlight": true, + "bootmagic": true, + "extrakey": true, + "mousekey": true, + "nkro": true + }, + "url": "https://www.aliexpress.com/item/1005003364462523.html", + "usb": { + "device_version": "0.0.1", + "pid": "0x2001" + }, + "community_layouts": ["tkl_ansi", "tkl_ansi_split_bs_rshift", "tkl_ansi_tsangan", "tkl_ansi_tsangan_split_bs_rshift", "tkl_ansi_wkl", "tkl_ansi_wkl_split_bs_rshift", "tkl_iso", "tkl_iso_split_bs_rshift", "tkl_iso_tsangan", "tkl_iso_tsangan_split_bs_rshift", "tkl_iso_wkl", "tkl_iso_wkl_split_bs_rshift"], + "layouts": { + "LAYOUT_all": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0}, + {"matrix": [0, 2], "x": 2, "y": 0}, + {"matrix": [0, 3], "x": 3, "y": 0}, + {"matrix": [0, 4], "x": 4, "y": 0}, + {"matrix": [0, 5], "x": 5, "y": 0}, + {"matrix": [0, 6], "x": 6.5, "y": 0}, + {"matrix": [0, 7], "x": 7.5, "y": 0}, + {"matrix": [0, 8], "x": 8.5, "y": 0}, + {"matrix": [6, 8], "x": 9.5, "y": 0}, + {"matrix": [6, 7], "x": 11, "y": 0}, + {"matrix": [6, 5], "x": 12, "y": 0}, + {"matrix": [6, 4], "x": 13, "y": 0}, + {"matrix": [6, 3], "x": 14, "y": 0}, + {"matrix": [6, 6], "x": 15.25, "y": 0}, + {"matrix": [6, 2], "x": 16.25, "y": 0}, + {"matrix": [6, 1], "x": 17.25, "y": 0}, + {"matrix": [1, 0], "x": 0, "y": 1.5}, + {"matrix": [1, 1], "x": 1, "y": 1.5}, + {"matrix": [1, 2], "x": 2, "y": 1.5}, + {"matrix": [1, 3], "x": 3, "y": 1.5}, + {"matrix": [1, 4], "x": 4, "y": 1.5}, + {"matrix": [1, 5], "x": 5, "y": 1.5}, + {"matrix": [1, 6], "x": 6, "y": 1.5}, + {"matrix": [1, 7], "x": 7, "y": 1.5}, + {"matrix": [1, 8], "x": 8, "y": 1.5}, + {"matrix": [7, 8], "x": 9, "y": 1.5}, + {"matrix": [7, 0], "x": 10, "y": 1.5}, + {"matrix": [7, 7], "x": 11, "y": 1.5}, + {"matrix": [7, 5], "x": 12, "y": 1.5}, + {"matrix": [7, 4], "x": 13, "y": 1.5}, + {"matrix": [7, 3], "x": 14, "y": 1.5}, + {"matrix": [7, 6], "x": 15.25, "y": 1.5}, + {"matrix": [7, 2], "x": 16.25, "y": 1.5}, + {"matrix": [7, 1], "x": 17.25, "y": 1.5}, + {"matrix": [2, 0], "x": 0, "y": 2.5, "w": 1.5}, + {"matrix": [2, 1], "x": 1.5, "y": 2.5}, + {"matrix": [2, 2], "x": 2.5, "y": 2.5}, + {"matrix": [2, 3], "x": 3.5, "y": 2.5}, + {"matrix": [2, 4], "x": 4.5, "y": 2.5}, + {"matrix": [2, 5], "x": 5.5, "y": 2.5}, + {"matrix": [2, 6], "x": 6.5, "y": 2.5}, + {"matrix": [2, 7], "x": 7.5, "y": 2.5}, + {"matrix": [2, 8], "x": 8.5, "y": 2.5}, + {"matrix": [8, 8], "x": 9.5, "y": 2.5}, + {"matrix": [8, 7], "x": 10.5, "y": 2.5}, + {"matrix": [8, 5], "x": 11.5, "y": 2.5}, + {"matrix": [8, 4], "x": 12.5, "y": 2.5}, + {"matrix": [9, 4], "x": 13.5, "y": 2.5, "w": 1.5}, + {"matrix": [8, 6], "x": 15.25, "y": 2.5}, + {"matrix": [8, 2], "x": 16.25, "y": 2.5}, + {"matrix": [8, 1], "x": 17.25, "y": 2.5}, + {"matrix": [3, 0], "x": 0, "y": 3.5, "w": 1.75}, + {"matrix": [3, 1], "x": 1.75, "y": 3.5}, + {"matrix": [3, 2], "x": 2.75, "y": 3.5}, + {"matrix": [3, 3], "x": 3.75, "y": 3.5}, + {"matrix": [3, 4], "x": 4.75, "y": 3.5}, + {"matrix": [3, 5], "x": 5.75, "y": 3.5}, + {"matrix": [3, 6], "x": 6.75, "y": 3.5}, + {"matrix": [3, 7], "x": 7.75, "y": 3.5}, + {"matrix": [3, 8], "x": 8.75, "y": 3.5}, + {"matrix": [9, 8], "x": 9.75, "y": 3.5}, + {"matrix": [9, 7], "x": 10.75, "y": 3.5}, + {"matrix": [9, 5], "x": 11.75, "y": 3.5}, + {"matrix": [8, 3], "x": 12.75, "y": 3.5, "w": 2.25}, + {"matrix": [4, 0], "x": 0, "y": 4.5, "w": 1.25}, + {"matrix": [4, 1], "x": 1.25, "y": 4.5}, + {"matrix": [4, 2], "x": 2.25, "y": 4.5}, + {"matrix": [4, 3], "x": 3.25, "y": 4.5}, + {"matrix": [4, 4], "x": 4.25, "y": 4.5}, + {"matrix": [4, 5], "x": 5.25, "y": 4.5}, + {"matrix": [4, 6], "x": 6.25, "y": 4.5}, + {"matrix": [4, 7], "x": 7.25, "y": 4.5}, + {"matrix": [4, 8], "x": 8.25, "y": 4.5}, + {"matrix": [10, 8], "x": 9.25, "y": 4.5}, + {"matrix": [10, 7], "x": 10.25, "y": 4.5}, + {"matrix": [10, 5], "x": 11.25, "y": 4.5}, + {"matrix": [10, 4], "x": 12.25, "y": 4.5, "w": 1.75}, + {"matrix": [10, 3], "x": 14, "y": 4.5}, + {"matrix": [9, 2], "x": 16.25, "y": 4.5}, + {"matrix": [5, 0], "x": 0, "y": 5.5, "w": 1.25}, + {"matrix": [5, 1], "x": 1.25, "y": 5.5, "w": 1.25}, + {"matrix": [5, 2], "x": 2.5, "y": 5.5, "w": 1.25}, + {"matrix": [5, 6], "x": 3.75, "y": 5.5, "w": 6.25}, + {"matrix": [5, 8], "x": 10, "y": 5.5, "w": 1.25}, + {"matrix": [5, 7], "x": 11.25, "y": 5.5, "w": 1.25}, + {"matrix": [5, 4], "x": 12.5, "y": 5.5, "w": 1.25}, + {"matrix": [5, 3], "x": 13.75, "y": 5.5, "w": 1.25}, + {"matrix": [10, 6], "x": 15.25, "y": 5.5}, + {"matrix": [10, 2], "x": 16.25, "y": 5.5}, + {"matrix": [10, 1], "x": 17.25, "y": 5.5} + ] + }, + "LAYOUT_tkl_ansi": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0}, + {"matrix": [0, 2], "x": 2, "y": 0}, + {"matrix": [0, 3], "x": 3, "y": 0}, + {"matrix": [0, 4], "x": 4, "y": 0}, + {"matrix": [0, 5], "x": 5, "y": 0}, + {"matrix": [0, 6], "x": 6.5, "y": 0}, + {"matrix": [0, 7], "x": 7.5, "y": 0}, + {"matrix": [0, 8], "x": 8.5, "y": 0}, + {"matrix": [6, 8], "x": 9.5, "y": 0}, + {"matrix": [6, 7], "x": 11, "y": 0}, + {"matrix": [6, 5], "x": 12, "y": 0}, + {"matrix": [6, 4], "x": 13, "y": 0}, + {"matrix": [6, 3], "x": 14, "y": 0}, + {"matrix": [6, 6], "x": 15.25, "y": 0}, + {"matrix": [6, 2], "x": 16.25, "y": 0}, + {"matrix": [6, 1], "x": 17.25, "y": 0}, + {"matrix": [1, 0], "x": 0, "y": 1.5}, + {"matrix": [1, 1], "x": 1, "y": 1.5}, + {"matrix": [1, 2], "x": 2, "y": 1.5}, + {"matrix": [1, 3], "x": 3, "y": 1.5}, + {"matrix": [1, 4], "x": 4, "y": 1.5}, + {"matrix": [1, 5], "x": 5, "y": 1.5}, + {"matrix": [1, 6], "x": 6, "y": 1.5}, + {"matrix": [1, 7], "x": 7, "y": 1.5}, + {"matrix": [1, 8], "x": 8, "y": 1.5}, + {"matrix": [7, 8], "x": 9, "y": 1.5}, + {"matrix": [7, 0], "x": 10, "y": 1.5}, + {"matrix": [7, 7], "x": 11, "y": 1.5}, + {"matrix": [7, 5], "x": 12, "y": 1.5}, + {"matrix": [7, 3], "x": 13, "y": 1.5, "w": 2}, + {"matrix": [7, 6], "x": 15.25, "y": 1.5}, + {"matrix": [7, 2], "x": 16.25, "y": 1.5}, + {"matrix": [7, 1], "x": 17.25, "y": 1.5}, + {"matrix": [2, 0], "x": 0, "y": 2.5, "w": 1.5}, + {"matrix": [2, 1], "x": 1.5, "y": 2.5}, + {"matrix": [2, 2], "x": 2.5, "y": 2.5}, + {"matrix": [2, 3], "x": 3.5, "y": 2.5}, + {"matrix": [2, 4], "x": 4.5, "y": 2.5}, + {"matrix": [2, 5], "x": 5.5, "y": 2.5}, + {"matrix": [2, 6], "x": 6.5, "y": 2.5}, + {"matrix": [2, 7], "x": 7.5, "y": 2.5}, + {"matrix": [2, 8], "x": 8.5, "y": 2.5}, + {"matrix": [8, 8], "x": 9.5, "y": 2.5}, + {"matrix": [8, 7], "x": 10.5, "y": 2.5}, + {"matrix": [8, 5], "x": 11.5, "y": 2.5}, + {"matrix": [8, 4], "x": 12.5, "y": 2.5}, + {"matrix": [9, 4], "x": 13.5, "y": 2.5, "w": 1.5}, + {"matrix": [8, 6], "x": 15.25, "y": 2.5}, + {"matrix": [8, 2], "x": 16.25, "y": 2.5}, + {"matrix": [8, 1], "x": 17.25, "y": 2.5}, + {"matrix": [3, 0], "x": 0, "y": 3.5, "w": 1.75}, + {"matrix": [3, 1], "x": 1.75, "y": 3.5}, + {"matrix": [3, 2], "x": 2.75, "y": 3.5}, + {"matrix": [3, 3], "x": 3.75, "y": 3.5}, + {"matrix": [3, 4], "x": 4.75, "y": 3.5}, + {"matrix": [3, 5], "x": 5.75, "y": 3.5}, + {"matrix": [3, 6], "x": 6.75, "y": 3.5}, + {"matrix": [3, 7], "x": 7.75, "y": 3.5}, + {"matrix": [3, 8], "x": 8.75, "y": 3.5}, + {"matrix": [9, 8], "x": 9.75, "y": 3.5}, + {"matrix": [9, 7], "x": 10.75, "y": 3.5}, + {"matrix": [9, 5], "x": 11.75, "y": 3.5}, + {"matrix": [8, 3], "x": 12.75, "y": 3.5, "w": 2.25}, + {"matrix": [4, 0], "x": 0, "y": 4.5, "w": 2.25}, + {"matrix": [4, 2], "x": 2.25, "y": 4.5}, + {"matrix": [4, 3], "x": 3.25, "y": 4.5}, + {"matrix": [4, 4], "x": 4.25, "y": 4.5}, + {"matrix": [4, 5], "x": 5.25, "y": 4.5}, + {"matrix": [4, 6], "x": 6.25, "y": 4.5}, + {"matrix": [4, 7], "x": 7.25, "y": 4.5}, + {"matrix": [4, 8], "x": 8.25, "y": 4.5}, + {"matrix": [10, 8], "x": 9.25, "y": 4.5}, + {"matrix": [10, 7], "x": 10.25, "y": 4.5}, + {"matrix": [10, 5], "x": 11.25, "y": 4.5}, + {"matrix": [10, 4], "x": 12.25, "y": 4.5, "w": 2.75}, + {"matrix": [9, 2], "x": 16.25, "y": 4.5}, + {"matrix": [5, 0], "x": 0, "y": 5.5, "w": 1.25}, + {"matrix": [5, 1], "x": 1.25, "y": 5.5, "w": 1.25}, + {"matrix": [5, 2], "x": 2.5, "y": 5.5, "w": 1.25}, + {"matrix": [5, 6], "x": 3.75, "y": 5.5, "w": 6.25}, + {"matrix": [5, 8], "x": 10, "y": 5.5, "w": 1.25}, + {"matrix": [5, 7], "x": 11.25, "y": 5.5, "w": 1.25}, + {"matrix": [5, 4], "x": 12.5, "y": 5.5, "w": 1.25}, + {"matrix": [5, 3], "x": 13.75, "y": 5.5, "w": 1.25}, + {"matrix": [10, 6], "x": 15.25, "y": 5.5}, + {"matrix": [10, 2], "x": 16.25, "y": 5.5}, + {"matrix": [10, 1], "x": 17.25, "y": 5.5} + ] + }, + "LAYOUT_tkl_ansi_split_bs_rshift": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0}, + {"matrix": [0, 2], "x": 2, "y": 0}, + {"matrix": [0, 3], "x": 3, "y": 0}, + {"matrix": [0, 4], "x": 4, "y": 0}, + {"matrix": [0, 5], "x": 5, "y": 0}, + {"matrix": [0, 6], "x": 6.5, "y": 0}, + {"matrix": [0, 7], "x": 7.5, "y": 0}, + {"matrix": [0, 8], "x": 8.5, "y": 0}, + {"matrix": [6, 8], "x": 9.5, "y": 0}, + {"matrix": [6, 7], "x": 11, "y": 0}, + {"matrix": [6, 5], "x": 12, "y": 0}, + {"matrix": [6, 4], "x": 13, "y": 0}, + {"matrix": [6, 3], "x": 14, "y": 0}, + {"matrix": [6, 6], "x": 15.25, "y": 0}, + {"matrix": [6, 2], "x": 16.25, "y": 0}, + {"matrix": [6, 1], "x": 17.25, "y": 0}, + {"matrix": [1, 0], "x": 0, "y": 1.5}, + {"matrix": [1, 1], "x": 1, "y": 1.5}, + {"matrix": [1, 2], "x": 2, "y": 1.5}, + {"matrix": [1, 3], "x": 3, "y": 1.5}, + {"matrix": [1, 4], "x": 4, "y": 1.5}, + {"matrix": [1, 5], "x": 5, "y": 1.5}, + {"matrix": [1, 6], "x": 6, "y": 1.5}, + {"matrix": [1, 7], "x": 7, "y": 1.5}, + {"matrix": [1, 8], "x": 8, "y": 1.5}, + {"matrix": [7, 8], "x": 9, "y": 1.5}, + {"matrix": [7, 0], "x": 10, "y": 1.5}, + {"matrix": [7, 7], "x": 11, "y": 1.5}, + {"matrix": [7, 5], "x": 12, "y": 1.5}, + {"matrix": [7, 4], "x": 13, "y": 1.5}, + {"matrix": [7, 3], "x": 14, "y": 1.5}, + {"matrix": [7, 6], "x": 15.25, "y": 1.5}, + {"matrix": [7, 2], "x": 16.25, "y": 1.5}, + {"matrix": [7, 1], "x": 17.25, "y": 1.5}, + {"matrix": [2, 0], "x": 0, "y": 2.5, "w": 1.5}, + {"matrix": [2, 1], "x": 1.5, "y": 2.5}, + {"matrix": [2, 2], "x": 2.5, "y": 2.5}, + {"matrix": [2, 3], "x": 3.5, "y": 2.5}, + {"matrix": [2, 4], "x": 4.5, "y": 2.5}, + {"matrix": [2, 5], "x": 5.5, "y": 2.5}, + {"matrix": [2, 6], "x": 6.5, "y": 2.5}, + {"matrix": [2, 7], "x": 7.5, "y": 2.5}, + {"matrix": [2, 8], "x": 8.5, "y": 2.5}, + {"matrix": [8, 8], "x": 9.5, "y": 2.5}, + {"matrix": [8, 7], "x": 10.5, "y": 2.5}, + {"matrix": [8, 5], "x": 11.5, "y": 2.5}, + {"matrix": [8, 4], "x": 12.5, "y": 2.5}, + {"matrix": [9, 4], "x": 13.5, "y": 2.5, "w": 1.5}, + {"matrix": [8, 6], "x": 15.25, "y": 2.5}, + {"matrix": [8, 2], "x": 16.25, "y": 2.5}, + {"matrix": [8, 1], "x": 17.25, "y": 2.5}, + {"matrix": [3, 0], "x": 0, "y": 3.5, "w": 1.75}, + {"matrix": [3, 1], "x": 1.75, "y": 3.5}, + {"matrix": [3, 2], "x": 2.75, "y": 3.5}, + {"matrix": [3, 3], "x": 3.75, "y": 3.5}, + {"matrix": [3, 4], "x": 4.75, "y": 3.5}, + {"matrix": [3, 5], "x": 5.75, "y": 3.5}, + {"matrix": [3, 6], "x": 6.75, "y": 3.5}, + {"matrix": [3, 7], "x": 7.75, "y": 3.5}, + {"matrix": [3, 8], "x": 8.75, "y": 3.5}, + {"matrix": [9, 8], "x": 9.75, "y": 3.5}, + {"matrix": [9, 7], "x": 10.75, "y": 3.5}, + {"matrix": [9, 5], "x": 11.75, "y": 3.5}, + {"matrix": [8, 3], "x": 12.75, "y": 3.5, "w": 2.25}, + {"matrix": [4, 0], "x": 0, "y": 4.5, "w": 2.25}, + {"matrix": [4, 2], "x": 2.25, "y": 4.5}, + {"matrix": [4, 3], "x": 3.25, "y": 4.5}, + {"matrix": [4, 4], "x": 4.25, "y": 4.5}, + {"matrix": [4, 5], "x": 5.25, "y": 4.5}, + {"matrix": [4, 6], "x": 6.25, "y": 4.5}, + {"matrix": [4, 7], "x": 7.25, "y": 4.5}, + {"matrix": [4, 8], "x": 8.25, "y": 4.5}, + {"matrix": [10, 8], "x": 9.25, "y": 4.5}, + {"matrix": [10, 7], "x": 10.25, "y": 4.5}, + {"matrix": [10, 5], "x": 11.25, "y": 4.5}, + {"matrix": [10, 4], "x": 12.25, "y": 4.5, "w": 1.75}, + {"matrix": [10, 3], "x": 14, "y": 4.5}, + {"matrix": [9, 2], "x": 16.25, "y": 4.5}, + {"matrix": [5, 0], "x": 0, "y": 5.5, "w": 1.25}, + {"matrix": [5, 1], "x": 1.25, "y": 5.5, "w": 1.25}, + {"matrix": [5, 2], "x": 2.5, "y": 5.5, "w": 1.25}, + {"matrix": [5, 6], "x": 3.75, "y": 5.5, "w": 6.25}, + {"matrix": [5, 8], "x": 10, "y": 5.5, "w": 1.25}, + {"matrix": [5, 7], "x": 11.25, "y": 5.5, "w": 1.25}, + {"matrix": [5, 4], "x": 12.5, "y": 5.5, "w": 1.25}, + {"matrix": [5, 3], "x": 13.75, "y": 5.5, "w": 1.25}, + {"matrix": [10, 6], "x": 15.25, "y": 5.5}, + {"matrix": [10, 2], "x": 16.25, "y": 5.5}, + {"matrix": [10, 1], "x": 17.25, "y": 5.5} + ] + }, + "LAYOUT_tkl_ansi_tsangan": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0}, + {"matrix": [0, 2], "x": 2, "y": 0}, + {"matrix": [0, 3], "x": 3, "y": 0}, + {"matrix": [0, 4], "x": 4, "y": 0}, + {"matrix": [0, 5], "x": 5, "y": 0}, + {"matrix": [0, 6], "x": 6.5, "y": 0}, + {"matrix": [0, 7], "x": 7.5, "y": 0}, + {"matrix": [0, 8], "x": 8.5, "y": 0}, + {"matrix": [6, 8], "x": 9.5, "y": 0}, + {"matrix": [6, 7], "x": 11, "y": 0}, + {"matrix": [6, 5], "x": 12, "y": 0}, + {"matrix": [6, 4], "x": 13, "y": 0}, + {"matrix": [6, 3], "x": 14, "y": 0}, + {"matrix": [6, 6], "x": 15.25, "y": 0}, + {"matrix": [6, 2], "x": 16.25, "y": 0}, + {"matrix": [6, 1], "x": 17.25, "y": 0}, + {"matrix": [1, 0], "x": 0, "y": 1.5}, + {"matrix": [1, 1], "x": 1, "y": 1.5}, + {"matrix": [1, 2], "x": 2, "y": 1.5}, + {"matrix": [1, 3], "x": 3, "y": 1.5}, + {"matrix": [1, 4], "x": 4, "y": 1.5}, + {"matrix": [1, 5], "x": 5, "y": 1.5}, + {"matrix": [1, 6], "x": 6, "y": 1.5}, + {"matrix": [1, 7], "x": 7, "y": 1.5}, + {"matrix": [1, 8], "x": 8, "y": 1.5}, + {"matrix": [7, 8], "x": 9, "y": 1.5}, + {"matrix": [7, 0], "x": 10, "y": 1.5}, + {"matrix": [7, 7], "x": 11, "y": 1.5}, + {"matrix": [7, 5], "x": 12, "y": 1.5}, + {"matrix": [7, 3], "x": 13, "y": 1.5, "w": 2}, + {"matrix": [7, 6], "x": 15.25, "y": 1.5}, + {"matrix": [7, 2], "x": 16.25, "y": 1.5}, + {"matrix": [7, 1], "x": 17.25, "y": 1.5}, + {"matrix": [2, 0], "x": 0, "y": 2.5, "w": 1.5}, + {"matrix": [2, 1], "x": 1.5, "y": 2.5}, + {"matrix": [2, 2], "x": 2.5, "y": 2.5}, + {"matrix": [2, 3], "x": 3.5, "y": 2.5}, + {"matrix": [2, 4], "x": 4.5, "y": 2.5}, + {"matrix": [2, 5], "x": 5.5, "y": 2.5}, + {"matrix": [2, 6], "x": 6.5, "y": 2.5}, + {"matrix": [2, 7], "x": 7.5, "y": 2.5}, + {"matrix": [2, 8], "x": 8.5, "y": 2.5}, + {"matrix": [8, 8], "x": 9.5, "y": 2.5}, + {"matrix": [8, 7], "x": 10.5, "y": 2.5}, + {"matrix": [8, 5], "x": 11.5, "y": 2.5}, + {"matrix": [8, 4], "x": 12.5, "y": 2.5}, + {"matrix": [9, 4], "x": 13.5, "y": 2.5, "w": 1.5}, + {"matrix": [8, 6], "x": 15.25, "y": 2.5}, + {"matrix": [8, 2], "x": 16.25, "y": 2.5}, + {"matrix": [8, 1], "x": 17.25, "y": 2.5}, + {"matrix": [3, 0], "x": 0, "y": 3.5, "w": 1.75}, + {"matrix": [3, 1], "x": 1.75, "y": 3.5}, + {"matrix": [3, 2], "x": 2.75, "y": 3.5}, + {"matrix": [3, 3], "x": 3.75, "y": 3.5}, + {"matrix": [3, 4], "x": 4.75, "y": 3.5}, + {"matrix": [3, 5], "x": 5.75, "y": 3.5}, + {"matrix": [3, 6], "x": 6.75, "y": 3.5}, + {"matrix": [3, 7], "x": 7.75, "y": 3.5}, + {"matrix": [3, 8], "x": 8.75, "y": 3.5}, + {"matrix": [9, 8], "x": 9.75, "y": 3.5}, + {"matrix": [9, 7], "x": 10.75, "y": 3.5}, + {"matrix": [9, 5], "x": 11.75, "y": 3.5}, + {"matrix": [8, 3], "x": 12.75, "y": 3.5, "w": 2.25}, + {"matrix": [4, 0], "x": 0, "y": 4.5, "w": 2.25}, + {"matrix": [4, 2], "x": 2.25, "y": 4.5}, + {"matrix": [4, 3], "x": 3.25, "y": 4.5}, + {"matrix": [4, 4], "x": 4.25, "y": 4.5}, + {"matrix": [4, 5], "x": 5.25, "y": 4.5}, + {"matrix": [4, 6], "x": 6.25, "y": 4.5}, + {"matrix": [4, 7], "x": 7.25, "y": 4.5}, + {"matrix": [4, 8], "x": 8.25, "y": 4.5}, + {"matrix": [10, 8], "x": 9.25, "y": 4.5}, + {"matrix": [10, 7], "x": 10.25, "y": 4.5}, + {"matrix": [10, 5], "x": 11.25, "y": 4.5}, + {"matrix": [10, 4], "x": 12.25, "y": 4.5, "w": 2.75}, + {"matrix": [9, 2], "x": 16.25, "y": 4.5}, + {"matrix": [5, 0], "x": 0, "y": 5.5, "w": 1.5}, + {"matrix": [5, 1], "x": 1.5, "y": 5.5}, + {"matrix": [5, 2], "x": 2.5, "y": 5.5, "w": 1.5}, + {"matrix": [5, 6], "x": 4, "y": 5.5, "w": 7}, + {"matrix": [5, 7], "x": 11, "y": 5.5, "w": 1.5}, + {"matrix": [5, 4], "x": 12.5, "y": 5.5}, + {"matrix": [5, 3], "x": 13.5, "y": 5.5, "w": 1.5}, + {"matrix": [10, 6], "x": 15.25, "y": 5.5}, + {"matrix": [10, 2], "x": 16.25, "y": 5.5}, + {"matrix": [10, 1], "x": 17.25, "y": 5.5} + ] + }, + "LAYOUT_tkl_ansi_tsangan_split_bs_rshift": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0}, + {"matrix": [0, 2], "x": 2, "y": 0}, + {"matrix": [0, 3], "x": 3, "y": 0}, + {"matrix": [0, 4], "x": 4, "y": 0}, + {"matrix": [0, 5], "x": 5, "y": 0}, + {"matrix": [0, 6], "x": 6.5, "y": 0}, + {"matrix": [0, 7], "x": 7.5, "y": 0}, + {"matrix": [0, 8], "x": 8.5, "y": 0}, + {"matrix": [6, 8], "x": 9.5, "y": 0}, + {"matrix": [6, 7], "x": 11, "y": 0}, + {"matrix": [6, 5], "x": 12, "y": 0}, + {"matrix": [6, 4], "x": 13, "y": 0}, + {"matrix": [6, 3], "x": 14, "y": 0}, + {"matrix": [6, 6], "x": 15.25, "y": 0}, + {"matrix": [6, 2], "x": 16.25, "y": 0}, + {"matrix": [6, 1], "x": 17.25, "y": 0}, + {"matrix": [1, 0], "x": 0, "y": 1.5}, + {"matrix": [1, 1], "x": 1, "y": 1.5}, + {"matrix": [1, 2], "x": 2, "y": 1.5}, + {"matrix": [1, 3], "x": 3, "y": 1.5}, + {"matrix": [1, 4], "x": 4, "y": 1.5}, + {"matrix": [1, 5], "x": 5, "y": 1.5}, + {"matrix": [1, 6], "x": 6, "y": 1.5}, + {"matrix": [1, 7], "x": 7, "y": 1.5}, + {"matrix": [1, 8], "x": 8, "y": 1.5}, + {"matrix": [7, 8], "x": 9, "y": 1.5}, + {"matrix": [7, 0], "x": 10, "y": 1.5}, + {"matrix": [7, 7], "x": 11, "y": 1.5}, + {"matrix": [7, 5], "x": 12, "y": 1.5}, + {"matrix": [7, 4], "x": 13, "y": 1.5}, + {"matrix": [7, 3], "x": 14, "y": 1.5}, + {"matrix": [7, 6], "x": 15.25, "y": 1.5}, + {"matrix": [7, 2], "x": 16.25, "y": 1.5}, + {"matrix": [7, 1], "x": 17.25, "y": 1.5}, + {"matrix": [2, 0], "x": 0, "y": 2.5, "w": 1.5}, + {"matrix": [2, 1], "x": 1.5, "y": 2.5}, + {"matrix": [2, 2], "x": 2.5, "y": 2.5}, + {"matrix": [2, 3], "x": 3.5, "y": 2.5}, + {"matrix": [2, 4], "x": 4.5, "y": 2.5}, + {"matrix": [2, 5], "x": 5.5, "y": 2.5}, + {"matrix": [2, 6], "x": 6.5, "y": 2.5}, + {"matrix": [2, 7], "x": 7.5, "y": 2.5}, + {"matrix": [2, 8], "x": 8.5, "y": 2.5}, + {"matrix": [8, 8], "x": 9.5, "y": 2.5}, + {"matrix": [8, 7], "x": 10.5, "y": 2.5}, + {"matrix": [8, 5], "x": 11.5, "y": 2.5}, + {"matrix": [8, 4], "x": 12.5, "y": 2.5}, + {"matrix": [9, 4], "x": 13.5, "y": 2.5, "w": 1.5}, + {"matrix": [8, 6], "x": 15.25, "y": 2.5}, + {"matrix": [8, 2], "x": 16.25, "y": 2.5}, + {"matrix": [8, 1], "x": 17.25, "y": 2.5}, + {"matrix": [3, 0], "x": 0, "y": 3.5, "w": 1.75}, + {"matrix": [3, 1], "x": 1.75, "y": 3.5}, + {"matrix": [3, 2], "x": 2.75, "y": 3.5}, + {"matrix": [3, 3], "x": 3.75, "y": 3.5}, + {"matrix": [3, 4], "x": 4.75, "y": 3.5}, + {"matrix": [3, 5], "x": 5.75, "y": 3.5}, + {"matrix": [3, 6], "x": 6.75, "y": 3.5}, + {"matrix": [3, 7], "x": 7.75, "y": 3.5}, + {"matrix": [3, 8], "x": 8.75, "y": 3.5}, + {"matrix": [9, 8], "x": 9.75, "y": 3.5}, + {"matrix": [9, 7], "x": 10.75, "y": 3.5}, + {"matrix": [9, 5], "x": 11.75, "y": 3.5}, + {"matrix": [8, 3], "x": 12.75, "y": 3.5, "w": 2.25}, + {"matrix": [4, 0], "x": 0, "y": 4.5, "w": 2.25}, + {"matrix": [4, 2], "x": 2.25, "y": 4.5}, + {"matrix": [4, 3], "x": 3.25, "y": 4.5}, + {"matrix": [4, 4], "x": 4.25, "y": 4.5}, + {"matrix": [4, 5], "x": 5.25, "y": 4.5}, + {"matrix": [4, 6], "x": 6.25, "y": 4.5}, + {"matrix": [4, 7], "x": 7.25, "y": 4.5}, + {"matrix": [4, 8], "x": 8.25, "y": 4.5}, + {"matrix": [10, 8], "x": 9.25, "y": 4.5}, + {"matrix": [10, 7], "x": 10.25, "y": 4.5}, + {"matrix": [10, 5], "x": 11.25, "y": 4.5}, + {"matrix": [10, 4], "x": 12.25, "y": 4.5, "w": 1.75}, + {"matrix": [10, 3], "x": 14, "y": 4.5}, + {"matrix": [9, 2], "x": 16.25, "y": 4.5}, + {"matrix": [5, 0], "x": 0, "y": 5.5, "w": 1.5}, + {"matrix": [5, 1], "x": 1.5, "y": 5.5}, + {"matrix": [5, 2], "x": 2.5, "y": 5.5, "w": 1.5}, + {"matrix": [5, 6], "x": 4, "y": 5.5, "w": 7}, + {"matrix": [5, 7], "x": 11, "y": 5.5, "w": 1.5}, + {"matrix": [5, 4], "x": 12.5, "y": 5.5}, + {"matrix": [5, 3], "x": 13.5, "y": 5.5, "w": 1.5}, + {"matrix": [10, 6], "x": 15.25, "y": 5.5}, + {"matrix": [10, 2], "x": 16.25, "y": 5.5}, + {"matrix": [10, 1], "x": 17.25, "y": 5.5} + ] + }, + "LAYOUT_tkl_ansi_wkl": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0}, + {"matrix": [0, 2], "x": 2, "y": 0}, + {"matrix": [0, 3], "x": 3, "y": 0}, + {"matrix": [0, 4], "x": 4, "y": 0}, + {"matrix": [0, 5], "x": 5, "y": 0}, + {"matrix": [0, 6], "x": 6.5, "y": 0}, + {"matrix": [0, 7], "x": 7.5, "y": 0}, + {"matrix": [0, 8], "x": 8.5, "y": 0}, + {"matrix": [6, 8], "x": 9.5, "y": 0}, + {"matrix": [6, 7], "x": 11, "y": 0}, + {"matrix": [6, 5], "x": 12, "y": 0}, + {"matrix": [6, 4], "x": 13, "y": 0}, + {"matrix": [6, 3], "x": 14, "y": 0}, + {"matrix": [6, 6], "x": 15.25, "y": 0}, + {"matrix": [6, 2], "x": 16.25, "y": 0}, + {"matrix": [6, 1], "x": 17.25, "y": 0}, + {"matrix": [1, 0], "x": 0, "y": 1.5}, + {"matrix": [1, 1], "x": 1, "y": 1.5}, + {"matrix": [1, 2], "x": 2, "y": 1.5}, + {"matrix": [1, 3], "x": 3, "y": 1.5}, + {"matrix": [1, 4], "x": 4, "y": 1.5}, + {"matrix": [1, 5], "x": 5, "y": 1.5}, + {"matrix": [1, 6], "x": 6, "y": 1.5}, + {"matrix": [1, 7], "x": 7, "y": 1.5}, + {"matrix": [1, 8], "x": 8, "y": 1.5}, + {"matrix": [7, 8], "x": 9, "y": 1.5}, + {"matrix": [7, 0], "x": 10, "y": 1.5}, + {"matrix": [7, 7], "x": 11, "y": 1.5}, + {"matrix": [7, 5], "x": 12, "y": 1.5}, + {"matrix": [7, 3], "x": 13, "y": 1.5, "w": 2}, + {"matrix": [7, 6], "x": 15.25, "y": 1.5}, + {"matrix": [7, 2], "x": 16.25, "y": 1.5}, + {"matrix": [7, 1], "x": 17.25, "y": 1.5}, + {"matrix": [2, 0], "x": 0, "y": 2.5, "w": 1.5}, + {"matrix": [2, 1], "x": 1.5, "y": 2.5}, + {"matrix": [2, 2], "x": 2.5, "y": 2.5}, + {"matrix": [2, 3], "x": 3.5, "y": 2.5}, + {"matrix": [2, 4], "x": 4.5, "y": 2.5}, + {"matrix": [2, 5], "x": 5.5, "y": 2.5}, + {"matrix": [2, 6], "x": 6.5, "y": 2.5}, + {"matrix": [2, 7], "x": 7.5, "y": 2.5}, + {"matrix": [2, 8], "x": 8.5, "y": 2.5}, + {"matrix": [8, 8], "x": 9.5, "y": 2.5}, + {"matrix": [8, 7], "x": 10.5, "y": 2.5}, + {"matrix": [8, 5], "x": 11.5, "y": 2.5}, + {"matrix": [8, 4], "x": 12.5, "y": 2.5}, + {"matrix": [9, 4], "x": 13.5, "y": 2.5, "w": 1.5}, + {"matrix": [8, 6], "x": 15.25, "y": 2.5}, + {"matrix": [8, 2], "x": 16.25, "y": 2.5}, + {"matrix": [8, 1], "x": 17.25, "y": 2.5}, + {"matrix": [3, 0], "x": 0, "y": 3.5, "w": 1.75}, + {"matrix": [3, 1], "x": 1.75, "y": 3.5}, + {"matrix": [3, 2], "x": 2.75, "y": 3.5}, + {"matrix": [3, 3], "x": 3.75, "y": 3.5}, + {"matrix": [3, 4], "x": 4.75, "y": 3.5}, + {"matrix": [3, 5], "x": 5.75, "y": 3.5}, + {"matrix": [3, 6], "x": 6.75, "y": 3.5}, + {"matrix": [3, 7], "x": 7.75, "y": 3.5}, + {"matrix": [3, 8], "x": 8.75, "y": 3.5}, + {"matrix": [9, 8], "x": 9.75, "y": 3.5}, + {"matrix": [9, 7], "x": 10.75, "y": 3.5}, + {"matrix": [9, 5], "x": 11.75, "y": 3.5}, + {"matrix": [8, 3], "x": 12.75, "y": 3.5, "w": 2.25}, + {"matrix": [4, 0], "x": 0, "y": 4.5, "w": 2.25}, + {"matrix": [4, 2], "x": 2.25, "y": 4.5}, + {"matrix": [4, 3], "x": 3.25, "y": 4.5}, + {"matrix": [4, 4], "x": 4.25, "y": 4.5}, + {"matrix": [4, 5], "x": 5.25, "y": 4.5}, + {"matrix": [4, 6], "x": 6.25, "y": 4.5}, + {"matrix": [4, 7], "x": 7.25, "y": 4.5}, + {"matrix": [4, 8], "x": 8.25, "y": 4.5}, + {"matrix": [10, 8], "x": 9.25, "y": 4.5}, + {"matrix": [10, 7], "x": 10.25, "y": 4.5}, + {"matrix": [10, 5], "x": 11.25, "y": 4.5}, + {"matrix": [10, 4], "x": 12.25, "y": 4.5, "w": 2.75}, + {"matrix": [9, 2], "x": 16.25, "y": 4.5}, + {"matrix": [5, 0], "x": 0, "y": 5.5, "w": 1.5}, + {"matrix": [5, 2], "x": 2.5, "y": 5.5, "w": 1.5}, + {"matrix": [5, 6], "x": 4, "y": 5.5, "w": 7}, + {"matrix": [5, 7], "x": 11, "y": 5.5, "w": 1.5}, + {"matrix": [5, 3], "x": 13.5, "y": 5.5, "w": 1.5}, + {"matrix": [10, 6], "x": 15.25, "y": 5.5}, + {"matrix": [10, 2], "x": 16.25, "y": 5.5}, + {"matrix": [10, 1], "x": 17.25, "y": 5.5} + ] + }, + "LAYOUT_tkl_ansi_wkl_split_bs_rshift": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0}, + {"matrix": [0, 2], "x": 2, "y": 0}, + {"matrix": [0, 3], "x": 3, "y": 0}, + {"matrix": [0, 4], "x": 4, "y": 0}, + {"matrix": [0, 5], "x": 5, "y": 0}, + {"matrix": [0, 6], "x": 6.5, "y": 0}, + {"matrix": [0, 7], "x": 7.5, "y": 0}, + {"matrix": [0, 8], "x": 8.5, "y": 0}, + {"matrix": [6, 8], "x": 9.5, "y": 0}, + {"matrix": [6, 7], "x": 11, "y": 0}, + {"matrix": [6, 5], "x": 12, "y": 0}, + {"matrix": [6, 4], "x": 13, "y": 0}, + {"matrix": [6, 3], "x": 14, "y": 0}, + {"matrix": [6, 6], "x": 15.25, "y": 0}, + {"matrix": [6, 2], "x": 16.25, "y": 0}, + {"matrix": [6, 1], "x": 17.25, "y": 0}, + {"matrix": [1, 0], "x": 0, "y": 1.5}, + {"matrix": [1, 1], "x": 1, "y": 1.5}, + {"matrix": [1, 2], "x": 2, "y": 1.5}, + {"matrix": [1, 3], "x": 3, "y": 1.5}, + {"matrix": [1, 4], "x": 4, "y": 1.5}, + {"matrix": [1, 5], "x": 5, "y": 1.5}, + {"matrix": [1, 6], "x": 6, "y": 1.5}, + {"matrix": [1, 7], "x": 7, "y": 1.5}, + {"matrix": [1, 8], "x": 8, "y": 1.5}, + {"matrix": [7, 8], "x": 9, "y": 1.5}, + {"matrix": [7, 0], "x": 10, "y": 1.5}, + {"matrix": [7, 7], "x": 11, "y": 1.5}, + {"matrix": [7, 5], "x": 12, "y": 1.5}, + {"matrix": [7, 4], "x": 13, "y": 1.5}, + {"matrix": [7, 3], "x": 14, "y": 1.5}, + {"matrix": [7, 6], "x": 15.25, "y": 1.5}, + {"matrix": [7, 2], "x": 16.25, "y": 1.5}, + {"matrix": [7, 1], "x": 17.25, "y": 1.5}, + {"matrix": [2, 0], "x": 0, "y": 2.5, "w": 1.5}, + {"matrix": [2, 1], "x": 1.5, "y": 2.5}, + {"matrix": [2, 2], "x": 2.5, "y": 2.5}, + {"matrix": [2, 3], "x": 3.5, "y": 2.5}, + {"matrix": [2, 4], "x": 4.5, "y": 2.5}, + {"matrix": [2, 5], "x": 5.5, "y": 2.5}, + {"matrix": [2, 6], "x": 6.5, "y": 2.5}, + {"matrix": [2, 7], "x": 7.5, "y": 2.5}, + {"matrix": [2, 8], "x": 8.5, "y": 2.5}, + {"matrix": [8, 8], "x": 9.5, "y": 2.5}, + {"matrix": [8, 7], "x": 10.5, "y": 2.5}, + {"matrix": [8, 5], "x": 11.5, "y": 2.5}, + {"matrix": [8, 4], "x": 12.5, "y": 2.5}, + {"matrix": [9, 4], "x": 13.5, "y": 2.5, "w": 1.5}, + {"matrix": [8, 6], "x": 15.25, "y": 2.5}, + {"matrix": [8, 2], "x": 16.25, "y": 2.5}, + {"matrix": [8, 1], "x": 17.25, "y": 2.5}, + {"matrix": [3, 0], "x": 0, "y": 3.5, "w": 1.75}, + {"matrix": [3, 1], "x": 1.75, "y": 3.5}, + {"matrix": [3, 2], "x": 2.75, "y": 3.5}, + {"matrix": [3, 3], "x": 3.75, "y": 3.5}, + {"matrix": [3, 4], "x": 4.75, "y": 3.5}, + {"matrix": [3, 5], "x": 5.75, "y": 3.5}, + {"matrix": [3, 6], "x": 6.75, "y": 3.5}, + {"matrix": [3, 7], "x": 7.75, "y": 3.5}, + {"matrix": [3, 8], "x": 8.75, "y": 3.5}, + {"matrix": [9, 8], "x": 9.75, "y": 3.5}, + {"matrix": [9, 7], "x": 10.75, "y": 3.5}, + {"matrix": [9, 5], "x": 11.75, "y": 3.5}, + {"matrix": [8, 3], "x": 12.75, "y": 3.5, "w": 2.25}, + {"matrix": [4, 0], "x": 0, "y": 4.5, "w": 2.25}, + {"matrix": [4, 2], "x": 2.25, "y": 4.5}, + {"matrix": [4, 3], "x": 3.25, "y": 4.5}, + {"matrix": [4, 4], "x": 4.25, "y": 4.5}, + {"matrix": [4, 5], "x": 5.25, "y": 4.5}, + {"matrix": [4, 6], "x": 6.25, "y": 4.5}, + {"matrix": [4, 7], "x": 7.25, "y": 4.5}, + {"matrix": [4, 8], "x": 8.25, "y": 4.5}, + {"matrix": [10, 8], "x": 9.25, "y": 4.5}, + {"matrix": [10, 7], "x": 10.25, "y": 4.5}, + {"matrix": [10, 5], "x": 11.25, "y": 4.5}, + {"matrix": [10, 4], "x": 12.25, "y": 4.5, "w": 1.75}, + {"matrix": [10, 3], "x": 14, "y": 4.5}, + {"matrix": [9, 2], "x": 16.25, "y": 4.5}, + {"matrix": [5, 0], "x": 0, "y": 5.5, "w": 1.5}, + {"matrix": [5, 2], "x": 2.5, "y": 5.5, "w": 1.5}, + {"matrix": [5, 6], "x": 4, "y": 5.5, "w": 7}, + {"matrix": [5, 7], "x": 11, "y": 5.5, "w": 1.5}, + {"matrix": [5, 3], "x": 13.5, "y": 5.5, "w": 1.5}, + {"matrix": [10, 6], "x": 15.25, "y": 5.5}, + {"matrix": [10, 2], "x": 16.25, "y": 5.5}, + {"matrix": [10, 1], "x": 17.25, "y": 5.5} + ] + }, + "LAYOUT_tkl_iso": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0}, + {"matrix": [0, 2], "x": 2, "y": 0}, + {"matrix": [0, 3], "x": 3, "y": 0}, + {"matrix": [0, 4], "x": 4, "y": 0}, + {"matrix": [0, 5], "x": 5, "y": 0}, + {"matrix": [0, 6], "x": 6.5, "y": 0}, + {"matrix": [0, 7], "x": 7.5, "y": 0}, + {"matrix": [0, 8], "x": 8.5, "y": 0}, + {"matrix": [6, 8], "x": 9.5, "y": 0}, + {"matrix": [6, 7], "x": 11, "y": 0}, + {"matrix": [6, 5], "x": 12, "y": 0}, + {"matrix": [6, 4], "x": 13, "y": 0}, + {"matrix": [6, 3], "x": 14, "y": 0}, + {"matrix": [6, 6], "x": 15.25, "y": 0}, + {"matrix": [6, 2], "x": 16.25, "y": 0}, + {"matrix": [6, 1], "x": 17.25, "y": 0}, + {"matrix": [1, 0], "x": 0, "y": 1.5}, + {"matrix": [1, 1], "x": 1, "y": 1.5}, + {"matrix": [1, 2], "x": 2, "y": 1.5}, + {"matrix": [1, 3], "x": 3, "y": 1.5}, + {"matrix": [1, 4], "x": 4, "y": 1.5}, + {"matrix": [1, 5], "x": 5, "y": 1.5}, + {"matrix": [1, 6], "x": 6, "y": 1.5}, + {"matrix": [1, 7], "x": 7, "y": 1.5}, + {"matrix": [1, 8], "x": 8, "y": 1.5}, + {"matrix": [7, 8], "x": 9, "y": 1.5}, + {"matrix": [7, 0], "x": 10, "y": 1.5}, + {"matrix": [7, 7], "x": 11, "y": 1.5}, + {"matrix": [7, 5], "x": 12, "y": 1.5}, + {"matrix": [7, 3], "x": 13, "y": 1.5, "w": 2}, + {"matrix": [7, 6], "x": 15.25, "y": 1.5}, + {"matrix": [7, 2], "x": 16.25, "y": 1.5}, + {"matrix": [7, 1], "x": 17.25, "y": 1.5}, + {"matrix": [2, 0], "x": 0, "y": 2.5, "w": 1.5}, + {"matrix": [2, 1], "x": 1.5, "y": 2.5}, + {"matrix": [2, 2], "x": 2.5, "y": 2.5}, + {"matrix": [2, 3], "x": 3.5, "y": 2.5}, + {"matrix": [2, 4], "x": 4.5, "y": 2.5}, + {"matrix": [2, 5], "x": 5.5, "y": 2.5}, + {"matrix": [2, 6], "x": 6.5, "y": 2.5}, + {"matrix": [2, 7], "x": 7.5, "y": 2.5}, + {"matrix": [2, 8], "x": 8.5, "y": 2.5}, + {"matrix": [8, 8], "x": 9.5, "y": 2.5}, + {"matrix": [8, 7], "x": 10.5, "y": 2.5}, + {"matrix": [8, 5], "x": 11.5, "y": 2.5}, + {"matrix": [8, 4], "x": 12.5, "y": 2.5}, + {"matrix": [8, 6], "x": 15.25, "y": 2.5}, + {"matrix": [8, 2], "x": 16.25, "y": 2.5}, + {"matrix": [8, 1], "x": 17.25, "y": 2.5}, + {"matrix": [3, 0], "x": 0, "y": 3.5, "w": 1.75}, + {"matrix": [3, 1], "x": 1.75, "y": 3.5}, + {"matrix": [3, 2], "x": 2.75, "y": 3.5}, + {"matrix": [3, 3], "x": 3.75, "y": 3.5}, + {"matrix": [3, 4], "x": 4.75, "y": 3.5}, + {"matrix": [3, 5], "x": 5.75, "y": 3.5}, + {"matrix": [3, 6], "x": 6.75, "y": 3.5}, + {"matrix": [3, 7], "x": 7.75, "y": 3.5}, + {"matrix": [3, 8], "x": 8.75, "y": 3.5}, + {"matrix": [9, 8], "x": 9.75, "y": 3.5}, + {"matrix": [9, 7], "x": 10.75, "y": 3.5}, + {"matrix": [9, 5], "x": 11.75, "y": 3.5}, + {"matrix": [9, 4], "x": 12.75, "y": 3.5}, + {"matrix": [8, 3], "x": 13.75, "y": 2.5, "w": 1.25, "h": 2}, + {"matrix": [4, 0], "x": 0, "y": 4.5, "w": 1.25}, + {"matrix": [4, 1], "x": 1.25, "y": 4.5}, + {"matrix": [4, 2], "x": 2.25, "y": 4.5}, + {"matrix": [4, 3], "x": 3.25, "y": 4.5}, + {"matrix": [4, 4], "x": 4.25, "y": 4.5}, + {"matrix": [4, 5], "x": 5.25, "y": 4.5}, + {"matrix": [4, 6], "x": 6.25, "y": 4.5}, + {"matrix": [4, 7], "x": 7.25, "y": 4.5}, + {"matrix": [4, 8], "x": 8.25, "y": 4.5}, + {"matrix": [10, 8], "x": 9.25, "y": 4.5}, + {"matrix": [10, 7], "x": 10.25, "y": 4.5}, + {"matrix": [10, 5], "x": 11.25, "y": 4.5}, + {"matrix": [10, 4], "x": 12.25, "y": 4.5, "w": 2.75}, + {"matrix": [9, 2], "x": 16.25, "y": 4.5}, + {"matrix": [5, 0], "x": 0, "y": 5.5, "w": 1.25}, + {"matrix": [5, 1], "x": 1.25, "y": 5.5, "w": 1.25}, + {"matrix": [5, 2], "x": 2.5, "y": 5.5, "w": 1.25}, + {"matrix": [5, 6], "x": 3.75, "y": 5.5, "w": 6.25}, + {"matrix": [5, 8], "x": 10, "y": 5.5, "w": 1.25}, + {"matrix": [5, 7], "x": 11.25, "y": 5.5, "w": 1.25}, + {"matrix": [5, 4], "x": 12.5, "y": 5.5, "w": 1.25}, + {"matrix": [5, 3], "x": 13.75, "y": 5.5, "w": 1.25}, + {"matrix": [10, 6], "x": 15.25, "y": 5.5}, + {"matrix": [10, 2], "x": 16.25, "y": 5.5}, + {"matrix": [10, 1], "x": 17.25, "y": 5.5} + ] + }, + "LAYOUT_tkl_iso_split_bs_rshift": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0}, + {"matrix": [0, 2], "x": 2, "y": 0}, + {"matrix": [0, 3], "x": 3, "y": 0}, + {"matrix": [0, 4], "x": 4, "y": 0}, + {"matrix": [0, 5], "x": 5, "y": 0}, + {"matrix": [0, 6], "x": 6.5, "y": 0}, + {"matrix": [0, 7], "x": 7.5, "y": 0}, + {"matrix": [0, 8], "x": 8.5, "y": 0}, + {"matrix": [6, 8], "x": 9.5, "y": 0}, + {"matrix": [6, 7], "x": 11, "y": 0}, + {"matrix": [6, 5], "x": 12, "y": 0}, + {"matrix": [6, 4], "x": 13, "y": 0}, + {"matrix": [6, 3], "x": 14, "y": 0}, + {"matrix": [6, 6], "x": 15.25, "y": 0}, + {"matrix": [6, 2], "x": 16.25, "y": 0}, + {"matrix": [6, 1], "x": 17.25, "y": 0}, + {"matrix": [1, 0], "x": 0, "y": 1.5}, + {"matrix": [1, 1], "x": 1, "y": 1.5}, + {"matrix": [1, 2], "x": 2, "y": 1.5}, + {"matrix": [1, 3], "x": 3, "y": 1.5}, + {"matrix": [1, 4], "x": 4, "y": 1.5}, + {"matrix": [1, 5], "x": 5, "y": 1.5}, + {"matrix": [1, 6], "x": 6, "y": 1.5}, + {"matrix": [1, 7], "x": 7, "y": 1.5}, + {"matrix": [1, 8], "x": 8, "y": 1.5}, + {"matrix": [7, 8], "x": 9, "y": 1.5}, + {"matrix": [7, 0], "x": 10, "y": 1.5}, + {"matrix": [7, 7], "x": 11, "y": 1.5}, + {"matrix": [7, 5], "x": 12, "y": 1.5}, + {"matrix": [7, 4], "x": 13, "y": 1.5}, + {"matrix": [7, 3], "x": 14, "y": 1.5}, + {"matrix": [7, 6], "x": 15.25, "y": 1.5}, + {"matrix": [7, 2], "x": 16.25, "y": 1.5}, + {"matrix": [7, 1], "x": 17.25, "y": 1.5}, + {"matrix": [2, 0], "x": 0, "y": 2.5, "w": 1.5}, + {"matrix": [2, 1], "x": 1.5, "y": 2.5}, + {"matrix": [2, 2], "x": 2.5, "y": 2.5}, + {"matrix": [2, 3], "x": 3.5, "y": 2.5}, + {"matrix": [2, 4], "x": 4.5, "y": 2.5}, + {"matrix": [2, 5], "x": 5.5, "y": 2.5}, + {"matrix": [2, 6], "x": 6.5, "y": 2.5}, + {"matrix": [2, 7], "x": 7.5, "y": 2.5}, + {"matrix": [2, 8], "x": 8.5, "y": 2.5}, + {"matrix": [8, 8], "x": 9.5, "y": 2.5}, + {"matrix": [8, 7], "x": 10.5, "y": 2.5}, + {"matrix": [8, 5], "x": 11.5, "y": 2.5}, + {"matrix": [8, 4], "x": 12.5, "y": 2.5}, + {"matrix": [8, 6], "x": 15.25, "y": 2.5}, + {"matrix": [8, 2], "x": 16.25, "y": 2.5}, + {"matrix": [8, 1], "x": 17.25, "y": 2.5}, + {"matrix": [3, 0], "x": 0, "y": 3.5, "w": 1.75}, + {"matrix": [3, 1], "x": 1.75, "y": 3.5}, + {"matrix": [3, 2], "x": 2.75, "y": 3.5}, + {"matrix": [3, 3], "x": 3.75, "y": 3.5}, + {"matrix": [3, 4], "x": 4.75, "y": 3.5}, + {"matrix": [3, 5], "x": 5.75, "y": 3.5}, + {"matrix": [3, 6], "x": 6.75, "y": 3.5}, + {"matrix": [3, 7], "x": 7.75, "y": 3.5}, + {"matrix": [3, 8], "x": 8.75, "y": 3.5}, + {"matrix": [9, 8], "x": 9.75, "y": 3.5}, + {"matrix": [9, 7], "x": 10.75, "y": 3.5}, + {"matrix": [9, 5], "x": 11.75, "y": 3.5}, + {"matrix": [9, 4], "x": 12.75, "y": 3.5}, + {"matrix": [8, 3], "x": 13.75, "y": 2.5, "w": 1.25, "h": 2}, + {"matrix": [4, 0], "x": 0, "y": 4.5, "w": 1.25}, + {"matrix": [4, 1], "x": 1.25, "y": 4.5}, + {"matrix": [4, 2], "x": 2.25, "y": 4.5}, + {"matrix": [4, 3], "x": 3.25, "y": 4.5}, + {"matrix": [4, 4], "x": 4.25, "y": 4.5}, + {"matrix": [4, 5], "x": 5.25, "y": 4.5}, + {"matrix": [4, 6], "x": 6.25, "y": 4.5}, + {"matrix": [4, 7], "x": 7.25, "y": 4.5}, + {"matrix": [4, 8], "x": 8.25, "y": 4.5}, + {"matrix": [10, 8], "x": 9.25, "y": 4.5}, + {"matrix": [10, 7], "x": 10.25, "y": 4.5}, + {"matrix": [10, 5], "x": 11.25, "y": 4.5}, + {"matrix": [10, 4], "x": 12.25, "y": 4.5, "w": 1.75}, + {"matrix": [10, 3], "x": 14, "y": 4.5}, + {"matrix": [9, 2], "x": 16.25, "y": 4.5}, + {"matrix": [5, 0], "x": 0, "y": 5.5, "w": 1.25}, + {"matrix": [5, 1], "x": 1.25, "y": 5.5, "w": 1.25}, + {"matrix": [5, 2], "x": 2.5, "y": 5.5, "w": 1.25}, + {"matrix": [5, 6], "x": 3.75, "y": 5.5, "w": 6.25}, + {"matrix": [5, 8], "x": 10, "y": 5.5, "w": 1.25}, + {"matrix": [5, 7], "x": 11.25, "y": 5.5, "w": 1.25}, + {"matrix": [5, 4], "x": 12.5, "y": 5.5, "w": 1.25}, + {"matrix": [5, 3], "x": 13.75, "y": 5.5, "w": 1.25}, + {"matrix": [10, 6], "x": 15.25, "y": 5.5}, + {"matrix": [10, 2], "x": 16.25, "y": 5.5}, + {"matrix": [10, 1], "x": 17.25, "y": 5.5} + ] + }, + "LAYOUT_tkl_iso_tsangan": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0}, + {"matrix": [0, 2], "x": 2, "y": 0}, + {"matrix": [0, 3], "x": 3, "y": 0}, + {"matrix": [0, 4], "x": 4, "y": 0}, + {"matrix": [0, 5], "x": 5, "y": 0}, + {"matrix": [0, 6], "x": 6.5, "y": 0}, + {"matrix": [0, 7], "x": 7.5, "y": 0}, + {"matrix": [0, 8], "x": 8.5, "y": 0}, + {"matrix": [6, 8], "x": 9.5, "y": 0}, + {"matrix": [6, 7], "x": 11, "y": 0}, + {"matrix": [6, 5], "x": 12, "y": 0}, + {"matrix": [6, 4], "x": 13, "y": 0}, + {"matrix": [6, 3], "x": 14, "y": 0}, + {"matrix": [6, 6], "x": 15.25, "y": 0}, + {"matrix": [6, 2], "x": 16.25, "y": 0}, + {"matrix": [6, 1], "x": 17.25, "y": 0}, + {"matrix": [1, 0], "x": 0, "y": 1.5}, + {"matrix": [1, 1], "x": 1, "y": 1.5}, + {"matrix": [1, 2], "x": 2, "y": 1.5}, + {"matrix": [1, 3], "x": 3, "y": 1.5}, + {"matrix": [1, 4], "x": 4, "y": 1.5}, + {"matrix": [1, 5], "x": 5, "y": 1.5}, + {"matrix": [1, 6], "x": 6, "y": 1.5}, + {"matrix": [1, 7], "x": 7, "y": 1.5}, + {"matrix": [1, 8], "x": 8, "y": 1.5}, + {"matrix": [7, 8], "x": 9, "y": 1.5}, + {"matrix": [7, 0], "x": 10, "y": 1.5}, + {"matrix": [7, 7], "x": 11, "y": 1.5}, + {"matrix": [7, 5], "x": 12, "y": 1.5}, + {"matrix": [7, 3], "x": 13, "y": 1.5, "w": 2}, + {"matrix": [7, 6], "x": 15.25, "y": 1.5}, + {"matrix": [7, 2], "x": 16.25, "y": 1.5}, + {"matrix": [7, 1], "x": 17.25, "y": 1.5}, + {"matrix": [2, 0], "x": 0, "y": 2.5, "w": 1.5}, + {"matrix": [2, 1], "x": 1.5, "y": 2.5}, + {"matrix": [2, 2], "x": 2.5, "y": 2.5}, + {"matrix": [2, 3], "x": 3.5, "y": 2.5}, + {"matrix": [2, 4], "x": 4.5, "y": 2.5}, + {"matrix": [2, 5], "x": 5.5, "y": 2.5}, + {"matrix": [2, 6], "x": 6.5, "y": 2.5}, + {"matrix": [2, 7], "x": 7.5, "y": 2.5}, + {"matrix": [2, 8], "x": 8.5, "y": 2.5}, + {"matrix": [8, 8], "x": 9.5, "y": 2.5}, + {"matrix": [8, 7], "x": 10.5, "y": 2.5}, + {"matrix": [8, 5], "x": 11.5, "y": 2.5}, + {"matrix": [8, 4], "x": 12.5, "y": 2.5}, + {"matrix": [8, 6], "x": 15.25, "y": 2.5}, + {"matrix": [8, 2], "x": 16.25, "y": 2.5}, + {"matrix": [8, 1], "x": 17.25, "y": 2.5}, + {"matrix": [3, 0], "x": 0, "y": 3.5, "w": 1.75}, + {"matrix": [3, 1], "x": 1.75, "y": 3.5}, + {"matrix": [3, 2], "x": 2.75, "y": 3.5}, + {"matrix": [3, 3], "x": 3.75, "y": 3.5}, + {"matrix": [3, 4], "x": 4.75, "y": 3.5}, + {"matrix": [3, 5], "x": 5.75, "y": 3.5}, + {"matrix": [3, 6], "x": 6.75, "y": 3.5}, + {"matrix": [3, 7], "x": 7.75, "y": 3.5}, + {"matrix": [3, 8], "x": 8.75, "y": 3.5}, + {"matrix": [9, 8], "x": 9.75, "y": 3.5}, + {"matrix": [9, 7], "x": 10.75, "y": 3.5}, + {"matrix": [9, 5], "x": 11.75, "y": 3.5}, + {"matrix": [9, 4], "x": 12.75, "y": 3.5}, + {"matrix": [8, 3], "x": 13.75, "y": 2.5, "w": 1.25, "h": 2}, + {"matrix": [4, 0], "x": 0, "y": 4.5, "w": 1.25}, + {"matrix": [4, 1], "x": 1.25, "y": 4.5}, + {"matrix": [4, 2], "x": 2.25, "y": 4.5}, + {"matrix": [4, 3], "x": 3.25, "y": 4.5}, + {"matrix": [4, 4], "x": 4.25, "y": 4.5}, + {"matrix": [4, 5], "x": 5.25, "y": 4.5}, + {"matrix": [4, 6], "x": 6.25, "y": 4.5}, + {"matrix": [4, 7], "x": 7.25, "y": 4.5}, + {"matrix": [4, 8], "x": 8.25, "y": 4.5}, + {"matrix": [10, 8], "x": 9.25, "y": 4.5}, + {"matrix": [10, 7], "x": 10.25, "y": 4.5}, + {"matrix": [10, 5], "x": 11.25, "y": 4.5}, + {"matrix": [10, 4], "x": 12.25, "y": 4.5, "w": 2.75}, + {"matrix": [9, 2], "x": 16.25, "y": 4.5}, + {"matrix": [5, 0], "x": 0, "y": 5.5, "w": 1.5}, + {"matrix": [5, 1], "x": 1.5, "y": 5.5}, + {"matrix": [5, 2], "x": 2.5, "y": 5.5, "w": 1.5}, + {"matrix": [5, 6], "x": 4, "y": 5.5, "w": 7}, + {"matrix": [5, 7], "x": 11, "y": 5.5, "w": 1.5}, + {"matrix": [5, 4], "x": 12.5, "y": 5.5}, + {"matrix": [5, 3], "x": 13.5, "y": 5.5, "w": 1.5}, + {"matrix": [10, 6], "x": 15.25, "y": 5.5}, + {"matrix": [10, 2], "x": 16.25, "y": 5.5}, + {"matrix": [10, 1], "x": 17.25, "y": 5.5} + ] + }, + "LAYOUT_tkl_iso_tsangan_split_bs_rshift": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0}, + {"matrix": [0, 2], "x": 2, "y": 0}, + {"matrix": [0, 3], "x": 3, "y": 0}, + {"matrix": [0, 4], "x": 4, "y": 0}, + {"matrix": [0, 5], "x": 5, "y": 0}, + {"matrix": [0, 6], "x": 6.5, "y": 0}, + {"matrix": [0, 7], "x": 7.5, "y": 0}, + {"matrix": [0, 8], "x": 8.5, "y": 0}, + {"matrix": [6, 8], "x": 9.5, "y": 0}, + {"matrix": [6, 7], "x": 11, "y": 0}, + {"matrix": [6, 5], "x": 12, "y": 0}, + {"matrix": [6, 4], "x": 13, "y": 0}, + {"matrix": [6, 3], "x": 14, "y": 0}, + {"matrix": [6, 6], "x": 15.25, "y": 0}, + {"matrix": [6, 2], "x": 16.25, "y": 0}, + {"matrix": [6, 1], "x": 17.25, "y": 0}, + {"matrix": [1, 0], "x": 0, "y": 1.5}, + {"matrix": [1, 1], "x": 1, "y": 1.5}, + {"matrix": [1, 2], "x": 2, "y": 1.5}, + {"matrix": [1, 3], "x": 3, "y": 1.5}, + {"matrix": [1, 4], "x": 4, "y": 1.5}, + {"matrix": [1, 5], "x": 5, "y": 1.5}, + {"matrix": [1, 6], "x": 6, "y": 1.5}, + {"matrix": [1, 7], "x": 7, "y": 1.5}, + {"matrix": [1, 8], "x": 8, "y": 1.5}, + {"matrix": [7, 8], "x": 9, "y": 1.5}, + {"matrix": [7, 0], "x": 10, "y": 1.5}, + {"matrix": [7, 7], "x": 11, "y": 1.5}, + {"matrix": [7, 5], "x": 12, "y": 1.5}, + {"matrix": [7, 4], "x": 13, "y": 1.5}, + {"matrix": [7, 3], "x": 14, "y": 1.5}, + {"matrix": [7, 6], "x": 15.25, "y": 1.5}, + {"matrix": [7, 2], "x": 16.25, "y": 1.5}, + {"matrix": [7, 1], "x": 17.25, "y": 1.5}, + {"matrix": [2, 0], "x": 0, "y": 2.5, "w": 1.5}, + {"matrix": [2, 1], "x": 1.5, "y": 2.5}, + {"matrix": [2, 2], "x": 2.5, "y": 2.5}, + {"matrix": [2, 3], "x": 3.5, "y": 2.5}, + {"matrix": [2, 4], "x": 4.5, "y": 2.5}, + {"matrix": [2, 5], "x": 5.5, "y": 2.5}, + {"matrix": [2, 6], "x": 6.5, "y": 2.5}, + {"matrix": [2, 7], "x": 7.5, "y": 2.5}, + {"matrix": [2, 8], "x": 8.5, "y": 2.5}, + {"matrix": [8, 8], "x": 9.5, "y": 2.5}, + {"matrix": [8, 7], "x": 10.5, "y": 2.5}, + {"matrix": [8, 5], "x": 11.5, "y": 2.5}, + {"matrix": [8, 4], "x": 12.5, "y": 2.5}, + {"matrix": [8, 6], "x": 15.25, "y": 2.5}, + {"matrix": [8, 2], "x": 16.25, "y": 2.5}, + {"matrix": [8, 1], "x": 17.25, "y": 2.5}, + {"matrix": [3, 0], "x": 0, "y": 3.5, "w": 1.75}, + {"matrix": [3, 1], "x": 1.75, "y": 3.5}, + {"matrix": [3, 2], "x": 2.75, "y": 3.5}, + {"matrix": [3, 3], "x": 3.75, "y": 3.5}, + {"matrix": [3, 4], "x": 4.75, "y": 3.5}, + {"matrix": [3, 5], "x": 5.75, "y": 3.5}, + {"matrix": [3, 6], "x": 6.75, "y": 3.5}, + {"matrix": [3, 7], "x": 7.75, "y": 3.5}, + {"matrix": [3, 8], "x": 8.75, "y": 3.5}, + {"matrix": [9, 8], "x": 9.75, "y": 3.5}, + {"matrix": [9, 7], "x": 10.75, "y": 3.5}, + {"matrix": [9, 5], "x": 11.75, "y": 3.5}, + {"matrix": [9, 4], "x": 12.75, "y": 3.5}, + {"matrix": [8, 3], "x": 13.75, "y": 2.5, "w": 1.25, "h": 2}, + {"matrix": [4, 0], "x": 0, "y": 4.5, "w": 1.25}, + {"matrix": [4, 1], "x": 1.25, "y": 4.5}, + {"matrix": [4, 2], "x": 2.25, "y": 4.5}, + {"matrix": [4, 3], "x": 3.25, "y": 4.5}, + {"matrix": [4, 4], "x": 4.25, "y": 4.5}, + {"matrix": [4, 5], "x": 5.25, "y": 4.5}, + {"matrix": [4, 6], "x": 6.25, "y": 4.5}, + {"matrix": [4, 7], "x": 7.25, "y": 4.5}, + {"matrix": [4, 8], "x": 8.25, "y": 4.5}, + {"matrix": [10, 8], "x": 9.25, "y": 4.5}, + {"matrix": [10, 7], "x": 10.25, "y": 4.5}, + {"matrix": [10, 5], "x": 11.25, "y": 4.5}, + {"matrix": [10, 4], "x": 12.25, "y": 4.5, "w": 1.75}, + {"matrix": [10, 3], "x": 14, "y": 4.5}, + {"matrix": [9, 2], "x": 16.25, "y": 4.5}, + {"matrix": [5, 0], "x": 0, "y": 5.5, "w": 1.5}, + {"matrix": [5, 1], "x": 1.5, "y": 5.5}, + {"matrix": [5, 2], "x": 2.5, "y": 5.5, "w": 1.5}, + {"matrix": [5, 6], "x": 4, "y": 5.5, "w": 7}, + {"matrix": [5, 7], "x": 11, "y": 5.5, "w": 1.5}, + {"matrix": [5, 4], "x": 12.5, "y": 5.5}, + {"matrix": [5, 3], "x": 13.5, "y": 5.5, "w": 1.5}, + {"matrix": [10, 6], "x": 15.25, "y": 5.5}, + {"matrix": [10, 2], "x": 16.25, "y": 5.5}, + {"matrix": [10, 1], "x": 17.25, "y": 5.5} + ] + }, + "LAYOUT_tkl_iso_wkl": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0}, + {"matrix": [0, 2], "x": 2, "y": 0}, + {"matrix": [0, 3], "x": 3, "y": 0}, + {"matrix": [0, 4], "x": 4, "y": 0}, + {"matrix": [0, 5], "x": 5, "y": 0}, + {"matrix": [0, 6], "x": 6.5, "y": 0}, + {"matrix": [0, 7], "x": 7.5, "y": 0}, + {"matrix": [0, 8], "x": 8.5, "y": 0}, + {"matrix": [6, 8], "x": 9.5, "y": 0}, + {"matrix": [6, 7], "x": 11, "y": 0}, + {"matrix": [6, 5], "x": 12, "y": 0}, + {"matrix": [6, 4], "x": 13, "y": 0}, + {"matrix": [6, 3], "x": 14, "y": 0}, + {"matrix": [6, 6], "x": 15.25, "y": 0}, + {"matrix": [6, 2], "x": 16.25, "y": 0}, + {"matrix": [6, 1], "x": 17.25, "y": 0}, + {"matrix": [1, 0], "x": 0, "y": 1.5}, + {"matrix": [1, 1], "x": 1, "y": 1.5}, + {"matrix": [1, 2], "x": 2, "y": 1.5}, + {"matrix": [1, 3], "x": 3, "y": 1.5}, + {"matrix": [1, 4], "x": 4, "y": 1.5}, + {"matrix": [1, 5], "x": 5, "y": 1.5}, + {"matrix": [1, 6], "x": 6, "y": 1.5}, + {"matrix": [1, 7], "x": 7, "y": 1.5}, + {"matrix": [1, 8], "x": 8, "y": 1.5}, + {"matrix": [7, 8], "x": 9, "y": 1.5}, + {"matrix": [7, 0], "x": 10, "y": 1.5}, + {"matrix": [7, 7], "x": 11, "y": 1.5}, + {"matrix": [7, 5], "x": 12, "y": 1.5}, + {"matrix": [7, 3], "x": 13, "y": 1.5, "w": 2}, + {"matrix": [7, 6], "x": 15.25, "y": 1.5}, + {"matrix": [7, 2], "x": 16.25, "y": 1.5}, + {"matrix": [7, 1], "x": 17.25, "y": 1.5}, + {"matrix": [2, 0], "x": 0, "y": 2.5, "w": 1.5}, + {"matrix": [2, 1], "x": 1.5, "y": 2.5}, + {"matrix": [2, 2], "x": 2.5, "y": 2.5}, + {"matrix": [2, 3], "x": 3.5, "y": 2.5}, + {"matrix": [2, 4], "x": 4.5, "y": 2.5}, + {"matrix": [2, 5], "x": 5.5, "y": 2.5}, + {"matrix": [2, 6], "x": 6.5, "y": 2.5}, + {"matrix": [2, 7], "x": 7.5, "y": 2.5}, + {"matrix": [2, 8], "x": 8.5, "y": 2.5}, + {"matrix": [8, 8], "x": 9.5, "y": 2.5}, + {"matrix": [8, 7], "x": 10.5, "y": 2.5}, + {"matrix": [8, 5], "x": 11.5, "y": 2.5}, + {"matrix": [8, 4], "x": 12.5, "y": 2.5}, + {"matrix": [8, 6], "x": 15.25, "y": 2.5}, + {"matrix": [8, 2], "x": 16.25, "y": 2.5}, + {"matrix": [8, 1], "x": 17.25, "y": 2.5}, + {"matrix": [3, 0], "x": 0, "y": 3.5, "w": 1.75}, + {"matrix": [3, 1], "x": 1.75, "y": 3.5}, + {"matrix": [3, 2], "x": 2.75, "y": 3.5}, + {"matrix": [3, 3], "x": 3.75, "y": 3.5}, + {"matrix": [3, 4], "x": 4.75, "y": 3.5}, + {"matrix": [3, 5], "x": 5.75, "y": 3.5}, + {"matrix": [3, 6], "x": 6.75, "y": 3.5}, + {"matrix": [3, 7], "x": 7.75, "y": 3.5}, + {"matrix": [3, 8], "x": 8.75, "y": 3.5}, + {"matrix": [9, 8], "x": 9.75, "y": 3.5}, + {"matrix": [9, 7], "x": 10.75, "y": 3.5}, + {"matrix": [9, 5], "x": 11.75, "y": 3.5}, + {"matrix": [9, 4], "x": 12.75, "y": 3.5}, + {"matrix": [8, 3], "x": 13.75, "y": 2.5, "w": 1.25, "h": 2}, + {"matrix": [4, 0], "x": 0, "y": 4.5, "w": 1.25}, + {"matrix": [4, 1], "x": 1.25, "y": 4.5}, + {"matrix": [4, 2], "x": 2.25, "y": 4.5}, + {"matrix": [4, 3], "x": 3.25, "y": 4.5}, + {"matrix": [4, 4], "x": 4.25, "y": 4.5}, + {"matrix": [4, 5], "x": 5.25, "y": 4.5}, + {"matrix": [4, 6], "x": 6.25, "y": 4.5}, + {"matrix": [4, 7], "x": 7.25, "y": 4.5}, + {"matrix": [4, 8], "x": 8.25, "y": 4.5}, + {"matrix": [10, 8], "x": 9.25, "y": 4.5}, + {"matrix": [10, 7], "x": 10.25, "y": 4.5}, + {"matrix": [10, 5], "x": 11.25, "y": 4.5}, + {"matrix": [10, 4], "x": 12.25, "y": 4.5, "w": 2.75}, + {"matrix": [9, 2], "x": 16.25, "y": 4.5}, + {"matrix": [5, 0], "x": 0, "y": 5.5, "w": 1.5}, + {"matrix": [5, 2], "x": 2.5, "y": 5.5, "w": 1.5}, + {"matrix": [5, 6], "x": 4, "y": 5.5, "w": 7}, + {"matrix": [5, 7], "x": 11, "y": 5.5, "w": 1.5}, + {"matrix": [5, 3], "x": 13.5, "y": 5.5, "w": 1.5}, + {"matrix": [10, 6], "x": 15.25, "y": 5.5}, + {"matrix": [10, 2], "x": 16.25, "y": 5.5}, + {"matrix": [10, 1], "x": 17.25, "y": 5.5} + ] + }, + "LAYOUT_tkl_iso_wkl_split_bs_rshift": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0}, + {"matrix": [0, 2], "x": 2, "y": 0}, + {"matrix": [0, 3], "x": 3, "y": 0}, + {"matrix": [0, 4], "x": 4, "y": 0}, + {"matrix": [0, 5], "x": 5, "y": 0}, + {"matrix": [0, 6], "x": 6.5, "y": 0}, + {"matrix": [0, 7], "x": 7.5, "y": 0}, + {"matrix": [0, 8], "x": 8.5, "y": 0}, + {"matrix": [6, 8], "x": 9.5, "y": 0}, + {"matrix": [6, 7], "x": 11, "y": 0}, + {"matrix": [6, 5], "x": 12, "y": 0}, + {"matrix": [6, 4], "x": 13, "y": 0}, + {"matrix": [6, 3], "x": 14, "y": 0}, + {"matrix": [6, 6], "x": 15.25, "y": 0}, + {"matrix": [6, 2], "x": 16.25, "y": 0}, + {"matrix": [6, 1], "x": 17.25, "y": 0}, + {"matrix": [1, 0], "x": 0, "y": 1.5}, + {"matrix": [1, 1], "x": 1, "y": 1.5}, + {"matrix": [1, 2], "x": 2, "y": 1.5}, + {"matrix": [1, 3], "x": 3, "y": 1.5}, + {"matrix": [1, 4], "x": 4, "y": 1.5}, + {"matrix": [1, 5], "x": 5, "y": 1.5}, + {"matrix": [1, 6], "x": 6, "y": 1.5}, + {"matrix": [1, 7], "x": 7, "y": 1.5}, + {"matrix": [1, 8], "x": 8, "y": 1.5}, + {"matrix": [7, 8], "x": 9, "y": 1.5}, + {"matrix": [7, 0], "x": 10, "y": 1.5}, + {"matrix": [7, 7], "x": 11, "y": 1.5}, + {"matrix": [7, 5], "x": 12, "y": 1.5}, + {"matrix": [7, 4], "x": 13, "y": 1.5}, + {"matrix": [7, 3], "x": 14, "y": 1.5}, + {"matrix": [7, 6], "x": 15.25, "y": 1.5}, + {"matrix": [7, 2], "x": 16.25, "y": 1.5}, + {"matrix": [7, 1], "x": 17.25, "y": 1.5}, + {"matrix": [2, 0], "x": 0, "y": 2.5, "w": 1.5}, + {"matrix": [2, 1], "x": 1.5, "y": 2.5}, + {"matrix": [2, 2], "x": 2.5, "y": 2.5}, + {"matrix": [2, 3], "x": 3.5, "y": 2.5}, + {"matrix": [2, 4], "x": 4.5, "y": 2.5}, + {"matrix": [2, 5], "x": 5.5, "y": 2.5}, + {"matrix": [2, 6], "x": 6.5, "y": 2.5}, + {"matrix": [2, 7], "x": 7.5, "y": 2.5}, + {"matrix": [2, 8], "x": 8.5, "y": 2.5}, + {"matrix": [8, 8], "x": 9.5, "y": 2.5}, + {"matrix": [8, 7], "x": 10.5, "y": 2.5}, + {"matrix": [8, 5], "x": 11.5, "y": 2.5}, + {"matrix": [8, 4], "x": 12.5, "y": 2.5}, + {"matrix": [8, 6], "x": 15.25, "y": 2.5}, + {"matrix": [8, 2], "x": 16.25, "y": 2.5}, + {"matrix": [8, 1], "x": 17.25, "y": 2.5}, + {"matrix": [3, 0], "x": 0, "y": 3.5, "w": 1.75}, + {"matrix": [3, 1], "x": 1.75, "y": 3.5}, + {"matrix": [3, 2], "x": 2.75, "y": 3.5}, + {"matrix": [3, 3], "x": 3.75, "y": 3.5}, + {"matrix": [3, 4], "x": 4.75, "y": 3.5}, + {"matrix": [3, 5], "x": 5.75, "y": 3.5}, + {"matrix": [3, 6], "x": 6.75, "y": 3.5}, + {"matrix": [3, 7], "x": 7.75, "y": 3.5}, + {"matrix": [3, 8], "x": 8.75, "y": 3.5}, + {"matrix": [9, 8], "x": 9.75, "y": 3.5}, + {"matrix": [9, 7], "x": 10.75, "y": 3.5}, + {"matrix": [9, 5], "x": 11.75, "y": 3.5}, + {"matrix": [9, 4], "x": 12.75, "y": 3.5}, + {"matrix": [8, 3], "x": 13.75, "y": 2.5, "w": 1.25, "h": 2}, + {"matrix": [4, 0], "x": 0, "y": 4.5, "w": 1.25}, + {"matrix": [4, 1], "x": 1.25, "y": 4.5}, + {"matrix": [4, 2], "x": 2.25, "y": 4.5}, + {"matrix": [4, 3], "x": 3.25, "y": 4.5}, + {"matrix": [4, 4], "x": 4.25, "y": 4.5}, + {"matrix": [4, 5], "x": 5.25, "y": 4.5}, + {"matrix": [4, 6], "x": 6.25, "y": 4.5}, + {"matrix": [4, 7], "x": 7.25, "y": 4.5}, + {"matrix": [4, 8], "x": 8.25, "y": 4.5}, + {"matrix": [10, 8], "x": 9.25, "y": 4.5}, + {"matrix": [10, 7], "x": 10.25, "y": 4.5}, + {"matrix": [10, 5], "x": 11.25, "y": 4.5}, + {"matrix": [10, 4], "x": 12.25, "y": 4.5, "w": 1.75}, + {"matrix": [10, 3], "x": 14, "y": 4.5}, + {"matrix": [9, 2], "x": 16.25, "y": 4.5}, + {"matrix": [5, 0], "x": 0, "y": 5.5, "w": 1.5}, + {"matrix": [5, 2], "x": 2.5, "y": 5.5, "w": 1.5}, + {"matrix": [5, 6], "x": 4, "y": 5.5, "w": 7}, + {"matrix": [5, 7], "x": 11, "y": 5.5, "w": 1.5}, + {"matrix": [5, 3], "x": 13.5, "y": 5.5, "w": 1.5}, + {"matrix": [10, 6], "x": 15.25, "y": 5.5}, + {"matrix": [10, 2], "x": 16.25, "y": 5.5}, + {"matrix": [10, 1], "x": 17.25, "y": 5.5} + ] + } + } +} diff --git a/keyboards/mt/ncr80/solder/keymaps/default/keymap.c b/keyboards/mt/ncr80/r2/solder/keymaps/default/keymap.c index 8f9dda7826..8f9dda7826 100644 --- a/keyboards/mt/ncr80/solder/keymaps/default/keymap.c +++ b/keyboards/mt/ncr80/r2/solder/keymaps/default/keymap.c diff --git a/keyboards/mt/ncr80/solder/keymaps/default_tkl_ansi/keymap.c b/keyboards/mt/ncr80/r2/solder/keymaps/default_tkl_ansi/keymap.c index f5604db5f4..f5604db5f4 100644 --- a/keyboards/mt/ncr80/solder/keymaps/default_tkl_ansi/keymap.c +++ b/keyboards/mt/ncr80/r2/solder/keymaps/default_tkl_ansi/keymap.c diff --git a/keyboards/mt/ncr80/solder/keymaps/default_tkl_iso/keymap.c b/keyboards/mt/ncr80/r2/solder/keymaps/default_tkl_iso/keymap.c index b80c0f1d49..b80c0f1d49 100644 --- a/keyboards/mt/ncr80/solder/keymaps/default_tkl_iso/keymap.c +++ b/keyboards/mt/ncr80/r2/solder/keymaps/default_tkl_iso/keymap.c diff --git a/keyboards/mt/ncr80/solder/keymaps/via/keymap.c b/keyboards/mt/ncr80/r2/solder/keymaps/via/keymap.c index 493165c22f..66cdca8a71 100644 --- a/keyboards/mt/ncr80/solder/keymaps/via/keymap.c +++ b/keyboards/mt/ncr80/r2/solder/keymaps/via/keymap.c @@ -34,24 +34,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { BL_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, BL_DOWN, BL_UP, BL_STEP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_NUM, _______, _______, _______ - ), - - [2] = LAYOUT_all( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ - ), - - [3] = LAYOUT_all( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ - ), + ) }; diff --git a/keyboards/mt/ncr80/solder/keymaps/via/rules.mk b/keyboards/mt/ncr80/r2/solder/keymaps/via/rules.mk index 36b7ba9cbc..36b7ba9cbc 100644 --- a/keyboards/mt/ncr80/solder/keymaps/via/rules.mk +++ b/keyboards/mt/ncr80/r2/solder/keymaps/via/rules.mk diff --git a/keyboards/mt/ncr80/readme.md b/keyboards/mt/ncr80/readme.md index 210822f28e..1211efa720 100644 --- a/keyboards/mt/ncr80/readme.md +++ b/keyboards/mt/ncr80/readme.md @@ -6,11 +6,29 @@ NCR-80 is an affordable keyboard kit inspired by iconic vintage keyboards. -For more information, read the readme.md in soldered/ or hotswap/, depending on the version you are interested in. +* Keyboard Maintainer: QMK Community +* Hardware Supported: + * NCR-80 R2 PCBs (ATmega32U4, atmel-dfu) +* Hardware Availability: + * R2 Hotswap: [AliExpress](https://www.aliexpress.com/item/1005003345941543.html) [Taobao 淘宝](https://item.taobao.com/item.htm?id=657482028672) + * R2 Solder: [AliExpress](https://www.aliexpress.com/item/1005003364462523.html) [Taobao 淘宝](https://item.taobao.com/item.htm?id=657482028672) Make example for this keyboard (after setting up your build environment): - make ncr80/solder:default - make ncr80/hotswap:default + make mt/ncr80/r2/hotswap:default + make mt/ncr80/r2/solder:default -For more information, read the readme.md in [solder/](solder/) or [hotswap/](hotswap/), depending on the version you are interested in. +Flashing example for this keyboard: + + make mt/ncr80/r2/hotswap:default:flash + make mt/ncr80/r2/solder:default:flash + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). + +## Bootloader + +Enter the bootloader in 3 ways: + +* **Bootmagic reset**: Hold down the top left key and plug in the keyboard. This will also clear EEPROM, so it is a good first step if the keyboard is misbehaving. +* **Physical reset button**: Briefly press the button on the back of the PCB +* **Keycode in layout**: There is no key mapped to `QK_BOOT` in the pre-created keymaps, but you may assign this key in any keymaps you create. diff --git a/keyboards/mt/ncr80/rules.mk b/keyboards/mt/ncr80/rules.mk deleted file mode 100644 index 5ebd6454f6..0000000000 --- a/keyboards/mt/ncr80/rules.mk +++ /dev/null @@ -1 +0,0 @@ -DEFAULT_FOLDER = mt/ncr80/hotswap diff --git a/keyboards/mt/ncr80/solder/keyboard.json b/keyboards/mt/ncr80/solder/keyboard.json deleted file mode 100644 index fac59abadd..0000000000 --- a/keyboards/mt/ncr80/solder/keyboard.json +++ /dev/null @@ -1,352 +0,0 @@ -{ - "keyboard_name": "NCR-80", - "manufacturer": "NCR", - "url": "https://www.aliexpress.com/item/1005003364462523.html", - "maintainer": "qmk", - "usb": { - "vid": "0x4D54", - "pid": "0x2001", - "device_version": "0.0.1" - }, - "features": { - "bootmagic": true, - "mousekey": false, - "extrakey": true, - "nkro": true, - "backlight": true - }, - "matrix_pins": { - "cols": ["D0", "D1", "D2", "D3", "D5", "D4", "D6", "D7", "B4"], - "rows": ["E6", "B0", "B1", "B2", "B3", "B7", "F7", "F6", "F5", "F4", "F1"] - }, - "diode_direction": "ROW2COL", - "backlight": { - "pin": "B6", - "levels": 5 - }, - "indicators": { - "caps_lock": "C6", - "num_lock": "B5", - "scroll_lock": "C7", - "on_state": 0 - }, - "processor": "atmega32u4", - "bootloader": "atmel-dfu", - "layouts": { - "LAYOUT_all": { - "layout": [ - {"x": 0, "y": 0, "matrix": [0, 0]}, - - {"x": 2, "y": 0, "matrix": [0, 2]}, - {"x": 3, "y": 0, "matrix": [0, 3]}, - {"x": 4, "y": 0, "matrix": [0, 4]}, - {"x": 5, "y": 0, "matrix": [0, 5]}, - - {"x": 6.5, "y": 0, "matrix": [0, 6]}, - {"x": 7.5, "y": 0, "matrix": [0, 7]}, - {"x": 8.5, "y": 0, "matrix": [0, 8]}, - {"x": 9.5, "y": 0, "matrix": [6, 8]}, - - {"x": 11, "y": 0, "matrix": [6, 7]}, - {"x": 12, "y": 0, "matrix": [6, 5]}, - {"x": 13, "y": 0, "matrix": [6, 4]}, - {"x": 14, "y": 0, "matrix": [6, 3]}, - - {"x": 15.25, "y": 0, "matrix": [6, 6]}, - {"x": 16.25, "y": 0, "matrix": [6, 2]}, - {"x": 17.25, "y": 0, "matrix": [6, 1]}, - - {"x": 0, "y": 1.5, "matrix": [1, 0]}, - {"x": 1, "y": 1.5, "matrix": [1, 1]}, - {"x": 2, "y": 1.5, "matrix": [1, 2]}, - {"x": 3, "y": 1.5, "matrix": [1, 3]}, - {"x": 4, "y": 1.5, "matrix": [1, 4]}, - {"x": 5, "y": 1.5, "matrix": [1, 5]}, - {"x": 6, "y": 1.5, "matrix": [1, 6]}, - {"x": 7, "y": 1.5, "matrix": [1, 7]}, - {"x": 8, "y": 1.5, "matrix": [1, 8]}, - {"x": 9, "y": 1.5, "matrix": [7, 8]}, - {"x": 10, "y": 1.5, "matrix": [7, 0]}, - {"x": 11, "y": 1.5, "matrix": [7, 7]}, - {"x": 12, "y": 1.5, "matrix": [7, 5]}, - {"x": 13, "y": 1.5, "matrix": [7, 4]}, - {"x": 14, "y": 1.5, "matrix": [7, 3]}, - - {"x": 15.25, "y": 1.5, "matrix": [7, 6]}, - {"x": 16.25, "y": 1.5, "matrix": [7, 2]}, - {"x": 17.25, "y": 1.5, "matrix": [7, 1]}, - - {"x": 0, "y": 2.5, "w": 1.5, "matrix": [2, 0]}, - {"x": 1.5, "y": 2.5, "matrix": [2, 1]}, - {"x": 2.5, "y": 2.5, "matrix": [2, 2]}, - {"x": 3.5, "y": 2.5, "matrix": [2, 3]}, - {"x": 4.5, "y": 2.5, "matrix": [2, 4]}, - {"x": 5.5, "y": 2.5, "matrix": [2, 5]}, - {"x": 6.5, "y": 2.5, "matrix": [2, 6]}, - {"x": 7.5, "y": 2.5, "matrix": [2, 7]}, - {"x": 8.5, "y": 2.5, "matrix": [2, 8]}, - {"x": 9.5, "y": 2.5, "matrix": [8, 8]}, - {"x": 10.5, "y": 2.5, "matrix": [8, 7]}, - {"x": 11.5, "y": 2.5, "matrix": [8, 5]}, - {"x": 12.5, "y": 2.5, "matrix": [8, 4]}, - {"x": 13.5, "y": 2.5, "w": 1.5, "matrix": [9, 4]}, - - {"x": 15.25, "y": 2.5, "matrix": [8, 6]}, - {"x": 16.25, "y": 2.5, "matrix": [8, 2]}, - {"x": 17.25, "y": 2.5, "matrix": [8, 1]}, - - {"x": 0, "y": 3.5, "w": 1.75, "matrix": [3, 0]}, - {"x": 1.75, "y": 3.5, "matrix": [3, 1]}, - {"x": 2.75, "y": 3.5, "matrix": [3, 2]}, - {"x": 3.75, "y": 3.5, "matrix": [3, 3]}, - {"x": 4.75, "y": 3.5, "matrix": [3, 4]}, - {"x": 5.75, "y": 3.5, "matrix": [3, 5]}, - {"x": 6.75, "y": 3.5, "matrix": [3, 6]}, - {"x": 7.75, "y": 3.5, "matrix": [3, 7]}, - {"x": 8.75, "y": 3.5, "matrix": [3, 8]}, - {"x": 9.75, "y": 3.5, "matrix": [9, 8]}, - {"x": 10.75, "y": 3.5, "matrix": [9, 7]}, - {"x": 11.75, "y": 3.5, "matrix": [9, 5]}, - {"x": 12.75, "y": 3.5, "w": 2.25, "matrix": [8, 3]}, - - {"x": 0, "y": 4.5, "w": 1.25, "matrix": [4, 0]}, - {"x": 1.25, "y": 4.5, "matrix": [4, 1]}, - {"x": 2.25, "y": 4.5, "matrix": [4, 2]}, - {"x": 3.25, "y": 4.5, "matrix": [4, 3]}, - {"x": 4.25, "y": 4.5, "matrix": [4, 4]}, - {"x": 5.25, "y": 4.5, "matrix": [4, 5]}, - {"x": 6.25, "y": 4.5, "matrix": [4, 6]}, - {"x": 7.25, "y": 4.5, "matrix": [4, 7]}, - {"x": 8.25, "y": 4.5, "matrix": [4, 8]}, - {"x": 9.25, "y": 4.5, "matrix": [10, 8]}, - {"x": 10.25, "y": 4.5, "matrix": [10, 7]}, - {"x": 11.25, "y": 4.5, "matrix": [10, 5]}, - {"x": 12.25, "y": 4.5, "w": 1.75, "matrix": [10, 4]}, - {"x": 14, "y": 4.5, "matrix": [10, 3]}, - - {"x": 16.25, "y": 4.5, "matrix": [9, 2]}, - - {"x": 0, "y": 5.5, "w": 1.25, "matrix": [5, 0]}, - {"x": 1.25, "y": 5.5, "w": 1.25, "matrix": [5, 1]}, - {"x": 2.5, "y": 5.5, "w": 1.25, "matrix": [5, 2]}, - {"x": 3.75, "y": 5.5, "w": 6.25, "matrix": [5, 6]}, - {"x": 10, "y": 5.5, "w": 1.25, "matrix": [5, 8]}, - {"x": 11.25, "y": 5.5, "w": 1.25, "matrix": [5, 7]}, - {"x": 12.5, "y": 5.5, "w": 1.25, "matrix": [5, 4]}, - {"x": 13.75, "y": 5.5, "w": 1.25, "matrix": [5, 3]}, - - {"x": 15.25, "y": 5.5, "matrix": [10, 6]}, - {"x": 16.25, "y": 5.5, "matrix": [10, 2]}, - {"x": 17.25, "y": 5.5, "matrix": [10, 1]} - ] - }, - "LAYOUT_tkl_ansi": { - "layout": [ - {"x": 0, "y": 0, "matrix": [0, 0]}, - - {"x": 2, "y": 0, "matrix": [0, 2]}, - {"x": 3, "y": 0, "matrix": [0, 3]}, - {"x": 4, "y": 0, "matrix": [0, 4]}, - {"x": 5, "y": 0, "matrix": [0, 5]}, - - {"x": 6.5, "y": 0, "matrix": [0, 6]}, - {"x": 7.5, "y": 0, "matrix": [0, 7]}, - {"x": 8.5, "y": 0, "matrix": [0, 8]}, - {"x": 9.5, "y": 0, "matrix": [6, 8]}, - - {"x": 11, "y": 0, "matrix": [6, 7]}, - {"x": 12, "y": 0, "matrix": [6, 5]}, - {"x": 13, "y": 0, "matrix": [6, 4]}, - {"x": 14, "y": 0, "matrix": [6, 3]}, - - {"x": 15.25, "y": 0, "matrix": [6, 6]}, - {"x": 16.25, "y": 0, "matrix": [6, 2]}, - {"x": 17.25, "y": 0, "matrix": [6, 1]}, - - {"x": 0, "y": 1.25, "matrix": [1, 0]}, - {"x": 1, "y": 1.25, "matrix": [1, 1]}, - {"x": 2, "y": 1.25, "matrix": [1, 2]}, - {"x": 3, "y": 1.25, "matrix": [1, 3]}, - {"x": 4, "y": 1.25, "matrix": [1, 4]}, - {"x": 5, "y": 1.25, "matrix": [1, 5]}, - {"x": 6, "y": 1.25, "matrix": [1, 6]}, - {"x": 7, "y": 1.25, "matrix": [1, 7]}, - {"x": 8, "y": 1.25, "matrix": [1, 8]}, - {"x": 9, "y": 1.25, "matrix": [7, 8]}, - {"x": 10, "y": 1.25, "matrix": [7, 0]}, - {"x": 11, "y": 1.25, "matrix": [7, 7]}, - {"x": 12, "y": 1.25, "matrix": [7, 5]}, - {"x": 13, "y": 1.25, "w": 2, "matrix": [7, 3]}, - - {"x": 15.25, "y": 1.25, "matrix": [7, 6]}, - {"x": 16.25, "y": 1.25, "matrix": [7, 2]}, - {"x": 17.25, "y": 1.25, "matrix": [7, 1]}, - - {"x": 0, "y": 2.25, "w": 1.5, "matrix": [2, 0]}, - {"x": 1.5, "y": 2.25, "matrix": [2, 1]}, - {"x": 2.5, "y": 2.25, "matrix": [2, 2]}, - {"x": 3.5, "y": 2.25, "matrix": [2, 3]}, - {"x": 4.5, "y": 2.25, "matrix": [2, 4]}, - {"x": 5.5, "y": 2.25, "matrix": [2, 5]}, - {"x": 6.5, "y": 2.25, "matrix": [2, 6]}, - {"x": 7.5, "y": 2.25, "matrix": [2, 7]}, - {"x": 8.5, "y": 2.25, "matrix": [2, 8]}, - {"x": 9.5, "y": 2.25, "matrix": [8, 8]}, - {"x": 10.5, "y": 2.25, "matrix": [8, 7]}, - {"x": 11.5, "y": 2.25, "matrix": [8, 5]}, - {"x": 12.5, "y": 2.25, "matrix": [8, 4]}, - {"x": 13.5, "y": 2.25, "w": 1.5, "matrix": [9, 4]}, - - {"x": 15.25, "y": 2.25, "matrix": [8, 6]}, - {"x": 16.25, "y": 2.25, "matrix": [8, 2]}, - {"x": 17.25, "y": 2.25, "matrix": [8, 1]}, - - {"x": 0, "y": 3.25, "w": 1.75, "matrix": [3, 0]}, - {"x": 1.75, "y": 3.25, "matrix": [3, 1]}, - {"x": 2.75, "y": 3.25, "matrix": [3, 2]}, - {"x": 3.75, "y": 3.25, "matrix": [3, 3]}, - {"x": 4.75, "y": 3.25, "matrix": [3, 4]}, - {"x": 5.75, "y": 3.25, "matrix": [3, 5]}, - {"x": 6.75, "y": 3.25, "matrix": [3, 6]}, - {"x": 7.75, "y": 3.25, "matrix": [3, 7]}, - {"x": 8.75, "y": 3.25, "matrix": [3, 8]}, - {"x": 9.75, "y": 3.25, "matrix": [9, 8]}, - {"x": 10.75, "y": 3.25, "matrix": [9, 7]}, - {"x": 11.75, "y": 3.25, "matrix": [9, 5]}, - {"x": 12.75, "y": 3.25, "w": 2.25, "matrix": [8, 3]}, - - {"x": 0, "y": 4.25, "w": 2.25, "matrix": [4, 0]}, - {"x": 2.25, "y": 4.25, "matrix": [4, 2]}, - {"x": 3.25, "y": 4.25, "matrix": [4, 3]}, - {"x": 4.25, "y": 4.25, "matrix": [4, 4]}, - {"x": 5.25, "y": 4.25, "matrix": [4, 5]}, - {"x": 6.25, "y": 4.25, "matrix": [4, 6]}, - {"x": 7.25, "y": 4.25, "matrix": [4, 7]}, - {"x": 8.25, "y": 4.25, "matrix": [4, 8]}, - {"x": 9.25, "y": 4.25, "matrix": [10, 8]}, - {"x": 10.25, "y": 4.25, "matrix": [10, 7]}, - {"x": 11.25, "y": 4.25, "matrix": [10, 5]}, - {"x": 12.25, "y": 4.25, "w": 2.75, "matrix": [10, 4]}, - - {"x": 16.25, "y": 4.25, "matrix": [9, 2]}, - - {"x": 0, "y": 5.25, "w": 1.25, "matrix": [5, 0]}, - {"x": 1.25, "y": 5.25, "w": 1.25, "matrix": [5, 1]}, - {"x": 2.5, "y": 5.25, "w": 1.25, "matrix": [5, 2]}, - {"x": 3.75, "y": 5.25, "w": 6.25, "matrix": [5, 6]}, - {"x": 10, "y": 5.25, "w": 1.25, "matrix": [5, 8]}, - {"x": 11.25, "y": 5.25, "w": 1.25, "matrix": [5, 7]}, - {"x": 12.5, "y": 5.25, "w": 1.25, "matrix": [5, 4]}, - {"x": 13.75, "y": 5.25, "w": 1.25, "matrix": [5, 3]}, - {"x": 15.25, "y": 5.25, "matrix": [10, 6]}, - {"x": 16.25, "y": 5.25, "matrix": [10, 2]}, - {"x": 17.25, "y": 5.25, "matrix": [10, 1]} - ] - }, - "LAYOUT_tkl_iso": { - "layout": [ - {"x": 0, "y": 0, "matrix": [0, 0]}, - - {"x": 2, "y": 0, "matrix": [0, 2]}, - {"x": 3, "y": 0, "matrix": [0, 3]}, - {"x": 4, "y": 0, "matrix": [0, 4]}, - {"x": 5, "y": 0, "matrix": [0, 5]}, - - {"x": 6.5, "y": 0, "matrix": [0, 6]}, - {"x": 7.5, "y": 0, "matrix": [0, 7]}, - {"x": 8.5, "y": 0, "matrix": [0, 8]}, - {"x": 9.5, "y": 0, "matrix": [6, 8]}, - - {"x": 11, "y": 0, "matrix": [6, 7]}, - {"x": 12, "y": 0, "matrix": [6, 5]}, - {"x": 13, "y": 0, "matrix": [6, 4]}, - {"x": 14, "y": 0, "matrix": [6, 3]}, - - {"x": 15.25, "y": 0, "matrix": [6, 6]}, - {"x": 16.25, "y": 0, "matrix": [6, 2]}, - {"x": 17.25, "y": 0, "matrix": [6, 1]}, - - {"x": 0, "y": 1.25, "matrix": [1, 0]}, - {"x": 1, "y": 1.25, "matrix": [1, 1]}, - {"x": 2, "y": 1.25, "matrix": [1, 2]}, - {"x": 3, "y": 1.25, "matrix": [1, 3]}, - {"x": 4, "y": 1.25, "matrix": [1, 4]}, - {"x": 5, "y": 1.25, "matrix": [1, 5]}, - {"x": 6, "y": 1.25, "matrix": [1, 6]}, - {"x": 7, "y": 1.25, "matrix": [1, 7]}, - {"x": 8, "y": 1.25, "matrix": [1, 8]}, - {"x": 9, "y": 1.25, "matrix": [7, 8]}, - {"x": 10, "y": 1.25, "matrix": [7, 0]}, - {"x": 11, "y": 1.25, "matrix": [7, 7]}, - {"x": 12, "y": 1.25, "matrix": [7, 5]}, - {"x": 13, "y": 1.25, "w": 2, "matrix": [7, 3]}, - - {"x": 15.25, "y": 1.25, "matrix": [7, 6]}, - {"x": 16.25, "y": 1.25, "matrix": [7, 2]}, - {"x": 17.25, "y": 1.25, "matrix": [7, 1]}, - - {"x": 0, "y": 2.25, "w": 1.5, "matrix": [2, 0]}, - {"x": 1.5, "y": 2.25, "matrix": [2, 1]}, - {"x": 2.5, "y": 2.25, "matrix": [2, 2]}, - {"x": 3.5, "y": 2.25, "matrix": [2, 3]}, - {"x": 4.5, "y": 2.25, "matrix": [2, 4]}, - {"x": 5.5, "y": 2.25, "matrix": [2, 5]}, - {"x": 6.5, "y": 2.25, "matrix": [2, 6]}, - {"x": 7.5, "y": 2.25, "matrix": [2, 7]}, - {"x": 8.5, "y": 2.25, "matrix": [2, 8]}, - {"x": 9.5, "y": 2.25, "matrix": [8, 8]}, - {"x": 10.5, "y": 2.25, "matrix": [8, 7]}, - {"x": 11.5, "y": 2.25, "matrix": [8, 5]}, - {"x": 12.5, "y": 2.25, "matrix": [8, 4]}, - - {"x": 15.25, "y": 2.25, "matrix": [8, 6]}, - {"x": 16.25, "y": 2.25, "matrix": [8, 2]}, - {"x": 17.25, "y": 2.25, "matrix": [8, 1]}, - - {"x": 0, "y": 3.25, "w": 1.75, "matrix": [3, 0]}, - {"x": 1.75, "y": 3.25, "matrix": [3, 1]}, - {"x": 2.75, "y": 3.25, "matrix": [3, 2]}, - {"x": 3.75, "y": 3.25, "matrix": [3, 3]}, - {"x": 4.75, "y": 3.25, "matrix": [3, 4]}, - {"x": 5.75, "y": 3.25, "matrix": [3, 5]}, - {"x": 6.75, "y": 3.25, "matrix": [3, 6]}, - {"x": 7.75, "y": 3.25, "matrix": [3, 7]}, - {"x": 8.75, "y": 3.25, "matrix": [3, 8]}, - {"x": 9.75, "y": 3.25, "matrix": [9, 8]}, - {"x": 10.75, "y": 3.25, "matrix": [9, 7]}, - {"x": 11.75, "y": 3.25, "matrix": [9, 5]}, - {"x": 12.75, "y": 3.25, "matrix": [9, 4]}, - {"x": 13.75, "y": 2.25, "w": 1.25, "h": 2, "matrix": [8, 3]}, - - {"x": 0, "y": 4.25, "w": 1.25, "matrix": [4, 0]}, - {"x": 1.25, "y": 4.25, "matrix": [4, 1]}, - {"x": 2.25, "y": 4.25, "matrix": [4, 2]}, - {"x": 3.25, "y": 4.25, "matrix": [4, 3]}, - {"x": 4.25, "y": 4.25, "matrix": [4, 4]}, - {"x": 5.25, "y": 4.25, "matrix": [4, 5]}, - {"x": 6.25, "y": 4.25, "matrix": [4, 6]}, - {"x": 7.25, "y": 4.25, "matrix": [4, 7]}, - {"x": 8.25, "y": 4.25, "matrix": [4, 8]}, - {"x": 9.25, "y": 4.25, "matrix": [10, 8]}, - {"x": 10.25, "y": 4.25, "matrix": [10, 7]}, - {"x": 11.25, "y": 4.25, "matrix": [10, 5]}, - {"x": 12.25, "y": 4.25, "w": 2.75, "matrix": [10, 4]}, - - {"x": 16.25, "y": 4.25, "matrix": [9, 2]}, - - {"x": 0, "y": 5.25, "w": 1.25, "matrix": [5, 0]}, - {"x": 1.25, "y": 5.25, "w": 1.25, "matrix": [5, 1]}, - {"x": 2.5, "y": 5.25, "w": 1.25, "matrix": [5, 2]}, - {"x": 3.75, "y": 5.25, "w": 6.25, "matrix": [5, 6]}, - {"x": 10, "y": 5.25, "w": 1.25, "matrix": [5, 8]}, - {"x": 11.25, "y": 5.25, "w": 1.25, "matrix": [5, 7]}, - {"x": 12.5, "y": 5.25, "w": 1.25, "matrix": [5, 4]}, - {"x": 13.75, "y": 5.25, "w": 1.25, "matrix": [5, 3]}, - - {"x": 15.25, "y": 5.25, "matrix": [10, 6]}, - {"x": 16.25, "y": 5.25, "matrix": [10, 2]}, - {"x": 17.25, "y": 5.25, "matrix": [10, 1]} - ] - } - } -} diff --git a/keyboards/mt/ncr80/solder/readme.md b/keyboards/mt/ncr80/solder/readme.md deleted file mode 100644 index 9333c57ac1..0000000000 --- a/keyboards/mt/ncr80/solder/readme.md +++ /dev/null @@ -1,29 +0,0 @@ -# NCR-80 - -![NCR-80](https://i.imgur.com/kAjbAPLl.jpg) - -> Re-imagination of the classic rebranded Cherry G81-3000 by NCR - -NCR-80 is an affordable keyboard kit inspired by iconic vintage keyboards. - -* Keyboard Maintainer: QMK Community -* Hardware Supported: ATmega32U4 -* Hardware Availability: [AliExpress](https://www.aliexpress.com/item/1005003364462523.html) [Taobao 淘宝](https://item.taobao.com/item.htm?id=657482028672) - -Make example for this keyboard (after setting up your build environment): - - make ncr80/solder:default - -Flashing example for this keyboard: - - make ncr80/solder:default:flash - -## Bootloader - -Enter the bootloader in 3 ways: - -* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard -* **Physical reset button**: Briefly press the button on the back of the PCB -* **Keycode in layout**: Press the key mapped to `RESET` if it is available - -See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.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/murcielago/rev1/keyboard.json b/keyboards/murcielago/rev1/keyboard.json index 39c2d4fc3d..4d3a82ef2c 100644 --- a/keyboards/murcielago/rev1/keyboard.json +++ b/keyboards/murcielago/rev1/keyboard.json @@ -35,7 +35,6 @@ }, "split": { "enabled": true, - "soft_serial_pin": "E6", "encoder": { "right": { "rotary": [ @@ -48,6 +47,9 @@ "cols": ["D6", "D7", "D3", "B2", "B1", "B0"], "rows": ["B3", "B7", "D4", "B6", "C6", "C7"] } + }, + "serial": { + "pin": "E6" } }, "processor": "atmega32u4", diff --git a/keyboards/nacly/sodium42/config.h b/keyboards/nacly/sodium42/config.h deleted file mode 100644 index fe3f0e0cc9..0000000000 --- a/keyboards/nacly/sodium42/config.h +++ /dev/null @@ -1,35 +0,0 @@ -/* Copyright 2022 NaCly - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -#pragma once - -#define SPLIT_HAND_PIN F4 - -/* - * 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 diff --git a/keyboards/nacly/sodium42/keyboard.json b/keyboards/nacly/sodium42/keyboard.json index 491a2cf955..2db83408ac 100644 --- a/keyboards/nacly/sodium42/keyboard.json +++ b/keyboards/nacly/sodium42/keyboard.json @@ -29,7 +29,12 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D3" + "handedness": { + "pin": "F4" + }, + "serial": { + "pin": "D3" + } }, "processor": "atmega32u4", "bootloader": "caterina", diff --git a/keyboards/nacly/sodium50/keyboard.json b/keyboards/nacly/sodium50/keyboard.json index ec0edbfd9a..b9448c8217 100644 --- a/keyboards/nacly/sodium50/keyboard.json +++ b/keyboards/nacly/sodium50/keyboard.json @@ -29,7 +29,12 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D3" + "handedness": { + "pin": "F4" + }, + "serial": { + "pin": "D3" + } }, "processor": "atmega32u4", "bootloader": "caterina", diff --git a/keyboards/nacly/sodium62/config.h b/keyboards/nacly/sodium62/config.h index 341e0e0d89..09240d0b50 100644 --- a/keyboards/nacly/sodium62/config.h +++ b/keyboards/nacly/sodium62/config.h @@ -16,8 +16,6 @@ #pragma once -#define SPLIT_HAND_PIN F4 - #define OLED_BRIGHTNESS 128 /* diff --git a/keyboards/nacly/sodium62/keyboard.json b/keyboards/nacly/sodium62/keyboard.json index 2d9f01e801..904fa9568a 100644 --- a/keyboards/nacly/sodium62/keyboard.json +++ b/keyboards/nacly/sodium62/keyboard.json @@ -30,7 +30,12 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D3" + "handedness": { + "pin": "F4" + }, + "serial": { + "pin": "D3" + } }, "processor": "atmega32u4", "bootloader": "caterina", diff --git a/keyboards/nacly/splitreus62/config.h b/keyboards/nacly/splitreus62/config.h deleted file mode 100644 index b4f9d582ce..0000000000 --- a/keyboards/nacly/splitreus62/config.h +++ /dev/null @@ -1,37 +0,0 @@ -/* -Copyright 2012 Jun Wako <[email protected]> -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 <http://www.gnu.org/licenses/>. -*/ - -#pragma once - -#define SPLIT_HAND_PIN F4 - -/* - * 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 diff --git a/keyboards/nacly/splitreus62/keyboard.json b/keyboards/nacly/splitreus62/keyboard.json index 08a8010483..a3b1544b9a 100644 --- a/keyboards/nacly/splitreus62/keyboard.json +++ b/keyboards/nacly/splitreus62/keyboard.json @@ -30,7 +30,12 @@ "diode_direction": "ROW2COL", "split": { "enabled": true, - "soft_serial_pin": "D0" + "handedness": { + "pin": "F4" + }, + "serial": { + "pin": "D0" + } }, "rgblight": { "led_count": 12, diff --git a/keyboards/neson_design/700e/700e.c b/keyboards/neson_design/700e/700e.c index cdcd90d3e0..c6ba94c834 100644 --- a/keyboards/neson_design/700e/700e.c +++ b/keyboards/neson_design/700e/700e.c @@ -333,8 +333,6 @@ void housekeeping_task_kb(void) } is31fl3731_flush(); - - housekeeping_task_user(); } void setleds_custom(rgb_led_t *start_led, uint16_t num_leds) diff --git a/keyboards/neson_design/n6/n6.c b/keyboards/neson_design/n6/n6.c index fc34400b1c..ef5035dcde 100644 --- a/keyboards/neson_design/n6/n6.c +++ b/keyboards/neson_design/n6/n6.c @@ -335,8 +335,6 @@ void housekeeping_task_kb(void) } is31fl3731_flush(); - - housekeeping_task_user(); } void setleds_custom(rgb_led_t *start_led, uint16_t num_leds) diff --git a/keyboards/afternoonlabs/breeze/rev1/config.h b/keyboards/nix_studio/oxalys80/config.h index d6bb6df14c..7943ea4a25 100644 --- a/keyboards/afternoonlabs/breeze/rev1/config.h +++ b/keyboards/nix_studio/oxalys80/config.h @@ -1,4 +1,4 @@ -/* Copyright 2021 Afternoon Labs +/* Copyright 2021 Nix 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 @@ -13,7 +13,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ - #pragma once -#define SPLIT_HAND_PIN B3 +#define RGBLIGHT_DEFAULT_MODE (RGBLIGHT_MODE_RAINBOW_SWIRL + 2) diff --git a/keyboards/nix_studio/oxalys80/keyboard.json b/keyboards/nix_studio/oxalys80/keyboard.json index 5fa489f72b..470c43ea2f 100644 --- a/keyboards/nix_studio/oxalys80/keyboard.json +++ b/keyboards/nix_studio/oxalys80/keyboard.json @@ -39,6 +39,9 @@ "pin": "B3" }, "rgblight": { + "default": { + "val": 128 + }, "saturation_steps": 8, "brightness_steps": 8, "led_count": 24, diff --git a/keyboards/nix_studio/oxalys80/oxalys80.c b/keyboards/nix_studio/oxalys80/oxalys80.c deleted file mode 100644 index cfebb71043..0000000000 --- a/keyboards/nix_studio/oxalys80/oxalys80.c +++ /dev/null @@ -1,26 +0,0 @@ -/* Copyright 2021 Nix 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 <http://www.gnu.org/licenses/>. - */ - -#include "quantum.h" - -void eeconfig_init_kb(void) { // EEPROM is getting reset! - rgblight_enable(); // Enable RGB by default - rgblight_sethsv(0, 255, 128); // Set default HSV - red hue, full saturation, medium brightness - rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL + 2); // set to RGB_RAINBOW_SWIRL by default - - eeconfig_update_kb(0); - eeconfig_init_user(); -} diff --git a/keyboards/noxary/220/220.c b/keyboards/noxary/220/220.c deleted file mode 100644 index c5affa4344..0000000000 --- a/keyboards/noxary/220/220.c +++ /dev/null @@ -1,34 +0,0 @@ -/* Copyright 2020 Rozakiin - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ -#include "quantum.h" - -// Optional override functions below. -// You can leave any or all of these undefined. -// These are only required if you want to perform custom actions. - -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - gpio_set_pin_output(C6); - matrix_init_user(); -} - -bool led_update_kb(led_t led_state) { - if(led_update_user(led_state)) { - gpio_write_pin(C6, led_state.num_lock); - } - return true; -}
\ No newline at end of file diff --git a/keyboards/noxary/220/keyboard.json b/keyboards/noxary/220/keyboard.json index 75d71aac8a..3565316999 100644 --- a/keyboards/noxary/220/keyboard.json +++ b/keyboards/noxary/220/keyboard.json @@ -32,6 +32,9 @@ "pin": "B7", "breathing": true }, + "indicators": { + "num_lock": "C6" + }, "processor": "atmega32u2", "bootloader": "atmel-dfu", "community_layouts": ["ortho_6x4"], diff --git a/keyboards/noxary/268_2/268_2.c b/keyboards/noxary/268_2/268_2.c deleted file mode 100644 index 56b42d2343..0000000000 --- a/keyboards/noxary/268_2/268_2.c +++ /dev/null @@ -1,30 +0,0 @@ -/* Copyright 2018 Rozakiin - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ -#include "quantum.h" - -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - gpio_set_pin_output(B0); - matrix_init_user(); -} - -bool led_update_kb(led_t led_state) { - if(led_update_user(led_state)) { - gpio_write_pin(B0, led_state.caps_lock); - } - return true; -} diff --git a/keyboards/noxary/268_2/keyboard.json b/keyboards/noxary/268_2/keyboard.json index c724d07a49..08daee6d63 100644 --- a/keyboards/noxary/268_2/keyboard.json +++ b/keyboards/noxary/268_2/keyboard.json @@ -31,6 +31,9 @@ "backlight": { "pin": "B7" }, + "indicators": { + "caps_lock": "B0" + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "community_layouts": ["65_ansi_blocker"], diff --git a/keyboards/noxary/280/280.c b/keyboards/noxary/280/280.c deleted file mode 100644 index 0f29df178f..0000000000 --- a/keyboards/noxary/280/280.c +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright 2019 %YOUR_NAME% - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ -#include "quantum.h" - -// Optional override functions below. -// You can leave any or all of these undefined. -// These are only required if you want to perform custom actions. - - -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - gpio_set_pin_output(D5); - gpio_set_pin_output(D0); - matrix_init_user(); -} - -bool led_update_kb(led_t led_state) { - if(led_update_user(led_state)) { - gpio_write_pin(D5, led_state.caps_lock); - gpio_write_pin(D0, led_state.scroll_lock); - } - return true; -}
\ No newline at end of file diff --git a/keyboards/noxary/280/keyboard.json b/keyboards/noxary/280/keyboard.json index 17acb96cdf..4bd9257152 100644 --- a/keyboards/noxary/280/keyboard.json +++ b/keyboards/noxary/280/keyboard.json @@ -32,6 +32,10 @@ "pin": "B7", "breathing": true }, + "indicators": { + "caps_lock": "D5", + "scroll_lock": "D0" + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/noxary/x268/keyboard.json b/keyboards/noxary/x268/keyboard.json index f5a991deff..7ca5799de2 100644 --- a/keyboards/noxary/x268/keyboard.json +++ b/keyboards/noxary/x268/keyboard.json @@ -32,6 +32,9 @@ "backlight": { "pin": "B7" }, + "indicators": { + "caps_lock": "B0" + }, "rgblight": { "hue_steps": 16, "saturation_steps": 16, diff --git a/keyboards/noxary/x268/x268.c b/keyboards/noxary/x268/x268.c deleted file mode 100644 index 67d6dff89d..0000000000 --- a/keyboards/noxary/x268/x268.c +++ /dev/null @@ -1,34 +0,0 @@ -/* Copyright 2020 Rozakiin - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ -#include "quantum.h" - -// Optional override functions below. -// You can leave any or all of these undefined. -// These are only required if you want to perform custom actions. - -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - gpio_set_pin_output(B0); - matrix_init_user(); -} - -bool led_update_kb(led_t led_state) { - if(led_update_user(led_state)) { - gpio_write_pin(B0, led_state.caps_lock); - } - return true; -} diff --git a/keyboards/nullbitsco/snap/snap.c b/keyboards/nullbitsco/snap/snap.c index 7308572f95..bd0ea5b731 100644 --- a/keyboards/nullbitsco/snap/snap.c +++ b/keyboards/nullbitsco/snap/snap.c @@ -15,11 +15,6 @@ */ #include "snap.h" -// Macro variables -bool is_alt_tab_active = false; -uint16_t alt_tab_timer = 0; -bool muted = false; - void matrix_init_kb(void) { set_bitc_LED(LED_OFF); matrix_init_remote_kb(); @@ -27,23 +22,16 @@ void matrix_init_kb(void) { } void keyboard_post_init_kb(void) { - #ifdef CONSOLE_ENABLE +#ifdef CONSOLE_ENABLE debug_enable = true; debug_matrix = true; - #endif +#endif keyboard_post_init_user(); } void matrix_scan_kb(void) { matrix_scan_remote_kb(); matrix_scan_user(); - - if (is_alt_tab_active) { - if (timer_elapsed(alt_tab_timer) > 1000) { - unregister_code(KC_LALT); - is_alt_tab_active = false; - } - } } // Use Bit-C LED to show CAPS LOCK and NUM LOCK status @@ -51,63 +39,29 @@ void led_update_ports(led_t led_state) { set_bitc_LED(led_state.caps_lock ? LED_DIM : LED_OFF); } +bool shutdown_kb(bool jump_to_bootloader) { + if (!shutdown_user(jump_to_bootloader)) { + return false; + } + + set_bitc_LED(LED_DIM); +#ifdef RGBLIGHT_ENABLE + rgblight_disable_noeeprom(); +#endif +#ifdef OLED_ENABLE + oled_off(); +#endif + return true; +} + bool process_record_kb(uint16_t keycode, keyrecord_t *record) { // If console is enabled, it will print the matrix position and status of each key pressed - #ifdef CONSOLE_ENABLE +#ifdef CONSOLE_ENABLE dprintf("kc: 0x%04X, col: %u, row: %u, pressed: %b, time: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed, record->event.time); - #endif +#endif process_record_remote_kb(keycode, record); if (!process_record_user(keycode, record)) return false; - switch (keycode) { - case QK_BOOT: - if (record->event.pressed) { - set_bitc_LED(LED_DIM); - #ifdef RGBLIGHT_ENABLE - rgblight_disable_noeeprom(); - #endif - #ifdef OLED_ENABLE - oled_off(); - #endif - bootloader_jump(); // jump to bootloader - } - return false; - - case DISC_MUTE: - if (record->event.pressed) { - tap_code(KC_F23); - #ifdef RGBLIGHT_ENABLE - if (!rgblight_is_enabled()) break; - - if (muted) { - rgblight_enable_noeeprom(); - } else { - rgblight_timer_disable(); - uint8_t val = rgblight_get_val(); - rgblight_sethsv_range(255, 255, val, 1, 5); - } - #endif - muted = !muted; - } - break; - - case SUPER_ALT_TAB: - if (record->event.pressed) { - if (!is_alt_tab_active) { - is_alt_tab_active = true; - register_code(KC_LALT); - } - alt_tab_timer = timer_read(); - register_code(KC_TAB); - } else { - unregister_code(KC_TAB); - } - break; - - default: - break; - } - return true; } diff --git a/keyboards/nullbitsco/snap/snap.h b/keyboards/nullbitsco/snap/snap.h index e593257368..c1fa22e0c1 100644 --- a/keyboards/nullbitsco/snap/snap.h +++ b/keyboards/nullbitsco/snap/snap.h @@ -18,15 +18,3 @@ #include "quantum.h" #include "common/remote_kb.h" #include "common/bitc_led.h" - -#ifdef VIA_ENABLE -enum custom_keycodes { - DISC_MUTE = QK_USER_0, - SUPER_ALT_TAB -}; -#else -enum custom_keycodes { - DISC_MUTE = SAFE_RANGE, - SUPER_ALT_TAB -}; -#endif diff --git a/keyboards/nullbitsco/tidbit/tidbit.c b/keyboards/nullbitsco/tidbit/tidbit.c index 15bc0f6a7a..0ccdda01d8 100644 --- a/keyboards/nullbitsco/tidbit/tidbit.c +++ b/keyboards/nullbitsco/tidbit/tidbit.c @@ -92,22 +92,6 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) { numlock_set = true; } - switch (keycode) { - case QK_BOOT: - if (record->event.pressed) { - set_bitc_LED(LED_DIM); - rgblight_disable_noeeprom(); - #ifdef OLED_ENABLE - oled_off(); - #endif - bootloader_jump(); // jump to bootloader - } - return false; - - default: - break; - } - return true; } @@ -121,3 +105,16 @@ void matrix_scan_kb(void) { matrix_scan_remote_kb(); matrix_scan_user(); } + +bool shutdown_kb(bool jump_to_bootloader) { + if (!shutdown_user(jump_to_bootloader)) { + return false; + } + + set_bitc_LED(LED_DIM); + rgblight_disable_noeeprom(); +#ifdef OLED_ENABLE + oled_off(); +#endif + return true; +} diff --git a/keyboards/obosob/arch_36/keyboard.json b/keyboards/obosob/arch_36/keyboard.json index db3e356f3a..290446dd22 100644 --- a/keyboards/obosob/arch_36/keyboard.json +++ b/keyboards/obosob/arch_36/keyboard.json @@ -25,7 +25,9 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D2" + "serial": { + "pin": "D2" + } }, "rgblight": { "led_count": 12, diff --git a/keyboards/obosob/steal_this_keyboard/keyboard.json b/keyboards/obosob/steal_this_keyboard/keyboard.json index 83de29d69c..cc99431b5a 100644 --- a/keyboards/obosob/steal_this_keyboard/keyboard.json +++ b/keyboards/obosob/steal_this_keyboard/keyboard.json @@ -29,7 +29,6 @@ }, "split": { "enabled": true, - "soft_serial_pin": "D2", "matrix_pins": { "right": { "direct": [ @@ -39,6 +38,9 @@ ["B5", "C6", null, null, null] ] } + }, + "serial": { + "pin": "D2" } }, "community_layouts": [ diff --git a/keyboards/ogre/ergo_split/keyboard.json b/keyboards/ogre/ergo_split/keyboard.json index 765bebc2fb..4dc3caa530 100644 --- a/keyboards/ogre/ergo_split/keyboard.json +++ b/keyboards/ogre/ergo_split/keyboard.json @@ -24,7 +24,12 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D3" + "handedness": { + "pin": "D1" + }, + "serial": { + "pin": "D3" + } }, "rgblight": { "led_count": 14, diff --git a/keyboards/omkbd/ergodash/mini/keyboard.json b/keyboards/omkbd/ergodash/mini/keyboard.json index 6286b73b90..7c15c4f6f7 100644 --- a/keyboards/omkbd/ergodash/mini/keyboard.json +++ b/keyboards/omkbd/ergodash/mini/keyboard.json @@ -30,7 +30,9 @@ "levels": 7 }, "split": { - "soft_serial_pin": "D0" + "serial": { + "pin": "D0" + } }, "tapping": { "term": 120 diff --git a/keyboards/omkbd/ergodash/mini/keymaps/default/config.h b/keyboards/omkbd/ergodash/mini/keymaps/default/config.h deleted file mode 100644 index a597d848e2..0000000000 --- a/keyboards/omkbd/ergodash/mini/keymaps/default/config.h +++ /dev/null @@ -1,27 +0,0 @@ -/* -This is the c configuration file for the keymap - -Copyright 2012 Jun Wako <[email protected]> -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 <http://www.gnu.org/licenses/>. -*/ - -#pragma once - -/* Select hand configuration */ - -#define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS diff --git a/keyboards/omkbd/ergodash/rev1/keyboard.json b/keyboards/omkbd/ergodash/rev1/keyboard.json index fb4a1c2254..6a61950ba6 100644 --- a/keyboards/omkbd/ergodash/rev1/keyboard.json +++ b/keyboards/omkbd/ergodash/rev1/keyboard.json @@ -30,7 +30,9 @@ "levels": 7 }, "split": { - "soft_serial_pin": "D0" + "serial": { + "pin": "D0" + } }, "tapping": { "term": 120 diff --git a/keyboards/omkbd/ergodash/rev1/keymaps/default/config.h b/keyboards/omkbd/ergodash/rev1/keymaps/default/config.h deleted file mode 100644 index a597d848e2..0000000000 --- a/keyboards/omkbd/ergodash/rev1/keymaps/default/config.h +++ /dev/null @@ -1,27 +0,0 @@ -/* -This is the c configuration file for the keymap - -Copyright 2012 Jun Wako <[email protected]> -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 <http://www.gnu.org/licenses/>. -*/ - -#pragma once - -/* Select hand configuration */ - -#define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS diff --git a/keyboards/omkbd/runner3680/3x6/keyboard.json b/keyboards/omkbd/runner3680/3x6/keyboard.json index 3e1ab5ba82..44c5ce35a0 100644 --- a/keyboards/omkbd/runner3680/3x6/keyboard.json +++ b/keyboards/omkbd/runner3680/3x6/keyboard.json @@ -20,7 +20,9 @@ }, "diode_direction": "COL2ROW", "split": { - "soft_serial_pin": "D2" + "serial": { + "pin": "D2" + } }, "tapping": { "term": 120 diff --git a/keyboards/omkbd/runner3680/3x6/keymaps/default/config.h b/keyboards/omkbd/runner3680/3x6/keymaps/default/config.h deleted file mode 100644 index 43a82f38a0..0000000000 --- a/keyboards/omkbd/runner3680/3x6/keymaps/default/config.h +++ /dev/null @@ -1,9 +0,0 @@ -#pragma once - -//#define USE_MATRIX_I2C - -/* Select hand configuration */ - -#define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS diff --git a/keyboards/omkbd/runner3680/3x7/keyboard.json b/keyboards/omkbd/runner3680/3x7/keyboard.json index 496be94925..8a4c55ca71 100644 --- a/keyboards/omkbd/runner3680/3x7/keyboard.json +++ b/keyboards/omkbd/runner3680/3x7/keyboard.json @@ -20,7 +20,9 @@ }, "diode_direction": "COL2ROW", "split": { - "soft_serial_pin": "D2" + "serial": { + "pin": "D2" + } }, "tapping": { "term": 120 diff --git a/keyboards/omkbd/runner3680/3x7/keymaps/default/config.h b/keyboards/omkbd/runner3680/3x7/keymaps/default/config.h deleted file mode 100644 index 43a82f38a0..0000000000 --- a/keyboards/omkbd/runner3680/3x7/keymaps/default/config.h +++ /dev/null @@ -1,9 +0,0 @@ -#pragma once - -//#define USE_MATRIX_I2C - -/* Select hand configuration */ - -#define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS diff --git a/keyboards/omkbd/runner3680/3x8/keyboard.json b/keyboards/omkbd/runner3680/3x8/keyboard.json index 80719fd0e4..11fe738a8a 100644 --- a/keyboards/omkbd/runner3680/3x8/keyboard.json +++ b/keyboards/omkbd/runner3680/3x8/keyboard.json @@ -20,7 +20,9 @@ }, "diode_direction": "COL2ROW", "split": { - "soft_serial_pin": "D2" + "serial": { + "pin": "D2" + } }, "tapping": { "term": 120 diff --git a/keyboards/omkbd/runner3680/3x8/keymaps/default/config.h b/keyboards/omkbd/runner3680/3x8/keymaps/default/config.h deleted file mode 100644 index 43a82f38a0..0000000000 --- a/keyboards/omkbd/runner3680/3x8/keymaps/default/config.h +++ /dev/null @@ -1,9 +0,0 @@ -#pragma once - -//#define USE_MATRIX_I2C - -/* Select hand configuration */ - -#define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS diff --git a/keyboards/omkbd/runner3680/4x6/keyboard.json b/keyboards/omkbd/runner3680/4x6/keyboard.json index f9d3146a78..2449f3431e 100644 --- a/keyboards/omkbd/runner3680/4x6/keyboard.json +++ b/keyboards/omkbd/runner3680/4x6/keyboard.json @@ -20,7 +20,9 @@ }, "diode_direction": "COL2ROW", "split": { - "soft_serial_pin": "D2" + "serial": { + "pin": "D2" + } }, "tapping": { "term": 120 diff --git a/keyboards/omkbd/runner3680/4x6/keymaps/default/config.h b/keyboards/omkbd/runner3680/4x6/keymaps/default/config.h deleted file mode 100644 index 43a82f38a0..0000000000 --- a/keyboards/omkbd/runner3680/4x6/keymaps/default/config.h +++ /dev/null @@ -1,9 +0,0 @@ -#pragma once - -//#define USE_MATRIX_I2C - -/* Select hand configuration */ - -#define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS diff --git a/keyboards/omkbd/runner3680/4x7/keyboard.json b/keyboards/omkbd/runner3680/4x7/keyboard.json index 120e254e5c..01acfad1e7 100644 --- a/keyboards/omkbd/runner3680/4x7/keyboard.json +++ b/keyboards/omkbd/runner3680/4x7/keyboard.json @@ -20,7 +20,9 @@ }, "diode_direction": "COL2ROW", "split": { - "soft_serial_pin": "D2" + "serial": { + "pin": "D2" + } }, "tapping": { "term": 120 diff --git a/keyboards/omkbd/runner3680/4x7/keymaps/default/config.h b/keyboards/omkbd/runner3680/4x7/keymaps/default/config.h deleted file mode 100644 index 43a82f38a0..0000000000 --- a/keyboards/omkbd/runner3680/4x7/keymaps/default/config.h +++ /dev/null @@ -1,9 +0,0 @@ -#pragma once - -//#define USE_MATRIX_I2C - -/* Select hand configuration */ - -#define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS diff --git a/keyboards/omkbd/runner3680/4x8/keyboard.json b/keyboards/omkbd/runner3680/4x8/keyboard.json index e0b91088da..748fc05508 100644 --- a/keyboards/omkbd/runner3680/4x8/keyboard.json +++ b/keyboards/omkbd/runner3680/4x8/keyboard.json @@ -20,7 +20,9 @@ }, "diode_direction": "COL2ROW", "split": { - "soft_serial_pin": "D2" + "serial": { + "pin": "D2" + } }, "tapping": { "term": 120 diff --git a/keyboards/omkbd/runner3680/4x8/keymaps/default/config.h b/keyboards/omkbd/runner3680/4x8/keymaps/default/config.h deleted file mode 100644 index 43a82f38a0..0000000000 --- a/keyboards/omkbd/runner3680/4x8/keymaps/default/config.h +++ /dev/null @@ -1,9 +0,0 @@ -#pragma once - -//#define USE_MATRIX_I2C - -/* Select hand configuration */ - -#define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS diff --git a/keyboards/omkbd/runner3680/5x6/keyboard.json b/keyboards/omkbd/runner3680/5x6/keyboard.json index c06bff537f..9b043c7e19 100644 --- a/keyboards/omkbd/runner3680/5x6/keyboard.json +++ b/keyboards/omkbd/runner3680/5x6/keyboard.json @@ -20,7 +20,9 @@ }, "diode_direction": "COL2ROW", "split": { - "soft_serial_pin": "D2" + "serial": { + "pin": "D2" + } }, "tapping": { "term": 120 diff --git a/keyboards/omkbd/runner3680/5x6/keymaps/default/config.h b/keyboards/omkbd/runner3680/5x6/keymaps/default/config.h deleted file mode 100644 index 43a82f38a0..0000000000 --- a/keyboards/omkbd/runner3680/5x6/keymaps/default/config.h +++ /dev/null @@ -1,9 +0,0 @@ -#pragma once - -//#define USE_MATRIX_I2C - -/* Select hand configuration */ - -#define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS diff --git a/keyboards/omkbd/runner3680/5x6_5x8/keyboard.json b/keyboards/omkbd/runner3680/5x6_5x8/keyboard.json index 4c359b27eb..b8a361f1b2 100644 --- a/keyboards/omkbd/runner3680/5x6_5x8/keyboard.json +++ b/keyboards/omkbd/runner3680/5x6_5x8/keyboard.json @@ -24,7 +24,9 @@ }, "diode_direction": "COL2ROW", "split": { - "soft_serial_pin": "D2" + "serial": { + "pin": "D2" + } }, "tapping": { "term": 120 diff --git a/keyboards/omkbd/runner3680/5x6_5x8/keymaps/default/config.h b/keyboards/omkbd/runner3680/5x6_5x8/keymaps/default/config.h deleted file mode 100644 index a21551badf..0000000000 --- a/keyboards/omkbd/runner3680/5x6_5x8/keymaps/default/config.h +++ /dev/null @@ -1,25 +0,0 @@ -/* Copyright 2021 omkbd - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -#pragma once - -//#define USE_MATRIX_I2C - -/* Select hand configuration */ - -#define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS diff --git a/keyboards/omkbd/runner3680/5x6_5x8/keymaps/jis/config.h b/keyboards/omkbd/runner3680/5x6_5x8/keymaps/jis/config.h deleted file mode 100644 index a21551badf..0000000000 --- a/keyboards/omkbd/runner3680/5x6_5x8/keymaps/jis/config.h +++ /dev/null @@ -1,25 +0,0 @@ -/* Copyright 2021 omkbd - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -#pragma once - -//#define USE_MATRIX_I2C - -/* Select hand configuration */ - -#define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS diff --git a/keyboards/omkbd/runner3680/5x6_5x8/keymaps/via/config.h b/keyboards/omkbd/runner3680/5x6_5x8/keymaps/via/config.h deleted file mode 100644 index a21551badf..0000000000 --- a/keyboards/omkbd/runner3680/5x6_5x8/keymaps/via/config.h +++ /dev/null @@ -1,25 +0,0 @@ -/* Copyright 2021 omkbd - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -#pragma once - -//#define USE_MATRIX_I2C - -/* Select hand configuration */ - -#define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS diff --git a/keyboards/omkbd/runner3680/5x7/keyboard.json b/keyboards/omkbd/runner3680/5x7/keyboard.json index 55936eb9d3..41df797770 100644 --- a/keyboards/omkbd/runner3680/5x7/keyboard.json +++ b/keyboards/omkbd/runner3680/5x7/keyboard.json @@ -20,7 +20,9 @@ }, "diode_direction": "COL2ROW", "split": { - "soft_serial_pin": "D2" + "serial": { + "pin": "D2" + } }, "tapping": { "term": 120 diff --git a/keyboards/omkbd/runner3680/5x7/keymaps/default/config.h b/keyboards/omkbd/runner3680/5x7/keymaps/default/config.h deleted file mode 100644 index 43a82f38a0..0000000000 --- a/keyboards/omkbd/runner3680/5x7/keymaps/default/config.h +++ /dev/null @@ -1,9 +0,0 @@ -#pragma once - -//#define USE_MATRIX_I2C - -/* Select hand configuration */ - -#define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS diff --git a/keyboards/omkbd/runner3680/5x8/keyboard.json b/keyboards/omkbd/runner3680/5x8/keyboard.json index 9e96e69bbb..04294371d7 100644 --- a/keyboards/omkbd/runner3680/5x8/keyboard.json +++ b/keyboards/omkbd/runner3680/5x8/keyboard.json @@ -20,7 +20,9 @@ }, "diode_direction": "COL2ROW", "split": { - "soft_serial_pin": "D2" + "serial": { + "pin": "D2" + } }, "tapping": { "term": 120 diff --git a/keyboards/omkbd/runner3680/5x8/keymaps/JIS/config.h b/keyboards/omkbd/runner3680/5x8/keymaps/JIS/config.h deleted file mode 100644 index 43a82f38a0..0000000000 --- a/keyboards/omkbd/runner3680/5x8/keymaps/JIS/config.h +++ /dev/null @@ -1,9 +0,0 @@ -#pragma once - -//#define USE_MATRIX_I2C - -/* Select hand configuration */ - -#define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS diff --git a/keyboards/omkbd/runner3680/5x8/keymaps/default/config.h b/keyboards/omkbd/runner3680/5x8/keymaps/default/config.h deleted file mode 100644 index 43a82f38a0..0000000000 --- a/keyboards/omkbd/runner3680/5x8/keymaps/default/config.h +++ /dev/null @@ -1,9 +0,0 @@ -#pragma once - -//#define USE_MATRIX_I2C - -/* Select hand configuration */ - -#define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS diff --git a/keyboards/omnikeyish/omnikeyish.c b/keyboards/omnikeyish/omnikeyish.c index 4a8a7fa4d6..8e7e316524 100644 --- a/keyboards/omnikeyish/omnikeyish.c +++ b/keyboards/omnikeyish/omnikeyish.c @@ -1,10 +1,12 @@ #include "omnikeyish.h" -void keyboard_pre_init_user(void) { +void keyboard_pre_init_kb(void) { dynamic_macro_init(); + + keyboard_pre_init_user(); } -void keyboard_post_init_user(void) { +void keyboard_post_init_kb(void) { /* Customise these values to desired behaviour */ //debug_enable = true; //debug_matrix=true; @@ -19,6 +21,8 @@ void keyboard_post_init_user(void) { /* Send numlock keycode to attempt to force numlock back on. */ register_code(KC_NUM_LOCK); unregister_code(KC_NUM_LOCK); + + keyboard_post_init_user(); } bool process_record_user(uint16_t keycode, keyrecord_t *record) { diff --git a/keyboards/opendeck/32/keymaps/default/keymap.c b/keyboards/opendeck/32/keymaps/default/keymap.c index 60cf2d5b71..63a162ae27 100644 --- a/keyboards/opendeck/32/keymaps/default/keymap.c +++ b/keyboards/opendeck/32/keymaps/default/keymap.c @@ -15,23 +15,13 @@ */ #include QMK_KEYBOARD_H -#define _BL 0 - // clang-format off const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[_BL] = LAYOUT_ortho_4x8( - LSFT(KC_F13), LSFT(KC_F17), LSFT(KC_F21), LCTL(KC_F13), LCTL(KC_F17), LCTL(KC_F21), LALT(KC_F13), LALT(KC_F17), - LSFT(KC_F14), LSFT(KC_F18), LSFT(KC_F22), LCTL(KC_F14), LCTL(KC_F18), LCTL(KC_F22), LALT(KC_F14), LALT(KC_F18), - LSFT(KC_F15), LSFT(KC_F19), LSFT(KC_F23), LCTL(KC_F15), LCTL(KC_F19), LCTL(KC_F23), LALT(KC_F15), LALT(KC_F19), - LSFT(KC_F16), LSFT(KC_F20), LSFT(KC_F24), LCTL(KC_F16), LCTL(KC_F20), LCTL(KC_F24), LALT(KC_F16), LALT(KC_F20) + [0] = LAYOUT_ortho_4x8( + LSFT(KC_F13), LSFT(KC_F17), LSFT(KC_F21), LCTL(KC_F13), LCTL(KC_F17), LCTL(KC_F21), LALT(KC_F13), LALT(KC_F17), + LSFT(KC_F14), LSFT(KC_F18), LSFT(KC_F22), LCTL(KC_F14), LCTL(KC_F18), LCTL(KC_F22), LALT(KC_F14), LALT(KC_F18), + LSFT(KC_F15), LSFT(KC_F19), LSFT(KC_F23), LCTL(KC_F15), LCTL(KC_F19), LCTL(KC_F23), LALT(KC_F15), LALT(KC_F19), + LSFT(KC_F16), LSFT(KC_F20), LSFT(KC_F24), LCTL(KC_F16), LCTL(KC_F20), LCTL(KC_F24), LALT(KC_F16), LALT(KC_F20) ) }; // clang-format on - -void suspend_power_down_user(void) { - rgb_matrix_set_suspend_state(true); -} - -void suspend_wakeup_init_user(void) { - rgb_matrix_set_suspend_state(false); -} diff --git a/keyboards/opendeck/32/rev1/config.h b/keyboards/opendeck/32/rev1/config.h index 446cb047fa..f58c8fc7ab 100644 --- a/keyboards/opendeck/32/rev1/config.h +++ b/keyboards/opendeck/32/rev1/config.h @@ -19,9 +19,4 @@ #define IS31FL3731_SDB_PIN D2 #define IS31FL3731_IRQ_PIN D3 -#define RGB_MATRIX_DISABLE_KEYCODES - -// Slim down the ROM -#define NO_ACTION_LAYER -#define NO_ACTION_TAPPING -#define NO_ACTION_ONESHOT +#define POWER_LED_PIN F1 diff --git a/keyboards/opendeck/32/rev1/keyboard.json b/keyboards/opendeck/32/rev1/keyboard.json index e55c16c9fd..84d48ceb15 100644 --- a/keyboards/opendeck/32/rev1/keyboard.json +++ b/keyboards/opendeck/32/rev1/keyboard.json @@ -3,9 +3,9 @@ "lto": true }, "features": { - "bootmagic": false, - "extrakey": false, - "mousekey": false, + "bootmagic": true, + "extrakey": true, + "mousekey": true, "nkro": true, "rgb_matrix": true }, @@ -63,6 +63,40 @@ "animation": "cycle_spiral" }, "driver": "is31fl3731", + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 4}, + {"matrix": [0, 1], "x": 32, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 64, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 96, "y": 0, "flags": 4}, + {"matrix": [0, 4], "x": 128, "y": 0, "flags": 4}, + {"matrix": [0, 5], "x": 160, "y": 0, "flags": 4}, + {"matrix": [0, 6], "x": 192, "y": 0, "flags": 4}, + {"matrix": [0, 7], "x": 224, "y": 0, "flags": 4}, + {"matrix": [1, 0], "x": 0, "y": 21, "flags": 4}, + {"matrix": [1, 1], "x": 32, "y": 21, "flags": 4}, + {"matrix": [1, 2], "x": 64, "y": 21, "flags": 4}, + {"matrix": [1, 3], "x": 96, "y": 21, "flags": 4}, + {"matrix": [1, 4], "x": 128, "y": 21, "flags": 4}, + {"matrix": [1, 5], "x": 160, "y": 21, "flags": 4}, + {"matrix": [1, 6], "x": 192, "y": 21, "flags": 4}, + {"matrix": [1, 7], "x": 224, "y": 21, "flags": 4}, + {"matrix": [2, 0], "x": 0, "y": 43, "flags": 4}, + {"matrix": [2, 1], "x": 32, "y": 43, "flags": 4}, + {"matrix": [2, 2], "x": 64, "y": 43, "flags": 4}, + {"matrix": [2, 3], "x": 96, "y": 43, "flags": 4}, + {"matrix": [2, 4], "x": 128, "y": 43, "flags": 4}, + {"matrix": [2, 5], "x": 160, "y": 43, "flags": 4}, + {"matrix": [2, 6], "x": 192, "y": 43, "flags": 4}, + {"matrix": [2, 7], "x": 224, "y": 43, "flags": 4}, + {"matrix": [3, 0], "x": 0, "y": 64, "flags": 4}, + {"matrix": [3, 1], "x": 32, "y": 64, "flags": 4}, + {"matrix": [3, 2], "x": 64, "y": 64, "flags": 4}, + {"matrix": [3, 3], "x": 96, "y": 64, "flags": 4}, + {"matrix": [3, 4], "x": 128, "y": 64, "flags": 4}, + {"matrix": [3, 5], "x": 160, "y": 64, "flags": 4}, + {"matrix": [3, 6], "x": 192, "y": 64, "flags": 4}, + {"matrix": [3, 7], "x": 224, "y": 64, "flags": 4} + ], "sleep": true }, "diode_direction": "COL2ROW", diff --git a/keyboards/opendeck/32/rev1/rev1.c b/keyboards/opendeck/32/rev1/rev1.c index ca05d12243..cb5fee178e 100644 --- a/keyboards/opendeck/32/rev1/rev1.c +++ b/keyboards/opendeck/32/rev1/rev1.c @@ -14,7 +14,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "rev1.h" +#include "quantum.h" #ifdef RGB_MATRIX_ENABLE const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = { @@ -63,31 +63,6 @@ const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = { // clang-format on }; -// clang-format off -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 } - }, { - // LED Index to Physical Position - { 0, 0 }, { 32, 0 }, { 64, 0 }, { 96, 0 }, { 128, 0 }, { 160, 0 }, { 192, 0 }, { 224, 0 }, - { 0, 21 }, { 32, 21 }, { 64, 21 }, { 96, 21 }, { 128, 21 }, { 160, 21 }, { 192, 21 }, { 224, 21 }, - { 0, 43 }, { 32, 43 }, { 64, 43 }, { 96, 43 }, { 128, 43 }, { 160, 43 }, { 192, 43 }, { 224, 43 }, - { 0, 64 }, { 32, 64 }, { 64, 64 }, { 96, 64 }, { 128, 64 }, { 160, 64 }, { 192, 64 }, { 224, 64 } - }, { - // LED Index to Flag - 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4 - } -}; - -// clang-format on - void keyboard_pre_init_kb(void) { // Light power LED gpio_set_pin_output(POWER_LED_PIN); @@ -100,37 +75,4 @@ void keyboard_pre_init_kb(void) { keyboard_pre_init_user(); } -void keyboard_post_init_kb(void) { - // RGB enabled by default, no way to turn off. No need to expend EEPROM write cycles here. - rgb_matrix_enable_noeeprom(); - - keyboard_post_init_user(); -} -#endif - -#if defined(KC_WRAPPER_KEY) - -static uint8_t g_key_wrapper_tracker = 0; - -bool process_record_kb(uint16_t keycode, keyrecord_t *record) { - if (!process_record_user(keycode, record)) { return false; } - if (record->event.pressed && keycode != KC_WRAPPER_KEY) { - register_code(KC_WRAPPER_KEY); - register_code(keycode); - g_key_wrapper_tracker++; - return false; - } - return true; -} - -void post_process_record_kb(uint16_t keycode, keyrecord_t *record) { - if (!record->event.pressed && keycode != KC_WRAPPER_KEY) { - --g_key_wrapper_tracker; - if (g_key_wrapper_tracker <= 0) { - unregister_code(KC_WRAPPER_KEY); - g_key_wrapper_tracker = 0; - } - } - post_process_record_user(keycode, record); -} #endif diff --git a/keyboards/opendeck/32/rev1/rev1.h b/keyboards/opendeck/32/rev1/rev1.h deleted file mode 100644 index 455b2ac753..0000000000 --- a/keyboards/opendeck/32/rev1/rev1.h +++ /dev/null @@ -1,29 +0,0 @@ -/* Copyright 2020 cmdremily - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -#pragma once - -#include "quantum.h" - -#define POWER_LED_PIN F1 - -// If you want something similar to what Taran from LMG does in https://github.com/TaranVH/2nd-keyboard -// you can create a "wrapper key" by uncommenting the row below and chosing your wrapper keycode. -// You can then change the keymap in ../keymaps/default/keymap.c to adjust what key is sent inside the -// wrapper. -// Note: The default is to not wrap and to send F13-F24 with combinations of shift/control/alt as these -// are immediately usable in most software (e.g. OBS and DCSB for streaming) without using AHK. -//#define KC_WRAPPER_KEY KC_F24 diff --git a/keyboards/ortho5by12/keyboard.json b/keyboards/ortho5by12/keyboard.json index 49ce494417..5bcd1e00fc 100644 --- a/keyboards/ortho5by12/keyboard.json +++ b/keyboards/ortho5by12/keyboard.json @@ -22,6 +22,10 @@ "resync": true } }, + "indicators": { + "caps_lock": "C5", + "num_lock": "C4" + }, "matrix_pins": { "cols": ["C2", "D0", "D1", "D4", "C3", "C1"], "rows": ["B5", "B1", "B2", "B3", "B4", "C0", "D5", "D6", "D7", "B0"] diff --git a/keyboards/ortho5by12/ortho5by12.c b/keyboards/ortho5by12/ortho5by12.c deleted file mode 100644 index d0d9ce9102..0000000000 --- a/keyboards/ortho5by12/ortho5by12.c +++ /dev/null @@ -1,30 +0,0 @@ -/* Copyright 2019 Takuya Urakawa (dm9records.com) - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ -#include "quantum.h" - -void matrix_init_kb(void) { - gpio_set_pin_output(C4); - gpio_set_pin_output(C5); -} - -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if(res) { - gpio_write_pin(C4, led_state.num_lock); - gpio_write_pin(C5, led_state.caps_lock); - } - return res; -} diff --git a/keyboards/orthocode/orthocode.c b/keyboards/orthocode/orthocode.c deleted file mode 100644 index 1bfc431c78..0000000000 --- a/keyboards/orthocode/orthocode.c +++ /dev/null @@ -1,46 +0,0 @@ -/* Copyright 2020 Jrodna - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ -#include "orthocode.h" - -bool process_record_kb(uint16_t keycode, keyrecord_t *record) { - if (!process_record_user(keycode, record)) { - return false; - } - - static bool shiftspace_mods = false; - switch (keycode) { - case SHIFTSPACE: - if (record->event.pressed) { - if(get_mods() & MOD_BIT(KC_RSFT)) { - register_code(KC_MINS); - shiftspace_mods = true; - } - else { - register_code(KC_SPC); - } - } else { - if (shiftspace_mods) { - unregister_code(KC_MINS); - shiftspace_mods = false; - } else { - unregister_code(KC_SPC); - } - } - return false; - break; - } - return true; -} diff --git a/keyboards/orthocode/orthocode.h b/keyboards/orthocode/orthocode.h deleted file mode 100644 index e1edbbe04d..0000000000 --- a/keyboards/orthocode/orthocode.h +++ /dev/null @@ -1,25 +0,0 @@ -/* Copyright 2020 Jrodna - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -#pragma once - -#define KC_SHSP SHIFTSPACE - -#include "quantum.h" - -enum custom_keycodes { - SHIFTSPACE = QK_KB_0, -}; diff --git a/keyboards/orthodox/keymaps/default/config.h b/keyboards/orthodox/keymaps/default/config.h index 3ba91a8fb2..ba12b8f493 100644 --- a/keyboards/orthodox/keymaps/default/config.h +++ b/keyboards/orthodox/keymaps/default/config.h @@ -22,9 +22,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once /* Select hand configuration */ - -// #define MASTER_LEFT -// #define MASTER_RIGHT #define EE_HANDS #ifdef AUDIO_ENABLE diff --git a/keyboards/orthodox/keymaps/oscillope/config.h b/keyboards/orthodox/keymaps/oscillope/config.h index 1068d7efdf..2169d85082 100644 --- a/keyboards/orthodox/keymaps/oscillope/config.h +++ b/keyboards/orthodox/keymaps/oscillope/config.h @@ -19,19 +19,9 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - +#pragma once #define USE_I2C -/* Select hand configuration */ - -// #define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS - #define TAPPING_TERM 200 #define TAPPING_TOGGLE 3 - -#endif diff --git a/keyboards/orthodox/rev1/keyboard.json b/keyboards/orthodox/rev1/keyboard.json index 042187b8bf..0444009f2b 100644 --- a/keyboards/orthodox/rev1/keyboard.json +++ b/keyboards/orthodox/rev1/keyboard.json @@ -13,7 +13,9 @@ }, "diode_direction": "COL2ROW", "split": { - "soft_serial_pin": "D0" + "serial": { + "pin": "D0" + } }, "processor": "atmega32u4", "bootloader": "caterina", diff --git a/keyboards/orthodox/rev3/keyboard.json b/keyboards/orthodox/rev3/keyboard.json index e2b3abd34d..61d8281f55 100644 --- a/keyboards/orthodox/rev3/keyboard.json +++ b/keyboards/orthodox/rev3/keyboard.json @@ -13,7 +13,9 @@ }, "diode_direction": "COL2ROW", "split": { - "soft_serial_pin": "D0" + "serial": { + "pin": "D0" + } }, "processor": "atmega32u4", "bootloader": "caterina", diff --git a/keyboards/orthodox/rev3_teensy/keyboard.json b/keyboards/orthodox/rev3_teensy/keyboard.json index 345ff58145..fd77ba7ae5 100644 --- a/keyboards/orthodox/rev3_teensy/keyboard.json +++ b/keyboards/orthodox/rev3_teensy/keyboard.json @@ -13,7 +13,9 @@ }, "diode_direction": "COL2ROW", "split": { - "soft_serial_pin": "D0" + "serial": { + "pin": "D0" + } }, "processor": "atmega32u4", "bootloader": "halfkay", diff --git a/keyboards/orthograph/keyboard.json b/keyboards/orthograph/keyboard.json index ad37b0c723..a3fbf634e5 100644 --- a/keyboards/orthograph/keyboard.json +++ b/keyboards/orthograph/keyboard.json @@ -30,7 +30,9 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "E6", + "serial": { + "pin": "E6" + }, "transport": { "sync_matrix_state": true }, diff --git a/keyboards/owlab/spring/spring.c b/keyboards/owlab/spring/spring.c index 13280ff9b3..5e814d5a60 100644 --- a/keyboards/owlab/spring/spring.c +++ b/keyboards/owlab/spring/spring.c @@ -76,7 +76,7 @@ void set_caps_mode(uint8_t mode){ } -void matrix_scan_kb(void) { +void housekeeping_task_kb(void) { if(caps_in){ if(timer_elapsed32(caps_timer) > 3000){ rgblight_sethsv(pre_rgb.hue, pre_rgb.sat, pre_rgb.val); @@ -84,8 +84,6 @@ void matrix_scan_kb(void) { caps_in = false; } } - - matrix_scan_user(); } diff --git a/keyboards/percent/canoe_gen2/canoe_gen2.c b/keyboards/percent/canoe_gen2/canoe_gen2.c index ea091c3474..6cbbed412d 100644 --- a/keyboards/percent/canoe_gen2/canoe_gen2.c +++ b/keyboards/percent/canoe_gen2/canoe_gen2.c @@ -17,31 +17,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "quantum.h" -void keyboard_pre_init_kb(void) { - gpio_set_pin_output(E6); - gpio_write_pin_high(E6); - - keyboard_pre_init_user(); -} - -bool led_update_kb(led_t led_state) { - if(led_update_user(led_state)) { - gpio_write_pin(E6, !led_state.caps_lock); - } - - return true; -} - #ifdef RGB_MATRIX_ENABLE -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(); -} led_config_t g_led_config = { { // Key Matrix to LED Index diff --git a/keyboards/percent/canoe_gen2/keyboard.json b/keyboards/percent/canoe_gen2/keyboard.json index 0b6ece2613..85fbfd28b9 100644 --- a/keyboards/percent/canoe_gen2/keyboard.json +++ b/keyboards/percent/canoe_gen2/keyboard.json @@ -22,6 +22,10 @@ "resync": true } }, + "indicators": { + "caps_lock": "E6", + "on_state": 0 + }, "ws2812": { "pin": "B7" }, diff --git a/keyboards/phase_studio/titan65/hotswap/hotswap.c b/keyboards/phase_studio/titan65/hotswap/hotswap.c index 6df8319a83..1bcd581785 100644 --- a/keyboards/phase_studio/titan65/hotswap/hotswap.c +++ b/keyboards/phase_studio/titan65/hotswap/hotswap.c @@ -39,13 +39,4 @@ led_config_t g_led_config = { } }; -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 diff --git a/keyboards/phase_studio/titan65/hotswap/keyboard.json b/keyboards/phase_studio/titan65/hotswap/keyboard.json index 8bf3152b90..956f508701 100644 --- a/keyboards/phase_studio/titan65/hotswap/keyboard.json +++ b/keyboards/phase_studio/titan65/hotswap/keyboard.json @@ -20,7 +20,8 @@ }, "rgb_matrix": { "driver": "ws2812", - "max_brightness": 150 + "max_brightness": 150, + "sleep": true }, "matrix_pins": { "cols": ["B0", "B1", "B2", "B3", "B7", "D0", "D1", "D2", "D3", "D5", "F0", "F1", "C7", "F4", "F5", "F6"], diff --git a/keyboards/phoenix/config.h b/keyboards/phoenix/config.h index 4903f19f7f..732d906419 100644 --- a/keyboards/phoenix/config.h +++ b/keyboards/phoenix/config.h @@ -23,6 +23,5 @@ #define MOUSEKEY_MAX_SPEED 7 #define MOUSEKEY_WHEEL_DELAY 0 -#define SPLIT_HAND_PIN B9 #define SERIAL_USART_DRIVER SD1 #define SERIAL_USART_TX_PAL_MODE 7 diff --git a/keyboards/phoenix/keyboard.json b/keyboards/phoenix/keyboard.json index 51be9790fb..f3eb6a8d55 100644 --- a/keyboards/phoenix/keyboard.json +++ b/keyboards/phoenix/keyboard.json @@ -30,7 +30,13 @@ "diode_direction": "ROW2COL", "split": { "enabled": true, - "soft_serial_pin": "A9" + "handedness": { + "pin": "B9" + }, + "serial": { + "driver": "usart", + "pin": "A9" + } }, "processor": "STM32F401", "bootloader": "stm32-dfu", diff --git a/keyboards/phoenix/rules.mk b/keyboards/phoenix/rules.mk deleted file mode 100644 index c6e2988321..0000000000 --- a/keyboards/phoenix/rules.mk +++ /dev/null @@ -1 +0,0 @@ -SERIAL_DRIVER = usart diff --git a/keyboards/pica40/rev1/rev1.c b/keyboards/pica40/rev1/rev1.c index fff89d48f2..20eacf6d92 100644 --- a/keyboards/pica40/rev1/rev1.c +++ b/keyboards/pica40/rev1/rev1.c @@ -23,8 +23,6 @@ void housekeeping_task_kb(void) { rgblight_disable_noeeprom(); } } - - housekeeping_task_user(); } bool process_record_kb(uint16_t keycode, keyrecord_t *record) { diff --git a/keyboards/pica40/rev2/config.h b/keyboards/pica40/rev2/config.h index 1a59bee3dd..dad718ad0f 100644 --- a/keyboards/pica40/rev2/config.h +++ b/keyboards/pica40/rev2/config.h @@ -3,8 +3,6 @@ #pragma once -#define SERIAL_USART_TX_PIN GP0 - #define RP2040_BOOTLOADER_DOUBLE_TAP_RESET #define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_LED GP17 #define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 500U diff --git a/keyboards/pica40/rev2/keyboard.json b/keyboards/pica40/rev2/keyboard.json index 630d6da467..64b043f274 100644 --- a/keyboards/pica40/rev2/keyboard.json +++ b/keyboards/pica40/rev2/keyboard.json @@ -40,6 +40,10 @@ "right": { "rotary": [] } + }, + "serial": { + "driver": "vendor", + "pin": "GP0" } }, "encoder": { diff --git a/keyboards/pica40/rev2/rev2.c b/keyboards/pica40/rev2/rev2.c index 0ba9a53734..b0167ae76f 100644 --- a/keyboards/pica40/rev2/rev2.c +++ b/keyboards/pica40/rev2/rev2.c @@ -6,8 +6,8 @@ #ifdef ENCODER_ENABLE // code based on encoder.c -#define ENCODER_PIN_A (((pin_t[])ENCODERS_PAD_A)[0]) -#define ENCODER_PIN_B (((pin_t[])ENCODERS_PAD_B)[0]) +#define ENCODER_PIN_A (((pin_t[])ENCODER_A_PINS)[0]) +#define ENCODER_PIN_B (((pin_t[])ENCODER_B_PINS)[0]) // custom handler that returns encoder B pin status from slave side void encoder_sync_slave_handler(uint8_t in_buflen, const void *in_data, uint8_t out_buflen, void *out_data) { @@ -120,6 +120,4 @@ void housekeeping_task_kb(void) { } } #endif // defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_LAYERS) - - housekeeping_task_user(); } diff --git a/keyboards/pica40/rev2/rules.mk b/keyboards/pica40/rev2/rules.mk deleted file mode 100644 index 161ec22b16..0000000000 --- a/keyboards/pica40/rev2/rules.mk +++ /dev/null @@ -1 +0,0 @@ -SERIAL_DRIVER = vendor diff --git a/keyboards/pinky/3/keyboard.json b/keyboards/pinky/3/keyboard.json index 770d368399..32e1f893e5 100644 --- a/keyboards/pinky/3/keyboard.json +++ b/keyboards/pinky/3/keyboard.json @@ -14,7 +14,9 @@ }, "diode_direction": "COL2ROW", "split": { - "soft_serial_pin": "D2" + "serial": { + "pin": "D2" + } }, "processor": "atmega32u4", "bootloader": "caterina", diff --git a/keyboards/pinky/3/keymaps/default/config.h b/keyboards/pinky/3/keymaps/default/config.h index 3671c13a38..8a52fd041a 100644 --- a/keyboards/pinky/3/keymaps/default/config.h +++ b/keyboards/pinky/3/keymaps/default/config.h @@ -18,12 +18,6 @@ //#define USE_MATRIX_I2C -/* Select hand configuration */ - -#define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS - #define QUICK_TAP_TERM 0 #define TAPPING_TERM 200 #define RETRO_TAPPPING diff --git a/keyboards/pinky/3/keymaps/via/config.h b/keyboards/pinky/3/keymaps/via/config.h index 3671c13a38..8a52fd041a 100644 --- a/keyboards/pinky/3/keymaps/via/config.h +++ b/keyboards/pinky/3/keymaps/via/config.h @@ -18,12 +18,6 @@ //#define USE_MATRIX_I2C -/* Select hand configuration */ - -#define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS - #define QUICK_TAP_TERM 0 #define TAPPING_TERM 200 #define RETRO_TAPPPING diff --git a/keyboards/pinky/4/keyboard.json b/keyboards/pinky/4/keyboard.json index 01e44a647b..20f86e3f38 100644 --- a/keyboards/pinky/4/keyboard.json +++ b/keyboards/pinky/4/keyboard.json @@ -14,7 +14,9 @@ }, "diode_direction": "COL2ROW", "split": { - "soft_serial_pin": "D2" + "serial": { + "pin": "D2" + } }, "processor": "atmega32u4", "bootloader": "caterina", diff --git a/keyboards/pinky/4/keymaps/default/config.h b/keyboards/pinky/4/keymaps/default/config.h index 3671c13a38..8a52fd041a 100644 --- a/keyboards/pinky/4/keymaps/default/config.h +++ b/keyboards/pinky/4/keymaps/default/config.h @@ -18,12 +18,6 @@ //#define USE_MATRIX_I2C -/* Select hand configuration */ - -#define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS - #define QUICK_TAP_TERM 0 #define TAPPING_TERM 200 #define RETRO_TAPPPING diff --git a/keyboards/pinky/4/keymaps/via/config.h b/keyboards/pinky/4/keymaps/via/config.h index 3671c13a38..8a52fd041a 100644 --- a/keyboards/pinky/4/keymaps/via/config.h +++ b/keyboards/pinky/4/keymaps/via/config.h @@ -18,12 +18,6 @@ //#define USE_MATRIX_I2C -/* Select hand configuration */ - -#define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS - #define QUICK_TAP_TERM 0 #define TAPPING_TERM 200 #define RETRO_TAPPPING diff --git a/keyboards/pisces/keyboard.json b/keyboards/pisces/keyboard.json index afdddfaf4d..1601cbc3a9 100644 --- a/keyboards/pisces/keyboard.json +++ b/keyboards/pisces/keyboard.json @@ -29,7 +29,9 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D2" + "serial": { + "pin": "D2" + } }, "processor": "atmega32u2", "bootloader": "atmel-dfu", diff --git a/keyboards/planck/ez/config.h b/keyboards/planck/ez/config.h deleted file mode 100644 index e4fa0924d3..0000000000 --- a/keyboards/planck/ez/config.h +++ /dev/null @@ -1,62 +0,0 @@ -/* Copyright 2018 Jack Humbert <[email protected]> - * Copyright 2015 ZSA Technology Labs Inc (@zsa) - * Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <[email protected]> - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -#pragma once - -#define MUSIC_MAP -#undef AUDIO_VOICES -#undef AUDIO_PIN -#define AUDIO_PIN A5 -#define AUDIO_PIN_ALT A4 -#define AUDIO_PIN_ALT_AS_NEGATIVE - -/* - * 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 WS2812_LED_N 2 -// #define WS2812_TIM_N 2 -// #define WS2812_TIM_CH 2 -// #define PORT_WS2812 GPIOA -// #define PIN_WS2812 1 -// #define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM2 // DMA stream for TIMx_UP (look up in reference manual under DMA Channel selection) -//#define WS2812_PWM_DMA_CHANNEL 7 // DMA channel for TIMx_UP -//#define WS2812_EXTERNAL_PULLUP - -#define IS31FL3737_I2C_ADDRESS_1 IS31FL3737_I2C_ADDRESS_GND - -#define MOUSEKEY_INTERVAL 20 -#define MOUSEKEY_DELAY 0 -#define MOUSEKEY_TIME_TO_MAX 60 -#define MOUSEKEY_MAX_SPEED 7 -#define MOUSEKEY_WHEEL_DELAY 400 -#define MOUSEKEY_WHEEL_INTERVAL MOUSEKEY_INTERVAL -#define MOUSEKEY_WHEEL_MAX_SPEED MOUSEKEY_MAX_SPEED -#define MOUSEKEY_WHEEL_TIME_TO_MAX MOUSEKEY_TIME_TO_MAX diff --git a/keyboards/planck/ez/glow/keyboard.json b/keyboards/planck/ez/glow/keyboard.json deleted file mode 100644 index 6c957b165b..0000000000 --- a/keyboards/planck/ez/glow/keyboard.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "keyboard_name": "Planck EZ Glow", - "usb": { - "pid": "0xC6CF" - }, - "features": { - "rgb_matrix": true - } -} diff --git a/keyboards/planck/ez/info.json b/keyboards/planck/ez/info.json deleted file mode 100644 index f7b2a8f8a1..0000000000 --- a/keyboards/planck/ez/info.json +++ /dev/null @@ -1,207 +0,0 @@ -{ - "manufacturer": "ZSA Technology Labs", - "url": "https://ergodox-ez.com/pages/planck", - "maintainer": "jackhumbert", - "usb": { - "vid": "0x3297", - "device_version": "0.0.1", - "shared_endpoint": { - "mouse": false - } - }, - "features": { - "audio": true, - "bootmagic": true, - "command": true, - "console": true, - "encoder": true, - "extrakey": true, - "mousekey": true, - "nkro": true - }, - "rgb_matrix": { - "animations": { - "alphas_mods": true, - "gradient_up_down": true, - "gradient_left_right": true, - "breathing": true, - "band_sat": true, - "band_val": true, - "band_pinwheel_sat": true, - "band_pinwheel_val": true, - "band_spiral_sat": true, - "band_spiral_val": true, - "cycle_all": true, - "cycle_left_right": true, - "cycle_up_down": true, - "rainbow_moving_chevron": true, - "cycle_out_in": true, - "cycle_out_in_dual": true, - "cycle_pinwheel": true, - "cycle_spiral": true, - "dual_beacon": true, - "rainbow_beacon": true, - "rainbow_pinwheels": true, - "raindrops": true, - "jellybean_raindrops": true, - "hue_breathing": true, - "hue_pendulum": true, - "hue_wave": true, - "pixel_rain": true, - "pixel_flow": true, - "pixel_fractal": true, - "typing_heatmap": true, - "digital_rain": true, - "solid_reactive_simple": true, - "solid_reactive": true, - "solid_reactive_wide": true, - "solid_reactive_multiwide": true, - "solid_reactive_cross": true, - "solid_reactive_multicross": true, - "solid_reactive_nexus": true, - "solid_reactive_multinexus": true, - "splash": true, - "multisplash": true, - "solid_splash": true, - "solid_multisplash": true - }, - "driver": "is31fl3737", - "led_process_limit": 5, - "led_flush_limit": 26, - "sleep": true - }, - "matrix_pins": { - "cols": ["B11", "B10", "B2", "B1", "A7", "B0"], - "rows": ["A10", "A9", "A8", "B15", "C13", "C14", "C15", "A2"] - }, - "diode_direction": "COL2ROW", - "audio": { - "driver": "dac_additive" - }, - "encoder": { - "rotary": [ - {"pin_a": "B12", "pin_b": "B13"} - ] - }, - "processor": "STM32F303", - "bootloader": "stm32-dfu", - "tapping": { - "toggle": 1 - }, - "community_layouts": ["ortho_4x12", "planck_mit"], - "layout_aliases": { - "LAYOUT_planck_grid": "LAYOUT_ortho_4x12", - "LAYOUT_planck_mit": "LAYOUT_planck_1x2uC" - }, - "layouts": { - "LAYOUT_planck_1x2uC": { - "layout": [ - {"matrix": [0, 0], "x": 0, "y": 0}, - {"matrix": [0, 1], "x": 1, "y": 0}, - {"matrix": [0, 2], "x": 2, "y": 0}, - {"matrix": [0, 3], "x": 3, "y": 0}, - {"matrix": [0, 4], "x": 4, "y": 0}, - {"matrix": [0, 5], "x": 5, "y": 0}, - {"matrix": [4, 0], "x": 6, "y": 0}, - {"matrix": [4, 1], "x": 7, "y": 0}, - {"matrix": [4, 2], "x": 8, "y": 0}, - {"matrix": [4, 3], "x": 9, "y": 0}, - {"matrix": [4, 4], "x": 10, "y": 0}, - {"matrix": [4, 5], "x": 11, "y": 0}, - - {"matrix": [1, 0], "x": 0, "y": 1}, - {"matrix": [1, 1], "x": 1, "y": 1}, - {"matrix": [1, 2], "x": 2, "y": 1}, - {"matrix": [1, 3], "x": 3, "y": 1}, - {"matrix": [1, 4], "x": 4, "y": 1}, - {"matrix": [1, 5], "x": 5, "y": 1}, - {"matrix": [5, 0], "x": 6, "y": 1}, - {"matrix": [5, 1], "x": 7, "y": 1}, - {"matrix": [5, 2], "x": 8, "y": 1}, - {"matrix": [5, 3], "x": 9, "y": 1}, - {"matrix": [5, 4], "x": 10, "y": 1}, - {"matrix": [5, 5], "x": 11, "y": 1}, - - {"matrix": [2, 0], "x": 0, "y": 2}, - {"matrix": [2, 1], "x": 1, "y": 2}, - {"matrix": [2, 2], "x": 2, "y": 2}, - {"matrix": [2, 3], "x": 3, "y": 2}, - {"matrix": [2, 4], "x": 4, "y": 2}, - {"matrix": [2, 5], "x": 5, "y": 2}, - {"matrix": [6, 0], "x": 6, "y": 2}, - {"matrix": [6, 1], "x": 7, "y": 2}, - {"matrix": [6, 2], "x": 8, "y": 2}, - {"matrix": [6, 3], "x": 9, "y": 2}, - {"matrix": [6, 4], "x": 10, "y": 2}, - {"matrix": [6, 5], "x": 11, "y": 2}, - - {"matrix": [3, 0], "x": 0, "y": 3}, - {"matrix": [3, 1], "x": 1, "y": 3}, - {"matrix": [3, 2], "x": 2, "y": 3}, - {"matrix": [7, 3], "x": 3, "y": 3}, - {"matrix": [7, 4], "x": 4, "y": 3}, - {"matrix": [7, 5], "x": 5, "y": 3, "w": 2}, - {"matrix": [7, 0], "x": 7, "y": 3}, - {"matrix": [7, 1], "x": 8, "y": 3}, - {"matrix": [7, 2], "x": 9, "y": 3}, - {"matrix": [3, 3], "x": 10, "y": 3}, - {"matrix": [3, 4], "x": 11, "y": 3} - ] - }, - "LAYOUT_ortho_4x12": { - "layout": [ - {"matrix": [0, 0], "x": 0, "y": 0}, - {"matrix": [0, 1], "x": 1, "y": 0}, - {"matrix": [0, 2], "x": 2, "y": 0}, - {"matrix": [0, 3], "x": 3, "y": 0}, - {"matrix": [0, 4], "x": 4, "y": 0}, - {"matrix": [0, 5], "x": 5, "y": 0}, - {"matrix": [4, 0], "x": 6, "y": 0}, - {"matrix": [4, 1], "x": 7, "y": 0}, - {"matrix": [4, 2], "x": 8, "y": 0}, - {"matrix": [4, 3], "x": 9, "y": 0}, - {"matrix": [4, 4], "x": 10, "y": 0}, - {"matrix": [4, 5], "x": 11, "y": 0}, - - {"matrix": [1, 0], "x": 0, "y": 1}, - {"matrix": [1, 1], "x": 1, "y": 1}, - {"matrix": [1, 2], "x": 2, "y": 1}, - {"matrix": [1, 3], "x": 3, "y": 1}, - {"matrix": [1, 4], "x": 4, "y": 1}, - {"matrix": [1, 5], "x": 5, "y": 1}, - {"matrix": [5, 0], "x": 6, "y": 1}, - {"matrix": [5, 1], "x": 7, "y": 1}, - {"matrix": [5, 2], "x": 8, "y": 1}, - {"matrix": [5, 3], "x": 9, "y": 1}, - {"matrix": [5, 4], "x": 10, "y": 1}, - {"matrix": [5, 5], "x": 11, "y": 1}, - - {"matrix": [2, 0], "x": 0, "y": 2}, - {"matrix": [2, 1], "x": 1, "y": 2}, - {"matrix": [2, 2], "x": 2, "y": 2}, - {"matrix": [2, 3], "x": 3, "y": 2}, - {"matrix": [2, 4], "x": 4, "y": 2}, - {"matrix": [2, 5], "x": 5, "y": 2}, - {"matrix": [6, 0], "x": 6, "y": 2}, - {"matrix": [6, 1], "x": 7, "y": 2}, - {"matrix": [6, 2], "x": 8, "y": 2}, - {"matrix": [6, 3], "x": 9, "y": 2}, - {"matrix": [6, 4], "x": 10, "y": 2}, - {"matrix": [6, 5], "x": 11, "y": 2}, - - {"matrix": [3, 0], "x": 0, "y": 3}, - {"matrix": [3, 1], "x": 1, "y": 3}, - {"matrix": [3, 2], "x": 2, "y": 3}, - {"matrix": [7, 3], "x": 3, "y": 3}, - {"matrix": [7, 4], "x": 4, "y": 3}, - {"matrix": [7, 5], "x": 5, "y": 3}, - {"matrix": [3, 5], "x": 6, "y": 3}, - {"matrix": [7, 0], "x": 7, "y": 3}, - {"matrix": [7, 1], "x": 8, "y": 3}, - {"matrix": [7, 2], "x": 9, "y": 3}, - {"matrix": [3, 3], "x": 10, "y": 3}, - {"matrix": [3, 4], "x": 11, "y": 3} - ] - } - } -} diff --git a/keyboards/planck/light/keyboard.json b/keyboards/planck/light/keyboard.json index 33801562e5..dd1d69bf3c 100644 --- a/keyboards/planck/light/keyboard.json +++ b/keyboards/planck/light/keyboard.json @@ -54,7 +54,8 @@ "solid_splash": true, "solid_multisplash": true }, - "driver": "is31fl3731" + "driver": "is31fl3731", + "sleep": true }, "features": { "audio": true, diff --git a/keyboards/planck/light/light.c b/keyboards/planck/light/light.c index 8bbb8119c9..43487e2e21 100644 --- a/keyboards/planck/light/light.c +++ b/keyboards/planck/light/light.c @@ -115,18 +115,6 @@ uint8_t rgb_matrix_map_row_column_to_led_kb(uint8_t row, uint8_t column, uint8_t return 0; } -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(); -} - #ifdef SWAP_HANDS_ENABLE __attribute__ ((weak)) const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/planck/rev7/keymaps/default/config.h b/keyboards/planck/rev7/keymaps/default/config.h index fbbab996e1..937d6a5e41 100644 --- a/keyboards/planck/rev7/keymaps/default/config.h +++ b/keyboards/planck/rev7/keymaps/default/config.h @@ -41,3 +41,10 @@ - etc. */ // #define MIDI_ADVANCED + +/* + * Encoder options + */ +// #define PLANCK_ENCODER_SETTLE_PIN_STATE_DELAY 20 +// #define ENCODER_MAP_KEY_DELAY 10 +// #define ENCODER_RESOLUTION 4 diff --git a/keyboards/planck/rev7/keymaps/default/keymap.c b/keyboards/planck/rev7/keymaps/default/keymap.c index 4ac4c0de4f..85f5097332 100644 --- a/keyboards/planck/rev7/keymaps/default/keymap.c +++ b/keyboards/planck/rev7/keymaps/default/keymap.c @@ -147,13 +147,69 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_ADJUST] = LAYOUT_planck_grid( - _______, QK_BOOT, DB_TOGG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL , + _______, QK_BOOT, DB_TOGG, UG_TOGG, UG_NEXT, UG_HUEU, UG_HUED, UG_SATU, UG_SATD, UG_SPDU, UG_SPDD, KC_DEL , _______, EE_CLR, MU_NEXT, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______, _______, AU_PREV, AU_NEXT, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ) }; + +#ifdef ENCODER_MAP_ENABLE +/* Rotary Encoders + */ +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { + /* Qwerty + * v- (index) Clockwise / Counter Clockwise v- (index) Clockwise / Counter Clockwise + * ,---------------------------------------------------------------------------------------. + * | (0) Vol- / Vol+ | | | | | | | | | | | (4) Vol- / Vol+ | + * |-----------------------+---+---+---+---+---+---+---+---+---+---+-----------------------| + * | (1) KC_MNXT / KC_MPRV | | | | | | | | | | | (5) KC_MNXT / KC_MPRV | + * |-----------------------+---+---+---+---+---+---+---+---+---+---+-----------------------| + * | (2) KC_WBAK / KC_WFWD | | | | | | | | | | | (6) KC_SPC / KC_ENT | + * |-----------------------+---+---+---+---+---+---+---+---+---+---+-----------------------| + * | (3) KC_LEFT / KC_RGHT | | | | | | | | | | (7) KC_DOWN / KC_UP | + * `---------------------------------------------------------------------------------------' + */ + [_QWERTY] = { + // LEFT SIDE (index 0 to 3) + ENCODER_CCW_CW(KC_VOLU, KC_VOLD), + ENCODER_CCW_CW(KC_MNXT, KC_MPRV), + ENCODER_CCW_CW(KC_WBAK, KC_WFWD), + ENCODER_CCW_CW(KC_LEFT, KC_RGHT), + // RIGHT SIDE (index 4 to 7) + ENCODER_CCW_CW(KC_VOLU, KC_VOLD), + ENCODER_CCW_CW(KC_MNXT, KC_MPRV), + ENCODER_CCW_CW(KC_SPC, KC_ENT), + ENCODER_CCW_CW(KC_DOWN, KC_UP) + }, + + /* Adjust (Lower + Raise) + * v- (index) Clockwise / Counter Clockwise v- (index) Clockwise / Counter Clockwise + * ,---------------------------------------------------------------------------------------. + * | (0) _______ / _______ | | | | | | | | | | | (4) _______ / _______ | + * |-----------------------+---+---+---+---+---+---+---+---+---+---+-----------------------| + * | (1) _______ / _______ | | | | | | | | | | | (5) _______ / _______ | + * |-----------------------+---+---+---+---+---+---+---+---+---+---+-----------------------| + * | (2) UG_NEXT / UG_PREV | | | | | | | | | | | (6) SAT- / SAT+ | + * |-----------------------+---+---+---+---+---+---+---+---+---+---+-----------------------| + * | (3) UG_VALD / UG_VALU | | | | | | | | | | (7) HUE- / HUE+ | + * `---------------------------------------------------------------------------------------' + */ + [_ADJUST] = { + // LEFT SIDE (index 0 to 3) + ENCODER_CCW_CW(_______, _______), + ENCODER_CCW_CW(_______, _______), + ENCODER_CCW_CW(UG_NEXT, UG_PREV), + ENCODER_CCW_CW(UG_VALD, UG_VALU), + // RIGHT SIDE (index 4 to 7) + ENCODER_CCW_CW(_______, _______), + ENCODER_CCW_CW(_______, _______), + ENCODER_CCW_CW(UG_SATD, UG_SATU), + ENCODER_CCW_CW(UG_HUEU, UG_HUED) + } +}; +#endif /* clang-format on */ #ifdef AUDIO_ENABLE @@ -161,11 +217,18 @@ float plover_song[][2] = SONG(PLOVER_SOUND); float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND); #endif +bool play_encoder_melody(uint8_t index, bool clockwise); + 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) { +#ifdef ENCODER_MAP_ENABLE + if (IS_ENCODEREVENT(record->event) && record->event.pressed) { + play_encoder_melody(record->event.key.col, record->event.type == ENCODER_CCW_EVENT); + } +#endif switch (keycode) { case QWERTY: if (record->event.pressed) { @@ -228,13 +291,13 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { /* clang-format off */ float melody[8][2][2] = { - {{440.0f, 8}, {440.0f, 24}}, - {{440.0f, 8}, {440.0f, 24}}, - {{440.0f, 8}, {440.0f, 24}}, - {{440.0f, 8}, {440.0f, 24}}, - {{440.0f, 8}, {440.0f, 24}}, - {{440.0f, 8}, {440.0f, 24}}, - {{440.0f, 8}, {440.0f, 24}}, + {{440.0f, 8}, {440.0f, 24}}, + {{440.0f, 8}, {440.0f, 24}}, + {{440.0f, 8}, {440.0f, 24}}, + {{440.0f, 8}, {440.0f, 24}}, + {{440.0f, 8}, {440.0f, 24}}, + {{440.0f, 8}, {440.0f, 24}}, + {{440.0f, 8}, {440.0f, 24}}, {{440.0f, 8}, {440.0f, 24}}, }; /* clang-format on */ @@ -251,7 +314,7 @@ float melody[8][2][2] = { #define ET12_MAJOR_THIRD 1.259921 #define ET12_PERFECT_FOURTH 1.33484 #define ET12_TRITONE 1.414214 -#define ET12_PERFECT_FIFTH 1.498307 +#define ET12_PERFECT_FIFTH 1.498307 deferred_token tokens[8]; @@ -260,7 +323,7 @@ uint32_t reset_note(uint32_t trigger_time, void *note) { return 0; } -bool encoder_update_user(uint8_t index, bool clockwise) { +bool play_encoder_melody(uint8_t index, bool clockwise) { cancel_deferred_exec(tokens[index]); if (clockwise) { melody[index][1][0] = melody[index][1][0] * ET12_MINOR_SECOND; @@ -275,6 +338,10 @@ bool encoder_update_user(uint8_t index, bool clockwise) { return false; } +bool encoder_update_user(uint8_t index, bool clockwise) { + return play_encoder_melody(index, clockwise); +} + bool dip_switch_update_user(uint8_t index, bool active) { switch (index) { case 0: { @@ -303,4 +370,4 @@ bool dip_switch_update_user(uint8_t index, bool active) { } } return true; -}
\ No newline at end of file +} diff --git a/keyboards/planck/rev7/matrix.c b/keyboards/planck/rev7/matrix.c index 777bd6a7fe..44f532db65 100644 --- a/keyboards/planck/rev7/matrix.c +++ b/keyboards/planck/rev7/matrix.c @@ -111,13 +111,21 @@ bool matrix_scan_custom(matrix_row_t current_matrix[]) { return changed; } +#if defined(ENCODER_ENABLE) || defined(ENCODER_MAP_ENABLE) +#if !defined(PLANCK_ENCODER_SETTLE_PIN_STATE_DELAY) +# define PLANCK_ENCODER_SETTLE_PIN_STATE_DELAY 10 +#endif + +void encoder_quadrature_init_pin(uint8_t index, bool pad_b) { +} + uint8_t encoder_quadrature_read_pin(uint8_t index, bool pad_b) { - pin_t pin = pad_b ? B13: B12; - gpio_set_pin_input_high(pin); - gpio_write_pin_low(matrix_row_pins[index]); - wait_us(10); - uint8_t ret = gpio_read_pin(pin) ? 1 : 0; - gpio_set_pin_input_low(matrix_row_pins[index]); - gpio_set_pin_input_low(pin); + pin_t col_pin = pad_b ? B13 : B12; + gpio_set_pin_output(col_pin); + gpio_write_pin_high(col_pin); + wait_us(PLANCK_ENCODER_SETTLE_PIN_STATE_DELAY); + uint8_t ret = gpio_read_pin(matrix_row_pins[index]) ? 0 : 1; + gpio_set_pin_input_low(col_pin); return ret; } +#endif // ENCODER_ENABLE || ENCODER_MAP_ENABLE diff --git a/keyboards/planck/rev7/readme.md b/keyboards/planck/rev7/readme.md index 6a4df37704..940976bfce 100644 --- a/keyboards/planck/rev7/readme.md +++ b/keyboards/planck/rev7/readme.md @@ -14,7 +14,8 @@ See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_to ## Encoders -Encoders must have matching pulse & detent resolutions (e.g. 24/24) for the scanning to work properly. Multiple encoders can be used at the same time, and are zero-indexed (compared to being one-indexed on the PCB's silkscreen) in the `encoder_update_user(uint8_t index, bool clockwise)` function: +Encoders must have matching pulse & detent resolutions (e.g. 24/24) for the scanning to work properly. Multiple encoders can be used at the same time. +If an encoder has a switch built-in, it's connected to the key at that location with index number: ``` ,-----------------------------------------------------------------------------------. @@ -28,7 +29,35 @@ Encoders must have matching pulse & detent resolutions (e.g. 24/24) for the scan `-----------------------------------------------------------------------------------' ``` -If an encoder has a switch built-in, it's connected to the key at that location. On the default keymap, each encoder will play its own rising/falling tone sequence when rotated, and will reset the pitch after one second of inactivity. The encoder map feature is not currently supported. +Planck rev7 supports `ENCODER_ENABLE` and `ENCODER_MAP_ENABLE`. If both `ENCODER_MAP_ENABLE` and `ENCODER_ENABLE` are defined, `ENCODER_MAP_ENABLE` takes precedence. On the default keymap, each encoder will play its own rising/falling tone sequence when rotated, and will reset the pitch after one second of inactivity. + +### With ENCODER_ENABLE + +Define it as follows in `rules.mk`: + +``` +ENCODER_ENABLE = yes +``` + +Zero-indexed (compared to being one-indexed on the PCB's silkscreen) in the `encoder_update_user(uint8_t index, bool clockwise)` function. + +### With ENCODER_MAP_ENABLE + +Define it as follows in `rules.mk`: + +``` +ENCODER_ENABLE = yes +ENCODER_MAP_ENABLE = yes +``` + +If you enable `ENCODER_MAP_ENABLE`, define `const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS]` and configure your keycodes. If you enable `ENCODER_MAP_ENABLE`, `encoder_update_user` is not used directly. + +Additionally, you can use the following `config.h` options: + +```c +#define ENCODER_MAP_KEY_DELAY 10 +#define ENCODER_RESOLUTION 4 +``` ## Some Planck-specific config.h options: @@ -37,6 +66,6 @@ If an encoder has a switch built-in, it's connected to the key at that location. #define PLANCK_WATCHDOG_TIMEOUT 1.0 // disables the watchdog timer - you may want to disable the watchdog timer if you use longer macros #define PLANCK_WATCHDOG_DISABLE -// the resolution of the encoders used in the encoder matrix -#define PLANCK_ENCODER_RESOLUTION 4 +// Sets the time to wait for the rotary encoder pin state to stabilize while scanning (Default is 20(us)) +#define PLANCK_ENCODER_SETTLE_PIN_STATE_DELAY 20 ``` diff --git a/keyboards/ploopyco/mouse/config.h b/keyboards/ploopyco/mouse/config.h index 0375a8875a..0f8774dcd7 100644 --- a/keyboards/ploopyco/mouse/config.h +++ b/keyboards/ploopyco/mouse/config.h @@ -38,5 +38,5 @@ /* Custom encoder needs to specify just how many encoders we have */ #define NUM_ENCODERS 1 -#define ENCODERS_PAD_A { F0 } -#define ENCODERS_PAD_B { F4 } +#define ENCODER_A_PINS { F0 } +#define ENCODER_B_PINS { F4 } diff --git a/keyboards/ploopyco/ploopyco.c b/keyboards/ploopyco/ploopyco.c index e4726238f2..a6f76203d6 100644 --- a/keyboards/ploopyco/ploopyco.c +++ b/keyboards/ploopyco/ploopyco.c @@ -71,8 +71,8 @@ float scroll_accumulated_v = 0; #ifdef ENCODER_ENABLE uint16_t lastScroll = 0; // Previous confirmed wheel event uint16_t lastMidClick = 0; // Stops scrollwheel from being read if it was pressed -pin_t encoder_pins_a[1] = ENCODERS_PAD_A; -pin_t encoder_pins_b[1] = ENCODERS_PAD_B; +pin_t encoder_pins_a[1] = ENCODER_A_PINS; +pin_t encoder_pins_b[1] = ENCODER_B_PINS; bool debug_encoder = false; bool encoder_update_kb(uint8_t index, bool clockwise) { diff --git a/keyboards/ploopyco/trackball/config.h b/keyboards/ploopyco/trackball/config.h index 80457d062a..2aac27437a 100644 --- a/keyboards/ploopyco/trackball/config.h +++ b/keyboards/ploopyco/trackball/config.h @@ -38,5 +38,5 @@ /* Custom encoder needs to specify just how many encoders we have */ #define NUM_ENCODERS 1 -#define ENCODERS_PAD_A { F0 } -#define ENCODERS_PAD_B { F4 } +#define ENCODER_A_PINS { F0 } +#define ENCODER_B_PINS { F4 } diff --git a/keyboards/ploopyco/trackball_mini/config.h b/keyboards/ploopyco/trackball_mini/config.h index c5d2d5694e..2e0b570bba 100644 --- a/keyboards/ploopyco/trackball_mini/config.h +++ b/keyboards/ploopyco/trackball_mini/config.h @@ -38,5 +38,5 @@ /* Custom encoder needs to specify just how many encoders we have */ #define NUM_ENCODERS 1 -#define ENCODERS_PAD_A { F0 } -#define ENCODERS_PAD_B { F4 } +#define ENCODER_A_PINS { F0 } +#define ENCODER_B_PINS { F4 } diff --git a/keyboards/ploopyco/trackball_thumb/config.h b/keyboards/ploopyco/trackball_thumb/config.h index 631456d9d3..f03ffc7699 100644 --- a/keyboards/ploopyco/trackball_thumb/config.h +++ b/keyboards/ploopyco/trackball_thumb/config.h @@ -42,5 +42,5 @@ /* Custom encoder needs to specify just how many encoders we have */ #define NUM_ENCODERS 1 -#define ENCODERS_PAD_A { F4 } -#define ENCODERS_PAD_B { F0 } +#define ENCODER_A_PINS { F4 } +#define ENCODER_B_PINS { F0 } diff --git a/keyboards/pluckey/keyboard.json b/keyboards/pluckey/keyboard.json index 9517bf54b4..57f6b2467f 100644 --- a/keyboards/pluckey/keyboard.json +++ b/keyboards/pluckey/keyboard.json @@ -35,13 +35,15 @@ }, "split": { "enabled": true, - "soft_serial_pin": "D2", "encoder": { "right": { "rotary": [ {"pin_a": "B2", "pin_b": "B3", "resolution": 2} ] } + }, + "serial": { + "pin": "D2" } }, "processor": "atmega32u4", diff --git a/keyboards/pmk/posey_split/v4/keyboard.json b/keyboards/pmk/posey_split/v4/keyboard.json index 016c4d7122..e27991783d 100644 --- a/keyboards/pmk/posey_split/v4/keyboard.json +++ b/keyboards/pmk/posey_split/v4/keyboard.json @@ -42,6 +42,9 @@ "enabled": true, "handedness": { "pin": "GP18" + }, + "serial": { + "driver": "vendor" } }, "tags": ["split"], diff --git a/keyboards/pmk/posey_split/v4/rules.mk b/keyboards/pmk/posey_split/v4/rules.mk deleted file mode 100644 index 743228e94b..0000000000 --- a/keyboards/pmk/posey_split/v4/rules.mk +++ /dev/null @@ -1 +0,0 @@ -SERIAL_DRIVER = vendor
\ No newline at end of file diff --git a/keyboards/pmk/posey_split/v5/keyboard.json b/keyboards/pmk/posey_split/v5/keyboard.json index 9ef7d0af02..02c04dbba2 100644 --- a/keyboards/pmk/posey_split/v5/keyboard.json +++ b/keyboards/pmk/posey_split/v5/keyboard.json @@ -42,6 +42,9 @@ "enabled": true, "handedness": { "pin": "GP18" + }, + "serial": { + "driver": "vendor" } }, "tags": ["split"], diff --git a/keyboards/pmk/posey_split/v5/rules.mk b/keyboards/pmk/posey_split/v5/rules.mk deleted file mode 100644 index 743228e94b..0000000000 --- a/keyboards/pmk/posey_split/v5/rules.mk +++ /dev/null @@ -1 +0,0 @@ -SERIAL_DRIVER = vendor
\ No newline at end of file diff --git a/keyboards/pmk/recore/v3/keyboard.json b/keyboards/pmk/recore/v3/keyboard.json index 6bc095daa5..f21708adc5 100644 --- a/keyboards/pmk/recore/v3/keyboard.json +++ b/keyboards/pmk/recore/v3/keyboard.json @@ -40,6 +40,9 @@ "enabled": true, "handedness": { "pin": "GP18" + }, + "serial": { + "driver": "vendor" } }, "tags": ["ortho", "split"], diff --git a/keyboards/pmk/recore/v3/rules.mk b/keyboards/pmk/recore/v3/rules.mk deleted file mode 100644 index 161ec22b16..0000000000 --- a/keyboards/pmk/recore/v3/rules.mk +++ /dev/null @@ -1 +0,0 @@ -SERIAL_DRIVER = vendor diff --git a/keyboards/pom_keyboards/tnln95/keyboard.json b/keyboards/pom_keyboards/tnln95/keyboard.json index c92ac5b38f..09b3f71f7c 100644 --- a/keyboards/pom_keyboards/tnln95/keyboard.json +++ b/keyboards/pom_keyboards/tnln95/keyboard.json @@ -37,6 +37,10 @@ "levels": 10, "breathing": true }, + "indicators": { + "caps_lock": "B2", + "num_lock": "B1" + }, "rgblight": { "saturation_steps": 8, "brightness_steps": 8, diff --git a/keyboards/pom_keyboards/tnln95/tnln95.c b/keyboards/pom_keyboards/tnln95/tnln95.c deleted file mode 100644 index b8ab8ff7a7..0000000000 --- a/keyboards/pom_keyboards/tnln95/tnln95.c +++ /dev/null @@ -1,35 +0,0 @@ -/* Copyright 2020 Nguyen Minh Hoang - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ -#include "quantum.h" - -void keyboard_pre_init_kb(void) { - gpio_set_pin_output(B1); - gpio_set_pin_output(B2); - /* I will add function to these later */ - // gpio_set_pin_output(B3); - // gpio_set_pin_output(E2); - - keyboard_pre_init_user(); -} - -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if(res) { - gpio_write_pin(B1, led_state.num_lock); - gpio_write_pin(B2, led_state.caps_lock); - } - return res; -} diff --git a/keyboards/printedpad/keymaps/default/keymap.c b/keyboards/printedpad/keymaps/default/keymap.c index 2126dc593f..97893af0e0 100644 --- a/keyboards/printedpad/keymaps/default/keymap.c +++ b/keyboards/printedpad/keymaps/default/keymap.c @@ -42,4 +42,29 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_V, KC_W, KC_X, KC_Y, KC_Z, KC_ENT ) -};
\ No newline at end of file +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch(keycode) { + case LT(0, KC_NO): + if (record->event.pressed) { + // on tap + if (record->tap.count) { + if (get_highest_layer(layer_state) >= 3) { + layer_clear(); + } else { + layer_move(get_highest_layer(layer_state) + 1); + } + } +#ifdef OLED_ENABLE + // on hold + else { + void oled_display_mode_step(void); + oled_display_mode_step(); + } +#endif + } + return false; + } + return true; +} diff --git a/keyboards/printedpad/keymaps/via/keymap.c b/keyboards/printedpad/keymaps/via/keymap.c index 2126dc593f..97893af0e0 100644 --- a/keyboards/printedpad/keymaps/via/keymap.c +++ b/keyboards/printedpad/keymaps/via/keymap.c @@ -42,4 +42,29 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_V, KC_W, KC_X, KC_Y, KC_Z, KC_ENT ) -};
\ No newline at end of file +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch(keycode) { + case LT(0, KC_NO): + if (record->event.pressed) { + // on tap + if (record->tap.count) { + if (get_highest_layer(layer_state) >= 3) { + layer_clear(); + } else { + layer_move(get_highest_layer(layer_state) + 1); + } + } +#ifdef OLED_ENABLE + // on hold + else { + void oled_display_mode_step(void); + oled_display_mode_step(); + } +#endif + } + return false; + } + return true; +} diff --git a/keyboards/printedpad/oled.c b/keyboards/printedpad/oled.c index a41fad7767..e5abcbfc0a 100644 --- a/keyboards/printedpad/oled.c +++ b/keyboards/printedpad/oled.c @@ -1,15 +1,22 @@ // Copyright 2023 Noah Beidelman (@noahbei) // SPDX-License-Identifier: GPL-2.0-or-later -#include "printedpad.h" - -#ifdef OLED_ENABLE -static void flash_current_layer(void); +#include "quantum.h" #define FRAME_DURATION 200 -uint32_t animation_timer = 0; -uint8_t current_frame = 0; +static uint32_t animation_timer = 0; +static uint8_t current_frame = 0; + +static uint32_t flash_timer = 0; +static bool layer_changed = false; + +static uint8_t current_display_mode = 0; + +static bool key_pressed = false; + +static void flash_current_layer(void); + static void render_animation(void) { // 'monkeylong26', 128x32px @@ -1391,12 +1398,16 @@ static void render_logo(void) { oled_write_raw_P(prota, sizeof(prota)); } -bool logo_rendered = false; +void oled_display_mode_step(void) { + current_display_mode = (current_display_mode + 1) % 3; +} bool oled_task_kb(void) { if (!oled_task_user()) { return false; } + + static bool logo_rendered = false; if (!logo_rendered) { render_logo(); if (timer_read() > 2500) @@ -1417,4 +1428,17 @@ bool oled_task_kb(void) { } return false; } -#endif + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + key_pressed = record->event.pressed; + + return process_record_user(keycode, record); +} + +// when the layer is changed, flash the layer number on the screen +layer_state_t layer_state_set_kb(layer_state_t state) { + flash_timer = timer_read(); + layer_changed = true; + + return layer_state_set_user(state); +} diff --git a/keyboards/printedpad/post_rules.mk b/keyboards/printedpad/post_rules.mk new file mode 100644 index 0000000000..1c8e68dfd0 --- /dev/null +++ b/keyboards/printedpad/post_rules.mk @@ -0,0 +1,3 @@ +ifeq ($(strip $(OLED_ENABLE)), yes) + SRC += oled.c +endif diff --git a/keyboards/printedpad/printedpad.c b/keyboards/printedpad/printedpad.c index 4e3354c028..a91e8d5ea4 100644 --- a/keyboards/printedpad/printedpad.c +++ b/keyboards/printedpad/printedpad.c @@ -1,57 +1,8 @@ // Copyright 2023 Noah Beidelman (@noahbei) // SPDX-License-Identifier: GPL-2.0-or-later -#include QMK_KEYBOARD_H -#include "printedpad.h" +#include "quantum.h" void board_init(void) { SYSCFG->CFGR1 |= SYSCFG_CFGR1_I2C1_DMA_RMP; } - -const uint8_t max_layer = 3; -uint8_t current_display_mode = 0; - -bool key_pressed = false; - -bool process_record_kb(uint16_t keycode, keyrecord_t *record) { - if (!process_record_user(keycode, record)) { - return false; - } -#ifdef OLED_ENABLE - key_pressed = record->event.pressed; -#endif - switch(keycode) { - case LT(0, KC_NO): - if (record->event.pressed) { - // on tap - if (record->tap.count) { - if (get_highest_layer(layer_state) >= max_layer) { - layer_clear(); - } else { - layer_move(get_highest_layer(layer_state) + 1); - } - } -#ifdef OLED_ENABLE - // on hold - else { - current_display_mode = (current_display_mode + 1) % 3; - } -#endif - } - return false; - } - return true; -} - -#ifdef OLED_ENABLE -uint32_t flash_timer = 0; -bool layer_changed = false; - -// when the layer is changed, flash the layer number on the screen -layer_state_t layer_state_set_kb(layer_state_t state) { - flash_timer = timer_read(); - layer_changed = true; - - return layer_state_set_user(state); -} -#endif
\ No newline at end of file diff --git a/keyboards/printedpad/printedpad.h b/keyboards/printedpad/printedpad.h deleted file mode 100644 index 17c23be69b..0000000000 --- a/keyboards/printedpad/printedpad.h +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright 2023 Noah Beidelman (@noahbei) -// SPDX-License-Identifier: GPL-2.0-or-later - -#pragma once - -#include "quantum.h" - -//for oled key press -extern bool key_pressed; - -// for changing oled display mode -extern uint8_t current_display_mode; - -//for determining when the layer is changed and having a timer for how long we flash the layer -extern uint32_t flash_timer; -extern bool layer_changed; diff --git a/keyboards/printedpad/rules.mk b/keyboards/printedpad/rules.mk deleted file mode 100644 index 5ab52a55a0..0000000000 --- a/keyboards/printedpad/rules.mk +++ /dev/null @@ -1 +0,0 @@ -SRC += oled.c
\ No newline at end of file diff --git a/keyboards/projectd/75/ansi/ansi.c b/keyboards/projectd/75/ansi/ansi.c index 8257cf39c2..3bb695b559 100644 --- a/keyboards/projectd/75/ansi/ansi.c +++ b/keyboards/projectd/75/ansi/ansi.c @@ -162,6 +162,9 @@ bool rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) { } bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + if (!process_record_user(keycode, record)) { + return false; + } switch (keycode) { diff --git a/keyboards/projectkb/alice/alice.c b/keyboards/projectkb/alice/alice.c deleted file mode 100644 index 8ec5f16736..0000000000 --- a/keyboards/projectkb/alice/alice.c +++ /dev/null @@ -1,20 +0,0 @@ -#include "quantum.h" - -void keyboard_pre_init_kb(void) { - gpio_set_pin_output(INDICATOR_PIN_0); - gpio_set_pin_output(INDICATOR_PIN_1); - gpio_set_pin_output(INDICATOR_PIN_2); - - keyboard_pre_init_user(); -} - - -bool led_update_kb(led_t led_state) { - bool runDefault = led_update_user(led_state); - if (runDefault) { - gpio_write_pin(INDICATOR_PIN_0, !led_state.num_lock); - gpio_write_pin(INDICATOR_PIN_1, !led_state.caps_lock); - gpio_write_pin(INDICATOR_PIN_2, !led_state.scroll_lock); - } - return runDefault; -} diff --git a/keyboards/projectkb/alice/rev1/config.h b/keyboards/projectkb/alice/rev1/config.h index 66d3b75731..b8c68bc65d 100644 --- a/keyboards/projectkb/alice/rev1/config.h +++ b/keyboards/projectkb/alice/rev1/config.h @@ -26,10 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define WS2812_SPI_SCK_PAL_MODE 0 #define WS2812_SPI_SCK_PIN B13 -#define INDICATOR_PIN_0 A0 -#define INDICATOR_PIN_1 A1 -#define INDICATOR_PIN_2 A2 - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/projectkb/alice/rev1/keyboard.json b/keyboards/projectkb/alice/rev1/keyboard.json index 7e957d7ff4..01eee1300b 100644 --- a/keyboards/projectkb/alice/rev1/keyboard.json +++ b/keyboards/projectkb/alice/rev1/keyboard.json @@ -15,6 +15,11 @@ "resync": true } }, + "indicators": { + "caps_lock": "A1", + "num_lock": "A0", + "scroll_lock": "A2" + }, "rgblight": { "led_count": 14, "animations": { diff --git a/keyboards/projectkb/alice/rev2/config.h b/keyboards/projectkb/alice/rev2/config.h index 3e786c1805..b8c68bc65d 100644 --- a/keyboards/projectkb/alice/rev2/config.h +++ b/keyboards/projectkb/alice/rev2/config.h @@ -26,10 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define WS2812_SPI_SCK_PAL_MODE 0 #define WS2812_SPI_SCK_PIN B13 -#define INDICATOR_PIN_0 A9 -#define INDICATOR_PIN_1 A8 -#define INDICATOR_PIN_2 B12 - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/projectkb/alice/rev2/keyboard.json b/keyboards/projectkb/alice/rev2/keyboard.json index 639fc26877..0e34b7104f 100644 --- a/keyboards/projectkb/alice/rev2/keyboard.json +++ b/keyboards/projectkb/alice/rev2/keyboard.json @@ -15,6 +15,11 @@ "resync": true } }, + "indicators": { + "caps_lock": "A8", + "num_lock": "A9", + "scroll_lock": "B12" + }, "rgblight": { "led_count": 14, "animations": { diff --git a/keyboards/pteron36/keyboard.json b/keyboards/pteron36/keyboard.json index abd94d599a..2000593e62 100644 --- a/keyboards/pteron36/keyboard.json +++ b/keyboards/pteron36/keyboard.json @@ -40,13 +40,15 @@ }, "split": { "enabled": true, - "soft_serial_pin": "D3", "encoder": { "right": { "rotary": [ {"pin_a": "F4", "pin_b": "F5"} ] } + }, + "serial": { + "pin": "D3" } }, "rgblight": { diff --git a/keyboards/punk75/config.h b/keyboards/punk75/config.h deleted file mode 100644 index 321865330c..0000000000 --- a/keyboards/punk75/config.h +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 2020 dsanchezseco - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#pragma once - -#define LED A0 diff --git a/keyboards/punk75/keyboard.json b/keyboards/punk75/keyboard.json index dd084a147c..c7082e564f 100644 --- a/keyboards/punk75/keyboard.json +++ b/keyboards/punk75/keyboard.json @@ -32,6 +32,10 @@ {"pin_a": "B1", "pin_b": "B0"} ] }, + "indicators": { + "caps_lock": "A0", + "on_state": 0 + }, "processor": "atmega32a", "bootloader": "usbasploader", "community_layouts": ["ortho_5x15"], diff --git a/keyboards/punk75/keymaps/default/keymap.c b/keyboards/punk75/keymaps/default/keymap.c index 9a6ef29307..57f00e1e61 100644 --- a/keyboards/punk75/keymaps/default/keymap.c +++ b/keyboards/punk75/keymaps/default/keymap.c @@ -74,7 +74,7 @@ void led_keypress_update(pin_t led_pin, uint16_t keycode, keyrecord_t *record) { bool process_record_user(uint16_t keycode, keyrecord_t *record) { // Update LED state - led_keypress_update(LED, keycode, record); + led_keypress_update(LED_CAPS_LOCK_PIN, keycode, record); return true; } diff --git a/keyboards/punk75/keymaps/via/keymap.c b/keyboards/punk75/keymaps/via/keymap.c index 72ef91fd37..214135b55d 100644 --- a/keyboards/punk75/keymaps/via/keymap.c +++ b/keyboards/punk75/keymaps/via/keymap.c @@ -69,7 +69,7 @@ void led_keypress_update(pin_t led_pin, uint16_t keycode, keyrecord_t *record) { bool process_record_user(uint16_t keycode, keyrecord_t *record) { // Update LED state - led_keypress_update(LED, keycode, record); + led_keypress_update(LED_CAPS_LOCK_PIN, keycode, record); return true; } diff --git a/keyboards/punk75/punk75.c b/keyboards/punk75/punk75.c deleted file mode 100644 index 8d9d09d43c..0000000000 --- a/keyboards/punk75/punk75.c +++ /dev/null @@ -1,32 +0,0 @@ -/* Copyright 2020 dsanchezseco - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -#include "quantum.h" - -void matrix_init_kb(void) { - // Set our LED pin as output - gpio_set_pin_output(LED); - - matrix_init_user(); -} - -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if(res) { - gpio_write_pin(LED, !led_state.caps_lock); - } - return res; -} diff --git a/keyboards/quad_h/lb75/keyboard.json b/keyboards/quad_h/lb75/keyboard.json index 0a51d4f47f..e88ba4b3a4 100644 --- a/keyboards/quad_h/lb75/keyboard.json +++ b/keyboards/quad_h/lb75/keyboard.json @@ -33,6 +33,11 @@ "pin": "B7", "levels": 5 }, + "indicators": { + "caps_lock": "B1", + "scroll_lock": "B2", + "on_state": 0 + }, "ws2812": { "pin": "B0" }, diff --git a/keyboards/quad_h/lb75/lb75.c b/keyboards/quad_h/lb75/lb75.c deleted file mode 100644 index ef716092b9..0000000000 --- a/keyboards/quad_h/lb75/lb75.c +++ /dev/null @@ -1,39 +0,0 @@ -/* Copyright 2019 Ryota Goto - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ -#include "quantum.h" - - -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - - gpio_set_pin_output(B1); - gpio_set_pin_output(B2); - - matrix_init_user(); -} - -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - - if(res) { - gpio_write_pin(B1, !led_state.caps_lock); - gpio_write_pin(B2, !led_state.scroll_lock); - } - - return res; -} - diff --git a/keyboards/quokka/keyboard.json b/keyboards/quokka/keyboard.json index 094e3e496e..b04f569c8c 100644 --- a/keyboards/quokka/keyboard.json +++ b/keyboards/quokka/keyboard.json @@ -66,7 +66,10 @@ }, "split": { "enabled": true, - "soft_serial_pin": "GP0" + "serial": { + "driver": "vendor", + "pin": "GP0" + } }, "url": "https://github.com/dlford/quokka", "usb": { diff --git a/keyboards/quokka/rules.mk b/keyboards/quokka/rules.mk deleted file mode 100644 index 161ec22b16..0000000000 --- a/keyboards/quokka/rules.mk +++ /dev/null @@ -1 +0,0 @@ -SERIAL_DRIVER = vendor diff --git a/keyboards/qwertyydox/keymaps/default/config.h b/keyboards/qwertyydox/keymaps/default/config.h index 504bee96de..5e2d6c7cd0 100644 --- a/keyboards/qwertyydox/keymaps/default/config.h +++ b/keyboards/qwertyydox/keymaps/default/config.h @@ -18,7 +18,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once /* Select hand configuration */ - -// #define MASTER_LEFT #define MASTER_RIGHT -// #define EE_HANDS + diff --git a/keyboards/qwertyydox/rev1/keyboard.json b/keyboards/qwertyydox/rev1/keyboard.json index f2a335aa02..24284ff8c0 100644 --- a/keyboards/qwertyydox/rev1/keyboard.json +++ b/keyboards/qwertyydox/rev1/keyboard.json @@ -40,7 +40,9 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D0" + "serial": { + "pin": "D0" + } }, "qmk": { "locking": { diff --git a/keyboards/rainkeebs/trailmix/keyboard.json b/keyboards/rainkeebs/trailmix/keyboard.json index 7b3cfdfcdd..b871a8c9af 100644 --- a/keyboards/rainkeebs/trailmix/keyboard.json +++ b/keyboards/rainkeebs/trailmix/keyboard.json @@ -30,7 +30,9 @@ ] } }, - "soft_serial_pin": "D3" + "serial": { + "pin": "D3" + } }, "url": "https://www.rainkeebs.mx", "usb": { diff --git a/keyboards/rate/pistachio_pro/matrix.c b/keyboards/rate/pistachio_pro/matrix.c index f235c65f56..e40d3edd81 100644 --- a/keyboards/rate/pistachio_pro/matrix.c +++ b/keyboards/rate/pistachio_pro/matrix.c @@ -20,53 +20,53 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; -static inline void setPinOutput_writeLow(pin_t pin) { +static inline void gpio_atomic_set_pin_output_low(pin_t pin) { ATOMIC_BLOCK_FORCEON { gpio_set_pin_output(pin); gpio_write_pin_low(pin); } } -static inline void setPinInputHigh_atomic(pin_t pin) { +static inline void gpio_atomic_set_pin_input_high(pin_t pin) { ATOMIC_BLOCK_FORCEON { gpio_set_pin_input_high(pin); } } static void select_row(uint8_t row) { - setPinOutput_writeLow(row_pins[row]); + gpio_atomic_set_pin_output_low(row_pins[row]); } static void unselect_row(uint8_t row) { - setPinInputHigh_atomic(row_pins[row]); + gpio_atomic_set_pin_input_high(row_pins[row]); } static void unselect_rows(void) { for (uint8_t x = 0; x < MATRIX_ROWS; x++) { - setPinInputHigh_atomic(row_pins[x]); + gpio_atomic_set_pin_input_high(row_pins[x]); } } static void select_col(uint8_t col) { - setPinOutput_writeLow(col_pins[col]); + gpio_atomic_set_pin_output_low(col_pins[col]); } static void unselect_col(uint8_t col) { - setPinInputHigh_atomic(col_pins[col]); + gpio_atomic_set_pin_input_high(col_pins[col]); } static void unselect_cols(void) { for (uint8_t x = 0; x < MATRIX_COLS; x++) { - setPinInputHigh_atomic(col_pins[x]); + gpio_atomic_set_pin_input_high(col_pins[x]); } } static void init_pins(void) { unselect_rows(); for (uint8_t x = 0; x < MATRIX_COLS; x++) { - setPinInputHigh_atomic(col_pins[x]); + gpio_atomic_set_pin_input_high(col_pins[x]); } unselect_cols(); for (uint8_t x = 0; x < MATRIX_ROWS; x++) { - setPinInputHigh_atomic(row_pins[x]); + gpio_atomic_set_pin_input_high(row_pins[x]); } } diff --git a/keyboards/recompile_keys/choco60/rev1/config.h b/keyboards/recompile_keys/choco60/rev1/config.h deleted file mode 100644 index ba9e3a474e..0000000000 --- a/keyboards/recompile_keys/choco60/rev1/config.h +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 2019 Naoto Takai - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#pragma once - -#define SPLIT_HAND_PIN D0 diff --git a/keyboards/recompile_keys/choco60/rev1/keyboard.json b/keyboards/recompile_keys/choco60/rev1/keyboard.json index 916c3de8d0..4e5a8903bd 100644 --- a/keyboards/recompile_keys/choco60/rev1/keyboard.json +++ b/keyboards/recompile_keys/choco60/rev1/keyboard.json @@ -12,7 +12,12 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D3" + "handedness": { + "pin": "D0" + }, + "serial": { + "pin": "D3" + } }, "processor": "atmega32u4", "bootloader": "caterina" diff --git a/keyboards/recompile_keys/choco60/rev2/config.h b/keyboards/recompile_keys/choco60/rev2/config.h index e081d748ce..35a347ee91 100644 --- a/keyboards/recompile_keys/choco60/rev2/config.h +++ b/keyboards/recompile_keys/choco60/rev2/config.h @@ -17,6 +17,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -#define SPLIT_HAND_PIN D1 - #define SPLIT_USB_DETECT diff --git a/keyboards/recompile_keys/choco60/rev2/keyboard.json b/keyboards/recompile_keys/choco60/rev2/keyboard.json index fbc947a9f0..84ca0bd9a1 100644 --- a/keyboards/recompile_keys/choco60/rev2/keyboard.json +++ b/keyboards/recompile_keys/choco60/rev2/keyboard.json @@ -12,7 +12,12 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D0", + "handedness": { + "pin": "D1" + }, + "serial": { + "pin": "D0" + }, "matrix_pins": { "right": { "cols": ["C7", "B7", "B6", "B5", "B4", "B3", "B2", "C6", "D4"], diff --git a/keyboards/recompile_keys/cocoa40/keyboard.json b/keyboards/recompile_keys/cocoa40/keyboard.json index f964ff6621..45f0cba2ff 100644 --- a/keyboards/recompile_keys/cocoa40/keyboard.json +++ b/keyboards/recompile_keys/cocoa40/keyboard.json @@ -23,7 +23,12 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D2" + "handedness": { + "pin": "D3" + }, + "serial": { + "pin": "D2" + } }, "processor": "atmega32u4", "bootloader": "caterina", diff --git a/keyboards/redox/keymaps/default/config.h b/keyboards/redox/keymaps/default/config.h index ab4d588cb0..8c49d47026 100644 --- a/keyboards/redox/keymaps/default/config.h +++ b/keyboards/redox/keymaps/default/config.h @@ -17,11 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Select hand configuration */ -#define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS - #undef RGBLIGHT_LED_COUNT #define RGBLIGHT_EFFECT_BREATHING #define RGBLIGHT_EFFECT_RAINBOW_MOOD diff --git a/keyboards/redox/keymaps/via/config.h b/keyboards/redox/keymaps/via/config.h index 7b9be07d97..839e53b0f9 100644 --- a/keyboards/redox/keymaps/via/config.h +++ b/keyboards/redox/keymaps/via/config.h @@ -17,11 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Select hand configuration */ -#define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS - #undef RGBLIGHT_LED_COUNT #define RGBLIGHT_EFFECT_BREATHING #define RGBLIGHT_EFFECT_RAINBOW_MOOD diff --git a/keyboards/redox/rev1/base/keyboard.json b/keyboards/redox/rev1/base/keyboard.json index a4a3f3fe96..e6fa9fc692 100644 --- a/keyboards/redox/rev1/base/keyboard.json +++ b/keyboards/redox/rev1/base/keyboard.json @@ -8,7 +8,9 @@ }, "diode_direction": "COL2ROW", "split": { - "soft_serial_pin": "D0" + "serial": { + "pin": "D0" + } }, "ws2812": { "pin": "D3" diff --git a/keyboards/redox/rev1/proton_c/keyboard.json b/keyboards/redox/rev1/proton_c/keyboard.json index 48bec82627..9554630375 100644 --- a/keyboards/redox/rev1/proton_c/keyboard.json +++ b/keyboards/redox/rev1/proton_c/keyboard.json @@ -2,6 +2,11 @@ "usb": { "device_version": "1.0.1" }, + "split": { + "serial": { + "driver": "usart" + } + }, "ws2812": { "pin": "A9" }, diff --git a/keyboards/redox/rev1/proton_c/rules.mk b/keyboards/redox/rev1/proton_c/rules.mk deleted file mode 100644 index d45b778a1a..0000000000 --- a/keyboards/redox/rev1/proton_c/rules.mk +++ /dev/null @@ -1,2 +0,0 @@ -# specific to using the serial serial driver -SERIAL_DRIVER = usart diff --git a/keyboards/redox_media/keyboard.json b/keyboards/redox_media/keyboard.json index baf1cfeb43..83057da79f 100644 --- a/keyboards/redox_media/keyboard.json +++ b/keyboards/redox_media/keyboard.json @@ -33,7 +33,9 @@ }, "split": { "enabled": true, - "soft_serial_pin": "D0" + "serial": { + "pin": "D0" + } }, "processor": "atmega32u4", "bootloader": "caterina", diff --git a/keyboards/redox_media/keymaps/default/config.h b/keyboards/redox_media/keymaps/default/config.h index 5970733b20..793c7a89bb 100644 --- a/keyboards/redox_media/keymaps/default/config.h +++ b/keyboards/redox_media/keymaps/default/config.h @@ -18,5 +18,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once /* Select hand configuration */ -// #define MASTER_LEFT #define EE_HANDS diff --git a/keyboards/redscarf_i/keyboard.json b/keyboards/redscarf_i/keyboard.json index 0a268169ef..6a186dff0b 100644 --- a/keyboards/redscarf_i/keyboard.json +++ b/keyboards/redscarf_i/keyboard.json @@ -25,6 +25,10 @@ "backlight": { "pin": "B5" }, + "indicators": { + "num_lock": "F7", + "on_state": 0 + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "community_layouts": ["ortho_5x4", "ortho_6x4", "numpad_5x4", "numpad_6x4"], diff --git a/keyboards/redscarf_i/redscarf_i.c b/keyboards/redscarf_i/redscarf_i.c index 949bc362ad..7544b89d17 100644 --- a/keyboards/redscarf_i/redscarf_i.c +++ b/keyboards/redscarf_i/redscarf_i.c @@ -18,21 +18,13 @@ void keyboard_pre_init_kb(void) { // initialize top row leds - gpio_set_pin_output(F7); gpio_set_pin_output(F6); gpio_set_pin_output(F5); // and then turn them off - gpio_write_pin_high(F7); gpio_write_pin_high(F6); gpio_write_pin_high(F5); -} -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if(res) { - gpio_write_pin(F7, !led_state.num_lock); - } - return res; + keyboard_pre_init_user(); } layer_state_t layer_state_set_kb(layer_state_t state) { diff --git a/keyboards/rgbkb/mun/rev1/keyboard.json b/keyboards/rgbkb/mun/rev1/keyboard.json index cf988d8f95..ec02a2f2dd 100644 --- a/keyboards/rgbkb/mun/rev1/keyboard.json +++ b/keyboards/rgbkb/mun/rev1/keyboard.json @@ -115,13 +115,16 @@ }, "split": { "enabled": true, - "soft_serial_pin": "A9", "transport": { "sync": { "indicators": true, "layer_state": true, "matrix_state": true } + }, + "serial": { + "driver": "usart", + "pin": "A9" } }, "processor": "STM32F303", diff --git a/keyboards/rgbkb/mun/rev1/rules.mk b/keyboards/rgbkb/mun/rev1/rules.mk index dad85ac483..da4bbf0a63 100644 --- a/keyboards/rgbkb/mun/rev1/rules.mk +++ b/keyboards/rgbkb/mun/rev1/rules.mk @@ -4,5 +4,4 @@ SRC += touch_encoder.c SRC += common_oled.c I2C_DRIVER_REQUIRED = yes -SERIAL_DRIVER = usart OPT = 3 diff --git a/keyboards/rgbkb/sol/keymaps/default/keymap.c b/keyboards/rgbkb/sol/keymaps/default/keymap.c index 4a6511cbfc..8997e9a582 100644 --- a/keyboards/rgbkb/sol/keymaps/default/keymap.c +++ b/keyboards/rgbkb/sol/keymaps/default/keymap.c @@ -201,7 +201,7 @@ const rgb_matrix_f rgb_matrix_functions[6][2] = { #ifdef ENCODER_ENABLE -static pin_t encoders_pad_a[] = ENCODERS_PAD_A; +static pin_t encoders_pad_a[] = ENCODER_A_PINS; #define NUMBER_OF_ENCODERS ARRAY_SIZE(encoders_pad_a) const uint16_t PROGMEM encoders[][NUMBER_OF_ENCODERS * 2][2] = { diff --git a/keyboards/rgbkb/sol/rev1/keyboard.json b/keyboards/rgbkb/sol/rev1/keyboard.json index 9607e76259..38932a78e1 100644 --- a/keyboards/rgbkb/sol/rev1/keyboard.json +++ b/keyboards/rgbkb/sol/rev1/keyboard.json @@ -92,7 +92,9 @@ }, "split": { "enabled": true, - "soft_serial_pin": "D3" + "serial": { + "pin": "D3" + } }, "tapping": { "term": 150 diff --git a/keyboards/rgbkb/sol/rev2/config.h b/keyboards/rgbkb/sol/rev2/config.h index ab5150051a..5867c6dfe3 100644 --- a/keyboards/rgbkb/sol/rev2/config.h +++ b/keyboards/rgbkb/sol/rev2/config.h @@ -49,12 +49,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // Encoder support #ifndef EXTRA_ENCODERS_ENABLE -#define ENCODERS_PAD_A { D2 } -#define ENCODERS_PAD_B { D6 } +#define ENCODER_A_PINS { D2 } +#define ENCODER_B_PINS { D6 } #else #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 } -#define ENCODERS_PAD_B { D6, B1, D0 } +#define ENCODER_A_PINS { D2, D1, B0 } +#define ENCODER_B_PINS { D6, B1, D0 } #endif diff --git a/keyboards/rgbkb/sol/rev2/keyboard.json b/keyboards/rgbkb/sol/rev2/keyboard.json index 1a5ca12ed9..b6bad358e3 100644 --- a/keyboards/rgbkb/sol/rev2/keyboard.json +++ b/keyboards/rgbkb/sol/rev2/keyboard.json @@ -90,7 +90,9 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D3" + "serial": { + "pin": "D3" + } }, "tapping": { "term": 150 diff --git a/keyboards/rgbkb/sol3/rev1/config.h b/keyboards/rgbkb/sol3/rev1/config.h index a99cbd5fff..9e28ef25fb 100644 --- a/keyboards/rgbkb/sol3/rev1/config.h +++ b/keyboards/rgbkb/sol3/rev1/config.h @@ -24,7 +24,6 @@ #define CRC8_USE_TABLE /* Split Keyboard Configuration */ -#define SPLIT_HAND_PIN C13 #define SPLIT_USB_DETECT #define SERIAL_USART_TX_PAL_MODE 7 #define SERIAL_USART_TIMEOUT 5 diff --git a/keyboards/rgbkb/sol3/rev1/keyboard.json b/keyboards/rgbkb/sol3/rev1/keyboard.json index 54e57e3f8f..a81ea7bc21 100644 --- a/keyboards/rgbkb/sol3/rev1/keyboard.json +++ b/keyboards/rgbkb/sol3/rev1/keyboard.json @@ -130,7 +130,6 @@ "pins": ["A14", "B0"] } }, - "soft_serial_pin": "A9", "encoder": { "right": { "rotary": [ @@ -140,12 +139,19 @@ ] } }, + "handedness": { + "pin": "C13" + }, "matrix_pins": { "right": { "cols": ["B9", "B8", "B4", "A6", "A3", "B10", "B12", "B11"], "rows": ["B15", "B14", "A8", "A13", "A7", null] } }, + "serial": { + "driver": "usart", + "pin": "A9" + }, "transport": { "sync": { "indicators": true, diff --git a/keyboards/rgbkb/sol3/rev1/rules.mk b/keyboards/rgbkb/sol3/rev1/rules.mk index dad85ac483..da4bbf0a63 100644 --- a/keyboards/rgbkb/sol3/rev1/rules.mk +++ b/keyboards/rgbkb/sol3/rev1/rules.mk @@ -4,5 +4,4 @@ SRC += touch_encoder.c SRC += common_oled.c I2C_DRIVER_REQUIRED = yes -SERIAL_DRIVER = usart OPT = 3 diff --git a/keyboards/rgbkb/zen/rev1/keyboard.json b/keyboards/rgbkb/zen/rev1/keyboard.json index 8e192d9dfd..91d127de58 100644 --- a/keyboards/rgbkb/zen/rev1/keyboard.json +++ b/keyboards/rgbkb/zen/rev1/keyboard.json @@ -29,7 +29,9 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D0" + "serial": { + "pin": "D0" + } }, "rgblight": { "led_count": 16 diff --git a/keyboards/rgbkb/zen/rev1/keymaps/default/config.h b/keyboards/rgbkb/zen/rev1/keymaps/default/config.h index e9d6659d60..0480ccbfbd 100644 --- a/keyboards/rgbkb/zen/rev1/keymaps/default/config.h +++ b/keyboards/rgbkb/zen/rev1/keymaps/default/config.h @@ -17,13 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once - -/* Select hand configuration */ - -#define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS - #undef RGBLIGHT_LED_COUNT #define RGBLIGHT_EFFECT_BREATHING #define RGBLIGHT_EFFECT_RAINBOW_MOOD diff --git a/keyboards/rgbkb/zen/rev2/keyboard.json b/keyboards/rgbkb/zen/rev2/keyboard.json index 9079185b26..b59af6dfdd 100644 --- a/keyboards/rgbkb/zen/rev2/keyboard.json +++ b/keyboards/rgbkb/zen/rev2/keyboard.json @@ -35,7 +35,9 @@ }, "split": { "enabled": true, - "soft_serial_pin": "D3" + "serial": { + "pin": "D3" + } }, "rgblight": { "led_count": 34, diff --git a/keyboards/rgbkb/zygomorph/rev1/keyboard.json b/keyboards/rgbkb/zygomorph/rev1/keyboard.json index fc92e0746d..21b9648431 100644 --- a/keyboards/rgbkb/zygomorph/rev1/keyboard.json +++ b/keyboards/rgbkb/zygomorph/rev1/keyboard.json @@ -93,7 +93,9 @@ }, "split": { "enabled": true, - "soft_serial_pin": "D3" + "serial": { + "pin": "D3" + } }, "rgblight": { "split_count": [30, 30], diff --git a/keyboards/rmi_kb/wete/v1/keyboard.json b/keyboards/rmi_kb/wete/v1/keyboard.json index 8e8059c103..c9a54f76c2 100644 --- a/keyboards/rmi_kb/wete/v1/keyboard.json +++ b/keyboards/rmi_kb/wete/v1/keyboard.json @@ -35,6 +35,12 @@ "levels": 24, "breathing": true }, + "indicators": { + "caps_lock": "B3", + "num_lock": "A14", + "scroll_lock": "A15", + "on_state": 0 + }, "rgblight": { "led_count": 24, "animations": { diff --git a/keyboards/rmi_kb/wete/v1/v1.c b/keyboards/rmi_kb/wete/v1/v1.c deleted file mode 100644 index 34a0917468..0000000000 --- a/keyboards/rmi_kb/wete/v1/v1.c +++ /dev/null @@ -1,35 +0,0 @@ -/* Copyright 2020 Ramon Imbao - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -#include "quantum.h" - -void keyboard_pre_init_user(void) { - // Initialize indicator LED pins - gpio_set_pin_output(A14); // Num Lock - gpio_set_pin_output(A15); // Scroll Lock - gpio_set_pin_output(B3); // Caps Lock -} - -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if (res) { - gpio_write_pin(A14, !led_state.num_lock); - gpio_write_pin(A15, !led_state.scroll_lock); - gpio_write_pin(B3, !led_state.caps_lock); - } - - return res; -} diff --git a/keyboards/rubi/keyboard.json b/keyboards/rubi/keyboard.json index aa58208219..bdef35fc77 100644 --- a/keyboards/rubi/keyboard.json +++ b/keyboards/rubi/keyboard.json @@ -22,6 +22,9 @@ "resync": true } }, + "indicators": { + "caps_lock": "C6" + }, "build": { "lto": true }, diff --git a/keyboards/rubi/rubi.c b/keyboards/rubi/rubi.c index 89bf9caa6d..4f0536397f 100644 --- a/keyboards/rubi/rubi.c +++ b/keyboards/rubi/rubi.c @@ -63,12 +63,3 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) { return process_record_user_oled(keycode, record); } - - -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if (res) { - gpio_write_pin(C6, led_state.num_lock); - } - return true; -} diff --git a/keyboards/rura66/rev1/config.h b/keyboards/rura66/rev1/config.h index 4c82cee910..b24773e8e7 100644 --- a/keyboards/rura66/rev1/config.h +++ b/keyboards/rura66/rev1/config.h @@ -17,10 +17,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Split hand configration */ -#define MASTER_LEFT - - #define RGBLIGHT_DEFAULT_MODE RGBLIGHT_MODE_RGB_TEST +#define RGBLIGHT_DEFAULT_MODE RGBLIGHT_MODE_RGB_TEST /* Custom font */ #define OLED_FONT_H "keyboards/rura66/common/glcdfont.c" diff --git a/keyboards/rura66/rev1/keyboard.json b/keyboards/rura66/rev1/keyboard.json index 43f6578394..cb9ad6f29a 100644 --- a/keyboards/rura66/rev1/keyboard.json +++ b/keyboards/rura66/rev1/keyboard.json @@ -48,7 +48,9 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D2" + "serial": { + "pin": "D2" + } }, "ws2812": { "pin": "D3" diff --git a/keyboards/salicylic_acid3/7skb/rev1/config.h b/keyboards/salicylic_acid3/7skb/rev1/config.h index c1a6005b58..b2fb659185 100644 --- a/keyboards/salicylic_acid3/7skb/rev1/config.h +++ b/keyboards/salicylic_acid3/7skb/rev1/config.h @@ -18,8 +18,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -#define SPLIT_HAND_PIN B6 - #ifndef IOS_DEVICE_ENABLE #define RGBLIGHT_LIMIT_VAL 180 #define RGBLIGHT_VAL_STEP 17 diff --git a/keyboards/salicylic_acid3/7skb/rev1/keyboard.json b/keyboards/salicylic_acid3/7skb/rev1/keyboard.json index 73b3c0bec7..4a338811ea 100644 --- a/keyboards/salicylic_acid3/7skb/rev1/keyboard.json +++ b/keyboards/salicylic_acid3/7skb/rev1/keyboard.json @@ -29,7 +29,12 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D2" + "handedness": { + "pin": "B6" + }, + "serial": { + "pin": "D2" + } }, "rgblight": { "hue_steps": 10, diff --git a/keyboards/salicylic_acid3/7splus/config.h b/keyboards/salicylic_acid3/7splus/config.h index 1139de696f..c3e6b774cc 100644 --- a/keyboards/salicylic_acid3/7splus/config.h +++ b/keyboards/salicylic_acid3/7splus/config.h @@ -17,8 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -#define SPLIT_HAND_PIN B6 - #ifndef IOS_DEVICE_ENABLE #define RGBLIGHT_LIMIT_VAL 180 #define RGBLIGHT_VAL_STEP 17 diff --git a/keyboards/salicylic_acid3/7splus/keyboard.json b/keyboards/salicylic_acid3/7splus/keyboard.json index c33e79b52f..d04b8ad45b 100644 --- a/keyboards/salicylic_acid3/7splus/keyboard.json +++ b/keyboards/salicylic_acid3/7splus/keyboard.json @@ -30,7 +30,12 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D2" + "handedness": { + "pin": "B6" + }, + "serial": { + "pin": "D2" + } }, "rgblight": { "hue_steps": 10, diff --git a/keyboards/salicylic_acid3/ajisai74/config.h b/keyboards/salicylic_acid3/ajisai74/config.h deleted file mode 100644 index 9e47a9c2b4..0000000000 --- a/keyboards/salicylic_acid3/ajisai74/config.h +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 2020 Salicylic_Acid - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#pragma once - -#define SPLIT_HAND_PIN B6 diff --git a/keyboards/salicylic_acid3/ajisai74/keyboard.json b/keyboards/salicylic_acid3/ajisai74/keyboard.json index fd00800715..62d475d9df 100644 --- a/keyboards/salicylic_acid3/ajisai74/keyboard.json +++ b/keyboards/salicylic_acid3/ajisai74/keyboard.json @@ -29,7 +29,12 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D2" + "handedness": { + "pin": "B6" + }, + "serial": { + "pin": "D2" + } }, "processor": "atmega32u4", "bootloader": "caterina", diff --git a/keyboards/salicylic_acid3/ergoarrows/config.h b/keyboards/salicylic_acid3/ergoarrows/config.h index 3b5e630f48..fd6b0e51b5 100644 --- a/keyboards/salicylic_acid3/ergoarrows/config.h +++ b/keyboards/salicylic_acid3/ergoarrows/config.h @@ -17,8 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -#define SPLIT_HAND_PIN B6 - #ifndef IOS_DEVICE_ENABLE #define RGBLIGHT_LIMIT_VAL 90 #define RGBLIGHT_VAL_STEP 17 diff --git a/keyboards/salicylic_acid3/ergoarrows/keyboard.json b/keyboards/salicylic_acid3/ergoarrows/keyboard.json index 0993eb1b9b..122d2e0ee6 100644 --- a/keyboards/salicylic_acid3/ergoarrows/keyboard.json +++ b/keyboards/salicylic_acid3/ergoarrows/keyboard.json @@ -30,7 +30,12 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D0" + "handedness": { + "pin": "B6" + }, + "serial": { + "pin": "D0" + } }, "rgblight": { "hue_steps": 10, diff --git a/keyboards/salicylic_acid3/guide68/config.h b/keyboards/salicylic_acid3/guide68/config.h deleted file mode 100644 index 5e88a02bce..0000000000 --- a/keyboards/salicylic_acid3/guide68/config.h +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright 2022 Salicylic-acid3 (@Salicylic-acid3) -// SPDX-License-Identifier: GPL-2.0-or-later - -#pragma once - -#define SPLIT_HAND_PIN B6 diff --git a/keyboards/salicylic_acid3/guide68/keyboard.json b/keyboards/salicylic_acid3/guide68/keyboard.json index 09993a1138..0714262858 100644 --- a/keyboards/salicylic_acid3/guide68/keyboard.json +++ b/keyboards/salicylic_acid3/guide68/keyboard.json @@ -48,10 +48,12 @@ }, "split": { "enabled": true, - "transport": { - "protocol": "serial" + "handedness": { + "pin": "B6" }, - "soft_serial_pin": "D0" + "serial": { + "pin": "D0" + } }, "layouts": { "LAYOUT": { diff --git a/keyboards/salicylic_acid3/jisplit89/rev1/config.h b/keyboards/salicylic_acid3/jisplit89/rev1/config.h index fb6c21aec8..25ba2f576b 100644 --- a/keyboards/salicylic_acid3/jisplit89/rev1/config.h +++ b/keyboards/salicylic_acid3/jisplit89/rev1/config.h @@ -17,8 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -#define SPLIT_HAND_PIN B6 - #ifndef IOS_DEVICE_ENABLE #define RGBLIGHT_LIMIT_VAL 180 #define RGBLIGHT_VAL_STEP 17 diff --git a/keyboards/salicylic_acid3/jisplit89/rev1/keyboard.json b/keyboards/salicylic_acid3/jisplit89/rev1/keyboard.json index e36b27bd2f..e4525ecf74 100644 --- a/keyboards/salicylic_acid3/jisplit89/rev1/keyboard.json +++ b/keyboards/salicylic_acid3/jisplit89/rev1/keyboard.json @@ -29,7 +29,12 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D2" + "handedness": { + "pin": "B6" + }, + "serial": { + "pin": "D2" + } }, "rgblight": { "hue_steps": 10, diff --git a/keyboards/salicylic_acid3/naked48/keymaps/default/config.h b/keyboards/salicylic_acid3/naked48/keymaps/default/config.h index c3d26106ca..728b2a40d4 100644 --- a/keyboards/salicylic_acid3/naked48/keymaps/default/config.h +++ b/keyboards/salicylic_acid3/naked48/keymaps/default/config.h @@ -16,11 +16,5 @@ #pragma once -/* Select hand configuration */ - -//#define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS - #define QUICK_TAP_TERM 0 #define TAPPING_TERM 180 diff --git a/keyboards/salicylic_acid3/naked48/keymaps/default_with_nafuda/config.h b/keyboards/salicylic_acid3/naked48/keymaps/default_with_nafuda/config.h index f2a365a52e..edb2caf9dd 100644 --- a/keyboards/salicylic_acid3/naked48/keymaps/default_with_nafuda/config.h +++ b/keyboards/salicylic_acid3/naked48/keymaps/default_with_nafuda/config.h @@ -16,12 +16,6 @@ #pragma once -/* Select hand configuration */ - -#define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS - #define QUICK_TAP_TERM 0 #define TAPPING_TERM 180 diff --git a/keyboards/salicylic_acid3/naked48/keymaps/default_with_setta21/config.h b/keyboards/salicylic_acid3/naked48/keymaps/default_with_setta21/config.h index d0f71f4f9f..8e4754de06 100644 --- a/keyboards/salicylic_acid3/naked48/keymaps/default_with_setta21/config.h +++ b/keyboards/salicylic_acid3/naked48/keymaps/default_with_setta21/config.h @@ -16,12 +16,6 @@ #pragma once -/* Select hand configuration */ - -#define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS - #define QUICK_TAP_TERM 0 #define TAPPING_TERM 180 diff --git a/keyboards/salicylic_acid3/naked48/rev1/keyboard.json b/keyboards/salicylic_acid3/naked48/rev1/keyboard.json index 2786f50a03..3bac1d8864 100644 --- a/keyboards/salicylic_acid3/naked48/rev1/keyboard.json +++ b/keyboards/salicylic_acid3/naked48/rev1/keyboard.json @@ -31,7 +31,9 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D2", + "serial": { + "pin": "D2" + }, "matrix_pins": { "right": { "cols": ["F4", "F5", "F6", "F7", "B1", "B3", "B2", "B6", "B4", "B5", "B2", "B2"], diff --git a/keyboards/salicylic_acid3/naked60/keymaps/default_with_nafuda/config.h b/keyboards/salicylic_acid3/naked60/keymaps/default_with_nafuda/config.h index ed08dc121c..728b2a40d4 100644 --- a/keyboards/salicylic_acid3/naked60/keymaps/default_with_nafuda/config.h +++ b/keyboards/salicylic_acid3/naked60/keymaps/default_with_nafuda/config.h @@ -16,11 +16,5 @@ #pragma once -/* Select hand configuration */ - -#define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS - #define QUICK_TAP_TERM 0 #define TAPPING_TERM 180 diff --git a/keyboards/salicylic_acid3/naked60/keymaps/default_with_setta21/config.h b/keyboards/salicylic_acid3/naked60/keymaps/default_with_setta21/config.h index ed08dc121c..728b2a40d4 100644 --- a/keyboards/salicylic_acid3/naked60/keymaps/default_with_setta21/config.h +++ b/keyboards/salicylic_acid3/naked60/keymaps/default_with_setta21/config.h @@ -16,11 +16,5 @@ #pragma once -/* Select hand configuration */ - -#define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS - #define QUICK_TAP_TERM 0 #define TAPPING_TERM 180 diff --git a/keyboards/salicylic_acid3/naked60/rev1/keyboard.json b/keyboards/salicylic_acid3/naked60/rev1/keyboard.json index 52a503c940..5037414c3d 100644 --- a/keyboards/salicylic_acid3/naked60/rev1/keyboard.json +++ b/keyboards/salicylic_acid3/naked60/rev1/keyboard.json @@ -27,7 +27,9 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D2", + "serial": { + "pin": "D2" + }, "matrix_pins": { "right": { "cols": ["F4", "F5", "F6", "F7", "B1", "B3", "B2", "B6", "B4", "B5", "B2", "B2"], diff --git a/keyboards/salicylic_acid3/naked64/keymaps/default_with_setta21/config.h b/keyboards/salicylic_acid3/naked64/keymaps/default_with_setta21/config.h index ebc2b46717..0b2c9ee938 100644 --- a/keyboards/salicylic_acid3/naked64/keymaps/default_with_setta21/config.h +++ b/keyboards/salicylic_acid3/naked64/keymaps/default_with_setta21/config.h @@ -16,12 +16,6 @@ #pragma once -/* Select hand configuration */ - -#define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS - #define QUICK_TAP_TERM 0 #define TAPPING_TERM 180 diff --git a/keyboards/salicylic_acid3/naked64/rev1/keyboard.json b/keyboards/salicylic_acid3/naked64/rev1/keyboard.json index 6cc6897659..688edf53d3 100644 --- a/keyboards/salicylic_acid3/naked64/rev1/keyboard.json +++ b/keyboards/salicylic_acid3/naked64/rev1/keyboard.json @@ -29,7 +29,9 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D2", + "serial": { + "pin": "D2" + }, "matrix_pins": { "right": { "cols": ["F4", "F5", "F6", "F7", "B1", "B3", "B2", "B6"], diff --git a/keyboards/salicylic_acid3/nknl7en/config.h b/keyboards/salicylic_acid3/nknl7en/config.h index 5b4a4a25f3..8e18bdb850 100644 --- a/keyboards/salicylic_acid3/nknl7en/config.h +++ b/keyboards/salicylic_acid3/nknl7en/config.h @@ -17,8 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -#define SPLIT_HAND_PIN B6 - #ifndef IOS_DEVICE_ENABLE #define RGBLIGHT_LIMIT_VAL 180 #define RGBLIGHT_VAL_STEP 17 diff --git a/keyboards/salicylic_acid3/nknl7en/keyboard.json b/keyboards/salicylic_acid3/nknl7en/keyboard.json index 25165663f5..554430f6c4 100644 --- a/keyboards/salicylic_acid3/nknl7en/keyboard.json +++ b/keyboards/salicylic_acid3/nknl7en/keyboard.json @@ -30,7 +30,12 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D0" + "handedness": { + "pin": "B6" + }, + "serial": { + "pin": "D0" + } }, "rgblight": { "hue_steps": 10, diff --git a/keyboards/salicylic_acid3/nknl7jp/config.h b/keyboards/salicylic_acid3/nknl7jp/config.h index 5b4a4a25f3..8e18bdb850 100644 --- a/keyboards/salicylic_acid3/nknl7jp/config.h +++ b/keyboards/salicylic_acid3/nknl7jp/config.h @@ -17,8 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -#define SPLIT_HAND_PIN B6 - #ifndef IOS_DEVICE_ENABLE #define RGBLIGHT_LIMIT_VAL 180 #define RGBLIGHT_VAL_STEP 17 diff --git a/keyboards/salicylic_acid3/nknl7jp/keyboard.json b/keyboards/salicylic_acid3/nknl7jp/keyboard.json index 179860ea29..b8a9196f88 100644 --- a/keyboards/salicylic_acid3/nknl7jp/keyboard.json +++ b/keyboards/salicylic_acid3/nknl7jp/keyboard.json @@ -30,7 +30,12 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D0" + "handedness": { + "pin": "B6" + }, + "serial": { + "pin": "D0" + } }, "rgblight": { "hue_steps": 10, diff --git a/keyboards/scatter42/keyboard.json b/keyboards/scatter42/keyboard.json index 63aaaa46b2..7bb7a63ffe 100644 --- a/keyboards/scatter42/keyboard.json +++ b/keyboards/scatter42/keyboard.json @@ -29,7 +29,9 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D2" + "serial": { + "pin": "D2" + } }, "processor": "atmega32u4", "bootloader": "atmel-dfu", diff --git a/keyboards/sekigon/grs_70ec/keyboard.json b/keyboards/sekigon/grs_70ec/keyboard.json index fbea73fb99..7b3573c768 100644 --- a/keyboards/sekigon/grs_70ec/keyboard.json +++ b/keyboards/sekigon/grs_70ec/keyboard.json @@ -23,7 +23,9 @@ }, "split": { "enabled": true, - "soft_serial_pin": "D3" + "serial": { + "pin": "D3" + } }, "processor": "atmega32u4", "bootloader": "caterina", diff --git a/keyboards/senselessclay/gos65/config.h b/keyboards/senselessclay/gos65/config.h new file mode 100644 index 0000000000..ef2b83ef3e --- /dev/null +++ b/keyboards/senselessclay/gos65/config.h @@ -0,0 +1,18 @@ +/* Copyright 2020 Hadi Iskandarani + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ +#pragma once + +#define RGBLIGHT_DEFAULT_MODE (RGBLIGHT_MODE_RAINBOW_SWIRL + 5) diff --git a/keyboards/senselessclay/gos65/gos65.c b/keyboards/senselessclay/gos65/gos65.c deleted file mode 100644 index e769608c89..0000000000 --- a/keyboards/senselessclay/gos65/gos65.c +++ /dev/null @@ -1,26 +0,0 @@ -/* Copyright 2020 Hadi Iskandarani - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -#include "quantum.h" - -void eeconfig_init_kb(void) { // EEPROM is getting reset! - rgblight_enable(); // Enable RGB by default - rgblight_sethsv(0, 255, 125); // Set default HSV - red hue, full saturation, medium brightness - rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL + 5); // set to RGB_RAINBOW_SWIRL by default - - eeconfig_update_kb(0); - eeconfig_init_user(); -}
\ No newline at end of file diff --git a/keyboards/senselessclay/gos65/keyboard.json b/keyboards/senselessclay/gos65/keyboard.json index b869d91301..ee6bb5727a 100644 --- a/keyboards/senselessclay/gos65/keyboard.json +++ b/keyboards/senselessclay/gos65/keyboard.json @@ -12,6 +12,9 @@ "pin": "B0" }, "rgblight": { + "default": { + "val": 125 + }, "led_count": 68, "max_brightness": 125, "sleep": true, diff --git a/keyboards/silverbullet44/keyboard.json b/keyboards/silverbullet44/keyboard.json index a58aed8820..69c291a1cc 100644 --- a/keyboards/silverbullet44/keyboard.json +++ b/keyboards/silverbullet44/keyboard.json @@ -56,7 +56,9 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D2" + "serial": { + "pin": "D2" + } }, "processor": "atmega32u4", "bootloader": "caterina", diff --git a/keyboards/sirius/unigo66/custom_matrix.cpp b/keyboards/sirius/unigo66/custom_matrix.cpp index 25648a5f78..879a0e7c15 100644 --- a/keyboards/sirius/unigo66/custom_matrix.cpp +++ b/keyboards/sirius/unigo66/custom_matrix.cpp @@ -216,7 +216,6 @@ extern "C" kbd2.SetReport(0, 0, 2, 0, 1, &usb_led); kbd3.SetReport(0, 0, 2, 0, 1, &usb_led); kbd4.SetReport(0, 0, 2, 0, 1, &usb_led); - led_set_user(usb_led); led_update_kb((led_t){.raw = usb_led}); } diff --git a/keyboards/sleepy_craft_studios/sleepy_keeb_split/keyboard.json b/keyboards/sleepy_craft_studios/sleepy_keeb_split/keyboard.json index c645bfbaff..d95f0f20be 100644 --- a/keyboards/sleepy_craft_studios/sleepy_keeb_split/keyboard.json +++ b/keyboards/sleepy_craft_studios/sleepy_keeb_split/keyboard.json @@ -29,7 +29,9 @@ }, "split": { "enabled": true, - "soft_serial_pin": "D2", + "serial": { + "pin": "D2" + }, "usb_detect": { "enabled": true } diff --git a/keyboards/sneakbox/aliceclone/aliceclone.c b/keyboards/sneakbox/aliceclone/aliceclone.c deleted file mode 100644 index 74d19e515c..0000000000 --- a/keyboards/sneakbox/aliceclone/aliceclone.c +++ /dev/null @@ -1,36 +0,0 @@ -/* -Copyright 2020 Bryan Ong - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#include "quantum.h" - -void keyboard_pre_init_kb(void) { - gpio_set_pin_output(D7); - gpio_set_pin_output(D6); - gpio_set_pin_output(D4); - - keyboard_pre_init_user(); -} - -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if(res) { - gpio_write_pin(D7, led_state.num_lock); - gpio_write_pin(D6, led_state.caps_lock); - gpio_write_pin(D4, led_state.scroll_lock); - } - return res; -} diff --git a/keyboards/sneakbox/aliceclone/keyboard.json b/keyboards/sneakbox/aliceclone/keyboard.json index 869b8bd20b..bb0cd8e4b8 100644 --- a/keyboards/sneakbox/aliceclone/keyboard.json +++ b/keyboards/sneakbox/aliceclone/keyboard.json @@ -36,6 +36,11 @@ "bootmagic": { "matrix": [2, 0] }, + "indicators": { + "caps_lock": "D6", + "num_lock": "D7", + "scroll_lock": "D4" + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "community_layouts": ["alice", "alice_split_bs"], diff --git a/keyboards/snes_macropad/snes_macropad.c b/keyboards/snes_macropad/snes_macropad.c index 74fa434fb2..97e942e026 100644 --- a/keyboards/snes_macropad/snes_macropad.c +++ b/keyboards/snes_macropad/snes_macropad.c @@ -92,9 +92,6 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { set_keylog(keycode, record); } - if (keycode == QK_BOOT) { - setupForFlashing(); - } return process_record_user(keycode, record); } @@ -104,3 +101,11 @@ void keyboard_post_init_kb(void) { rgblight_mode_noeeprom(RGBLIGHT_MODE_RAINBOW_SWIRL); keyboard_post_init_user(); } + +bool shutdown_kb(bool jump_to_bootloader) { + if (!shutdown_user(jump_to_bootloader)) { + return false; + } + setupForFlashing(); + return true; +} diff --git a/keyboards/sofle/info.json b/keyboards/sofle/info.json index 91fdfd38be..b785d7e7b6 100644 --- a/keyboards/sofle/info.json +++ b/keyboards/sofle/info.json @@ -20,7 +20,9 @@ }, "split": { "enabled": true, - "soft_serial_pin": "D2", + "serial": { + "pin": "D2" + }, "transport": { "sync": { "matrix_state": true diff --git a/keyboards/sofle/keymaps/rgb_default/config.h b/keyboards/sofle/keymaps/rgb_default/config.h index 0929487978..564133ce7a 100644 --- a/keyboards/sofle/keymaps/rgb_default/config.h +++ b/keyboards/sofle/keymaps/rgb_default/config.h @@ -22,11 +22,6 @@ ///https://thomasbaart.nl/2018/12/01/reducing-firmware-size-in-qmk/ - -#define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS - #define CUSTOM_FONT #define CUSTOM_LAYER_READ //if you remove this it causes issues - needs better guarding diff --git a/keyboards/sofle_choc/keyboard.json b/keyboards/sofle_choc/keyboard.json index c4d9822371..0a25985d4f 100644 --- a/keyboards/sofle_choc/keyboard.json +++ b/keyboards/sofle_choc/keyboard.json @@ -118,7 +118,9 @@ }, "split": { "enabled": true, - "soft_serial_pin": "D2", + "serial": { + "pin": "D2" + }, "encoder": { "right": { "rotary": [ diff --git a/keyboards/sowbug/68keys/68keys.c b/keyboards/sowbug/68keys/68keys.c index 8c7394d75b..df9681481f 100644 --- a/keyboards/sowbug/68keys/68keys.c +++ b/keyboards/sowbug/68keys/68keys.c @@ -33,13 +33,4 @@ led_config_t g_led_config = { { } }; -void suspend_power_down_kb(void) -{ - rgb_matrix_set_suspend_state(true); -} - -void suspend_wakeup_init_kb(void) -{ - rgb_matrix_set_suspend_state(false); -} #endif // #ifdef RGB_MATRIX_ENABLE diff --git a/keyboards/sowbug/68keys/keyboard.json b/keyboards/sowbug/68keys/keyboard.json index 2b8f7da3d5..7143f341b5 100644 --- a/keyboards/sowbug/68keys/keyboard.json +++ b/keyboards/sowbug/68keys/keyboard.json @@ -58,7 +58,8 @@ "solid_multisplash": true }, "driver": "ws2812", - "max_brightness": 128 + "max_brightness": 128, + "sleep": true }, "features": { "bootmagic": true, diff --git a/keyboards/sowbug/ansi_tkl/ansi_tkl.c b/keyboards/sowbug/ansi_tkl/ansi_tkl.c index 284cd612dd..508bf62fe1 100644 --- a/keyboards/sowbug/ansi_tkl/ansi_tkl.c +++ b/keyboards/sowbug/ansi_tkl/ansi_tkl.c @@ -47,13 +47,4 @@ led_config_t g_led_config = {{ } }; -void suspend_power_down_kb(void) -{ - rgb_matrix_set_suspend_state(true); -} - -void suspend_wakeup_init_kb(void) -{ - rgb_matrix_set_suspend_state(false); -} #endif // #ifdef RGB_MATRIX_ENABLE diff --git a/keyboards/sowbug/ansi_tkl/keyboard.json b/keyboards/sowbug/ansi_tkl/keyboard.json index 69f78cba6d..837e08a59e 100644 --- a/keyboards/sowbug/ansi_tkl/keyboard.json +++ b/keyboards/sowbug/ansi_tkl/keyboard.json @@ -58,7 +58,8 @@ "solid_multisplash": true }, "driver": "ws2812", - "max_brightness": 128 + "max_brightness": 128, + "sleep": true }, "features": { "bootmagic": true, diff --git a/keyboards/spacetime/info.json b/keyboards/spacetime/info.json index 1e04608349..4e3682a8c2 100644 --- a/keyboards/spacetime/info.json +++ b/keyboards/spacetime/info.json @@ -29,7 +29,9 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D0" + "serial": { + "pin": "D0" + } }, "processor": "atmega32u4", "bootloader": "caterina", diff --git a/keyboards/sparrow62/config.h b/keyboards/sparrow62/config.h deleted file mode 100644 index 2b9669e938..0000000000 --- a/keyboards/sparrow62/config.h +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 2020 Atsushi Morimoto @74th - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#pragma once - -#define SPLIT_HAND_PIN F4 diff --git a/keyboards/sparrow62/keyboard.json b/keyboards/sparrow62/keyboard.json index 796d18b9bb..96447b6a36 100644 --- a/keyboards/sparrow62/keyboard.json +++ b/keyboards/sparrow62/keyboard.json @@ -29,7 +29,12 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D2" + "handedness": { + "pin": "F4" + }, + "serial": { + "pin": "D2" + } }, "processor": "atmega32u4", "bootloader": "caterina", diff --git a/keyboards/spleeb/keyboard.json b/keyboards/spleeb/keyboard.json index 7b92316de2..56b0bc83b0 100644 --- a/keyboards/spleeb/keyboard.json +++ b/keyboards/spleeb/keyboard.json @@ -29,7 +29,6 @@ }, "split": { "enabled": true, - "soft_serial_pin": "GP1", "encoder": { "right": { "rotary": [ @@ -43,6 +42,10 @@ "layer_state": true, "modifiers": true } + }, + "serial": { + "driver": "vendor", + "pin": "GP1" } }, "url": "https://github.com/chrishoage/spleeb", diff --git a/keyboards/spleeb/rules.mk b/keyboards/spleeb/rules.mk deleted file mode 100644 index 161ec22b16..0000000000 --- a/keyboards/spleeb/rules.mk +++ /dev/null @@ -1 +0,0 @@ -SERIAL_DRIVER = vendor diff --git a/keyboards/split67/keyboard.json b/keyboards/split67/keyboard.json index f9a3632c01..46b571420a 100644 --- a/keyboards/split67/keyboard.json +++ b/keyboards/split67/keyboard.json @@ -33,7 +33,9 @@ "rows": ["D4", "C6", "D7", "E6", "B4"] } }, - "soft_serial_pin": "D0" + "serial": { + "pin": "D0" + } }, "url": "", "usb": { diff --git a/keyboards/splitkb/aurora/corne/rev1/config.h b/keyboards/splitkb/aurora/corne/rev1/config.h index f37b59a952..5a5910d81c 100644 --- a/keyboards/splitkb/aurora/corne/rev1/config.h +++ b/keyboards/splitkb/aurora/corne/rev1/config.h @@ -16,10 +16,6 @@ #pragma once -// `SPLIT_HAND_PIN` can currently be defined in `info.json`, -// but can't yet be given a value -#define SPLIT_HAND_PIN F4 - // Not yet available in `info.json` #ifdef OLED_ENABLE # define OLED_DISPLAY_128X32 diff --git a/keyboards/splitkb/aurora/corne/rev1/keyboard.json b/keyboards/splitkb/aurora/corne/rev1/keyboard.json index 2e0b74b5a8..40983ec28d 100644 --- a/keyboards/splitkb/aurora/corne/rev1/keyboard.json +++ b/keyboards/splitkb/aurora/corne/rev1/keyboard.json @@ -82,7 +82,6 @@ "bootmagic": { "matrix": [4, 5] }, - "soft_serial_pin": "D2", "matrix_pins": { "right": { "rows": ["B1", "B3", "B2", "B6"], @@ -96,6 +95,12 @@ ] } }, + "handedness": { + "pin": "F4" + }, + "serial": { + "pin": "D2" + }, "transport": { "sync": { "matrix_state": true diff --git a/keyboards/splitkb/aurora/helix/rev1/config.h b/keyboards/splitkb/aurora/helix/rev1/config.h index f8b8a190fe..522bea4d5e 100644 --- a/keyboards/splitkb/aurora/helix/rev1/config.h +++ b/keyboards/splitkb/aurora/helix/rev1/config.h @@ -16,7 +16,5 @@ #pragma once -#define SPLIT_HAND_PIN D3 - #define OLED_DISPLAY_128X32 #define SPLIT_OLED_ENABLE diff --git a/keyboards/splitkb/aurora/helix/rev1/keyboard.json b/keyboards/splitkb/aurora/helix/rev1/keyboard.json index b3fcf8969c..0c3569f26c 100644 --- a/keyboards/splitkb/aurora/helix/rev1/keyboard.json +++ b/keyboards/splitkb/aurora/helix/rev1/keyboard.json @@ -118,13 +118,18 @@ ] } }, + "handedness": { + "pin": "D3" + }, "matrix_pins": { "right": { "cols": ["D4", "C6", "D7", "E6", "B4", "B5", "B6"], "rows": ["F4", "F5", "F6", "F7", "B1"] } }, - "soft_serial_pin": "D2" + "serial": { + "pin": "D2" + } }, "usb": { "pid": "0xB4C4" diff --git a/keyboards/splitkb/aurora/lily58/rev1/config.h b/keyboards/splitkb/aurora/lily58/rev1/config.h index 08a61a2978..5a5910d81c 100644 --- a/keyboards/splitkb/aurora/lily58/rev1/config.h +++ b/keyboards/splitkb/aurora/lily58/rev1/config.h @@ -16,10 +16,6 @@ #pragma once -// `SPLIT_HAND_PIN` can currently be defined in `info.json`, -// but can't yet be given a value -#define SPLIT_HAND_PIN F5 - // Not yet available in `info.json` #ifdef OLED_ENABLE # define OLED_DISPLAY_128X32 diff --git a/keyboards/splitkb/aurora/lily58/rev1/keyboard.json b/keyboards/splitkb/aurora/lily58/rev1/keyboard.json index f81da08464..60645f9deb 100644 --- a/keyboards/splitkb/aurora/lily58/rev1/keyboard.json +++ b/keyboards/splitkb/aurora/lily58/rev1/keyboard.json @@ -93,7 +93,6 @@ "bootmagic": { "matrix": [5, 0] }, - "soft_serial_pin": "D2", "matrix_pins": { "right": { "rows": ["F4", "D4", "B3", "B2", "B6"], @@ -107,6 +106,12 @@ ] } }, + "handedness": { + "pin": "F5" + }, + "serial": { + "pin": "D2" + }, "transport": { "sync": { "matrix_state": true diff --git a/keyboards/splitkb/aurora/sofle_v2/rev1/config.h b/keyboards/splitkb/aurora/sofle_v2/rev1/config.h index 7292b3d8b0..522bea4d5e 100644 --- a/keyboards/splitkb/aurora/sofle_v2/rev1/config.h +++ b/keyboards/splitkb/aurora/sofle_v2/rev1/config.h @@ -16,7 +16,5 @@ #pragma once -#define SPLIT_HAND_PIN F4 - #define OLED_DISPLAY_128X32 #define SPLIT_OLED_ENABLE diff --git a/keyboards/splitkb/aurora/sofle_v2/rev1/keyboard.json b/keyboards/splitkb/aurora/sofle_v2/rev1/keyboard.json index 266ea72148..6c72888b10 100644 --- a/keyboards/splitkb/aurora/sofle_v2/rev1/keyboard.json +++ b/keyboards/splitkb/aurora/sofle_v2/rev1/keyboard.json @@ -112,13 +112,18 @@ ] } }, + "handedness": { + "pin": "F4" + }, "matrix_pins": { "right": { "cols": ["D7", "E6", "B4", "B5", "D4", "C6"], "rows": ["B3", "B1", "F7", "F6", "F5"] } }, - "soft_serial_pin": "D2" + "serial": { + "pin": "D2" + } }, "usb": { "pid": "0xEC32" diff --git a/keyboards/splitkb/aurora/sweep/rev1/config.h b/keyboards/splitkb/aurora/sweep/rev1/config.h index f37b59a952..5a5910d81c 100644 --- a/keyboards/splitkb/aurora/sweep/rev1/config.h +++ b/keyboards/splitkb/aurora/sweep/rev1/config.h @@ -16,10 +16,6 @@ #pragma once -// `SPLIT_HAND_PIN` can currently be defined in `info.json`, -// but can't yet be given a value -#define SPLIT_HAND_PIN F4 - // Not yet available in `info.json` #ifdef OLED_ENABLE # define OLED_DISPLAY_128X32 diff --git a/keyboards/splitkb/aurora/sweep/rev1/keyboard.json b/keyboards/splitkb/aurora/sweep/rev1/keyboard.json index 0d235cd5b2..e90995b207 100644 --- a/keyboards/splitkb/aurora/sweep/rev1/keyboard.json +++ b/keyboards/splitkb/aurora/sweep/rev1/keyboard.json @@ -78,7 +78,6 @@ "bootmagic": { "matrix": [4, 4] }, - "soft_serial_pin": "D2", "matrix_pins": { "right": { "rows": ["B1", "F7", "F6", "B3"], @@ -93,6 +92,12 @@ ] } }, + "handedness": { + "pin": "F4" + }, + "serial": { + "pin": "D2" + }, "transport": { "sync": { "matrix_state": true diff --git a/keyboards/splitkb/kyria/info.json b/keyboards/splitkb/kyria/info.json index f70e8e3bb2..050e12f2ff 100644 --- a/keyboards/splitkb/kyria/info.json +++ b/keyboards/splitkb/kyria/info.json @@ -6,7 +6,6 @@ "vid": "0x8D1D", "device_version": "1.0.0" }, - "development_board": "elite_c", "split": { "enabled": true }, diff --git a/keyboards/splitkb/kyria/rev1/base/keyboard.json b/keyboards/splitkb/kyria/rev1/base/keyboard.json index 9f75b9c218..9cb4485c44 100644 --- a/keyboards/splitkb/kyria/rev1/base/keyboard.json +++ b/keyboards/splitkb/kyria/rev1/base/keyboard.json @@ -1,5 +1,28 @@ { - "build": { - "lto": true + "development_board": "elite_c", + "matrix_pins": { + "cols": ["B6", "B2", "B3", "B1", "F7", "F6", "F5", "F4"], + "rows": ["B4", "E6", "D7", "D4"] + }, + "diode_direction": "COL2ROW", + "encoder": { + "rotary": [ + {"pin_a": "C6", "pin_b": "B5"} + ] + }, + "split": { + "serial": { + "pin": "D2" + }, + "encoder": { + "right": { + "rotary": [ + {"pin_a": "B5", "pin_b": "C6"} + ] + } + } + }, + "ws2812": { + "pin": "D3" } } diff --git a/keyboards/splitkb/kyria/rev1/config.h b/keyboards/splitkb/kyria/rev1/config.h index 4f130293e2..615d93496d 100644 --- a/keyboards/splitkb/kyria/rev1/config.h +++ b/keyboards/splitkb/kyria/rev1/config.h @@ -17,31 +17,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* - * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. - */ - -#if defined(CONVERT_TO_PROTON_C) -# define SERIAL_USART_FULL_DUPLEX // Enable full duplex operation mode. -# define SERIAL_USART_PIN_SWAP // Swap TX and RX pins if keyboard is master halve. -# 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_TX_PIN D3 -# define SERIAL_USART_RX_PIN D2 - -# define WS2812_DI_PIN PAL_LINE(GPIOA, 3) -# 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_PWM_DMA_STREAM STM32_DMA1_STREAM2 // DMA Stream for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. -# define WS2812_PWM_DMA_CHANNEL 2 // DMA Channel for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. -# define WS2812_PWM_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. -#else -# define WS2812_DI_PIN D3 -# define SOFT_SERIAL_PIN D2 -#endif - -#ifdef OLED_ENABLE -# define OLED_DISPLAY_128X64 -# define SPLIT_OLED_ENABLE -#endif +#define OLED_DISPLAY_128X64 +#define SPLIT_OLED_ENABLE diff --git a/keyboards/splitkb/kyria/rev1/info.json b/keyboards/splitkb/kyria/rev1/info.json index 3d84b37b31..1e21c60978 100644 --- a/keyboards/splitkb/kyria/rev1/info.json +++ b/keyboards/splitkb/kyria/rev1/info.json @@ -23,24 +23,7 @@ "sleep": true, "split_count": [10, 10] }, - "matrix_pins": { - "cols": ["B6", "B2", "B3", "B1", "F7", "F6", "F5", "F4"], - "rows": ["B4", "E6", "D7", "D4"] - }, - "diode_direction": "COL2ROW", - "encoder": { - "rotary": [ - {"pin_a": "C6", "pin_b": "B5"} - ] - }, "split": { - "encoder": { - "right": { - "rotary": [ - {"pin_a": "B5", "pin_b": "C6"} - ] - } - }, "transport": { "sync": { "matrix_state": true diff --git a/keyboards/splitkb/kyria/rev1/proton_c/config.h b/keyboards/splitkb/kyria/rev1/proton_c/config.h new file mode 100644 index 0000000000..df2eb96ae2 --- /dev/null +++ b/keyboards/splitkb/kyria/rev1/proton_c/config.h @@ -0,0 +1,17 @@ +// Copyright 2024 QMK +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#define SERIAL_USART_FULL_DUPLEX // Enable full duplex operation mode. +#define SERIAL_USART_PIN_SWAP // Swap TX and RX pins if keyboard is master halve. +#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_TX_PIN A9 +#define SERIAL_USART_RX_PIN A10 + +#define WS2812_PWM_CHANNEL 4 +#define WS2812_PWM_PAL_MODE 1 +#define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM2 // DMA Stream for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. +#define WS2812_PWM_DMA_CHANNEL 2 // DMA Channel for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. +#define WS2812_PWM_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. diff --git a/keyboards/splitkb/kyria/rev1/proton_c/keyboard.json b/keyboards/splitkb/kyria/rev1/proton_c/keyboard.json index 6cc38d4a21..e1308bb9ec 100644 --- a/keyboards/splitkb/kyria/rev1/proton_c/keyboard.json +++ b/keyboards/splitkb/kyria/rev1/proton_c/keyboard.json @@ -1,5 +1,29 @@ { + "development_board": "proton_c", + "matrix_pins": { + "cols": ["B9", "B15", "B14", "B13", "B8", "A0", "A1", "A2"], + "rows": ["B1", "B2", "B3", "B5"] + }, + "diode_direction": "COL2ROW", + "encoder": { + "rotary": [ + {"pin_a": "B4", "pin_b": "B0"} + ] + }, + "split": { + "encoder": { + "right": { + "rotary": [ + {"pin_a": "B0", "pin_b": "B4"} + ] + } + }, + "serial": { + "driver": "usart" + } + }, "ws2812": { - "driver": "pwm" + "driver": "pwm", + "pin": "A3" } } diff --git a/keyboards/splitkb/kyria/rev1/proton_c/rules.mk b/keyboards/splitkb/kyria/rev1/proton_c/rules.mk deleted file mode 100644 index a58b20c575..0000000000 --- a/keyboards/splitkb/kyria/rev1/proton_c/rules.mk +++ /dev/null @@ -1,2 +0,0 @@ -SERIAL_DRIVER = usart -CONVERT_TO = proton_c diff --git a/keyboards/splitkb/kyria/rev2/base/keyboard.json b/keyboards/splitkb/kyria/rev2/base/keyboard.json index 9f75b9c218..49428ca30a 100644 --- a/keyboards/splitkb/kyria/rev2/base/keyboard.json +++ b/keyboards/splitkb/kyria/rev2/base/keyboard.json @@ -1,5 +1,37 @@ { - "build": { - "lto": true + "development_board": "elite_c", + "matrix_pins": { + "cols": ["B2", "B6", "B5", "B4", "E6", "D7", "C6", "D4"], + "rows": ["F6", "F7", "B1", "B3"] + }, + "diode_direction": "COL2ROW", + "encoder": { + "rotary": [ + {"pin_a": "F4", "pin_b": "F5"} + ] + }, + "split": { + "handedness": { + "matrix_grid": ["E6", "B3"] + }, + "serial": { + "pin": "D2" + }, + "encoder": { + "right": { + "rotary": [ + {"pin_a": "F5", "pin_b": "F4"} + ] + } + }, + "matrix_pins": { + "right": { + "cols": ["B4", "B5", "B6", "B2", "B3", "B1", "F7", "F6"], + "rows": ["D4", "C6", "D7", "E6"] + } + } + }, + "ws2812": { + "pin": "D3" } } diff --git a/keyboards/splitkb/kyria/rev2/config.h b/keyboards/splitkb/kyria/rev2/config.h index 54d8f0985a..fb9e7bb959 100644 --- a/keyboards/splitkb/kyria/rev2/config.h +++ b/keyboards/splitkb/kyria/rev2/config.h @@ -19,34 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // Side detection // col 4 row 3 on right-hand-side -#define SPLIT_HAND_MATRIX_GRID E6, B3 // row first because the board is col2row #define MATRIX_MASKED // actual mask is defined by `matrix_mask` in `rev2.c` -/* - * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. - */ - -#if defined(CONVERT_TO_PROTON_C) -# define SERIAL_USART_FULL_DUPLEX // Enable full duplex operation mode. -# define SERIAL_USART_PIN_SWAP // Swap TX and RX pins if keyboard is master halve. -# 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_TX_PIN D3 -# define SERIAL_USART_RX_PIN D2 - -# define WS2812_DI_PIN PAL_LINE(GPIOA, 3) -# 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_PWM_DMA_STREAM STM32_DMA1_STREAM2 // DMA Stream for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. -# define WS2812_PWM_DMA_CHANNEL 2 // DMA Channel for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. -# define WS2812_PWM_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. -#else -# define WS2812_DI_PIN D3 -# define SOFT_SERIAL_PIN D2 -#endif - -#ifdef OLED_ENABLE -# define OLED_DISPLAY_128X64 -# define SPLIT_OLED_ENABLE -#endif +#define OLED_DISPLAY_128X64 +#define SPLIT_OLED_ENABLE diff --git a/keyboards/splitkb/kyria/rev2/info.json b/keyboards/splitkb/kyria/rev2/info.json index 80f801e3d1..d1507a26b0 100644 --- a/keyboards/splitkb/kyria/rev2/info.json +++ b/keyboards/splitkb/kyria/rev2/info.json @@ -23,30 +23,7 @@ "sleep": true, "split_count": [10, 10] }, - "matrix_pins": { - "cols": ["B2", "B6", "B5", "B4", "E6", "D7", "C6", "D4"], - "rows": ["F6", "F7", "B1", "B3"] - }, - "diode_direction": "COL2ROW", - "encoder": { - "rotary": [ - {"pin_a": "F4", "pin_b": "F5"} - ] - }, "split": { - "encoder": { - "right": { - "rotary": [ - {"pin_a": "F5", "pin_b": "F4"} - ] - } - }, - "matrix_pins": { - "right": { - "cols": ["B4", "B5", "B6", "B2", "B3", "B1", "F7", "F6"], - "rows": ["D4", "C6", "D7", "E6"] - } - }, "transport": { "sync": { "matrix_state": true diff --git a/keyboards/splitkb/kyria/rev2/proton_c/config.h b/keyboards/splitkb/kyria/rev2/proton_c/config.h new file mode 100644 index 0000000000..df2eb96ae2 --- /dev/null +++ b/keyboards/splitkb/kyria/rev2/proton_c/config.h @@ -0,0 +1,17 @@ +// Copyright 2024 QMK +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#define SERIAL_USART_FULL_DUPLEX // Enable full duplex operation mode. +#define SERIAL_USART_PIN_SWAP // Swap TX and RX pins if keyboard is master halve. +#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_TX_PIN A9 +#define SERIAL_USART_RX_PIN A10 + +#define WS2812_PWM_CHANNEL 4 +#define WS2812_PWM_PAL_MODE 1 +#define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM2 // DMA Stream for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. +#define WS2812_PWM_DMA_CHANNEL 2 // DMA Channel for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. +#define WS2812_PWM_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. diff --git a/keyboards/splitkb/kyria/rev2/proton_c/keyboard.json b/keyboards/splitkb/kyria/rev2/proton_c/keyboard.json index 6cc38d4a21..94cb7993d2 100644 --- a/keyboards/splitkb/kyria/rev2/proton_c/keyboard.json +++ b/keyboards/splitkb/kyria/rev2/proton_c/keyboard.json @@ -1,5 +1,38 @@ { + "development_board": "proton_c", + "matrix_pins": { + "cols": ["B15", "B9", "B0", "B1", "B2", "B3", "B4", "B5"], + "rows": ["A0", "B8", "B13", "B14"] + }, + "diode_direction": "COL2ROW", + "encoder": { + "rotary": [ + {"pin_a": "A2", "pin_b": "A1"} + ] + }, + "split": { + "handedness": { + "matrix_grid": ["B2", "B14"] + }, + "encoder": { + "right": { + "rotary": [ + {"pin_a": "A1", "pin_b": "A2"} + ] + } + }, + "matrix_pins": { + "right": { + "cols": ["B1", "B0", "B9", "B15", "B14", "B13", "B8", "A0"], + "rows": ["B5", "B4", "B3", "B2"] + } + }, + "serial": { + "driver": "usart" + } + }, "ws2812": { - "driver": "pwm" + "driver": "pwm", + "pin": "A3" } } diff --git a/keyboards/splitkb/kyria/rev2/proton_c/rules.mk b/keyboards/splitkb/kyria/rev2/proton_c/rules.mk deleted file mode 100644 index a58b20c575..0000000000 --- a/keyboards/splitkb/kyria/rev2/proton_c/rules.mk +++ /dev/null @@ -1,2 +0,0 @@ -SERIAL_DRIVER = usart -CONVERT_TO = proton_c diff --git a/keyboards/splitkb/kyria/rev3/config.h b/keyboards/splitkb/kyria/rev3/config.h index b0a64320c6..3f731859fc 100644 --- a/keyboards/splitkb/kyria/rev3/config.h +++ b/keyboards/splitkb/kyria/rev3/config.h @@ -16,12 +16,5 @@ #pragma once -// `SPLIT_HAND_PIN` can currently be defined in `info.json`, -// but can't yet be given a value -#define SPLIT_HAND_PIN B5 - -// Not yet available in `info.json` -#ifdef OLED_ENABLE -# define OLED_DISPLAY_128X64 -# define SPLIT_OLED_ENABLE -#endif +#define OLED_DISPLAY_128X64 +#define SPLIT_OLED_ENABLE diff --git a/keyboards/splitkb/kyria/rev3/keyboard.json b/keyboards/splitkb/kyria/rev3/keyboard.json index 4a426cb206..580aa821db 100644 --- a/keyboards/splitkb/kyria/rev3/keyboard.json +++ b/keyboards/splitkb/kyria/rev3/keyboard.json @@ -1,14 +1,12 @@ { "keyboard_name": "Kyria rev3", + "development_board": "elite_c", "usb": { "pid": "0xCF44" }, "bootmagic": { "matrix": [0, 6] }, - "build": { - "lto": true - }, "features": { "mousekey": true, "bootmagic": true, @@ -97,7 +95,6 @@ "bootmagic": { "matrix": [4, 6] }, - "soft_serial_pin": "D2", "matrix_pins": { "right": { "rows": ["F6", "F7", "B1", "B3"], @@ -111,6 +108,12 @@ ] } }, + "handedness": { + "pin": "B5" + }, + "serial": { + "pin": "D2" + }, "transport": { "sync": { "matrix_state": true diff --git a/keyboards/stront/keyboard.json b/keyboards/stront/keyboard.json index 5055a4fb30..573730a12b 100644 --- a/keyboards/stront/keyboard.json +++ b/keyboards/stront/keyboard.json @@ -68,6 +68,9 @@ "matrix_state": true, "modifiers": true } + }, + "serial": { + "driver": "vendor" } }, "encoder": { diff --git a/keyboards/stront/rules.mk b/keyboards/stront/rules.mk index 61d59017cb..5c88bf132a 100644 --- a/keyboards/stront/rules.mk +++ b/keyboards/stront/rules.mk @@ -1,5 +1,3 @@ -SERIAL_DRIVER = vendor - POINTING_DEVICE_DRIVER = cirque_pinnacle_spi QUANTUM_PAINTER_DRIVERS += st7789_spi diff --git a/keyboards/stront/stront.c b/keyboards/stront/stront.c index dc1f588c9b..1d6f7582a5 100644 --- a/keyboards/stront/stront.c +++ b/keyboards/stront/stront.c @@ -46,8 +46,6 @@ void housekeeping_task_kb(void) { if (display_enabled) { display_housekeeping_task(); } - - housekeeping_task_user(); } void keyboard_post_init_kb(void) { diff --git a/keyboards/supersplit/config.h b/keyboards/supersplit/config.h deleted file mode 100644 index f3bd23764b..0000000000 --- a/keyboards/supersplit/config.h +++ /dev/null @@ -1,36 +0,0 @@ -/* Copyright 2022 tarneo ([email protected]) - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -#pragma once - -/* - * 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 MASTER_LEFT diff --git a/keyboards/supersplit/keyboard.json b/keyboards/supersplit/keyboard.json index 6748321ff3..3950d2bbce 100644 --- a/keyboards/supersplit/keyboard.json +++ b/keyboards/supersplit/keyboard.json @@ -25,7 +25,9 @@ }, "split": { "enabled": true, - "soft_serial_pin": "D2" + "serial": { + "pin": "D2" + } }, "layouts": { "LAYOUT_split_6x4_9": { diff --git a/keyboards/supersplit/rules.mk b/keyboards/supersplit/rules.mk deleted file mode 100644 index a4f16a0b6b..0000000000 --- a/keyboards/supersplit/rules.mk +++ /dev/null @@ -1 +0,0 @@ -SERIAL_DRIVER = bitbang diff --git a/keyboards/switchplate/southpaw_65/keyboard.json b/keyboards/switchplate/southpaw_65/keyboard.json index e4090e49c7..72c4c71097 100644 --- a/keyboards/switchplate/southpaw_65/keyboard.json +++ b/keyboards/switchplate/southpaw_65/keyboard.json @@ -29,6 +29,10 @@ "pin": "B5", "levels": 10 }, + "indicators": { + "caps_lock": "B6", + "on_state": 0 + }, "rgblight": { "led_count": 9, "animations": { diff --git a/keyboards/switchplate/southpaw_65/southpaw_65.c b/keyboards/switchplate/southpaw_65/southpaw_65.c deleted file mode 100644 index dfe3665928..0000000000 --- a/keyboards/switchplate/southpaw_65/southpaw_65.c +++ /dev/null @@ -1,30 +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 <http://www.gnu.org/licenses/>. - */ -#include "quantum.h" - -void keyboard_pre_init_kb(void) { - gpio_set_pin_output(B6); - - keyboard_pre_init_user(); -} - -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if(res) { - gpio_write_pin(B6, !led_state.caps_lock); - } - return res; -} diff --git a/keyboards/switchplate/southpaw_fullsize/keyboard.json b/keyboards/switchplate/southpaw_fullsize/keyboard.json index ad897821c3..84942ccfa4 100644 --- a/keyboards/switchplate/southpaw_fullsize/keyboard.json +++ b/keyboards/switchplate/southpaw_fullsize/keyboard.json @@ -31,6 +31,12 @@ "backlight": { "pin": "B7" }, + "indicators": { + "caps_lock": "D4", + "num_lock": "D3", + "scroll_lock": "D5", + "on_state": 0 + }, "processor": "at90usb1286", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/switchplate/southpaw_fullsize/southpaw_fullsize.c b/keyboards/switchplate/southpaw_fullsize/southpaw_fullsize.c deleted file mode 100644 index 3d77e8722e..0000000000 --- a/keyboards/switchplate/southpaw_fullsize/southpaw_fullsize.c +++ /dev/null @@ -1,51 +0,0 @@ -/* Copyright 2020 Ryota Goto - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -#include "quantum.h" - -// Optional override functions below. -// You can leave any or all of these undefined. -// These are only required if you want to perform custom actions. - -#define INDICATOR_NUM D3 -#define INDICATOR_CAPS D4 -#define INDICATOR_SCR D5 - - -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - - // D3 Numlock, D4 Capslock, D5 Scrlock - gpio_set_pin_output(INDICATOR_NUM); - gpio_set_pin_output(INDICATOR_CAPS); - gpio_set_pin_output(INDICATOR_SCR); - - matrix_init_user(); -} - -bool led_update_kb(led_t led_state) { - // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here - bool res = led_update_user(led_state); - if (res) - { - gpio_write_pin(INDICATOR_NUM, !led_state.num_lock); - gpio_write_pin(INDICATOR_CAPS, !led_state.caps_lock); - gpio_write_pin(INDICATOR_SCR, !led_state.scroll_lock); - } - return res; -} - diff --git a/keyboards/system76/launch_1/launch_1.c b/keyboards/system76/launch_1/launch_1.c index 7a5000d9ba..dbe697c19d 100644 --- a/keyboards/system76/launch_1/launch_1.c +++ b/keyboards/system76/launch_1/launch_1.c @@ -139,12 +139,12 @@ void matrix_init_kb(void) { } system76_ec_rgb_layer(layer_state); + + matrix_init_user(); } -void matrix_scan_kb(void) { +void housekeeping_task_kb(void) { usb_mux_event(); - - matrix_scan_user(); } #define LEVEL(value) (uint8_t)(((uint16_t)value) * ((uint16_t)RGB_MATRIX_MAXIMUM_BRIGHTNESS) / ((uint16_t)255)) @@ -238,9 +238,11 @@ layer_state_t layer_state_set_kb(layer_state_t layer_state) { } #ifdef CONSOLE_ENABLE -void keyboard_post_init_user(void) { +void keyboard_post_init_kb(void) { debug_enable = true; debug_matrix = false; debug_keyboard = false; + + keyboard_post_init_user(); } #endif // CONSOLE_ENABLE diff --git a/keyboards/takashicompany/compacx/keyboard.json b/keyboards/takashicompany/compacx/keyboard.json index b4460cce77..71d6d2ec74 100644 --- a/keyboards/takashicompany/compacx/keyboard.json +++ b/keyboards/takashicompany/compacx/keyboard.json @@ -60,7 +60,9 @@ }, "split": { "enabled": true, - "soft_serial_pin": "D2" + "serial": { + "pin": "D2" + } }, "processor": "atmega32u4", "bootloader": "caterina", diff --git a/keyboards/takashicompany/dogtag/keyboard.json b/keyboards/takashicompany/dogtag/keyboard.json index d65092ecca..af8d2119d4 100644 --- a/keyboards/takashicompany/dogtag/keyboard.json +++ b/keyboards/takashicompany/dogtag/keyboard.json @@ -19,7 +19,7 @@ }, "matrix_pins": { "cols": ["F4", "F5", "F6", "F7", "B1"], - "rows": ["B2", "B6", "B3"] + "rows": ["B2", "B6"] }, "diode_direction": "COL2ROW", "encoder": { @@ -30,11 +30,13 @@ }, "split": { "enabled": true, - "soft_serial_pin": "D2", + "serial": { + "pin": "D2" + }, "matrix_pins": { "right": { "cols": ["B1", "F7", "F6", "F5", "F4"], - "rows": ["B2", "B6", "B3"] + "rows": ["B2", "B6"] } } }, @@ -65,10 +67,10 @@ {"matrix": [0, 2], "x": 2, "y": 0}, {"matrix": [0, 3], "x": 3, "y": 0}, - {"matrix": [3, 1], "x": 8, "y": 0}, - {"matrix": [3, 2], "x": 9, "y": 0}, - {"matrix": [3, 3], "x": 10, "y": 0}, - {"matrix": [3, 4], "x": 11, "y": 0}, + {"matrix": [2, 1], "x": 8, "y": 0}, + {"matrix": [2, 2], "x": 9, "y": 0}, + {"matrix": [2, 3], "x": 10, "y": 0}, + {"matrix": [2, 4], "x": 11, "y": 0}, {"matrix": [1, 0], "x": 0, "y": 1}, {"matrix": [1, 1], "x": 1, "y": 1}, @@ -76,11 +78,11 @@ {"matrix": [1, 3], "x": 3, "y": 1}, {"matrix": [1, 4], "x": 4, "y": 2}, - {"matrix": [4, 0], "x": 7, "y": 2}, - {"matrix": [4, 1], "x": 8, "y": 1}, - {"matrix": [4, 2], "x": 9, "y": 1}, - {"matrix": [4, 3], "x": 10, "y": 1}, - {"matrix": [4, 4], "x": 11, "y": 1} + {"matrix": [3, 0], "x": 7, "y": 2}, + {"matrix": [3, 1], "x": 8, "y": 1}, + {"matrix": [3, 2], "x": 9, "y": 1}, + {"matrix": [3, 3], "x": 10, "y": 1}, + {"matrix": [3, 4], "x": 11, "y": 1} ] } } diff --git a/keyboards/takashicompany/heavy_left/keyboard.json b/keyboards/takashicompany/heavy_left/keyboard.json index 3109e1ad83..5eb1596010 100644 --- a/keyboards/takashicompany/heavy_left/keyboard.json +++ b/keyboards/takashicompany/heavy_left/keyboard.json @@ -45,7 +45,9 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D2" + "serial": { + "pin": "D2" + } }, "development_board": "promicro", "layouts": { diff --git a/keyboards/takashicompany/minidivide/keyboard.json b/keyboards/takashicompany/minidivide/keyboard.json index 2234cd9b39..4ae089fbee 100644 --- a/keyboards/takashicompany/minidivide/keyboard.json +++ b/keyboards/takashicompany/minidivide/keyboard.json @@ -47,7 +47,9 @@ "rows": ["F4", "F5", "F6", "F7"] } }, - "soft_serial_pin": "D2" + "serial": { + "pin": "D2" + } }, "url": "", "usb": { diff --git a/keyboards/takashicompany/minidivide_max/keyboard.json b/keyboards/takashicompany/minidivide_max/keyboard.json index 32e67e944d..54f9dbaf78 100644 --- a/keyboards/takashicompany/minidivide_max/keyboard.json +++ b/keyboards/takashicompany/minidivide_max/keyboard.json @@ -45,7 +45,9 @@ "rows": ["F4", "F5", "F6", "F7", "B1"] } }, - "soft_serial_pin": "D2" + "serial": { + "pin": "D2" + } }, "url": "", "usb": { diff --git a/keyboards/takashiski/hecomi/alpha/keyboard.json b/keyboards/takashiski/hecomi/alpha/keyboard.json index 0a6bf513f0..edb920c82d 100644 --- a/keyboards/takashiski/hecomi/alpha/keyboard.json +++ b/keyboards/takashiski/hecomi/alpha/keyboard.json @@ -30,7 +30,9 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D1" + "serial": { + "pin": "D1" + } }, "rgblight": { "saturation_steps": 8, diff --git a/keyboards/takashiski/otaku_split/rev0/keyboard.json b/keyboards/takashiski/otaku_split/rev0/keyboard.json index e8e3b35d62..193254aa1a 100644 --- a/keyboards/takashiski/otaku_split/rev0/keyboard.json +++ b/keyboards/takashiski/otaku_split/rev0/keyboard.json @@ -29,7 +29,9 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D0" + "serial": { + "pin": "D0" + } }, "processor": "atmega32u4", "bootloader": "atmel-dfu", diff --git a/keyboards/takashiski/otaku_split/rev1/config.h b/keyboards/takashiski/otaku_split/rev1/config.h deleted file mode 100644 index 8bede1c421..0000000000 --- a/keyboards/takashiski/otaku_split/rev1/config.h +++ /dev/null @@ -1,36 +0,0 @@ -/* -Copyright 2019 takashiski - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#pragma once - -#define SPLIT_HAND_PIN D2 //fix pin. HIGH is left, LOW is right - -/* - * 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 diff --git a/keyboards/takashiski/otaku_split/rev1/keyboard.json b/keyboards/takashiski/otaku_split/rev1/keyboard.json index 039838144f..16f0cb8ccf 100644 --- a/keyboards/takashiski/otaku_split/rev1/keyboard.json +++ b/keyboards/takashiski/otaku_split/rev1/keyboard.json @@ -29,7 +29,12 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D0", + "handedness": { + "pin": "D2" + }, + "serial": { + "pin": "D0" + }, "matrix_pins": { "right": { "cols": ["B6", "B2", "B3", "B1", "F7", "F6", "F5", "F4"], diff --git a/keyboards/team0110/p1800fl/keyboard.json b/keyboards/team0110/p1800fl/keyboard.json index a56864cd36..681482db5b 100644 --- a/keyboards/team0110/p1800fl/keyboard.json +++ b/keyboards/team0110/p1800fl/keyboard.json @@ -34,6 +34,11 @@ "levels": 5, "breathing": true }, + "indicators": { + "caps_lock": "D5", + "num_lock": "D3", + "scroll_lock": "C6" + }, "rgblight": { "saturation_steps": 8, "brightness_steps": 8, diff --git a/keyboards/team0110/p1800fl/p1800fl.c b/keyboards/team0110/p1800fl/p1800fl.c deleted file mode 100644 index 9f47b8a5c4..0000000000 --- a/keyboards/team0110/p1800fl/p1800fl.c +++ /dev/null @@ -1,28 +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 <http://www.gnu.org/licenses/>. - */ - -#include "quantum.h" - -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if(res) { - gpio_write_pin(D3, led_state.num_lock); - gpio_write_pin(D5, led_state.caps_lock); - gpio_write_pin(C6, led_state.scroll_lock); - } - return res; -} - diff --git a/keyboards/terrazzo/keyboard.json b/keyboards/terrazzo/keyboard.json index e2cfbfcfb1..fb8bc6b483 100644 --- a/keyboards/terrazzo/keyboard.json +++ b/keyboards/terrazzo/keyboard.json @@ -34,7 +34,120 @@ "led_matrix": { "driver": "is31fl3731", "max_brightness": 20, - "sleep": true + "sleep": true, + "layout": [ + {"x": 0, "y": 0, "flags": 0}, + {"x": 16, "y": 0, "flags": 0}, + {"x": 32, "y": 0, "flags": 0}, + {"x": 48, "y": 0, "flags": 0}, + {"x": 64, "y": 0, "flags": 0}, + {"x": 80, "y": 0, "flags": 0}, + {"x": 96, "y": 0, "flags": 0}, + {"x": 112, "y": 0, "flags": 0}, + {"x": 128, "y": 0, "flags": 0}, + {"x": 144, "y": 0, "flags": 0}, + {"x": 160, "y": 0, "flags": 0}, + {"x": 176, "y": 0, "flags": 0}, + {"x": 192, "y": 0, "flags": 0}, + {"x": 208, "y": 0, "flags": 0}, + {"x": 224, "y": 0, "flags": 0}, + + {"x": 0, "y": 11, "flags": 0}, + {"x": 16, "y": 11, "flags": 0}, + {"x": 32, "y": 11, "flags": 0}, + {"x": 48, "y": 11, "flags": 0}, + {"x": 64, "y": 11, "flags": 0}, + {"x": 80, "y": 11, "flags": 0}, + {"x": 96, "y": 11, "flags": 0}, + {"x": 112, "y": 11, "flags": 0}, + {"x": 128, "y": 11, "flags": 0}, + {"x": 144, "y": 11, "flags": 0}, + {"x": 160, "y": 11, "flags": 0}, + {"x": 176, "y": 11, "flags": 0}, + {"x": 192, "y": 11, "flags": 0}, + {"x": 208, "y": 11, "flags": 0}, + {"x": 224, "y": 11, "flags": 0}, + + {"x": 0, "y": 21, "flags": 0}, + {"x": 16, "y": 21, "flags": 0}, + {"x": 32, "y": 21, "flags": 0}, + {"x": 48, "y": 21, "flags": 0}, + {"x": 64, "y": 21, "flags": 0}, + {"x": 80, "y": 21, "flags": 0}, + {"x": 96, "y": 21, "flags": 0}, + {"x": 112, "y": 21, "flags": 0}, + {"x": 128, "y": 21, "flags": 0}, + {"x": 144, "y": 21, "flags": 0}, + {"x": 160, "y": 21, "flags": 0}, + {"x": 176, "y": 21, "flags": 0}, + {"x": 192, "y": 21, "flags": 0}, + {"x": 208, "y": 21, "flags": 0}, + {"x": 224, "y": 21, "flags": 0}, + + {"x": 0, "y": 32, "flags": 0}, + {"x": 16, "y": 32, "flags": 0}, + {"x": 32, "y": 32, "flags": 0}, + {"x": 48, "y": 32, "flags": 0}, + {"x": 64, "y": 32, "flags": 0}, + {"x": 80, "y": 32, "flags": 0}, + {"x": 96, "y": 32, "flags": 0}, + {"x": 112, "y": 32, "flags": 0}, + {"x": 128, "y": 32, "flags": 0}, + {"x": 144, "y": 32, "flags": 0}, + {"x": 160, "y": 32, "flags": 0}, + {"x": 176, "y": 32, "flags": 0}, + {"x": 192, "y": 32, "flags": 0}, + {"x": 208, "y": 32, "flags": 0}, + {"x": 224, "y": 32, "flags": 0}, + + {"x": 0, "y": 43, "flags": 0}, + {"x": 16, "y": 43, "flags": 0}, + {"x": 32, "y": 43, "flags": 0}, + {"x": 48, "y": 43, "flags": 0}, + {"x": 64, "y": 43, "flags": 0}, + {"x": 80, "y": 43, "flags": 0}, + {"x": 96, "y": 43, "flags": 0}, + {"x": 112, "y": 43, "flags": 0}, + {"x": 128, "y": 43, "flags": 0}, + {"x": 144, "y": 43, "flags": 0}, + {"x": 160, "y": 43, "flags": 0}, + {"x": 176, "y": 43, "flags": 0}, + {"x": 192, "y": 43, "flags": 0}, + {"x": 208, "y": 43, "flags": 0}, + {"x": 224, "y": 43, "flags": 0}, + + {"x": 0, "y": 53, "flags": 0}, + {"x": 16, "y": 53, "flags": 0}, + {"x": 32, "y": 53, "flags": 0}, + {"x": 48, "y": 53, "flags": 0}, + {"x": 64, "y": 53, "flags": 0}, + {"x": 80, "y": 53, "flags": 0}, + {"x": 96, "y": 53, "flags": 0}, + {"x": 112, "y": 53, "flags": 0}, + {"x": 128, "y": 53, "flags": 0}, + {"x": 144, "y": 53, "flags": 0}, + {"x": 160, "y": 53, "flags": 0}, + {"x": 176, "y": 53, "flags": 0}, + {"x": 192, "y": 53, "flags": 0}, + {"x": 208, "y": 53, "flags": 0}, + {"x": 224, "y": 53, "flags": 0}, + + {"x": 0, "y": 64, "flags": 0}, + {"x": 16, "y": 64, "flags": 0}, + {"x": 32, "y": 64, "flags": 0}, + {"x": 48, "y": 64, "flags": 0}, + {"x": 64, "y": 64, "flags": 0}, + {"x": 80, "y": 64, "flags": 0}, + {"x": 96, "y": 64, "flags": 0}, + {"x": 112, "y": 64, "flags": 0}, + {"x": 128, "y": 64, "flags": 0}, + {"x": 144, "y": 64, "flags": 0}, + {"x": 160, "y": 64, "flags": 0}, + {"x": 176, "y": 64, "flags": 0}, + {"x": 192, "y": 64, "flags": 0}, + {"x": 208, "y": 64, "flags": 0}, + {"x": 224, "y": 64, "flags": 0} + ] }, "processor": "atmega32u4", "bootloader": "atmel-dfu", diff --git a/keyboards/terrazzo/readme.md b/keyboards/terrazzo/readme.md index e0f4f3457f..828819f7b4 100644 --- a/keyboards/terrazzo/readme.md +++ b/keyboards/terrazzo/readme.md @@ -82,8 +82,8 @@ Change pinouts, Pro Micro does not have the "F0" pin. Set encoder to just top or bottom position. ``` -#define ENCODERS_PAD_A { C6 } -#define ENCODERS_PAD_B { D4 } +#define ENCODER_A_PINS { C6 } +#define ENCODER_B_PINS { D4 } ``` ## Encoder Setup diff --git a/keyboards/terrazzo/terrazzo.c b/keyboards/terrazzo/terrazzo.c index 34aa7c4324..2a3d2a8cc6 100644 --- a/keyboards/terrazzo/terrazzo.c +++ b/keyboards/terrazzo/terrazzo.c @@ -39,39 +39,6 @@ const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = { {0, C2_15},{0, C2_14},{0, C2_13},{0, C2_12},{0, C2_11},{0, C2_10},{0, C2_9} }; -led_config_t g_led_config = { - { - // Key Matrix to LED Index - { 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, 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 - { 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, 11 }, { 16, 11 }, { 32, 11 }, { 48, 11 }, { 64, 11 }, { 80, 11 }, { 96, 11 }, { 112, 11 }, { 128, 11 }, { 144, 11 }, { 160, 11 }, { 176, 11 }, { 192, 11 }, { 208, 11 }, { 224, 11 }, - { 0, 21 }, { 16, 21 }, { 32, 21 }, { 48, 21 }, { 64, 21 }, { 80, 21 }, { 96, 21 }, { 112, 21 }, { 128, 21 }, { 144, 21 }, { 160, 21 }, { 176, 21 }, { 192, 21 }, { 208, 21 }, { 224, 21 }, - { 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 }, { 224, 32 }, - { 0, 43 }, { 16, 43 }, { 32, 43 }, { 48, 43 }, { 64, 43 }, { 80, 43 }, { 96, 43 }, { 112, 43 }, { 128, 43 }, { 144, 43 }, { 160, 43 }, { 176, 43 }, { 192, 43 }, { 208, 43 }, { 224, 43 }, - { 0, 53 }, { 16, 53 }, { 32, 53 }, { 48, 53 }, { 64, 53 }, { 80, 53 }, { 96, 53 }, { 112, 53 }, { 128, 53 }, { 144, 53 }, { 160, 53 }, { 176, 53 }, { 192, 53 }, { 208, 53 }, { 224, 53 }, - { 0, 64 }, { 16, 64 }, { 32, 64 }, { 48, 64 }, { 64, 64 }, { 80, 64 }, { 96, 64 }, { 112, 64 }, { 128, 64 }, { 144, 64 }, { 160, 64 }, { 176, 64 }, { 192, 64 }, { 208, 64 }, { 224, 64 } - }, { - // LED Index to Flag - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 - } -}; - #define TERRAZZO_EFFECT(name) #define TERRAZZO_EFFECT_IMPLS diff --git a/keyboards/tkc/osav2/keyboard.json b/keyboards/tkc/osav2/keyboard.json index 118eedfc85..ef4c789797 100644 --- a/keyboards/tkc/osav2/keyboard.json +++ b/keyboards/tkc/osav2/keyboard.json @@ -50,6 +50,11 @@ "pin": "D6", "breathing": true }, + "indicators": { + "caps_lock": "C6", + "num_lock": "C7", + "scroll_lock": "B6" + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "community_layouts": ["alice", "alice_split_bs"], diff --git a/keyboards/tkc/osav2/osav2.c b/keyboards/tkc/osav2/osav2.c deleted file mode 100644 index 9966046486..0000000000 --- a/keyboards/tkc/osav2/osav2.c +++ /dev/null @@ -1,33 +0,0 @@ -/* Copyright 2019 jrfhoutx - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ -#include "quantum.h" - -void keyboard_pre_init_kb(void) { - gpio_set_pin_output(C7); - gpio_set_pin_output(C6); - gpio_set_pin_output(B6); - - keyboard_pre_init_user(); -} - -bool led_update_kb(led_t led_state) { - if (led_update_user(led_state)) { - gpio_write_pin(C7, led_state.num_lock); - gpio_write_pin(C6, led_state.caps_lock); - gpio_write_pin(B6, led_state.scroll_lock); - } - return true; -} diff --git a/keyboards/tkw/grandiceps/info.json b/keyboards/tkw/grandiceps/info.json index 13bc1e7acf..9804559a2b 100644 --- a/keyboards/tkw/grandiceps/info.json +++ b/keyboards/tkw/grandiceps/info.json @@ -52,12 +52,15 @@ }, "split": { "enabled": true, - "soft_serial_pin": "A15", "matrix_pins": { "right": { "cols": ["B0", "A7", "A3", "A5", "A4", "A2"], "rows": ["B12", "A6", "B13", "B9", "B8"] } + }, + "serial": { + "driver": "usart", + "pin": "A15" } }, "qmk": { diff --git a/keyboards/tkw/grandiceps/rules.mk b/keyboards/tkw/grandiceps/rules.mk index 01fa521763..ab8aeff268 100644 --- a/keyboards/tkw/grandiceps/rules.mk +++ b/keyboards/tkw/grandiceps/rules.mk @@ -1,3 +1 @@ -SERIAL_DRIVER = usart - DEFAULT_FOLDER = tkw/grandiceps/rev1 diff --git a/keyboards/tr60w/keyboard.json b/keyboards/tr60w/keyboard.json index 60c01bdcfc..dc71e3ad7a 100644 --- a/keyboards/tr60w/keyboard.json +++ b/keyboards/tr60w/keyboard.json @@ -32,6 +32,12 @@ "backlight": { "pin": "B7" }, + "indicators": { + "caps_lock": "B2", + "num_lock": "B1", + "scroll_lock": "B3", + "on_state": 0 + }, "rgblight": { "saturation_steps": 8, "brightness_steps": 8, diff --git a/keyboards/tr60w/tr60w.c b/keyboards/tr60w/tr60w.c deleted file mode 100644 index ebf48cb1c7..0000000000 --- a/keyboards/tr60w/tr60w.c +++ /dev/null @@ -1,11 +0,0 @@ -#include "quantum.h" - -bool led_update_kb(led_t led_state) { - bool runDefault = led_update_user(led_state); - if (runDefault) { - gpio_write_pin(B1, !led_state.num_lock); - gpio_write_pin(B2, !led_state.caps_lock); - gpio_write_pin(B3, !led_state.scroll_lock); - } - return runDefault; -} diff --git a/keyboards/trkeyboards/trk1/keyboard.json b/keyboards/trkeyboards/trk1/keyboard.json new file mode 100644 index 0000000000..c3190a5eee --- /dev/null +++ b/keyboards/trkeyboards/trk1/keyboard.json @@ -0,0 +1,107 @@ +{ + "manufacturer": "Tvrd Rad Keyboards", + "keyboard_name": "Tvrd Rad Keyboards TRK1", + "maintainer": "tvrdrad-keyboards", + "bootloader": "halfkay", + "diode_direction": "COL2ROW", + "encoder": { + "rotary": [ + {"pin_a": "B0", "pin_b": "B1", "resolution": 2} + ] + }, + "features": { + "bootmagic": true, + "command": false, + "console": false, + "encoder": true, + "extrakey": true, + "mousekey": true, + "nkro": true + }, + "matrix_pins": { + "cols": ["B3", "B2", "D2", "D3", "C6", "C7", "D5", "F6", "F7", "B6", "B5", "B4", "D7", "D6", "D4"], + "rows": ["F5", "F4", "F1", "F0", "B7"] + }, + "processor": "atmega32u4", + "url": "https://www.trkeyboards.com/", + "usb": { + "device_version": "0.0.1", + "pid": "0x0001", + "vid": "0x5452" + }, + "layouts": { + "LAYOUT": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0}, + {"matrix": [0, 1], "x": 1.25, "y": 0}, + {"matrix": [0, 2], "x": 2.5, "y": 0}, + {"matrix": [0, 3], "x": 3.5, "y": 0}, + {"matrix": [0, 4], "x": 4.5, "y": 0}, + {"matrix": [0, 5], "x": 5.5, "y": 0}, + {"matrix": [0, 6], "x": 6.5, "y": 0}, + {"matrix": [0, 7], "x": 8.75, "y": 0}, + {"matrix": [0, 8], "x": 9.75, "y": 0}, + {"matrix": [0, 9], "x": 10.75, "y": 0}, + {"matrix": [0, 10], "x": 11.75, "y": 0}, + {"matrix": [0, 11], "x": 13, "y": 0}, + {"matrix": [0, 12], "x": 14, "y": 0}, + {"matrix": [0, 13], "x": 15, "y": 0}, + {"matrix": [0, 14], "x": 16, "y": 0}, + {"matrix": [2, 10], "x": 17, "y": 0}, + {"matrix": [1, 0], "x": 0, "y": 1, "w": 1.5}, + {"matrix": [1, 1], "x": 1.5, "y": 1}, + {"matrix": [1, 2], "x": 2.75, "y": 1}, + {"matrix": [1, 3], "x": 3.75, "y": 1}, + {"matrix": [1, 4], "x": 4.75, "y": 1}, + {"matrix": [1, 5], "x": 5.75, "y": 1}, + {"matrix": [1, 6], "x": 8.25, "y": 1}, + {"matrix": [1, 7], "x": 9.25, "y": 1}, + {"matrix": [1, 8], "x": 10.25, "y": 1}, + {"matrix": [1, 9], "x": 11.25, "y": 1}, + {"matrix": [1, 10], "x": 12.5, "y": 1}, + {"matrix": [1, 11], "x": 13.5, "y": 1}, + {"matrix": [1, 12], "x": 14.5, "y": 1}, + {"matrix": [1, 13], "x": 15.5, "y": 1, "w": 1.5}, + {"matrix": [1, 14], "x": 17, "y": 1}, + {"matrix": [2, 0], "x": 0, "y": 2, "w": 1.75}, + {"matrix": [2, 1], "x": 1.75, "y": 2}, + {"matrix": [2, 2], "x": 3.25, "y": 2}, + {"matrix": [2, 3], "x": 4.25, "y": 2}, + {"matrix": [2, 4], "x": 5.25, "y": 2}, + {"matrix": [2, 5], "x": 6.25, "y": 2}, + {"matrix": [2, 6], "x": 8.5, "y": 2}, + {"matrix": [2, 7], "x": 9.5, "y": 2}, + {"matrix": [2, 8], "x": 10.5, "y": 2}, + {"matrix": [2, 9], "x": 11.5, "y": 2}, + {"matrix": [2, 11], "x": 12.75, "y": 2}, + {"matrix": [2, 12], "x": 13.75, "y": 2}, + {"matrix": [2, 13], "x": 14.75, "y": 2, "w": 2.25}, + {"matrix": [2, 14], "x": 17, "y": 2}, + {"matrix": [3, 0], "x": 0, "y": 3, "w": 2}, + {"matrix": [3, 1], "x": 2, "y": 3}, + {"matrix": [3, 2], "x": 3.75, "y": 3}, + {"matrix": [3, 3], "x": 4.75, "y": 3}, + {"matrix": [3, 4], "x": 5.75, "y": 3}, + {"matrix": [3, 5], "x": 6.75, "y": 3}, + {"matrix": [3, 6], "x": 9, "y": 3}, + {"matrix": [3, 7], "x": 10, "y": 3}, + {"matrix": [3, 8], "x": 11, "y": 3}, + {"matrix": [3, 9], "x": 12.5, "y": 3}, + {"matrix": [3, 11], "x": 13.5, "y": 3}, + {"matrix": [3, 12], "x": 14.5, "y": 3, "w": 1.5}, + {"matrix": [3, 13], "x": 16, "y": 3}, + {"matrix": [3, 14], "x": 17, "y": 3}, + {"matrix": [4, 0], "x": 0, "y": 4, "w": 1.25}, + {"matrix": [4, 1], "x": 1.25, "y": 4, "w": 1.25}, + {"matrix": [4, 2], "x": 4, "y": 4, "w": 1.25}, + {"matrix": [4, 3], "x": 5.25, "y": 4, "w": 2.75}, + {"matrix": [4, 4], "x": 8.25, "y": 4, "w": 2}, + {"matrix": [4, 6], "x": 10.25, "y": 4}, + {"matrix": [4, 9], "x": 13.75, "y": 4, "w": 1.25}, + {"matrix": [4, 10], "x": 15, "y": 4}, + {"matrix": [4, 11], "x": 16, "y": 4}, + {"matrix": [4, 12], "x": 17, "y": 4} + ] + } + } +} diff --git a/keyboards/trkeyboards/trk1/keymaps/default/keymap.c b/keyboards/trkeyboards/trk1/keymaps/default/keymap.c new file mode 100644 index 0000000000..ecbee43624 --- /dev/null +++ b/keyboards/trkeyboards/trk1/keymaps/default/keymap.c @@ -0,0 +1,42 @@ +/* Copyright 2024 Tvrd Rad Keyboards + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, KC_EQUAL, KC_KP_SLASH, KC_KP_ASTERISK, + KC_TAB, KC_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_MUTE, KC_SCLN, KC_QUOTE, KC_ENTER, KC_END, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLASH, KC_RSFT, KC_UP, KC_DELETE, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_BSPC, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT + ), + [1] = LAYOUT( + QK_BOOT, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PMNS, KC_PPLS, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGDN, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + +#if defined(ENCODER_MAP_ENABLE) +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { + [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [1] = { ENCODER_CCW_CW(_______, _______) } +}; +#endif diff --git a/keyboards/trkeyboards/trk1/keymaps/default/rules.mk b/keyboards/trkeyboards/trk1/keymaps/default/rules.mk new file mode 100644 index 0000000000..ee32568148 --- /dev/null +++ b/keyboards/trkeyboards/trk1/keymaps/default/rules.mk @@ -0,0 +1 @@ +ENCODER_MAP_ENABLE = yes diff --git a/keyboards/trkeyboards/trk1/keymaps/via/keymap.c b/keyboards/trkeyboards/trk1/keymaps/via/keymap.c new file mode 100644 index 0000000000..ecbee43624 --- /dev/null +++ b/keyboards/trkeyboards/trk1/keymaps/via/keymap.c @@ -0,0 +1,42 @@ +/* Copyright 2024 Tvrd Rad Keyboards + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, KC_EQUAL, KC_KP_SLASH, KC_KP_ASTERISK, + KC_TAB, KC_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_MUTE, KC_SCLN, KC_QUOTE, KC_ENTER, KC_END, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLASH, KC_RSFT, KC_UP, KC_DELETE, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_BSPC, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT + ), + [1] = LAYOUT( + QK_BOOT, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PMNS, KC_PPLS, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGDN, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + +#if defined(ENCODER_MAP_ENABLE) +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { + [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [1] = { ENCODER_CCW_CW(_______, _______) } +}; +#endif diff --git a/keyboards/trkeyboards/trk1/keymaps/via/rules.mk b/keyboards/trkeyboards/trk1/keymaps/via/rules.mk new file mode 100644 index 0000000000..f1adcab005 --- /dev/null +++ b/keyboards/trkeyboards/trk1/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +ENCODER_MAP_ENABLE = yes diff --git a/keyboards/trkeyboards/trk1/readme.md b/keyboards/trkeyboards/trk1/readme.md new file mode 100644 index 0000000000..b411863321 --- /dev/null +++ b/keyboards/trkeyboards/trk1/readme.md @@ -0,0 +1,22 @@ +# Tvrd Rad Keyboards TRK1 + +![TRK1](https://i.imgur.com/dbxoTah.jpg) + +Custom keyboard designed by Tvrd Rad Keyboards aka TRK1 + +* Keyboard Maintainer: [Tvrd Rad Keyboards](https://www.trkeyboards.com) +* Hardware Supported: TRK1 PCB +* Hardware Availability: https://www.trkeyboards.com/en/keyboards/1-trk1/ + +Getting the board into bootloader mode: +To be able to flash firmware onto this board and put keyboard into bootloader mode, you need to press the "Fn" and "Esc" keys on the keyboard at the same time. + +Make example for this keyboard (after setting up your build environment): + + make trkeyboards/trk1:default + +Flashing example for this keyboard: + + make trkeyboards/trk1: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/tweetydabird/lotus58/elite_c/keyboard.json b/keyboards/tweetydabird/lotus58/elite_c/keyboard.json index af1a9f913c..2a4c4a21bc 100644 --- a/keyboards/tweetydabird/lotus58/elite_c/keyboard.json +++ b/keyboards/tweetydabird/lotus58/elite_c/keyboard.json @@ -24,9 +24,11 @@ "handedness": { "pin": "B5" }, - "soft_serial_pin": "D2", + "serial": { + "pin": "D2" + } }, "ws2812": { "pin": "D3" - }, + } } diff --git a/keyboards/tweetydabird/lotus58/nanoboot/keyboard.json b/keyboards/tweetydabird/lotus58/nanoboot/keyboard.json index e7586e6f2f..85f37a265c 100644 --- a/keyboards/tweetydabird/lotus58/nanoboot/keyboard.json +++ b/keyboards/tweetydabird/lotus58/nanoboot/keyboard.json @@ -24,9 +24,11 @@ "handedness": { "pin": "B5" }, - "soft_serial_pin": "D2", + "serial": { + "pin": "D2" + } }, "ws2812": { "pin": "D3" - }, + } } diff --git a/keyboards/tweetydabird/lotus58/promicro/keyboard.json b/keyboards/tweetydabird/lotus58/promicro/keyboard.json index 62ee0355ef..83532c8ee2 100644 --- a/keyboards/tweetydabird/lotus58/promicro/keyboard.json +++ b/keyboards/tweetydabird/lotus58/promicro/keyboard.json @@ -23,9 +23,11 @@ "handedness": { "pin": "B5" }, - "soft_serial_pin": "D2", + "serial": { + "pin": "D2" + } }, "ws2812": { "pin": "D3" - }, + } } diff --git a/keyboards/tweetydabird/lotus58/rp2040_ce/keyboard.json b/keyboards/tweetydabird/lotus58/rp2040_ce/keyboard.json index c8bf711747..07fb343974 100644 --- a/keyboards/tweetydabird/lotus58/rp2040_ce/keyboard.json +++ b/keyboards/tweetydabird/lotus58/rp2040_ce/keyboard.json @@ -17,7 +17,10 @@ ] } }, - "soft_serial_pin": "GP1", + "serial": { + "driver": "vendor", + "pin": "GP1" + }, "handedness": { "pin": "GP9" } diff --git a/keyboards/tweetydabird/lotus58/rp2040_ce/rules.mk b/keyboards/tweetydabird/lotus58/rp2040_ce/rules.mk deleted file mode 100644 index 161ec22b16..0000000000 --- a/keyboards/tweetydabird/lotus58/rp2040_ce/rules.mk +++ /dev/null @@ -1 +0,0 @@ -SERIAL_DRIVER = vendor diff --git a/keyboards/tzarc/djinn/info.json b/keyboards/tzarc/djinn/info.json index b173a18de1..8f0c0bc75f 100644 --- a/keyboards/tzarc/djinn/info.json +++ b/keyboards/tzarc/djinn/info.json @@ -54,6 +54,9 @@ ] } }, + "serial": { + "driver": "usart" + }, "transport": { "sync": { "activity": true, diff --git a/keyboards/tzarc/djinn/rev1/config.h b/keyboards/tzarc/djinn/rev1/config.h index 7c8dc042f3..9eb275fc5b 100644 --- a/keyboards/tzarc/djinn/rev1/config.h +++ b/keyboards/tzarc/djinn/rev1/config.h @@ -3,7 +3,6 @@ #pragma once // Split configuration -#define SPLIT_HAND_PIN B11 #ifdef USE_PLUG_DETECT_PIN # define USB_VBUS_PIN B12 #endif diff --git a/keyboards/tzarc/djinn/rev1/keyboard.json b/keyboards/tzarc/djinn/rev1/keyboard.json index a0422dea93..8ae4f0c553 100644 --- a/keyboards/tzarc/djinn/rev1/keyboard.json +++ b/keyboards/tzarc/djinn/rev1/keyboard.json @@ -6,7 +6,12 @@ "max_brightness": 144 }, "split": { - "soft_serial_pin": "B9", + "handedness": { + "pin": "B11" + }, + "serial": { + "pin": "B9" + }, "usb_detect": { "enabled": true } diff --git a/keyboards/tzarc/djinn/rev2/config.h b/keyboards/tzarc/djinn/rev2/config.h index bc7fcb3712..b52c3c2c3d 100644 --- a/keyboards/tzarc/djinn/rev2/config.h +++ b/keyboards/tzarc/djinn/rev2/config.h @@ -3,7 +3,6 @@ #pragma once // Split configuration -#define SPLIT_HAND_PIN B9 #define USB_VBUS_PIN B12 #define SERIAL_USART_DRIVER SD3 #define SERIAL_USART_PIN_SWAP diff --git a/keyboards/tzarc/djinn/rev2/keyboard.json b/keyboards/tzarc/djinn/rev2/keyboard.json index 33db91971e..e0f39d1f91 100644 --- a/keyboards/tzarc/djinn/rev2/keyboard.json +++ b/keyboards/tzarc/djinn/rev2/keyboard.json @@ -6,6 +6,9 @@ "max_brightness": 144 }, "split": { + "handedness": { + "pin": "B9" + }, "usb_detect": { "enabled": false } diff --git a/keyboards/tzarc/djinn/rules.mk b/keyboards/tzarc/djinn/rules.mk index 78912d16d0..d5060d9814 100644 --- a/keyboards/tzarc/djinn/rules.mk +++ b/keyboards/tzarc/djinn/rules.mk @@ -1,7 +1,5 @@ CUSTOM_MATRIX = lite -SERIAL_DRIVER = usart - CIE1931_CURVE = yes QUANTUM_PAINTER_DRIVERS = ili9341_spi diff --git a/keyboards/unicomp/spacesaver_m_post_2013/overnumpad_1xb/overnumpad_1xb.c b/keyboards/unicomp/spacesaver_m_post_2013/overnumpad_1xb/overnumpad_1xb.c index f441285c9a..488ace3f91 100644 --- a/keyboards/unicomp/spacesaver_m_post_2013/overnumpad_1xb/overnumpad_1xb.c +++ b/keyboards/unicomp/spacesaver_m_post_2013/overnumpad_1xb/overnumpad_1xb.c @@ -23,6 +23,8 @@ void keyboard_post_init_kb(void) gpio_set_pin_output(C11); // middle led, always off on Spacesaver M gpio_write_pin(C11, 0); gpio_set_pin_output(C10); // right-most led, normally Scroll Lock, but on Spacesaver M indicates function layer + + keyboard_post_init_user(); } diff --git a/keyboards/unicomp/spacesaver_m_pre_2013/overnumpad_1xb/overnumpad_1xb.c b/keyboards/unicomp/spacesaver_m_pre_2013/overnumpad_1xb/overnumpad_1xb.c index bad0c76e43..9f5f592ff6 100644 --- a/keyboards/unicomp/spacesaver_m_pre_2013/overnumpad_1xb/overnumpad_1xb.c +++ b/keyboards/unicomp/spacesaver_m_pre_2013/overnumpad_1xb/overnumpad_1xb.c @@ -23,6 +23,8 @@ void keyboard_post_init_kb(void) gpio_set_pin_output(C11); // middle led, always off on Spacesaver M gpio_write_pin(C11, 0); gpio_set_pin_output(C10); // right-most led, normally Scroll Lock, but on Spacesaver M indicates function layer + + keyboard_post_init_user(); } layer_state_t layer_state_set_kb(layer_state_t state) { diff --git a/keyboards/unikeyboard/diverge3/keyboard.json b/keyboards/unikeyboard/diverge3/keyboard.json index 36f056187b..767f44b198 100644 --- a/keyboards/unikeyboard/diverge3/keyboard.json +++ b/keyboards/unikeyboard/diverge3/keyboard.json @@ -35,7 +35,9 @@ }, "split": { "enabled": true, - "soft_serial_pin": "D0" + "serial": { + "pin": "D0" + } }, "processor": "atmega32u4", "bootloader": "caterina", diff --git a/keyboards/unikeyboard/diverge3/keymaps/iso_uk/config.h b/keyboards/unikeyboard/diverge3/keymaps/iso_uk/config.h index 83f65979c7..6309c84294 100755 --- a/keyboards/unikeyboard/diverge3/keymaps/iso_uk/config.h +++ b/keyboards/unikeyboard/diverge3/keymaps/iso_uk/config.h @@ -18,7 +18,6 @@ // place overrides here -#define MASTER_LEFT #define PERMISSIVE_HOLD #define TAPPING_TERM 150 diff --git a/keyboards/unikeyboard/divergetm2/keyboard.json b/keyboards/unikeyboard/divergetm2/keyboard.json index b2db7a19db..09d481149c 100644 --- a/keyboards/unikeyboard/divergetm2/keyboard.json +++ b/keyboards/unikeyboard/divergetm2/keyboard.json @@ -29,7 +29,9 @@ "diode_direction": "ROW2COL", "split": { "enabled": true, - "soft_serial_pin": "D0" + "serial": { + "pin": "D0" + } }, "processor": "atmega32u4", "bootloader": "caterina", diff --git a/keyboards/uzu42/rev1/keyboard.json b/keyboards/uzu42/rev1/keyboard.json index 71d9f424cc..f96327daea 100644 --- a/keyboards/uzu42/rev1/keyboard.json +++ b/keyboards/uzu42/rev1/keyboard.json @@ -22,7 +22,9 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D2" + "serial": { + "pin": "D2" + } }, "ws2812": { "pin": "D3" diff --git a/keyboards/viktus/sp111/keyboard.json b/keyboards/viktus/sp111/keyboard.json index 8cf65a5522..91a70c284b 100644 --- a/keyboards/viktus/sp111/keyboard.json +++ b/keyboards/viktus/sp111/keyboard.json @@ -17,6 +17,11 @@ "mousekey": true, "nkro": true }, + "indicators": { + "caps_lock": "F1", + "num_lock": "F0", + "scroll_lock": "F4" + }, "qmk": { "locking": { "enabled": true, diff --git a/keyboards/viktus/sp111/sp111.c b/keyboards/viktus/sp111/sp111.c index 1626683804..c2162429c1 100644 --- a/keyboards/viktus/sp111/sp111.c +++ b/keyboards/viktus/sp111/sp111.c @@ -22,21 +22,3 @@ void keyboard_pre_init_kb(void) { keyboard_pre_init_user(); } - -void matrix_init_kb(void) { - gpio_set_pin_output(F0); - gpio_set_pin_output(F1); - gpio_set_pin_output(F4); - - matrix_init_user(); -} - -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if (res) { - gpio_write_pin(F0, led_state.num_lock); - gpio_write_pin(F1, led_state.caps_lock); - gpio_write_pin(F4, led_state.scroll_lock); - } - return res; -} diff --git a/keyboards/viktus/sp_mini/config.h b/keyboards/viktus/sp_mini/config.h index 6c7ecf8515..2be5904550 100644 --- a/keyboards/viktus/sp_mini/config.h +++ b/keyboards/viktus/sp_mini/config.h @@ -20,7 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Split Defines */ #define SPLIT_USB_DETECT -#define MASTER_LEFT #define USE_I2C /* diff --git a/keyboards/vitamins_included/keymaps/default/config.h b/keyboards/vitamins_included/keymaps/default/config.h index 95dd8ec464..8df0c312a4 100644 --- a/keyboards/vitamins_included/keymaps/default/config.h +++ b/keyboards/vitamins_included/keymaps/default/config.h @@ -28,12 +28,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // Rev1: EE_HANDS // Rev2: SPLIT_HAND_PIN B4 -// You can override the defaults (rev1 doesn't support SPLIT_HAND_PIN) -//#define EE_HANDS -//#define MASTER_LEFT -//#define MASTER_RIGHT - - #ifdef AUDIO_ENABLE #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ SONG(DVORAK_SOUND), \ diff --git a/keyboards/vitamins_included/rev1/keyboard.json b/keyboards/vitamins_included/rev1/keyboard.json index dc55407b6a..309b065e1b 100644 --- a/keyboards/vitamins_included/rev1/keyboard.json +++ b/keyboards/vitamins_included/rev1/keyboard.json @@ -15,7 +15,9 @@ }, "split": { "enabled": true, - "soft_serial_pin": "D0" + "serial": { + "pin": "D0" + } }, "rgblight": { "led_count": 16, diff --git a/keyboards/vitamins_included/rev2/config.h b/keyboards/vitamins_included/rev2/config.h index 519af227a4..e88e6bac2c 100644 --- a/keyboards/vitamins_included/rev2/config.h +++ b/keyboards/vitamins_included/rev2/config.h @@ -19,9 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once - -#define SPLIT_HAND_PIN B4 - /* Audio settings */ #ifdef AUDIO_ENABLE # define AUDIO_PIN C6 // Define this to enable the buzzer diff --git a/keyboards/vitamins_included/rev2/keyboard.json b/keyboards/vitamins_included/rev2/keyboard.json index 4418b86909..5a2898d85c 100644 --- a/keyboards/vitamins_included/rev2/keyboard.json +++ b/keyboards/vitamins_included/rev2/keyboard.json @@ -15,7 +15,12 @@ }, "split": { "enabled": true, - "soft_serial_pin": "D0" + "handedness": { + "pin": "B4" + }, + "serial": { + "pin": "D0" + } }, "rgblight": { "led_count": 12, diff --git a/keyboards/waterfowl/keyboard.json b/keyboards/waterfowl/keyboard.json index a178313042..73f62a77eb 100644 --- a/keyboards/waterfowl/keyboard.json +++ b/keyboards/waterfowl/keyboard.json @@ -29,7 +29,9 @@ }, "split": { "enabled": true, - "soft_serial_pin": "D2", + "serial": { + "pin": "D2" + }, "transport": { "sync": { "modifiers": true, diff --git a/keyboards/westfoxtrot/cypher/rev1/keyboard.json b/keyboards/westfoxtrot/cypher/rev1/keyboard.json index 09294d169c..30dcc625de 100644 --- a/keyboards/westfoxtrot/cypher/rev1/keyboard.json +++ b/keyboards/westfoxtrot/cypher/rev1/keyboard.json @@ -31,6 +31,11 @@ "levels": 5, "breathing": true }, + "indicators": { + "caps_lock": "F1", + "num_lock": "F4", + "scroll_lock": "F5" + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { diff --git a/keyboards/westfoxtrot/cypher/rev1/rev1.c b/keyboards/westfoxtrot/cypher/rev1/rev1.c deleted file mode 100644 index eeaa7b4a4c..0000000000 --- a/keyboards/westfoxtrot/cypher/rev1/rev1.c +++ /dev/null @@ -1,31 +0,0 @@ -/* Copyright 2019 westfoxtrot - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ -#include "quantum.h" - -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if(res) { - // gpio_write_pin sets the pin high for 1 and low for 0. - // In this example the pins are inverted, setting - // it low/0 turns it on, and high/1 turns the LED off. - // This behavior depends on whether the LED is between the pin - // and VCC or the pin and GND. - gpio_write_pin(F4, led_state.num_lock); - gpio_write_pin(F1, led_state.caps_lock); - gpio_write_pin(F5, led_state.scroll_lock); - } - return res; -} diff --git a/keyboards/westfoxtrot/cypher/rev5/keyboard.json b/keyboards/westfoxtrot/cypher/rev5/keyboard.json index fbb487534d..278ff94b06 100644 --- a/keyboards/westfoxtrot/cypher/rev5/keyboard.json +++ b/keyboards/westfoxtrot/cypher/rev5/keyboard.json @@ -33,6 +33,11 @@ "levels": 5, "breathing": true }, + "indicators": { + "caps_lock": "D5", + "num_lock": "D3", + "scroll_lock": "D2" + }, "rgblight": { "hue_steps": 12, "saturation_steps": 25, diff --git a/keyboards/westfoxtrot/cypher/rev5/rev5.c b/keyboards/westfoxtrot/cypher/rev5/rev5.c deleted file mode 100644 index 37ca9cf3c1..0000000000 --- a/keyboards/westfoxtrot/cypher/rev5/rev5.c +++ /dev/null @@ -1,31 +0,0 @@ -/* Copyright 2019 westfoxtrot - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ -#include "quantum.h" - -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if(res) { - // gpio_write_pin sets the pin high for 1 and low for 0. - // In this example the pins are inverted, setting - // it low/0 turns it on, and high/1 turns the LED off. - // This behavior depends on whether the LED is between the pin - // and VCC or the pin and GND. - gpio_write_pin(D3, led_state.num_lock); - gpio_write_pin(D5, led_state.caps_lock); - gpio_write_pin(D2, led_state.scroll_lock); - } - return res; -} diff --git a/keyboards/westfoxtrot/prophet/keyboard.json b/keyboards/westfoxtrot/prophet/keyboard.json index 049f5cd7fc..f82c6da14d 100644 --- a/keyboards/westfoxtrot/prophet/keyboard.json +++ b/keyboards/westfoxtrot/prophet/keyboard.json @@ -17,6 +17,9 @@ "nkro": true, "sleep_led": true }, + "indicators": { + "caps_lock": "B13" + }, "qmk": { "locking": { "enabled": true, diff --git a/keyboards/westfoxtrot/prophet/prophet.c b/keyboards/westfoxtrot/prophet/prophet.c index 3ef0a3f928..b33ecf90b4 100644 --- a/keyboards/westfoxtrot/prophet/prophet.c +++ b/keyboards/westfoxtrot/prophet/prophet.c @@ -1,16 +1,9 @@ #include "quantum.h" -void keyboard_pre_init_kb (void) { +void keyboard_pre_init_kb(void) { gpio_set_pin_output(B12); - gpio_set_pin_output(B13); -} -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if(res) { - gpio_write_pin(B13, led_state.caps_lock); - } - return res; + keyboard_pre_init_user(); } __attribute__((weak)) layer_state_t layer_state_set_user(layer_state_t state) { diff --git a/keyboards/whitefacemountain/ampersand/keyboard.json b/keyboards/whitefacemountain/ampersand/keyboard.json new file mode 100644 index 0000000000..04840d05bc --- /dev/null +++ b/keyboards/whitefacemountain/ampersand/keyboard.json @@ -0,0 +1,127 @@ +{ + "manufacturer": "Whitefacemountain", + "keyboard_name": "Ampersand", + "maintainer": "roarmstrong", + "bootloader": "atmel-dfu", + "diode_direction": "COL2ROW", + "features": { + "bootmagic": true, + "extrakey": true, + "mousekey": true + }, + "matrix_pins": { + "cols": ["F4", "B6", "B5", "B4", "D7", "D6", "D4", "D5", "D3", "D2", "D1", "D0", "F1"], + "rows": ["F5", "F0", "C7", "F6"] + }, + "processor": "atmega32u4", + "url": "https://www.cbkbd.com/product/ampersand", + "usb": { + "device_version": "1.0.0", + "pid": "0x2626", + "vid": "0xFEED" + }, + "layout_aliases": { + "LAYOUT_all": "LAYOUT_split_bars" + }, + "layouts": { + "LAYOUT_single_bar": { + "layout": [ + {"label": "Esc", "matrix": [0, 0], "x": 0, "y": 0}, + {"label": "Q", "matrix": [0, 1], "x": 1, "y": 0}, + {"label": "W", "matrix": [0, 2], "x": 2, "y": 0}, + {"label": "E", "matrix": [0, 3], "x": 3, "y": 0}, + {"label": "R", "matrix": [0, 4], "x": 4, "y": 0}, + {"label": "T", "matrix": [0, 5], "x": 5, "y": 0}, + {"label": "Y", "matrix": [0, 6], "x": 6, "y": 0}, + {"label": "U", "matrix": [0, 7], "x": 7, "y": 0}, + {"label": "I", "matrix": [0, 8], "x": 8, "y": 0}, + {"label": "O", "matrix": [0, 9], "x": 9, "y": 0}, + {"label": "P", "matrix": [0, 10], "x": 10, "y": 0}, + {"label": "-", "matrix": [0, 11], "x": 11, "y": 0}, + {"label": "Bksp", "matrix": [0, 12], "x": 12, "y": 0, "w": 1.5}, + {"label": "Tab", "matrix": [1, 0], "x": 0, "y": 1, "w": 1.25}, + {"label": "A", "matrix": [1, 1], "x": 1.25, "y": 1}, + {"label": "S", "matrix": [1, 2], "x": 2.25, "y": 1}, + {"label": "D", "matrix": [1, 3], "x": 3.25, "y": 1}, + {"label": "F", "matrix": [1, 4], "x": 4.25, "y": 1}, + {"label": "G", "matrix": [1, 5], "x": 5.25, "y": 1}, + {"label": "H", "matrix": [1, 6], "x": 6.25, "y": 1}, + {"label": "J", "matrix": [1, 7], "x": 7.25, "y": 1}, + {"label": "K", "matrix": [1, 8], "x": 8.25, "y": 1}, + {"label": "L", "matrix": [1, 9], "x": 9.25, "y": 1}, + {"label": ";", "matrix": [1, 10], "x": 10.25, "y": 1}, + {"label": "'", "matrix": [1, 11], "x": 11.25, "y": 1}, + {"label": "Enter", "matrix": [1, 12], "x": 12.25, "y": 1, "w": 1.25}, + {"label": "Shift", "matrix": [2, 0], "x": 0, "y": 2, "w": 1.75}, + {"label": "Z", "matrix": [2, 1], "x": 1.75, "y": 2}, + {"label": "X", "matrix": [2, 2], "x": 2.75, "y": 2}, + {"label": "C", "matrix": [2, 3], "x": 3.75, "y": 2}, + {"label": "V", "matrix": [2, 4], "x": 4.75, "y": 2}, + {"label": "B", "matrix": [2, 5], "x": 5.75, "y": 2}, + {"label": "N", "matrix": [2, 6], "x": 6.75, "y": 2}, + {"label": "M", "matrix": [2, 7], "x": 7.75, "y": 2}, + {"label": ",", "matrix": [2, 8], "x": 8.75, "y": 2}, + {"label": ".", "matrix": [2, 9], "x": 9.75, "y": 2}, + {"label": "/", "matrix": [2, 10], "x": 10.75, "y": 2}, + {"label": "Shift", "matrix": [2, 11], "x": 11.75, "y": 2, "w": 1.75}, + {"label": "Ctrl", "matrix": [3, 0], "x": 0, "y": 3, "w": 1}, + {"label": "LAlt", "matrix": [3, 1], "x": 1.75, "y": 3, "w": 1}, + {"label": "LGui", "matrix": [3, 2], "x": 2.75, "y": 3, "w": 1}, + {"label": "Space", "matrix": [3, 5], "x": 3.75, "y": 3, "w": 6}, + {"label": "RGui", "matrix": [3, 8], "x": 9.75, "y": 3, "w": 1}, + {"label": "RAlt", "matrix": [3, 9], "x": 10.75, "y": 3, "w": 1}, + {"label": "RCtrl", "matrix": [3, 11], "x": 12.5, "y": 3, "w": 1} + ] + }, + "LAYOUT_split_bars": { + "layout": [ + {"label": "Esc", "matrix": [0, 0], "x": 0, "y": 0}, + {"label": "Q", "matrix": [0, 1], "x": 1, "y": 0}, + {"label": "W", "matrix": [0, 2], "x": 2, "y": 0}, + {"label": "E", "matrix": [0, 3], "x": 3, "y": 0}, + {"label": "R", "matrix": [0, 4], "x": 4, "y": 0}, + {"label": "T", "matrix": [0, 5], "x": 5, "y": 0}, + {"label": "Y", "matrix": [0, 6], "x": 6, "y": 0}, + {"label": "U", "matrix": [0, 7], "x": 7, "y": 0}, + {"label": "I", "matrix": [0, 8], "x": 8, "y": 0}, + {"label": "O", "matrix": [0, 9], "x": 9, "y": 0}, + {"label": "P", "matrix": [0, 10], "x": 10, "y": 0}, + {"label": "-", "matrix": [0, 11], "x": 11, "y": 0}, + {"label": "Bksp", "matrix": [0, 12], "x": 12, "y": 0, "w": 1.5}, + {"label": "Tab", "matrix": [1, 0], "x": 0, "y": 1, "w": 1.25}, + {"label": "A", "matrix": [1, 1], "x": 1.25, "y": 1}, + {"label": "S", "matrix": [1, 2], "x": 2.25, "y": 1}, + {"label": "D", "matrix": [1, 3], "x": 3.25, "y": 1}, + {"label": "F", "matrix": [1, 4], "x": 4.25, "y": 1}, + {"label": "G", "matrix": [1, 5], "x": 5.25, "y": 1}, + {"label": "H", "matrix": [1, 6], "x": 6.25, "y": 1}, + {"label": "J", "matrix": [1, 7], "x": 7.25, "y": 1}, + {"label": "K", "matrix": [1, 8], "x": 8.25, "y": 1}, + {"label": "L", "matrix": [1, 9], "x": 9.25, "y": 1}, + {"label": ";", "matrix": [1, 10], "x": 10.25, "y": 1}, + {"label": "'", "matrix": [1, 11], "x": 11.25, "y": 1}, + {"label": "Enter", "matrix": [1, 12], "x": 12.25, "y": 1, "w": 1.25}, + {"label": "Shift", "matrix": [2, 0], "x": 0, "y": 2, "w": 1.75}, + {"label": "Z", "matrix": [2, 1], "x": 1.75, "y": 2}, + {"label": "X", "matrix": [2, 2], "x": 2.75, "y": 2}, + {"label": "C", "matrix": [2, 3], "x": 3.75, "y": 2}, + {"label": "V", "matrix": [2, 4], "x": 4.75, "y": 2}, + {"label": "B", "matrix": [2, 5], "x": 5.75, "y": 2}, + {"label": "N", "matrix": [2, 6], "x": 6.75, "y": 2}, + {"label": "M", "matrix": [2, 7], "x": 7.75, "y": 2}, + {"label": ",", "matrix": [2, 8], "x": 8.75, "y": 2}, + {"label": ".", "matrix": [2, 9], "x": 9.75, "y": 2}, + {"label": "/", "matrix": [2, 10], "x": 10.75, "y": 2}, + {"label": "Shift", "matrix": [2, 11], "x": 11.75, "y": 2, "w": 1.75}, + {"label": "Ctrl", "matrix": [3, 0], "x": 0, "y": 3, "w": 1}, + {"label": "LAlt", "matrix": [3, 1], "x": 1.75, "y": 3, "w": 1.5}, + {"label": "LGui", "matrix": [3, 2], "x": 3.25, "y": 3, "w": 1}, + {"label": "Space", "matrix": [3, 3], "x": 4.25, "y": 3, "w": 2.25}, + {"label": "Space", "matrix": [3, 7], "x": 6.5, "y": 3, "w": 2.75}, + {"label": "RGui", "matrix": [3, 8], "x": 9.25, "y": 3, "w": 1}, + {"label": "RAlt", "matrix": [3, 9], "x": 10.25, "y": 3, "w": 1.5}, + {"label": "RCtrl", "matrix": [3, 11], "x": 12.5, "y": 3, "w": 1} + ] + } + } +} diff --git a/keyboards/whitefacemountain/ampersand/keymaps/default/keymap.c b/keyboards/whitefacemountain/ampersand/keymaps/default/keymap.c new file mode 100644 index 0000000000..d380e64fa7 --- /dev/null +++ b/keyboards/whitefacemountain/ampersand/keymaps/default/keymap.c @@ -0,0 +1,12 @@ +// Copyright 2024 @roarmstrong +// SPDX-License-Identifier: GPL-2.0-or-later +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[0] = LAYOUT_all( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, 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_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_RGUI, KC_RALT, KC_RCTL) +};
\ No newline at end of file diff --git a/keyboards/whitefacemountain/ampersand/readme.md b/keyboards/whitefacemountain/ampersand/readme.md new file mode 100644 index 0000000000..d85f82d6fb --- /dev/null +++ b/keyboards/whitefacemountain/ampersand/readme.md @@ -0,0 +1,28 @@ +# Ampersand + +![Ampersand](https://i.imgur.com/jbr7Bld.png) + +Ampersand is a gummyworm mounted 13.5u keyboard with minimum 40s support needed. +Its frosted polycarbonate case and blasted brass weight will pair well with most keysets, with greater compatibility than most 40s. + +* Keyboard Maintainer: [roarmstrong](https://github.com/roarmstrong) +* Hardware Supported: Ampersand custom PCB, using Atmega32u4 +* Hardware Availability: [Coffee Break Keyboards](https://www.cbkbd.com/product/ampersand), [Keeb Supply](https://keeb.supply/products/ampersand) + +Make example for this keyboard (after setting up your build environment): + + make whitefacemountain/ampersand:default + +Flashing example for this keyboard: + + make whitefacemountain/ampersand:default:flash + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). + +## Bootloader + +Enter the bootloader in 3 ways: + +* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (the top left key) and plug in the keyboard +* **Physical reset button**: Briefly press the button labelled SW1 on the back of the PCB +* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available diff --git a/keyboards/wilba_tech/rama_works_kara/keymaps/via/keymap.c b/keyboards/wilba_tech/rama_works_kara/keymaps/via/keymap.c index 1f9d213f05..4bb827cf3a 100644 --- a/keyboards/wilba_tech/rama_works_kara/keymaps/via/keymap.c +++ b/keyboards/wilba_tech/rama_works_kara/keymaps/via/keymap.c @@ -1 +1,55 @@ -#include "../default/keymap.c"
\ No newline at end of file +/* Copyright 2021 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 <http://www.gnu.org/licenses/>. + */ +// Default layout for RAMA WORKS KARA +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + // Default layer + [0] = LAYOUT_60_hhkb( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_DEL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, TL_LOWR, + KC_LGUI, KC_LALT, KC_SPC, KC_RALT, TL_UPPR), + + // Fn1 Layer + [1] = LAYOUT_60_hhkb( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, + KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SCRL, KC_PAUS, KC_UP, KC_TRNS, KC_TRNS, + KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_EJCT, KC_TRNS, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS, + 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), + + // Fn2 Layer + [2] = LAYOUT_60_hhkb( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + // Fn3 Layer + [3] = LAYOUT_60_hhkb( + KC_TRNS, EF_DEC, EF_INC, H1_DEC, H1_INC, H2_DEC, H2_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, BR_DEC, BR_INC, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, S1_DEC, S1_INC, S2_DEC, S2_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, ES_DEC, ES_INC, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +}; + + diff --git a/keyboards/wilba_tech/rama_works_m50_a/keymaps/via/keymap.c b/keyboards/wilba_tech/rama_works_m50_a/keymaps/via/keymap.c index 1f9d213f05..0bff6f5ee8 100644 --- a/keyboards/wilba_tech/rama_works_m50_a/keymaps/via/keymap.c +++ b/keyboards/wilba_tech/rama_works_m50_a/keymaps/via/keymap.c @@ -1 +1,93 @@ -#include "../default/keymap.c"
\ No newline at end of file +/* Copyright 2020 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 <http://www.gnu.org/licenses/>. + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,------------------------------------------------------------------------------------------. + * | | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `------------------------------------------------------------------------------------------' + */ +[0] = LAYOUT( + _______, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + _______, KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + _______, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, + _______, _______, KC_LCTL, KC_LALT, KC_LGUI, TL_LOWR, KC_SPC, TL_UPPR, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + + +/* Lower + * ,------------------------------------------------------------------------------------------. + * | | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | Next | Vol- | Vol+ | Play | + * `------------------------------------------------------------------------------------------' + */ +[1] = LAYOUT( + _______, KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, + _______, KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + _______, _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Raise + * ,------------------------------------------------------------------------------------------. + * | | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / |Pg Up |Pg Dn | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | Next | Vol- | Vol+ | Play | + * `------------------------------------------------------------------------------------------' + */ +[2] = LAYOUT( + _______, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + _______, KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Adjust (Lower + Raise) + * ,------------------------------------------------------------------------------------------. + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `------------------------------------------------------------------------------------------' + */ +[3] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + +}; diff --git a/keyboards/wilba_tech/rama_works_m50_ax/keymaps/via/keymap.c b/keyboards/wilba_tech/rama_works_m50_ax/keymaps/via/keymap.c index 1f9d213f05..6a28f19f2a 100644 --- a/keyboards/wilba_tech/rama_works_m50_ax/keymaps/via/keymap.c +++ b/keyboards/wilba_tech/rama_works_m50_ax/keymaps/via/keymap.c @@ -1 +1,93 @@ -#include "../default/keymap.c"
\ No newline at end of file +/* Copyright 2020 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 <http://www.gnu.org/licenses/>. + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,------------------------------------------------------------------------------------------. + * | | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `------------------------------------------------------------------------------------------' + */ +[0] = LAYOUT( + _______, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + _______, KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + _______, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, + _______, _______, KC_LCTL, KC_LALT, KC_LGUI, TL_LOWR, KC_SPC, KC_SPC, TL_UPPR, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + + +/* Lower + * ,------------------------------------------------------------------------------------------. + * | | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | Next | Vol- | Vol+ | Play | + * `------------------------------------------------------------------------------------------' + */ +[1] = LAYOUT( + _______, KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, + _______, KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + _______, _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Raise + * ,------------------------------------------------------------------------------------------. + * | | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / |Pg Up |Pg Dn | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | Next | Vol- | Vol+ | Play | + * `------------------------------------------------------------------------------------------' + */ +[2] = LAYOUT( + _______, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + _______, KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Adjust (Lower + Raise) + * ,------------------------------------------------------------------------------------------. + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `------------------------------------------------------------------------------------------' + */ +[3] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + +}; diff --git a/keyboards/wilba_tech/wt20_h1/keymaps/via/keymap.c b/keyboards/wilba_tech/wt20_h1/keymaps/via/keymap.c index 4fc052443e..541fbd05fb 100644 --- a/keyboards/wilba_tech/wt20_h1/keymaps/via/keymap.c +++ b/keyboards/wilba_tech/wt20_h1/keymaps/via/keymap.c @@ -1,4 +1,14 @@ // Copyright 2024 Jason Williams (@wilba) // SPDX-License-Identifier: GPL-2.0-or-later -#include "../default/keymap.c" +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_ortho_5x4( + KC_NUM, KC_PSLS, KC_PAST, KC_PMNS, + KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_P1, KC_P2, KC_P3, KC_PENT, + KC_P0, KC_P0, KC_PDOT, KC_PENT + ), +}; diff --git a/keyboards/wilba_tech/wt60_g/keymaps/via/keymap.c b/keyboards/wilba_tech/wt60_g/keymaps/via/keymap.c index 1f9d213f05..12c17135b0 100644 --- a/keyboards/wilba_tech/wt60_g/keymaps/via/keymap.c +++ b/keyboards/wilba_tech/wt60_g/keymaps/via/keymap.c @@ -1 +1,52 @@ -#include "../default/keymap.c"
\ No newline at end of file +/* Copyright 2020 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 <http://www.gnu.org/licenses/>. + */ +// Default layout for WT60-G +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + // Default layer + [0] = LAYOUT_all( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RALT, KC_RGUI, KC_RCTL), + + // Fn1 Layer + [1] = LAYOUT_all( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_TRNS, + KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SCRL, KC_PAUS, KC_UP, KC_TRNS, KC_TRNS, + KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_EJCT, KC_TRNS, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_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), + + // Fn2 Layer + [2] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + // Fn3 Layer + [3] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), +};
\ No newline at end of file diff --git a/keyboards/wilba_tech/wt60_g2/keymaps/via/keymap.c b/keyboards/wilba_tech/wt60_g2/keymaps/via/keymap.c index 1f9d213f05..6901f2d676 100644 --- a/keyboards/wilba_tech/wt60_g2/keymaps/via/keymap.c +++ b/keyboards/wilba_tech/wt60_g2/keymaps/via/keymap.c @@ -1 +1,52 @@ -#include "../default/keymap.c"
\ No newline at end of file +/* Copyright 2021 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 <http://www.gnu.org/licenses/>. + */ +// Default layout for WT60-G2 +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + // Default layer + [0] = LAYOUT_60_tsangan_hhkb( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL), + + // Fn1 Layer + [1] = LAYOUT_60_tsangan_hhkb( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_TRNS, + KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SCRL, KC_PAUS, KC_UP, KC_TRNS, KC_TRNS, + KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_EJCT, KC_TRNS, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS, + 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), + + // Fn2 Layer + [2] = LAYOUT_60_tsangan_hhkb( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + // Fn3 Layer + [3] = LAYOUT_60_tsangan_hhkb( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), +};
\ No newline at end of file diff --git a/keyboards/wilba_tech/wt60_h1/keymaps/via/keymap.c b/keyboards/wilba_tech/wt60_h1/keymaps/via/keymap.c index 7291ae849a..0f4abc0bb1 100644 --- a/keyboards/wilba_tech/wt60_h1/keymaps/via/keymap.c +++ b/keyboards/wilba_tech/wt60_h1/keymaps/via/keymap.c @@ -1,3 +1,40 @@ // Copyright 2023 Jason Williams (@wilba) // SPDX-License-Identifier: GPL-2.0-or-later -#include "../default/keymap.c" + +// Default layout for WT60-H1 +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + // Default layer + [0] = LAYOUT_all( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_DEL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), + MO(1), KC_LGUI, KC_LALT, KC_SPC, KC_NO, KC_RALT, KC_RGUI, KC_RCTL), + + // Fn1 Layer + [1] = LAYOUT_all( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, + KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SCRL, KC_PAUS, KC_UP, KC_TRNS, KC_TRNS, + KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_EJCT, KC_TRNS, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS, + 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), + + // Fn2 Layer + [2] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + // Fn3 Layer + [3] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), +};
\ No newline at end of file diff --git a/keyboards/wilba_tech/wt60_h2/keymaps/via/keymap.c b/keyboards/wilba_tech/wt60_h2/keymaps/via/keymap.c index 1f9d213f05..bcade2d4ee 100644 --- a/keyboards/wilba_tech/wt60_h2/keymaps/via/keymap.c +++ b/keyboards/wilba_tech/wt60_h2/keymaps/via/keymap.c @@ -1 +1,52 @@ -#include "../default/keymap.c"
\ No newline at end of file +/* Copyright 2020 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 <http://www.gnu.org/licenses/>. + */ +// Default layout for WT60-H2 +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + // Default layer + [0] = LAYOUT_60_ansi_tsangan_split_rshift( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL), + + // Fn1 Layer + [1] = LAYOUT_60_ansi_tsangan_split_rshift( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SCRL, KC_PAUS, KC_UP, KC_TRNS, KC_TRNS, + KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_EJCT, KC_TRNS, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS, + 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), + + // Fn2 Layer + [2] = LAYOUT_60_ansi_tsangan_split_rshift( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + // Fn3 Layer + [3] = LAYOUT_60_ansi_tsangan_split_rshift( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), +}; diff --git a/keyboards/wilba_tech/wt60_h3/keymaps/via/keymap.c b/keyboards/wilba_tech/wt60_h3/keymaps/via/keymap.c index 7291ae849a..e02b9c561b 100644 --- a/keyboards/wilba_tech/wt60_h3/keymaps/via/keymap.c +++ b/keyboards/wilba_tech/wt60_h3/keymaps/via/keymap.c @@ -1,3 +1,40 @@ // Copyright 2023 Jason Williams (@wilba) // SPDX-License-Identifier: GPL-2.0-or-later -#include "../default/keymap.c" + +// Default layout for WT60-H3 +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + // Default layer + [0] = LAYOUT_all( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_NO, KC_RALT, KC_RGUI, KC_RCTL), + + // Fn1 Layer + [1] = LAYOUT_all( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_DEL, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SCRL, KC_PAUS, KC_UP, KC_TRNS, + KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_EJCT, KC_TRNS, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_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), + + // Fn2 Layer + [2] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + // Fn3 Layer + [3] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), +}; diff --git a/keyboards/wilba_tech/wt60_xt/keyboard.json b/keyboards/wilba_tech/wt60_xt/keyboard.json index 8afafd9314..ba8e8000db 100644 --- a/keyboards/wilba_tech/wt60_xt/keyboard.json +++ b/keyboards/wilba_tech/wt60_xt/keyboard.json @@ -23,6 +23,11 @@ "resync": true } }, + "audio": { + "default": { + "clicky": false + } + }, "matrix_pins": { "cols": ["B7", "B0", "F5", "D5", "B1", "B2", "B3", "D3", "D2", "C7", "B6", "B5", "B4", "D7", "D6", "D4"], "rows": ["F0", "E6", "F4", "F6", "F7"] diff --git a/keyboards/wilba_tech/wt60_xt/wt60_xt.c b/keyboards/wilba_tech/wt60_xt/wt60_xt.c index 7c6a2fafc4..53b822e58f 100644 --- a/keyboards/wilba_tech/wt60_xt/wt60_xt.c +++ b/keyboards/wilba_tech/wt60_xt/wt60_xt.c @@ -30,26 +30,6 @@ float tone_device_indication[][2] = SONG(FANTASIE_IMPROMPTU); #endif -// We want to enable audio clicky (i.e. compile it into firmware), -// but not have it "turned on" by default. -#ifdef AUDIO_CLICKY - -#include "process_clicky.h" -extern audio_config_t audio_config; - -void eeconfig_init_kb(void) { - // Reset Keyboard EEPROM value to blank, rather than to a set value - eeconfig_update_kb(0); - - // Need to read here because this isn't done before calling eeconfig_init_kb() - audio_config.raw = eeconfig_read_audio(); - // ...and this call needs audio_config initialized. - clicky_off(); - - eeconfig_init_user(); -} -#endif // AUDIO_CLICKY - void keyboard_pre_init_kb(void) { gpio_set_pin_output(F1); diff --git a/keyboards/wilba_tech/wt65_d/keymaps/via/keymap.c b/keyboards/wilba_tech/wt65_d/keymaps/via/keymap.c index 1f9d213f05..ca0093926d 100644 --- a/keyboards/wilba_tech/wt65_d/keymaps/via/keymap.c +++ b/keyboards/wilba_tech/wt65_d/keymaps/via/keymap.c @@ -1 +1,40 @@ -#include "../default/keymap.c"
\ No newline at end of file +// Copyright 2022 Jason Williams (@wilba) +// SPDX-License-Identifier: GPL-2.0-or-later + +// Default layout for WT65-D +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + // Default layer + [0] = LAYOUT_all( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_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_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_LEFT, KC_DOWN, KC_RGHT), + + // Fn1 Layer + [1] = LAYOUT_all( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_DEL, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SCRL, KC_PAUS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_EJCT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + // Fn2 Layer + [2] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + // Fn3 Layer + [3] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), +};
\ No newline at end of file diff --git a/keyboards/wilba_tech/wt65_f/keymaps/via/keymap.c b/keyboards/wilba_tech/wt65_f/keymaps/via/keymap.c index 1f9d213f05..7db3bb165c 100644 --- a/keyboards/wilba_tech/wt65_f/keymaps/via/keymap.c +++ b/keyboards/wilba_tech/wt65_f/keymaps/via/keymap.c @@ -1 +1,52 @@ -#include "../default/keymap.c"
\ No newline at end of file +/* Copyright 2021 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 <http://www.gnu.org/licenses/>. + */ +// Default layout for WT65-F +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + // Default layer + [0] = LAYOUT_65_ansi_blocker( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_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_LEFT, KC_DOWN, KC_RGHT), + + // Fn1 Layer + [1] = LAYOUT_65_ansi_blocker( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SCRL, KC_PAUS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_EJCT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + // Fn2 Layer + [2] = LAYOUT_65_ansi_blocker( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + // Fn3 Layer + [3] = LAYOUT_65_ansi_blocker( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), +};
\ No newline at end of file diff --git a/keyboards/wilba_tech/wt65_fx/keymaps/via/keymap.c b/keyboards/wilba_tech/wt65_fx/keymaps/via/keymap.c index 1f9d213f05..56310ddef0 100644 --- a/keyboards/wilba_tech/wt65_fx/keymaps/via/keymap.c +++ b/keyboards/wilba_tech/wt65_fx/keymaps/via/keymap.c @@ -1 +1,52 @@ -#include "../default/keymap.c"
\ No newline at end of file +/* Copyright 2021 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 <http://www.gnu.org/licenses/>. + */ +// Default layout for WT65-FX +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + // Default layer + [0] = LAYOUT_65_ansi_blocker_split_bs( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, KC_HOME, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT), + + // Fn1 Layer + [1] = LAYOUT_65_ansi_blocker_split_bs( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_DEL, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SCRL, KC_PAUS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_EJCT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + // Fn2 Layer + [2] = LAYOUT_65_ansi_blocker_split_bs( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + // Fn3 Layer + [3] = LAYOUT_65_ansi_blocker_split_bs( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), +};
\ No newline at end of file diff --git a/keyboards/wilba_tech/wt65_g/keymaps/via/keymap.c b/keyboards/wilba_tech/wt65_g/keymaps/via/keymap.c index 1f9d213f05..b837b0f8be 100644 --- a/keyboards/wilba_tech/wt65_g/keymaps/via/keymap.c +++ b/keyboards/wilba_tech/wt65_g/keymaps/via/keymap.c @@ -1 +1,52 @@ -#include "../default/keymap.c"
\ No newline at end of file +/* Copyright 2020 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 <http://www.gnu.org/licenses/>. + */ +// Default layout for WT65-G +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + // Default layer + [0] = LAYOUT_all( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_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_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT), + + // Fn1 Layer + [1] = LAYOUT_all( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_DEL, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SCRL, KC_PAUS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_EJCT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + // Fn2 Layer + [2] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + // Fn3 Layer + [3] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), +};
\ No newline at end of file diff --git a/keyboards/wilba_tech/wt65_g2/keymaps/via/keymap.c b/keyboards/wilba_tech/wt65_g2/keymaps/via/keymap.c index 1f9d213f05..3e0523b90c 100644 --- a/keyboards/wilba_tech/wt65_g2/keymaps/via/keymap.c +++ b/keyboards/wilba_tech/wt65_g2/keymaps/via/keymap.c @@ -1 +1,52 @@ -#include "../default/keymap.c"
\ No newline at end of file +/* Copyright 2020 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 <http://www.gnu.org/licenses/>. + */ +// Default layout for WT65-G2 +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + // Default layer + [0] = LAYOUT_all( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_DEL, KC_HOME, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, KC_PGUP, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, + KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_LEFT, KC_DOWN, KC_RGHT), + + // Fn1 Layer + [1] = LAYOUT_all( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, KC_TRNS, + KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SCRL, KC_PAUS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_EJCT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + // Fn2 Layer + [2] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + // Fn3 Layer + [3] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), +};
\ No newline at end of file diff --git a/keyboards/wilba_tech/wt65_g3/keymaps/via/keymap.c b/keyboards/wilba_tech/wt65_g3/keymaps/via/keymap.c index 4fc052443e..159c2b0be2 100644 --- a/keyboards/wilba_tech/wt65_g3/keymaps/via/keymap.c +++ b/keyboards/wilba_tech/wt65_g3/keymaps/via/keymap.c @@ -1,4 +1,25 @@ // Copyright 2024 Jason Williams (@wilba) // SPDX-License-Identifier: GPL-2.0-or-later -#include "../default/keymap.c" +// Default layout for WT65-G3 +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + // Default layer + [0] = LAYOUT_all( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_NO, KC_DEL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, + KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, MO(1), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + // Fn1 Layer + [1] = LAYOUT_all( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS, KC_INS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SCRL, KC_PAUS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_EJCT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +}; diff --git a/keyboards/wilba_tech/wt65_h1/keymaps/via/keymap.c b/keyboards/wilba_tech/wt65_h1/keymaps/via/keymap.c index 1f9d213f05..1486f6a3e4 100644 --- a/keyboards/wilba_tech/wt65_h1/keymaps/via/keymap.c +++ b/keyboards/wilba_tech/wt65_h1/keymaps/via/keymap.c @@ -1 +1,52 @@ -#include "../default/keymap.c"
\ No newline at end of file +/* Copyright 2020 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 <http://www.gnu.org/licenses/>. + */ +// Default layout for WT65-H1 +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + // Default layer + [0] = LAYOUT_65_ansi_blocker_tsangan( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_LEFT, KC_DOWN, KC_RGHT), + + // Fn1 Layer + [1] = LAYOUT_65_ansi_blocker_tsangan( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SCRL, KC_PAUS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_EJCT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + // Fn2 Layer + [2] = LAYOUT_65_ansi_blocker_tsangan( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + // Fn3 Layer + [3] = LAYOUT_65_ansi_blocker_tsangan( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), +}; diff --git a/keyboards/wilba_tech/wt65_h2/keymaps/via/keymap.c b/keyboards/wilba_tech/wt65_h2/keymaps/via/keymap.c index 4fc052443e..9b065bcd1e 100644 --- a/keyboards/wilba_tech/wt65_h2/keymaps/via/keymap.c +++ b/keyboards/wilba_tech/wt65_h2/keymaps/via/keymap.c @@ -1,4 +1,24 @@ // Copyright 2024 Jason Williams (@wilba) // SPDX-License-Identifier: GPL-2.0-or-later -#include "../default/keymap.c" +// Default layout for WT65-H2 +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + // Default layer + [0] = LAYOUT_all( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, KC_DEL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, KC_PGUP, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, MO(1), + KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_LEFT, KC_DOWN, KC_RGHT), + + // Fn1 Layer + [1] = LAYOUT_all( + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS, KC_INS, + KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SCRL, KC_PAUS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_EJCT, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), +}; diff --git a/keyboards/wilba_tech/wt65_h3/keymaps/via/keymap.c b/keyboards/wilba_tech/wt65_h3/keymaps/via/keymap.c index 4fc052443e..3fd505a748 100644 --- a/keyboards/wilba_tech/wt65_h3/keymaps/via/keymap.c +++ b/keyboards/wilba_tech/wt65_h3/keymaps/via/keymap.c @@ -1,4 +1,24 @@ // Copyright 2024 Jason Williams (@wilba) // SPDX-License-Identifier: GPL-2.0-or-later -#include "../default/keymap.c" +// Default layout for WT65-H3 +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + // Default layer + [0] = LAYOUT_all( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_NO, KC_DEL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, MO(1), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + // Fn1 Layer + [1] = LAYOUT_all( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS, KC_INS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SCRL, KC_PAUS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_EJCT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) +}; diff --git a/keyboards/wilba_tech/wt69_a/keyboard.json b/keyboards/wilba_tech/wt69_a/keyboard.json index bbe6517850..d41f8fc90e 100644 --- a/keyboards/wilba_tech/wt69_a/keyboard.json +++ b/keyboards/wilba_tech/wt69_a/keyboard.json @@ -20,6 +20,9 @@ "resync": true } }, + "indicators": { + "caps_lock": "F1" + }, "matrix_pins": { "cols": ["B7", "B0", "F5", "D5", "B1", "B2", "B3", "D3", "D2", "C7", "C6", "B6", "B5", "B4", "D7", "D6", "D4"], "rows": ["F0", "E6", "F4", "F6", "F7"] diff --git a/keyboards/wilba_tech/wt69_a/wt69_a.c b/keyboards/wilba_tech/wt69_a/wt69_a.c deleted file mode 100644 index 842b62a4d1..0000000000 --- a/keyboards/wilba_tech/wt69_a/wt69_a.c +++ /dev/null @@ -1,30 +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 <http://www.gnu.org/licenses/>. - */ - -#include "quantum.h" - -void keyboard_pre_init_kb(void) { - gpio_set_pin_output(F1); - - keyboard_pre_init_user(); -} - -bool led_update_kb(led_t led_state) { - if (led_update_user(led_state)) { - gpio_write_pin(F1, led_state.caps_lock); - } - return true; -} diff --git a/keyboards/wilba_tech/wt70_jb/keyboard.json b/keyboards/wilba_tech/wt70_jb/keyboard.json index bfa27f225b..f922810600 100644 --- a/keyboards/wilba_tech/wt70_jb/keyboard.json +++ b/keyboards/wilba_tech/wt70_jb/keyboard.json @@ -8,6 +8,9 @@ "pid": "0x001F", "device_version": "0.0.1" }, + "indicators": { + "caps_lock": "F1" + }, "rgblight": { "saturation_steps": 8, "brightness_steps": 8, diff --git a/keyboards/wilba_tech/wt70_jb/keymaps/via/keymap.c b/keyboards/wilba_tech/wt70_jb/keymaps/via/keymap.c index 1f9d213f05..a2c3d59603 100644 --- a/keyboards/wilba_tech/wt70_jb/keymaps/via/keymap.c +++ b/keyboards/wilba_tech/wt70_jb/keymaps/via/keymap.c @@ -1 +1,52 @@ -#include "../default/keymap.c"
\ No newline at end of file +/* Copyright 2020 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 <http://www.gnu.org/licenses/>. + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +// Default layer +[0] = LAYOUT_tkl_nofrow_ansi_tsangan_split_bs_rshift( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, KC_INS, KC_HOME, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + +// Fn1 Layer +[1] = LAYOUT_tkl_nofrow_ansi_tsangan_split_bs_rshift( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS, KC_PSCR, KC_SCRL, KC_PAUS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +// Fn2 Layer +[2] = LAYOUT_tkl_nofrow_ansi_tsangan_split_bs_rshift( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +// Fn3 Layer +[3] = LAYOUT_tkl_nofrow_ansi_tsangan_split_bs_rshift( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +}; diff --git a/keyboards/wilba_tech/wt70_jb/wt70_jb.c b/keyboards/wilba_tech/wt70_jb/wt70_jb.c index ae9b5dcbec..e4d0efc5e4 100644 --- a/keyboards/wilba_tech/wt70_jb/wt70_jb.c +++ b/keyboards/wilba_tech/wt70_jb/wt70_jb.c @@ -17,19 +17,6 @@ bool g_first_execution = false; -void keyboard_pre_init_kb(void) { - gpio_set_pin_output(F1); - - keyboard_pre_init_user(); -} - -bool led_update_kb(led_t led_state) { - if (led_update_user(led_state)) { - gpio_write_pin(F1, led_state.caps_lock); - } - return true; -} - // This is some magic so that PCBs flashed with VIA firmware at the factory // will start with an RGB test pattern. Not relevant for non-VIA firmware. #ifdef VIA_ENABLE @@ -55,6 +42,8 @@ void keyboard_post_init_kb(void) { if ( g_first_execution ) { rgblight_mode(RGBLIGHT_MODE_RGB_TEST); } + + keyboard_post_init_user(); } #endif // VIA_ENABLE diff --git a/keyboards/wilba_tech/wt80_g/keymaps/via/keymap.c b/keyboards/wilba_tech/wt80_g/keymaps/via/keymap.c index 1f9d213f05..00a8036fc7 100644 --- a/keyboards/wilba_tech/wt80_g/keymaps/via/keymap.c +++ b/keyboards/wilba_tech/wt80_g/keymaps/via/keymap.c @@ -1 +1,54 @@ -#include "../default/keymap.c"
\ No newline at end of file +/* Copyright 2020 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 <http://www.gnu.org/licenses/>. + */ +// Default layout for WT80-G +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_all( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SCRL, KC_PAUS, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + [1] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + [2] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + [3] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +}; + diff --git a/keyboards/winry/winry315/keymaps/via/keymap.c b/keyboards/winry/winry315/keymaps/via/keymap.c index 0641fbfd03..4585f46fb6 100644 --- a/keyboards/winry/winry315/keymaps/via/keymap.c +++ b/keyboards/winry/winry315/keymaps/via/keymap.c @@ -37,3 +37,8 @@ const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { [2 ... 7] = { ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(_______, _______) } }; #endif + +// The enum values are assumed to match the layout option values used by VIA. +void via_set_layout_options_kb(uint32_t value) { + winry315_set_orientation(value & 0x03); +} diff --git a/keyboards/winry/winry315/winry315.c b/keyboards/winry/winry315/winry315.c index e7901a2e00..03621d3e3f 100644 --- a/keyboards/winry/winry315/winry315.c +++ b/keyboards/winry/winry315/winry315.c @@ -3,13 +3,11 @@ #include "winry315.h" -#include "via.h" - #if !defined(WINRY315_DEFAULT_ORIENTATION) # define WINRY315_DEFAULT_ORIENTATION WINRY315_ORIENTATION_TOP #endif -#if !defined(VIA_ENABLE) && defined(ENCODER_ENABLE) +#if defined(ENCODER_ENABLE) && !defined(ENCODER_MAP_ENABLE) # ifndef MEDIA_KEY_DELAY # define MEDIA_KEY_DELAY 10 # endif @@ -41,7 +39,7 @@ bool encoder_update_kb(uint8_t index, bool clockwise) { } return true; } -#endif // !defined(VIA_ENABLE) && defined(ENCODER_ENABLE) +#endif // defined(ENCODER_ENABLE) && !defined(ENCODER_MAP_ENABLE) #if defined(RGB_MATRIX_ENABLE) @@ -200,9 +198,3 @@ void winry315_set_orientation(uint8_t orientation) { } #endif // defined(RGB_MATRIX_ENABLE) } - -#if defined(VIA_ENABLE) -void via_set_layout_options_kb(uint32_t value) { - winry315_set_orientation(value & 0x03); -} -#endif // defined(VIA_ENABLE) diff --git a/keyboards/winry/winry315/winry315.h b/keyboards/winry/winry315/winry315.h index 8129c9d6e0..ea7b4120e2 100644 --- a/keyboards/winry/winry315/winry315.h +++ b/keyboards/winry/winry315/winry315.h @@ -5,8 +5,7 @@ #include "quantum.h" -// Supported orientations of the board. The enum values must match the layout -// option values used by VIA. +// Supported orientations of the board. enum winry315_orientation { WINRY315_ORIENTATION_TOP, // Encoders at the top side (default) WINRY315_ORIENTATION_LEFT, // Encoders at the left side @@ -17,10 +16,9 @@ enum winry315_orientation { // Set the orientation of the board (changes the RGB Matrix effect behavior to // match the new orientation). // -// This function is intended to be used in the `via` keymap, where the board -// orientation is configured dynamically using a VIA layout option. If you are -// making a custom keymap for one specific orientation, it is better to set the -// orientation in config.h (e.g., `#define WINRY315_DEFAULT_ORIENTATION -// WINRY315_ORIENTATION_LEFT`) instead of adding custom code that calls this -// function. +// This function is intended to be used to configure the orientation +// dynamically. If you are making a custom keymap for one specific orientation, +// it is better to set the orientation in config.h +// (e.g., `#define WINRY315_DEFAULT_ORIENTATION WINRY315_ORIENTATION_LEFT`) +// instead of adding custom code that calls this function. void winry315_set_orientation(uint8_t orientation); diff --git a/keyboards/wolfmarkclub/wm1/keyboard.json b/keyboards/wolfmarkclub/wm1/keyboard.json index 56c062e102..0cea5546c8 100644 --- a/keyboards/wolfmarkclub/wm1/keyboard.json +++ b/keyboards/wolfmarkclub/wm1/keyboard.json @@ -27,6 +27,11 @@ "resync": true } }, + "indicators": { + "caps_lock": "B1", + "num_lock": "B0", + "scroll_lock": "C5" + }, "rgblight": { "saturation_steps": 8, "brightness_steps": 8, diff --git a/keyboards/wolfmarkclub/wm1/wm1.c b/keyboards/wolfmarkclub/wm1/wm1.c index 9c4fb090c8..83c4c8bb45 100644 --- a/keyboards/wolfmarkclub/wm1/wm1.c +++ b/keyboards/wolfmarkclub/wm1/wm1.c @@ -4,19 +4,3 @@ void bootloader_jump(void) { // This board doesn't use the "standard" stm32duino bootloader, and no information is available regarding how to enter bootloader mode. All we can do here is reset. NVIC_SystemReset(); } - -void matrix_init_kb(void) { - gpio_set_pin_output(B1); // Top Indicator LED - gpio_set_pin_output(B0); // Middle Indicator LED - gpio_set_pin_output(C5); // Bottom Indicator LED - matrix_init_user(); -} - -bool led_update_kb(led_t led_state) { - if(led_update_user(led_state)) { - gpio_write_pin(B1, led_state.caps_lock); - gpio_write_pin(B0, led_state.num_lock); - gpio_write_pin(C5, led_state.scroll_lock); - } - return true; -} diff --git a/keyboards/woodkeys/bigseries/1key/1key.c b/keyboards/woodkeys/bigseries/1key/1key.c deleted file mode 100755 index a2ebca4fe0..0000000000 --- a/keyboards/woodkeys/bigseries/1key/1key.c +++ /dev/null @@ -1,26 +0,0 @@ -/* -Copyright 2018 Cole Markham - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ -#include "quantum.h" - -void matrix_scan_kb(void) { - // Looping keyboard code goes here - // This runs every cycle (a lot) - matrix_scan_user(); -#ifdef BACKLIGHT_ENABLE - backlight_task(); -#endif -}; diff --git a/keyboards/woodkeys/bigseries/2key/2key.c b/keyboards/woodkeys/bigseries/2key/2key.c deleted file mode 100755 index a2ebca4fe0..0000000000 --- a/keyboards/woodkeys/bigseries/2key/2key.c +++ /dev/null @@ -1,26 +0,0 @@ -/* -Copyright 2018 Cole Markham - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ -#include "quantum.h" - -void matrix_scan_kb(void) { - // Looping keyboard code goes here - // This runs every cycle (a lot) - matrix_scan_user(); -#ifdef BACKLIGHT_ENABLE - backlight_task(); -#endif -}; diff --git a/keyboards/woodkeys/bigseries/3key/3key.c b/keyboards/woodkeys/bigseries/3key/3key.c deleted file mode 100755 index a2ebca4fe0..0000000000 --- a/keyboards/woodkeys/bigseries/3key/3key.c +++ /dev/null @@ -1,26 +0,0 @@ -/* -Copyright 2018 Cole Markham - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ -#include "quantum.h" - -void matrix_scan_kb(void) { - // Looping keyboard code goes here - // This runs every cycle (a lot) - matrix_scan_user(); -#ifdef BACKLIGHT_ENABLE - backlight_task(); -#endif -}; diff --git a/keyboards/woodkeys/meira/meira.c b/keyboards/woodkeys/meira/meira.c index cca87a1b51..6cb7affcb3 100644 --- a/keyboards/woodkeys/meira/meira.c +++ b/keyboards/woodkeys/meira/meira.c @@ -15,11 +15,7 @@ */ #include "meira.h" -void matrix_init_kb(void) -{ - debug_enable=true; - print("meira matrix_init_kb\n"); - +void matrix_init_kb(void) { #ifdef WATCHDOG_ENABLE // This is done after turning the layer LED red, if we're caught in a loop // we should get a flashing red light @@ -31,29 +27,22 @@ void matrix_init_kb(void) matrix_init_user(); } -void matrix_scan_kb(void) -{ +void housekeeping_task_kb(void) { #ifdef WATCHDOG_ENABLE wdt_reset(); #endif - matrix_scan_user(); -} - -bool process_record_kb(uint16_t keycode, keyrecord_t *record) { - // Test code that turns on the switch led for the key that is pressed - // set_backlight_by_keymap(record->event.key.col, record->event.key.row); - if (keycode == QK_BOOT) { - reset_keyboard_kb(); - } - return process_record_user(keycode, record); } -void reset_keyboard_kb(void){ +bool shutdown_kb(bool jump_to_bootloader) { #ifdef WATCHDOG_ENABLE + // Unconditionally run so shutdown_user can't mess up watchdog MCUSR = 0; wdt_disable(); wdt_reset(); #endif - xprintf("programming!\n"); - reset_keyboard(); + + if (!shutdown_user(jump_to_bootloader)) { + return false; + } + return true; } diff --git a/keyboards/work_louder/micro/matrix.c b/keyboards/work_louder/micro/matrix.c index 3cfbf17dad..3944d676de 100644 --- a/keyboards/work_louder/micro/matrix.c +++ b/keyboards/work_louder/micro/matrix.c @@ -20,21 +20,21 @@ static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; #define MATRIX_ROW_SHIFTER ((matrix_row_t)1) -static inline void setPinOutput_writeLow(pin_t pin) { +static inline void gpio_atomic_set_pin_output_low(pin_t pin) { ATOMIC_BLOCK_FORCEON { gpio_set_pin_output(pin); gpio_write_pin_low(pin); } } -static inline void setPinOutput_writeHigh(pin_t pin) { +static inline void gpio_atomic_set_pin_output_high(pin_t pin) { ATOMIC_BLOCK_FORCEON { gpio_set_pin_output(pin); gpio_write_pin_high(pin); } } -static inline void setPinInputHigh_atomic(pin_t pin) { +static inline void gpio_atomic_set_pin_input_high(pin_t pin) { ATOMIC_BLOCK_FORCEON { gpio_set_pin_input_high(pin); } @@ -51,7 +51,7 @@ static inline uint8_t readMatrixPin(pin_t pin) { static bool select_row(uint8_t row) { pin_t pin = row_pins[row]; if (pin != NO_PIN) { - setPinOutput_writeLow(pin); + gpio_atomic_set_pin_output_low(pin); return true; } return false; @@ -60,7 +60,7 @@ static bool select_row(uint8_t row) { static void unselect_row(uint8_t row) { pin_t pin = row_pins[row]; if (pin != NO_PIN) { - setPinInputHigh_atomic(pin); + gpio_atomic_set_pin_input_high(pin); } } @@ -74,11 +74,11 @@ __attribute__((weak)) void matrix_init_custom(void) { unselect_rows(); for (uint8_t x = 0; x < MATRIX_COLS; x++) { if (col_pins[x] != NO_PIN) { - setPinInputHigh_atomic(col_pins[x]); + gpio_atomic_set_pin_input_high(col_pins[x]); } } - setPinInputHigh_atomic(F7); - setPinInputHigh_atomic(F0); + gpio_atomic_set_pin_input_high(F7); + gpio_atomic_set_pin_input_high(F0); } void matrix_read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) { diff --git a/keyboards/work_louder/rgb_functions.h b/keyboards/work_louder/rgb_functions.h index eaef787a22..20c99021fb 100644 --- a/keyboards/work_louder/rgb_functions.h +++ b/keyboards/work_louder/rgb_functions.h @@ -18,62 +18,32 @@ #include "keycodes.h" -#ifndef VIA_ENABLE -# ifndef RGB_MATRIX_TOGGLE -# define RGB_MATRIX_TOGGLE KC_F15 -# endif -# ifndef RGB_MATRIX_MODE_INC -# define RGB_MATRIX_MODE_INC KC_F16 -# endif -# ifndef RGB_MATRIX_MODE_DEC -# define RGB_MATRIX_MODE_DEC KC_F17 -# endif -# ifndef RGB_MATRIX_HUE_INC -# define RGB_MATRIX_HUE_INC KC_F18 -# endif -# ifndef RGB_MATRIX_HUE_DEC -# define RGB_MATRIX_HUE_DEC KC_F19 -# endif -# ifndef RGB_MATRIX_SAT_INC -# define RGB_MATRIX_SAT_INC KC_F20 -# endif -# ifndef RGB_MATRIX_SAT_DEC -# define RGB_MATRIX_SAT_DEC KC_F21 -# endif -# ifndef RGB_MATRIX_VAL_INC -# define RGB_MATRIX_VAL_INC KC_F22 -# endif -# ifndef RGB_MATRIX_VAL_DEC -# define RGB_MATRIX_VAL_DEC KC_F23 -# endif -#else -# ifndef RGB_MATRIX_TOGGLE -# define RGB_MATRIX_TOGGLE QK_KB_0 -# endif -# ifndef RGB_MATRIX_MODE_INC -# define RGB_MATRIX_MODE_INC QK_KB_1 -# endif -# ifndef RGB_MATRIX_MODE_DEC -# define RGB_MATRIX_MODE_DEC QK_KB_2 -# endif -# ifndef RGB_MATRIX_HUE_INC -# define RGB_MATRIX_HUE_INC QK_KB_3 -# endif -# ifndef RGB_MATRIX_HUE_DEC -# define RGB_MATRIX_HUE_DEC QK_KB_4 -# endif -# ifndef RGB_MATRIX_SAT_INC -# define RGB_MATRIX_SAT_INC QK_KB_5 -# endif -# ifndef RGB_MATRIX_SAT_DEC -# define RGB_MATRIX_SAT_DEC QK_KB_6 -# endif -# ifndef RGB_MATRIX_VAL_INC -# define RGB_MATRIX_VAL_INC QK_KB_7 -# endif -# ifndef RGB_MATRIX_VAL_DEC -# define RGB_MATRIX_VAL_DEC QK_KB_8 -# endif +#ifndef RGB_MATRIX_TOGGLE +# define RGB_MATRIX_TOGGLE QK_KB_0 +#endif +#ifndef RGB_MATRIX_MODE_INC +# define RGB_MATRIX_MODE_INC QK_KB_1 +#endif +#ifndef RGB_MATRIX_MODE_DEC +# define RGB_MATRIX_MODE_DEC QK_KB_2 +#endif +#ifndef RGB_MATRIX_HUE_INC +# define RGB_MATRIX_HUE_INC QK_KB_3 +#endif +#ifndef RGB_MATRIX_HUE_DEC +# define RGB_MATRIX_HUE_DEC QK_KB_4 +#endif +#ifndef RGB_MATRIX_SAT_INC +# define RGB_MATRIX_SAT_INC QK_KB_5 +#endif +#ifndef RGB_MATRIX_SAT_DEC +# define RGB_MATRIX_SAT_DEC QK_KB_6 +#endif +#ifndef RGB_MATRIX_VAL_INC +# define RGB_MATRIX_VAL_INC QK_KB_7 +#endif +#ifndef RGB_MATRIX_VAL_DEC +# define RGB_MATRIX_VAL_DEC QK_KB_8 #endif #define R_M_TOG RGB_MATRIX_TOGGLE diff --git a/keyboards/work_louder/work_board/config.h b/keyboards/work_louder/work_board/config.h index 2514a63dde..a643cd767d 100644 --- a/keyboards/work_louder/work_board/config.h +++ b/keyboards/work_louder/work_board/config.h @@ -21,7 +21,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define RGBLIGHT_DEFAULT_MODE RGBLIGHT_MODE_STATIC_GRADIENT + 9 -#define RGB_MATRIX_LED_COUNT 49 #define RGB_MATRIX_DISABLE_KEYCODES - -#define VIA_EEPROM_LAYOUT_OPTIONS_DEFAULT 0x1 diff --git a/keyboards/work_louder/work_board/info.json b/keyboards/work_louder/work_board/info.json index dc412fdabd..0e97efa9a4 100644 --- a/keyboards/work_louder/work_board/info.json +++ b/keyboards/work_louder/work_board/info.json @@ -58,7 +58,61 @@ }, "driver": "ws2812", "max_brightness": 120, - "sleep": true + "sleep": true, + "layout": [ + {"matrix": [3, 11], "x": 223, "y": 63, "flags": 1}, + {"matrix": [3, 10], "x": 203, "y": 63, "flags": 1}, + {"matrix": [3, 9], "x": 183, "y": 63, "flags": 1}, + {"matrix": [3, 8], "x": 162, "y": 63, "flags": 1}, + {"matrix": [3, 7], "x": 142, "y": 63, "flags": 1}, + {"matrix": [3, 6], "x": 122, "y": 63, "flags": 4}, + {"x": 112, "y": 63, "flags": 4}, + {"matrix": [3, 5], "x": 101, "y": 63, "flags": 4}, + {"matrix": [3, 4], "x": 81, "y": 63, "flags": 1}, + {"matrix": [3, 3], "x": 61, "y": 63, "flags": 1}, + {"matrix": [3, 2], "x": 40, "y": 63, "flags": 1}, + {"matrix": [3, 1], "x": 20, "y": 63, "flags": 1}, + {"matrix": [3, 0], "x": 0, "y": 63, "flags": 1}, + + {"matrix": [2, 0], "x": 0, "y": 42, "flags": 1}, + {"matrix": [2, 1], "x": 20, "y": 42, "flags": 4}, + {"matrix": [2, 2], "x": 40, "y": 42, "flags": 4}, + {"matrix": [2, 3], "x": 61, "y": 42, "flags": 4}, + {"matrix": [2, 4], "x": 81, "y": 42, "flags": 4}, + {"matrix": [2, 5], "x": 101, "y": 42, "flags": 4}, + {"matrix": [2, 6], "x": 122, "y": 42, "flags": 4}, + {"matrix": [2, 7], "x": 142, "y": 42, "flags": 4}, + {"matrix": [2, 8], "x": 162, "y": 42, "flags": 4}, + {"matrix": [2, 9], "x": 183, "y": 42, "flags": 4}, + {"matrix": [2, 10], "x": 203, "y": 42, "flags": 4}, + {"matrix": [2, 11], "x": 223, "y": 42, "flags": 1}, + + {"matrix": [1, 11], "x": 223, "y": 21, "flags": 1}, + {"matrix": [1, 10], "x": 203, "y": 21, "flags": 4}, + {"matrix": [1, 9], "x": 183, "y": 21, "flags": 4}, + {"matrix": [1, 8], "x": 162, "y": 21, "flags": 4}, + {"matrix": [1, 7], "x": 142, "y": 21, "flags": 4}, + {"matrix": [1, 6], "x": 122, "y": 21, "flags": 4}, + {"matrix": [1, 5], "x": 101, "y": 21, "flags": 4}, + {"matrix": [1, 4], "x": 81, "y": 21, "flags": 4}, + {"matrix": [1, 3], "x": 61, "y": 21, "flags": 4}, + {"matrix": [1, 2], "x": 40, "y": 21, "flags": 4}, + {"matrix": [1, 1], "x": 20, "y": 21, "flags": 4}, + {"matrix": [1, 0], "x": 0, "y": 21, "flags": 1}, + + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}, + {"matrix": [0, 1], "x": 20, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 40, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 61, "y": 0, "flags": 4}, + {"matrix": [0, 4], "x": 81, "y": 0, "flags": 4}, + {"matrix": [0, 5], "x": 101, "y": 0, "flags": 4}, + {"matrix": [0, 6], "x": 122, "y": 0, "flags": 4}, + {"matrix": [0, 7], "x": 142, "y": 0, "flags": 4}, + {"matrix": [0, 8], "x": 162, "y": 0, "flags": 4}, + {"matrix": [0, 9], "x": 183, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 203, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 223, "y": 0, "flags": 1}, + ] }, "matrix_pins": { "cols": ["D3", "D5", "D4", "D6", "D7", "B4", "B5", "B6", "C6", "C7", "F7", "F6", "E6"], diff --git a/keyboards/work_louder/work_board/keymaps/via/config.h b/keyboards/work_louder/work_board/keymaps/via/config.h index 7aa3bebe9b..716aac11aa 100644 --- a/keyboards/work_louder/work_board/keymaps/via/config.h +++ b/keyboards/work_louder/work_board/keymaps/via/config.h @@ -1,6 +1,10 @@ // Copyright 2023 QMK // SPDX-License-Identifier: GPL-2.0-or-later #pragma once + #define NO_ACTION_ONESHOT + #undef ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS #undef ENABLE_RGB_MATRIX_PIXEL_FRACTAL + +#define VIA_EEPROM_LAYOUT_OPTIONS_DEFAULT 0x1 diff --git a/keyboards/work_louder/work_board/keymaps/via/keymap.c b/keyboards/work_louder/work_board/keymaps/via/keymap.c index 255ee3ed78..9ba3dcda4c 100644 --- a/keyboards/work_louder/work_board/keymaps/via/keymap.c +++ b/keyboards/work_louder/work_board/keymaps/via/keymap.c @@ -214,3 +214,21 @@ void via_custom_value_command_kb(uint8_t *data, uint8_t length) { } *command_id = id_unhandled; } + +bool via_layout_2u = false; + +void via_set_layout_options_kb(uint32_t value) { + via_layout_2u = (bool)value; +} + +#ifdef RGB_MATRIX_ENABLE +bool rgb_matrix_indicators_user(void) { + if (via_layout_2u) { + rgb_matrix_set_color(5, 0, 0, 0); + rgb_matrix_set_color(7, 0, 0, 0); + } else { + rgb_matrix_set_color(6, 0, 0, 0); + } + return false; +} +#endif diff --git a/keyboards/work_louder/work_board/work_board.c b/keyboards/work_louder/work_board/work_board.c index 975c7aa794..b34f31df5c 100644 --- a/keyboards/work_louder/work_board/work_board.c +++ b/keyboards/work_louder/work_board/work_board.c @@ -67,46 +67,12 @@ bool oled_task_kb(void) { #endif #ifdef RGB_MATRIX_ENABLE -// clang-format off -led_config_t g_led_config = { { - { 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48 }, - { 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25 }, - { 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24 }, - { 12, 11, 10, 9, 8, 7, 5, 4, 3, 2, 1, 0} -}, { - { 223, 63 }, { 203, 63 }, { 183, 63 }, { 162, 63 }, { 142, 63 }, { 122, 63 }, { 112, 63 }, { 101, 63 }, { 81, 63 }, { 61, 63 }, { 40, 63 }, { 20, 63 }, { 0, 63 }, - { 0, 42 }, { 20, 42 }, { 40, 42 }, { 61, 42 }, { 81, 42 }, { 101, 42 }, { 122, 42 }, { 142, 42 }, { 162, 42 }, { 183, 42 }, { 203, 42 }, { 223, 42 }, - { 223, 21 }, { 203, 21 }, { 183, 21 }, { 162, 21 }, { 142, 21 }, { 122, 21 }, { 101, 21 }, { 81, 21 }, { 61, 21 }, { 40, 21 }, { 20, 21 }, { 0, 21 }, - { 0, 0 }, { 20, 0 }, { 40, 0 }, { 61, 0 }, { 81, 0 }, { 101, 0 }, { 122, 0 }, { 142, 0 }, { 162, 0 }, { 183, 0 }, { 203, 0 }, { 223, 0 } -}, { - 1, 1, 1, 1, 1, 4,4,4, 1, 1, 1, 1, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1 -} }; -// clang-format on - -# ifdef VIA_ENABLE -bool via_layout_2u = false; - -void via_set_layout_options_kb(uint32_t value) { via_layout_2u = (bool)value; } -# endif // VIA_ENABLE - bool rgb_matrix_indicators_kb(void) { if (!rgb_matrix_indicators_user()) { return false; } -# ifdef VIA_ENABLE - if (via_layout_2u) { - rgb_matrix_set_color(5, 0, 0, 0); - rgb_matrix_set_color(7, 0, 0, 0); - } else { - rgb_matrix_set_color(6, 0, 0, 0); - } -# else rgb_matrix_set_color(5, 0, 0, 0); rgb_matrix_set_color(7, 0, 0, 0); -# endif return true; } diff --git a/keyboards/wsk/g4m3ralpha/g4m3ralpha.c b/keyboards/wsk/g4m3ralpha/g4m3ralpha.c deleted file mode 100644 index 3c039a173f..0000000000 --- a/keyboards/wsk/g4m3ralpha/g4m3ralpha.c +++ /dev/null @@ -1,39 +0,0 @@ -/* Copyright 2020 Worldspawn <[email protected]> - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -#include "quantum.h" - - -void matrix_init_kb(void) { - gpio_set_pin_output(D3); - gpio_write_pin_low(D3); - gpio_set_pin_output(D2); - gpio_write_pin_low(D2); - gpio_set_pin_output(D0); - gpio_write_pin_low(D0); - - matrix_init_user(); -}; - -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if(res) { - gpio_write_pin(D3, led_state.num_lock); - gpio_write_pin(D0, led_state.caps_lock); - gpio_write_pin(D2, led_state.scroll_lock); - } - return res; -} diff --git a/keyboards/wsk/g4m3ralpha/keyboard.json b/keyboards/wsk/g4m3ralpha/keyboard.json index fcb2f26f5f..b5cdb7ce10 100644 --- a/keyboards/wsk/g4m3ralpha/keyboard.json +++ b/keyboards/wsk/g4m3ralpha/keyboard.json @@ -8,6 +8,11 @@ "pid": "0x56D9", "device_version": "0.0.1" }, + "indicators": { + "caps_lock": "D0", + "num_lock": "D3", + "scroll_lock": "D2" + }, "rgblight": { "saturation_steps": 8, "brightness_steps": 8, diff --git a/keyboards/wuque/ikki68/ikki68.c b/keyboards/wuque/ikki68/ikki68.c deleted file mode 100644 index 382ec00251..0000000000 --- a/keyboards/wuque/ikki68/ikki68.c +++ /dev/null @@ -1,30 +0,0 @@ -/* Copyright 2020 wuquestudio - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -#include "quantum.h" - -void matrix_init_kb(void) { - gpio_set_pin_output(C6); - - matrix_init_user(); -} -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if(res) { - gpio_write_pin(C6, !led_state.caps_lock); - } - return res; -} diff --git a/keyboards/wuque/ikki68/keyboard.json b/keyboards/wuque/ikki68/keyboard.json index c6070e74fa..d666b0b5de 100644 --- a/keyboards/wuque/ikki68/keyboard.json +++ b/keyboards/wuque/ikki68/keyboard.json @@ -8,6 +8,10 @@ "pid": "0x0003", "device_version": "0.0.1" }, + "indicators": { + "caps_lock": "C6", + "on_state": 0 + }, "ws2812": { "pin": "E2" }, diff --git a/keyboards/xelus/akis/akis.c b/keyboards/xelus/akis/akis.c deleted file mode 100644 index 0409f909d2..0000000000 --- a/keyboards/xelus/akis/akis.c +++ /dev/null @@ -1,25 +0,0 @@ -/* 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 <http://www.gnu.org/licenses/>. - */ - -#include "quantum.h" - -void eeconfig_init_kb(void) { // EEPROM is getting reset! - rgblight_enable(); // Enable RGB by default - rgblight_mode(RGBLIGHT_MODE_RGB_TEST); // set to RGBLIGHT_MODE_RGB_TEST by default - - eeconfig_update_kb(0); - eeconfig_init_user(); -} diff --git a/keyboards/xelus/akis/keyboard.json b/keyboards/xelus/akis/keyboard.json index 23a8178b26..da072b6379 100644 --- a/keyboards/xelus/akis/keyboard.json +++ b/keyboards/xelus/akis/keyboard.json @@ -21,6 +21,9 @@ "rgb_test": true, "alternating": true, "twinkle": true + }, + "default": { + "animation": "rgb_test" } }, "ws2812": { diff --git a/keyboards/xelus/ninjin/keyboard.json b/keyboards/xelus/ninjin/keyboard.json index 34032ea426..2e7b1640df 100644 --- a/keyboards/xelus/ninjin/keyboard.json +++ b/keyboards/xelus/ninjin/keyboard.json @@ -26,6 +26,9 @@ "rgb_test": true, "alternating": true, "twinkle": true + }, + "default": { + "animation": "rgb_test" } }, "features": { diff --git a/keyboards/xelus/ninjin/ninjin.c b/keyboards/xelus/ninjin/ninjin.c deleted file mode 100644 index b5a4ee83a7..0000000000 --- a/keyboards/xelus/ninjin/ninjin.c +++ /dev/null @@ -1,28 +0,0 @@ -/* 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 <http://www.gnu.org/licenses/>. - */ - -#include "quantum.h" - -void eeconfig_init_kb(void) { // EEPROM is getting reset! - rgblight_enable(); // Enable RGB by default - rgblight_mode(RGBLIGHT_MODE_RGB_TEST); // set to RGBLIGHT_MODE_RGB_TEST by default - - eeconfig_update_kb(0); - eeconfig_init_user(); -} - -// Tested and verified working on Ninjin -void matrix_io_delay(void) { __asm__ volatile("nop\nnop\nnop\n"); } diff --git a/keyboards/xelus/pachi/rgb/keymaps/via/config.h b/keyboards/xelus/pachi/rgb/rev1/keymaps/via/config.h index 47bbf2bf81..47bbf2bf81 100644 --- a/keyboards/xelus/pachi/rgb/keymaps/via/config.h +++ b/keyboards/xelus/pachi/rgb/rev1/keymaps/via/config.h diff --git a/keyboards/xelus/pachi/rgb/keymaps/via/keymap.c b/keyboards/xelus/pachi/rgb/rev1/keymaps/via/keymap.c index 70904faaba..70904faaba 100644 --- a/keyboards/xelus/pachi/rgb/keymaps/via/keymap.c +++ b/keyboards/xelus/pachi/rgb/rev1/keymaps/via/keymap.c diff --git a/keyboards/handwired/dactyl_minidox/keymaps/via/rules.mk b/keyboards/xelus/pachi/rgb/rev1/keymaps/via/rules.mk index 1e5b99807c..1e5b99807c 100644 --- a/keyboards/handwired/dactyl_minidox/keymaps/via/rules.mk +++ b/keyboards/xelus/pachi/rgb/rev1/keymaps/via/rules.mk diff --git a/keyboards/xelus/pachi/rgb/rev2/config.h b/keyboards/xelus/pachi/rgb/rev2/config.h index a5fc38e070..fcf4c41d8a 100644 --- a/keyboards/xelus/pachi/rgb/rev2/config.h +++ b/keyboards/xelus/pachi/rgb/rev2/config.h @@ -33,7 +33,3 @@ // RGB Matrix defines #define IS31FL3741_I2C_ADDRESS_1 IS31FL3741_I2C_ADDRESS_GND #define IS31FL3741_LED_COUNT RGB_MATRIX_LED_COUNT // is31fl3741.h does not set this for custom driver - -// VIA KB level -#define VIA_FIRMWARE_VERSION 1 -#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 17 diff --git a/keyboards/xelus/pachi/rgb/rev2/keymaps/via/config.h b/keyboards/xelus/pachi/rgb/rev2/keymaps/via/config.h new file mode 100644 index 0000000000..abdd8c320c --- /dev/null +++ b/keyboards/xelus/pachi/rgb/rev2/keymaps/via/config.h @@ -0,0 +1,20 @@ +/* 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 <http://www.gnu.org/licenses/>. + */ + +#pragma once + +#define VIA_FIRMWARE_VERSION 1 +#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 17 diff --git a/keyboards/xelus/pachi/rgb/rev2/keymaps/via/keymap.c b/keyboards/xelus/pachi/rgb/rev2/keymaps/via/keymap.c new file mode 100644 index 0000000000..f739dc4b6a --- /dev/null +++ b/keyboards/xelus/pachi/rgb/rev2/keymaps/via/keymap.c @@ -0,0 +1,399 @@ +/* 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 <http://www.gnu.org/licenses/>. + */ + +#include QMK_KEYBOARD_H +#include "eeprom.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_tkl_ansi_tsangan( + 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_SCRL, 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, + MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + [1] = LAYOUT_tkl_ansi_tsangan( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, QK_BOOT , KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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_tkl_ansi_tsangan( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) +}; + +// custom ID codes +enum via_indicator_value { + id_caps_lock_enable = 1, + id_caps_lock_brightness, + id_caps_lock_color, + id_caps_lock_key, + id_caps_lock_override, + id_num_lock_enable, + id_num_lock_brightness, + id_num_lock_color, + id_num_lock_key, + id_num_lock_override, + id_scroll_lock_enable, + id_scroll_lock_brightness, + id_scroll_lock_color, + id_scroll_lock_key, + id_scroll_lock_override, + id_layer_indicator_enable, + id_layer_indicator_brightness, + id_layer_indicator_color, + id_layer_indicator_key, + id_layer_indicator_override +}; + +// struct to save things +typedef struct { + bool enable_caps_lock:1; // | + bool enable_num_lock:1; // | + bool enable_scroll_lock:1; // | + bool enable_layer_indicator:1; // | + bool caps_override_bl:1; // | + bool num_override_bl:1; // | + bool scroll_override_bl:1; // | + bool layer_override_bl:1; // 1 byte + HSV caps_lock_indicator; // 3 bytes + HSV num_lock_indicator; // 3 bytes + HSV scroll_lock_indicator; // 3 bytes + HSV layer_indicator; // 3 bytes + uint8_t caps_lock_key; // 1 byte + uint8_t num_lock_key; // 1 byte + uint8_t scroll_lock_key; // 1 byte + uint8_t layer_indicator_key;// 1 byte +} indicator_settings_config; +// total 17 bytes + +indicator_settings_config g_config = { + .caps_lock_indicator = {0, 0, 128}, + .num_lock_indicator = {60, 0, 128}, + .scroll_lock_indicator = {120, 0, 128}, + .layer_indicator = {180, 0, 128}, + .caps_lock_key = 7, + .num_lock_key = 0, + .scroll_lock_key = 78, + .layer_indicator_key = 0, + .enable_caps_lock = true, + .enable_num_lock = false, + .enable_scroll_lock = true, + .enable_layer_indicator = false, + .caps_override_bl = true, + .num_override_bl = true, + .scroll_override_bl = true, + .layer_override_bl = true +}; + + +// function declaration +void indicator_config_set_value( uint8_t *data ); +void indicator_config_get_value( uint8_t *data ); +void indicator_config_save ( void ); +void _set_color(HSV *color, uint8_t *data); +void _get_color(HSV *color, uint8_t *data); + +void values_load(void) +{ + eeprom_read_block( &g_config, ((void*)VIA_EEPROM_CUSTOM_CONFIG_ADDR), sizeof(g_config) ); +} + +void values_save(void) +{ + eeprom_update_block( &g_config, ((void*)VIA_EEPROM_CUSTOM_CONFIG_ADDR), sizeof(g_config) ); +} + +void via_init_kb(void) +{ + // If the EEPROM has the magic, the data is good. + // OK to load from EEPROM + if (via_eeprom_is_valid()) { + values_load(); + } else { + values_save(); + // DO NOT set EEPROM valid here, let caller do this + } +} + +void via_custom_value_command_kb(uint8_t *data, uint8_t length) { + // data = [ command_id, channel_id, value_id, value_data ] + uint8_t *command_id = &(data[0]); + uint8_t *channel_id = &(data[1]); + uint8_t *value_id_and_data = &(data[2]); + + if ( *channel_id == id_custom_channel ) { + switch ( *command_id ) + { + case id_custom_set_value: + { + indicator_config_set_value(value_id_and_data); + break; + } + case id_custom_get_value: + { + indicator_config_get_value(value_id_and_data); + break; + } + case id_custom_save: + { + values_save(); + break; + } + default: + { + // Unhandled message. + *command_id = id_unhandled; + break; + } + } + return; + } + + // Return the unhandled state + *command_id = id_unhandled; + + // DO NOT call raw_hid_send(data,length) here, let caller do this +} + +void indicator_config_set_value( uint8_t *data ) +{ + // data = [ value_id, value_data ] + uint8_t *value_id = &(data[0]); + uint8_t *value_data = &(data[1]); + + switch ( *value_id ) + { + case id_caps_lock_enable: + g_config.enable_caps_lock = *value_data; + break; + case id_num_lock_enable: + g_config.enable_num_lock = *value_data; + break; + case id_scroll_lock_enable: + g_config.enable_scroll_lock = *value_data; + break; + case id_layer_indicator_enable: + g_config.enable_layer_indicator = *value_data; + break; + case id_caps_lock_brightness: + g_config.caps_lock_indicator.v = *value_data; + break; + case id_num_lock_brightness: + g_config.num_lock_indicator.v = *value_data; + break; + case id_scroll_lock_brightness: + g_config.scroll_lock_indicator.v = *value_data; + break; + case id_layer_indicator_brightness: + g_config.layer_indicator.v = *value_data; + break; + case id_caps_lock_color: + _set_color( &(g_config.caps_lock_indicator), value_data ); + break; + case id_num_lock_color: + _set_color( &(g_config.num_lock_indicator), value_data ); + break; + case id_scroll_lock_color: + _set_color( &(g_config.scroll_lock_indicator), value_data ); + break; + case id_layer_indicator_color: + _set_color( &(g_config.layer_indicator), value_data ); + break; + case id_caps_lock_key: + g_config.caps_lock_key = *value_data; + break; + case id_num_lock_key: + g_config.num_lock_key = *value_data; + break; + case id_scroll_lock_key: + g_config.scroll_lock_key = *value_data; + break; + case id_layer_indicator_key: + g_config.layer_indicator_key = *value_data; + break; + case id_caps_lock_override: + g_config.caps_override_bl = *value_data; + break; + case id_num_lock_override: + g_config.num_override_bl = *value_data; + break; + case id_scroll_lock_override: + g_config.scroll_override_bl = *value_data; + break; + case id_layer_indicator_override: + g_config.layer_override_bl = *value_data; + break; + } +} + +void indicator_config_get_value( uint8_t *data ) +{ + uint8_t *value_id = &(data[0]); + uint8_t *value_data = &(data[1]); + + switch ( *value_id ) + { + case id_caps_lock_enable: + *value_data = g_config.enable_caps_lock; + break; + case id_num_lock_enable: + *value_data = g_config.enable_num_lock; + break; + case id_scroll_lock_enable: + *value_data = g_config.enable_scroll_lock; + break; + case id_layer_indicator_enable: + *value_data = g_config.enable_layer_indicator; + break; + case id_caps_lock_brightness: + *value_data = g_config.caps_lock_indicator.v; + break; + case id_num_lock_brightness: + *value_data = g_config.num_lock_indicator.v; + break; + case id_layer_indicator_brightness: + *value_data = g_config.scroll_lock_indicator.v; + break; + case id_scroll_lock_brightness: + *value_data = g_config.layer_indicator.v; + break; + case id_caps_lock_color: + _get_color( &(g_config.caps_lock_indicator), value_data ); + break; + case id_num_lock_color: + _get_color( &(g_config.num_lock_indicator), value_data ); + break; + case id_scroll_lock_color: + _get_color( &(g_config.scroll_lock_indicator), value_data ); + break; + case id_layer_indicator_color: + _get_color( &(g_config.layer_indicator), value_data ); + break; + case id_caps_lock_key: + *value_data = g_config.caps_lock_key; + break; + case id_num_lock_key: + *value_data = g_config.num_lock_key; + break; + case id_scroll_lock_key: + *value_data = g_config.scroll_lock_key; + break; + case id_layer_indicator_key: + *value_data = g_config.layer_indicator_key; + break; + case id_caps_lock_override: + *value_data = g_config.caps_override_bl; + break; + case id_num_lock_override: + *value_data = g_config.num_override_bl; + break; + case id_scroll_lock_override: + *value_data = g_config.scroll_override_bl; + break; + case id_layer_indicator_override: + *value_data = g_config.layer_override_bl; + break; + } +} + +// Some helpers for setting/getting HSV +void _set_color( HSV *color, uint8_t *data ) +{ + color->h = data[0]; + color->s = data[1]; +} + +void _get_color( HSV *color, uint8_t *data ) +{ + data[0] = color->h; + data[1] = color->s; +} + +// Set the indicators with RGB Matrix subsystem +bool rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) { + // caps lock cyan + if (g_config.enable_caps_lock) { + RGB rgb_caps = hsv_to_rgb( (HSV){ .h = g_config.caps_lock_indicator.h, + .s = g_config.caps_lock_indicator.s, + .v = g_config.caps_lock_indicator.v } ); + if (host_keyboard_led_state().caps_lock) { + RGB_MATRIX_INDICATOR_SET_COLOR(g_config.caps_lock_key, rgb_caps.r, rgb_caps.g, rgb_caps.b); + } else { + if (g_config.caps_override_bl) { + RGB_MATRIX_INDICATOR_SET_COLOR(g_config.caps_lock_key, 0, 0, 0); + } + } + } + + // num lock cyan + if (g_config.enable_num_lock) { + RGB rgb_num = hsv_to_rgb( (HSV){ .h = g_config.num_lock_indicator.h, + .s = g_config.num_lock_indicator.s, + .v = g_config.num_lock_indicator.v } ); + if (host_keyboard_led_state().num_lock) { + RGB_MATRIX_INDICATOR_SET_COLOR(g_config.num_lock_key, rgb_num.r, rgb_num.g, rgb_num.b); + } else { + if (g_config.num_override_bl) { + RGB_MATRIX_INDICATOR_SET_COLOR(g_config.num_lock_key, 0, 0, 0); + } + } + } + + // scroll lock cyan + if (g_config.enable_scroll_lock) { + RGB rgb_scroll = hsv_to_rgb( (HSV){ .h = g_config.scroll_lock_indicator.h, + .s = g_config.scroll_lock_indicator.s, + .v = g_config.scroll_lock_indicator.v } ); + if (host_keyboard_led_state().scroll_lock) { + RGB_MATRIX_INDICATOR_SET_COLOR(g_config.scroll_lock_key, rgb_scroll.r, rgb_scroll.g, rgb_scroll.b); + } else { + if (g_config.scroll_override_bl) { + RGB_MATRIX_INDICATOR_SET_COLOR(g_config.scroll_lock_key, 0, 0, 0); + } + } + } + + // layer state + if (g_config.enable_layer_indicator) { + RGB rgb_layer = hsv_to_rgb( (HSV){ .h = g_config.layer_indicator.h, + .s = g_config.layer_indicator.s, + .v = g_config.layer_indicator.v } ); + switch (get_highest_layer(layer_state)) { + case 0: + if (g_config.layer_override_bl) { + RGB_MATRIX_INDICATOR_SET_COLOR(g_config.layer_indicator_key, 0, 0, 0); + } + break; + case 1: + RGB_MATRIX_INDICATOR_SET_COLOR(g_config.layer_indicator_key, rgb_layer.r, rgb_layer.g, rgb_layer.b); + break; + default: + // white + RGB_MATRIX_INDICATOR_SET_COLOR(24, 128, 128, 128); + break; + } + } + return false; +} diff --git a/keyboards/xelus/pachi/rgb/keymaps/via/rules.mk b/keyboards/xelus/pachi/rgb/rev2/keymaps/via/rules.mk index 1e5b99807c..1e5b99807c 100644 --- a/keyboards/xelus/pachi/rgb/keymaps/via/rules.mk +++ b/keyboards/xelus/pachi/rgb/rev2/keymaps/via/rules.mk diff --git a/keyboards/xelus/pachi/rgb/rev2/rev2.c b/keyboards/xelus/pachi/rgb/rev2/rev2.c index f595e889c3..5589b27177 100644 --- a/keyboards/xelus/pachi/rgb/rev2/rev2.c +++ b/keyboards/xelus/pachi/rgb/rev2/rev2.c @@ -14,7 +14,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "rev2.h" +#include "quantum.h" // tested and working void matrix_io_delay(void) { __asm__ volatile("nop\nnop\nnop\n"); } @@ -239,311 +239,4 @@ const rgb_matrix_driver_t rgb_matrix_driver = { .set_color_all = is31fl3741_set_color_all }; -#ifdef VIA_ENABLE -#include "quantum.h" -#include "eeprom.h" - -indicator_settings_config g_config = { - .caps_lock_indicator = {0, 0, 128}, - .num_lock_indicator = {60, 0, 128}, - .scroll_lock_indicator = {120, 0, 128}, - .layer_indicator = {180, 0, 128}, - .caps_lock_key = 7, - .num_lock_key = 0, - .scroll_lock_key = 78, - .layer_indicator_key = 0, - .enable_caps_lock = true, - .enable_num_lock = false, - .enable_scroll_lock = true, - .enable_layer_indicator = false, - .caps_override_bl = true, - .num_override_bl = true, - .scroll_override_bl = true, - .layer_override_bl = true -}; - -void values_load(void) -{ - eeprom_read_block( &g_config, ((void*)VIA_EEPROM_CUSTOM_CONFIG_ADDR), sizeof(g_config) ); -} - -void values_save(void) -{ - eeprom_update_block( &g_config, ((void*)VIA_EEPROM_CUSTOM_CONFIG_ADDR), sizeof(g_config) ); -} - -void via_init_kb(void) -{ - // If the EEPROM has the magic, the data is good. - // OK to load from EEPROM - if (via_eeprom_is_valid()) { - values_load(); - } else { - values_save(); - // DO NOT set EEPROM valid here, let caller do this - } -} - -void via_custom_value_command_kb(uint8_t *data, uint8_t length) { - // data = [ command_id, channel_id, value_id, value_data ] - uint8_t *command_id = &(data[0]); - uint8_t *channel_id = &(data[1]); - uint8_t *value_id_and_data = &(data[2]); - - if ( *channel_id == id_custom_channel ) { - switch ( *command_id ) - { - case id_custom_set_value: - { - indicator_config_set_value(value_id_and_data); - break; - } - case id_custom_get_value: - { - indicator_config_get_value(value_id_and_data); - break; - } - case id_custom_save: - { - values_save(); - break; - } - default: - { - // Unhandled message. - *command_id = id_unhandled; - break; - } - } - return; - } - - // Return the unhandled state - *command_id = id_unhandled; - - // DO NOT call raw_hid_send(data,length) here, let caller do this -} - -void indicator_config_set_value( uint8_t *data ) -{ - // data = [ value_id, value_data ] - uint8_t *value_id = &(data[0]); - uint8_t *value_data = &(data[1]); - - switch ( *value_id ) - { - case id_caps_lock_enable: - g_config.enable_caps_lock = *value_data; - break; - case id_num_lock_enable: - g_config.enable_num_lock = *value_data; - break; - case id_scroll_lock_enable: - g_config.enable_scroll_lock = *value_data; - break; - case id_layer_indicator_enable: - g_config.enable_layer_indicator = *value_data; - break; - case id_caps_lock_brightness: - g_config.caps_lock_indicator.v = *value_data; - break; - case id_num_lock_brightness: - g_config.num_lock_indicator.v = *value_data; - break; - case id_scroll_lock_brightness: - g_config.scroll_lock_indicator.v = *value_data; - break; - case id_layer_indicator_brightness: - g_config.layer_indicator.v = *value_data; - break; - case id_caps_lock_color: - _set_color( &(g_config.caps_lock_indicator), value_data ); - break; - case id_num_lock_color: - _set_color( &(g_config.num_lock_indicator), value_data ); - break; - case id_scroll_lock_color: - _set_color( &(g_config.scroll_lock_indicator), value_data ); - break; - case id_layer_indicator_color: - _set_color( &(g_config.layer_indicator), value_data ); - break; - case id_caps_lock_key: - g_config.caps_lock_key = *value_data; - break; - case id_num_lock_key: - g_config.num_lock_key = *value_data; - break; - case id_scroll_lock_key: - g_config.scroll_lock_key = *value_data; - break; - case id_layer_indicator_key: - g_config.layer_indicator_key = *value_data; - break; - case id_caps_lock_override: - g_config.caps_override_bl = *value_data; - break; - case id_num_lock_override: - g_config.num_override_bl = *value_data; - break; - case id_scroll_lock_override: - g_config.scroll_override_bl = *value_data; - break; - case id_layer_indicator_override: - g_config.layer_override_bl = *value_data; - break; - } -} - -void indicator_config_get_value( uint8_t *data ) -{ - uint8_t *value_id = &(data[0]); - uint8_t *value_data = &(data[1]); - - switch ( *value_id ) - { - case id_caps_lock_enable: - *value_data = g_config.enable_caps_lock; - break; - case id_num_lock_enable: - *value_data = g_config.enable_num_lock; - break; - case id_scroll_lock_enable: - *value_data = g_config.enable_scroll_lock; - break; - case id_layer_indicator_enable: - *value_data = g_config.enable_layer_indicator; - break; - case id_caps_lock_brightness: - *value_data = g_config.caps_lock_indicator.v; - break; - case id_num_lock_brightness: - *value_data = g_config.num_lock_indicator.v; - break; - case id_layer_indicator_brightness: - *value_data = g_config.scroll_lock_indicator.v; - break; - case id_scroll_lock_brightness: - *value_data = g_config.layer_indicator.v; - break; - case id_caps_lock_color: - _get_color( &(g_config.caps_lock_indicator), value_data ); - break; - case id_num_lock_color: - _get_color( &(g_config.num_lock_indicator), value_data ); - break; - case id_scroll_lock_color: - _get_color( &(g_config.scroll_lock_indicator), value_data ); - break; - case id_layer_indicator_color: - _get_color( &(g_config.layer_indicator), value_data ); - break; - case id_caps_lock_key: - *value_data = g_config.caps_lock_key; - break; - case id_num_lock_key: - *value_data = g_config.num_lock_key; - break; - case id_scroll_lock_key: - *value_data = g_config.scroll_lock_key; - break; - case id_layer_indicator_key: - *value_data = g_config.layer_indicator_key; - break; - case id_caps_lock_override: - *value_data = g_config.caps_override_bl; - break; - case id_num_lock_override: - *value_data = g_config.num_override_bl; - break; - case id_scroll_lock_override: - *value_data = g_config.scroll_override_bl; - break; - case id_layer_indicator_override: - *value_data = g_config.layer_override_bl; - break; - } -} - -// Some helpers for setting/getting HSV -void _set_color( HSV *color, uint8_t *data ) -{ - color->h = data[0]; - color->s = data[1]; -} - -void _get_color( HSV *color, uint8_t *data ) -{ - data[0] = color->h; - data[1] = color->s; -} - -// Set the indicators with RGB Matrix subsystem -bool rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) { - // caps lock cyan - if (g_config.enable_caps_lock) { - RGB rgb_caps = hsv_to_rgb( (HSV){ .h = g_config.caps_lock_indicator.h, - .s = g_config.caps_lock_indicator.s, - .v = g_config.caps_lock_indicator.v } ); - if (host_keyboard_led_state().caps_lock) { - RGB_MATRIX_INDICATOR_SET_COLOR(g_config.caps_lock_key, rgb_caps.r, rgb_caps.g, rgb_caps.b); - } else { - if (g_config.caps_override_bl) { - RGB_MATRIX_INDICATOR_SET_COLOR(g_config.caps_lock_key, 0, 0, 0); - } - } - } - - // num lock cyan - if (g_config.enable_num_lock) { - RGB rgb_num = hsv_to_rgb( (HSV){ .h = g_config.num_lock_indicator.h, - .s = g_config.num_lock_indicator.s, - .v = g_config.num_lock_indicator.v } ); - if (host_keyboard_led_state().num_lock) { - RGB_MATRIX_INDICATOR_SET_COLOR(g_config.num_lock_key, rgb_num.r, rgb_num.g, rgb_num.b); - } else { - if (g_config.num_override_bl) { - RGB_MATRIX_INDICATOR_SET_COLOR(g_config.num_lock_key, 0, 0, 0); - } - } - } - - // scroll lock cyan - if (g_config.enable_scroll_lock) { - RGB rgb_scroll = hsv_to_rgb( (HSV){ .h = g_config.scroll_lock_indicator.h, - .s = g_config.scroll_lock_indicator.s, - .v = g_config.scroll_lock_indicator.v } ); - if (host_keyboard_led_state().scroll_lock) { - RGB_MATRIX_INDICATOR_SET_COLOR(g_config.scroll_lock_key, rgb_scroll.r, rgb_scroll.g, rgb_scroll.b); - } else { - if (g_config.scroll_override_bl) { - RGB_MATRIX_INDICATOR_SET_COLOR(g_config.scroll_lock_key, 0, 0, 0); - } - } - } - - // layer state - if (g_config.enable_layer_indicator) { - RGB rgb_layer = hsv_to_rgb( (HSV){ .h = g_config.layer_indicator.h, - .s = g_config.layer_indicator.s, - .v = g_config.layer_indicator.v } ); - switch (get_highest_layer(layer_state)) { - case 0: - if (g_config.layer_override_bl) { - RGB_MATRIX_INDICATOR_SET_COLOR(g_config.layer_indicator_key, 0, 0, 0); - } - break; - case 1: - RGB_MATRIX_INDICATOR_SET_COLOR(g_config.layer_indicator_key, rgb_layer.r, rgb_layer.g, rgb_layer.b); - break; - default: - // white - RGB_MATRIX_INDICATOR_SET_COLOR(24, 128, 128, 128); - break; - } - } - return false; -} - -#endif #endif diff --git a/keyboards/xelus/pachi/rgb/rev2/rev2.h b/keyboards/xelus/pachi/rgb/rev2/rev2.h deleted file mode 100644 index fb0b8639d2..0000000000 --- a/keyboards/xelus/pachi/rgb/rev2/rev2.h +++ /dev/null @@ -1,72 +0,0 @@ -/* Copyright 2023 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 <http://www.gnu.org/licenses/>. - */ -#pragma once - -#include "quantum.h" - -#ifdef VIA_ENABLE -// custom ID codes -enum via_indicator_value { - id_caps_lock_enable = 1, - id_caps_lock_brightness, - id_caps_lock_color, - id_caps_lock_key, - id_caps_lock_override, - id_num_lock_enable, - id_num_lock_brightness, - id_num_lock_color, - id_num_lock_key, - id_num_lock_override, - id_scroll_lock_enable, - id_scroll_lock_brightness, - id_scroll_lock_color, - id_scroll_lock_key, - id_scroll_lock_override, - id_layer_indicator_enable, - id_layer_indicator_brightness, - id_layer_indicator_color, - id_layer_indicator_key, - id_layer_indicator_override -}; - -// struct to save things -typedef struct { - bool enable_caps_lock:1; // | - bool enable_num_lock:1; // | - bool enable_scroll_lock:1; // | - bool enable_layer_indicator:1; // | - bool caps_override_bl:1; // | - bool num_override_bl:1; // | - bool scroll_override_bl:1; // | - bool layer_override_bl:1; // 1 byte - HSV caps_lock_indicator; // 3 bytes - HSV num_lock_indicator; // 3 bytes - HSV scroll_lock_indicator; // 3 bytes - HSV layer_indicator; // 3 bytes - uint8_t caps_lock_key; // 1 byte - uint8_t num_lock_key; // 1 byte - uint8_t scroll_lock_key; // 1 byte - uint8_t layer_indicator_key;// 1 byte -} indicator_settings_config; -// total 17 bytes - -// function declaration -void indicator_config_set_value( uint8_t *data ); -void indicator_config_get_value( uint8_t *data ); -void indicator_config_save ( void ); -void _set_color(HSV *color, uint8_t *data); -void _get_color(HSV *color, uint8_t *data); -#endif diff --git a/keyboards/xenon/keyboard.json b/keyboards/xenon/keyboard.json index 7f78988525..0229f73ebd 100644 --- a/keyboards/xenon/keyboard.json +++ b/keyboards/xenon/keyboard.json @@ -35,7 +35,9 @@ }, "split": { "enabled": true, - "soft_serial_pin": "D2" + "serial": { + "pin": "D2" + } }, "processor": "atmega32u4", "bootloader": "caterina", diff --git a/keyboards/yandrstudio/nz64/nz64.c b/keyboards/yandrstudio/nz64/nz64.c index b5a53273df..928b0b5114 100644 --- a/keyboards/yandrstudio/nz64/nz64.c +++ b/keyboards/yandrstudio/nz64/nz64.c @@ -84,15 +84,23 @@ bool rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) { void eeconfig_init_kb(void) { kb_cums.raw = 0; eeconfig_update_kb(kb_cums.raw); + + eeconfig_init_user(); } void keyboard_post_init_kb(void) { kb_cums.underground_rgb_sw = eeconfig_read_kb(); + + keyboard_post_init_user(); } #endif bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + if (!process_record_user(keycode, record)) { + return false; + } + switch(keycode) { #ifdef RGB_MATRIX_ENABLE case URGB_K: diff --git a/keyboards/yandrstudio/nz67v2/nz67v2.c b/keyboards/yandrstudio/nz67v2/nz67v2.c index 346556c25e..c3162dd961 100644 --- a/keyboards/yandrstudio/nz67v2/nz67v2.c +++ b/keyboards/yandrstudio/nz67v2/nz67v2.c @@ -85,10 +85,14 @@ bool rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) { void eeconfig_init_kb(void) { kb_cums.raw = 0; eeconfig_update_kb(kb_cums.raw); + + eeconfig_init_user(); } void keyboard_post_init_kb(void) { kb_cums.underground_rgb_sw = eeconfig_read_kb(); + + keyboard_post_init_user(); } #endif diff --git a/keyboards/yiancardesigns/barleycorn/barleycorn.c b/keyboards/yiancardesigns/barleycorn/barleycorn.c deleted file mode 100644 index c73c1559c2..0000000000 --- a/keyboards/yiancardesigns/barleycorn/barleycorn.c +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright 2020 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 <http://www.gnu.org/licenses/>. - */ -#include "quantum.h" - -void keyboard_pre_init_kb(void) { - // Set our LED pins as output - gpio_set_pin_output(B5); - gpio_set_pin_output(C0); - keyboard_pre_init_user(); -} - -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if(res) { - // gpio_write_pin sets the pin high for 1 and low for 0. - // In this example the pins are inverted, setting - // it low/0 turns it on, and high/1 turns the LED off. - // This behavior depends on whether the LED is between the pin - // and VCC or the pin and GND. - gpio_write_pin(B5, led_state.caps_lock); - gpio_write_pin(C0, led_state.num_lock); - } - return res; -} diff --git a/keyboards/yiancardesigns/barleycorn/keyboard.json b/keyboards/yiancardesigns/barleycorn/keyboard.json index a1676840a5..cf041b96c5 100644 --- a/keyboards/yiancardesigns/barleycorn/keyboard.json +++ b/keyboards/yiancardesigns/barleycorn/keyboard.json @@ -19,6 +19,10 @@ "resync": true } }, + "indicators": { + "caps_lock": "B5", + "num_lock": "C0" + }, "processor": "atmega328p", "bootloader": "usbasploader", "layouts": { diff --git a/keyboards/ymdk/yd60mq/info.json b/keyboards/ymdk/yd60mq/info.json index 4152ed6e07..1af04be687 100644 --- a/keyboards/ymdk/yd60mq/info.json +++ b/keyboards/ymdk/yd60mq/info.json @@ -32,6 +32,10 @@ "pin": "B7", "levels": 5 }, + "indicators": { + "caps_lock": "F4", + "on_state": 0 + }, "ws2812": { "pin": "E2" }, diff --git a/keyboards/ymdk/yd60mq/yd60mq.c b/keyboards/ymdk/yd60mq/yd60mq.c deleted file mode 100644 index 40c899c46f..0000000000 --- a/keyboards/ymdk/yd60mq/yd60mq.c +++ /dev/null @@ -1,21 +0,0 @@ -#include "quantum.h" - -__attribute__((weak)) -void matrix_init_kb(void){ - gpio_set_pin_output(F4); - gpio_write_pin_high(F4); -} - -__attribute__((weak)) -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if (res) { - // gpio_write_pin sets the pin high for 1 and low for 0. - // In this example the pins are inverted, setting - // it low/0 turns it on, and high/1 turns the LED off. - // This behavior depends on whether the LED is between the pin - // and VCC or the pin and GND. - gpio_write_pin(F4, !led_state.caps_lock); - } - return res; -} diff --git a/keyboards/yoichiro/lunakey_mini/keyboard.json b/keyboards/yoichiro/lunakey_mini/keyboard.json index e31f09c285..177b3afaa6 100644 --- a/keyboards/yoichiro/lunakey_mini/keyboard.json +++ b/keyboards/yoichiro/lunakey_mini/keyboard.json @@ -25,7 +25,9 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D2" + "serial": { + "pin": "D2" + } }, "rgblight": { "saturation_steps": 8, diff --git a/keyboards/yoichiro/lunakey_pico/keyboard.json b/keyboards/yoichiro/lunakey_pico/keyboard.json index d80aaf0612..39070d615a 100644 --- a/keyboards/yoichiro/lunakey_pico/keyboard.json +++ b/keyboards/yoichiro/lunakey_pico/keyboard.json @@ -47,7 +47,10 @@ "max_brightness": 255 }, "split": { - "enabled": true + "enabled": true, + "serial": { + "driver": "vendor" + } }, "ws2812": { "pin": "GP6", diff --git a/keyboards/yoichiro/lunakey_pico/rules.mk b/keyboards/yoichiro/lunakey_pico/rules.mk deleted file mode 100644 index 161ec22b16..0000000000 --- a/keyboards/yoichiro/lunakey_pico/rules.mk +++ /dev/null @@ -1 +0,0 @@ -SERIAL_DRIVER = vendor diff --git a/keyboards/yosino58/keymaps/default/config.h b/keyboards/yosino58/keymaps/default/config.h index e82254fff1..76ebf095ab 100644 --- a/keyboards/yosino58/keymaps/default/config.h +++ b/keyboards/yosino58/keymaps/default/config.h @@ -20,12 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Select hand configuration */ - -#define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS - #define QUICK_TAP_TERM 0 #define TAPPING_TERM 100 diff --git a/keyboards/yosino58/rev1/keyboard.json b/keyboards/yosino58/rev1/keyboard.json index 2e50450a27..ffc1a5d827 100644 --- a/keyboards/yosino58/rev1/keyboard.json +++ b/keyboards/yosino58/rev1/keyboard.json @@ -15,7 +15,9 @@ "diode_direction": "COL2ROW", "split": { "enabled": true, - "soft_serial_pin": "D2" + "serial": { + "pin": "D2" + } }, "rgblight": { "led_count": 12 diff --git a/keyboards/yushakobo/ergo68/keyboard.json b/keyboards/yushakobo/ergo68/keyboard.json index c4a143cb73..bc61e979b7 100644 --- a/keyboards/yushakobo/ergo68/keyboard.json +++ b/keyboards/yushakobo/ergo68/keyboard.json @@ -127,14 +127,16 @@ "handedness": { "pin": "B6" }, + "serial": { + "pin": "D0" + }, "transport": { "sync": { "indicators": true, "layer_state": true, "matrix_state": true } - }, - "soft_serial_pin": "D0" + } }, "layouts": { "LAYOUT": { diff --git a/keyboards/yushakobo/navpad/10_helix_r/keyboard.json b/keyboards/yushakobo/navpad/10_helix_r/keyboard.json index 81854128da..e91f96f0ac 100644 --- a/keyboards/yushakobo/navpad/10_helix_r/keyboard.json +++ b/keyboards/yushakobo/navpad/10_helix_r/keyboard.json @@ -28,7 +28,9 @@ }, "split": { "enabled": true, - "soft_serial_pin": "D2", + "serial": { + "pin": "D2" + }, "encoder": { "right": { "rotary": [ diff --git a/keyboards/yushakobo/navpad/navpad_prefs.c b/keyboards/yushakobo/navpad/navpad_prefs.c index 08b7464cf9..c7b3881621 100644 --- a/keyboards/yushakobo/navpad/navpad_prefs.c +++ b/keyboards/yushakobo/navpad/navpad_prefs.c @@ -37,10 +37,6 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) { return true; } -bool led_update_kb(led_t led_state) { - return led_update_user(led_state); -} - #ifdef ENCODER_ENABLE bool encoder_update_kb(uint8_t index, bool clockwise) { if (!encoder_update_user(index, clockwise)) { return false; } diff --git a/keyboards/zigotica/z34/config.h b/keyboards/zigotica/z34/config.h index 10c442f206..928524696a 100644 --- a/keyboards/zigotica/z34/config.h +++ b/keyboards/zigotica/z34/config.h @@ -16,6 +16,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -// EE_HANDS MASTER_RIGHT MASTER_LEFT #define MASTER_RIGHT - diff --git a/keyboards/zigotica/z34/keyboard.json b/keyboards/zigotica/z34/keyboard.json index c08934360e..0a96fa0091 100644 --- a/keyboards/zigotica/z34/keyboard.json +++ b/keyboards/zigotica/z34/keyboard.json @@ -32,7 +32,9 @@ }, "split": { "enabled": true, - "soft_serial_pin": "D2", + "serial": { + "pin": "D2" + }, "matrix_pins": { "right": { "direct": [ diff --git a/keyboards/zigotica/z34/keymaps/default/config.h b/keyboards/zigotica/z34/keymaps/default/config.h index 2bcd017d72..928524696a 100644 --- a/keyboards/zigotica/z34/keymaps/default/config.h +++ b/keyboards/zigotica/z34/keymaps/default/config.h @@ -16,6 +16,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once - -// EE_HANDS MASTER_RIGHT MASTER_LEFT #define MASTER_RIGHT diff --git a/keyboards/ziptyze/lets_split_v3/keyboard.json b/keyboards/ziptyze/lets_split_v3/keyboard.json index 3db8004756..ca53b42240 100644 --- a/keyboards/ziptyze/lets_split_v3/keyboard.json +++ b/keyboards/ziptyze/lets_split_v3/keyboard.json @@ -22,6 +22,9 @@ "vid": "0x6F75" }, "split": { + "serial": { + "driver": "vendor" + }, "transport": { "sync": { "matrix_state": true diff --git a/keyboards/ziptyze/lets_split_v3/rules.mk b/keyboards/ziptyze/lets_split_v3/rules.mk deleted file mode 100644 index 161ec22b16..0000000000 --- a/keyboards/ziptyze/lets_split_v3/rules.mk +++ /dev/null @@ -1 +0,0 @@ -SERIAL_DRIVER = vendor diff --git a/keyboards/zsa/moonlander/config.h b/keyboards/zsa/moonlander/config.h index 08870fba9d..b846d89f45 100644 --- a/keyboards/zsa/moonlander/config.h +++ b/keyboards/zsa/moonlander/config.h @@ -18,60 +18,15 @@ #pragma once - -#define WEBUSB_LANDING_PAGE_URL u8"configure.ergodox-ez.com" - /* key matrix size */ #define MATRIX_ROWS 12 #define MATRIX_COLS 7 -/* PCB default pin-out */ -// #define MATRIX_ROW_PINS { B10, B11, B12, B13, B14, B15 } -// #define MATRIX_COL_PINS { A0, A1, A2, A3, A6, A7, B0 } - -// #define MCP23_ROW_PINS { GPB5, GBP4, GBP3, GBP2, GBP1, GBP0 } -// #define MCP23_COL_PINS { GPA0, GBA1, GBA2, GBA3, GBA4, GBA5, GBA6 } - -// #define MCP23_LED_R GPB7 -// #define MCP23_LED_G GPB6 -// #define MCP23_LED_B GPA7 - #define EEPROM_I2C_24LC128 -// Not needed, is default address: -// #define EXTERNAL_EEPROM_I2C_BASE_ADDRESS 0b10100000 - -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION ROW2COL - -/* - * 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 IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND #define IS31FL3731_I2C_ADDRESS_2 IS31FL3731_I2C_ADDRESS_VCC -#define MOUSEKEY_INTERVAL 20 -#define MOUSEKEY_DELAY 0 -#define MOUSEKEY_TIME_TO_MAX 60 -#define MOUSEKEY_MAX_SPEED 7 -#define MOUSEKEY_WHEEL_DELAY 400 -#define MOUSEKEY_WHEEL_INTERVAL MOUSEKEY_INTERVAL -#define MOUSEKEY_WHEEL_MAX_SPEED MOUSEKEY_MAX_SPEED -#define MOUSEKEY_WHEEL_TIME_TO_MAX MOUSEKEY_TIME_TO_MAX - #define MUSIC_MAP #define FIRMWARE_VERSION_SIZE 17 diff --git a/keyboards/zsa/moonlander/keyboard.json b/keyboards/zsa/moonlander/keyboard.json index 571674fe1c..2ef6657e91 100644 --- a/keyboards/zsa/moonlander/keyboard.json +++ b/keyboards/zsa/moonlander/keyboard.json @@ -16,6 +16,7 @@ "bootmagic": true, "command": true, "console": true, + "deferred_exec": true, "extrakey": true, "mousekey": true, "nkro": true, @@ -37,6 +38,13 @@ "eeprom": { "driver": "i2c" }, + "mousekey": { + "delay": 0, + "interval": 20, + "max_speed": 7, + "time_to_max": 60, + "wheel_delay": 400 + }, "rgb_matrix": { "animations": { "alphas_mods": true, @@ -85,6 +93,82 @@ }, "center_point": [120, 36], "driver": "is31fl3731", + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 4, "flags": 1}, + {"matrix": [1, 0], "x": 0, "y": 20, "flags": 1}, + {"matrix": [2, 0], "x": 0, "y": 36, "flags": 1}, + {"matrix": [3, 0], "x": 0, "y": 52, "flags": 1}, + {"matrix": [4, 0], "x": 0, "y": 68, "flags": 1}, + {"matrix": [0, 1], "x": 16, "y": 3, "flags": 4}, + {"matrix": [1, 1], "x": 16, "y": 19, "flags": 4}, + {"matrix": [2, 1], "x": 16, "y": 35, "flags": 4}, + {"matrix": [3, 1], "x": 16, "y": 51, "flags": 4}, + {"matrix": [4, 1], "x": 16, "y": 67, "flags": 1}, + {"matrix": [0, 2], "x": 32, "y": 1, "flags": 4}, + {"matrix": [1, 2], "x": 32, "y": 17, "flags": 4}, + {"matrix": [2, 2], "x": 32, "y": 33, "flags": 4}, + {"matrix": [3, 2], "x": 32, "y": 49, "flags": 4}, + {"matrix": [4, 2], "x": 32, "y": 65, "flags": 1}, + {"matrix": [0, 3], "x": 48, "y": 0, "flags": 4}, + {"matrix": [1, 3], "x": 48, "y": 16, "flags": 4}, + {"matrix": [2, 3], "x": 48, "y": 32, "flags": 4}, + {"matrix": [3, 3], "x": 48, "y": 48, "flags": 4}, + {"matrix": [4, 3], "x": 48, "y": 64, "flags": 1}, + {"matrix": [0, 4], "x": 64, "y": 1, "flags": 4}, + {"matrix": [1, 4], "x": 64, "y": 17, "flags": 4}, + {"matrix": [2, 4], "x": 64, "y": 33, "flags": 4}, + {"matrix": [3, 4], "x": 64, "y": 49, "flags": 4}, + {"matrix": [4, 4], "x": 64, "y": 65, "flags": 1}, + {"matrix": [0, 5], "x": 80, "y": 3, "flags": 4}, + {"matrix": [1, 5], "x": 80, "y": 19, "flags": 4}, + {"matrix": [2, 5], "x": 80, "y": 35, "flags": 4}, + {"matrix": [3, 5], "x": 80, "y": 51, "flags": 4}, + {"matrix": [0, 6], "x": 96, "y": 4, "flags": 1}, + {"matrix": [1, 6], "x": 96, "y": 20, "flags": 1}, + {"matrix": [2, 6], "x": 96, "y": 36, "flags": 1}, + {"matrix": [5, 0], "x": 88, "y": 69, "flags": 1}, + {"matrix": [5, 1], "x": 100, "y": 80, "flags": 1}, + {"matrix": [5, 2], "x": 112, "y": 91, "flags": 1}, + {"matrix": [5, 3], "x": 108, "y": 69, "flags": 1}, + {"matrix": [6, 6], "x": 240, "y": 4, "flags": 1}, + {"matrix": [7, 6], "x": 240, "y": 20, "flags": 1}, + {"matrix": [8, 6], "x": 240, "y": 36, "flags": 1}, + {"matrix": [9, 6], "x": 240, "y": 52, "flags": 1}, + {"matrix": [10, 6], "x": 240, "y": 68, "flags": 1}, + {"matrix": [6, 5], "x": 224, "y": 3, "flags": 4}, + {"matrix": [7, 5], "x": 224, "y": 19, "flags": 4}, + {"matrix": [8, 5], "x": 224, "y": 35, "flags": 4}, + {"matrix": [9, 5], "x": 224, "y": 51, "flags": 4}, + {"matrix": [10, 5], "x": 224, "y": 67, "flags": 1}, + {"matrix": [6, 4], "x": 208, "y": 1, "flags": 4}, + {"matrix": [7, 4], "x": 208, "y": 17, "flags": 4}, + {"matrix": [8, 4], "x": 208, "y": 33, "flags": 4}, + {"matrix": [9, 4], "x": 208, "y": 49, "flags": 4}, + {"matrix": [10, 4], "x": 208, "y": 65, "flags": 1}, + {"matrix": [6, 3], "x": 192, "y": 0, "flags": 4}, + {"matrix": [7, 3], "x": 192, "y": 16, "flags": 4}, + {"matrix": [8, 3], "x": 192, "y": 32, "flags": 4}, + {"matrix": [9, 3], "x": 192, "y": 48, "flags": 4}, + {"matrix": [10, 3], "x": 192, "y": 64, "flags": 1}, + {"matrix": [6, 2], "x": 176, "y": 1, "flags": 4}, + {"matrix": [7, 2], "x": 176, "y": 17, "flags": 4}, + {"matrix": [8, 2], "x": 176, "y": 33, "flags": 4}, + {"matrix": [9, 2], "x": 176, "y": 49, "flags": 4}, + {"matrix": [10, 2], "x": 176, "y": 65, "flags": 1}, + {"matrix": [6, 1], "x": 160, "y": 3, "flags": 4}, + {"matrix": [7, 1], "x": 160, "y": 19, "flags": 4}, + {"matrix": [8, 1], "x": 160, "y": 35, "flags": 4}, + {"matrix": [9, 1], "x": 160, "y": 51, "flags": 4}, + {"matrix": [6, 0], "x": 144, "y": 4, "flags": 1}, + {"matrix": [7, 0], "x": 144, "y": 20, "flags": 1}, + {"matrix": [8, 0], "x": 144, "y": 36, "flags": 1}, + {"matrix": [11, 6], "x": 152, "y": 69, "flags": 1}, + {"matrix": [11, 5], "x": 140, "y": 80, "flags": 1}, + {"matrix": [11, 4], "x": 128, "y": 91, "flags": 1}, + {"matrix": [11, 3], "x": 132, "y": 69, "flags": 1} + ], + "led_flush_limit": 26, + "led_process_limit": 5, "max_brightness": 175, "sleep": true }, diff --git a/keyboards/zsa/moonlander/ld/STM32F303xB.ld b/keyboards/zsa/moonlander/ld/STM32F303xB.ld new file mode 100644 index 0000000000..c3a81461f9 --- /dev/null +++ b/keyboards/zsa/moonlander/ld/STM32F303xB.ld @@ -0,0 +1,85 @@ +/* + 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. +*/ + +/* + * STM32F303xB memory setup. + */ +MEMORY +{ + flash0 (rx) : org = 0x08000000, len = 128k + 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 = 32k + ram1 (wx) : org = 0x00000000, len = 0 + ram2 (wx) : org = 0x00000000, len = 0 + ram3 (wx) : org = 0x00000000, len = 0 + ram4 (wx) : org = 0x10000000, len = 8k + 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 diff --git a/keyboards/zsa/moonlander/matrix.c b/keyboards/zsa/moonlander/matrix.c index 2c9edd417c..867fa85a66 100644 --- a/keyboards/zsa/moonlander/matrix.c +++ b/keyboards/zsa/moonlander/matrix.c @@ -14,62 +14,39 @@ * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ + */ #include "moonlander.h" -#include "i2c_master.h" +#include "mcp23018.h" +#pragma GCC push_options +#pragma GCC optimize("-O3") /* #define MATRIX_ROW_PINS { B10, B11, B12, B13, B14, B15 } outputs #define MATRIX_COL_PINS { A0, A1, A2, A3, A6, A7, B0 } inputs +#define MCP23_ROW_PINS { GPB5, GBP4, GBP3, GBP2, GBP1, GBP0 } outputs +#define MCP23_COL_PINS { GPA0, GBA1, GBA2, GBA3, GBA4, GBA5, GBA6 } inputs + */ /* matrix state(1:on, 0:off) */ -extern matrix_row_t matrix[MATRIX_ROWS]; // debounced values -extern matrix_row_t raw_matrix[MATRIX_ROWS]; // raw values -static matrix_row_t raw_matrix_right[MATRIX_COLS]; +extern matrix_row_t matrix[MATRIX_ROWS]; // debounced values +extern matrix_row_t raw_matrix[MATRIX_ROWS]; // raw values +static matrix_row_t raw_matrix_right[MATRIX_ROWS]; -#define ROWS_PER_HAND (MATRIX_ROWS / 2) -#ifndef MOONLANDER_I2C_TIMEOUT -# define MOONLANDER_I2C_TIMEOUT 100 -#endif +#define MCP_ROWS_PER_HAND (MATRIX_ROWS / 2) extern bool mcp23018_leds[3]; extern bool is_launching; -bool mcp23018_initd = false; -static uint8_t mcp23018_reset_loop; - -uint8_t mcp23018_tx[3]; -uint8_t mcp23018_rx[1]; - -void mcp23018_init(void) { - i2c_init(); - - // #define MCP23_ROW_PINS { GPB5, GBP4, GBP3, GBP2, GBP1, GBP0 } outputs - // #define MCP23_COL_PINS { GPA0, GBA1, GBA2, GBA3, GBA4, GBA5, GBA6 } inputs +static uint16_t mcp23018_reset_loop; +uint8_t mcp23018_errors; - mcp23018_tx[0] = 0x00; // IODIRA - mcp23018_tx[1] = 0b00000000; // A is output - mcp23018_tx[2] = 0b00111111; // B is inputs - - if (MSG_OK != i2c_transmit(MCP23018_DEFAULT_ADDRESS << 1, mcp23018_tx, 3, MOONLANDER_I2C_TIMEOUT)) { - dprintf("error hori\n"); - } else { - mcp23018_tx[0] = 0x0C; // GPPUA - mcp23018_tx[1] = 0b10000000; // A is not pulled-up - mcp23018_tx[2] = 0b11111111; // B is pulled-up - - if (MSG_OK != i2c_transmit(MCP23018_DEFAULT_ADDRESS << 1, mcp23018_tx, 3, MOONLANDER_I2C_TIMEOUT)) { - dprintf("error hori\n"); - } else { - mcp23018_initd = is_launching = true; - } - } +bool io_expander_ready(void) { + uint8_t tx; + return mcp23018_read_pins(MCP23018_DEFAULT_ADDRESS, mcp23018_PORTA, &tx); } void matrix_init_custom(void) { - dprintf("matrix init\n"); - // debug_matrix = true; // outputs gpio_set_pin_output(B10); gpio_set_pin_output(B11); @@ -87,115 +64,116 @@ void matrix_init_custom(void) { gpio_set_pin_input_low(A7); gpio_set_pin_input_low(B0); - mcp23018_init(); + mcp23018_init(MCP23018_DEFAULT_ADDRESS); + mcp23018_errors += !mcp23018_set_config(MCP23018_DEFAULT_ADDRESS, mcp23018_PORTA, 0b00000000); + mcp23018_errors += !mcp23018_set_config(MCP23018_DEFAULT_ADDRESS, mcp23018_PORTB, 0b00111111); + + if (!mcp23018_errors) { + is_launching = true; + } } bool matrix_scan_custom(matrix_row_t current_matrix[]) { bool changed = false; - - // Try to re-init right side - if (!mcp23018_initd) { - if (++mcp23018_reset_loop == 0) { - // if (++mcp23018_reset_loop >= 1300) { - // since mcp23018_reset_loop is 8 bit - we'll try to reset once in 255 matrix scans - // this will be approx bit more frequent than once per second - print("trying to reset mcp23018\n"); - mcp23018_init(); - if (!mcp23018_initd) { - print("right side not responding\n"); - } else { - print("right side attached\n"); -#ifdef RGB_MATRIX_ENABLE - rgb_matrix_init(); -#endif + // Attempt to reset the mcp23018 if it's not initialized + if (mcp23018_errors) { + if (++mcp23018_reset_loop > 0x1FFF) { + if (io_expander_ready()) { + // If we managed to initialize the mcp23018 - we need to reinitialize the matrix / layer state. During an electric discharge the i2c peripherals might be in a weird state. Giving a delay and resetting the MCU allows to recover from this. + wait_ms(200); + mcu_reset(); } } } matrix_row_t data = 0; // actual matrix - for (uint8_t row = 0; row <= ROWS_PER_HAND; row++) { + for (uint8_t row = 0; row <= MCP_ROWS_PER_HAND; row++) { // strobe row switch (row) { - case 0: gpio_write_pin_high(B10); break; - case 1: gpio_write_pin_high(B11); break; - case 2: gpio_write_pin_high(B12); break; - case 3: gpio_write_pin_high(B13); break; - case 4: gpio_write_pin_high(B14); break; - case 5: gpio_write_pin_high(B15); break; - case 6: break; // Left hand has 6 rows + case 0: + gpio_write_pin_high(B10); + break; + case 1: + gpio_write_pin_high(B11); + break; + case 2: + gpio_write_pin_high(B12); + break; + case 3: + gpio_write_pin_high(B13); + break; + case 4: + gpio_write_pin_high(B14); + break; + case 5: + gpio_write_pin_high(B15); + break; + case 6: + break; // Left hand has 6 rows } - // right side - if (mcp23018_initd) { - // #define MCP23_ROW_PINS { GPB5, GBP4, GBP3, GBP2, GBP1, GBP0 } outputs - // #define MCP23_COL_PINS { GPA0, GBA1, GBA2, GBA3, GBA4, GBA5, GBA6 } inputs - + // Selecting the row on the right side of the keyboard. + if (!mcp23018_errors) { // select row - mcp23018_tx[0] = 0x12; // GPIOA - mcp23018_tx[1] = (0b01111111 & ~(1 << (row))) | ((uint8_t)!mcp23018_leds[2] << 7); // activate row - mcp23018_tx[2] = ((uint8_t)!mcp23018_leds[1] << 6) | ((uint8_t)!mcp23018_leds[0] << 7); // activate row - - if (MSG_OK != i2c_transmit(MCP23018_DEFAULT_ADDRESS << 1, mcp23018_tx, 3, MOONLANDER_I2C_TIMEOUT)) { - dprintf("error hori\n"); - mcp23018_initd = false; - } - - // read col - - mcp23018_tx[0] = 0x13; // GPIOB - if (MSG_OK != i2c_read_register(MCP23018_DEFAULT_ADDRESS << 1, mcp23018_tx[0], &mcp23018_rx[0], 1, MOONLANDER_I2C_TIMEOUT)) { - dprintf("error vert\n"); - mcp23018_initd = false; - } - - data = ~(mcp23018_rx[0] & 0b00111111); - // data = 0x01; - } else { - data = 0; - } - - if (raw_matrix_right[row] != data) { - raw_matrix_right[row] = data; - changed = true; + mcp23018_errors += !mcp23018_set_output_all(MCP23018_DEFAULT_ADDRESS, (0b01111111 & ~(1 << (row))) | ((uint8_t)!mcp23018_leds[2] << 7), ((uint8_t)!mcp23018_leds[1] << 6) | ((uint8_t)!mcp23018_leds[0] << 7)); } - - // left side - if (row < ROWS_PER_HAND) { + // Reading the left side of the keyboard. + if (row < MCP_ROWS_PER_HAND) { // i2c comm incur enough wait time - if (!mcp23018_initd) { + if (mcp23018_errors) { // need wait to settle pin state matrix_io_delay(); } // read col data - data = ( - (gpio_read_pin(A0) << 0 ) | - (gpio_read_pin(A1) << 1 ) | - (gpio_read_pin(A2) << 2 ) | - (gpio_read_pin(A3) << 3 ) | - (gpio_read_pin(A6) << 4 ) | - (gpio_read_pin(A7) << 5 ) | - (gpio_read_pin(B0) << 6 ) - ); + data = ((readPin(A0) << 0) | (readPin(A1) << 1) | (readPin(A2) << 2) | (readPin(A3) << 3) | (readPin(A6) << 4) | (readPin(A7) << 5) | (readPin(B0) << 6)); // unstrobe row switch (row) { - case 0: gpio_write_pin_low(B10); break; - case 1: gpio_write_pin_low(B11); break; - case 2: gpio_write_pin_low(B12); break; - case 3: gpio_write_pin_low(B13); break; - case 4: gpio_write_pin_low(B14); break; - case 5: gpio_write_pin_low(B15); break; - case 6: break; + case 0: + gpio_write_pin_low(B10); + break; + case 1: + gpio_write_pin_low(B11); + break; + case 2: + gpio_write_pin_low(B12); + break; + case 3: + gpio_write_pin_low(B13); + break; + case 4: + gpio_write_pin_low(B14); + break; + case 5: + gpio_write_pin_low(B15); + break; + case 6: + break; } if (current_matrix[row] != data) { - current_matrix[row] = data; - changed = true; + current_matrix[row] = data; + changed = true; } } + + // Reading the right side of the keyboard. + if (!mcp23018_errors) { + uint8_t rx; + mcp23018_errors += !mcp23018_read_pins(MCP23018_DEFAULT_ADDRESS, mcp23018_PORTB, &rx); + data = ~(rx & 0b00111111); + } else { + data = 0; + } + + if (raw_matrix_right[row] != data) { + raw_matrix_right[row] = data; + changed = true; + } } - for (uint8_t row = 0; row < ROWS_PER_HAND; row++) { + + for (uint8_t row = 0; row < MCP_ROWS_PER_HAND; row++) { current_matrix[11 - row] = 0; for (uint8_t col = 0; col < MATRIX_COLS; col++) { current_matrix[11 - row] |= ((raw_matrix_right[6 - col] & (1 << row) ? 1 : 0) << col); @@ -222,12 +200,12 @@ void matrix_power_up(void) { } // initialize matrix state: all keys off - for (uint8_t i=0; i < MATRIX_ROWS; i++) { + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { matrix[i] = 0; } - } bool is_transport_connected(void) { - return mcp23018_initd; -}
\ No newline at end of file + return (bool)(mcp23018_errors == 0); +} +#pragma GCC pop_options diff --git a/keyboards/zsa/moonlander/mcuconf.h b/keyboards/zsa/moonlander/mcuconf.h index 032c853f4e..43d777453b 100644 --- a/keyboards/zsa/moonlander/mcuconf.h +++ b/keyboards/zsa/moonlander/mcuconf.h @@ -22,10 +22,6 @@ #undef STM32_I2C_USE_I2C1 #define STM32_I2C_USE_I2C1 TRUE -// for future hardwar -#undef STM32_I2C_USE_I2C2 -#define STM32_I2C_USE_I2C2 TRUE - // for audio #undef STM32_DAC_USE_DAC1_CH1 #define STM32_DAC_USE_DAC1_CH1 TRUE @@ -33,7 +29,3 @@ #define STM32_DAC_USE_DAC1_CH2 TRUE #undef STM32_GPT_USE_TIM6 #define STM32_GPT_USE_TIM6 TRUE -#undef STM32_GPT_USE_TIM7 -#define STM32_GPT_USE_TIM7 TRUE -#undef STM32_GPT_USE_TIM8 -#define STM32_GPT_USE_TIM8 TRUE diff --git a/keyboards/zsa/moonlander/moonlander.c b/keyboards/zsa/moonlander/moonlander.c index 02c64f4b96..b95966c414 100644 --- a/keyboards/zsa/moonlander/moonlander.c +++ b/keyboards/zsa/moonlander/moonlander.c @@ -23,76 +23,95 @@ keyboard_config_t keyboard_config; bool mcp23018_leds[3] = {0, 0, 0}; bool is_launching = false; -#ifdef DYNAMIC_MACRO_ENABLE -static bool is_dynamic_recording = false; - -void dynamic_macro_record_start_user(int8_t direction) { is_dynamic_recording = true; } - -void dynamic_macro_record_end_user(int8_t direction) { - is_dynamic_recording = false; - ML_LED_3(false); +#if defined(DEFERRED_EXEC_ENABLE) +# if defined(DYNAMIC_MACRO_ENABLE) +deferred_token dynamic_macro_token = INVALID_DEFERRED_TOKEN; + +static uint32_t dynamic_macro_led(uint32_t trigger_time, void *cb_arg) { + static bool led_state = true; + if (!is_launching) { + led_state = !led_state; + ML_LED_3(led_state); + } + return 100; } -#endif -void moonlander_led_task(void) { - if (is_launching) { - ML_LED_1(false); - ML_LED_2(false); - ML_LED_3(false); - ML_LED_4(false); - ML_LED_5(false); - ML_LED_6(false); - - ML_LED_1(true); - wait_ms(250); - ML_LED_2(true); - wait_ms(250); - ML_LED_3(true); - wait_ms(250); - ML_LED_4(true); - wait_ms(250); - ML_LED_5(true); - wait_ms(250); - ML_LED_6(true); - wait_ms(250); - ML_LED_1(false); - wait_ms(250); - ML_LED_2(false); - wait_ms(250); - ML_LED_3(false); - wait_ms(250); - ML_LED_4(false); - wait_ms(250); - ML_LED_5(false); - wait_ms(250); - ML_LED_6(false); - wait_ms(250); - is_launching = false; - layer_state_set_kb(layer_state); +bool dynamic_macro_record_start_kb(int8_t direction) { + if (!dynamic_macro_record_start_user(direction)) { + return false; } -#ifdef DYNAMIC_MACRO_ENABLE - else if (is_dynamic_recording) { + if (dynamic_macro_token == INVALID_DEFERRED_TOKEN) { ML_LED_3(true); - wait_ms(100); - ML_LED_3(false); - wait_ms(155); - } -#endif -#if !defined(MOONLANDER_USER_LEDS) - else { - layer_state_set_kb(layer_state); + dynamic_macro_token = defer_exec(100, dynamic_macro_led, NULL); } -#endif + return true } -static THD_WORKING_AREA(waLEDThread, 128); -static THD_FUNCTION(LEDThread, arg) { - (void)arg; - chRegSetThreadName("LEDThread"); - while (true) { - moonlander_led_task(); +bool dynamic_macro_record_end_kb(int8_t direction) { + if (!dynamic_macro_record_end_user(direction)) { + return false; + } + if (cancel_deferred_exec(dynamic_macro_token)) { + dynamic_macro_token = INVALID_DEFERRED_TOKEN; + ML_LED_3(false); + } + return false +} +# endif + +static uint32_t startup_exec(uint32_t trigger_time, void *cb_arg) { + static uint8_t startup_loop = 0; + + switch (startup_loop++) { + case 0: + ML_LED_1(true); + ML_LED_2(false); + ML_LED_3(false); + ML_LED_4(false); + ML_LED_5(false); + ML_LED_6(false); + break; + case 1: + ML_LED_2(true); + break; + case 2: + ML_LED_3(true); + break; + case 3: + ML_LED_4(true); + break; + case 4: + ML_LED_5(true); + break; + case 5: + ML_LED_6(true); + break; + case 6: + ML_LED_1(false); + break; + case 7: + ML_LED_2(false); + break; + case 8: + ML_LED_3(false); + break; + case 9: + ML_LED_4(false); + break; + case 10: + ML_LED_5(false); + break; + case 11: + ML_LED_6(false); + break; + case 12: + is_launching = false; + layer_state_set_kb(layer_state); + return 0; } + return 250; } +#endif void keyboard_pre_init_kb(void) { gpio_set_pin_output(B5); @@ -103,13 +122,6 @@ void keyboard_pre_init_kb(void) { gpio_write_pin_low(B4); gpio_write_pin_low(B3); - chThdCreateStatic(waLEDThread, sizeof(waLEDThread), NORMALPRIO - 16, LEDThread, NULL); - - /* the array is initialized to 0, no need to re-set it here */ - // mcp23018_leds[0] = 0; // blue - // mcp23018_leds[1] = 0; // green - // mcp23018_leds[2] = 0; // red - keyboard_pre_init_user(); } @@ -173,13 +185,7 @@ layer_state_t layer_state_set_kb(layer_state_t state) { #ifdef RGB_MATRIX_ENABLE // clang-format off const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = { -/* Refer to IS31 manual for these locations - * driver - * | R location - * | | G location - * | | | B location - * | | | | */ - {0, C3_2, C1_1, C4_2}, // 1 + {0, C3_2, C1_1, C4_2}, {0, C2_2, C1_2, C4_3}, {0, C2_3, C1_3, C3_3}, {0, C2_4, C1_4, C3_4}, @@ -189,7 +195,7 @@ const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = { {0, C2_8, C1_8, C3_8}, {0, C3_1, C2_1, C4_1}, - {0, C7_8, C6_8, C8_8}, // 10 + {0, C7_8, C6_8, C8_8}, {0, C7_7, C6_7, C9_8}, {0, C8_7, C6_6, C9_7}, {0, C8_6, C7_6, C9_6}, @@ -199,7 +205,7 @@ const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = { {0, C8_2, C7_2, C9_2}, {0, C8_1, C7_1, C9_1}, - {0, C3_10, C1_9, C4_10}, // 19 + {0, C3_10, C1_9, C4_10}, {0, C2_10, C1_10, C4_11}, {0, C2_11, C1_11, C3_11}, {0, C2_12, C1_12, C3_12}, @@ -209,7 +215,7 @@ const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = { {0, C2_16, C1_16, C3_16}, {0, C3_9, C2_9, C4_9}, - {0, C7_16, C6_16, C8_16}, // 28 + {0, C7_16, C6_16, C8_16}, {0, C7_15, C6_15, C9_16}, {0, C8_15, C6_14, C9_15}, {0, C8_10, C7_10, C9_10}, @@ -219,7 +225,7 @@ const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = { {0, C8_13, C7_13, C9_13}, {0, C8_14, C7_14, C9_14}, - {1, C3_2, C1_1, C4_2}, // 1 + {1, C3_2, C1_1, C4_2}, {1, C2_2, C1_2, C4_3}, {1, C2_3, C1_3, C3_3}, {1, C2_4, C1_4, C3_4}, @@ -229,7 +235,7 @@ const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = { {1, C2_8, C1_8, C3_8}, {1, C3_1, C2_1, C4_1}, - {1, C7_8, C6_8, C8_8}, // 10 + {1, C7_8, C6_8, C8_8}, {1, C7_7, C6_7, C9_8}, {1, C8_7, C6_6, C9_7}, {1, C8_6, C7_6, C9_6}, @@ -239,7 +245,7 @@ const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = { {1, C8_2, C7_2, C9_2}, {1, C8_1, C7_1, C9_1}, - {1, C3_10, C1_9, C4_10}, // 19 + {1, C3_10, C1_9, C4_10}, {1, C2_10, C1_10, C4_11}, {1, C2_11, C1_11, C3_11}, {1, C2_12, C1_12, C3_12}, @@ -249,7 +255,7 @@ const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = { {1, C2_16, C1_16, C3_16}, {1, C3_9, C2_9, C4_9}, - {1, C7_16, C6_16, C8_16}, // 28 + {1, C7_16, C6_16, C8_16}, {1, C7_15, C6_15, C9_16}, {1, C8_15, C6_14, C9_15}, {1, C8_10, C7_10, C9_10}, @@ -258,61 +264,8 @@ const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = { {1, C8_12, C7_12, C9_12}, {1, C8_13, C7_13, C9_13}, {1, C8_14, C7_14, C9_14}, - }; - -led_config_t g_led_config = { { - { 0, 5, 10, 15, 20, 25, 29 }, - { 1, 6, 11, 16, 21, 26, 30 }, - { 2, 7, 12, 17, 22, 27, 31 }, - { 3, 8, 13, 18, 23, 28, NO_LED }, - { 4, 9, 14, 19, 24, NO_LED, NO_LED }, - { 32, 33, 34, 35, NO_LED, NO_LED, NO_LED }, - { 65, 61, 56, 51, 46, 41, 36 }, - { 66, 62, 57, 52, 47, 42, 37 }, - { 67, 63, 58, 53, 48, 43, 38 }, - { NO_LED, 64, 59, 54, 49, 44, 39 }, - { NO_LED, NO_LED, 60, 55, 50, 45, 40 }, - { NO_LED, NO_LED, NO_LED, 71, 70, 69, 68 } -}, { - { 0, 4}, { 0, 20}, { 0, 36}, { 0, 52}, { 0, 68}, - { 16, 3}, { 16, 19}, { 16, 35}, { 16, 51}, { 16, 67}, - { 32, 1}, { 32, 17}, { 32, 33}, { 32, 49}, { 32, 65}, - { 48, 0}, { 48, 16}, { 48, 32}, { 48, 48}, { 48, 64}, - { 64, 1}, { 64, 17}, { 64, 33}, { 64, 49}, { 64, 65}, - { 80, 3}, { 80, 19}, { 80, 35}, { 80, 51}, - { 96, 4}, { 96, 20}, { 96, 36}, - { 88, 69}, {100, 80}, {112, 91}, {108, 69}, - - {240, 4}, {240, 20}, {240, 36}, {240, 52}, {240, 68}, - {224, 3}, {224, 19}, {224, 35}, {224, 51}, {224, 67}, - {208, 1}, {208, 17}, {208, 33}, {208, 49}, {208, 65}, - {192, 0}, {192, 16}, {192, 32}, {192, 48}, {192, 64}, - {176, 1}, {176, 17}, {176, 33}, {176, 49}, {176, 65}, - {160, 3}, {160, 19}, {160, 35}, {160, 51}, - {144, 4}, {144, 20}, {144, 36}, - {152, 69}, {140, 80}, {128, 91}, {132, 69} -}, { - 1, 1, 1, 1, 1, - 4, 4, 4, 4, 1, - 4, 4, 4, 4, 1, - 4, 4, 4, 4, 1, - 4, 4, 4, 4, 1, - 4, 4, 4, 4, - 1, 1, 1, - 1, 1, 1, 1, - - 1, 1, 1, 1, 1, - 4, 4, 4, 4, 1, - 4, 4, 4, 4, 1, - 4, 4, 4, 4, 1, - 4, 4, 4, 4, 1, - 4, 4, 4, 4, - 1, 1, 1, - 1, 1, 1, 1 -} }; // clang-format on - #endif #ifdef AUDIO_ENABLE @@ -358,11 +311,6 @@ const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { {{6,5}, {5,5}, {4,5}, {3,5}, {2,5}, {1,5},{0,5}}, }; // clang-format on - -void keyboard_post_init_kb(void) { - rgb_matrix_enable_noeeprom(); - keyboard_post_init_user(); -} #endif #if defined(AUDIO_ENABLE) && defined(MUSIC_MAP) @@ -441,7 +389,7 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) { return true; } -void matrix_init_kb(void) { +void keyboard_post_init_kb(void) { keyboard_config.raw = eeconfig_read_kb(); if (!keyboard_config.led_level && !keyboard_config.led_level_res) { @@ -450,11 +398,11 @@ void matrix_init_kb(void) { eeconfig_update_kb(keyboard_config.raw); } #ifdef RGB_MATRIX_ENABLE - if (keyboard_config.rgb_matrix_enable) { - rgb_matrix_set_flags(LED_FLAG_ALL); - } else { - rgb_matrix_set_flags(LED_FLAG_NONE); - } + rgb_matrix_enable_noeeprom(); +#endif +#if defined(DEFERRED_EXEC_ENABLE) + is_launching = true; + defer_exec(500, startup_exec, NULL); #endif matrix_init_user(); } diff --git a/keyboards/zsa/moonlander/rules.mk b/keyboards/zsa/moonlander/rules.mk index 10928ea061..d2018cfff0 100644 --- a/keyboards/zsa/moonlander/rules.mk +++ b/keyboards/zsa/moonlander/rules.mk @@ -1,5 +1,7 @@ CUSTOM_MATRIX = lite -# project specific files -SRC += matrix.c +VPATH += drivers/gpio +SRC += matrix.c mcp23018.c I2C_DRIVER_REQUIRED = yes + +MCU_LDSCRIPT = STM32F303xB diff --git a/keyboards/planck/ez/base/keyboard.json b/keyboards/zsa/planck_ez/base/keyboard.json index 07167a8c2a..07167a8c2a 100644 --- a/keyboards/planck/ez/base/keyboard.json +++ b/keyboards/zsa/planck_ez/base/keyboard.json diff --git a/keyboards/nacly/sodium50/config.h b/keyboards/zsa/planck_ez/config.h index fe3f0e0cc9..1145df9ef9 100644 --- a/keyboards/nacly/sodium50/config.h +++ b/keyboards/zsa/planck_ez/config.h @@ -1,4 +1,6 @@ -/* Copyright 2022 NaCly +/* Copyright 2018 Jack Humbert <[email protected]> + * Copyright 2015 ZSA Technology Labs Inc (@zsa) + * Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <[email protected]> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -16,20 +18,9 @@ #pragma once -#define SPLIT_HAND_PIN F4 +#define MUSIC_MAP +#define AUDIO_PIN A5 +#define AUDIO_PIN_ALT A4 +#define AUDIO_PIN_ALT_AS_NEGATIVE -/* - * 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 IS31FL3737_I2C_ADDRESS_1 IS31FL3737_I2C_ADDRESS_GND diff --git a/keyboards/zsa/planck_ez/glow/glow.c b/keyboards/zsa/planck_ez/glow/glow.c new file mode 100644 index 0000000000..2c11c2351e --- /dev/null +++ b/keyboards/zsa/planck_ez/glow/glow.c @@ -0,0 +1,75 @@ +/* Copyright 2018 Jack Humbert <[email protected]> + * Copyright 2015 ZSA Technology Labs Inc (@zsa) + * Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <[email protected]> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ +#include "planck_ez.h" + +const is31fl3737_led_t PROGMEM g_is31fl3737_leds[IS31FL3737_LED_COUNT] = { + {0, SW2_CS12, SW1_CS12, SW3_CS12}, + {0, SW2_CS11, SW1_CS11, SW3_CS11}, + {0, SW2_CS10, SW1_CS10, SW3_CS10}, + {0, SW2_CS9, SW1_CS9, SW3_CS9}, + {0, SW2_CS8, SW1_CS8, SW3_CS8}, + {0, SW2_CS7, SW1_CS7, SW3_CS7}, + + {0, SW8_CS12, SW7_CS12, SW9_CS12}, + {0, SW8_CS11, SW7_CS11, SW9_CS11}, + {0, SW8_CS10, SW7_CS10, SW9_CS10}, + {0, SW8_CS9, SW7_CS9, SW9_CS9}, + {0, SW8_CS8, SW7_CS8, SW9_CS8}, + {0, SW8_CS7, SW7_CS7, SW9_CS7}, + + {0, SW2_CS6, SW1_CS6, SW3_CS6}, + {0, SW2_CS5, SW1_CS5, SW3_CS5}, + {0, SW2_CS4, SW1_CS4, SW3_CS4}, + {0, SW2_CS3, SW1_CS3, SW3_CS3}, + {0, SW2_CS2, SW1_CS2, SW3_CS2}, + {0, SW2_CS1, SW1_CS1, SW3_CS1}, + + {0, SW8_CS6, SW7_CS6, SW9_CS6}, + {0, SW8_CS5, SW7_CS5, SW9_CS5}, + {0, SW8_CS4, SW7_CS4, SW9_CS4}, + {0, SW8_CS3, SW7_CS3, SW9_CS3}, + {0, SW8_CS2, SW7_CS2, SW9_CS2}, + {0, SW8_CS1, SW7_CS1, SW9_CS1}, + + {0, SW5_CS12, SW4_CS12, SW6_CS12}, + {0, SW5_CS11, SW4_CS11, SW6_CS11}, + {0, SW5_CS10, SW4_CS10, SW6_CS10}, + {0, SW5_CS9, SW4_CS9, SW6_CS9}, + {0, SW5_CS8, SW4_CS8, SW6_CS8}, + {0, SW5_CS7, SW4_CS7, SW6_CS7}, + + {0, SW11_CS12, SW10_CS12, SW12_CS12}, + {0, SW11_CS11, SW10_CS11, SW12_CS11}, + {0, SW11_CS10, SW10_CS10, SW12_CS10}, + {0, SW11_CS9, SW10_CS9, SW12_CS9}, + {0, SW11_CS8, SW10_CS8, SW12_CS8}, + {0, SW11_CS7, SW10_CS7, SW12_CS7}, + + {0, SW5_CS6, SW4_CS6, SW6_CS6}, + {0, SW5_CS5, SW4_CS5, SW6_CS5}, + {0, SW5_CS4, SW4_CS4, SW6_CS4}, + {0, SW5_CS3, SW4_CS3, SW6_CS3}, + {0, SW5_CS2, SW4_CS2, SW6_CS2}, + {0, SW5_CS1, SW4_CS1, SW6_CS1}, + + {0, SW11_CS6, SW10_CS6, SW12_CS6}, + {0, SW11_CS5, SW10_CS5, SW12_CS5}, + {0, SW11_CS4, SW10_CS4, SW12_CS4}, + {0, SW11_CS3, SW10_CS3, SW12_CS3}, + {0, SW11_CS2, SW10_CS2, SW12_CS2}, +}; diff --git a/keyboards/zsa/planck_ez/glow/keyboard.json b/keyboards/zsa/planck_ez/glow/keyboard.json new file mode 100644 index 0000000000..fa83190a79 --- /dev/null +++ b/keyboards/zsa/planck_ez/glow/keyboard.json @@ -0,0 +1,109 @@ +{ + "keyboard_name": "Planck EZ Glow", + "usb": { + "pid": "0xC6CF" + }, + "features": { + "rgb_matrix": true + }, + "rgb_matrix": { + "animations": { + "alphas_mods": true, + "gradient_up_down": true, + "gradient_left_right": true, + "breathing": true, + "band_sat": true, + "band_val": true, + "band_pinwheel_sat": true, + "band_pinwheel_val": true, + "band_spiral_sat": true, + "band_spiral_val": true, + "cycle_all": true, + "cycle_left_right": true, + "cycle_up_down": true, + "rainbow_moving_chevron": true, + "cycle_out_in": true, + "cycle_out_in_dual": true, + "cycle_pinwheel": true, + "cycle_spiral": true, + "dual_beacon": true, + "rainbow_beacon": true, + "rainbow_pinwheels": true, + "raindrops": true, + "jellybean_raindrops": true, + "hue_breathing": true, + "hue_pendulum": true, + "hue_wave": true, + "pixel_rain": true, + "pixel_flow": true, + "pixel_fractal": true, + "typing_heatmap": true, + "digital_rain": true, + "solid_reactive_simple": true, + "solid_reactive": true, + "solid_reactive_wide": true, + "solid_reactive_multiwide": true, + "solid_reactive_cross": true, + "solid_reactive_multicross": true, + "solid_reactive_nexus": true, + "solid_reactive_multinexus": true, + "splash": true, + "multisplash": true, + "solid_splash": true, + "solid_multisplash": true + }, + "driver": "is31fl3737", + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}, + {"matrix": [0, 1], "x": 20, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 40, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 61, "y": 0, "flags": 4}, + {"matrix": [0, 4], "x": 81, "y": 0, "flags": 4}, + {"matrix": [0, 5], "x": 101, "y": 0, "flags": 4}, + {"matrix": [4, 0], "x": 122, "y": 0, "flags": 4}, + {"matrix": [4, 1], "x": 142, "y": 0, "flags": 4}, + {"matrix": [4, 2], "x": 162, "y": 0, "flags": 4}, + {"matrix": [4, 3], "x": 183, "y": 0, "flags": 4}, + {"matrix": [4, 4], "x": 203, "y": 0, "flags": 4}, + {"matrix": [4, 5], "x": 223, "y": 0, "flags": 1}, + {"matrix": [1, 0], "x": 0, "y": 21, "flags": 1}, + {"matrix": [1, 1], "x": 20, "y": 21, "flags": 4}, + {"matrix": [1, 2], "x": 40, "y": 21, "flags": 4}, + {"matrix": [1, 3], "x": 61, "y": 21, "flags": 4}, + {"matrix": [1, 4], "x": 81, "y": 21, "flags": 4}, + {"matrix": [1, 5], "x": 101, "y": 21, "flags": 4}, + {"matrix": [5, 0], "x": 122, "y": 21, "flags": 4}, + {"matrix": [5, 1], "x": 142, "y": 21, "flags": 4}, + {"matrix": [5, 2], "x": 162, "y": 21, "flags": 4}, + {"matrix": [5, 3], "x": 183, "y": 21, "flags": 4}, + {"matrix": [5, 4], "x": 203, "y": 21, "flags": 4}, + {"matrix": [5, 5], "x": 223, "y": 21, "flags": 1}, + {"matrix": [2, 0], "x": 0, "y": 42, "flags": 1}, + {"matrix": [2, 1], "x": 20, "y": 42, "flags": 4}, + {"matrix": [2, 2], "x": 40, "y": 42, "flags": 4}, + {"matrix": [2, 3], "x": 61, "y": 42, "flags": 4}, + {"matrix": [2, 4], "x": 81, "y": 42, "flags": 4}, + {"matrix": [2, 5], "x": 101, "y": 42, "flags": 4}, + {"matrix": [6, 0], "x": 122, "y": 42, "flags": 4}, + {"matrix": [6, 1], "x": 142, "y": 42, "flags": 4}, + {"matrix": [6, 2], "x": 162, "y": 42, "flags": 4}, + {"matrix": [6, 3], "x": 183, "y": 42, "flags": 4}, + {"matrix": [6, 4], "x": 203, "y": 42, "flags": 4}, + {"matrix": [6, 5], "x": 223, "y": 42, "flags": 1}, + {"matrix": [3, 0], "x": 0, "y": 63, "flags": 1}, + {"matrix": [3, 1], "x": 20, "y": 63, "flags": 1}, + {"matrix": [3, 2], "x": 40, "y": 63, "flags": 1}, + {"matrix": [7, 3], "x": 61, "y": 63, "flags": 1}, + {"matrix": [7, 4], "x": 81, "y": 63, "flags": 1}, + {"matrix": [7, 5], "x": 111, "y": 63, "flags": 4}, + {"matrix": [7, 0], "x": 142, "y": 63, "flags": 1}, + {"matrix": [7, 1], "x": 162, "y": 63, "flags": 1}, + {"matrix": [7, 2], "x": 183, "y": 63, "flags": 1}, + {"matrix": [3, 3], "x": 203, "y": 63, "flags": 1}, + {"matrix": [3, 4], "x": 223, "y": 63, "flags": 1} + ], + "led_flush_limit": 26, + "led_process_limit": 5, + "sleep": true + } +} diff --git a/keyboards/planck/ez/halconf.h b/keyboards/zsa/planck_ez/halconf.h index f1044867f7..f1044867f7 100644 --- a/keyboards/planck/ez/halconf.h +++ b/keyboards/zsa/planck_ez/halconf.h diff --git a/keyboards/zsa/planck_ez/info.json b/keyboards/zsa/planck_ez/info.json new file mode 100644 index 0000000000..eda13449b5 --- /dev/null +++ b/keyboards/zsa/planck_ez/info.json @@ -0,0 +1,157 @@ +{ + "manufacturer": "ZSA Technology Labs", + "maintainer": "drashna", + "audio": { + "driver": "dac_additive" + }, + "bootloader": "stm32-dfu", + "diode_direction": "COL2ROW", + "encoder": { + "rotary": [ + {"pin_a": "B12", "pin_b": "B13"} + ] + }, + "features": { + "audio": true, + "bootmagic": true, + "command": true, + "console": true, + "encoder": true, + "extrakey": true, + "mousekey": true, + "nkro": true + }, + "matrix_pins": { + "cols": ["B11", "B10", "B2", "B1", "A7", "B0"], + "rows": ["A10", "A9", "A8", "B15", "C13", "C14", "C15", "A2"] + }, + "mousekey": { + "delay": 0, + "interval": 20, + "max_speed": 7, + "time_to_max": 60, + "wheel_delay": 400 + }, + "processor": "STM32F303", + "tapping": { + "toggle": 1 + }, + "url": "https://blog.zsa.io/2307-goodbye-planck-ez/", + "usb": { + "device_version": "0.0.1", + "shared_endpoint": { + "mouse": false + }, + "vid": "0x3297" + }, + "community_layouts": ["ortho_4x12", "planck_mit"], + "layout_aliases": { + "LAYOUT_planck_grid": "LAYOUT_ortho_4x12", + "LAYOUT_planck_mit": "LAYOUT_planck_1x2uC" + }, + "layouts": { + "LAYOUT_ortho_4x12": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0}, + {"matrix": [0, 1], "x": 1, "y": 0}, + {"matrix": [0, 2], "x": 2, "y": 0}, + {"matrix": [0, 3], "x": 3, "y": 0}, + {"matrix": [0, 4], "x": 4, "y": 0}, + {"matrix": [0, 5], "x": 5, "y": 0}, + {"matrix": [4, 0], "x": 6, "y": 0}, + {"matrix": [4, 1], "x": 7, "y": 0}, + {"matrix": [4, 2], "x": 8, "y": 0}, + {"matrix": [4, 3], "x": 9, "y": 0}, + {"matrix": [4, 4], "x": 10, "y": 0}, + {"matrix": [4, 5], "x": 11, "y": 0}, + {"matrix": [1, 0], "x": 0, "y": 1}, + {"matrix": [1, 1], "x": 1, "y": 1}, + {"matrix": [1, 2], "x": 2, "y": 1}, + {"matrix": [1, 3], "x": 3, "y": 1}, + {"matrix": [1, 4], "x": 4, "y": 1}, + {"matrix": [1, 5], "x": 5, "y": 1}, + {"matrix": [5, 0], "x": 6, "y": 1}, + {"matrix": [5, 1], "x": 7, "y": 1}, + {"matrix": [5, 2], "x": 8, "y": 1}, + {"matrix": [5, 3], "x": 9, "y": 1}, + {"matrix": [5, 4], "x": 10, "y": 1}, + {"matrix": [5, 5], "x": 11, "y": 1}, + {"matrix": [2, 0], "x": 0, "y": 2}, + {"matrix": [2, 1], "x": 1, "y": 2}, + {"matrix": [2, 2], "x": 2, "y": 2}, + {"matrix": [2, 3], "x": 3, "y": 2}, + {"matrix": [2, 4], "x": 4, "y": 2}, + {"matrix": [2, 5], "x": 5, "y": 2}, + {"matrix": [6, 0], "x": 6, "y": 2}, + {"matrix": [6, 1], "x": 7, "y": 2}, + {"matrix": [6, 2], "x": 8, "y": 2}, + {"matrix": [6, 3], "x": 9, "y": 2}, + {"matrix": [6, 4], "x": 10, "y": 2}, + {"matrix": [6, 5], "x": 11, "y": 2}, + {"matrix": [3, 0], "x": 0, "y": 3}, + {"matrix": [3, 1], "x": 1, "y": 3}, + {"matrix": [3, 2], "x": 2, "y": 3}, + {"matrix": [7, 3], "x": 3, "y": 3}, + {"matrix": [7, 4], "x": 4, "y": 3}, + {"matrix": [7, 5], "x": 5, "y": 3}, + {"matrix": [3, 5], "x": 6, "y": 3}, + {"matrix": [7, 0], "x": 7, "y": 3}, + {"matrix": [7, 1], "x": 8, "y": 3}, + {"matrix": [7, 2], "x": 9, "y": 3}, + {"matrix": [3, 3], "x": 10, "y": 3}, + {"matrix": [3, 4], "x": 11, "y": 3} + ] + }, + "LAYOUT_planck_1x2uC": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0}, + {"matrix": [0, 1], "x": 1, "y": 0}, + {"matrix": [0, 2], "x": 2, "y": 0}, + {"matrix": [0, 3], "x": 3, "y": 0}, + {"matrix": [0, 4], "x": 4, "y": 0}, + {"matrix": [0, 5], "x": 5, "y": 0}, + {"matrix": [4, 0], "x": 6, "y": 0}, + {"matrix": [4, 1], "x": 7, "y": 0}, + {"matrix": [4, 2], "x": 8, "y": 0}, + {"matrix": [4, 3], "x": 9, "y": 0}, + {"matrix": [4, 4], "x": 10, "y": 0}, + {"matrix": [4, 5], "x": 11, "y": 0}, + {"matrix": [1, 0], "x": 0, "y": 1}, + {"matrix": [1, 1], "x": 1, "y": 1}, + {"matrix": [1, 2], "x": 2, "y": 1}, + {"matrix": [1, 3], "x": 3, "y": 1}, + {"matrix": [1, 4], "x": 4, "y": 1}, + {"matrix": [1, 5], "x": 5, "y": 1}, + {"matrix": [5, 0], "x": 6, "y": 1}, + {"matrix": [5, 1], "x": 7, "y": 1}, + {"matrix": [5, 2], "x": 8, "y": 1}, + {"matrix": [5, 3], "x": 9, "y": 1}, + {"matrix": [5, 4], "x": 10, "y": 1}, + {"matrix": [5, 5], "x": 11, "y": 1}, + {"matrix": [2, 0], "x": 0, "y": 2}, + {"matrix": [2, 1], "x": 1, "y": 2}, + {"matrix": [2, 2], "x": 2, "y": 2}, + {"matrix": [2, 3], "x": 3, "y": 2}, + {"matrix": [2, 4], "x": 4, "y": 2}, + {"matrix": [2, 5], "x": 5, "y": 2}, + {"matrix": [6, 0], "x": 6, "y": 2}, + {"matrix": [6, 1], "x": 7, "y": 2}, + {"matrix": [6, 2], "x": 8, "y": 2}, + {"matrix": [6, 3], "x": 9, "y": 2}, + {"matrix": [6, 4], "x": 10, "y": 2}, + {"matrix": [6, 5], "x": 11, "y": 2}, + {"matrix": [3, 0], "x": 0, "y": 3}, + {"matrix": [3, 1], "x": 1, "y": 3}, + {"matrix": [3, 2], "x": 2, "y": 3}, + {"matrix": [7, 3], "x": 3, "y": 3}, + {"matrix": [7, 4], "x": 4, "y": 3}, + {"matrix": [7, 5], "x": 5, "y": 3, "w": 2}, + {"matrix": [7, 0], "x": 7, "y": 3}, + {"matrix": [7, 1], "x": 8, "y": 3}, + {"matrix": [7, 2], "x": 9, "y": 3}, + {"matrix": [3, 3], "x": 10, "y": 3}, + {"matrix": [3, 4], "x": 11, "y": 3} + ] + } + } +} diff --git a/keyboards/zsa/planck_ez/keymaps/default/keymap.json b/keyboards/zsa/planck_ez/keymaps/default/keymap.json new file mode 100644 index 0000000000..4b27cc2970 --- /dev/null +++ b/keyboards/zsa/planck_ez/keymaps/default/keymap.json @@ -0,0 +1,17 @@ +{ + "keyboard": "zsa/planck_ez/base", + "keymap": "default", + "layers": [ + ["KC_TAB", "KC_Q", "KC_W", "KC_E", "KC_R", "KC_T", "KC_Y", "KC_U", "KC_I", "KC_O", "KC_P", "KC_BSPC", "KC_ESC", "KC_A", "KC_S", "KC_D", "KC_F", "KC_G", "KC_H", "KC_J", "KC_K", "KC_L", "KC_SCLN", "KC_QUOT", "KC_LSFT", "KC_Z", "KC_X", "KC_C", "KC_V", "KC_B", "KC_N", "KC_M", "KC_COMM", "KC_DOT", "KC_SLSH", "KC_ENT", "CW_TOGG", "KC_LCTL", "KC_LALT", "KC_LGUI", "TL_LOWR", "KC_SPC", "TL_UPPR", "KC_LEFT", "KC_DOWN", "KC_UP", "KC_RGHT"], + ["KC_TILD", "KC_EXLM", "KC_AT", "KC_HASH", "KC_DLR", "KC_PERC", "KC_CIRC", "KC_AMPR", "KC_ASTR", "KC_LPRN", "KC_RPRN", "KC_BSPC", "KC_DEL", "KC_F1", "KC_F2", "KC_F3", "KC_F4", "KC_F5", "KC_F6", "KC_UNDS", "KC_PLUS", "KC_LCBR", "KC_RCBR", "KC_PIPE", "KC_TRNS", "KC_F7", "KC_F8", "KC_F9", "KC_F10", "KC_F11", "KC_F12", "S(KC_NUHS)", "S(KC_NUBS)", "KC_HOME", "KC_END", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_MNXT", "KC_VOLD", "KC_VOLU", "KC_MPLY"], + ["KC_GRV", "KC_1", "KC_2", "KC_3", "KC_4", "KC_5", "KC_6", "KC_7", "KC_8", "KC_9", "KC_0", "KC_BSPC", "KC_DEL", "KC_F1", "KC_F2", "KC_F3", "KC_F4", "KC_F5", "KC_F6", "KC_MINS", "KC_EQL", "KC_LBRC", "KC_RBRC", "KC_BSLS", "KC_TRNS", "KC_F7", "KC_F8", "KC_F9", "KC_F10", "KC_F11", "KC_F12", "KC_NUHS", "KC_NUBS", "KC_PGUP", "KC_PGDN", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_MNXT", "KC_VOLD", "KC_VOLU", "KC_MPLY"], + ["KC_TRNS", "QK_BOOT", "DB_TOGG", "RGB_TOG", "RGB_MOD", "RGB_HUI", "RGB_HUD", "RGB_SAI", "RGB_SAD", "RGB_VAI", "RGB_VAD", "KC_DEL", "KC_TRNS", "KC_TRNS", "MU_NEXT", "AU_ON", "AU_OFF", "AG_NORM", "AG_SWAP", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "AU_PREV", "AU_NEXT", "MU_ON", "MU_OFF", "MI_ON", "MI_OFF", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS"] + ], + "layout": "LAYOUT_planck_1x2uC", + "config": { + "features": { + "tri_layer": true, + "caps_word": true + } + } +} diff --git a/keyboards/planck/ez/mcuconf.h b/keyboards/zsa/planck_ez/mcuconf.h index 7475b0990c..e29f64dd72 100644 --- a/keyboards/planck/ez/mcuconf.h +++ b/keyboards/zsa/planck_ez/mcuconf.h @@ -35,7 +35,3 @@ #define STM32_DAC_USE_DAC1_CH2 TRUE #undef STM32_GPT_USE_TIM6 #define STM32_GPT_USE_TIM6 TRUE -#undef STM32_GPT_USE_TIM7 -#define STM32_GPT_USE_TIM7 TRUE -#undef STM32_GPT_USE_TIM8 -#define STM32_GPT_USE_TIM8 TRUE diff --git a/keyboards/planck/ez/ez.c b/keyboards/zsa/planck_ez/planck_ez.c index 522fd70033..9c0e911654 100644 --- a/keyboards/planck/ez/ez.c +++ b/keyboards/zsa/planck_ez/planck_ez.c @@ -15,98 +15,13 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "ez.h" +#include "planck_ez.h" #include <ch.h> #include <hal.h> +#include "keycodes.h" keyboard_config_t keyboard_config; -#ifdef RGB_MATRIX_ENABLE -const is31fl3737_led_t PROGMEM g_is31fl3737_leds[IS31FL3737_LED_COUNT] = { -/* Refer to IS31 manual for these locations - * driver - * | R location - * | | G location - * | | | B location - * | | | | */ - {0, SW2_CS12, SW1_CS12, SW3_CS12}, - {0, SW2_CS11, SW1_CS11, SW3_CS11}, - {0, SW2_CS10, SW1_CS10, SW3_CS10}, - {0, SW2_CS9, SW1_CS9, SW3_CS9}, - {0, SW2_CS8, SW1_CS8, SW3_CS8}, - {0, SW2_CS7, SW1_CS7, SW3_CS7}, - - {0, SW8_CS12, SW7_CS12, SW9_CS12}, - {0, SW8_CS11, SW7_CS11, SW9_CS11}, - {0, SW8_CS10, SW7_CS10, SW9_CS10}, - {0, SW8_CS9, SW7_CS9, SW9_CS9}, - {0, SW8_CS8, SW7_CS8, SW9_CS8}, - {0, SW8_CS7, SW7_CS7, SW9_CS7}, - - {0, SW2_CS6, SW1_CS6, SW3_CS6}, - {0, SW2_CS5, SW1_CS5, SW3_CS5}, - {0, SW2_CS4, SW1_CS4, SW3_CS4}, - {0, SW2_CS3, SW1_CS3, SW3_CS3}, - {0, SW2_CS2, SW1_CS2, SW3_CS2}, - {0, SW2_CS1, SW1_CS1, SW3_CS1}, - - {0, SW8_CS6, SW7_CS6, SW9_CS6}, - {0, SW8_CS5, SW7_CS5, SW9_CS5}, - {0, SW8_CS4, SW7_CS4, SW9_CS4}, - {0, SW8_CS3, SW7_CS3, SW9_CS3}, - {0, SW8_CS2, SW7_CS2, SW9_CS2}, - {0, SW8_CS1, SW7_CS1, SW9_CS1}, - - {0, SW5_CS12, SW4_CS12, SW6_CS12}, - {0, SW5_CS11, SW4_CS11, SW6_CS11}, - {0, SW5_CS10, SW4_CS10, SW6_CS10}, - {0, SW5_CS9, SW4_CS9, SW6_CS9}, - {0, SW5_CS8, SW4_CS8, SW6_CS8}, - {0, SW5_CS7, SW4_CS7, SW6_CS7}, - - {0, SW11_CS12, SW10_CS12, SW12_CS12}, - {0, SW11_CS11, SW10_CS11, SW12_CS11}, - {0, SW11_CS10, SW10_CS10, SW12_CS10}, - {0, SW11_CS9, SW10_CS9, SW12_CS9}, - {0, SW11_CS8, SW10_CS8, SW12_CS8}, - {0, SW11_CS7, SW10_CS7, SW12_CS7}, - - {0, SW5_CS6, SW4_CS6, SW6_CS6}, - {0, SW5_CS5, SW4_CS5, SW6_CS5}, - {0, SW5_CS4, SW4_CS4, SW6_CS4}, - {0, SW5_CS3, SW4_CS3, SW6_CS3}, - {0, SW5_CS2, SW4_CS2, SW6_CS2}, - {0, SW5_CS1, SW4_CS1, SW6_CS1}, - - {0, SW11_CS6, SW10_CS6, SW12_CS6}, - {0, SW11_CS5, SW10_CS5, SW12_CS5}, - {0, SW11_CS4, SW10_CS4, SW12_CS4}, - {0, SW11_CS3, SW10_CS3, SW12_CS3}, - {0, SW11_CS2, SW10_CS2, SW12_CS2}, - -}; -led_config_t g_led_config = { { - { 0, 1, 2, 3, 4, 5 }, - { 12, 13, 14, 15, 16, 17 }, - { 24, 25, 26, 27, 28, 29 }, - { 36, 37, 38, 45, 46, NO_LED }, - { 6, 7, 8, 9, 10, 11 }, - { 18, 19, 20, 21, 22, 23 }, - { 30, 31, 32, 33, 34, 35 }, - { 42, 43, 44, 39, 40, 41 } -}, { - { 0, 0 }, { 20, 0 }, { 40, 0 }, { 61, 0 }, { 81, 0 }, { 101, 0 }, { 122, 0 }, { 142, 0 }, { 162, 0 }, { 183, 0 }, { 203, 0 }, { 223, 0 }, - { 0, 21 }, { 20, 21 }, { 40, 21 }, { 61, 21 }, { 81, 21 }, { 101, 21 }, { 122, 21 }, { 142, 21 }, { 162, 21 }, { 183, 21 }, { 203, 21 }, { 223, 21 }, - { 0, 42 }, { 20, 42 }, { 40, 42 }, { 61, 42 }, { 81, 42 }, { 101, 42 }, { 122, 42 }, { 142, 42 }, { 162, 42 }, { 183, 42 }, { 203, 42 }, { 223, 42 }, - { 0, 63 }, { 20, 63 }, { 40, 63 }, { 61, 63 }, { 81, 63 }, { 111, 63 }, { 142, 63 }, { 162, 63 }, { 183, 63 }, { 203, 63 }, { 223, 63 } -}, { - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 1, 1, 1, 1, 4, 1, 1, 1, 1, 1 -} }; - -#endif /* Left B9 Right B8 */ @@ -236,13 +151,13 @@ void eeconfig_init_kb(void) { // EEPROM is getting reset! #ifndef PLANCK_EZ_USER_LEDS #ifndef PLANCK_EZ_LED_LOWER -# define PLANCK_EZ_LED_LOWER 3 +# define PLANCK_EZ_LED_LOWER 1 #endif #ifndef PLANCK_EZ_LED_RAISE -# define PLANCK_EZ_LED_RAISE 4 +# define PLANCK_EZ_LED_RAISE 2 #endif #ifndef PLANCK_EZ_LED_ADJUST -# define PLANCK_EZ_LED_ADJUST 6 +# define PLANCK_EZ_LED_ADJUST 3 #endif layer_state_t layer_state_set_kb(layer_state_t state) { @@ -331,6 +246,8 @@ bool music_mask_kb(uint16_t keycode) { case AU_ON ... AU_PREV: case QK_BOOT: case QK_CLEAR_EEPROM: + case QK_TRI_LAYER_LOWER: + case QK_TRI_LAYER_UPPER: return false; default: return music_mask_user(keycode); @@ -345,7 +262,7 @@ const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { {{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, 3}, {4, 3}, {3, 3}, {2, 3}, {1, 3}, {0, 3}}, - + {{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}}, diff --git a/keyboards/planck/ez/ez.h b/keyboards/zsa/planck_ez/planck_ez.h index 695b14d9ad..695b14d9ad 100644 --- a/keyboards/planck/ez/ez.h +++ b/keyboards/zsa/planck_ez/planck_ez.h diff --git a/keyboards/planck/ez/readme.md b/keyboards/zsa/planck_ez/readme.md index f85ab59693..d76a01cb25 100644 --- a/keyboards/planck/ez/readme.md +++ b/keyboards/zsa/planck_ez/readme.md @@ -6,15 +6,15 @@ A variant of the Planck featuring a 2u spacebar and per-key RGB backlighting. Keyboard Maintainer: [Jack Humbert](https://github.com/jackhumbert), [Drashna Jael're](https://github.com/drashna) Hardware Supported: Planck EZ -Hardware Availability: [ZSA](https://www.zsa.io/planck/) +Hardware Availability: [ZSA](https://www.zsa.io/planck/) (discontinued) Make example for this keyboard (after setting up your build environment): - make planck/ez:oryx + make zsa/planck_ez/base:default For the per key RGB version of this keyboard, you want to use the "glow" subdirectory. For example: - make planck/ez/glow:oryx + make zsa/planck_ez/glow: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). @@ -22,30 +22,30 @@ See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_to To enable the features from Oryx (ZSA's Configurator), either compile the the `oryx` keymap, or add `#define ORYX_CONFIGURATOR` to your `config.h` file. -This enables the front Indicator LEDs, and the `TOGGLE_LAYER_COLOR`, and `LED_LEVEL` keycodes. The `TOGGLE_LAYER_COLOR` keycode toggles the customized LED map configured on Oryx. The `LED_LEVEL` cycles through the brightness levels for the front "teeth" LEDs. +This enables the front Indicator LEDs, and the `TOGGLE_LAYER_COLOR`, and `LED_LEVEL` keycodes. The `TOGGLE_LAYER_COLOR` keycode toggles the customized LED map configured on Oryx. The `LED_LEVEL` cycles through the brightness levels for the front "teeth" LEDs. ### Indicator LEDs The two front "teeth" LED indicators are PWM controlled. If you have `ORYX_CONFIGURATOR` defined in your keymap's `config.h`, you can use the `LED_LEVEL` to cycle through preset vales (0, 25%, 50%, 75%, 100%), and will be saved to EEPROM (persistent storage) -Alternatively, you can set the brightness by calling the following functions: +Alternatively, you can set the brightness by calling the following functions: ```c void planck_ez_right_led_level(uint8_t level); void planck_ez_left_led_level(uint8_t level); ``` -These settings are not persistent, so you'd need to reset it every time the board starts. +These settings are not persistent, so you'd need to reset it every time the board starts. -These are on a 0-255 scale +These are on a 0-255 scale -#### Layer indication +#### Layer indication -By default, the indicator lights are used for layer indication, expecting the specific layers used in the default keymap. However, this may not work for you. And if that is the case, you can add `#define PLANCK_EZ_USER_LEDS` to your `config.h` file. +By default, the indicator lights are used for layer indication, expecting the specific layers used in the default keymap. However, this may not work for you. And if that is the case, you can add `#define PLANCK_EZ_USER_LEDS` to your `config.h` file. -This will remove the default behavior for changing the LEDs based on layer, and allow you to control them manually. +This will remove the default behavior for changing the LEDs based on layer, and allow you to control them manually. -Alternatively, you can use the following defines in your keymap's `config.h` to control which layers are used, as long as you have `ORYX_CONFIGURATOR` defined in your keymap's `config.h` file, as well. +Alternatively, you can use the following defines in your keymap's `config.h` to control which layers are used, as long as you have `ORYX_CONFIGURATOR` defined in your keymap's `config.h` file, as well. ```c #define PLANCK_EZ_LED_LOWER 3 @@ -57,8 +57,8 @@ This will allow you to change the layers that are used, without having to add an ### RGB Matrix Features -If you're using the Smart LED (layer indication) feature from the Oryx Configurator, you want to make sure that you enable these options by adding `#define ORYX_CONFIGURATOR` to your keymap's `config.h`. +If you're using the Smart LED (layer indication) feature from the Oryx Configurator, you want to make sure that you enable these options by adding `#define ORYX_CONFIGURATOR` to your keymap's `config.h`. -This changes the `RGB_TOG` keycode so that it will toggle the lights on and off, in a way that will allow the Smart LEDs to continue to work, even with the rest of the LEDs turned off. +This changes the `RGB_TOG` keycode so that it will toggle the lights on and off, in a way that will allow the Smart LEDs to continue to work, even with the rest of the LEDs turned off. Additionally, a new keycode has been added to toggle the Smart LEDs. Use `TOGGLE_LAYER_COLOR`, if you aren't already. diff --git a/keyboards/planck/ez/rules.mk b/keyboards/zsa/planck_ez/rules.mk index ef20f95b65..67921c96ed 100644 --- a/keyboards/planck/ez/rules.mk +++ b/keyboards/zsa/planck_ez/rules.mk @@ -1,4 +1,4 @@ RGBLIGHT_SUPPORTED = no BAKCLIGHT_SUPPORTED = no -DEFAULT_FOLDER = planck/ez/base +DEFAULT_FOLDER = zsa/planck_ez/base diff --git a/keyboards/zsa/voyager/voyager.c b/keyboards/zsa/voyager/voyager.c index 3255f25a97..69d42bba1a 100644 --- a/keyboards/zsa/voyager/voyager.c +++ b/keyboards/zsa/voyager/voyager.c @@ -21,18 +21,26 @@ static uint32_t dynamic_macro_led(uint32_t trigger_time, void *cb_arg) { return 100; } -void dynamic_macro_record_start_user(int8_t direction) { +bool dynamic_macro_record_start_kb(int8_t direction) { + if (!dynamic_macro_record_start_user(direction)) { + return false; + } if (dynamic_macro_token == INVALID_DEFERRED_TOKEN) { STATUS_LED_3(true); dynamic_macro_token = defer_exec(100, dynamic_macro_led, NULL); } + return true; } -void dynamic_macro_record_end_user(int8_t direction) { +bool dynamic_macro_record_end_kb(int8_t direction) { + if (!dynamic_macro_record_end_user(direction)) { + return false; + } if (cancel_deferred_exec(dynamic_macro_token)) { dynamic_macro_token = INVALID_DEFERRED_TOKEN; STATUS_LED_3(false); } + return true; } # endif diff --git a/keyboards/zvecr/split_blackpill/keyboard.json b/keyboards/zvecr/split_blackpill/keyboard.json index 71eb99b7d4..d22914d3bd 100644 --- a/keyboards/zvecr/split_blackpill/keyboard.json +++ b/keyboards/zvecr/split_blackpill/keyboard.json @@ -26,7 +26,10 @@ "handedness": { "pin": "B3" }, - "soft_serial_pin": "B6", + "serial": { + "driver": "usart", + "pin": "B6" + }, "bootmagic": { "matrix": [4, 0] }, diff --git a/keyboards/zvecr/split_blackpill/rules.mk b/keyboards/zvecr/split_blackpill/rules.mk deleted file mode 100644 index c6e2988321..0000000000 --- a/keyboards/zvecr/split_blackpill/rules.mk +++ /dev/null @@ -1 +0,0 @@ -SERIAL_DRIVER = usart diff --git a/keyboards/zvecr/zv48/f401/rules.mk b/keyboards/zvecr/zv48/f401/rules.mk deleted file mode 100644 index c6e2988321..0000000000 --- a/keyboards/zvecr/zv48/f401/rules.mk +++ /dev/null @@ -1 +0,0 @@ -SERIAL_DRIVER = usart diff --git a/keyboards/zvecr/zv48/f411/rules.mk b/keyboards/zvecr/zv48/f411/rules.mk deleted file mode 100644 index c6e2988321..0000000000 --- a/keyboards/zvecr/zv48/f411/rules.mk +++ /dev/null @@ -1 +0,0 @@ -SERIAL_DRIVER = usart diff --git a/keyboards/zvecr/zv48/info.json b/keyboards/zvecr/zv48/info.json index e596eb6e79..39a05a61e6 100644 --- a/keyboards/zvecr/zv48/info.json +++ b/keyboards/zvecr/zv48/info.json @@ -50,12 +50,15 @@ }, "split": { "enabled": true, + "bootmagic": { + "matrix": [4, 0] + }, "handedness": { "pin": "B9" }, - "soft_serial_pin": "B6", - "bootmagic": { - "matrix": [4, 0] + "serial": { + "driver": "usart", + "pin": "B6" }, "matrix_pins": { "right": { diff --git a/lib/python/qmk/cli/__init__.py b/lib/python/qmk/cli/__init__.py index f331445870..0baf19a629 100644 --- a/lib/python/qmk/cli/__init__.py +++ b/lib/python/qmk/cli/__init__.py @@ -58,6 +58,7 @@ subcommands = [ 'qmk.cli.generate.keyboard_h', 'qmk.cli.generate.keycodes', 'qmk.cli.generate.keycodes_tests', + 'qmk.cli.generate.keymap_h', 'qmk.cli.generate.make_dependencies', 'qmk.cli.generate.rgb_breathe_table', 'qmk.cli.generate.rules_mk', diff --git a/lib/python/qmk/cli/generate/config_h.py b/lib/python/qmk/cli/generate/config_h.py index fc681300a3..d613f7b92c 100755 --- a/lib/python/qmk/cli/generate/config_h.py +++ b/lib/python/qmk/cli/generate/config_h.py @@ -135,8 +135,8 @@ def generate_encoder_config(encoder_json, config_h_lines, postfix=''): b_pads.append(encoder["pin_b"]) resolutions.append(encoder.get("resolution", None)) - config_h_lines.append(generate_define(f'ENCODERS_PAD_A{postfix}', f'{{ {", ".join(a_pads)} }}')) - config_h_lines.append(generate_define(f'ENCODERS_PAD_B{postfix}', f'{{ {", ".join(b_pads)} }}')) + config_h_lines.append(generate_define(f'ENCODER_A_PINS{postfix}', f'{{ {", ".join(a_pads)} }}')) + config_h_lines.append(generate_define(f'ENCODER_B_PINS{postfix}', f'{{ {", ".join(b_pads)} }}')) if None in resolutions: cli.log.debug(f"Unable to generate ENCODER_RESOLUTION{postfix} configuration") diff --git a/lib/python/qmk/cli/generate/keyboard_c.py b/lib/python/qmk/cli/generate/keyboard_c.py index 5a6c967486..228b320942 100755 --- a/lib/python/qmk/cli/generate/keyboard_c.py +++ b/lib/python/qmk/cli/generate/keyboard_c.py @@ -6,7 +6,7 @@ from qmk.info import info_json from qmk.commands import dump_lines from qmk.keyboard import keyboard_completer, keyboard_folder from qmk.path import normpath -from qmk.constants import GPL2_HEADER_C_LIKE, GENERATED_HEADER_C_LIKE +from qmk.constants import GPL2_HEADER_C_LIKE, GENERATED_HEADER_C_LIKE, JOYSTICK_AXES def _gen_led_configs(info_data): @@ -91,6 +91,41 @@ def _gen_matrix_mask(info_data): return lines +def _gen_joystick_axes(info_data): + """Convert info.json content to joystick_axes + """ + if 'axes' not in info_data.get('joystick', {}): + return [] + + axes = info_data['joystick']['axes'] + axes_keys = list(axes.keys()) + + lines = [] + lines.append('#ifdef JOYSTICK_ENABLE') + lines.append('joystick_config_t joystick_axes[JOYSTICK_AXIS_COUNT] = {') + + # loop over all available axes - injecting virtual axis for those not specified + for index, cur in enumerate(JOYSTICK_AXES): + # bail out if we have generated all requested axis + if len(axes_keys) == 0: + break + + axis = 'virtual' + if cur in axes: + axis = axes[cur] + axes_keys.remove(cur) + + if axis == 'virtual': + lines.append(f" [{index}] = JOYSTICK_AXIS_VIRTUAL,") + else: + lines.append(f" [{index}] = JOYSTICK_AXIS_IN({axis['input_pin']}, {axis['low']}, {axis['rest']}, {axis['high']}),") + + lines.append('};') + lines.append('#endif') + + return lines + + @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 keyboard.c for.') @@ -105,6 +140,7 @@ def generate_keyboard_c(cli): keyboard_h_lines.extend(_gen_led_configs(kb_info_json)) keyboard_h_lines.extend(_gen_matrix_mask(kb_info_json)) + keyboard_h_lines.extend(_gen_joystick_axes(kb_info_json)) # Show the results dump_lines(cli.args.output, keyboard_h_lines, cli.args.quiet) diff --git a/lib/python/qmk/cli/generate/keymap_h.py b/lib/python/qmk/cli/generate/keymap_h.py new file mode 100644 index 0000000000..a3aaa405c0 --- /dev/null +++ b/lib/python/qmk/cli/generate/keymap_h.py @@ -0,0 +1,51 @@ +from argcomplete.completers import FilesCompleter + +from milc import cli + +import qmk.path +from qmk.commands import dump_lines +from qmk.commands import parse_configurator_json +from qmk.constants import GPL2_HEADER_C_LIKE, GENERATED_HEADER_C_LIKE + + +def _generate_keycodes_function(keymap_json): + """Generates keymap level keycodes. + """ + lines = [] + lines.append('enum keymap_keycodes {') + + for index, item in enumerate(keymap_json.get('keycodes', [])): + key = item["key"] + if index == 0: + lines.append(f' {key} = QK_USER_0,') + else: + lines.append(f' {key},') + + lines.append('};') + + for item in keymap_json.get('keycodes', []): + key = item["key"] + for alias in item.get("aliases", []): + lines.append(f'#define {alias} {key}') + + return lines + + [email protected]('-o', '--output', arg_only=True, type=qmk.path.normpath, help='File to write to') [email protected]('-q', '--quiet', arg_only=True, action='store_true', help="Quiet mode, only output error messages") [email protected]('filename', type=qmk.path.FileType('r'), arg_only=True, completer=FilesCompleter('.json'), help='Configurator JSON file') [email protected]('Creates a keymap.h from a QMK Configurator export.') +def generate_keymap_h(cli): + """Creates a keymap.h from a QMK Configurator export + """ + if cli.args.output and cli.args.output.name == '-': + cli.args.output = None + + keymap_h_lines = [GPL2_HEADER_C_LIKE, GENERATED_HEADER_C_LIKE, '#pragma once', '// clang-format off'] + + keymap_json = parse_configurator_json(cli.args.filename) + + if 'keycodes' in keymap_json and keymap_json['keycodes'] is not None: + keymap_h_lines += _generate_keycodes_function(keymap_json) + + dump_lines(cli.args.output, keymap_h_lines, cli.args.quiet) diff --git a/lib/python/qmk/commands.py b/lib/python/qmk/commands.py index 459858ab2c..97d9c5032c 100644 --- a/lib/python/qmk/commands.py +++ b/lib/python/qmk/commands.py @@ -113,7 +113,9 @@ def dump_lines(output_file, lines, quiet=True): cli.log.info(f'No changes to {output_file.name}.') return output_file.replace(output_file.parent / (output_file.name + '.bak')) - output_file.write_text(generated, encoding='utf-8') + with open(output_file, 'w', encoding='utf-8', newline='\n') as f: + f.write(generated) + # output_file.write_text(generated, encoding='utf-8', newline='\n') # `newline` needs Python 3.10 if not quiet: cli.log.info(f'Wrote {output_file.name} to {output_file}.') diff --git a/lib/python/qmk/constants.py b/lib/python/qmk/constants.py index 90e4452f2b..b6f46180b2 100644 --- a/lib/python/qmk/constants.py +++ b/lib/python/qmk/constants.py @@ -320,3 +320,5 @@ LICENSE_TEXTS = [ you may not use this file except in compliance with the License. """]), ] + +JOYSTICK_AXES = ['x', 'y', 'z', 'rx', 'ry', 'rz'] diff --git a/lib/python/qmk/info.py b/lib/python/qmk/info.py index e295c5cfe0..72b19a9fec 100644 --- a/lib/python/qmk/info.py +++ b/lib/python/qmk/info.py @@ -7,7 +7,7 @@ from dotty_dict import dotty from milc import cli -from qmk.constants import COL_LETTERS, ROW_LETTERS, CHIBIOS_PROCESSORS, LUFA_PROCESSORS, VUSB_PROCESSORS +from qmk.constants import COL_LETTERS, ROW_LETTERS, CHIBIOS_PROCESSORS, LUFA_PROCESSORS, VUSB_PROCESSORS, JOYSTICK_AXES from qmk.c_parse import find_layouts, parse_config_h_file, find_led_config from qmk.json_schema import deep_update, json_load, validate from qmk.keyboard import config_h, rules_mk @@ -249,8 +249,9 @@ def info_json(keyboard, force_layout=None): info_data = _extract_rules_mk(info_data, rules_mk(str(keyboard))) info_data = _extract_config_h(info_data, config_h(str(keyboard))) - # Ensure that we have matrix row and column counts + # Ensure that we have various calculated values info_data = _matrix_size(info_data) + info_data = _joystick_axis_count(info_data) # Merge in data from <keyboard.c> info_data = _extract_led_config(info_data, str(keyboard)) @@ -379,8 +380,8 @@ def _extract_audio(info_data, config_c): def _extract_encoders_values(config_c, postfix=''): """Common encoder extraction logic """ - a_pad = config_c.get(f'ENCODERS_PAD_A{postfix}', '').replace(' ', '')[1:-1] - b_pad = config_c.get(f'ENCODERS_PAD_B{postfix}', '').replace(' ', '')[1:-1] + a_pad = config_c.get(f'ENCODER_A_PINS{postfix}', '').replace(' ', '')[1:-1] + b_pad = config_c.get(f'ENCODER_B_PINS{postfix}', '').replace(' ', '')[1:-1] resolutions = config_c.get(f'ENCODER_RESOLUTIONS{postfix}', '').replace(' ', '')[1:-1] default_resolution = config_c.get('ENCODER_RESOLUTION', None) @@ -465,6 +466,14 @@ def _extract_split_handedness(info_data, config_c): split['handedness']['matrix_grid'] = split.pop('matrix_grid') +def _extract_split_serial(info_data, config_c): + # Migrate + split = info_data.get('split', {}) + if 'soft_serial_pin' in split: + split['serial'] = split.get('serial', {}) + split['serial']['pin'] = split.pop('soft_serial_pin') + + def _extract_split_transport(info_data, config_c): # Figure out the transport method if config_c.get('USE_I2C') is True: @@ -660,6 +669,7 @@ def _extract_config_h(info_data, config_c): _extract_audio(info_data, config_c) _extract_secure_unlock(info_data, config_c) _extract_split_handedness(info_data, config_c) + _extract_split_serial(info_data, config_c) _extract_split_transport(info_data, config_c) _extract_split_right_pins(info_data, config_c) _extract_encoders(info_data, config_c) @@ -805,6 +815,16 @@ def _matrix_size(info_data): return info_data +def _joystick_axis_count(info_data): + """Add info_data['joystick.axis_count'] if required + """ + if 'axes' in info_data.get('joystick', {}): + axes_keys = info_data['joystick']['axes'].keys() + info_data['joystick']['axis_count'] = max(JOYSTICK_AXES.index(a) for a in axes_keys) + 1 if axes_keys else 0 + + return info_data + + def _check_matrix(info_data): """Check the matrix to ensure that row/column count is consistent. """ diff --git a/lib/python/qmk/keymap.py b/lib/python/qmk/keymap.py index 91075f1bdc..97c358788a 100644 --- a/lib/python/qmk/keymap.py +++ b/lib/python/qmk/keymap.py @@ -19,6 +19,9 @@ from qmk.info import info_json # The `keymap.c` template to use when a keyboard doesn't have its own DEFAULT_KEYMAP_C = """#include QMK_KEYBOARD_H +#if __has_include("keymap.h") +# include "keymap.h" +#endif __INCLUDES__ /* THIS FILE WAS GENERATED! @@ -26,8 +29,6 @@ __INCLUDES__ * This file was generated by qmk json2c. You may or may not want to * edit it directly. */ -__KEYCODE_OUTPUT_GOES_HERE__ - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { __KEYMAP_GOES_HERE__ }; @@ -39,7 +40,6 @@ __ENCODER_MAP_GOES_HERE__ #endif // defined(ENCODER_ENABLE) && defined(ENCODER_MAP_ENABLE) __MACRO_OUTPUT_GOES_HERE__ - """ @@ -50,7 +50,7 @@ def _generate_keymap_table(keymap_json): lines[-1] = lines[-1] + ',' layer = map(_strip_any, layer) layer_keys = ', '.join(layer) - lines.append('\t[%s] = %s(%s)' % (layer_num, keymap_json['layout'], layer_keys)) + lines.append(' [%s] = %s(%s)' % (layer_num, keymap_json['layout'], layer_keys)) return lines @@ -60,7 +60,7 @@ def _generate_encodermap_table(keymap_json): if layer_num != 0: lines[-1] = lines[-1] + ',' encoder_keycode_txt = ', '.join([f'ENCODER_CCW_CW({_strip_any(e["ccw"])}, {_strip_any(e["cw"])})' for e in layer]) - lines.append('\t[%s] = {%s}' % (layer_num, encoder_keycode_txt)) + lines.append(' [%s] = {%s}' % (layer_num, encoder_keycode_txt)) return lines @@ -125,64 +125,6 @@ def _generate_macros_function(keymap_json): return macro_txt -def _generate_keycodes_function(keymap_json): - """Generates keymap level keycodes. - """ - lines = [] - lines.append('enum keymap_keycodes {') - - for index, item in enumerate(keymap_json.get('keycodes', [])): - key = item["key"] - if index == 0: - lines.append(f' {key} = QK_USER_0,') - else: - lines.append(f' {key},') - - lines.append('};') - - for item in keymap_json.get('keycodes', []): - key = item["key"] - for alias in item.get("aliases", []): - lines.append(f'#define {alias} {key}') - - return lines - - -def template_json(keyboard): - """Returns a `keymap.json` template for a keyboard. - - If a template exists in `keyboards/<keyboard>/templates/keymap.json` that text will be used instead of an empty dictionary. - - Args: - keyboard - The keyboard to return a template for. - """ - template_file = Path('keyboards/%s/templates/keymap.json' % keyboard) - template = {'keyboard': keyboard} - if template_file.exists(): - template.update(json.load(template_file.open(encoding='utf-8'))) - - return template - - -def template_c(keyboard): - """Returns a `keymap.c` template for a keyboard. - - If a template exists in `keyboards/<keyboard>/templates/keymap.c` that text will be used instead of an empty dictionary. - - Args: - keyboard - The keyboard to return a template for. - """ - template_file = Path('keyboards/%s/templates/keymap.c' % keyboard) - if template_file.exists(): - template = template_file.read_text(encoding='utf-8') - else: - template = DEFAULT_KEYMAP_C - - return template - - def _strip_any(keycode): """Remove ANY() from a keycode. """ @@ -301,7 +243,7 @@ def generate_json(keymap, keyboard, layout, layers, macros=None): macros A sequence of strings containing macros to implement for this keyboard. """ - new_keymap = template_json(keyboard) + new_keymap = {'keyboard': keyboard} new_keymap['keymap'] = keymap new_keymap['layout'] = layout new_keymap['layers'] = layers @@ -328,7 +270,7 @@ def generate_c(keymap_json): macros A sequence of strings containing macros to implement for this keyboard. """ - new_keymap = template_c(keymap_json['keyboard']) + new_keymap = DEFAULT_KEYMAP_C layer_txt = _generate_keymap_table(keymap_json) keymap = '\n'.join(layer_txt) new_keymap = new_keymap.replace('__KEYMAP_GOES_HERE__', keymap) @@ -350,12 +292,6 @@ def generate_c(keymap_json): hostlang = f'#include "keymap_{keymap_json["host_language"]}.h"\n#include "sendstring_{keymap_json["host_language"]}.h"\n' new_keymap = new_keymap.replace('__INCLUDES__', hostlang) - keycodes = '' - if 'keycodes' in keymap_json and keymap_json['keycodes'] is not None: - keycodes_txt = _generate_keycodes_function(keymap_json) - keycodes = '\n'.join(keycodes_txt) - new_keymap = new_keymap.replace('__KEYCODE_OUTPUT_GOES_HERE__', keycodes) - return new_keymap diff --git a/lib/python/qmk/tests/test_cli_commands.py b/lib/python/qmk/tests/test_cli_commands.py index 8b50d1c340..2b3d6f4049 100644 --- a/lib/python/qmk/tests/test_cli_commands.py +++ b/lib/python/qmk/tests/test_cli_commands.py @@ -142,9 +142,33 @@ def test_list_keymaps_no_keyboard_found(): def test_json2c(): - result = check_subcommand('json2c', 'keyboards/handwired/pytest/has_template/keymaps/default_json/keymap.json') + result = check_subcommand('json2c', 'keyboards/handwired/pytest/basic/keymaps/default_json/keymap.json') check_returncode(result) - assert result.stdout == '#include QMK_KEYBOARD_H\nconst uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {\t[0] = LAYOUT_ortho_1x1(KC_A)};\n\n\n' + assert result.stdout == """#include QMK_KEYBOARD_H +#if __has_include("keymap.h") +# include "keymap.h" +#endif + + +/* THIS FILE WAS GENERATED! + * + * This file was generated by qmk json2c. You may or may not want to + * edit it directly. + */ +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_ortho_1x1(KC_A) +}; + +#if defined(ENCODER_ENABLE) && defined(ENCODER_MAP_ENABLE) +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { + +}; +#endif // defined(ENCODER_ENABLE) && defined(ENCODER_MAP_ENABLE) + + + + +""" def test_json2c_macros(): @@ -156,9 +180,33 @@ def test_json2c_macros(): def test_json2c_stdin(): - result = check_subcommand_stdin('keyboards/handwired/pytest/has_template/keymaps/default_json/keymap.json', 'json2c', '-') + result = check_subcommand_stdin('keyboards/handwired/pytest/basic/keymaps/default_json/keymap.json', 'json2c', '-') check_returncode(result) - assert result.stdout == '#include QMK_KEYBOARD_H\nconst uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {\t[0] = LAYOUT_ortho_1x1(KC_A)};\n\n\n' + assert result.stdout == """#include QMK_KEYBOARD_H +#if __has_include("keymap.h") +# include "keymap.h" +#endif + + +/* THIS FILE WAS GENERATED! + * + * This file was generated by qmk json2c. You may or may not want to + * edit it directly. + */ +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_ortho_1x1(KC_A) +}; + +#if defined(ENCODER_ENABLE) && defined(ENCODER_MAP_ENABLE) +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { + +}; +#endif // defined(ENCODER_ENABLE) && defined(ENCODER_MAP_ENABLE) + + + + +""" def test_json2c_wrong_json(): @@ -223,27 +271,15 @@ def test_info_matrix_render(): def test_c2json(): - result = check_subcommand("c2json", "-kb", "handwired/pytest/has_template", "-km", "default", "keyboards/handwired/pytest/has_template/keymaps/default/keymap.c") + result = check_subcommand("c2json", "-kb", "handwired/pytest/basic", "-km", "default", "keyboards/handwired/pytest/basic/keymaps/default/keymap.c") check_returncode(result) - assert result.stdout.strip() == '{"keyboard": "handwired/pytest/has_template", "documentation": "This file is a keymap.json file for handwired/pytest/has_template", "keymap": "default", "layout": "LAYOUT_ortho_1x1", "layers": [["KC_A"]]}' - - -def test_c2json_nocpp(): - result = check_subcommand("c2json", "--no-cpp", "-kb", "handwired/pytest/has_template", "-km", "default", "keyboards/handwired/pytest/has_template/keymaps/nocpp/keymap.c") - check_returncode(result) - assert result.stdout.strip() == '{"keyboard": "handwired/pytest/has_template", "documentation": "This file is a keymap.json file for handwired/pytest/has_template", "keymap": "default", "layout": "LAYOUT", "layers": [["KC_ENTER"]]}' + assert result.stdout.strip() == '{"keyboard": "handwired/pytest/basic", "keymap": "default", "layout": "LAYOUT_ortho_1x1", "layers": [["KC_A"]]}' def test_c2json_stdin(): - result = check_subcommand_stdin("keyboards/handwired/pytest/has_template/keymaps/default/keymap.c", "c2json", "-kb", "handwired/pytest/has_template", "-km", "default", "-") - check_returncode(result) - assert result.stdout.strip() == '{"keyboard": "handwired/pytest/has_template", "documentation": "This file is a keymap.json file for handwired/pytest/has_template", "keymap": "default", "layout": "LAYOUT_ortho_1x1", "layers": [["KC_A"]]}' - - -def test_c2json_nocpp_stdin(): - result = check_subcommand_stdin("keyboards/handwired/pytest/has_template/keymaps/nocpp/keymap.c", "c2json", "--no-cpp", "-kb", "handwired/pytest/has_template", "-km", "default", "-") + result = check_subcommand_stdin("keyboards/handwired/pytest/basic/keymaps/default/keymap.c", "c2json", "-kb", "handwired/pytest/basic", "-km", "default", "-") check_returncode(result) - assert result.stdout.strip() == '{"keyboard": "handwired/pytest/has_template", "documentation": "This file is a keymap.json file for handwired/pytest/has_template", "keymap": "default", "layout": "LAYOUT", "layers": [["KC_ENTER"]]}' + assert result.stdout.strip() == '{"keyboard": "handwired/pytest/basic", "keymap": "default", "layout": "LAYOUT_ortho_1x1", "layers": [["KC_A"]]}' def test_clean(): diff --git a/lib/python/qmk/tests/test_qmk_keymap.py b/lib/python/qmk/tests/test_qmk_keymap.py index 5e2efc1232..7482848eff 100644 --- a/lib/python/qmk/tests/test_qmk_keymap.py +++ b/lib/python/qmk/tests/test_qmk_keymap.py @@ -1,40 +1,42 @@ import qmk.keymap -def test_template_c_pytest_basic(): - templ = qmk.keymap.template_c('handwired/pytest/basic') - assert templ == qmk.keymap.DEFAULT_KEYMAP_C - - -def test_template_json_pytest_basic(): - templ = qmk.keymap.template_json('handwired/pytest/basic') - assert templ == {'keyboard': 'handwired/pytest/basic'} - - -def test_template_c_pytest_has_template(): - templ = qmk.keymap.template_c('handwired/pytest/has_template') - assert templ == '#include QMK_KEYBOARD_H\nconst uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {__KEYMAP_GOES_HERE__};\n' - - -def test_template_json_pytest_has_template(): - templ = qmk.keymap.template_json('handwired/pytest/has_template') - assert templ == {'keyboard': 'handwired/pytest/has_template', "documentation": "This file is a keymap.json file for handwired/pytest/has_template"} - - -def test_generate_c_pytest_has_template(): +def test_generate_c_pytest_basic(): keymap_json = { - 'keyboard': 'handwired/pytest/has_template', + 'keyboard': 'handwired/pytest/basic', 'layout': 'LAYOUT', 'layers': [['KC_A']], 'macros': None, } templ = qmk.keymap.generate_c(keymap_json) - assert templ == '#include QMK_KEYBOARD_H\nconst uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {\t[0] = LAYOUT(KC_A)};\n' + assert templ == """#include QMK_KEYBOARD_H +#if __has_include("keymap.h") +# include "keymap.h" +#endif + + +/* THIS FILE WAS GENERATED! + * + * This file was generated by qmk json2c. You may or may not want to + * edit it directly. + */ +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT(KC_A) +}; + +#if defined(ENCODER_ENABLE) && defined(ENCODER_MAP_ENABLE) +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { + +}; +#endif // defined(ENCODER_ENABLE) && defined(ENCODER_MAP_ENABLE) + + +""" -def test_generate_json_pytest_has_template(): - templ = qmk.keymap.generate_json('default', 'handwired/pytest/has_template', 'LAYOUT', [['KC_A']]) - assert templ == {"keyboard": "handwired/pytest/has_template", "documentation": "This file is a keymap.json file for handwired/pytest/has_template", "keymap": "default", "layout": "LAYOUT", "layers": [["KC_A"]]} +def test_generate_json_pytest_basic(): + templ = qmk.keymap.generate_json('default', 'handwired/pytest/basic', 'LAYOUT', [['KC_A']]) + assert templ == {"keyboard": "handwired/pytest/basic", "keymap": "default", "layout": "LAYOUT", "layers": [["KC_A"]]} def test_parse_keymap_c(): diff --git a/platforms/arm_atsam/hardware_id.c b/platforms/arm_atsam/hardware_id.c index 8b3b35a492..fc193e46d8 100644 --- a/platforms/arm_atsam/hardware_id.c +++ b/platforms/arm_atsam/hardware_id.c @@ -3,7 +3,7 @@ #include "hardware_id.h" -hardware_id_t get_hardware_id(void) { +__attribute__((weak)) hardware_id_t get_hardware_id(void) { hardware_id_t id = {0}; return id; } diff --git a/platforms/avr/hardware_id.c b/platforms/avr/hardware_id.c index b61f0d92df..302a800e0b 100644 --- a/platforms/avr/hardware_id.c +++ b/platforms/avr/hardware_id.c @@ -10,7 +10,7 @@ #include <avr/boot.h> #include "hardware_id.h" -hardware_id_t get_hardware_id(void) { +__attribute__((weak)) hardware_id_t get_hardware_id(void) { hardware_id_t id = {0}; for (uint8_t i = 0; i < 10; i += 1) { ((uint8_t*)&id)[i] = boot_signature_byte_get(i + 0x0E); diff --git a/platforms/chibios/boards/common/ld/STM32F405xG_tinyuf2.ld b/platforms/chibios/boards/common/ld/STM32F405xG_tinyuf2.ld new file mode 100644 index 0000000000..1ee4aa1a06 --- /dev/null +++ b/platforms/chibios/boards/common/ld/STM32F405xG_tinyuf2.ld @@ -0,0 +1,89 @@ +/* + 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. +*/ + +/* + * STM32F405xG memory setup. + * Note: Use of ram1 and ram2 is mutually exclusive with use of ram0. + */ +MEMORY +{ + flash0 (rx) : org = 0x08000000 + 64k, len = 1M - 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 = 128k /* SRAM1 + SRAM2 */ + ram1 (wx) : org = 0x20000000, len = 112k /* SRAM1 */ + ram2 (wx) : org = 0x2001C000, len = 16k /* SRAM2 */ + ram3 (wx) : org = 0x00000000, len = 0 + ram4 (wx) : org = 0x10000000, len = 64k /* CCM SRAM */ + ram5 (wx) : org = 0x40024000, len = 4k /* BCKP SRAM */ + 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/converters/promicro_to_promicro_rp2040/pre_converter.mk b/platforms/chibios/converters/promicro_to_promicro_rp2040/pre_converter.mk new file mode 100644 index 0000000000..303d3135ce --- /dev/null +++ b/platforms/chibios/converters/promicro_to_promicro_rp2040/pre_converter.mk @@ -0,0 +1,2 @@ +CONVERTER:=platforms/chibios/converters/promicro_to_sparkfun_pm2040 +ACTIVE_CONVERTER:=sparkfun_pm2040 diff --git a/platforms/chibios/converters/promicro_to_promicro_rp2040/_pin_defs.h b/platforms/chibios/converters/promicro_to_sparkfun_pm2040/_pin_defs.h index 0a1f4112a3..0a1f4112a3 100644 --- a/platforms/chibios/converters/promicro_to_promicro_rp2040/_pin_defs.h +++ b/platforms/chibios/converters/promicro_to_sparkfun_pm2040/_pin_defs.h diff --git a/platforms/chibios/converters/promicro_to_promicro_rp2040/converter.mk b/platforms/chibios/converters/promicro_to_sparkfun_pm2040/converter.mk index 03863eeb02..03863eeb02 100644 --- a/platforms/chibios/converters/promicro_to_promicro_rp2040/converter.mk +++ b/platforms/chibios/converters/promicro_to_sparkfun_pm2040/converter.mk diff --git a/platforms/chibios/drivers/eeprom/eeprom_legacy_emulated_flash.c b/platforms/chibios/drivers/eeprom/eeprom_legacy_emulated_flash.c index a81fe3353c..9857ac046b 100644 --- a/platforms/chibios/drivers/eeprom/eeprom_legacy_emulated_flash.c +++ b/platforms/chibios/drivers/eeprom/eeprom_legacy_emulated_flash.c @@ -24,6 +24,7 @@ #include "debug.h" #include "eeprom_legacy_emulated_flash.h" #include "legacy_flash_ops.h" +#include "eeprom_driver.h" /* * We emulate eeprom by writing a snapshot compacted view of eeprom contents, @@ -564,6 +565,12 @@ void eeprom_driver_init(void) { EEPROM_Init(); } +void eeprom_driver_format(bool erase) { + /* emulated eepron requires the write log data structures to be erased before use. */ + (void)erase; + eeprom_driver_erase(); +} + void eeprom_driver_erase(void) { EEPROM_Erase(); } diff --git a/platforms/chibios/drivers/eeprom/eeprom_stm32_L0_L1.c b/platforms/chibios/drivers/eeprom/eeprom_stm32_L0_L1.c index ed26cc7145..628137a0b3 100644 --- a/platforms/chibios/drivers/eeprom/eeprom_stm32_L0_L1.c +++ b/platforms/chibios/drivers/eeprom/eeprom_stm32_L0_L1.c @@ -52,6 +52,12 @@ static inline void STM32_L0_L1_EEPROM_Lock(void) { void eeprom_driver_init(void) {} +void eeprom_driver_format(bool erase) { + if (erase) { + eeprom_driver_erase(); + } +} + void eeprom_driver_erase(void) { STM32_L0_L1_EEPROM_Unlock(); diff --git a/platforms/chibios/drivers/eeprom/eeprom_stm32_L0_L1.h b/platforms/chibios/drivers/eeprom/eeprom_stm32_L0_L1.h index 616d7ccbee..c1d801f225 100644 --- a/platforms/chibios/drivers/eeprom/eeprom_stm32_L0_L1.h +++ b/platforms/chibios/drivers/eeprom/eeprom_stm32_L0_L1.h @@ -20,7 +20,7 @@ The size used by the STM32 L0/L1 EEPROM driver. */ #ifndef STM32_ONBOARD_EEPROM_SIZE -# ifdef VIA_ENABLE +# ifdef DYNAMIC_KEYMAP_ENABLE # define STM32_ONBOARD_EEPROM_SIZE 1024 # else # include "eeconfig.h" diff --git a/platforms/chibios/drivers/spi_master.c b/platforms/chibios/drivers/spi_master.c index 57fc53d49f..fcdbc9ecf0 100644 --- a/platforms/chibios/drivers/spi_master.c +++ b/platforms/chibios/drivers/spi_master.c @@ -64,9 +64,14 @@ __attribute__((weak)) void spi_init(void) { } bool spi_start(pin_t slavePin, bool lsbFirst, uint8_t mode, uint16_t divisor) { +#if (SPI_USE_MUTUAL_EXCLUSION == TRUE) + spiAcquireBus(&SPI_DRIVER); +#endif // (SPI_USE_MUTUAL_EXCLUSION == TRUE) + if (spiStarted) { return false; } + #if SPI_SELECT_MODE != SPI_SELECT_MODE_NONE if (slavePin == NO_PIN) { return false; @@ -326,4 +331,8 @@ void spi_stop(void) { spiStop(&SPI_DRIVER); spiStarted = false; } + +#if (SPI_USE_MUTUAL_EXCLUSION == TRUE) + spiReleaseBus(&SPI_DRIVER); +#endif // (SPI_USE_MUTUAL_EXCLUSION == TRUE) } diff --git a/platforms/chibios/drivers/wear_leveling/wear_leveling_efl.c b/platforms/chibios/drivers/wear_leveling/wear_leveling_efl.c index 3d6ed52e5c..f49c4a45b0 100644 --- a/platforms/chibios/drivers/wear_leveling/wear_leveling_efl.c +++ b/platforms/chibios/drivers/wear_leveling/wear_leveling_efl.c @@ -14,11 +14,15 @@ static flash_sector_t first_sector = WEAR_LEVELING_EFL_FIRST_SECTOR; static flash_sector_t first_sector = UINT16_MAX; #endif // defined(WEAR_LEVELING_EFL_FIRST_SECTOR) +#if !defined(WEAR_LEVELING_EFL_OMIT_LAST_SECTOR_COUNT) +# define WEAR_LEVELING_EFL_OMIT_LAST_SECTOR_COUNT 0 +#endif // WEAR_LEVELING_EFL_OMIT_LAST_SECTOR_COUNT + static flash_sector_t sector_count = UINT16_MAX; static BaseFlash * flash; - -static volatile bool is_issuing_read = false; -static volatile bool ecc_error_occurred = false; +static bool flash_erased_is_one; +static volatile bool is_issuing_read = false; +static volatile bool ecc_error_occurred = false; // "Automatic" detection of the flash size -- ideally ChibiOS would have this already, but alas, it doesn't. static inline uint32_t detect_flash_size(void) { @@ -51,10 +55,19 @@ bool backing_store_init(void) { uint32_t counter = 0; uint32_t flash_size = detect_flash_size(); + // Check if the hardware erase is logic 1 + flash_erased_is_one = (desc->attributes & FLASH_ATTR_ERASED_IS_ONE) ? true : false; + + if (WEAR_LEVELING_EFL_OMIT_LAST_SECTOR_COUNT >= desc->sectors_count) { + // Last sector defined is greater than available number of sectors. Can't do anything here. Fault. + chSysHalt("Last sector intended to be used with wear_leveling is beyond available flash descriptor range"); + } + #if defined(WEAR_LEVELING_EFL_FIRST_SECTOR) // Work out how many sectors we want to use, working forwards from the first sector specified - for (flash_sector_t i = 0; i < desc->sectors_count - first_sector; ++i) { + flash_sector_t last_sector = desc->sectors_count - WEAR_LEVELING_EFL_OMIT_LAST_SECTOR_COUNT; + for (flash_sector_t i = 0; i < last_sector - first_sector; ++i) { counter += flashGetSectorSize(flash, first_sector + i); if (counter >= (WEAR_LEVELING_BACKING_SIZE)) { sector_count = i + 1; @@ -70,9 +83,9 @@ bool backing_store_init(void) { #else // defined(WEAR_LEVELING_EFL_FIRST_SECTOR) // Work out how many sectors we want to use, working backwards from the end of the flash - flash_sector_t last_sector = desc->sectors_count; - for (flash_sector_t i = 0; i < desc->sectors_count; ++i) { - first_sector = desc->sectors_count - i - 1; + flash_sector_t last_sector = desc->sectors_count - WEAR_LEVELING_EFL_OMIT_LAST_SECTOR_COUNT; + for (flash_sector_t i = 0; i < last_sector; ++i) { + first_sector = last_sector - i - 1; if (flashGetSectorOffset(flash, first_sector) >= flash_size) { last_sector = first_sector; continue; @@ -124,7 +137,9 @@ bool backing_store_write(uint32_t address, backing_store_int_t value) { uint32_t offset = (base_offset + address); bs_dprintf("Write "); wl_dump(offset, &value, sizeof(value)); - value = ~value; + if (flash_erased_is_one) { + value = ~value; + } return flashProgram(flash, offset, sizeof(value), (const uint8_t *)&value) == FLASH_NO_ERROR; } @@ -138,7 +153,7 @@ static backing_store_int_t backing_store_safe_read_from_location(backing_store_i backing_store_int_t value; is_issuing_read = true; ecc_error_occurred = false; - value = ~(*loc); + value = flash_erased_is_one ? ~(*loc) : (*loc); is_issuing_read = false; return value; } diff --git a/platforms/chibios/hardware_id.c b/platforms/chibios/hardware_id.c index 1097db5966..fb67a0a63e 100644 --- a/platforms/chibios/hardware_id.c +++ b/platforms/chibios/hardware_id.c @@ -4,7 +4,7 @@ #include <ch.h> #include "hardware_id.h" -hardware_id_t get_hardware_id(void) { +__attribute__((weak)) hardware_id_t get_hardware_id(void) { hardware_id_t id = {0}; #if defined(RP2040) // Forward declare as including "hardware/flash.h" here causes more issues... diff --git a/quantum/action.c b/quantum/action.c index 74ef55e5eb..a39631ba3e 100644 --- a/quantum/action.c +++ b/quantum/action.c @@ -329,7 +329,7 @@ void register_mouse(uint8_t mouse_keycode, bool pressed) { // should mousekeys send report, or does something else handle this? switch (mouse_keycode) { # if defined(PS2_MOUSE_ENABLE) || defined(POINTING_DEVICE_ENABLE) - case KC_MS_BTN1 ... KC_MS_BTN8: + case QK_MOUSE_BUTTON_1 ... QK_MOUSE_BUTTON_8: // let pointing device handle the buttons // expand if/when it handles more of the code # if defined(POINTING_DEVICE_ENABLE) @@ -351,8 +351,8 @@ void register_mouse(uint8_t mouse_keycode, bool pressed) { #ifdef PS2_MOUSE_ENABLE // make sure that ps2 mouse has button report synced - if (KC_MS_BTN1 <= mouse_keycode && mouse_keycode <= KC_MS_BTN3) { - uint8_t tmp_button_msk = MOUSE_BTN_MASK(mouse_keycode - KC_MS_BTN1); + if (QK_MOUSE_BUTTON_1 <= mouse_keycode && mouse_keycode <= QK_MOUSE_BUTTON_3) { + uint8_t tmp_button_msk = MOUSE_BTN_MASK(mouse_keycode - QK_MOUSE_BUTTON_1); tp_buttons = pressed ? tp_buttons | tmp_button_msk : tp_buttons & ~tmp_button_msk; } #endif diff --git a/quantum/dynamic_macro.h b/quantum/dynamic_macro.h deleted file mode 100644 index 64c532e6ce..0000000000 --- a/quantum/dynamic_macro.h +++ /dev/null @@ -1,264 +0,0 @@ -/* Copyright 2016 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 <http://www.gnu.org/licenses/>. - */ - -/* Author: Wojciech Siewierski < wojciech dot siewierski at onet dot pl > */ -#pragma once - -/* Warn users that this is now deprecated and they should use the core feature instead. */ -#pragma message "Dynamic Macros is now a core feature. See updated documentation to see how to configure it: https://docs.qmk.fm/#/feature_dynamic_macros" - -#include "action_layer.h" - -#ifndef DYNAMIC_MACRO_SIZE -/* May be overridden with a custom value. Be aware that the effective - * macro length is half of this value: each keypress is recorded twice - * because of the down-event and up-event. This is not a bug, it's the - * intended behavior. - * - * Usually it should be fine to set the macro size to at least 256 but - * there have been reports of it being too much in some users' cases, - * so 128 is considered a safe default. - */ -# define DYNAMIC_MACRO_SIZE 128 -#endif - -/* Blink the LEDs to notify the user about some event. */ -void dynamic_macro_led_blink(void) { -#ifdef BACKLIGHT_ENABLE - backlight_toggle(); - wait_ms(100); - backlight_toggle(); -#endif -} - -/* Convenience macros used for retrieving the debug info. All of them - * need a `direction` variable accessible at the call site. - */ -#define DYNAMIC_MACRO_CURRENT_SLOT() (direction > 0 ? 1 : 2) -#define DYNAMIC_MACRO_CURRENT_LENGTH(BEGIN, POINTER) ((int)(direction * ((POINTER) - (BEGIN)))) -#define DYNAMIC_MACRO_CURRENT_CAPACITY(BEGIN, END2) ((int)(direction * ((END2) - (BEGIN)) + 1)) - -/** - * Start recording of the dynamic macro. - * - * @param[out] macro_pointer The new macro buffer iterator. - * @param[in] macro_buffer The macro buffer used to initialize macro_pointer. - */ -void dynamic_macro_record_start(keyrecord_t **macro_pointer, keyrecord_t *macro_buffer) { - dprintln("dynamic macro recording: started"); - - dynamic_macro_led_blink(); - - clear_keyboard(); - layer_clear(); - *macro_pointer = macro_buffer; -} - -/** - * Play the dynamic macro. - * - * @param macro_buffer[in] The beginning of the macro buffer being played. - * @param macro_end[in] The element after the last macro buffer element. - * @param direction[in] Either +1 or -1, which way to iterate the buffer. - */ -void dynamic_macro_play(keyrecord_t *macro_buffer, keyrecord_t *macro_end, int8_t direction) { - dprintf("dynamic macro: slot %d playback\n", DYNAMIC_MACRO_CURRENT_SLOT()); - - uint32_t saved_layer_state = layer_state; - - clear_keyboard(); - layer_clear(); - - while (macro_buffer != macro_end) { - process_record(macro_buffer); - macro_buffer += direction; - } - - clear_keyboard(); - - layer_state = saved_layer_state; -} - -/** - * Record a single key in a dynamic macro. - * - * @param macro_buffer[in] The start of the used macro buffer. - * @param macro_pointer[in,out] The current buffer position. - * @param macro2_end[in] The end of the other macro. - * @param direction[in] Either +1 or -1, which way to iterate the buffer. - * @param record[in] The current keypress. - */ -void dynamic_macro_record_key(keyrecord_t *macro_buffer, keyrecord_t **macro_pointer, keyrecord_t *macro2_end, int8_t direction, keyrecord_t *record) { - /* If we've just started recording, ignore all the key releases. */ - if (!record->event.pressed && *macro_pointer == macro_buffer) { - dprintln("dynamic macro: ignoring a leading key-up event"); - return; - } - - /* The other end of the other macro is the last buffer element it - * is safe to use before overwriting the other macro. - */ - if (*macro_pointer - direction != macro2_end) { - **macro_pointer = *record; - *macro_pointer += direction; - } else { - dynamic_macro_led_blink(); - } - - dprintf("dynamic macro: slot %d length: %d/%d\n", DYNAMIC_MACRO_CURRENT_SLOT(), DYNAMIC_MACRO_CURRENT_LENGTH(macro_buffer, *macro_pointer), DYNAMIC_MACRO_CURRENT_CAPACITY(macro_buffer, macro2_end)); -} - -/** - * End recording of the dynamic macro. Essentially just update the - * pointer to the end of the macro. - */ -void dynamic_macro_record_end(keyrecord_t *macro_buffer, keyrecord_t *macro_pointer, int8_t direction, keyrecord_t **macro_end) { - dynamic_macro_led_blink(); - - /* Do not save the keys being held when stopping the recording, - * i.e. the keys used to access the layer DM_RSTP is on. - */ - while (macro_pointer != macro_buffer && (macro_pointer - direction)->event.pressed) { - dprintln("dynamic macro: trimming a trailing key-down event"); - macro_pointer -= direction; - } - - dprintf("dynamic macro: slot %d saved, length: %d\n", DYNAMIC_MACRO_CURRENT_SLOT(), DYNAMIC_MACRO_CURRENT_LENGTH(macro_buffer, macro_pointer)); - - *macro_end = macro_pointer; -} - -/* Handle the key events related to the dynamic macros. Should be - * called from process_record_user() like this: - * - * bool process_record_user(uint16_t keycode, keyrecord_t *record) { - * if (!process_record_dynamic_macro(keycode, record)) { - * return false; - * } - * <...THE REST OF THE FUNCTION...> - * } - */ -bool process_record_dynamic_macro(uint16_t keycode, keyrecord_t *record) { - /* Both macros use the same buffer but read/write on different - * ends of it. - * - * Macro1 is written left-to-right starting from the beginning of - * the buffer. - * - * Macro2 is written right-to-left starting from the end of the - * buffer. - * - * ¯o_buffer macro_end - * v v - * +------------------------------------------------------------+ - * |>>>>>> MACRO1 >>>>>> <<<<<<<<<<<<< MACRO2 <<<<<<<<<<<<<| - * +------------------------------------------------------------+ - * ^ ^ - * r_macro_end r_macro_buffer - * - * During the recording when one macro encounters the end of the - * other macro, the recording is stopped. Apart from this, there - * are no arbitrary limits for the macros' length in relation to - * each other: for example one can either have two medium sized - * macros or one long macro and one short macro. Or even one empty - * and one using the whole buffer. - */ - static keyrecord_t macro_buffer[DYNAMIC_MACRO_SIZE]; - - /* Pointer to the first buffer element after the first macro. - * Initially points to the very beginning of the buffer since the - * macro is empty. */ - static keyrecord_t *macro_end = macro_buffer; - - /* The other end of the macro buffer. Serves as the beginning of - * the second macro. */ - static keyrecord_t *const r_macro_buffer = macro_buffer + DYNAMIC_MACRO_SIZE - 1; - - /* Like macro_end but for the second macro. */ - static keyrecord_t *r_macro_end = r_macro_buffer; - - /* A persistent pointer to the current macro position (iterator) - * used during the recording. */ - static keyrecord_t *macro_pointer = NULL; - - /* 0 - no macro is being recorded right now - * 1,2 - either macro 1 or 2 is being recorded */ - static uint8_t macro_id = 0; - - if (macro_id == 0) { - /* No macro recording in progress. */ - if (!record->event.pressed) { - switch (keycode) { - case QK_DYNAMIC_MACRO_RECORD_START_1: - dynamic_macro_record_start(¯o_pointer, macro_buffer); - macro_id = 1; - return false; - case QK_DYNAMIC_MACRO_RECORD_START_2: - dynamic_macro_record_start(¯o_pointer, r_macro_buffer); - macro_id = 2; - return false; - case QK_DYNAMIC_MACRO_PLAY_1: - dynamic_macro_play(macro_buffer, macro_end, +1); - return false; - case QK_DYNAMIC_MACRO_PLAY_2: - dynamic_macro_play(r_macro_buffer, r_macro_end, -1); - return false; - } - } - } else { - /* A macro is being recorded right now. */ - switch (keycode) { - case QK_DYNAMIC_MACRO_RECORD_STOP: - /* Stop the macro recording. */ - if (record->event.pressed) { /* Ignore the initial release - * just after the recoding - * starts. */ - switch (macro_id) { - case 1: - dynamic_macro_record_end(macro_buffer, macro_pointer, +1, ¯o_end); - break; - case 2: - dynamic_macro_record_end(r_macro_buffer, macro_pointer, -1, &r_macro_end); - break; - } - macro_id = 0; - } - return false; - case QK_DYNAMIC_MACRO_PLAY_1: - case QK_DYNAMIC_MACRO_PLAY_2: - dprintln("dynamic macro: ignoring macro play key while recording"); - return false; - default: - /* Store the key in the macro buffer and process it normally. */ - switch (macro_id) { - case 1: - dynamic_macro_record_key(macro_buffer, ¯o_pointer, r_macro_end, +1, record); - break; - case 2: - dynamic_macro_record_key(r_macro_buffer, ¯o_pointer, macro_end, -1, record); - break; - } - return true; - break; - } - } - - return true; -} - -#undef DYNAMIC_MACRO_CURRENT_SLOT -#undef DYNAMIC_MACRO_CURRENT_LENGTH -#undef DYNAMIC_MACRO_CURRENT_CAPACITY diff --git a/quantum/eeconfig.c b/quantum/eeconfig.c index 40690d6a97..ffbbf43a95 100644 --- a/quantum/eeconfig.c +++ b/quantum/eeconfig.c @@ -46,7 +46,7 @@ __attribute__((weak)) void eeconfig_init_kb(void) { */ void eeconfig_init_quantum(void) { #if defined(EEPROM_DRIVER) - eeprom_driver_erase(); + eeprom_driver_format(false); #endif eeprom_update_word(EECONFIG_MAGIC, EECONFIG_MAGIC_NUMBER); @@ -108,7 +108,7 @@ void eeconfig_enable(void) { */ void eeconfig_disable(void) { #if defined(EEPROM_DRIVER) - eeprom_driver_erase(); + eeprom_driver_format(false); #endif eeprom_update_word(EECONFIG_MAGIC, EECONFIG_MAGIC_NUMBER_OFF); } diff --git a/quantum/encoder.c b/quantum/encoder.c index 2ddbf3ee1e..27d7b1fc80 100644 --- a/quantum/encoder.c +++ b/quantum/encoder.c @@ -160,7 +160,7 @@ __attribute__((weak)) bool encoder_update_kb(uint8_t index, bool clockwise) { # if defined(EXTRAKEY_ENABLE) tap_code_delay(KC_VOLU, 10); # elif defined(MOUSEKEY_ENABLE) - tap_code_delay(KC_MS_WH_UP, 10); + tap_code_delay(QK_MOUSE_WHEEL_UP, 10); # else tap_code_delay(KC_PGDN, 10); # endif @@ -168,7 +168,7 @@ __attribute__((weak)) bool encoder_update_kb(uint8_t index, bool clockwise) { # if defined(EXTRAKEY_ENABLE) tap_code_delay(KC_VOLD, 10); # elif defined(MOUSEKEY_ENABLE) - tap_code_delay(KC_MS_WH_DOWN, 10); + tap_code_delay(QK_MOUSE_WHEEL_DOWN, 10); # else tap_code_delay(KC_PGUP, 10); # endif diff --git a/quantum/encoder.h b/quantum/encoder.h index 317a91f1da..1d2f1f46c7 100644 --- a/quantum/encoder.h +++ b/quantum/encoder.h @@ -22,6 +22,21 @@ #include "gpio.h" #include "util.h" +// ======== DEPRECATED DEFINES - DO NOT USE ======== +#ifdef ENCODERS_PAD_A +# define ENCODER_A_PINS ENCODERS_PAD_A +#endif +#ifdef ENCODERS_PAD_B +# define ENCODER_B_PINS ENCODERS_PAD_B +#endif +#ifdef ENCODERS_PAD_A_RIGHT +# define ENCODER_A_PINS_RIGHT ENCODERS_PAD_A_RIGHT +#endif +#ifdef ENCODERS_PAD_B_RIGHT +# define ENCODER_B_PINS_RIGHT ENCODERS_PAD_B_RIGHT +#endif +// ======== + #ifdef ENCODER_ENABLE __attribute__((weak)) bool should_process_encoder(void); @@ -36,16 +51,16 @@ bool encoder_update_user(uint8_t index, bool clockwise); # ifdef SPLIT_KEYBOARD -# if defined(ENCODERS_PAD_A_RIGHT) +# if defined(ENCODER_A_PINS_RIGHT) # ifndef NUM_ENCODERS_LEFT -# define NUM_ENCODERS_LEFT ARRAY_SIZE(((pin_t[])ENCODERS_PAD_A)) +# define NUM_ENCODERS_LEFT ARRAY_SIZE(((pin_t[])ENCODER_A_PINS)) # endif # ifndef NUM_ENCODERS_RIGHT -# define NUM_ENCODERS_RIGHT ARRAY_SIZE(((pin_t[])ENCODERS_PAD_A_RIGHT)) +# define NUM_ENCODERS_RIGHT ARRAY_SIZE(((pin_t[])ENCODER_A_PINS_RIGHT)) # endif # else # ifndef NUM_ENCODERS_LEFT -# define NUM_ENCODERS_LEFT ARRAY_SIZE(((pin_t[])ENCODERS_PAD_A)) +# define NUM_ENCODERS_LEFT ARRAY_SIZE(((pin_t[])ENCODER_A_PINS)) # endif # ifndef NUM_ENCODERS_RIGHT # define NUM_ENCODERS_RIGHT NUM_ENCODERS_LEFT @@ -58,19 +73,13 @@ bool encoder_update_user(uint8_t index, bool clockwise); # else // SPLIT_KEYBOARD # ifndef NUM_ENCODERS -# define NUM_ENCODERS ARRAY_SIZE(((pin_t[])ENCODERS_PAD_A)) +# define NUM_ENCODERS ARRAY_SIZE(((pin_t[])ENCODER_A_PINS)) # endif # define NUM_ENCODERS_LEFT NUM_ENCODERS # define NUM_ENCODERS_RIGHT 0 # endif // SPLIT_KEYBOARD -# ifndef NUM_ENCODERS -# define NUM_ENCODERS 0 -# define NUM_ENCODERS_LEFT 0 -# define NUM_ENCODERS_RIGHT 0 -# endif // NUM_ENCODERS - # define NUM_ENCODERS_MAX_PER_SIDE MAX(NUM_ENCODERS_LEFT, NUM_ENCODERS_RIGHT) # ifndef MAX_QUEUED_ENCODER_EVENTS diff --git a/quantum/encoder/tests/config_mock.h b/quantum/encoder/tests/config_mock.h index 9eb59ddc88..b5a1537d8a 100644 --- a/quantum/encoder/tests/config_mock.h +++ b/quantum/encoder/tests/config_mock.h @@ -7,9 +7,9 @@ #define MATRIX_COLS 1 /* Here, "pins" from 0 to 31 are allowed. */ -#define ENCODERS_PAD_A \ +#define ENCODER_A_PINS \ { 0 } -#define ENCODERS_PAD_B \ +#define ENCODER_B_PINS \ { 1 } #ifdef __cplusplus diff --git a/quantum/encoder/tests/config_mock_split_left_eq_right.h b/quantum/encoder/tests/config_mock_split_left_eq_right.h index ea795657ef..a4aa051ef1 100644 --- a/quantum/encoder/tests/config_mock_split_left_eq_right.h +++ b/quantum/encoder/tests/config_mock_split_left_eq_right.h @@ -7,13 +7,13 @@ #define MATRIX_COLS 1 /* Here, "pins" from 0 to 31 are allowed. */ -#define ENCODERS_PAD_A \ +#define ENCODER_A_PINS \ { 0, 2 } -#define ENCODERS_PAD_B \ +#define ENCODER_B_PINS \ { 1, 3 } -#define ENCODERS_PAD_A_RIGHT \ +#define ENCODER_A_PINS_RIGHT \ { 4, 6 } -#define ENCODERS_PAD_B_RIGHT \ +#define ENCODER_B_PINS_RIGHT \ { 5, 7 } #ifdef __cplusplus diff --git a/quantum/encoder/tests/config_mock_split_left_gt_right.h b/quantum/encoder/tests/config_mock_split_left_gt_right.h index abcfe03918..77190797ad 100644 --- a/quantum/encoder/tests/config_mock_split_left_gt_right.h +++ b/quantum/encoder/tests/config_mock_split_left_gt_right.h @@ -7,13 +7,13 @@ #define MATRIX_COLS 1 /* Here, "pins" from 0 to 31 are allowed. */ -#define ENCODERS_PAD_A \ +#define ENCODER_A_PINS \ { 0, 2, 4 } -#define ENCODERS_PAD_B \ +#define ENCODER_B_PINS \ { 1, 3, 5 } -#define ENCODERS_PAD_A_RIGHT \ +#define ENCODER_A_PINS_RIGHT \ { 6, 8 } -#define ENCODERS_PAD_B_RIGHT \ +#define ENCODER_B_PINS_RIGHT \ { 7, 9 } #ifdef __cplusplus diff --git a/quantum/encoder/tests/config_mock_split_left_lt_right.h b/quantum/encoder/tests/config_mock_split_left_lt_right.h index 075c774b0d..61808e866e 100644 --- a/quantum/encoder/tests/config_mock_split_left_lt_right.h +++ b/quantum/encoder/tests/config_mock_split_left_lt_right.h @@ -7,13 +7,13 @@ #define MATRIX_COLS 1 /* Here, "pins" from 0 to 31 are allowed. */ -#define ENCODERS_PAD_A \ +#define ENCODER_A_PINS \ { 0, 2 } -#define ENCODERS_PAD_B \ +#define ENCODER_B_PINS \ { 1, 3 } -#define ENCODERS_PAD_A_RIGHT \ +#define ENCODER_A_PINS_RIGHT \ { 4, 6, 8 } -#define ENCODERS_PAD_B_RIGHT \ +#define ENCODER_B_PINS_RIGHT \ { 5, 7, 9 } #ifdef __cplusplus diff --git a/quantum/encoder/tests/config_mock_split_no_left.h b/quantum/encoder/tests/config_mock_split_no_left.h index dfd8358929..599e584ff1 100644 --- a/quantum/encoder/tests/config_mock_split_no_left.h +++ b/quantum/encoder/tests/config_mock_split_no_left.h @@ -7,13 +7,13 @@ #define MATRIX_COLS 1 /* Here, "pins" from 0 to 31 are allowed. */ -#define ENCODERS_PAD_A \ +#define ENCODER_A_PINS \ {} -#define ENCODERS_PAD_B \ +#define ENCODER_B_PINS \ {} -#define ENCODERS_PAD_A_RIGHT \ +#define ENCODER_A_PINS_RIGHT \ { 0, 2 } -#define ENCODERS_PAD_B_RIGHT \ +#define ENCODER_B_PINS_RIGHT \ { 1, 3 } #ifdef __cplusplus diff --git a/quantum/encoder/tests/config_mock_split_no_right.h b/quantum/encoder/tests/config_mock_split_no_right.h index 5683eade8c..c3f753014c 100644 --- a/quantum/encoder/tests/config_mock_split_no_right.h +++ b/quantum/encoder/tests/config_mock_split_no_right.h @@ -7,13 +7,13 @@ #define MATRIX_COLS 1 /* Here, "pins" from 0 to 31 are allowed. */ -#define ENCODERS_PAD_A \ +#define ENCODER_A_PINS \ { 0, 2 } -#define ENCODERS_PAD_B \ +#define ENCODER_B_PINS \ { 1, 3 } -#define ENCODERS_PAD_A_RIGHT \ +#define ENCODER_A_PINS_RIGHT \ {} -#define ENCODERS_PAD_B_RIGHT \ +#define ENCODER_B_PINS_RIGHT \ {} #ifdef __cplusplus diff --git a/quantum/encoder/tests/config_mock_split_role.h b/quantum/encoder/tests/config_mock_split_role.h index ea795657ef..a4aa051ef1 100644 --- a/quantum/encoder/tests/config_mock_split_role.h +++ b/quantum/encoder/tests/config_mock_split_role.h @@ -7,13 +7,13 @@ #define MATRIX_COLS 1 /* Here, "pins" from 0 to 31 are allowed. */ -#define ENCODERS_PAD_A \ +#define ENCODER_A_PINS \ { 0, 2 } -#define ENCODERS_PAD_B \ +#define ENCODER_B_PINS \ { 1, 3 } -#define ENCODERS_PAD_A_RIGHT \ +#define ENCODER_A_PINS_RIGHT \ { 4, 6 } -#define ENCODERS_PAD_B_RIGHT \ +#define ENCODER_B_PINS_RIGHT \ { 5, 7 } #ifdef __cplusplus diff --git a/quantum/keycode.h b/quantum/keycode.h index df1452d296..4ff6894a01 100644 --- a/quantum/keycode.h +++ b/quantum/keycode.h @@ -29,10 +29,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define IS_ANY(code) (KC_A <= (code) && (code) <= 0xFF) #define IS_MOUSEKEY(code) IS_MOUSE_KEYCODE(code) -#define IS_MOUSEKEY_MOVE(code) (KC_MS_UP <= (code) && (code) <= KC_MS_RIGHT) -#define IS_MOUSEKEY_BUTTON(code) (KC_MS_BTN1 <= (code) && (code) <= KC_MS_BTN8) -#define IS_MOUSEKEY_WHEEL(code) (KC_MS_WH_UP <= (code) && (code) <= KC_MS_WH_RIGHT) -#define IS_MOUSEKEY_ACCEL(code) (KC_MS_ACCEL0 <= (code) && (code) <= KC_MS_ACCEL2) +#define IS_MOUSEKEY_MOVE(code) (QK_MOUSE_CURSOR_UP <= (code) && (code) <= QK_MOUSE_CURSOR_RIGHT) +#define IS_MOUSEKEY_BUTTON(code) (QK_MOUSE_BUTTON_1 <= (code) && (code) <= QK_MOUSE_BUTTON_8) +#define IS_MOUSEKEY_WHEEL(code) (QK_MOUSE_WHEEL_UP <= (code) && (code) <= QK_MOUSE_WHEEL_RIGHT) +#define IS_MOUSEKEY_ACCEL(code) (QK_MOUSE_ACCELERATION_0 <= (code) && (code) <= QK_MOUSE_ACCELERATION_2) #define MOD_BIT(code) (1 << ((code)&0x07)) diff --git a/quantum/keycodes.h b/quantum/keycodes.h index c92028ab43..f461e4a586 100644 --- a/quantum/keycodes.h +++ b/quantum/keycodes.h @@ -283,25 +283,25 @@ enum qk_keycode_defines { KC_ASSISTANT = 0x00C0, KC_MISSION_CONTROL = 0x00C1, KC_LAUNCHPAD = 0x00C2, - KC_MS_UP = 0x00CD, - KC_MS_DOWN = 0x00CE, - KC_MS_LEFT = 0x00CF, - KC_MS_RIGHT = 0x00D0, - KC_MS_BTN1 = 0x00D1, - KC_MS_BTN2 = 0x00D2, - KC_MS_BTN3 = 0x00D3, - KC_MS_BTN4 = 0x00D4, - KC_MS_BTN5 = 0x00D5, - KC_MS_BTN6 = 0x00D6, - KC_MS_BTN7 = 0x00D7, - KC_MS_BTN8 = 0x00D8, - KC_MS_WH_UP = 0x00D9, - KC_MS_WH_DOWN = 0x00DA, - KC_MS_WH_LEFT = 0x00DB, - KC_MS_WH_RIGHT = 0x00DC, - KC_MS_ACCEL0 = 0x00DD, - KC_MS_ACCEL1 = 0x00DE, - KC_MS_ACCEL2 = 0x00DF, + QK_MOUSE_CURSOR_UP = 0x00CD, + QK_MOUSE_CURSOR_DOWN = 0x00CE, + QK_MOUSE_CURSOR_LEFT = 0x00CF, + QK_MOUSE_CURSOR_RIGHT = 0x00D0, + QK_MOUSE_BUTTON_1 = 0x00D1, + QK_MOUSE_BUTTON_2 = 0x00D2, + QK_MOUSE_BUTTON_3 = 0x00D3, + QK_MOUSE_BUTTON_4 = 0x00D4, + QK_MOUSE_BUTTON_5 = 0x00D5, + QK_MOUSE_BUTTON_6 = 0x00D6, + QK_MOUSE_BUTTON_7 = 0x00D7, + QK_MOUSE_BUTTON_8 = 0x00D8, + QK_MOUSE_WHEEL_UP = 0x00D9, + QK_MOUSE_WHEEL_DOWN = 0x00DA, + QK_MOUSE_WHEEL_LEFT = 0x00DB, + QK_MOUSE_WHEEL_RIGHT = 0x00DC, + QK_MOUSE_ACCELERATION_0 = 0x00DD, + QK_MOUSE_ACCELERATION_1 = 0x00DE, + QK_MOUSE_ACCELERATION_2 = 0x00DF, KC_LEFT_CTRL = 0x00E0, KC_LEFT_SHIFT = 0x00E1, KC_LEFT_ALT = 0x00E2, @@ -926,25 +926,25 @@ enum qk_keycode_defines { KC_ASST = KC_ASSISTANT, KC_MCTL = KC_MISSION_CONTROL, KC_LPAD = KC_LAUNCHPAD, - KC_MS_U = KC_MS_UP, - KC_MS_D = KC_MS_DOWN, - KC_MS_L = KC_MS_LEFT, - KC_MS_R = KC_MS_RIGHT, - KC_BTN1 = KC_MS_BTN1, - KC_BTN2 = KC_MS_BTN2, - KC_BTN3 = KC_MS_BTN3, - KC_BTN4 = KC_MS_BTN4, - KC_BTN5 = KC_MS_BTN5, - KC_BTN6 = KC_MS_BTN6, - KC_BTN7 = KC_MS_BTN7, - KC_BTN8 = KC_MS_BTN8, - KC_WH_U = KC_MS_WH_UP, - KC_WH_D = KC_MS_WH_DOWN, - KC_WH_L = KC_MS_WH_LEFT, - KC_WH_R = KC_MS_WH_RIGHT, - KC_ACL0 = KC_MS_ACCEL0, - KC_ACL1 = KC_MS_ACCEL1, - KC_ACL2 = KC_MS_ACCEL2, + MS_UP = QK_MOUSE_CURSOR_UP, + MS_DOWN = QK_MOUSE_CURSOR_DOWN, + MS_LEFT = QK_MOUSE_CURSOR_LEFT, + MS_RGHT = QK_MOUSE_CURSOR_RIGHT, + MS_BTN1 = QK_MOUSE_BUTTON_1, + MS_BTN2 = QK_MOUSE_BUTTON_2, + MS_BTN3 = QK_MOUSE_BUTTON_3, + MS_BTN4 = QK_MOUSE_BUTTON_4, + MS_BTN5 = QK_MOUSE_BUTTON_5, + MS_BTN6 = QK_MOUSE_BUTTON_6, + MS_BTN7 = QK_MOUSE_BUTTON_7, + MS_BTN8 = QK_MOUSE_BUTTON_8, + MS_WHLU = QK_MOUSE_WHEEL_UP, + MS_WHLD = QK_MOUSE_WHEEL_DOWN, + MS_WHLL = QK_MOUSE_WHEEL_LEFT, + MS_WHLR = QK_MOUSE_WHEEL_RIGHT, + MS_ACL0 = QK_MOUSE_ACCELERATION_0, + MS_ACL1 = QK_MOUSE_ACCELERATION_1, + MS_ACL2 = QK_MOUSE_ACCELERATION_2, KC_LCTL = KC_LEFT_CTRL, KC_LSFT = KC_LEFT_SHIFT, KC_LALT = KC_LEFT_ALT, @@ -1457,7 +1457,7 @@ enum qk_keycode_defines { #define IS_BASIC_KEYCODE(code) ((code) >= KC_A && (code) <= KC_EXSEL) #define IS_SYSTEM_KEYCODE(code) ((code) >= KC_SYSTEM_POWER && (code) <= KC_SYSTEM_WAKE) #define IS_CONSUMER_KEYCODE(code) ((code) >= KC_AUDIO_MUTE && (code) <= KC_LAUNCHPAD) -#define IS_MOUSE_KEYCODE(code) ((code) >= KC_MS_UP && (code) <= KC_MS_ACCEL2) +#define IS_MOUSE_KEYCODE(code) ((code) >= QK_MOUSE_CURSOR_UP && (code) <= QK_MOUSE_ACCELERATION_2) #define IS_MODIFIER_KEYCODE(code) ((code) >= KC_LEFT_CTRL && (code) <= KC_RIGHT_GUI) #define IS_SWAP_HANDS_KEYCODE(code) ((code) >= QK_SWAP_HANDS_TOGGLE && (code) <= QK_SWAP_HANDS_ONE_SHOT) #define IS_MAGIC_KEYCODE(code) ((code) >= QK_MAGIC_SWAP_CONTROL_CAPS_LOCK && (code) <= QK_MAGIC_TOGGLE_ESCAPE_CAPS_LOCK) @@ -1482,7 +1482,7 @@ enum qk_keycode_defines { #define BASIC_KEYCODE_RANGE KC_A ... KC_EXSEL #define SYSTEM_KEYCODE_RANGE KC_SYSTEM_POWER ... KC_SYSTEM_WAKE #define CONSUMER_KEYCODE_RANGE KC_AUDIO_MUTE ... KC_LAUNCHPAD -#define MOUSE_KEYCODE_RANGE KC_MS_UP ... KC_MS_ACCEL2 +#define MOUSE_KEYCODE_RANGE QK_MOUSE_CURSOR_UP ... QK_MOUSE_ACCELERATION_2 #define MODIFIER_KEYCODE_RANGE KC_LEFT_CTRL ... KC_RIGHT_GUI #define SWAP_HANDS_KEYCODE_RANGE QK_SWAP_HANDS_TOGGLE ... QK_SWAP_HANDS_ONE_SHOT #define MAGIC_KEYCODE_RANGE QK_MAGIC_SWAP_CONTROL_CAPS_LOCK ... QK_MAGIC_TOGGLE_ESCAPE_CAPS_LOCK diff --git a/quantum/keymap_extras/keymap_farsi.h b/quantum/keymap_extras/keymap_farsi.h new file mode 100644 index 0000000000..d268917513 --- /dev/null +++ b/quantum/keymap_extras/keymap_farsi.h @@ -0,0 +1,171 @@ +// Copyright 2024 QMK +// SPDX-License-Identifier: GPL-2.0-or-later + +/******************************************************************************* + 88888888888 888 d8b .d888 d8b 888 d8b + 888 888 Y8P d88P" Y8P 888 Y8P + 888 888 888 888 + 888 88888b. 888 .d8888b 888888 888 888 .d88b. 888 .d8888b + 888 888 "88b 888 88K 888 888 888 d8P Y8b 888 88K + 888 888 888 888 "Y8888b. 888 888 888 88888888 888 "Y8888b. + 888 888 888 888 X88 888 888 888 Y8b. 888 X88 + 888 888 888 888 88888P' 888 888 888 "Y8888 888 88888P' + 888 888 + 888 888 + 888 888 + .d88b. .d88b. 88888b. .d88b. 888d888 8888b. 888888 .d88b. .d88888 + d88P"88b d8P Y8b 888 "88b d8P Y8b 888P" "88b 888 d8P Y8b d88" 888 + 888 888 88888888 888 888 88888888 888 .d888888 888 88888888 888 888 + Y88b 888 Y8b. 888 888 Y8b. 888 888 888 Y88b. Y8b. Y88b 888 + "Y88888 "Y8888 888 888 "Y8888 888 "Y888888 "Y888 "Y8888 "Y88888 + 888 + Y8b d88P + "Y88P" +*******************************************************************************/ + +#pragma once +#include "keycodes.h" +// clang-format off + +// Aliases +#define FA_ZWJ KC_GRV // (zero-width joiner) +#define FA_1A KC_1 // ۱ +#define FA_2A KC_2 // ۲ +#define FA_3A KC_3 // ۳ +#define FA_4A KC_4 // ۴ +#define FA_5A KC_5 // ۵ +#define FA_6A KC_6 // ۶ +#define FA_7A KC_7 // ۷ +#define FA_8A KC_8 // ۸ +#define FA_9A KC_9 // ۹ +#define FA_0A KC_0 // ۰ +#define FA_MINS KC_MINS // - +#define FA_EQL KC_EQL // = +#define FA_ZAD KC_Q // ض +#define FA_SAD KC_W // ص +#define FA_SE KC_E // ث +#define FA_QAF KC_R // ق +#define FA_FE KC_T // ف +#define FA_GHYN KC_Y // غ +#define FA_EYN KC_U // ع +#define FA_HE KC_I // ه +#define FA_KHE KC_O // خ +#define FA_HEJ KC_P // ح +#define FA_JIM KC_LBRC // ج +#define FA_CHE KC_RBRC // چ +#define FA_SHIN KC_A // ش +#define FA_SIN KC_S // س +#define FA_YE KC_D // ی +#define FA_BE KC_F // ب +#define FA_LAM KC_G // ل +#define FA_ALEF KC_H // ا +#define FA_TE KC_J // ت +#define FA_NOON KC_K // ن +#define FA_MIM KC_L // م +#define FA_KAF KC_SCLN // ک +#define FA_GAF KC_QUOT // گ +#define FA_BSLS KC_BSLS // (backslash) +#define FA_LT KC_LT // < +#define FA_ZA KC_Z // ظ +#define FA_TA KC_X // ط +#define FA_ZE KC_C // ز +#define FA_RE KC_V // ر +#define FA_ZAL KC_B // ذ +#define FA_DAL KC_N // د +#define FA_PE KC_M // پ +#define FA_WAW KC_COMM // و +#define FA_DOT KC_DOT // . +#define FA_SLSH KC_SLSH // / +#define FA_SPC KC_SPC // +#define FA_DIV S(FA_ZWJ) // ÷ +#define FA_EXLM S(FA_1A) // ! +#define FA_THS S(FA_2A) // ٬ +#define FA_DECS S(FA_3A) // ٫ +#define FA_RIAL S(FA_4A) // ﷼ +#define FA_PRCA S(FA_5A) // ٪ +#define FA_MUL S(FA_6A) // × +#define FA_COMA S(FA_7A) // ، +#define FA_ASTR S(FA_8A) // * +#define FA_RPRN S(FA_9A) // ) +#define FA_LPRN S(FA_0A) // ( +#define FA_TATW S(FA_MINS) // ـ +#define FA_PLUS S(FA_EQL) // + +#define FA_SUK S(FA_ZAD) // ْ +#define FA_DMTN S(FA_SAD) // ٌ +#define FA_KSTN S(FA_SE) // ٍ +#define FA_FTHN S(FA_QAF) // ً +#define FA_DMM S(FA_FE) // ُ +#define FA_KAS S(FA_GHYN) // ِ +#define FA_FAT S(FA_EYN) // َ +#define FA_TSDD S(FA_HE) // +#define FA_RBRC S(FA_KHE) // ] +#define FA_LBRC S(FA_HEJ) // [ +#define FA_RCBR S(FA_JIM) // } +#define FA_LCBR S(FA_CHE) // { +#define FA_HMZV S(FA_SHIN) // ؤ +#define FA_HMZY S(FA_SIN) // ئ +#define FA_YEA S(FA_YE) // ي +#define FA_HMZU S(FA_BE) // إ +#define FA_HMZO S(FA_LAM) // أ +#define FA_MALF S(FA_ALEF) // آ +#define FA_TEHM S(FA_TE) // ة +#define FA_RQOT S(FA_NOON) // » +#define FA_LQOT S(FA_MIM) // « +#define FA_COLN S(FA_KAF) // : +#define FA_SCLA S(FA_GAF) // ؛ +#define FA_GT S(FA_LT) // > +#define FA_KAFA S(FA_ZA) // ك +#define FA_MADO S(FA_TA) // ٓ +#define FA_JEH S(FA_ZE) // ژ +#define FA_SUPA S(FA_RE) // ٰ +#define FA_ZWNJ S(FA_ZAL) // (zero-width non-joiner) +#define FA_HMZA S(FA_DAL) // ٔ +#define FA_HMZ S(FA_PE) // ء +#define FA_QSA S(FA_SLSH) // ؟ +#define FA_TILD ALGR(FA_ZWJ) // ~ +#define FA_GRV ALGR(FA_1A) // ` +#define FA_AT ALGR(FA_2A) // @ +#define FA_HASH ALGR(FA_3A) // # +#define FA_DLR ALGR(FA_4A) // $ +#define FA_PERC ALGR(FA_5A) // % +#define FA_CIRC ALGR(FA_6A) // ^ +#define FA_AMPR ALGR(FA_7A) // & +#define FA_BULT ALGR(FA_8A) // • +#define FA_LRM ALGR(FA_9A) // (left-to-right mark) +#define FA_RLM ALGR(FA_0A) // (right-to-left mark) +#define FA_UNDS ALGR(FA_MINS) // _ +#define FA_DMNS ALGR(FA_EQL) // − (dead) +#define FA_DEG ALGR(FA_ZAD) // ° +#define FA_EURO ALGR(FA_SE) // € +#define FA_LRO ALGR(FA_HE) // (left-to-right override) +#define FA_RLO ALGR(FA_KHE) // (right-to-left override) +#define FA_PDF ALGR(FA_HEJ) // (pop directional formatting) +#define FA_LRE ALGR(FA_JIM) // (left-to-right embedding) +#define FA_RLE ALGR(FA_CHE) // (right-to-left embedding) +#define FA_ALFM ALGR(FA_YE) // ى +#define FA_ALFW ALGR(FA_ALEF) // ٱ +#define FA_LORP ALGR(FA_NOON) // ﴾ +#define FA_RORP ALGR(FA_MIM) // ﴿ +#define FA_SCLN ALGR(FA_KAF) // ; +#define FA_DQT ALGR(FA_GAF) // " +#define FA_MINA ALGR(FA_BSLS) // - +#define FA_PIPE ALGR(FA_ZA) // | +#define FA_SUBA ALGR(FA_RA) // ٖ +#define FA_HMZB ALGR(FA_DAL) // ء +#define FA_ELLP ALGR(FA_PE) // … +#define FA_COMM ALGR(FA_WAW) // , +#define FA_QUOT ALGR(FA_DOT) // ' +#define FA_QUES ALGR(FA_SLSH) // ? +#define FA_1 S(ALGR(FA_1A)) // 1 +#define FA_2 S(ALGR(FA_2A)) // 2 +#define FA_3 S(ALGR(FA_3A)) // 3 +#define FA_4 S(ALGR(FA_4A)) // 4 +#define FA_5 S(ALGR(FA_5A)) // 5 +#define FA_6 S(ALGR(FA_6A)) // 6 +#define FA_7 S(ALGR(FA_7A)) // 7 +#define FA_8 S(ALGR(FA_8A)) // 8 +#define FA_9 S(ALGR(FA_9A)) // 9 +#define FA_0 S(ALGR(FA_0A)) // 0 +#define FA_BRKP S(ALGR(FA_LT)) // ¦ +#define FA_NNBS S(ALGR(FA_SPC)) // (narrow non-breaking space) + diff --git a/quantum/keymap_introspection.c b/quantum/keymap_introspection.c index 71e3b429ea..327df6e277 100644 --- a/quantum/keymap_introspection.c +++ b/quantum/keymap_introspection.c @@ -10,6 +10,7 @@ #endif // INTROSPECTION_KEYMAP_C #include "keymap_introspection.h" +#include "util.h" //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Key mapping @@ -83,7 +84,7 @@ uint16_t keycode_at_dip_switch_map_location_raw(uint8_t switch_idx, bool on) { return KC_TRNS; } -uint16_t keycode_at_dip_switch_map_location(uint8_t switch_idx, bool on) { +__attribute__((weak)) uint16_t keycode_at_dip_switch_map_location(uint8_t switch_idx, bool on) { return keycode_at_dip_switch_map_location_raw(switch_idx, on); } @@ -95,13 +96,16 @@ uint16_t keycode_at_dip_switch_map_location(uint8_t switch_idx, bool on) { #if defined(COMBO_ENABLE) uint16_t combo_count_raw(void) { - return sizeof(key_combos) / sizeof(combo_t); + return ARRAY_SIZE(key_combos); } __attribute__((weak)) uint16_t combo_count(void) { return combo_count_raw(); } combo_t* combo_get_raw(uint16_t combo_idx) { + if (combo_idx >= combo_count_raw()) { + return NULL; + } return &key_combos[combo_idx]; } __attribute__((weak)) combo_t* combo_get(uint16_t combo_idx) { @@ -109,3 +113,55 @@ __attribute__((weak)) combo_t* combo_get(uint16_t combo_idx) { } #endif // defined(COMBO_ENABLE) + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// Tap Dance + +#if defined(TAP_DANCE_ENABLE) + +uint16_t tap_dance_count_raw(void) { + return ARRAY_SIZE(tap_dance_actions); +} + +__attribute__((weak)) uint16_t tap_dance_count(void) { + return tap_dance_count_raw(); +} + +tap_dance_action_t* tap_dance_get_raw(uint16_t tap_dance_idx) { + if (tap_dance_idx >= tap_dance_count_raw()) { + return NULL; + } + return &tap_dance_actions[tap_dance_idx]; +} + +__attribute__((weak)) tap_dance_action_t* tap_dance_get(uint16_t tap_dance_idx) { + return tap_dance_get_raw(tap_dance_idx); +} + +#endif // defined(TAP_DANCE_ENABLE) + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// Key Overrides + +#if defined(KEY_OVERRIDE_ENABLE) + +uint16_t key_override_count_raw(void) { + return ARRAY_SIZE(key_overrides); +} + +__attribute__((weak)) uint16_t key_override_count(void) { + return key_override_count_raw(); +} + +const key_override_t* key_override_get_raw(uint16_t key_override_idx) { + if (key_override_idx >= key_override_count_raw()) { + return NULL; + } + return key_overrides[key_override_idx]; +} + +__attribute__((weak)) const key_override_t* key_override_get(uint16_t key_override_idx) { + return key_override_get_raw(key_override_idx); +} + +#endif // defined(KEY_OVERRIDE_ENABLE) diff --git a/quantum/keymap_introspection.h b/quantum/keymap_introspection.h index f7516bf42a..719825c674 100644 --- a/quantum/keymap_introspection.h +++ b/quantum/keymap_introspection.h @@ -61,9 +61,51 @@ uint16_t combo_count_raw(void); // Get the number of combos defined in the user's keymap, potentially stored dynamically uint16_t combo_count(void); -// Get the keycode for the encoder mapping location, stored in firmware rather than any other persistent storage +// Get the combo definition, stored in firmware rather than any other persistent storage combo_t* combo_get_raw(uint16_t combo_idx); -// Get the keycode for the encoder mapping location, potentially stored dynamically +// Get the combo definition, potentially stored dynamically combo_t* combo_get(uint16_t combo_idx); #endif // defined(COMBO_ENABLE) + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// Tap Dance + +#if defined(TAP_DANCE_ENABLE) + +// Forward declaration of tap_dance_action_t so we don't need to deal with header reordering +struct tap_dance_action_t; +typedef struct tap_dance_action_t tap_dance_action_t; + +// Get the number of tap dances defined in the user's keymap, stored in firmware rather than any other persistent storage +uint16_t tap_dance_count_raw(void); +// Get the number of tap dances defined in the user's keymap, potentially stored dynamically +uint16_t tap_dance_count(void); + +// Get the tap dance definitions, stored in firmware rather than any other persistent storage +tap_dance_action_t* tap_dance_get_raw(uint16_t tap_dance_idx); +// Get the tap dance definitions, potentially stored dynamically +tap_dance_action_t* tap_dance_get(uint16_t tap_dance_idx); + +#endif // defined(TAP_DANCE_ENABLE) + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// Key Overrides + +#if defined(KEY_OVERRIDE_ENABLE) + +// Forward declaration of key_override_t so we don't need to deal with header reordering +struct key_override_t; +typedef struct key_override_t key_override_t; + +// Get the number of key overrides defined in the user's keymap, stored in firmware rather than any other persistent storage +uint16_t key_override_count_raw(void); +// Get the number of key overrides defined in the user's keymap, potentially stored dynamically +uint16_t key_override_count(void); + +// Get the key override definitions, stored in firmware rather than any other persistent storage +const key_override_t* key_override_get_raw(uint16_t key_override_idx); +// Get the key override definitions, potentially stored dynamically +const key_override_t* key_override_get(uint16_t key_override_idx); + +#endif // defined(KEY_OVERRIDE_ENABLE) diff --git a/quantum/led.c b/quantum/led.c index e2b5985109..aec3edc823 100644 --- a/quantum/led.c +++ b/quantum/led.c @@ -56,19 +56,15 @@ static void handle_backlight_caps_lock(led_t led_state) { #endif static uint32_t last_led_modification_time = 0; -uint32_t last_led_activity_time(void) { + +uint32_t last_led_activity_time(void) { return last_led_modification_time; } + uint32_t last_led_activity_elapsed(void) { return timer_elapsed32(last_led_modification_time); } -/** \brief Lock LED set callback - keymap/user level - * - * \deprecated Use led_update_user() instead. - */ -__attribute__((weak)) void led_set_user(uint8_t usb_led) {} - /** \brief Lock LED update callback - keymap/user level * * \return True if led_update_kb() should run its own code, false otherwise. @@ -146,7 +142,6 @@ __attribute__((weak)) void led_set(uint8_t usb_led) { handle_backlight_caps_lock((led_t)usb_led); #endif - led_set_user(usb_led); led_update_kb((led_t)usb_led); } diff --git a/quantum/led.h b/quantum/led.h index b9fad670ae..669e93e194 100644 --- a/quantum/led.h +++ b/quantum/led.h @@ -48,9 +48,6 @@ void led_wakeup(void); void led_task(void); -/* Deprecated callbacks */ -void led_set_user(uint8_t usb_led); - /* Callbacks */ bool led_update_user(led_t led_state); bool led_update_kb(led_t led_state); diff --git a/quantum/matrix.c b/quantum/matrix.c index d4586efac2..a877fb4e41 100644 --- a/quantum/matrix.c +++ b/quantum/matrix.c @@ -76,21 +76,21 @@ __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, matrix_row_t row_shifter); -static inline void setPinOutput_writeLow(pin_t pin) { +static inline void gpio_atomic_set_pin_output_low(pin_t pin) { ATOMIC_BLOCK_FORCEON { gpio_set_pin_output(pin); gpio_write_pin_low(pin); } } -static inline void setPinOutput_writeHigh(pin_t pin) { +static inline void gpio_atomic_set_pin_output_high(pin_t pin) { ATOMIC_BLOCK_FORCEON { gpio_set_pin_output(pin); gpio_write_pin_high(pin); } } -static inline void setPinInputHigh_atomic(pin_t pin) { +static inline void gpio_atomic_set_pin_input_high(pin_t pin) { ATOMIC_BLOCK_FORCEON { gpio_set_pin_input_high(pin); } @@ -140,7 +140,7 @@ __attribute__((weak)) void matrix_read_cols_on_row(matrix_row_t current_matrix[] static bool select_row(uint8_t row) { pin_t pin = row_pins[row]; if (pin != NO_PIN) { - setPinOutput_writeLow(pin); + gpio_atomic_set_pin_output_low(pin); return true; } return false; @@ -150,9 +150,9 @@ static void unselect_row(uint8_t row) { pin_t pin = row_pins[row]; if (pin != NO_PIN) { # ifdef MATRIX_UNSELECT_DRIVE_HIGH - setPinOutput_writeHigh(pin); + gpio_atomic_set_pin_output_high(pin); # else - setPinInputHigh_atomic(pin); + gpio_atomic_set_pin_input_high(pin); # endif } } @@ -167,7 +167,7 @@ __attribute__((weak)) void matrix_init_pins(void) { unselect_rows(); for (uint8_t x = 0; x < MATRIX_COLS; x++) { if (col_pins[x] != NO_PIN) { - setPinInputHigh_atomic(col_pins[x]); + gpio_atomic_set_pin_input_high(col_pins[x]); } } } @@ -203,7 +203,7 @@ __attribute__((weak)) void matrix_read_cols_on_row(matrix_row_t current_matrix[] static bool select_col(uint8_t col) { pin_t pin = col_pins[col]; if (pin != NO_PIN) { - setPinOutput_writeLow(pin); + gpio_atomic_set_pin_output_low(pin); return true; } return false; @@ -213,9 +213,9 @@ static void unselect_col(uint8_t col) { pin_t pin = col_pins[col]; if (pin != NO_PIN) { # ifdef MATRIX_UNSELECT_DRIVE_HIGH - setPinOutput_writeHigh(pin); + gpio_atomic_set_pin_output_high(pin); # else - setPinInputHigh_atomic(pin); + gpio_atomic_set_pin_input_high(pin); # endif } } @@ -230,7 +230,7 @@ __attribute__((weak)) void matrix_init_pins(void) { unselect_cols(); for (uint8_t x = 0; x < ROWS_PER_HAND; x++) { if (row_pins[x] != NO_PIN) { - setPinInputHigh_atomic(row_pins[x]); + gpio_atomic_set_pin_input_high(row_pins[x]); } } } diff --git a/quantum/mousekey.c b/quantum/mousekey.c index 3910811752..9649943a0d 100644 --- a/quantum/mousekey.c +++ b/quantum/mousekey.c @@ -391,58 +391,58 @@ void mousekey_on(uint8_t code) { } # endif -# ifndef MOUSEKEY_INERTIA +# if defined(MOUSEKEY_OVERLAP_RESET) && !defined(MOUSEKEY_INERTIA) // If mouse report is not zero, the current mousekey press is overlapping // with another. Restart acceleration for smoother directional transition. if (mouse_report.x || mouse_report.y || mouse_report.h || mouse_report.v) { # ifdef MK_KINETIC_SPEED - mouse_timer = timer_read() - (MOUSEKEY_INTERVAL << 2); + mouse_timer = timer_read() - MOUSEKEY_OVERLAP_INTERVAL; # else - mousekey_repeat = MOUSEKEY_MOVE_DELTA; - mousekey_wheel_repeat = MOUSEKEY_WHEEL_DELTA; + mousekey_repeat = MOUSEKEY_OVERLAP_MOVE_DELTA; + mousekey_wheel_repeat = MOUSEKEY_OVERLAP_WHEEL_DELTA; # endif } -# endif // ifndef MOUSEKEY_INERTIA +# endif // defined(MOUSEKEY_OVERLAP_RESET) && !defined(MOUSEKEY_INERTIA) # ifdef MOUSEKEY_INERTIA // initial keypress sets impulse and activates first frame of movement - if ((code == KC_MS_UP) || (code == KC_MS_DOWN)) { - mousekey_y_dir = (code == KC_MS_DOWN) ? 1 : -1; + if ((code == QK_MOUSE_CURSOR_UP) || (code == QK_MOUSE_CURSOR_DOWN)) { + mousekey_y_dir = (code == QK_MOUSE_CURSOR_DOWN) ? 1 : -1; if (mousekey_frame < 2) mouse_report.y = move_unit(1); - } else if ((code == KC_MS_LEFT) || (code == KC_MS_RIGHT)) { - mousekey_x_dir = (code == KC_MS_RIGHT) ? 1 : -1; + } else if ((code == QK_MOUSE_CURSOR_LEFT) || (code == QK_MOUSE_CURSOR_RIGHT)) { + mousekey_x_dir = (code == QK_MOUSE_CURSOR_RIGHT) ? 1 : -1; if (mousekey_frame < 2) mouse_report.x = move_unit(0); } # else // no inertia - if (code == KC_MS_UP) + if (code == QK_MOUSE_CURSOR_UP) mouse_report.y = move_unit() * -1; - else if (code == KC_MS_DOWN) + else if (code == QK_MOUSE_CURSOR_DOWN) mouse_report.y = move_unit(); - else if (code == KC_MS_LEFT) + else if (code == QK_MOUSE_CURSOR_LEFT) mouse_report.x = move_unit() * -1; - else if (code == KC_MS_RIGHT) + else if (code == QK_MOUSE_CURSOR_RIGHT) mouse_report.x = move_unit(); # endif // inertia or not - else if (code == KC_MS_WH_UP) + else if (code == QK_MOUSE_WHEEL_UP) mouse_report.v = wheel_unit(); - else if (code == KC_MS_WH_DOWN) + else if (code == QK_MOUSE_WHEEL_DOWN) mouse_report.v = wheel_unit() * -1; - else if (code == KC_MS_WH_LEFT) + else if (code == QK_MOUSE_WHEEL_LEFT) mouse_report.h = wheel_unit() * -1; - else if (code == KC_MS_WH_RIGHT) + else if (code == QK_MOUSE_WHEEL_RIGHT) mouse_report.h = wheel_unit(); else if (IS_MOUSEKEY_BUTTON(code)) - mouse_report.buttons |= 1 << (code - KC_MS_BTN1); - else if (code == KC_MS_ACCEL0) + mouse_report.buttons |= 1 << (code - QK_MOUSE_BUTTON_1); + else if (code == QK_MOUSE_ACCELERATION_0) mousekey_accel |= (1 << 0); - else if (code == KC_MS_ACCEL1) + else if (code == QK_MOUSE_ACCELERATION_1) mousekey_accel |= (1 << 1); - else if (code == KC_MS_ACCEL2) + else if (code == QK_MOUSE_ACCELERATION_2) mousekey_accel |= (1 << 2); } @@ -450,43 +450,43 @@ void mousekey_off(uint8_t code) { # ifdef MOUSEKEY_INERTIA // key release clears impulse unless opposite direction is held - if ((code == KC_MS_UP) && (mousekey_y_dir < 1)) + if ((code == QK_MOUSE_CURSOR_UP) && (mousekey_y_dir < 1)) mousekey_y_dir = 0; - else if ((code == KC_MS_DOWN) && (mousekey_y_dir > -1)) + else if ((code == QK_MOUSE_CURSOR_DOWN) && (mousekey_y_dir > -1)) mousekey_y_dir = 0; - else if ((code == KC_MS_LEFT) && (mousekey_x_dir < 1)) + else if ((code == QK_MOUSE_CURSOR_LEFT) && (mousekey_x_dir < 1)) mousekey_x_dir = 0; - else if ((code == KC_MS_RIGHT) && (mousekey_x_dir > -1)) + else if ((code == QK_MOUSE_CURSOR_RIGHT) && (mousekey_x_dir > -1)) mousekey_x_dir = 0; # else // no inertia - if (code == KC_MS_UP && mouse_report.y < 0) + if (code == QK_MOUSE_CURSOR_UP && mouse_report.y < 0) mouse_report.y = 0; - else if (code == KC_MS_DOWN && mouse_report.y > 0) + else if (code == QK_MOUSE_CURSOR_DOWN && mouse_report.y > 0) mouse_report.y = 0; - else if (code == KC_MS_LEFT && mouse_report.x < 0) + else if (code == QK_MOUSE_CURSOR_LEFT && mouse_report.x < 0) mouse_report.x = 0; - else if (code == KC_MS_RIGHT && mouse_report.x > 0) + else if (code == QK_MOUSE_CURSOR_RIGHT && mouse_report.x > 0) mouse_report.x = 0; # endif // inertia or not - else if (code == KC_MS_WH_UP && mouse_report.v > 0) + else if (code == QK_MOUSE_WHEEL_UP && mouse_report.v > 0) mouse_report.v = 0; - else if (code == KC_MS_WH_DOWN && mouse_report.v < 0) + else if (code == QK_MOUSE_WHEEL_DOWN && mouse_report.v < 0) mouse_report.v = 0; - else if (code == KC_MS_WH_LEFT && mouse_report.h < 0) + else if (code == QK_MOUSE_WHEEL_LEFT && mouse_report.h < 0) mouse_report.h = 0; - else if (code == KC_MS_WH_RIGHT && mouse_report.h > 0) + else if (code == QK_MOUSE_WHEEL_RIGHT && mouse_report.h > 0) mouse_report.h = 0; else if (IS_MOUSEKEY_BUTTON(code)) - mouse_report.buttons &= ~(1 << (code - KC_MS_BTN1)); - else if (code == KC_MS_ACCEL0) + mouse_report.buttons &= ~(1 << (code - QK_MOUSE_BUTTON_1)); + else if (code == QK_MOUSE_ACCELERATION_0) mousekey_accel &= ~(1 << 0); - else if (code == KC_MS_ACCEL1) + else if (code == QK_MOUSE_ACCELERATION_1) mousekey_accel &= ~(1 << 1); - else if (code == KC_MS_ACCEL2) + else if (code == QK_MOUSE_ACCELERATION_2) mousekey_accel &= ~(1 << 2); if (mouse_report.x == 0 && mouse_report.y == 0) { mousekey_repeat = 0; @@ -568,29 +568,29 @@ void mousekey_on(uint8_t code) { uint16_t const c_offset = c_offsets[mk_speed]; uint16_t const w_offset = w_offsets[mk_speed]; uint8_t const old_speed = mk_speed; - if (code == KC_MS_UP) + if (code == QK_MOUSE_CURSOR_UP) mouse_report.y = c_offset * -1; - else if (code == KC_MS_DOWN) + else if (code == QK_MOUSE_CURSOR_DOWN) mouse_report.y = c_offset; - else if (code == KC_MS_LEFT) + else if (code == QK_MOUSE_CURSOR_LEFT) mouse_report.x = c_offset * -1; - else if (code == KC_MS_RIGHT) + else if (code == QK_MOUSE_CURSOR_RIGHT) mouse_report.x = c_offset; - else if (code == KC_MS_WH_UP) + else if (code == QK_MOUSE_WHEEL_UP) mouse_report.v = w_offset; - else if (code == KC_MS_WH_DOWN) + else if (code == QK_MOUSE_WHEEL_DOWN) mouse_report.v = w_offset * -1; - else if (code == KC_MS_WH_LEFT) + else if (code == QK_MOUSE_WHEEL_LEFT) mouse_report.h = w_offset * -1; - else if (code == KC_MS_WH_RIGHT) + else if (code == QK_MOUSE_WHEEL_RIGHT) mouse_report.h = w_offset; else if (IS_MOUSEKEY_BUTTON(code)) - mouse_report.buttons |= 1 << (code - KC_MS_BTN1); - else if (code == KC_MS_ACCEL0) + mouse_report.buttons |= 1 << (code - QK_MOUSE_BUTTON_1); + else if (code == QK_MOUSE_ACCELERATION_0) mk_speed = mkspd_0; - else if (code == KC_MS_ACCEL1) + else if (code == QK_MOUSE_ACCELERATION_1) mk_speed = mkspd_1; - else if (code == KC_MS_ACCEL2) + else if (code == QK_MOUSE_ACCELERATION_2) mk_speed = mkspd_2; if (mk_speed != old_speed) adjust_speed(); } @@ -599,30 +599,30 @@ void mousekey_off(uint8_t code) { # ifdef MK_MOMENTARY_ACCEL uint8_t const old_speed = mk_speed; # endif - if (code == KC_MS_UP && mouse_report.y < 0) + if (code == QK_MOUSE_CURSOR_UP && mouse_report.y < 0) mouse_report.y = 0; - else if (code == KC_MS_DOWN && mouse_report.y > 0) + else if (code == QK_MOUSE_CURSOR_DOWN && mouse_report.y > 0) mouse_report.y = 0; - else if (code == KC_MS_LEFT && mouse_report.x < 0) + else if (code == QK_MOUSE_CURSOR_LEFT && mouse_report.x < 0) mouse_report.x = 0; - else if (code == KC_MS_RIGHT && mouse_report.x > 0) + else if (code == QK_MOUSE_CURSOR_RIGHT && mouse_report.x > 0) mouse_report.x = 0; - else if (code == KC_MS_WH_UP && mouse_report.v > 0) + else if (code == QK_MOUSE_WHEEL_UP && mouse_report.v > 0) mouse_report.v = 0; - else if (code == KC_MS_WH_DOWN && mouse_report.v < 0) + else if (code == QK_MOUSE_WHEEL_DOWN && mouse_report.v < 0) mouse_report.v = 0; - else if (code == KC_MS_WH_LEFT && mouse_report.h < 0) + else if (code == QK_MOUSE_WHEEL_LEFT && mouse_report.h < 0) mouse_report.h = 0; - else if (code == KC_MS_WH_RIGHT && mouse_report.h > 0) + else if (code == QK_MOUSE_WHEEL_RIGHT && mouse_report.h > 0) mouse_report.h = 0; else if (IS_MOUSEKEY_BUTTON(code)) - mouse_report.buttons &= ~(1 << (code - KC_MS_BTN1)); + mouse_report.buttons &= ~(1 << (code - QK_MOUSE_BUTTON_1)); # ifdef MK_MOMENTARY_ACCEL - else if (code == KC_MS_ACCEL0) + else if (code == QK_MOUSE_ACCELERATION_0) mk_speed = mkspd_DEFAULT; - else if (code == KC_MS_ACCEL1) + else if (code == QK_MOUSE_ACCELERATION_1) mk_speed = mkspd_DEFAULT; - else if (code == KC_MS_ACCEL2) + else if (code == QK_MOUSE_ACCELERATION_2) mk_speed = mkspd_DEFAULT; if (mk_speed != old_speed) adjust_speed(); # endif diff --git a/quantum/mousekey.h b/quantum/mousekey.h index 73380b743a..e7a790b9a9 100644 --- a/quantum/mousekey.h +++ b/quantum/mousekey.h @@ -174,6 +174,16 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #endif /* #ifndef MK_3_SPEED */ +#ifndef MOUSEKEY_OVERLAP_MOVE_DELTA +# define MOUSEKEY_OVERLAP_MOVE_DELTA MOUSEKEY_MOVE_DELTA +#endif +#ifndef MOUSEKEY_OVERLAP_WHEEL_DELTA +# define MOUSEKEY_OVERLAP_WHEEL_DELTA MOUSEKEY_WHEEL_DELTA +#endif +#ifndef MOUSEKEY_OVERLAP_INTERVAL +# define MOUSEKEY_OVERLAP_INTERVAL MOUSEKEY_INTERVAL +#endif + #ifdef __cplusplus extern "C" { #endif diff --git a/quantum/painter/qp.h b/quantum/painter/qp.h index 02acbf589a..820c418f43 100644 --- a/quantum/painter/qp.h +++ b/quantum/painter/qp.h @@ -539,6 +539,12 @@ int16_t qp_drawtext_recolor(painter_device_t device, uint16_t x, uint16_t y, pai # define GC9A01_NUM_DEVICES 0 #endif // QUANTUM_PAINTER_GC9A01_ENABLE +#ifdef QUANTUM_PAINTER_GC9107_ENABLE +# include "qp_gc9107.h" +#else // QUANTUM_PAINTER_GC9107_ENABLE +# define GC9107_NUM_DEVICES 0 +#endif // QUANTUM_PAINTER_GC9107_ENABLE + #ifdef QUANTUM_PAINTER_SSD1351_ENABLE # include "qp_ssd1351.h" #else // QUANTUM_PAINTER_SSD1351_ENABLE diff --git a/quantum/painter/qp_internal.c b/quantum/painter/qp_internal.c index 1f0f981796..7d4a6430af 100644 --- a/quantum/painter/qp_internal.c +++ b/quantum/painter/qp_internal.c @@ -16,6 +16,7 @@ enum { + (ST7789_NUM_DEVICES) // ST7789 + (ST7735_NUM_DEVICES) // ST7735 + (GC9A01_NUM_DEVICES) // GC9A01 + + (GC9107_NUM_DEVICES) // GC9107 + (SSD1351_NUM_DEVICES) // SSD1351 + (SH1106_NUM_DEVICES) // SH1106 }; diff --git a/quantum/painter/rules.mk b/quantum/painter/rules.mk index d991a6d742..7b2ab702ee 100644 --- a/quantum/painter/rules.mk +++ b/quantum/painter/rules.mk @@ -14,6 +14,7 @@ VALID_QUANTUM_PAINTER_DRIVERS := \ st7735_spi \ st7789_spi \ gc9a01_spi \ + gc9107_spi \ ssd1351_spi \ sh1106_i2c \ sh1106_spi @@ -131,10 +132,21 @@ define handle_quantum_painter_driver OPT_DEFS += -DQUANTUM_PAINTER_GC9A01_ENABLE -DQUANTUM_PAINTER_GC9A01_SPI_ENABLE COMMON_VPATH += \ $(DRIVER_PATH)/painter/tft_panel \ - $(DRIVER_PATH)/painter/gc9a01 + $(DRIVER_PATH)/painter/gc9xxx SRC += \ $(DRIVER_PATH)/painter/tft_panel/qp_tft_panel.c \ - $(DRIVER_PATH)/painter/gc9a01/qp_gc9a01.c + $(DRIVER_PATH)/painter/gc9xxx/qp_gc9a01.c + + else ifeq ($$(strip $$(CURRENT_PAINTER_DRIVER)),gc9107_spi) + QUANTUM_PAINTER_NEEDS_COMMS_SPI := yes + QUANTUM_PAINTER_NEEDS_COMMS_SPI_DC_RESET := yes + OPT_DEFS += -DQUANTUM_PAINTER_GC9107_ENABLE -DQUANTUM_PAINTER_GC9107_SPI_ENABLE + COMMON_VPATH += \ + $(DRIVER_PATH)/painter/tft_panel \ + $(DRIVER_PATH)/painter/gc9xxx + SRC += \ + $(DRIVER_PATH)/painter/tft_panel/qp_tft_panel.c \ + $(DRIVER_PATH)/painter/gc9xxx/qp_gc9107.c else ifeq ($$(strip $$(CURRENT_PAINTER_DRIVER)),ssd1351_spi) QUANTUM_PAINTER_NEEDS_COMMS_SPI := yes diff --git a/quantum/pointing_device/pointing_device.c b/quantum/pointing_device/pointing_device.c index 4682aceb14..74ce9108a9 100644 --- a/quantum/pointing_device/pointing_device.c +++ b/quantum/pointing_device/pointing_device.c @@ -498,7 +498,7 @@ __attribute__((weak)) report_mouse_t pointing_device_task_combined_user(report_m __attribute__((weak)) void pointing_device_keycode_handler(uint16_t keycode, bool pressed) { if IS_MOUSEKEY_BUTTON (keycode) { - local_mouse_report.buttons = pointing_device_handle_buttons(local_mouse_report.buttons, pressed, keycode - KC_MS_BTN1); + local_mouse_report.buttons = pointing_device_handle_buttons(local_mouse_report.buttons, pressed, keycode - QK_MOUSE_BUTTON_1); pointing_device_send(); } } diff --git a/quantum/pointing_device/pointing_device_auto_mouse.h b/quantum/pointing_device/pointing_device_auto_mouse.h index a596c065a3..2c0d4d1043 100644 --- a/quantum/pointing_device/pointing_device_auto_mouse.h +++ b/quantum/pointing_device/pointing_device_auto_mouse.h @@ -37,7 +37,7 @@ # define AUTO_MOUSE_TIME 650 #endif #ifndef AUTO_MOUSE_DELAY -# define AUTO_MOUSE_DELAY GET_TAPPING_TERM(KC_MS_BTN1, &(keyrecord_t){}) +# define AUTO_MOUSE_DELAY GET_TAPPING_TERM(QK_MOUSE_BUTTON_1, &(keyrecord_t){}) #endif #ifndef AUTO_MOUSE_DEBOUNCE # define AUTO_MOUSE_DEBOUNCE 25 diff --git a/quantum/process_keycode/process_dynamic_macro.c b/quantum/process_keycode/process_dynamic_macro.c index 214cd80a87..f8e8256ac8 100644 --- a/quantum/process_keycode/process_dynamic_macro.c +++ b/quantum/process_keycode/process_dynamic_macro.c @@ -38,20 +38,44 @@ void dynamic_macro_led_blink(void) { /* User hooks for Dynamic Macros */ -__attribute__((weak)) void dynamic_macro_record_start_user(int8_t direction) { +__attribute__((weak)) bool dynamic_macro_record_start_kb(int8_t direction) { + return dynamic_macro_record_start_user(direction); +} + +__attribute__((weak)) bool dynamic_macro_record_start_user(int8_t direction) { dynamic_macro_led_blink(); + return true; +} + +__attribute__((weak)) bool dynamic_macro_play_kb(int8_t direction) { + return dynamic_macro_play_user(direction); } -__attribute__((weak)) void dynamic_macro_play_user(int8_t direction) { +__attribute__((weak)) bool dynamic_macro_play_user(int8_t direction) { dynamic_macro_led_blink(); + return true; +} + +__attribute__((weak)) bool dynamic_macro_record_key_kb(int8_t direction, keyrecord_t *record) { + return dynamic_macro_record_key_user(direction, record); } -__attribute__((weak)) void dynamic_macro_record_key_user(int8_t direction, keyrecord_t *record) { +__attribute__((weak)) bool dynamic_macro_record_key_user(int8_t direction, keyrecord_t *record) { dynamic_macro_led_blink(); + return true; +} + +__attribute__((weak)) bool dynamic_macro_record_end_kb(int8_t direction) { + return dynamic_macro_record_end_user(direction); } -__attribute__((weak)) void dynamic_macro_record_end_user(int8_t direction) { +__attribute__((weak)) bool dynamic_macro_record_end_user(int8_t direction) { dynamic_macro_led_blink(); + return true; +} + +__attribute__((weak)) bool dynamic_macro_valid_key_kb(uint16_t keycode, keyrecord_t *record) { + return dynamic_macro_valid_key_user(keycode, record); } __attribute__((weak)) bool dynamic_macro_valid_key_user(uint16_t keycode, keyrecord_t *record) { @@ -74,7 +98,7 @@ __attribute__((weak)) bool dynamic_macro_valid_key_user(uint16_t keycode, keyrec void dynamic_macro_record_start(keyrecord_t **macro_pointer, keyrecord_t *macro_buffer, int8_t direction) { dprintln("dynamic macro recording: started"); - dynamic_macro_record_start_user(direction); + dynamic_macro_record_start_kb(direction); clear_keyboard(); layer_clear(); @@ -108,7 +132,7 @@ void dynamic_macro_play(keyrecord_t *macro_buffer, keyrecord_t *macro_end, int8_ layer_state_set(saved_layer_state); - dynamic_macro_play_user(direction); + dynamic_macro_play_kb(direction); } /** @@ -134,7 +158,7 @@ void dynamic_macro_record_key(keyrecord_t *macro_buffer, keyrecord_t **macro_poi **macro_pointer = *record; *macro_pointer += direction; } - dynamic_macro_record_key_user(direction, record); + dynamic_macro_record_key_kb(direction, record); dprintf("dynamic macro: slot %d length: %d/%d\n", DYNAMIC_MACRO_CURRENT_SLOT(), DYNAMIC_MACRO_CURRENT_LENGTH(macro_buffer, *macro_pointer), DYNAMIC_MACRO_CURRENT_CAPACITY(macro_buffer, macro2_end)); } @@ -144,7 +168,7 @@ void dynamic_macro_record_key(keyrecord_t *macro_buffer, keyrecord_t **macro_poi * pointer to the end of the macro. */ void dynamic_macro_record_end(keyrecord_t *macro_buffer, keyrecord_t *macro_pointer, int8_t direction, keyrecord_t **macro_end) { - dynamic_macro_record_end_user(direction); + dynamic_macro_record_end_kb(direction); /* Do not save the keys being held when stopping the recording, * i.e. the keys used to access the layer DM_RSTP is on. @@ -220,15 +244,7 @@ void dynamic_macro_stop_recording(void) { macro_id = 0; } -/* Handle the key events related to the dynamic macros. Should be - * called from process_record_user() like this: - * - * bool process_record_user(uint16_t keycode, keyrecord_t *record) { - * if (!process_record_dynamic_macro(keycode, record)) { - * return false; - * } - * <...THE REST OF THE FUNCTION...> - * } +/* Handle the key events related to the dynamic macros. */ bool process_dynamic_macro(uint16_t keycode, keyrecord_t *record) { if (macro_id == 0) { @@ -271,7 +287,7 @@ bool process_dynamic_macro(uint16_t keycode, keyrecord_t *record) { return false; #endif default: - if (dynamic_macro_valid_key_user(keycode, record)) { + if (dynamic_macro_valid_key_kb(keycode, record)) { /* Store the key in the macro buffer and process it normally. */ switch (macro_id) { case 1: diff --git a/quantum/process_keycode/process_dynamic_macro.h b/quantum/process_keycode/process_dynamic_macro.h index 2f10733cae..984fc0cd41 100644 --- a/quantum/process_keycode/process_dynamic_macro.h +++ b/quantum/process_keycode/process_dynamic_macro.h @@ -37,8 +37,14 @@ void dynamic_macro_led_blink(void); bool process_dynamic_macro(uint16_t keycode, keyrecord_t *record); -void dynamic_macro_record_start_user(int8_t direction); -void dynamic_macro_play_user(int8_t direction); -void dynamic_macro_record_key_user(int8_t direction, keyrecord_t *record); -void dynamic_macro_record_end_user(int8_t direction); +bool dynamic_macro_record_start_kb(int8_t direction); +bool dynamic_macro_record_start_user(int8_t direction); +bool dynamic_macro_play_kb(int8_t direction); +bool dynamic_macro_play_user(int8_t direction); +bool dynamic_macro_record_key_kb(int8_t direction, keyrecord_t *record); +bool dynamic_macro_record_key_user(int8_t direction, keyrecord_t *record); +bool dynamic_macro_record_end_kb(int8_t direction); +bool dynamic_macro_record_end_user(int8_t direction); +bool dynamic_macro_valid_key_kb(uint16_t keycode, keyrecord_t *record); +bool dynamic_macro_valid_key_user(uint16_t keycode, keyrecord_t *record); void dynamic_macro_stop_recording(void); diff --git a/quantum/process_keycode/process_key_override.c b/quantum/process_keycode/process_key_override.c index 264e2562b8..ce30477ee8 100644 --- a/quantum/process_keycode/process_key_override.c +++ b/quantum/process_keycode/process_key_override.c @@ -23,6 +23,7 @@ #include "action_util.h" #include "quantum.h" #include "quantum_keycodes.h" +#include "keymap_introspection.h" #ifndef KEY_OVERRIDE_REPEAT_DELAY # define KEY_OVERRIDE_REPEAT_DELAY 500 @@ -83,9 +84,6 @@ 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); @@ -247,12 +245,12 @@ static bool check_activation_event(const key_override_t *override, const bool ke /** 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) { + if (key_override_count() == 0) { return true; } - for (uint8_t i = 0;; i++) { - const key_override_t *const override = key_overrides[i]; + for (uint8_t i = 0; i < key_override_count(); i++) { + const key_override_t *const override = key_override_get(i); // End of array if (override == NULL) { diff --git a/quantum/process_keycode/process_key_override.h b/quantum/process_keycode/process_key_override.h index 3e37c7e63a..9ec84dbe6e 100644 --- a/quantum/process_keycode/process_key_override.h +++ b/quantum/process_keycode/process_key_override.h @@ -55,7 +55,7 @@ typedef enum { } ko_option_t; /** Defines a single key override */ -typedef struct { +typedef struct key_override_t { // 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; @@ -87,9 +87,6 @@ typedef struct { 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); diff --git a/quantum/process_keycode/process_rgb_matrix.c b/quantum/process_keycode/process_rgb_matrix.c new file mode 100644 index 0000000000..fd2aa1a0c7 --- /dev/null +++ b/quantum/process_keycode/process_rgb_matrix.c @@ -0,0 +1,101 @@ +// Copyright 2024 QMK +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "process_rgb_matrix.h" +#include "rgb_matrix.h" +#include "action_util.h" +#include "keycodes.h" +#include "modifiers.h" + +bool process_rgb_matrix(uint16_t keycode, keyrecord_t *record) { +#ifdef RGB_TRIGGER_ON_KEYDOWN + if (record->event.pressed) { +#else + if (!record->event.pressed) { +#endif + bool shifted = get_mods() & MOD_MASK_SHIFT; + switch (keycode) { + case QK_RGB_MATRIX_ON: + rgb_matrix_enable(); + return false; + case QK_RGB_MATRIX_OFF: + rgb_matrix_disable(); + return false; + case QK_RGB_MATRIX_TOGGLE: + rgb_matrix_toggle(); + return false; + case QK_RGB_MATRIX_MODE_NEXT: + if (shifted) { + rgb_matrix_step_reverse(); + } else { + rgb_matrix_step(); + } + return false; + case QK_RGB_MATRIX_MODE_PREVIOUS: + if (shifted) { + rgb_matrix_step(); + } else { + rgb_matrix_step_reverse(); + } + return false; + case QK_RGB_MATRIX_HUE_UP: + if (shifted) { + rgb_matrix_decrease_hue(); + } else { + rgb_matrix_increase_hue(); + } + return false; + case QK_RGB_MATRIX_HUE_DOWN: + if (shifted) { + rgb_matrix_increase_hue(); + } else { + rgb_matrix_decrease_hue(); + } + return false; + case QK_RGB_MATRIX_SATURATION_UP: + if (shifted) { + rgb_matrix_decrease_sat(); + } else { + rgb_matrix_increase_sat(); + } + return false; + case QK_RGB_MATRIX_SATURATION_DOWN: + if (shifted) { + rgb_matrix_increase_sat(); + } else { + rgb_matrix_decrease_sat(); + } + return false; + case QK_RGB_MATRIX_VALUE_UP: + if (shifted) { + rgb_matrix_decrease_val(); + } else { + rgb_matrix_increase_val(); + } + return false; + case QK_RGB_MATRIX_VALUE_DOWN: + if (shifted) { + rgb_matrix_increase_val(); + } else { + rgb_matrix_decrease_val(); + } + return false; + case QK_RGB_MATRIX_SPEED_UP: + if (shifted) { + rgb_matrix_decrease_speed(); + } else { + rgb_matrix_increase_speed(); + } + return false; + case QK_RGB_MATRIX_SPEED_DOWN: + if (shifted) { + rgb_matrix_increase_speed(); + } else { + rgb_matrix_decrease_speed(); + } + return false; + } + } + + return true; +} diff --git a/quantum/process_keycode/process_rgb_matrix.h b/quantum/process_keycode/process_rgb_matrix.h new file mode 100644 index 0000000000..a02bf57b5f --- /dev/null +++ b/quantum/process_keycode/process_rgb_matrix.h @@ -0,0 +1,10 @@ +// Copyright 2024 QMK +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include <stdint.h> +#include <stdbool.h> +#include "action.h" + +bool process_rgb_matrix(uint16_t keycode, keyrecord_t *record); diff --git a/quantum/process_keycode/process_tap_dance.c b/quantum/process_keycode/process_tap_dance.c index ce3b8fc81f..11df62763d 100644 --- a/quantum/process_keycode/process_tap_dance.c +++ b/quantum/process_keycode/process_tap_dance.c @@ -21,6 +21,7 @@ #include "action_util.h" #include "timer.h" #include "wait.h" +#include "keymap_introspection.h" static uint16_t active_td; static uint16_t last_tap_time; @@ -133,7 +134,7 @@ bool preprocess_tap_dance(uint16_t keycode, keyrecord_t *record) { if (!active_td || keycode == active_td) return false; - action = &tap_dance_actions[QK_TAP_DANCE_GET_INDEX(active_td)]; + action = tap_dance_get(QK_TAP_DANCE_GET_INDEX(active_td)); action->state.interrupted = true; action->state.interrupting_keycode = keycode; process_tap_dance_action_on_dance_finished(action); @@ -150,11 +151,16 @@ bool preprocess_tap_dance(uint16_t keycode, keyrecord_t *record) { } bool process_tap_dance(uint16_t keycode, keyrecord_t *record) { + int td_index; tap_dance_action_t *action; switch (keycode) { case QK_TAP_DANCE ... QK_TAP_DANCE_MAX: - action = &tap_dance_actions[QK_TAP_DANCE_GET_INDEX(keycode)]; + td_index = QK_TAP_DANCE_GET_INDEX(keycode); + if (td_index >= tap_dance_count()) { + return false; + } + action = tap_dance_get(td_index); action->state.pressed = record->event.pressed; if (record->event.pressed) { @@ -182,7 +188,7 @@ void tap_dance_task(void) { if (!active_td || timer_elapsed(last_tap_time) <= GET_TAPPING_TERM(active_td, &(keyrecord_t){})) return; - action = &tap_dance_actions[QK_TAP_DANCE_GET_INDEX(active_td)]; + action = tap_dance_get(QK_TAP_DANCE_GET_INDEX(active_td)); if (!action->state.interrupted) { process_tap_dance_action_on_dance_finished(action); } diff --git a/quantum/process_keycode/process_tap_dance.h b/quantum/process_keycode/process_tap_dance.h index c0137c14a3..5cccbdf439 100644 --- a/quantum/process_keycode/process_tap_dance.h +++ b/quantum/process_keycode/process_tap_dance.h @@ -35,7 +35,7 @@ typedef struct { typedef void (*tap_dance_user_fn_t)(tap_dance_state_t *state, void *user_data); -typedef struct { +typedef struct tap_dance_action_t { tap_dance_state_t state; struct { tap_dance_user_fn_t on_each_tap; @@ -78,8 +78,6 @@ typedef struct { #define TD_INDEX(code) QK_TAP_DANCE_GET_INDEX(code) #define TAP_DANCE_KEYCODE(state) TD(((tap_dance_action_t *)state) - tap_dance_actions) -extern tap_dance_action_t tap_dance_actions[]; - void reset_tap_dance(tap_dance_state_t *state); /* To be used internally */ diff --git a/quantum/process_keycode/process_underglow.c b/quantum/process_keycode/process_underglow.c new file mode 100644 index 0000000000..779672ac07 --- /dev/null +++ b/quantum/process_keycode/process_underglow.c @@ -0,0 +1,91 @@ +// Copyright 2024 QMK +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "process_underglow.h" +#include "rgblight.h" +#include "action_util.h" +#include "keycodes.h" +#include "modifiers.h" + +bool process_underglow(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + uint8_t shifted = get_mods() & MOD_MASK_SHIFT; + switch (keycode) { + case QK_UNDERGLOW_TOGGLE: + rgblight_toggle(); + return false; + case QK_UNDERGLOW_MODE_NEXT: + if (shifted) { + rgblight_step_reverse(); + } else { + rgblight_step(); + } + return false; + case QK_UNDERGLOW_MODE_PREVIOUS: + if (shifted) { + rgblight_step(); + } else { + rgblight_step_reverse(); + } + return false; + case QK_UNDERGLOW_HUE_UP: + if (shifted) { + rgblight_decrease_hue(); + } else { + rgblight_increase_hue(); + } + return false; + case QK_UNDERGLOW_HUE_DOWN: + if (shifted) { + rgblight_increase_hue(); + } else { + rgblight_decrease_hue(); + } + return false; + case QK_UNDERGLOW_SATURATION_UP: + if (shifted) { + rgblight_decrease_sat(); + } else { + rgblight_increase_sat(); + } + return false; + case QK_UNDERGLOW_SATURATION_DOWN: + if (shifted) { + rgblight_increase_sat(); + } else { + rgblight_decrease_sat(); + } + return false; + case QK_UNDERGLOW_VALUE_UP: + if (shifted) { + rgblight_decrease_val(); + } else { + rgblight_increase_val(); + } + return false; + case QK_UNDERGLOW_VALUE_DOWN: + if (shifted) { + rgblight_increase_hue(); + } else { + rgblight_decrease_hue(); + } + return false; + case QK_UNDERGLOW_SPEED_UP: + if (shifted) { + rgblight_decrease_speed(); + } else { + rgblight_increase_speed(); + } + return false; + case QK_UNDERGLOW_SPEED_DOWN: + if (shifted) { + rgblight_increase_speed(); + } else { + rgblight_decrease_speed(); + } + return false; + } + } + + return true; +} diff --git a/quantum/process_keycode/process_underglow.h b/quantum/process_keycode/process_underglow.h new file mode 100644 index 0000000000..b409cafbb8 --- /dev/null +++ b/quantum/process_keycode/process_underglow.h @@ -0,0 +1,10 @@ +// Copyright 2024 QMK +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include <stdint.h> +#include <stdbool.h> +#include "action.h" + +bool process_underglow(uint16_t keycode, keyrecord_t *record); diff --git a/quantum/quantum_keycodes_legacy.h b/quantum/quantum_keycodes_legacy.h index 6ea5e13f3a..e1562077e5 100644 --- a/quantum/quantum_keycodes_legacy.h +++ b/quantum/quantum_keycodes_legacy.h @@ -16,3 +16,42 @@ #define RGB_VAD QK_UNDERGLOW_VALUE_DOWN #define RGB_SPI QK_UNDERGLOW_SPEED_UP #define RGB_SPD QK_UNDERGLOW_SPEED_DOWN + +#define KC_MS_UP QK_MOUSE_CURSOR_UP +#define KC_MS_U QK_MOUSE_CURSOR_UP +#define KC_MS_DOWN QK_MOUSE_CURSOR_DOWN +#define KC_MS_D QK_MOUSE_CURSOR_DOWN +#define KC_MS_LEFT QK_MOUSE_CURSOR_LEFT +#define KC_MS_L QK_MOUSE_CURSOR_LEFT +#define KC_MS_RIGHT QK_MOUSE_CURSOR_RIGHT +#define KC_MS_R QK_MOUSE_CURSOR_RIGHT +#define KC_MS_BTN1 QK_MOUSE_BUTTON_1 +#define KC_BTN1 QK_MOUSE_BUTTON_1 +#define KC_MS_BTN2 QK_MOUSE_BUTTON_2 +#define KC_BTN2 QK_MOUSE_BUTTON_2 +#define KC_MS_BTN3 QK_MOUSE_BUTTON_3 +#define KC_BTN3 QK_MOUSE_BUTTON_3 +#define KC_MS_BTN4 QK_MOUSE_BUTTON_4 +#define KC_BTN4 QK_MOUSE_BUTTON_4 +#define KC_MS_BTN5 QK_MOUSE_BUTTON_5 +#define KC_BTN5 QK_MOUSE_BUTTON_5 +#define KC_MS_BTN6 QK_MOUSE_BUTTON_6 +#define KC_BTN6 QK_MOUSE_BUTTON_6 +#define KC_MS_BTN7 QK_MOUSE_BUTTON_7 +#define KC_BTN7 QK_MOUSE_BUTTON_7 +#define KC_MS_BTN8 QK_MOUSE_BUTTON_8 +#define KC_BTN8 QK_MOUSE_BUTTON_8 +#define KC_MS_WH_UP QK_MOUSE_WHEEL_UP +#define KC_WH_U QK_MOUSE_WHEEL_UP +#define KC_MS_WH_DOWN QK_MOUSE_WHEEL_DOWN +#define KC_WH_D QK_MOUSE_WHEEL_DOWN +#define KC_MS_WH_LEFT QK_MOUSE_WHEEL_LEFT +#define KC_WH_L QK_MOUSE_WHEEL_LEFT +#define KC_MS_WH_RIGHT QK_MOUSE_WHEEL_RIGHT +#define KC_WH_R QK_MOUSE_WHEEL_RIGHT +#define KC_MS_ACCEL0 QK_MOUSE_ACCELERATION_0 +#define KC_ACL0 QK_MOUSE_ACCELERATION_0 +#define KC_MS_ACCEL1 QK_MOUSE_ACCELERATION_1 +#define KC_ACL1 QK_MOUSE_ACCELERATION_1 +#define KC_MS_ACCEL2 QK_MOUSE_ACCELERATION_2 +#define KC_ACL2 QK_MOUSE_ACCELERATION_2 diff --git a/quantum/repeat_key.c b/quantum/repeat_key.c index 4567428723..56f242f8b8 100644 --- a/quantum/repeat_key.c +++ b/quantum/repeat_key.c @@ -220,10 +220,10 @@ uint16_t get_alt_repeat_key_keycode(void) { {KC_BRIU, KC_BRID}, // Brightness Up / Down. #endif // EXTRAKEY_ENABLE #ifdef MOUSEKEY_ENABLE - {KC_MS_L, KC_MS_R}, // Mouse Cursor Left / Right. - {KC_MS_U, KC_MS_D}, // Mouse Cursor Up / Down. - {KC_WH_L, KC_WH_R}, // Mouse Wheel Left / Right. - {KC_WH_U, KC_WH_D}, // Mouse Wheel Up / Down. + {MS_LEFT, MS_RGHT}, // Mouse Cursor Left / Right. + {MS_UP, MS_DOWN}, // Mouse Cursor Up / Down. + {MS_WHLL, MS_WHLR}, // Mouse Wheel Left / Right. + {MS_WHLU, MS_WHLD}, // Mouse Wheel Up / Down. #endif // MOUSEKEY_ENABLE }; // clang-format on diff --git a/quantum/rgb_matrix/animations/pixel_fractal_anim.h b/quantum/rgb_matrix/animations/pixel_fractal_anim.h index 4cd1d9b861..90a75ed321 100644 --- a/quantum/rgb_matrix/animations/pixel_fractal_anim.h +++ b/quantum/rgb_matrix/animations/pixel_fractal_anim.h @@ -30,23 +30,23 @@ static bool PIXEL_FRACTAL(effect_params_t* params) { for (uint8_t h = 0; h < MATRIX_ROWS; ++h) { // Light and copy columns outward for (uint8_t l = 0; l < MID_COL - 1; ++l) { - if (led[h][l]) { - rgb_matrix_set_color(g_led_config.matrix_co[h][l], rgb.r, rgb.g, rgb.b); - rgb_matrix_set_color(g_led_config.matrix_co[h][MATRIX_COLS - 1 - l], rgb.r, rgb.g, rgb.b); - } else { - rgb_matrix_set_color(g_led_config.matrix_co[h][l], 0, 0, 0); - rgb_matrix_set_color(g_led_config.matrix_co[h][MATRIX_COLS - 1 - l], 0, 0, 0); + RGB index_rgb = led[h][l] ? (RGB){rgb.r, rgb.g, rgb.b} : (RGB){0, 0, 0}; + if (HAS_ANY_FLAGS(g_led_config.flags[g_led_config.matrix_co[h][l]], params->flags)) { + rgb_matrix_set_color(g_led_config.matrix_co[h][l], index_rgb.r, index_rgb.g, index_rgb.b); + } + if (HAS_ANY_FLAGS(g_led_config.flags[g_led_config.matrix_co[h][MATRIX_COLS - 1 - l]], params->flags)) { + rgb_matrix_set_color(g_led_config.matrix_co[h][MATRIX_COLS - 1 - l], index_rgb.r, index_rgb.g, index_rgb.b); } led[h][l] = led[h][l + 1]; } // Light both middle columns - if (led[h][MID_COL - 1]) { - rgb_matrix_set_color(g_led_config.matrix_co[h][MID_COL - 1], rgb.r, rgb.g, rgb.b); - rgb_matrix_set_color(g_led_config.matrix_co[h][MATRIX_COLS - MID_COL], rgb.r, rgb.g, rgb.b); - } else { - rgb_matrix_set_color(g_led_config.matrix_co[h][MID_COL - 1], 0, 0, 0); - rgb_matrix_set_color(g_led_config.matrix_co[h][MATRIX_COLS - MID_COL], 0, 0, 0); + RGB index_rgb = led[h][MID_COL - 1] ? (RGB){rgb.r, rgb.g, rgb.b} : (RGB){0, 0, 0}; + if (HAS_ANY_FLAGS(g_led_config.flags[g_led_config.matrix_co[h][MID_COL - 1]], params->flags)) { + rgb_matrix_set_color(g_led_config.matrix_co[h][MID_COL - 1], index_rgb.r, index_rgb.g, index_rgb.b); + } + if (HAS_ANY_FLAGS(g_led_config.flags[g_led_config.matrix_co[h][MATRIX_COLS - MID_COL]], params->flags)) { + rgb_matrix_set_color(g_led_config.matrix_co[h][MATRIX_COLS - MID_COL], index_rgb.r, index_rgb.g, index_rgb.b); } // Generate new random fractal column diff --git a/quantum/rgb_matrix/animations/riverflow_anim.h b/quantum/rgb_matrix/animations/riverflow_anim.h index 79a38e7f6e..195d15986d 100644 --- a/quantum/rgb_matrix/animations/riverflow_anim.h +++ b/quantum/rgb_matrix/animations/riverflow_anim.h @@ -7,11 +7,11 @@ RGB_MATRIX_EFFECT(RIVERFLOW) bool RIVERFLOW(effect_params_t* params) { RGB_MATRIX_USE_LIMITS(led_min, led_max); for (uint8_t i = led_min; i < led_max; i++) { + RGB_MATRIX_TEST_LED_FLAGS(); HSV hsv = rgb_matrix_config.hsv; uint16_t time = scale16by8(g_rgb_timer + (i * 315), rgb_matrix_config.speed / 8); hsv.v = scale8(abs8(sin8(time) - 128) * 2, hsv.v); RGB rgb = rgb_matrix_hsv_to_rgb(hsv); - RGB_MATRIX_TEST_LED_FLAGS(); rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); } diff --git a/quantum/rgb_matrix/animations/starlight_anim.h b/quantum/rgb_matrix/animations/starlight_anim.h index 33f0b61a91..91626a4663 100644 --- a/quantum/rgb_matrix/animations/starlight_anim.h +++ b/quantum/rgb_matrix/animations/starlight_anim.h @@ -2,25 +2,26 @@ RGB_MATRIX_EFFECT(STARLIGHT) # ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS -void set_starlight_color(int i, effect_params_t* params) { +void set_starlight_color(uint8_t i, effect_params_t* params) { uint16_t time = scale16by8(g_rgb_timer, rgb_matrix_config.speed / 8); HSV hsv = rgb_matrix_config.hsv; hsv.v = scale8(abs8(sin8(time) - 128) * 2, hsv.v); - RGB rgb = hsv_to_rgb(hsv); + RGB rgb = rgb_matrix_hsv_to_rgb(hsv); rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); } bool STARLIGHT(effect_params_t* params) { if (!params->init) { if (scale16by8(g_rgb_timer, qadd8(rgb_matrix_config.speed, 5)) % 5 == 0) { - int rand_led = rand() % RGB_MATRIX_LED_COUNT; + uint8_t rand_led = random8_max(RGB_MATRIX_LED_COUNT); set_starlight_color(rand_led, params); } return false; } RGB_MATRIX_USE_LIMITS(led_min, led_max); - for (int i = led_min; i < led_max; i++) { + for (uint8_t i = led_min; i < led_max; i++) { + RGB_MATRIX_TEST_LED_FLAGS(); set_starlight_color(i, params); } return rgb_matrix_check_finished_leds(led_max); diff --git a/quantum/rgb_matrix/animations/starlight_dual_hue_anim.h b/quantum/rgb_matrix/animations/starlight_dual_hue_anim.h index df6461b8b7..5ef831476f 100644 --- a/quantum/rgb_matrix/animations/starlight_dual_hue_anim.h +++ b/quantum/rgb_matrix/animations/starlight_dual_hue_anim.h @@ -2,26 +2,27 @@ RGB_MATRIX_EFFECT(STARLIGHT_DUAL_HUE) # ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS -void set_starlight_dual_hue_color(int i, effect_params_t* params) { +void set_starlight_dual_hue_color(uint8_t i, effect_params_t* params) { uint16_t time = scale16by8(g_rgb_timer, rgb_matrix_config.speed / 8); HSV hsv = rgb_matrix_config.hsv; hsv.v = scale8(abs8(sin8(time) - 128) * 2, hsv.v); - hsv.h = hsv.h + (rand() % (30 + 1 - -30) + -30); - RGB rgb = hsv_to_rgb(hsv); + hsv.h = hsv.h + random8_max((30 + 1 - -30) + -30); + RGB rgb = rgb_matrix_hsv_to_rgb(hsv); rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); } bool STARLIGHT_DUAL_HUE(effect_params_t* params) { if (!params->init) { if (scale16by8(g_rgb_timer, qadd8(rgb_matrix_config.speed, 5)) % 5 == 0) { - int rand_led = rand() % RGB_MATRIX_LED_COUNT; + uint8_t rand_led = random8_max(RGB_MATRIX_LED_COUNT); set_starlight_dual_hue_color(rand_led, params); } return false; } RGB_MATRIX_USE_LIMITS(led_min, led_max); - for (int i = led_min; i < led_max; i++) { + for (uint8_t i = led_min; i < led_max; i++) { + RGB_MATRIX_TEST_LED_FLAGS(); set_starlight_dual_hue_color(i, params); } return rgb_matrix_check_finished_leds(led_max); diff --git a/quantum/rgb_matrix/animations/starlight_dual_sat_anim.h b/quantum/rgb_matrix/animations/starlight_dual_sat_anim.h index f6ecd48aa1..1994aba8a8 100644 --- a/quantum/rgb_matrix/animations/starlight_dual_sat_anim.h +++ b/quantum/rgb_matrix/animations/starlight_dual_sat_anim.h @@ -2,26 +2,27 @@ RGB_MATRIX_EFFECT(STARLIGHT_DUAL_SAT) # ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS -void set_starlight_dual_sat_color(int i, effect_params_t* params) { +void set_starlight_dual_sat_color(uint8_t i, effect_params_t* params) { uint16_t time = scale16by8(g_rgb_timer, rgb_matrix_config.speed / 8); HSV hsv = rgb_matrix_config.hsv; hsv.v = scale8(abs8(sin8(time) - 128) * 2, hsv.v); - hsv.s = hsv.s + (rand() % (30 + 1 - -30) + -30); - RGB rgb = hsv_to_rgb(hsv); + hsv.s = hsv.s + random8_max((30 + 1 - -30) + -30); + RGB rgb = rgb_matrix_hsv_to_rgb(hsv); rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); } bool STARLIGHT_DUAL_SAT(effect_params_t* params) { if (!params->init) { if (scale16by8(g_rgb_timer, qadd8(rgb_matrix_config.speed, 5)) % 5 == 0) { - int rand_led = rand() % RGB_MATRIX_LED_COUNT; + uint8_t rand_led = random8_max(RGB_MATRIX_LED_COUNT); set_starlight_dual_sat_color(rand_led, params); } return false; } RGB_MATRIX_USE_LIMITS(led_min, led_max); - for (int i = led_min; i < led_max; i++) { + for (uint8_t i = led_min; i < led_max; i++) { + RGB_MATRIX_TEST_LED_FLAGS(); set_starlight_dual_sat_color(i, params); } return rgb_matrix_check_finished_leds(led_max); diff --git a/quantum/rgblight/rgblight_drivers.c b/quantum/rgblight/rgblight_drivers.c index 8902b8f842..76e9031aec 100644 --- a/quantum/rgblight/rgblight_drivers.c +++ b/quantum/rgblight/rgblight_drivers.c @@ -14,6 +14,14 @@ const rgblight_driver_t rgblight_driver = { #elif defined(RGBLIGHT_APA102) # include "apa102.h" +// Temporary shim +static void apa102_setleds(rgb_led_t *ledarray, uint16_t number_of_leds) { + for (uint16_t i = 0; i < number_of_leds; i++) { + apa102_set_color(i, ledarray[i].r, ledarray[i].g, ledarray[i].b); + } + apa102_flush(); +} + const rgblight_driver_t rgblight_driver = { .init = apa102_init, .setleds = apa102_setleds, @@ -1,3 +1,7 @@ +# THIS IS THE DEVELOP BRANCH + +Warning- This is the `develop` branch of QMK Firmware. You may encounter broken code here. Please see [Breaking Changes](https://docs.qmk.fm/#/breaking_changes) for more information. + # Quantum Mechanical Keyboard Firmware [![Current Version](https://img.shields.io/github/tag/qmk/qmk_firmware.svg)](https://github.com/qmk/qmk_firmware/tags) diff --git a/tests/tap_dance/examples.c b/tests/tap_dance/examples.c index 5377b397d3..4b6bdb2090 100644 --- a/tests/tap_dance/examples.c +++ b/tests/tap_dance/examples.c @@ -16,6 +16,7 @@ #include "quantum.h" #include "examples.h" +#include "keymap_introspection.h" // Example code from the tap dance documentation, adapted for testing @@ -83,7 +84,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case TD(CT_CLN): - action = &tap_dance_actions[QK_TAP_DANCE_GET_INDEX(keycode)]; + action = tap_dance_get(QK_TAP_DANCE_GET_INDEX(keycode)); if (!record->event.pressed && action->state.count && !action->state.finished) { tap_dance_tap_hold_t *tap_hold = (tap_dance_tap_hold_t *)action->user_data; tap_code16(tap_hold->tap); diff --git a/tests/tap_dance/tap_dance_layers/test.mk b/tests/tap_dance/tap_dance_layers/test.mk index b4cdc9b088..a677fda648 100644 --- a/tests/tap_dance/tap_dance_layers/test.mk +++ b/tests/tap_dance/tap_dance_layers/test.mk @@ -7,4 +7,4 @@ TAP_DANCE_ENABLE = yes -SRC += tap_dance_defs.c +INTROSPECTION_KEYMAP_C = tap_dance_defs.c diff --git a/tests/tap_dance/test.mk b/tests/tap_dance/test.mk index 041d9b4dc9..0e727da9e8 100644 --- a/tests/tap_dance/test.mk +++ b/tests/tap_dance/test.mk @@ -18,5 +18,4 @@ # -------------------------------------------------------------------------------- TAP_DANCE_ENABLE = yes - -SRC += examples.c +INTROSPECTION_KEYMAP_C = examples.c diff --git a/tests/test_common/keycode_table.cpp b/tests/test_common/keycode_table.cpp index 18dd536027..4c28ab4d20 100644 --- a/tests/test_common/keycode_table.cpp +++ b/tests/test_common/keycode_table.cpp @@ -225,25 +225,25 @@ std::map<uint16_t, std::string> KEYCODE_ID_TABLE = { {KC_ASSISTANT, "KC_ASSISTANT"}, {KC_MISSION_CONTROL, "KC_MISSION_CONTROL"}, {KC_LAUNCHPAD, "KC_LAUNCHPAD"}, - {KC_MS_UP, "KC_MS_UP"}, - {KC_MS_DOWN, "KC_MS_DOWN"}, - {KC_MS_LEFT, "KC_MS_LEFT"}, - {KC_MS_RIGHT, "KC_MS_RIGHT"}, - {KC_MS_BTN1, "KC_MS_BTN1"}, - {KC_MS_BTN2, "KC_MS_BTN2"}, - {KC_MS_BTN3, "KC_MS_BTN3"}, - {KC_MS_BTN4, "KC_MS_BTN4"}, - {KC_MS_BTN5, "KC_MS_BTN5"}, - {KC_MS_BTN6, "KC_MS_BTN6"}, - {KC_MS_BTN7, "KC_MS_BTN7"}, - {KC_MS_BTN8, "KC_MS_BTN8"}, - {KC_MS_WH_UP, "KC_MS_WH_UP"}, - {KC_MS_WH_DOWN, "KC_MS_WH_DOWN"}, - {KC_MS_WH_LEFT, "KC_MS_WH_LEFT"}, - {KC_MS_WH_RIGHT, "KC_MS_WH_RIGHT"}, - {KC_MS_ACCEL0, "KC_MS_ACCEL0"}, - {KC_MS_ACCEL1, "KC_MS_ACCEL1"}, - {KC_MS_ACCEL2, "KC_MS_ACCEL2"}, + {QK_MOUSE_CURSOR_UP, "QK_MOUSE_CURSOR_UP"}, + {QK_MOUSE_CURSOR_DOWN, "QK_MOUSE_CURSOR_DOWN"}, + {QK_MOUSE_CURSOR_LEFT, "QK_MOUSE_CURSOR_LEFT"}, + {QK_MOUSE_CURSOR_RIGHT, "QK_MOUSE_CURSOR_RIGHT"}, + {QK_MOUSE_BUTTON_1, "QK_MOUSE_BUTTON_1"}, + {QK_MOUSE_BUTTON_2, "QK_MOUSE_BUTTON_2"}, + {QK_MOUSE_BUTTON_3, "QK_MOUSE_BUTTON_3"}, + {QK_MOUSE_BUTTON_4, "QK_MOUSE_BUTTON_4"}, + {QK_MOUSE_BUTTON_5, "QK_MOUSE_BUTTON_5"}, + {QK_MOUSE_BUTTON_6, "QK_MOUSE_BUTTON_6"}, + {QK_MOUSE_BUTTON_7, "QK_MOUSE_BUTTON_7"}, + {QK_MOUSE_BUTTON_8, "QK_MOUSE_BUTTON_8"}, + {QK_MOUSE_WHEEL_UP, "QK_MOUSE_WHEEL_UP"}, + {QK_MOUSE_WHEEL_DOWN, "QK_MOUSE_WHEEL_DOWN"}, + {QK_MOUSE_WHEEL_LEFT, "QK_MOUSE_WHEEL_LEFT"}, + {QK_MOUSE_WHEEL_RIGHT, "QK_MOUSE_WHEEL_RIGHT"}, + {QK_MOUSE_ACCELERATION_0, "QK_MOUSE_ACCELERATION_0"}, + {QK_MOUSE_ACCELERATION_1, "QK_MOUSE_ACCELERATION_1"}, + {QK_MOUSE_ACCELERATION_2, "QK_MOUSE_ACCELERATION_2"}, {KC_LEFT_CTRL, "KC_LEFT_CTRL"}, {KC_LEFT_SHIFT, "KC_LEFT_SHIFT"}, {KC_LEFT_ALT, "KC_LEFT_ALT"}, diff --git a/tmk_core/protocol/arm_atsam/main_arm_atsam.c b/tmk_core/protocol/arm_atsam/main_arm_atsam.c index 8abcfd6090..15592bf908 100644 --- a/tmk_core/protocol/arm_atsam/main_arm_atsam.c +++ b/tmk_core/protocol/arm_atsam/main_arm_atsam.c @@ -88,7 +88,13 @@ void send_nkro(report_nkro_t *report) { __disable_irq(); __DMB(); - memcpy(udi_hid_nkro_report, report, UDI_HID_NKRO_REPORT_SIZE); + /* + Skipping ahead `sizeof(report->report_id)` bytes + since `report_id` is not used by this driver + */ + void *report_no_report_id = (void *)((char *)report + sizeof(report->report_id)); + + memcpy(udi_hid_nkro_report, report_no_report_id, UDI_HID_NKRO_REPORT_SIZE); udi_hid_nkro_b_report_valid = 1; udi_hid_nkro_send_report(); @@ -105,7 +111,17 @@ void send_mouse(report_mouse_t *report) { __disable_irq(); __DMB(); +# ifdef MOUSE_SHARED_EP + /* + Skipping ahead `sizeof(report->report_id)` bytes + since `report_id` is not used by this driver + */ + void *report_no_report_id = (void *)((char *)report + sizeof(report->report_id)); + + memcpy(udi_hid_mou_report, report_no_report_id, UDI_HID_MOU_REPORT_SIZE); +# else memcpy(udi_hid_mou_report, report, UDI_HID_MOU_REPORT_SIZE); +# endif udi_hid_mou_b_report_valid = 1; udi_hid_mou_send_report(); diff --git a/tmk_core/protocol/chibios/chibios.c b/tmk_core/protocol/chibios/chibios.c index a249af8d38..b879bdac77 100644 --- a/tmk_core/protocol/chibios/chibios.c +++ b/tmk_core/protocol/chibios/chibios.c @@ -184,7 +184,7 @@ void protocol_pre_task(void) { /* Do this in the suspended state */ suspend_power_down(); // on AVR this deep sleeps for 15ms /* Remote wakeup */ - if ((USB_DRIVER.status & USB_GETSTATUS_REMOTE_WAKEUP_ENABLED) && suspend_wakeup_condition()) { + if (suspend_wakeup_condition() && (USB_DRIVER.status & USB_GETSTATUS_REMOTE_WAKEUP_ENABLED)) { usbWakeupHost(&USB_DRIVER); # if USB_SUSPEND_WAKEUP_DELAY > 0 // Some hubs, kvm switches, and monitors do diff --git a/tmk_core/protocol/lufa/lufa.c b/tmk_core/protocol/lufa/lufa.c index 2142b04460..b0c9758d2f 100644 --- a/tmk_core/protocol/lufa/lufa.c +++ b/tmk_core/protocol/lufa/lufa.c @@ -836,7 +836,7 @@ void protocol_pre_task(void) { dprintln("suspending keyboard"); while (USB_DeviceState == DEVICE_STATE_Suspended) { suspend_power_down(); - if (USB_Device_RemoteWakeupEnabled && suspend_wakeup_condition()) { + if (suspend_wakeup_condition() && USB_Device_RemoteWakeupEnabled) { USB_Device_SendRemoteWakeup(); clear_keyboard(); |