aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile36
-rw-r--r--builddefs/common_features.mk6
-rw-r--r--data/constants/keycodes/extras/keycodes_eurkey_0.0.1.hjson596
-rw-r--r--data/constants/keycodes/extras/keycodes_farsi_0.0.1.hjson2
-rw-r--r--data/mappings/info_config.hjson1
-rw-r--r--data/mappings/info_rules.hjson1
-rw-r--r--data/mappings/keyboard_aliases.hjson640
-rw-r--r--data/schemas/keyboard.jsonschema7
-rw-r--r--docs/drivers/i2c.md124
-rw-r--r--docs/drivers/spi.md8
-rw-r--r--docs/drivers/uart.md26
-rw-r--r--docs/features/leader_key.md15
-rw-r--r--docs/reference_info_json.md4
-rw-r--r--docs/reference_keymap_extras.md1
-rw-r--r--docs/tap_hold.md163
-rw-r--r--drivers/i2c_master.h141
-rw-r--r--drivers/led/apa102.c4
-rw-r--r--drivers/led/apa102.h2
-rw-r--r--drivers/led/aw20216s.h260
-rw-r--r--drivers/led/issi/is31fl3731-mono.h27
-rw-r--r--drivers/led/issi/is31fl3731.h27
-rw-r--r--drivers/led/issi/is31fl3733-mono.h32
-rw-r--r--drivers/led/issi/is31fl3733.h262
-rw-r--r--drivers/led/issi/is31fl3736-mono.h140
-rw-r--r--drivers/led/issi/is31fl3736.h42
-rw-r--r--drivers/led/issi/is31fl3737-mono.h30
-rw-r--r--drivers/led/issi/is31fl3737.h203
-rw-r--r--drivers/led/issi/is31fl3741-mono.h401
-rw-r--r--drivers/led/issi/is31fl3741.h416
-rw-r--r--drivers/led/issi/is31fl3743a.h211
-rw-r--r--drivers/led/snled27351-mono.h237
-rw-r--r--drivers/led/snled27351.h249
-rw-r--r--drivers/led/ws2812.c (renamed from drivers/ws2812.c)0
-rw-r--r--drivers/led/ws2812.h (renamed from drivers/ws2812.h)0
-rw-r--r--drivers/sensors/azoteq_iqs5xx.c55
-rw-r--r--drivers/sensors/azoteq_iqs5xx.h3
-rw-r--r--drivers/spi_master.h116
-rw-r--r--drivers/uart.h62
-rw-r--r--keyboards/0_sixty/rules.mk1
-rw-r--r--keyboards/0xcb/splaytoraid/rules.mk1
-rw-r--r--keyboards/1upkeyboards/pi40/rules.mk1
-rw-r--r--keyboards/1upkeyboards/pi50/rules.mk1
-rw-r--r--keyboards/1upkeyboards/sweet16/rules.mk1
-rw-r--r--keyboards/25keys/aleth42/rules.mk1
-rw-r--r--keyboards/25keys/zinc/rules.mk1
-rw-r--r--keyboards/40percentclub/i75/rules.mk1
-rw-r--r--keyboards/40percentclub/polyandry/rules.mk1
-rw-r--r--keyboards/8pack/rules.mk1
-rw-r--r--keyboards/adkb96/rules.mk1
-rw-r--r--keyboards/adm42/rules.mk1
-rwxr-xr-xkeyboards/aeboards/constellation/rules.mk1
-rw-r--r--keyboards/aeboards/ext65/rules.mk1
-rw-r--r--keyboards/aeboards/satellite/rules.mk1
-rw-r--r--keyboards/atreus/rules.mk1
-rw-r--r--keyboards/atreyu/rules.mk1
-rw-r--r--keyboards/biacco42/ergo42/rules.mk1
-rw-r--r--keyboards/binepad/bn009/rules.mk3
-rwxr-xr-xkeyboards/binepad/bnr1/rules.mk1
-rw-r--r--keyboards/boston_meetup/rules.mk1
-rw-r--r--keyboards/bpiphany/frosty_flake/rules.mk1
-rw-r--r--keyboards/bpiphany/pegasushoof/rules.mk1
-rw-r--r--keyboards/buzzard/rules.mk1
-rw-r--r--keyboards/clickety_split/leeloo/rules.mk2
-rw-r--r--keyboards/crkbd/rules.mk1
-rw-r--r--keyboards/custommk/genesis/rules.mk1
-rw-r--r--keyboards/cxt_studio/12e3/keyboard.json99
-rw-r--r--keyboards/cxt_studio/12e3/keymaps/default/keymap.c40
-rw-r--r--keyboards/cxt_studio/12e3/keymaps/default/rules.mk1
-rw-r--r--keyboards/cxt_studio/12e3/readme.md27
-rw-r--r--keyboards/cxt_studio/12e4/config.h6
-rw-r--r--keyboards/cxt_studio/12e4/cxt_studio.c (renamed from keyboards/cxt_studio/cxt_studio.c)20
-rw-r--r--keyboards/cxt_studio/12e4/keyboard.json (renamed from keyboards/cxt_studio/keyboard.json)2
-rw-r--r--keyboards/cxt_studio/12e4/keymaps/default/keymap.json (renamed from keyboards/cxt_studio/keymaps/default/keymap.json)2
-rw-r--r--keyboards/cxt_studio/12e4/readme.md (renamed from keyboards/cxt_studio/readme.md)10
-rw-r--r--keyboards/cxt_studio/config.h22
-rw-r--r--keyboards/dailycraft/bat43/rules.mk1
-rw-r--r--keyboards/dailycraft/claw44/rules.mk1
-rw-r--r--keyboards/dailycraft/sandbox/rules.mk1
-rw-r--r--keyboards/dailycraft/wings42/rules.mk1
-rw-r--r--keyboards/darkproject/kd83a_bfg_edition/config.h3
-rw-r--r--keyboards/darkproject/kd87a_bfg_edition/config.h3
-rw-r--r--keyboards/delikeeb/vanana/rules.mk1
-rw-r--r--keyboards/delikeeb/waaffle/rev3/rules.mk1
-rw-r--r--keyboards/deltasplit75/rules.mk1
-rw-r--r--keyboards/dp3000/rules.mk1
-rw-r--r--keyboards/drhigsby/ogurec/rules.mk1
-rw-r--r--keyboards/duck/octagon/rules.mk1
-rw-r--r--keyboards/duck/orion/rules.mk1
-rw-r--r--keyboards/ducky/one2mini/rules.mk1
-rw-r--r--keyboards/ducky/one2sf/rules.mk1
-rw-r--r--keyboards/dumbpad/rules.mk1
-rw-r--r--keyboards/durgod/galaxy/rules.mk1
-rw-r--r--keyboards/durgod/venus/rules.mk1
-rw-r--r--keyboards/dztech/tofu/ii/rules.mk1
-rw-r--r--keyboards/dztech/tofu/jr/rules.mk1
-rw-r--r--keyboards/eco/rules.mk1
-rw-r--r--keyboards/eek/rules.mk1
-rw-r--r--keyboards/ergoslab/rules.mk1
-rw-r--r--keyboards/ergotravel/rules.mk1
-rw-r--r--keyboards/evyd13/atom47/rules.mk1
-rw-r--r--keyboards/exclusive/e85/rules.mk1
-rw-r--r--keyboards/ferris/0_1/matrix.c45
-rw-r--r--keyboards/ferris/0_2/matrix.c3
-rw-r--r--keyboards/fortitude60/rules.mk1
-rw-r--r--keyboards/fruitykeeb/fruitbar/r1/rules.mk1
-rw-r--r--keyboards/ghs/jem/rules.mk1
-rw-r--r--keyboards/gmmk/gmmk2/p96/config.h3
-rw-r--r--keyboards/hadron/rules.mk1
-rw-r--r--keyboards/handwired/bento/rules.mk1
-rw-r--r--keyboards/handwired/dactyl_manuform/6x6/rules.mk1
-rw-r--r--keyboards/handwired/ms_sculpt_mobile/rules.mk1
-rw-r--r--keyboards/handwired/onekey/at_start_f415/board.h4
-rw-r--r--keyboards/handwired/onekey/at_start_f415/config.h4
-rw-r--r--keyboards/handwired/onekey/at_start_f415/halconf.h4
-rw-r--r--keyboards/handwired/onekey/at_start_f415/keyboard.json4
-rw-r--r--keyboards/handwired/onekey/at_start_f415/mcuconf.h4
-rw-r--r--keyboards/handwired/onekey/rules.mk1
-rw-r--r--keyboards/handwired/pill60/rules.mk1
-rw-r--r--keyboards/handwired/postageboard/rules.mk1
-rw-r--r--keyboards/handwired/qc60/rules.mk1
-rw-r--r--keyboards/handwired/sono1/rules.mk1
-rw-r--r--keyboards/handwired/splittest/rules.mk1
-rw-r--r--keyboards/handwired/stef9998/split_5x7/rules.mk1
-rw-r--r--keyboards/handwired/symmetric70_proto/promicro/rules.mk1
-rw-r--r--keyboards/handwired/symmetric70_proto/proton_c/rules.mk1
-rw-r--r--keyboards/handwired/unk/rules.mk1
-rw-r--r--keyboards/handwired/xealous/config.h32
-rw-r--r--keyboards/handwired/xealous/matrix.c49
-rw-r--r--keyboards/handwired/xealous/rev1/config.h13
-rw-r--r--keyboards/handwired/xealous/rules.mk3
-rw-r--r--keyboards/hillside/46/rules.mk1
-rw-r--r--keyboards/hillside/48/rules.mk1
-rw-r--r--keyboards/hillside/52/rules.mk1
-rw-r--r--keyboards/ibm/model_m/mschwingen/mschwingen.c5
-rw-r--r--keyboards/ibnuda/squiggle/rules.mk1
-rw-r--r--keyboards/idobao/id80/v1/rules.mk2
-rw-r--r--keyboards/idobao/id80/v3/rules.mk2
-rw-r--r--keyboards/inett_studio/sq80/rules.mk1
-rw-r--r--keyboards/input_club/infinity60/rules.mk1
-rw-r--r--keyboards/jacky_studio/bear_65/rules.mk1
-rw-r--r--keyboards/jacky_studio/piggy60/rev1/rules.mk1
-rw-r--r--keyboards/jacky_studio/piggy60/rules.mk1
-rw-r--r--keyboards/jadookb/jkb65/rules.mk1
-rw-r--r--keyboards/jian/rules.mk1
-rw-r--r--keyboards/jiran/rules.mk1
-rw-r--r--keyboards/jones/rules.mk1
-rw-r--r--keyboards/jorne/rules.mk1
-rw-r--r--keyboards/jukaie/jk01/config.h3
-rw-r--r--keyboards/junco/rules.mk1
-rw-r--r--keyboards/kakunpc/angel17/rules.mk1
-rw-r--r--keyboards/kakunpc/business_card/rules.mk1
-rw-r--r--keyboards/kakunpc/suihankey/rules.mk1
-rw-r--r--keyboards/kakunpc/suihankey/split/rules.mk1
-rw-r--r--keyboards/kapcave/paladinpad/rules.mk1
-rw-r--r--keyboards/kapl/rules.mk1
-rw-r--r--keyboards/kbdfans/d45/rules.mk1
-rw-r--r--keyboards/kbdfans/kbd75/rules.mk1
-rw-r--r--keyboards/keebio/bdn9/rules.mk1
-rw-r--r--keyboards/keebio/convolution/rules.mk1
-rw-r--r--keyboards/keebio/dsp40/rules.mk1
-rw-r--r--keyboards/keebio/foldkb/rules.mk1
-rw-r--r--keyboards/keebio/kbo5000/rules.mk1
-rw-r--r--keyboards/keebio/levinson/rules.mk1
-rw-r--r--keyboards/keebio/quefrency/rules.mk1
-rw-r--r--keyboards/keebio/rorschach/rules.mk1
-rw-r--r--keyboards/keebio/sinc/rules.mk1
-rw-r--r--keyboards/keebio/viterbi/rules.mk1
-rw-r--r--keyboards/keycapsss/kimiko/rules.mk1
-rw-r--r--keyboards/keycapsss/plaid_pad/rules.mk1
-rw-r--r--keyboards/keyhive/navi10/rules.mk1
-rw-r--r--keyboards/keyhive/uno/rules.mk1
-rw-r--r--keyboards/kin80/rules.mk1
-rw-r--r--keyboards/kprepublic/jj40/rules.mk1
-rw-r--r--keyboards/kprepublic/jj50/rules.mk1
-rw-r--r--keyboards/kradoindustries/promenade/keyboard.json10
-rw-r--r--keyboards/kradoindustries/promenade/keymaps/default/keymap.c20
-rw-r--r--keyboards/kradoindustries/promenade/matrix_diagram.md8
-rw-r--r--keyboards/kumaokobo/kudox/rules.mk1
-rw-r--r--keyboards/kumaokobo/kudox_full/rules.mk1
-rw-r--r--keyboards/kumaokobo/kudox_game/rules.mk1
-rw-r--r--keyboards/kumaokobo/pico/rules.mk1
-rw-r--r--keyboards/lazydesigners/dimple/rules.mk1
-rw-r--r--keyboards/lets_split/rules.mk1
-rw-r--r--keyboards/lfkeyboards/lfk78/rules.mk1
-rw-r--r--keyboards/lfkeyboards/lfk87/rules.mk1
-rw-r--r--keyboards/lfkeyboards/smk65/rules.mk1
-rw-r--r--keyboards/lily58/rules.mk1
-rw-r--r--keyboards/lime/rules.mk1
-rw-r--r--keyboards/maple_computing/christmas_tree/rules.mk1
-rw-r--r--keyboards/maple_computing/ivy/rules.mk1
-rw-r--r--keyboards/maple_computing/launchpad/rules.mk1
-rw-r--r--keyboards/maple_computing/minidox/rules.mk1
-rw-r--r--keyboards/mariorion_v25/rules.mk1
-rw-r--r--keyboards/marksard/rhymestone/rules.mk1
-rw-r--r--keyboards/marksard/treadstone32/rules.mk1
-rw-r--r--keyboards/marksard/treadstone48/rules.mk1
-rw-r--r--keyboards/maxipad/rules.mk1
-rw-r--r--keyboards/mechkeys/mechmini/rules.mk1
-rw-r--r--keyboards/mechllama/g35/rules.mk1
-rw-r--r--keyboards/mechlovin/adelais/rgb_led/rules.mk1
-rw-r--r--keyboards/mechlovin/adelais/rules.mk1
-rw-r--r--keyboards/mechlovin/adelais/standard_led/arm/rev4/rules.mk1
-rw-r--r--keyboards/mechlovin/adelais/standard_led/arm/rules.mk1
-rw-r--r--keyboards/mechlovin/adelais/standard_led/avr/rules.mk2
-rw-r--r--keyboards/mechlovin/adelais/standard_led/rules.mk1
-rw-r--r--keyboards/mechlovin/delphine/rules.mk1
-rw-r--r--keyboards/mechlovin/hannah60rgb/rules.mk1
-rw-r--r--keyboards/mechlovin/hannah65/rev1/rules.mk1
-rw-r--r--keyboards/mechlovin/hannah65/rules.mk1
-rw-r--r--keyboards/mechlovin/hannah910/rules.mk1
-rw-r--r--keyboards/mechlovin/hex4b/rules.mk1
-rw-r--r--keyboards/mechlovin/infinity87/rev1/rules.mk1
-rw-r--r--keyboards/mechlovin/infinity87/rules.mk1
-rw-r--r--keyboards/mechlovin/mechlovin9/rules.mk1
-rw-r--r--keyboards/mechlovin/olly/jf/rules.mk1
-rw-r--r--keyboards/mechlovin/zed1800/rules.mk1
-rw-r--r--keyboards/mechlovin/zed65/no_backlight/rules.mk1
-rw-r--r--keyboards/mechlovin/zed65/rules.mk1
-rw-r--r--keyboards/mechwild/bde/rules.mk1
-rw-r--r--keyboards/mechwild/mokulua/rules.mk1
-rw-r--r--keyboards/mechwild/obe/f401/rules.mk1
-rw-r--r--keyboards/mechwild/obe/f411/rules.mk1
-rw-r--r--keyboards/mechwild/obe/rules.mk1
-rw-r--r--keyboards/mechwild/waka60/f401/rules.mk1
-rw-r--r--keyboards/mechwild/waka60/f411/rules.mk1
-rw-r--r--keyboards/mechwild/waka60/rules.mk1
-rw-r--r--keyboards/melgeek/z70ultra/rules.mk1
-rw-r--r--keyboards/moky/moky88/config.h3
-rw-r--r--keyboards/moky/moky88/moky88.c176
-rw-r--r--keyboards/montsinger/rebound/rules.mk1
-rw-r--r--keyboards/murcielago/rules.mk1
-rw-r--r--keyboards/nullbitsco/scramble/rules.mk1
-rw-r--r--keyboards/omkbd/ergodash/rules.mk1
-rw-r--r--keyboards/omkbd/runner3680/rules.mk1
-rw-r--r--keyboards/orthodox/rules.mk1
-rw-r--r--keyboards/peej/rosaline/rules.mk1
-rw-r--r--keyboards/peej/tripel/rules.mk1
-rw-r--r--keyboards/peranekofactory/tone/rules.mk1
-rw-r--r--keyboards/phase_studio/titan65/rules.mk1
-rw-r--r--keyboards/pica40/rules.mk1
-rw-r--r--keyboards/pinky/rules.mk1
-rw-r--r--keyboards/polilla/rules.mk1
-rw-r--r--keyboards/primekb/meridian/rules.mk1
-rw-r--r--keyboards/primekb/prime_e/rules.mk1
-rw-r--r--keyboards/primekb/prime_l/rules.mk1
-rw-r--r--keyboards/program_yoink/rules.mk1
-rw-r--r--keyboards/projectcain/vault35/rules.mk1
-rw-r--r--keyboards/projectd/65/projectd_65_ansi/config.h3
-rw-r--r--keyboards/projectd/75/ansi/config.h3
-rw-r--r--keyboards/projectd/75/iso/config.h3
-rw-r--r--keyboards/projectkb/alice/rules.mk1
-rw-r--r--keyboards/qpockets/space_space/rules.mk1
-rw-r--r--keyboards/qwertyydox/rules.mk1
-rw-r--r--keyboards/rate/pistachio/rules.mk1
-rw-r--r--keyboards/recompile_keys/choco60/rules.mk1
-rw-r--r--keyboards/recompile_keys/nomu30/rules.mk1
-rw-r--r--keyboards/redox/rev1/rules.mk1
-rw-r--r--keyboards/rgbkb/mun/rules.mk1
-rw-r--r--keyboards/rgbkb/pan/rev1/32a/rules.mk2
-rw-r--r--keyboards/rgbkb/pan/rev1/proton_c/rules.mk1
-rw-r--r--keyboards/rgbkb/pan/rev1/rules.mk2
-rw-r--r--keyboards/rgbkb/pan/rules.mk3
-rw-r--r--keyboards/rgbkb/sol/rules.mk1
-rw-r--r--keyboards/rgbkb/sol3/rev1/keyboard.json2
-rw-r--r--keyboards/rgbkb/sol3/rules.mk1
-rw-r--r--keyboards/rgbkb/zen/rules.mk1
-rw-r--r--keyboards/rgbkb/zygomorph/rules.mk1
-rw-r--r--keyboards/rmi_kb/herringbone/rules.mk1
-rw-r--r--keyboards/rmi_kb/mona/rules.mk1
-rw-r--r--keyboards/rmi_kb/tkl_ff/rules.mk1
-rw-r--r--keyboards/rmi_kb/wete/rules.mk1
-rwxr-xr-xkeyboards/rookiebwoy/late9/rules.mk1
-rwxr-xr-xkeyboards/rookiebwoy/neopad/rules.mk1
-rw-r--r--keyboards/rura66/rules.mk1
-rw-r--r--keyboards/salicylic_acid3/7skb/rules.mk1
-rw-r--r--keyboards/salicylic_acid3/getta25/rules.mk1
-rw-r--r--keyboards/salicylic_acid3/jisplit89/rules.mk1
-rw-r--r--keyboards/salicylic_acid3/naked48/rules.mk1
-rw-r--r--keyboards/salicylic_acid3/naked60/rules.mk1
-rw-r--r--keyboards/salicylic_acid3/naked64/rules.mk1
-rw-r--r--keyboards/salicylic_acid3/setta21/rules.mk1
-rw-r--r--keyboards/sawnsprojects/okayu/rules.mk1
-rw-r--r--keyboards/sharkoon/skiller_sgk50_s4/keyboard.json130
-rw-r--r--keyboards/sharkoon/skiller_sgk50_s4/keymaps/default/keymap.c12
-rw-r--r--keyboards/silakka54/config.h25
-rw-r--r--keyboards/silakka54/keyboard.json102
-rw-r--r--keyboards/silakka54/keymaps/default/keymap.c22
-rw-r--r--keyboards/silakka54/readme.md26
-rw-r--r--keyboards/skyloong/gk61/pro/config.h3
-rw-r--r--keyboards/skyloong/gk61/pro/pro.c149
-rw-r--r--keyboards/skyloong/gk61/pro_48/config.h4
-rw-r--r--keyboards/skyloong/gk61/pro_48/pro_48.c93
-rw-r--r--keyboards/smoll/lefty/rules.mk1
-rw-r--r--keyboards/sofle/rules.mk1
-rw-r--r--keyboards/spaceholdings/nebula68b/rules.mk1
-rw-r--r--keyboards/spacetime/rules.mk1
-rw-r--r--keyboards/splitkb/aurora/helix/rules.mk1
-rw-r--r--keyboards/splitkb/aurora/sofle_v2/rules.mk1
-rw-r--r--keyboards/splitkb/kyria/rev1/rules.mk1
-rw-r--r--keyboards/splitkb/kyria/rev2/rules.mk1
-rw-r--r--keyboards/splitkb/kyria/rules.mk1
-rw-r--r--keyboards/splitty/rules.mk1
-rw-r--r--keyboards/studiokestra/galatea/rules.mk1
-rw-r--r--keyboards/takashiski/hecomi/rules.mk1
-rw-r--r--keyboards/takashiski/namecard2x4/rules.mk1
-rw-r--r--keyboards/themadnoodle/noodlepad/rules.mk3
-rw-r--r--keyboards/tkw/grandiceps/rules.mk1
-rw-r--r--keyboards/tkw/stoutgat/v2/rules.mk1
-rw-r--r--keyboards/tominabox1/le_chiffre/rules.mk1
-rw-r--r--keyboards/tominabox1/littlefoot_lx/rules.mk1
-rw-r--r--keyboards/tominabox1/underscore33/rules.mk1
-rw-r--r--keyboards/trnthsn/e8ghty/rules.mk1
-rw-r--r--keyboards/trnthsn/s6xty5neor2/rules.mk1
-rw-r--r--keyboards/tweetydabird/lotus58/rules.mk1
-rw-r--r--keyboards/unison/rules.mk1
-rw-r--r--keyboards/uzu42/rules.mk1
-rw-r--r--keyboards/vitamins_included/rules.mk1
-rw-r--r--keyboards/whale/sk/rules.mk1
-rw-r--r--keyboards/yanghu/unicorne/rules.mk1
-rw-r--r--keyboards/ymdk/id75/f103/board.h (renamed from keyboards/ymdk/id75/board.h)0
-rw-r--r--keyboards/ymdk/id75/f103/config.h (renamed from keyboards/ymdk/id75/config.h)0
-rw-r--r--keyboards/ymdk/id75/f103/halconf.h (renamed from keyboards/ymdk/id75/halconf.h)0
-rw-r--r--keyboards/ymdk/id75/f103/keyboard.json13
-rw-r--r--keyboards/ymdk/id75/f103/mcuconf.h (renamed from keyboards/ymdk/id75/mcuconf.h)0
-rw-r--r--keyboards/ymdk/id75/f103/rules.mk (renamed from keyboards/ymdk/id75/rules.mk)0
-rw-r--r--keyboards/ymdk/id75/info.json (renamed from keyboards/ymdk/id75/keyboard.json)231
-rw-r--r--keyboards/ymdk/id75/readme.md12
-rw-r--r--keyboards/ymdk/melody96/rules.mk1
-rw-r--r--keyboards/ymdk/yd60mq/rules.mk1
-rw-r--r--keyboards/yosino58/rules.mk1
-rw-r--r--keyboards/yushakobo/navpad/10/rules.mk1
-rw-r--r--keyboards/yynmt/acperience12/rules.mk1
-rw-r--r--keyboards/zsa/voyager/voyager.c2
m---------lib/chibios0
m---------lib/chibios-contrib0
-rw-r--r--lib/python/qmk/cli/__init__.py1
-rwxr-xr-xlib/python/qmk/cli/generate/keyboard_c.py138
-rwxr-xr-xlib/python/qmk/cli/generate/keyboard_h.py19
-rwxr-xr-xlib/python/qmk/cli/new/keymap.py6
-rw-r--r--lib/python/qmk/cli/resolve_alias.py16
-rwxr-xr-xlib/python/qmk/cli/via2json.py32
-rw-r--r--lib/python/qmk/flashers.py7
-rw-r--r--platforms/avr/drivers/i2c_master.h51
-rw-r--r--platforms/avr/drivers/spi_master.h68
-rw-r--r--platforms/avr/drivers/uart.h39
-rw-r--r--platforms/avr/timer.c28
-rw-r--r--platforms/chibios/boards/GENERIC_AT32_F415XX/board/board.c4
-rw-r--r--platforms/chibios/boards/GENERIC_AT32_F415XX/board/board.h28
-rw-r--r--platforms/chibios/boards/GENERIC_AT32_F415XX/configs/config.h4
-rw-r--r--platforms/chibios/boards/GENERIC_AT32_F415XX/configs/mcuconf.h16
-rw-r--r--platforms/chibios/boards/GENERIC_STM32_H723XG/configs/mcuconf.h2
-rw-r--r--platforms/chibios/boards/QMK_PROTON_C/configs/chconf.h23
-rw-r--r--platforms/chibios/boards/common/configs/chconf.h23
-rw-r--r--platforms/chibios/chibios_config.h4
-rw-r--r--platforms/chibios/drivers/audio_pwm_hardware.c18
-rw-r--r--platforms/chibios/drivers/i2c_master.c43
-rw-r--r--platforms/chibios/drivers/i2c_master.h49
-rw-r--r--platforms/chibios/drivers/spi_master.c43
-rw-r--r--platforms/chibios/drivers/spi_master.h102
-rw-r--r--platforms/chibios/drivers/uart.h200
-rw-r--r--platforms/chibios/drivers/uart_serial.c83
-rw-r--r--platforms/chibios/drivers/uart_sio.c67
-rw-r--r--platforms/chibios/timer.c12
-rw-r--r--platforms/test/timer.c8
-rw-r--r--platforms/timer.c8
-rw-r--r--platforms/timer.h7
-rw-r--r--quantum/action_tapping.c274
-rw-r--r--quantum/action_tapping.h65
-rw-r--r--quantum/audio/audio.c5
-rw-r--r--quantum/debounce/tests/rules.mk1
-rw-r--r--quantum/dynamic_keymap.c66
-rw-r--r--quantum/keymap_extras/keymap_eurkey.h166
-rw-r--r--quantum/keymap_extras/keymap_farsi.h2
-rw-r--r--quantum/leader.c7
-rw-r--r--quantum/leader.h9
-rw-r--r--quantum/os_detection/tests/rules.mk1
-rw-r--r--quantum/painter/qgf.c8
-rw-r--r--quantum/painter/qp_draw_image.c6
-rw-r--r--quantum/quantum.c6
-rw-r--r--quantum/rgb_matrix/animations/hue_breathing_anim.h22
-rw-r--r--quantum/rgb_matrix/animations/raindrops_anim.h29
-rw-r--r--quantum/rgb_matrix/animations/starlight_anim.h29
-rw-r--r--quantum/rgb_matrix/animations/starlight_dual_hue_anim.h31
-rw-r--r--quantum/rgb_matrix/animations/starlight_dual_sat_anim.h31
-rw-r--r--quantum/send_string/send_string.c88
-rw-r--r--quantum/send_string/send_string.h8
-rw-r--r--quantum/sequencer/tests/rules.mk1
-rw-r--r--readme.md4
-rw-r--r--tests/tap_hold_configurations/chordal_hold/default/config.h21
-rw-r--r--tests/tap_hold_configurations/chordal_hold/default/test.mk (renamed from keyboards/splitkb/aurora/corne/rules.mk)5
-rw-r--r--tests/tap_hold_configurations/chordal_hold/default/test_keymap.c22
-rw-r--r--tests/tap_hold_configurations/chordal_hold/default/test_one_shot_keys.cpp168
-rw-r--r--tests/tap_hold_configurations/chordal_hold/default/test_tap_hold.cpp264
-rw-r--r--tests/tap_hold_configurations/chordal_hold/hold_on_other_key_press/config.h22
-rw-r--r--tests/tap_hold_configurations/chordal_hold/hold_on_other_key_press/test.mk (renamed from keyboards/splitkb/aurora/lily58/rules.mk)5
-rw-r--r--tests/tap_hold_configurations/chordal_hold/hold_on_other_key_press/test_keymap.c22
-rw-r--r--tests/tap_hold_configurations/chordal_hold/hold_on_other_key_press/test_tap_hold.cpp850
-rw-r--r--tests/tap_hold_configurations/chordal_hold/permissive_hold/config.h22
-rw-r--r--tests/tap_hold_configurations/chordal_hold/permissive_hold/test.mk (renamed from keyboards/splitkb/aurora/sweep/rules.mk)5
-rw-r--r--tests/tap_hold_configurations/chordal_hold/permissive_hold/test_keymap.c22
-rw-r--r--tests/tap_hold_configurations/chordal_hold/permissive_hold/test_one_shot_keys.cpp174
-rw-r--r--tests/tap_hold_configurations/chordal_hold/permissive_hold/test_tap_hold.cpp941
-rw-r--r--tests/tap_hold_configurations/chordal_hold/retro_shift_permissive_hold/config.h28
-rw-r--r--tests/tap_hold_configurations/chordal_hold/retro_shift_permissive_hold/test.mk18
-rw-r--r--tests/tap_hold_configurations/chordal_hold/retro_shift_permissive_hold/test_keymap.c22
-rw-r--r--tests/tap_hold_configurations/chordal_hold/retro_shift_permissive_hold/test_retro_shift.cpp420
-rw-r--r--tmk_core/protocol/chibios/usb_main.c8
-rwxr-xr-xutil/install/macos.sh15
408 files changed, 6889 insertions, 4439 deletions
diff --git a/Makefile b/Makefile
index 5fcd6bbf0f..c68ee7418a 100644
--- a/Makefile
+++ b/Makefile
@@ -113,6 +113,29 @@ endef
# Make it easier to call TRY_TO_MATCH_RULE_FROM_LIST
TRY_TO_MATCH_RULE_FROM_LIST = $(eval $(call TRY_TO_MATCH_RULE_FROM_LIST_HELPER,$1))$(RULE_FOUND)
+# As TRY_TO_MATCH_RULE_FROM_LIST_HELPER, but with additional
+# resolution of DEFAULT_FOLDER and keyboard_aliases.hjson for provided rule
+define TRY_TO_MATCH_RULE_FROM_LIST_HELPER_KB
+ # Split on ":", padding with empty strings to avoid indexing issues
+ TOKEN1:=$$(shell python3 -c "import sys; print((sys.argv[1].split(':',1)+[''])[0])" $$(RULE))
+ TOKENr:=$$(shell python3 -c "import sys; print((sys.argv[1].split(':',1)+[''])[1])" $$(RULE))
+
+ TOKEN1:=$$(shell $(QMK_BIN) resolve-alias --allow-unknown $$(TOKEN1))
+
+ FOUNDx:=$$(shell echo $1 | tr " " "\n" | grep -Fx $$(TOKEN1))
+ ifneq ($$(FOUNDx),)
+ RULE := $$(TOKENr)
+ RULE_FOUND := true
+ MATCHED_ITEM := $$(TOKEN1)
+ else
+ RULE_FOUND := false
+ MATCHED_ITEM :=
+ endif
+endef
+
+# Make it easier to call TRY_TO_MATCH_RULE_FROM_LIST_KB
+TRY_TO_MATCH_RULE_FROM_LIST_KB = $(eval $(call TRY_TO_MATCH_RULE_FROM_LIST_HELPER_KB,$1))$(RULE_FOUND)
+
define ALL_IN_LIST_LOOP
OLD_RULE$1 := $$(RULE)
$$(eval $$(call $1,$$(ITEM$1)))
@@ -138,7 +161,7 @@ define PARSE_RULE
$$(eval $$(call PARSE_TEST))
# If the rule starts with the name of a known keyboard, then continue
# the parsing from PARSE_KEYBOARD
- else ifeq ($$(call TRY_TO_MATCH_RULE_FROM_LIST,$$(shell $(QMK_BIN) list-keyboards --no-resolve-defaults)),true)
+ else ifeq ($$(call TRY_TO_MATCH_RULE_FROM_LIST_KB,$$(shell $(QMK_BIN) list-keyboards)),true)
KEYBOARD_RULE=$$(MATCHED_ITEM)
$$(eval $$(call PARSE_KEYBOARD,$$(MATCHED_ITEM)))
else
@@ -170,17 +193,6 @@ define PARSE_KEYBOARD
# include the correct makefile to determine the actual name of it
CURRENT_KB := $1
- # KEYBOARD_FOLDERS := $$(subst /, , $(CURRENT_KB))
-
- DEFAULT_FOLDER := $$(CURRENT_KB)
-
- # We assume that every rules.mk will contain the full default value
- $$(eval include $(ROOT_DIR)/keyboards/$$(CURRENT_KB)/rules.mk)
- ifneq ($$(DEFAULT_FOLDER),$$(CURRENT_KB))
- $$(eval include $(ROOT_DIR)/keyboards/$$(DEFAULT_FOLDER)/rules.mk)
- endif
- CURRENT_KB := $$(DEFAULT_FOLDER)
-
# 5/4/3/2/1
KEYBOARD_FOLDER_PATH_1 := $$(CURRENT_KB)
KEYBOARD_FOLDER_PATH_2 := $$(patsubst %/,%,$$(dir $$(KEYBOARD_FOLDER_PATH_1)))
diff --git a/builddefs/common_features.mk b/builddefs/common_features.mk
index bb272099a6..c88ce36011 100644
--- a/builddefs/common_features.mk
+++ b/builddefs/common_features.mk
@@ -635,6 +635,10 @@ ifeq ($(strip $(VIA_ENABLE)), yes)
TRI_LAYER_ENABLE := yes
endif
+ifeq ($(strip $(DYNAMIC_KEYMAP_ENABLE)), yes)
+ SEND_STRING_ENABLE := yes
+endif
+
VALID_CUSTOM_MATRIX_TYPES:= yes lite no
CUSTOM_MATRIX ?= no
@@ -940,6 +944,8 @@ ifeq ($(strip $(WS2812_DRIVER_REQUIRED)), yes)
OPT_DEFS += -DWS2812_$(strip $(shell echo $(WS2812_DRIVER) | tr '[:lower:]' '[:upper:]'))
+ COMMON_VPATH += $(DRIVER_PATH)/led
+
SRC += ws2812.c ws2812_$(strip $(WS2812_DRIVER)).c
ifeq ($(strip $(PLATFORM)), CHIBIOS)
diff --git a/data/constants/keycodes/extras/keycodes_eurkey_0.0.1.hjson b/data/constants/keycodes/extras/keycodes_eurkey_0.0.1.hjson
new file mode 100644
index 0000000000..9ff217cff2
--- /dev/null
+++ b/data/constants/keycodes/extras/keycodes_eurkey_0.0.1.hjson
@@ -0,0 +1,596 @@
+{
+ "aliases": {
+/*
+ * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
+ * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ │
+ * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
+ * │ │ 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 │ , │ . │ / │ │
+ * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
+ * │ │ │ │ │ │ │ │ │
+ * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
+ */
+ "KC_GRV": {
+ "key": "EU_GRV",
+ "label": "`",
+ }
+ "KC_1": {
+ "key": "EU_1",
+ "label": "1",
+ }
+ "KC_2": {
+ "key": "EU_2",
+ "label": "2",
+ }
+ "KC_3": {
+ "key": "EU_3",
+ "label": "3",
+ }
+ "KC_4": {
+ "key": "EU_4",
+ "label": "4",
+ }
+ "KC_5": {
+ "key": "EU_5",
+ "label": "5",
+ }
+ "KC_6": {
+ "key": "EU_6",
+ "label": "6",
+ }
+ "KC_7": {
+ "key": "EU_7",
+ "label": "7",
+ }
+ "KC_8": {
+ "key": "EU_8",
+ "label": "8",
+ }
+ "KC_9": {
+ "key": "EU_9",
+ "label": "9",
+ }
+ "KC_0": {
+ "key": "EU_0",
+ "label": "0",
+ }
+ "KC_MINS": {
+ "key": "EU_MINS",
+ "label": "-",
+ }
+ "KC_EQL": {
+ "key": "EU_EQL",
+ "label": "=",
+ }
+ "KC_Q": {
+ "key": "EU_Q",
+ "label": "Q",
+ }
+ "KC_W": {
+ "key": "EU_W",
+ "label": "W",
+ }
+ "KC_E": {
+ "key": "EU_E",
+ "label": "E",
+ }
+ "KC_R": {
+ "key": "EU_R",
+ "label": "R",
+ }
+ "KC_T": {
+ "key": "EU_T",
+ "label": "T",
+ }
+ "KC_Y": {
+ "key": "EU_Y",
+ "label": "Y",
+ }
+ "KC_U": {
+ "key": "EU_U",
+ "label": "U",
+ }
+ "KC_I": {
+ "key": "EU_I",
+ "label": "I",
+ }
+ "KC_O": {
+ "key": "EU_O",
+ "label": "O",
+ }
+ "KC_P": {
+ "key": "EU_P",
+ "label": "P",
+ }
+ "KC_LBRC": {
+ "key": "EU_LBRC",
+ "label": "[",
+ }
+ "KC_RBRC": {
+ "key": "EU_RBRC",
+ "label": "]",
+ }
+ "KC_BSLS": {
+ "key": "EU_BSLS",
+ "label": "\\",
+ }
+ "KC_A": {
+ "key": "EU_A",
+ "label": "A",
+ }
+ "KC_S": {
+ "key": "EU_S",
+ "label": "S",
+ }
+ "KC_D": {
+ "key": "EU_D",
+ "label": "D",
+ }
+ "KC_F": {
+ "key": "EU_F",
+ "label": "F",
+ }
+ "KC_G": {
+ "key": "EU_G",
+ "label": "G",
+ }
+ "KC_H": {
+ "key": "EU_H",
+ "label": "H",
+ }
+ "KC_J": {
+ "key": "EU_J",
+ "label": "J",
+ }
+ "KC_K": {
+ "key": "EU_K",
+ "label": "K",
+ }
+ "KC_L": {
+ "key": "EU_L",
+ "label": "L",
+ }
+ "KC_SCLN": {
+ "key": "EU_SCLN",
+ "label": ";",
+ }
+ "KC_QUOT": {
+ "key": "EU_QUOT",
+ "label": "'",
+ }
+ "KC_Z": {
+ "key": "EU_Z",
+ "label": "Z",
+ }
+ "KC_X": {
+ "key": "EU_X",
+ "label": "X",
+ }
+ "KC_C": {
+ "key": "EU_C",
+ "label": "C",
+ }
+ "KC_V": {
+ "key": "EU_V",
+ "label": "V",
+ }
+ "KC_B": {
+ "key": "EU_B",
+ "label": "B",
+ }
+ "KC_N": {
+ "key": "EU_N",
+ "label": "N",
+ }
+ "KC_M": {
+ "key": "EU_M",
+ "label": "M",
+ }
+ "KC_COMM": {
+ "key": "EU_COMM",
+ "label": ",",
+ }
+ "KC_DOT": {
+ "key": "EU_DOT",
+ "label": ".",
+ }
+ "KC_SLSH": {
+ "key": "EU_SLSH",
+ "label": "/",
+ }
+/* Shifted symbols
+ * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
+ * │ ~ │ ! │ @ │ # │ $ │ % │ ^ │ & │ * │ ( │ ) │ _ │ + │ │
+ * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
+ * │ │ │ │ │ │ │ │ │ │ │ │ { │ } │ | │
+ * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤
+ * │ │ │ │ │ │ │ │ │ │ │ : │ " │ │
+ * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤
+ * │ │ │ │ │ │ │ │ │ < │ > │ ? │ │
+ * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
+ * │ │ │ │ │ │ │ │ │
+ * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
+ */
+ "S(EU_GRV)": {
+ "key": "EU_TILD",
+ "label": "~",
+ }
+ "S(EU_1)": {
+ "key": "EU_EXLM",
+ "label": "!",
+ }
+ "S(EU_2)": {
+ "key": "EU_AT",
+ "label": "@",
+ }
+ "S(EU_3)": {
+ "key": "EU_HASH",
+ "label": "#",
+ }
+ "S(EU_4)": {
+ "key": "EU_DLR",
+ "label": "$",
+ }
+ "S(EU_5)": {
+ "key": "EU_PERC",
+ "label": "%",
+ }
+ "S(EU_6)": {
+ "key": "EU_CIRC",
+ "label": "^",
+ }
+ "S(EU_7)": {
+ "key": "EU_AMPR",
+ "label": "&",
+ }
+ "S(EU_8)": {
+ "key": "EU_ASTR",
+ "label": "*",
+ }
+ "S(EU_9)": {
+ "key": "EU_LPRN",
+ "label": "(",
+ }
+ "S(EU_0)": {
+ "key": "EU_RPRN",
+ "label": ")",
+ }
+ "S(EU_MINS)": {
+ "key": "EU_UNDS",
+ "label": "_",
+ }
+ "S(EU_EQL)": {
+ "key": "EU_PLUS",
+ "label": "+",
+ }
+ "S(EU_LBRC)": {
+ "key": "EU_LCBR",
+ "label": "{",
+ }
+ "S(EU_RBRC)": {
+ "key": "EU_RCBR",
+ "label": "}",
+ }
+ "S(EU_BSLS)": {
+ "key": "EU_PIPE",
+ "label": "|",
+ }
+ "S(EU_SCLN)": {
+ "key": "EU_COLN",
+ "label": ":",
+ }
+ "S(EU_QUOT)": {
+ "key": "EU_DQUO",
+ "label": "\"",
+ }
+ "S(EU_COMM)": {
+ "key": "EU_LABK",
+ "label": "<",
+ }
+ "S(EU_DOT)": {
+ "key": "EU_RABK",
+ "label": ">",
+ }
+ "S(EU_SLSH)": {
+ "key": "EU_QUES",
+ "label": "?",
+ }
+/* AltGr symbols
+ * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
+ * │ ` │ ¡ │ ª │ º │ £ │ € │ ^ │ ˚ │ „ │ “ │ ” │ – │ × │ │
+ * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
+ * │ │ æ │ å │ ë │ ý │ þ │ ÿ │ ü │ ï │ ö │ œ │ « │ » │ ¬ │
+ * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤
+ * │ │ ä │ ß │ ð │ è │ é │ ù │ ú │ ij │ ø │ ° │ ´ │ │
+ * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤
+ * │ │ à │ á │ ç │ ì │ í │ ñ │ μ │ ò │ ó │ ¿ │ │
+ * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
+ * │ │ │ │ │ │ │ │ │
+ * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
+ */
+ "ALGR(EU_GRV)": {
+ "key": "EU_DGRV",
+ "label": "` (dead)",
+ }
+ "ALGR(EU_1)": {
+ "key": "EU_IEXL",
+ "label": "¡",
+ }
+ "ALGR(EU_2)": {
+ "key": "EU_FORD",
+ "label": "ª",
+ }
+ "ALGR(EU_3)": {
+ "key": "EU_MORD",
+ "label": "º",
+ }
+ "ALGR(EU_4)": {
+ "key": "EU_PND",
+ "label": "£",
+ }
+ "ALGR(EU_5)": {
+ "key": "EU_EURO",
+ "label": "€",
+ }
+ "ALGR(EU_6)": {
+ "key": "EU_DCIR",
+ "label": "^ (dead)",
+ }
+ "ALGR(EU_7)": {
+ "key": "EU_RNGA",
+ "label": "˚ (dead)",
+ }
+ "ALGR(EU_8)": {
+ "key": "EU_DLQU",
+ "label": "„",
+ }
+ "ALGR(EU_9)": {
+ "key": "EU_LDQU",
+ "label": "“",
+ }
+ "ALGR(EU_0)": {
+ "key": "EU_RDQU",
+ "label": "”",
+ }
+ "ALGR(EU_MINS)": {
+ "key": "EU_NDSH",
+ "label": "–",
+ }
+ "ALGR(EU_EQL)": {
+ "key": "EU_MUL",
+ "label": "×",
+ }
+ "ALGR(EU_Q)": {
+ "key": "EU_AE",
+ "label": "æ",
+ }
+ "ALGR(EU_W)": {
+ "key": "EU_ARNG",
+ "label": "Å",
+ }
+ "ALGR(EU_E)": {
+ "key": "EU_EDIA",
+ "label": "Ë",
+ }
+ "ALGR(EU_R)": {
+ "key": "EU_YACU",
+ "label": "Ý",
+ }
+ "ALGR(EU_T)": {
+ "key": "EU_THRN",
+ "label": "Þ",
+ }
+ "ALGR(EU_Y)": {
+ "key": "EU_YDIA",
+ "label": "Ÿ",
+ }
+ "ALGR(EU_U)": {
+ "key": "EU_UDIA",
+ "label": "Ü",
+ }
+ "ALGR(EU_I)": {
+ "key": "EU_IDIA",
+ "label": "Ï",
+ }
+ "ALGR(EU_O)": {
+ "key": "EU_ODIA",
+ "label": "Ö",
+ }
+ "ALGR(EU_P)": {
+ "key": "EU_OE",
+ "label": "Œ",
+ }
+ "ALGR(EU_LBRC)": {
+ "key": "EU_LDAQ",
+ "label": "«",
+ }
+ "ALGR(EU_RBRC)": {
+ "key": "EU_RDAQ",
+ "label": "»",
+ }
+ "ALGR(EU_BSLS)": {
+ "key": "EU_NOT",
+ "label": "¬",
+ }
+ "ALGR(EU_A)": {
+ "key": "EU_ADIA",
+ "label": "Ä",
+ }
+ "ALGR(EU_S)": {
+ "key": "EU_SS",
+ "label": "ß",
+ }
+ "ALGR(EU_D)": {
+ "key": "EU_ETH",
+ "label": "Ð",
+ }
+ "ALGR(EU_F)": {
+ "key": "EU_EGRV",
+ "label": "È",
+ }
+ "ALGR(EU_G)": {
+ "key": "EU_EACU",
+ "label": "É",
+ }
+ "ALGR(EU_H)": {
+ "key": "EU_UGRV",
+ "label": "Ù",
+ }
+ "ALGR(EU_J)": {
+ "key": "EU_UACU",
+ "label": "Ú",
+ }
+ "ALGR(EU_K)": {
+ "key": "EU_IJ",
+ "label": "IJ",
+ }
+ "ALGR(EU_L)": {
+ "key": "EU_OSTR",
+ "label": "Ø",
+ }
+ "ALGR(EU_SCLN)": {
+ "key": "EU_DEG",
+ "label": "°",
+ }
+ "ALGR(EU_QUOT)": {
+ "key": "EU_ACUT",
+ "label": "´ (dead)",
+ }
+ "ALGR(EU_Z)": {
+ "key": "EU_AGRV",
+ "label": "À",
+ }
+ "ALGR(EU_X)": {
+ "key": "EU_AACU",
+ "label": "Á",
+ }
+ "ALGR(EU_C)": {
+ "key": "EU_CCED",
+ "label": "Ç",
+ }
+ "ALGR(EU_V)": {
+ "key": "EU_IGRV",
+ "label": "Ì",
+ }
+ "ALGR(EU_B)": {
+ "key": "EU_IACU",
+ "label": "Í",
+ }
+ "ALGR(EU_N)": {
+ "key": "EU_NTIL",
+ "label": "Ñ",
+ }
+ "ALGR(EU_M)": {
+ "key": "EU_DGRK",
+ "label": "μ (dead Greek key)",
+ }
+ "ALGR(EU_COMM)": {
+ "key": "EU_OGRV",
+ "label": "Ò",
+ }
+ "ALGR(EU_DOT)": {
+ "key": "EU_OACU",
+ "label": "Ó",
+ }
+ "ALGR(EU_SLSH)": {
+ "key": "EU_IQUE",
+ "label": "¿",
+ }
+/* Shift+AltGr symbols
+ * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
+ * │ ~ │ ¹ │ ² │ ³ │ ¥ │ ¢ │ ˇ │ ¯ │ ‚ │ ‘ │ ’ │ — │ ÷ │ │
+ * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
+ * │ │ │ │ │ │ │ │ │ │ │ │ ‹ │ › │ ¦ │
+ * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤
+ * │ │ │ § │ │ │ │ │ │ │ │ · │ ¨ │ │
+ * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤
+ * │ │ │ │ │ │ │ │ │ │ │ … │ │
+ * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
+ * │ │ │ │ │ │ │ │ │
+ * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
+ */
+ "ALGR(EU_TILD)": {
+ "key": "EU_DTIL",
+ "label": "~ (dead)",
+ }
+ "S(ALGR(EU_1))": {
+ "key": "EU_SUP1",
+ "label": "¹",
+ }
+ "S(ALGR(EU_2))": {
+ "key": "EU_SUP2",
+ "label": "²",
+ }
+ "S(ALGR(EU_3))": {
+ "key": "EU_SUP3",
+ "label": "³",
+ }
+ "ALGR(EU_DLR)": {
+ "key": "EU_YEN",
+ "label": "¥",
+ }
+ "S(EU_EURO)": {
+ "key": "EU_CENT",
+ "label": "¢",
+ }
+ "S(EU_DCIR)": {
+ "key": "EU_CARN",
+ "label": "ˇ (dead)",
+ }
+ "S(ALGR(EU_7))": {
+ "key": "EU_MACR",
+ "label": "¯ (dead)",
+ }
+ "S(EU_DLQU)": {
+ "key": "EU_SLQU",
+ "label": "‚",
+ }
+ "S(EU_LDQU)": {
+ "key": "EU_LSQU",
+ "label": "‘",
+ }
+ "S(EU_RDQU)": {
+ "key": "EU_RSQU",
+ "label": "’",
+ }
+ "S(EU_NDSH)": {
+ "key": "EU_MDSH",
+ "label": "—",
+ }
+ "S(EU_MUL)": {
+ "key": "EU_DIV",
+ "label": "÷",
+ }
+ "S(EU_LDAQ)": {
+ "key": "EU_LSAQ",
+ "label": "‹",
+ }
+ "S(EU_RDAQ)": {
+ "key": "EU_RSAQ",
+ "label": "›",
+ }
+ "S(ALGR(EU_BSLS))": {
+ "key": "EU_BRKP",
+ "label": "¦",
+ }
+ "S(ALGR(EU_S))": {
+ "key": "EU_SECT",
+ "label": "§",
+ }
+ "S(ALGR(EU_SCLN))": {
+ "key": "EU_MDDT",
+ "label": "·",
+ }
+ "ALGR(EU_DQUO)": {
+ "key": "EU_DIAE",
+ "label": "¨ (dead)",
+ }
+ "ALGR(EU_QUES)": {
+ "key": "EU_ELLP",
+ "label": "…",
+ }
+ }
+} \ No newline at end of file
diff --git a/data/constants/keycodes/extras/keycodes_farsi_0.0.1.hjson b/data/constants/keycodes/extras/keycodes_farsi_0.0.1.hjson
index d59b6fab26..68d209a5f3 100644
--- a/data/constants/keycodes/extras/keycodes_farsi_0.0.1.hjson
+++ b/data/constants/keycodes/extras/keycodes_farsi_0.0.1.hjson
@@ -527,7 +527,7 @@
"key": "FA_PIPE",
"label": "|",
}
- "ALGR(FA_RA)": {
+ "ALGR(FA_RE)": {
"key": "FA_SUBA",
"label": "ٖ",
}
diff --git a/data/mappings/info_config.hjson b/data/mappings/info_config.hjson
index 8d3e3c7f0e..b643553b52 100644
--- a/data/mappings/info_config.hjson
+++ b/data/mappings/info_config.hjson
@@ -200,6 +200,7 @@
"SPLIT_WPM_ENABLE": {"info_key": "split.transport.sync.wpm", "value_type": "flag"},
// Tapping
+ "CHORDAL_HOLD": {"info_key": "tapping.chordal_hold", "value_type": "flag"},
"HOLD_ON_OTHER_KEY_PRESS": {"info_key": "tapping.hold_on_other_key_press", "value_type": "flag"},
"HOLD_ON_OTHER_KEY_PRESS_PER_KEY": {"info_key": "tapping.hold_on_other_key_press_per_key", "value_type": "flag"},
"PERMISSIVE_HOLD": {"info_key": "tapping.permissive_hold", "value_type": "flag"},
diff --git a/data/mappings/info_rules.hjson b/data/mappings/info_rules.hjson
index 64972af63b..00685b5b5f 100644
--- a/data/mappings/info_rules.hjson
+++ b/data/mappings/info_rules.hjson
@@ -55,5 +55,6 @@
// Items we want flagged in lint
"CTPC": {"info_key": "_deprecated.ctpc", "deprecated": true, "replace_with": "CONVERT_TO=proton_c"},
"CONVERT_TO_PROTON_C": {"info_key": "_deprecated.ctpc", "deprecated": true, "replace_with": "CONVERT_TO=proton_c"},
+ "DEFAULT_FOLDER": {"info_key": "_deprecated.default_folder", "deprecated": true},
"VIAL_ENABLE": {"info_key": "_invalid.vial", "invalid": true}
}
diff --git a/data/mappings/keyboard_aliases.hjson b/data/mappings/keyboard_aliases.hjson
index 72f6994c09..760e54b889 100644
--- a/data/mappings/keyboard_aliases.hjson
+++ b/data/mappings/keyboard_aliases.hjson
@@ -140,6 +140,9 @@
"custommk/genesis": {
"target": "custommk/genesis/rev1"
},
+ "cxt_studio":{
+ "target":"cxt_studio/12e4"
+ },
"daisy": {
"target": "ktec/daisy"
},
@@ -1515,6 +1518,9 @@
"ymd96": {
"target": "ymdk/ymd96"
},
+ "ymdk/id75": {
+ "target": "ymdk/id75/f103"
+ },
"ymdk_np21": {
"target": "ymdk/np21"
},
@@ -1552,5 +1558,639 @@
},
"dnworks/9973": {
"target": "dnworks/tkl87"
+ },
+ // DEFAULT_FOLDER removed during 2025 Q1 cycle
+ "0_sixty": {
+ "target": "0_sixty/base"
+ },
+ "0xcb/splaytoraid": {
+ "target": "0xcb/splaytoraid/rp2040_ce"
+ },
+ "1upkeyboards/pi40": {
+ "target": "1upkeyboards/pi40/mit_v1_0"
+ },
+ "1upkeyboards/pi50": {
+ "target": "1upkeyboards/pi50/grid"
+ },
+ "1upkeyboards/sweet16": {
+ "target": "1upkeyboards/sweet16/v1"
+ },
+ "25keys/aleth42": {
+ "target": "25keys/aleth42/rev1"
+ },
+ "25keys/zinc": {
+ "target": "25keys/zinc/rev1"
+ },
+ "40percentclub/i75": {
+ "target": "40percentclub/i75/promicro"
+ },
+ "40percentclub/polyandry": {
+ "target": "40percentclub/polyandry/promicro"
+ },
+ "8pack": {
+ "target": "8pack/rev12"
+ },
+ "adkb96": {
+ "target": "adkb96/rev1"
+ },
+ "adm42": {
+ "target": "adm42/rev4"
+ },
+ "aeboards/satellite": {
+ "target": "aeboards/satellite/rev1"
+ },
+ "atreus": {
+ "target": "atreus/astar"
+ },
+ "atreyu": {
+ "target": "atreyu/rev1"
+ },
+ "biacco42/ergo42": {
+ "target": "biacco42/ergo42/rev1"
+ },
+ "binepad/bn009": {
+ "target": "binepad/bn009/r2"
+ },
+ "binepad/bnr1": {
+ "target": "binepad/bnr1/v2"
+ },
+ "boston_meetup": {
+ "target": "boston_meetup/2019"
+ },
+ "bpiphany/frosty_flake": {
+ "target": "bpiphany/frosty_flake/20140521"
+ },
+ "buzzard": {
+ "target": "buzzard/rev1"
+ },
+ "clickety_split/leeloo": {
+ "target": "clickety_split/leeloo/rev3"
+ },
+ "crkbd": {
+ "target": "crkbd/rev1"
+ },
+ "dailycraft/bat43": {
+ "target": "dailycraft/bat43/rev2"
+ },
+ "dailycraft/claw44": {
+ "target": "dailycraft/claw44/rev1"
+ },
+ "dailycraft/sandbox": {
+ "target": "dailycraft/sandbox/rev2"
+ },
+ "dailycraft/wings42": {
+ "target": "dailycraft/wings42/rev2"
+ },
+ "delikeeb/vanana": {
+ "target": "delikeeb/vanana/rev2"
+ },
+ "delikeeb/waaffle/rev3": {
+ "target": "delikeeb/waaffle/rev3/pro_micro"
+ },
+ "deltasplit75": {
+ "target": "deltasplit75/v2"
+ },
+ "drhigsby/ogurec": {
+ "target": "drhigsby/ogurec/left_pm"
+ },
+ "duck/octagon": {
+ "target": "duck/octagon/v2"
+ },
+ "duck/orion": {
+ "target": "duck/orion/v3"
+ },
+ "ducky/one2mini": {
+ "target": "ducky/one2mini/1861st"
+ },
+ "ducky/one2sf": {
+ "target": "ducky/one2sf/1967st"
+ },
+ "dumbpad": {
+ "target": "dumbpad/v0x"
+ },
+ "durgod/galaxy": {
+ "target": "durgod/dgk6x/galaxy"
+ },
+ "durgod/venus": {
+ "target": "durgod/dgk6x/venus"
+ },
+ "dztech/tofu/ii": {
+ "target": "dztech/tofu/ii/v1"
+ },
+ "dztech/tofu/jr": {
+ "target": "dztech/tofu/jr/v1"
+ },
+ "eco": {
+ "target": "eco/rev2"
+ },
+ "ergoslab": {
+ "target": "ergoslab/rev1"
+ },
+ "ergotravel": {
+ "target": "ergotravel/rev1"
+ },
+ "evyd13/atom47": {
+ "target": "evyd13/atom47/rev4"
+ },
+ "fortitude60": {
+ "target": "fortitude60/rev1"
+ },
+ "fruitykeeb/fruitbar/r1": {
+ "target": "fruitykeeb/fruitbar/r1/promicro"
+ },
+ "ghs/jem": {
+ "target": "ghs/jem/soldered"
+ },
+ "hadron": {
+ "target": "hadron/ver2"
+ },
+ "handwired/bento": {
+ "target": "handwired/bento/rev1"
+ },
+ "handwired/dactyl_manuform/6x6": {
+ "target": "handwired/dactyl_manuform/6x6/promicro"
+ },
+ "handwired/ms_sculpt_mobile": {
+ "target": "handwired/ms_sculpt_mobile/teensy2pp"
+ },
+ "handwired/onekey": {
+ "target": "handwired/onekey/promicro"
+ },
+ "handwired/pill60": {
+ "target": "handwired/pill60/bluepill"
+ },
+ "handwired/postageboard": {
+ "target": "handwired/postageboard/mini"
+ },
+ "handwired/qc60": {
+ "target": "handwired/qc60/proto"
+ },
+ "handwired/sono1": {
+ "target": "handwired/sono1/t2pp"
+ },
+ "handwired/splittest": {
+ "target": "handwired/splittest/promicro"
+ },
+ "handwired/stef9998/split_5x7": {
+ "target": "handwired/stef9998/split_5x7/rev1"
+ },
+ "handwired/symmetric70_proto/promicro": {
+ "target": "handwired/symmetric70_proto/promicro/base"
+ },
+ "handwired/symmetric70_proto/proton_c": {
+ "target": "handwired/symmetric70_proto/proton_c/base"
+ },
+ "handwired/unk": {
+ "target": "handwired/unk/rev1"
+ },
+ "handwired/xealous": {
+ "target": "handwired/xealous/rev1"
+ },
+ "hillside/46": {
+ "target": "hillside/46/0_1"
+ },
+ "hillside/48": {
+ "target": "hillside/48/0_1"
+ },
+ "hillside/52": {
+ "target": "hillside/52/0_1"
+ },
+ "ibnuda/squiggle": {
+ "target": "ibnuda/squiggle/rev1"
+ },
+ "idobao/id80/v1": {
+ "target": "idobao/id80/v2/ansi"
+ },
+ "idobao/id80/v3": {
+ "target": "idobao/id80/v3/ansi"
+ },
+ "inett_studio/sq80": {
+ "target": "inett_studio/sq80/hotswap_layout_i"
+ },
+ "input_club/infinity60": {
+ "target": "input_club/infinity60/led"
+ },
+ "jacky_studio/bear_65": {
+ "target": "jacky_studio/bear_65/rev1"
+ },
+ "jacky_studio/piggy60/rev1": {
+ "target": "jacky_studio/piggy60/rev1/solder"
+ },
+ "jadookb/jkb65": {
+ "target": "jadookb/jkb65/r1"
+ },
+ "jian": {
+ "target": "jian/rev2"
+ },
+ "jiran": {
+ "target": "jiran/rev1"
+ },
+ "jorne": {
+ "target": "jorne/rev1"
+ },
+ "junco": {
+ "target": "junco/rev1"
+ },
+ "kakunpc/angel17": {
+ "target": "kakunpc/angel17/rev1"
+ },
+ "kakunpc/business_card": {
+ "target": "kakunpc/business_card/beta"
+ },
+ "kakunpc/suihankey": {
+ "target": "kakunpc/suihankey/rev1"
+ },
+ "kakunpc/suihankey/split": {
+ "target": "kakunpc/suihankey/split/rev1"
+ },
+ "kapcave/paladinpad": {
+ "target": "kapcave/paladinpad/rev2"
+ },
+ "kapl": {
+ "target": "kapl/rev1"
+ },
+ "kbdfans/d45": {
+ "target": "kbdfans/d45/v2"
+ },
+ "kbdfans/kbd75": {
+ "target": "kbdfans/kbd75/rev1"
+ },
+ "keebio/bdn9": {
+ "target": "keebio/bdn9/rev1"
+ },
+ "keebio/convolution": {
+ "target": "keebio/convolution/rev1"
+ },
+ "keebio/foldkb": {
+ "target": "keebio/foldkb/rev1"
+ },
+ "keebio/kbo5000": {
+ "target": "keebio/kbo5000/rev1"
+ },
+ "keebio/levinson": {
+ "target": "keebio/levinson/rev2"
+ },
+ "keebio/quefrency": {
+ "target": "keebio/quefrency/rev1"
+ },
+ "keebio/rorschach": {
+ "target": "keebio/rorschach/rev1"
+ },
+ "keebio/sinc": {
+ "target": "keebio/sinc/rev1"
+ },
+ "keebio/viterbi": {
+ "target": "keebio/viterbi/rev2"
+ },
+ "keycapsss/kimiko": {
+ "target": "keycapsss/kimiko/rev2"
+ },
+ "keyhive/navi10": {
+ "target": "keyhive/navi10/rev3"
+ },
+ "keyhive/uno": {
+ "target": "keyhive/uno/rev1"
+ },
+ "kin80": {
+ "target": "kin80/blackpill401"
+ },
+ "kumaokobo/kudox_full": {
+ "target": "kumaokobo/kudox_full/rev1"
+ },
+ "kumaokobo/kudox_game": {
+ "target": "kumaokobo/kudox_game/rev2"
+ },
+ "kumaokobo/kudox": {
+ "target": "kumaokobo/kudox/rev3"
+ },
+ "kumaokobo/pico": {
+ "target": "kumaokobo/pico/65keys"
+ },
+ "lazydesigners/dimple": {
+ "target": "lazydesigners/dimple/staggered/rev1"
+ },
+ "lets_split": {
+ "target": "lets_split/rev2"
+ },
+ "lfkeyboards/lfk87": {
+ "target": "lfkeyboards/lfk78/revc"
+ },
+ "lily58": {
+ "target": "lily58/rev1"
+ },
+ "lime": {
+ "target": "lime/rev1"
+ },
+ "maple_computing/christmas_tree": {
+ "target": "maple_computing/christmas_tree/v2017"
+ },
+ "maple_computing/ivy": {
+ "target": "maple_computing/ivy/rev1"
+ },
+ "maple_computing/launchpad": {
+ "target": "maple_computing/launchpad/rev1"
+ },
+ "maple_computing/minidox": {
+ "target": "maple_computing/minidox/rev1"
+ },
+ "mariorion_v25": {
+ "target": "mariorion_v25/prod"
+ },
+ "marksard/rhymestone": {
+ "target": "marksard/rhymestone/rev1"
+ },
+ "marksard/treadstone32": {
+ "target": "marksard/treadstone32/rev1"
+ },
+ "marksard/treadstone48": {
+ "target": "marksard/treadstone48/rev1"
+ },
+ "maxipad": {
+ "target": "maxipad/promicro"
+ },
+ "mechkeys/mechmini": {
+ "target": "mechkeys/mechmini/v2"
+ },
+ "mechllama/g35": {
+ "target": "mechllama/g35/v2"
+ },
+ "mechlovin/adelais": {
+ "target": "mechlovin/adelais/standard_led/arm/rev2"
+ },
+ "mechlovin/adelais/standard_led/arm/rev4": {
+ "target": "mechlovin/adelais/standard_led/arm/rev4/stm32f303"
+ },
+ "mechlovin/adelais/standard_led/arm": {
+ "target": "mechlovin/adelais/standard_led/arm/rev2"
+ },
+ "mechlovin/adelais/standard_led/avr": {
+ "target": "mechlovin/adelais/standard_led/avr/rev1"
+ },
+ "mechlovin/hannah65/rev1": {
+ "target": "mechlovin/hannah65/rev1/haus"
+ },
+ "mechlovin/infinity87/rev1": {
+ "target": "mechlovin/infinity87/rev1/standard"
+ },
+ "mechlovin/infinity87": {
+ "target": "mechlovin/infinity87/rgb_rev1"
+ },
+ "mechlovin/mechlovin9": {
+ "target": "mechlovin/mechlovin9/rev1"
+ },
+ "mechlovin/olly/jf": {
+ "target": "mechlovin/olly/jf/rev1"
+ },
+ "mechlovin/zed1800": {
+ "target": "mechlovin/zed1800/saber"
+ },
+ "mechlovin/zed65/no_backlight": {
+ "target": "mechlovin/zed65/no_backlight/wearhaus66"
+ },
+ "mechlovin/zed65": {
+ "target": "mechlovin/zed65/no_backlight/wearhaus66"
+ },
+ "mechwild/bde": {
+ "target": "mechwild/bde/rev2"
+ },
+ "mechwild/mokulua": {
+ "target": "mechwild/mokulua/standard"
+ },
+ "mechwild/obe/f401": {
+ "target": "mechwild/obe/f401/base"
+ },
+ "mechwild/obe/f411": {
+ "target": "mechwild/obe/f411/base"
+ },
+ "mechwild/obe": {
+ "target": "mechwild/obe/f401/base"
+ },
+ "mechwild/waka60/f401": {
+ "target": "mechwild/waka60/f401/base"
+ },
+ "mechwild/waka60/f411": {
+ "target": "mechwild/waka60/f411/base"
+ },
+ "mechwild/waka60": {
+ "target": "mechwild/waka60/f401/base"
+ },
+ "murcielago": {
+ "target": "murcielago/rev1"
+ },
+ "nullbitsco/scramble": {
+ "target": "nullbitsco/scramble/v2"
+ },
+ "omkbd/ergodash": {
+ "target": "omkbd/ergodash/rev1"
+ },
+ "omkbd/runner3680": {
+ "target": "omkbd/runner3680/5x8"
+ },
+ "orthodox": {
+ "target": "orthodox/rev3"
+ },
+ "peej/rosaline": {
+ "target": "peej/rosaline/staggered"
+ },
+ "peej/tripel": {
+ "target": "peej/tripel/left"
+ },
+ "peranekofactory/tone": {
+ "target": "peranekofactory/tone/rev2"
+ },
+ "phase_studio/titan65": {
+ "target": "phase_studio/titan65/hotswap"
+ },
+ "pica40": {
+ "target": "pica40/rev2"
+ },
+ "pinky": {
+ "target": "pinky/3"
+ },
+ "primekb/meridian": {
+ "target": "primekb/meridian/ktr1010"
+ },
+ "primekb/prime_e": {
+ "target": "primekb/prime_e/std"
+ },
+ "program_yoink": {
+ "target": "program_yoink/staggered"
+ },
+ "projectcain/vault35": {
+ "target": "projectcain/vault35/atmega32u4"
+ },
+ "qpockets/space_space": {
+ "target": "qpockets/space_space/rev2"
+ },
+ "qwertyydox": {
+ "target": "qwertyydox/rev1"
+ },
+ "rate/pistachio": {
+ "target": "rate/pistachio/rev2"
+ },
+ "recompile_keys/choco60": {
+ "target": "recompile_keys/choco60/rev1"
+ },
+ "recompile_keys/nomu30": {
+ "target": "recompile_keys/nomu30/rev1"
+ },
+ "redox/rev1": {
+ "target": "redox/rev1/base"
+ },
+ "rgbkb/mun": {
+ "target": "rgbkb/mun/rev1"
+ },
+ "rgbkb/sol3": {
+ "target": "rgbkb/sol3/rev1"
+ },
+ "rgbkb/sol": {
+ "target": "rgbkb/sol/rev2"
+ },
+ "rgbkb/zen": {
+ "target": "rgbkb/zen/rev2"
+ },
+ "rgbkb/zygomorph": {
+ "target": "rgbkb/zygomorph/rev1"
+ },
+ "rmi_kb/herringbone": {
+ "target": "rmi_kb/herringbone/v1"
+ },
+ "rmi_kb/mona": {
+ "target": "rmi_kb/mona/v1_1"
+ },
+ "rmi_kb/tkl_ff": {
+ "target": "rmi_kb/tkl_ff/v1"
+ },
+ "rmi_kb/wete": {
+ "target": "rmi_kb/wete/v2"
+ },
+ "rookiebwoy/late9": {
+ "target": "rookiebwoy/late9/rev1"
+ },
+ "rookiebwoy/neopad": {
+ "target": "rookiebwoy/neopad/rev1"
+ },
+ "rura66": {
+ "target": "rura66/rev1"
+ },
+ "salicylic_acid3/7skb": {
+ "target": "salicylic_acid3/7skb/rev1"
+ },
+ "salicylic_acid3/getta25": {
+ "target": "salicylic_acid3/getta25/rev1"
+ },
+ "salicylic_acid3/jisplit89": {
+ "target": "salicylic_acid3/jisplit89/rev1"
+ },
+ "salicylic_acid3/naked48": {
+ "target": "salicylic_acid3/naked48/rev1"
+ },
+ "salicylic_acid3/naked60": {
+ "target": "salicylic_acid3/naked60/rev1"
+ },
+ "salicylic_acid3/naked64": {
+ "target": "salicylic_acid3/naked64/rev1"
+ },
+ "salicylic_acid3/setta21": {
+ "target": "salicylic_acid3/setta21/rev1"
+ },
+ "sawnsprojects/okayu": {
+ "target": "sawnsprojects/okayu/stm32f072"
+ },
+ "smoll/lefty": {
+ "target": "smoll/lefty/rev2"
+ },
+ "sofle": {
+ "target": "sofle/rev1"
+ },
+ "spaceholdings/nebula68b": {
+ "target": "spaceholdings/nebula68b/solder"
+ },
+ "spacetime": {
+ "target": "spacetime/rev1"
+ },
+ "splitkb/aurora/corne": {
+ "target": "splitkb/aurora/corne/rev1"
+ },
+ "splitkb/aurora/helix": {
+ "target": "splitkb/aurora/helix/rev1"
+ },
+ "splitkb/aurora/lily58": {
+ "target": "splitkb/aurora/lily58/rev1"
+ },
+ "splitkb/aurora/sofle_v2": {
+ "target": "splitkb/aurora/sofle_v2/rev1"
+ },
+ "splitkb/aurora/sweep": {
+ "target": "splitkb/aurora/sweep/rev1"
+ },
+ "splitkb/kyria": {
+ "target": "splitkb/kyria/rev3"
+ },
+ "splitkb/kyria/rev1": {
+ "target": "splitkb/kyria/rev1/base"
+ },
+ "splitkb/kyria/rev2": {
+ "target": "splitkb/kyria/rev2/base"
+ },
+ "splitty": {
+ "target": "splitty/rev1"
+ },
+ "studiokestra/galatea": {
+ "target": "studiokestra/galatea/rev1"
+ },
+ "takashiski/hecomi": {
+ "target": "takashiski/hecomi/alpha"
+ },
+ "takashiski/namecard2x4": {
+ "target": "takashiski/namecard2x4/rev2"
+ },
+ "themadnoodle/noodlepad": {
+ "target": "themadnoodle/noodlepad/v1"
+ },
+ "tkw/grandiceps": {
+ "target": "tkw/grandiceps/rev1"
+ },
+ "tominabox1/le_chiffre": {
+ "target": "tominabox1/le_chiffre/rev1"
+ },
+ "tominabox1/littlefoot_lx": {
+ "target": "tominabox1/littlefoot_lx/rev1"
+ },
+ "tominabox1/underscore33": {
+ "target": "tominabox1/underscore33/rev1"
+ },
+ "trnthsn/e8ghty": {
+ "target": "trnthsn/e8ghty/stm32f103"
+ },
+ "trnthsn/s6xty5neor2": {
+ "target": "trnthsn/s6xty5neor2/stm32f103"
+ },
+ "tweetydabird/lotus58": {
+ "target": "tweetydabird/lotus58/promicro"
+ },
+ "unison": {
+ "target": "unison/v04"
+ },
+ "uzu42": {
+ "target": "uzu42/rev1"
+ },
+ "vitamins_included": {
+ "target": "vitamins_included/rev2"
+ },
+ "yanghu/unicorne": {
+ "target": "yanghu/unicorne/f411"
+ },
+ "yosino58": {
+ "target": "yosino58/rev1"
+ },
+ "ymdk/yd60mq": {
+ "target": "ymdk/yd60mq/12led"
+ },
+ "yushakobo/navpad/10": {
+ "target": "yushakobo/navpad/10/rev1"
+ },
+ "yynmt/acperience12": {
+ "target": "yynmt/acperience12/rev1"
}
}
diff --git a/data/schemas/keyboard.jsonschema b/data/schemas/keyboard.jsonschema
index ec87680fa0..8b6cc7032b 100644
--- a/data/schemas/keyboard.jsonschema
+++ b/data/schemas/keyboard.jsonschema
@@ -422,7 +422,11 @@
"h": {"$ref": "qmk.definitions.v1#/key_unit"},
"w": {"$ref": "qmk.definitions.v1#/key_unit"},
"x": {"$ref": "qmk.definitions.v1#/key_unit"},
- "y": {"$ref": "qmk.definitions.v1#/key_unit"}
+ "y": {"$ref": "qmk.definitions.v1#/key_unit"},
+ "hand": {
+ "type": "string",
+ "enum": ["L", "R", "*"]
+ }
}
}
}
@@ -915,6 +919,7 @@
"tapping": {
"type": "object",
"properties": {
+ "chordal_hold": {"type": "boolean"},
"force_hold": {"type": "boolean"},
"force_hold_per_key": {"type": "boolean"},
"ignore_mod_tap_interrupt": {"type": "boolean"},
diff --git a/docs/drivers/i2c.md b/docs/drivers/i2c.md
index c806a090c5..ad74d0e481 100644
--- a/docs/drivers/i2c.md
+++ b/docs/drivers/i2c.md
@@ -16,17 +16,22 @@ You can then call the I2C API by including `i2c_master.h` in your code.
## I2C Addressing {#note-on-i2c-addresses}
-All of the addresses expected by this driver should be pushed to the upper 7 bits of the address byte. Setting
-the lower bit (indicating read/write) will be done by the respective functions. Almost all I2C addresses listed
-on datasheets and the internet will be represented as 7 bits occupying the lower 7 bits and will need to be
-shifted to the left (more significant) by one bit. This is easy to do via the bitwise shift operator `<< 1`.
+I2C addresses listed on datasheets and the internet are usually represented as a 7-bit value. The eighth bit (the least significant bit) controls whether the operation is a read or a write.
-You can either do this on each call to the functions below, or once in your definition of the address. For example, if your device has an address of `0x18`:
+All of the address parameters expected by the driver API should therefore be pushed to the upper 7 bits of the address byte; the driver will take care of setting the read/write bit as appropriate.
+
+This is easy to do via the bitwise left shift operator. For example, if your device has an address of `0x18` you might create a define for convenience:
```c
#define MY_I2C_ADDRESS (0x18 << 1)
```
+Or, you can shift the address ahead of time:
+
+```c
+#define MY_I2C_ADDRESS 0x30
+```
+
See https://www.robot-electronics.co.uk/i2c-tutorial for more information about I2C addressing and other technical details.
## AVR Configuration {#avr-configuration}
@@ -39,12 +44,12 @@ The following defines can be used to configure the I2C master driver:
No further setup is required - just connect the `SDA` and `SCL` pins of your I2C devices to the matching pins on the MCU:
-|MCU |`SCL`|`SDA`|
-|------------------|-----|-----|
-|ATmega16/32U4 |`D0` |`D1` |
-|AT90USB64/128 |`D0` |`D1` |
-|ATmega32A |`C0` |`C1` |
-|ATmega328/P |`C5` |`C4` |
+|MCU |`SCL`|`SDA`|
+|-------------|-----|-----|
+|ATmega16/32U4|`D0` |`D1` |
+|AT90USB64/128|`D0` |`D1` |
+|ATmega32A |`C0` |`C1` |
+|ATmega328/P |`C5` |`C4` |
::: tip
The ATmega16/32U2 does not possess I2C functionality, and so cannot use this driver.
@@ -52,7 +57,7 @@ The ATmega16/32U2 does not possess I2C functionality, and so cannot use this dri
## ChibiOS/ARM Configuration {#arm-configuration}
-You'll need to determine which pins can be used for I2C -- a an example, STM32 parts generally have multiple I2C peripherals, labeled I2C1, I2C2, I2C3 etc.
+You'll need to determine which pins can be used for I2C -- as an example, STM32 parts generally have multiple I2C peripherals, labeled I2C1, I2C2, I2C3 etc.
To enable I2C, modify your board's `halconf.h` to enable I2C, then modify your board's `mcuconf.h` to enable the peripheral you've chosen:
@@ -83,15 +88,19 @@ To enable I2C, modify your board's `halconf.h` to enable I2C, then modify your b
Configuration-wise, you'll need to set up the peripheral as per your MCU's datasheet -- the defaults match the pins for a Proton-C, i.e. STM32F303.
-|`config.h` Overrride |Description |Default|
-|------------------------|--------------------------------------------------------------|-------|
-|`I2C_DRIVER` |I2C peripheral to use - I2C1 -> `I2CD1`, I2C2 -> `I2CD2` etc. |`I2CD1`|
-|`I2C1_SCL_PIN` |The pin definition for SCL |`B6` |
-|`I2C1_SCL_PAL_MODE` |The alternate function mode for SCL |`4` |
-|`I2C1_SDA_PIN` |The pin definition for SDA |`B7` |
-|`I2C1_SDA_PAL_MODE` |The alternate function mode for SDA |`4` |
+|`config.h` Override|Description |Default|
+|-------------------|-------------------------------------------------------------|-------|
+|`I2C_DRIVER` |I2C peripheral to use - I2C1 -> `I2CD1`, I2C2 -> `I2CD2` etc.|`I2CD1`|
+|`I2C1_SCL_PIN` |The pin to use for SCL |`B6` |
+|`I2C1_SCL_PAL_MODE`|The alternate function mode for SCL |`4` |
+|`I2C1_SDA_PIN` |The pin to use for SDA |`B7` |
+|`I2C1_SDA_PAL_MODE`|The alternate function mode for SDA |`4` |
-The following configuration values depend on the specific MCU in use.
+::: tip
+Currently only a single I2C peripheral is supported, therefore the `I2C1_*` defines are used for configuration regardless of the selected peripheral.
+:::
+
+The following configuration values are dependent on the ChibiOS I2C LLD, which is dictated by the microcontroller.
### I2Cv1 {#arm-configuration-i2cv1}
@@ -147,7 +156,7 @@ void i2c_init(void) {
---
-### `i2c_status_t i2c_transmit(uint8_t address, uint8_t *data, uint16_t length, uint16_t timeout)` {#api-i2c-transmit}
+### `i2c_status_t i2c_transmit(uint8_t address, const uint8_t* data, uint16_t length, uint16_t timeout)` {#api-i2c-transmit}
Send multiple bytes to the selected I2C device.
@@ -155,10 +164,10 @@ Send multiple bytes to the selected I2C device.
- `uint8_t address`
The 7-bit I2C address of the device.
- - `uint8_t *data`
+ - `const uint8_t* data`
A pointer to the data to transmit.
- `uint16_t length`
- The number of bytes to write. Take care not to overrun the length of `data`.
+ The number of bytes to write. Take care not to overrun the length of `data`.
- `uint16_t timeout`
The time in milliseconds to wait for a response from the target device.
@@ -168,6 +177,29 @@ Send multiple bytes to the selected I2C device.
---
+### `i2c_status_t i2c_transmit_P(uint8_t address, const uint8_t* data, uint16_t length, uint16_t timeout)` {#api-i2c-transmit-p}
+
+Send multiple bytes from PROGMEM to the selected I2C device.
+
+On ARM devices, this function is simply an alias for `i2c_transmit(address, data, length, timeout)`.
+
+#### Arguments {#api-i2c-transmit-p-arguments}
+
+ - `uint8_t address`
+ The 7-bit I2C address of the device.
+ - `const uint8_t* data`
+ A pointer to the data to transmit.
+ - `uint16_t length`
+ The number of bytes to write. Take care not to overrun the length of `data`.
+ - `uint16_t timeout`
+ The time in milliseconds to wait for a response from the target device.
+
+#### Return Value {#api-i2c-transmit-p-return}
+
+`I2C_STATUS_TIMEOUT` if the timeout period elapses, `I2C_STATUS_ERROR` if some other error occurs, otherwise `I2C_STATUS_SUCCESS`.
+
+---
+
### `i2c_status_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout)` {#api-i2c-receive}
Receive multiple bytes from the selected I2C device.
@@ -176,10 +208,10 @@ Receive multiple bytes from the selected I2C device.
- `uint8_t address`
The 7-bit I2C address of the device.
- - `uint8_t *data`
- A pointer to the buffer to read into.
+ - `uint8_t* data`
+ A pointer to a buffer to read into.
- `uint16_t length`
- The number of bytes to read. Take care not to overrun the length of `data`.
+ The number of bytes to read. Take care not to overrun the length of `data`.
- `uint16_t timeout`
The time in milliseconds to wait for a response from the target device.
@@ -189,9 +221,9 @@ Receive multiple bytes from the selected I2C device.
---
-### `i2c_status_t i2c_write_register(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout)` {#api-i2c-write-register}
+### `i2c_status_t i2c_write_register(uint8_t devaddr, uint8_t regaddr, const uint8_t* data, uint16_t length, uint16_t timeout)` {#api-i2c-write-register}
-Writes to a register with an 8-bit address on the I2C device.
+Write to a register with an 8-bit address on the I2C device.
#### Arguments {#api-i2c-write-register-arguments}
@@ -199,10 +231,10 @@ Writes to a register with an 8-bit address on the I2C device.
The 7-bit I2C address of the device.
- `uint8_t regaddr`
The register address to write to.
- - `uint8_t *data`
+ - `const uint8_t* data`
A pointer to the data to transmit.
- `uint16_t length`
- The number of bytes to write. Take care not to overrun the length of `data`.
+ The number of bytes to write. Take care not to overrun the length of `data`.
- `uint16_t timeout`
The time in milliseconds to wait for a response from the target device.
@@ -212,9 +244,9 @@ Writes to a register with an 8-bit address on the I2C device.
---
-### `i2c_status_t i2c_write_register16(uint8_t devaddr, uint16_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout)` {#api-i2c-write-register16}
+### `i2c_status_t i2c_write_register16(uint8_t devaddr, uint16_t regaddr, const uint8_t* data, uint16_t length, uint16_t timeout)` {#api-i2c-write-register16}
-Writes to a register with a 16-bit address (big endian) on the I2C device.
+Write to a register with a 16-bit address (big endian) on the I2C device.
#### Arguments {#api-i2c-write-register16-arguments}
@@ -222,10 +254,10 @@ Writes to a register with a 16-bit address (big endian) on the I2C device.
The 7-bit I2C address of the device.
- `uint16_t regaddr`
The register address to write to.
- - `uint8_t *data`
+ - `const uint8_t* data`
A pointer to the data to transmit.
- `uint16_t length`
- The number of bytes to write. Take care not to overrun the length of `data`.
+ The number of bytes to write. Take care not to overrun the length of `data`.
- `uint16_t timeout`
The time in milliseconds to wait for a response from the target device.
@@ -237,7 +269,7 @@ Writes to a register with a 16-bit address (big endian) on the I2C device.
### `i2c_status_t i2c_read_register(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout)` {#api-i2c-read-register}
-Reads from a register with an 8-bit address on the I2C device.
+Read from a register with an 8-bit address on the I2C device.
#### Arguments {#api-i2c-read-register-arguments}
@@ -245,8 +277,10 @@ Reads from a register with an 8-bit address on the I2C device.
The 7-bit I2C address of the device.
- `uint8_t regaddr`
The register address to read from.
+ - `uint8_t data`
+ A pointer to a buffer to read into.
- `uint16_t length`
- The number of bytes to read. Take care not to overrun the length of `data`.
+ The number of bytes to read. Take care not to overrun the length of `data`.
- `uint16_t timeout`
The time in milliseconds to wait for a response from the target device.
@@ -258,7 +292,7 @@ Reads from a register with an 8-bit address on the I2C device.
### `i2c_status_t i2c_read_register16(uint8_t devaddr, uint16_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout)` {#api-i2c-read-register16}
-Reads from a register with a 16-bit address (big endian) on the I2C device.
+Read from a register with a 16-bit address (big endian) on the I2C device.
#### Arguments {#api-i2c-read-register16-arguments}
@@ -266,8 +300,10 @@ Reads from a register with a 16-bit address (big endian) on the I2C device.
The 7-bit I2C address of the device.
- `uint16_t regaddr`
The register address to read from.
+ - `uint8_t* data`
+ A pointer to a buffer to read into.
- `uint16_t length`
- The number of bytes to read. Take care not to overrun the length of `data`.
+ The number of bytes to read. Take care not to overrun the length of `data`.
- `uint16_t timeout`
The time in milliseconds to wait for a response from the target device.
@@ -279,19 +315,19 @@ Reads from a register with a 16-bit address (big endian) on the I2C device.
### `i2c_status_t i2c_ping_address(uint8_t address, uint16_t timeout)` {#api-i2c-ping-address}
-Pings the I2C bus for a specific address.
+Ping the I2C bus for a specific address.
-On ChibiOS a "best effort" attempt is made by reading a single byte from register 0 at the requested address. This should generally work except for I2C devices that do not not respond to a register 0 read request, which will result in a false negative result (unsucessful response to ping attempt).
+On ChibiOS a "best effort" attempt is made by reading a single byte from register 0 at the given address. This should generally work except for I2C devices that do not not respond to a register 0 read request, which will result in a false negative result (unsuccessful response to ping attempt).
-This function is weakly defined, meaning it can be overridden if necessary for your particular use case:
+This function is weakly defined, meaning it can be overridden if necessary for your particular use case.
-#### Arguments
+#### Arguments {#api-i2c-ping-address-arguments}
- `uint8_t address`
- The 7-bit I2C address of the device (ie. without the read/write bit - this will be set automatically).
+ The 7-bit I2C address of the device.
- `uint16_t timeout`
The time in milliseconds to wait for a response from the target device.
-#### Return Value
+#### Return Value {#api-i2c-ping-address-return}
`I2C_STATUS_TIMEOUT` if the timeout period elapses, `I2C_STATUS_ERROR` if some other error occurs, otherwise `I2C_STATUS_SUCCESS`.
diff --git a/docs/drivers/spi.md b/docs/drivers/spi.md
index 43d2a056d5..140b204945 100644
--- a/docs/drivers/spi.md
+++ b/docs/drivers/spi.md
@@ -88,7 +88,7 @@ Start an SPI transaction.
#### Arguments {#api-spi-start-arguments}
- `pin_t slavePin`
- The QMK pin to assert as the slave select pin, eg. `B4`.
+ The GPIO pin connected to the desired device's `SS` line.
- `bool lsbFirst`
Determines the endianness of the transmission. If `true`, the least significant bit of each byte is sent first.
- `uint8_t mode`
@@ -106,7 +106,7 @@ Start an SPI transaction.
#### Return Value {#api-spi-start-return}
-`false` if the supplied parameters are invalid or the SPI peripheral is already in use, or `true`.
+`true` if the operation was successful, otherwise `false` if the supplied parameters are invalid or the SPI peripheral is already in use.
---
@@ -131,7 +131,7 @@ Read a byte from the selected SPI device.
#### Return Value {#api-spi-read-return}
-`SPI_STATUS_TIMEOUT` if the timeout period elapses, or the byte read from the device.
+`SPI_STATUS_TIMEOUT` if the timeout period elapses, otherwise the byte read from the device.
---
@@ -159,7 +159,7 @@ Receive multiple bytes from the selected SPI device.
#### Arguments {#api-spi-receive-arguments}
- `uint8_t *data`
- A pointer to the buffer to read into.
+ A pointer to a buffer to read into.
- `uint16_t length`
The number of bytes to read. Take care not to overrun the length of `data`.
diff --git a/docs/drivers/uart.md b/docs/drivers/uart.md
index 7cc68727ee..b895266cab 100644
--- a/docs/drivers/uart.md
+++ b/docs/drivers/uart.md
@@ -45,17 +45,17 @@ To enable UART, modify your board's `mcuconf.h` to enable the peripheral you've
Configuration-wise, you'll need to set up the peripheral as per your MCU's datasheet -- the defaults match the pins for a Proton-C, i.e. STM32F303.
-| `config.h` override | Description | Default Value |
-| --------------------------- | --------------------------------------------------------------- | ------------- |
-| `#define UART_DRIVER` | USART peripheral to use - USART1 -> `SD1`, USART2 -> `SD2` etc. | `SD1` |
-| `#define UART_TX_PIN` | The pin to use for TX | `A9` |
-| `#define UART_TX_PAL_MODE` | The alternate function mode for TX | `7` |
-| `#define UART_RX_PIN` | The pin to use for RX | `A10` |
-| `#define UART_RX_PAL_MODE` | The alternate function mode for RX | `7` |
-| `#define UART_CTS_PIN` | The pin to use for CTS | `A11` |
-| `#define UART_CTS_PAL_MODE` | The alternate function mode for CTS | `7` |
-| `#define UART_RTS_PIN` | The pin to use for RTS | `A12` |
-| `#define UART_RTS_PAL_MODE` | The alternate function mode for RTS | `7` |
+|`config.h` Override|Description |Default|
+|-------------------|---------------------------------------------------------------|-------|
+|`UART_DRIVER` |USART peripheral to use - USART1 -> `SD1`, USART2 -> `SD2` etc.|`SD1` |
+|`UART_TX_PIN` |The pin to use for TX |`A9` |
+|`UART_TX_PAL_MODE` |The alternate function mode for TX |`7` |
+|`UART_RX_PIN` |The pin to use for RX |`A10` |
+|`UART_RX_PAL_MODE` |The alternate function mode for RX |`7` |
+|`UART_CTS_PIN` |The pin to use for CTS |`A11` |
+|`UART_CTS_PAL_MODE`|The alternate function mode for CTS |`7` |
+|`UART_RTS_PIN` |The pin to use for RTS |`A12` |
+|`UART_RTS_PAL_MODE`|The alternate function mode for RTS |`7` |
## API {#api}
@@ -111,7 +111,7 @@ Receive multiple bytes.
#### Arguments {#api-uart-receive-arguments}
- `uint8_t *data`
- A pointer to the buffer to read into.
+ A pointer to a buffer to read into.
- `uint16_t length`
The number of bytes to read. Take care not to overrun the length of `data`.
@@ -123,4 +123,4 @@ Return whether the receive buffer contains data. Call this function to determine
#### Return Value {#api-uart-available-return}
-`true` if the receive buffer length is non-zero.
+`true` if there is data available to read.
diff --git a/docs/features/leader_key.md b/docs/features/leader_key.md
index a36e630a36..9f9086e1ae 100644
--- a/docs/features/leader_key.md
+++ b/docs/features/leader_key.md
@@ -154,6 +154,21 @@ User callback, invoked when the leader sequence ends.
---
+### `bool leader_add_user(uint16_t keycode)` {#api-leader-add-user}
+
+User callback, invoked when a keycode is added to the leader sequence.
+
+#### Arguments {#api-leader-add-user-arguments}
+
+ - `uint16_t keycode`
+ The keycode to added to the leader sequence.
+
+#### Return Value {#api-leader-add-user-return}
+
+`true` to finish the key sequence, `false` to continue.
+
+---
+
### `void leader_start(void)` {#api-leader-start}
Begin the leader sequence, resetting the buffer and timer.
diff --git a/docs/reference_info_json.md b/docs/reference_info_json.md
index 99ff7b1f7a..29b999c32e 100644
--- a/docs/reference_info_json.md
+++ b/docs/reference_info_json.md
@@ -74,6 +74,8 @@ You can create `info.json` files at every level under `qmk_firmware/keyboards/<k
* The delay between keydown and keyup for tap events in milliseconds.
* Default: `0` (no delay)
* `tapping`
+ * `chordal_hold` <Badge type="info">Boolean</Badge>
+ * Default: `false`
* `hold_on_other_key_press` <Badge type="info">Boolean</Badge>
* Default: `false`
* `hold_on_other_key_press_per_key` <Badge type="info">Boolean</Badge>
@@ -328,6 +330,8 @@ The ISO enter key is represented by a 1.25u×2uh key. Renderers which utilize in
* `h` <Badge type="info">KeyUnit</Badge>
* The height of the key, in key units.
* Default: `1` (1u)
+ * `hand` <Badge type="info">String</Badge>
+ * The handedness of the key for Chordal Hold, either `"L"` (left hand), `"R"` (right hand), or `"*"` (either or exempted handedness).
* `label` <Badge type="info">String</Badge>
* What to name the key. This is *not* a key assignment as in the keymap, but should usually correspond to the keycode for the first layer of the default keymap.
* Example: `"Escape"`
diff --git a/docs/reference_keymap_extras.md b/docs/reference_keymap_extras.md
index f6b4b8faf6..c871773651 100644
--- a/docs/reference_keymap_extras.md
+++ b/docs/reference_keymap_extras.md
@@ -55,6 +55,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` |
+|EurKEY |`keymap_eurkey.h` | |
|Farsi |`keymap_farsi.h` | |
|Finnish |`keymap_finnish.h` |`sendstring_finnish.h` |
|French |`keymap_french.h` |`sendstring_french.h` |
diff --git a/docs/tap_hold.md b/docs/tap_hold.md
index 9b7f6552cb..254d5de5ec 100644
--- a/docs/tap_hold.md
+++ b/docs/tap_hold.md
@@ -425,6 +425,169 @@ uint16_t get_quick_tap_term(uint16_t keycode, keyrecord_t *record) {
If `QUICK_TAP_TERM` is set higher than `TAPPING_TERM`, it will default to `TAPPING_TERM`.
:::
+## Chordal Hold
+
+Chordal Hold is intended to be used together with either Permissive Hold or Hold
+On Other Key Press. Chordal Hold is enabled by adding to your `config.h`:
+
+```c
+#define CHORDAL_HOLD
+```
+
+Chordal Hold implements, by default, an "opposite hands" rule. Suppose a
+tap-hold key is pressed and then, before the tapping term, another key is
+pressed. With Chordal Hold, the tap-hold key is settled as tapped if the two
+keys are on the same hand.
+
+Otherwise, if the keys are on opposite hands, Chordal Hold introduces no new
+behavior. Hold On Other Key Press or Permissive Hold may be used together with
+Chordal Hold to configure the behavior in the opposite hands case. With Hold On
+Other Key Press, an opposite hands chord is settled immediately as held. Or with
+Permissive Hold, an opposite hands chord is settled as held provided the other
+key is pressed and released (nested press) before releasing the tap-hold key.
+
+Chordal Hold may be useful to avoid accidental modifier activation with
+mod-taps, particularly in rolled keypresses when using home row mods.
+
+Notes:
+
+* Chordal Hold has no effect after the tapping term.
+
+* Combos are exempt from the opposite hands rule, since "handedness" is
+ ill-defined in this case. Even so, Chordal Hold's behavior involving combos
+ may be customized through the `get_chordal_hold()` callback.
+
+An example of a sequence that is affected by “chordal hold”:
+
+- `SFT_T(KC_A)` Down
+- `KC_C` Down
+- `KC_C` Up
+- `SFT_T(KC_A)` Up
+
+```
+ TAPPING_TERM
+ +---------------------------|--------+
+ | +----------------------+ | |
+ | | SFT_T(KC_A) | | |
+ | +----------------------+ | |
+ | +--------------+ | |
+ | | KC_C | | |
+ | +--------------+ | |
+ +---------------------------|--------+
+```
+
+If the two keys are on the same hand, then this will produce `ac` with
+`SFT_T(KC_A)` settled as tapped the moment that `KC_C` is pressed.
+
+If the two keys are on opposite hands and the `HOLD_ON_OTHER_KEY_PRESS` option
+enabled, this will produce `C` with `SFT_T(KC_A)` settled as held when `KC_C` is
+pressed.
+
+Or if the two keys are on opposite hands and the `PERMISSIVE_HOLD` option is
+enabled, this will produce `C` with `SFT_T(KC_A)` settled as held when that
+`KC_C` is released.
+
+### Chordal Hold Handedness
+
+Determining whether keys are on the same or opposite hands involves defining the
+"handedness" of each key position. By default, if nothing is specified,
+handedness is guessed based on keyboard geometry.
+
+Handedness may be specified with `chordal_hold_layout`. In keymap.c, define
+`chordal_hold_layout` in the following form:
+
+```c
+const char chordal_hold_layout[MATRIX_ROWS][MATRIX_COLS] PROGMEM =
+ LAYOUT(
+ 'L', 'L', 'L', 'L', 'L', 'L', 'R', 'R', 'R', 'R', 'R', 'R',
+ 'L', 'L', 'L', 'L', 'L', 'L', 'R', 'R', 'R', 'R', 'R', 'R',
+ 'L', 'L', 'L', 'L', 'L', 'L', 'R', 'R', 'R', 'R', 'R', 'R',
+ 'L', 'L', 'L', 'R', 'R', 'R'
+ );
+```
+
+Use the same `LAYOUT` macro as used to define your keymap layers. Each entry is
+a character indicating the handedness of one key, either `'L'` for left, `'R'`
+for right, or `'*'` to exempt keys from the "opposite hands rule." A key with
+`'*'` handedness may settle as held in chords with any other key. This could be
+used perhaps on thumb keys or other places where you want to allow same-hand
+chords.
+
+Keyboard makers may specify handedness in keyboard.json. Under `"layouts"`,
+specify the handedness of a key by adding a `"hand"` field with a value of
+either `"L"`, `"R"`, or `"*"`. Note that if `"layouts"` contains multiple
+layouts, only the first one is read. For example:
+
+```json
+{"matrix": [5, 6], "x": 0, "y": 5.5, "w": 1.25, "hand", "*"},
+```
+
+Alternatively, handedness may be defined functionally with
+`chordal_hold_handedness()`. For example, in keymap.c define:
+
+```c
+char chordal_hold_handedness(keypos_t key) {
+ if (key.col == 0 || key.col == MATRIX_COLS - 1) {
+ return '*'; // Exempt the outer columns.
+ }
+ // On split keyboards, typically, the first half of the rows are on the
+ // left, and the other half are on the right.
+ return key.row < MATRIX_ROWS / 2 ? 'L' : 'R';
+}
+```
+
+Given the matrix position of a key, the function should return `'L'`, `'R'`, or
+`'*'`. Adapt the logic in this function according to the keyboard's matrix.
+
+::: warning
+Note the matrix may have irregularities around larger keys, around the edges of
+the board, and around thumb clusters. You may find it helpful to use [this
+debugging example](faq_debug#which-matrix-position-is-this-keypress) to
+correspond physical keys to matrix positions.
+:::
+
+::: tip If you define both `chordal_hold_layout[MATRIX_ROWS][MATRIX_COLS]` and
+`chordal_hold_handedness(keypos_t key)` for handedness, the latter takes
+precedence.
+:::
+
+
+### Per-chord customization
+
+Beyond the per-key configuration possible through handedness, Chordal Hold may
+be configured at a *per-chord* granularity for detailed tuning. In keymap.c,
+define `get_chordal_hold()`. Returning `true` allows the chord to be held, while
+returning `false` settles as tapped.
+
+For example:
+
+```c
+bool get_chordal_hold(uint16_t tap_hold_keycode, keyrecord_t* tap_hold_record,
+ uint16_t other_keycode, keyrecord_t* other_record) {
+ // Exceptionally allow some one-handed chords for hotkeys.
+ switch (tap_hold_keycode) {
+ case LCTL_T(KC_Z):
+ if (other_keycode == KC_C || other_keycode == KC_V) {
+ return true;
+ }
+ break;
+
+ case RCTL_T(KC_SLSH):
+ if (other_keycode == KC_N) {
+ return true;
+ }
+ break;
+ }
+ // Otherwise defer to the opposite hands rule.
+ return get_chordal_hold_default(tap_hold_record, other_record);
+}
+```
+
+As shown in the last line above, you may use
+`get_chordal_hold_default(tap_hold_record, other_record)` to get the default tap
+vs. hold decision according to the opposite hands rule.
+
+
## Retro Tapping
To enable `retro tapping`, add the following to your `config.h`:
diff --git a/drivers/i2c_master.h b/drivers/i2c_master.h
new file mode 100644
index 0000000000..dbe1cd42fa
--- /dev/null
+++ b/drivers/i2c_master.h
@@ -0,0 +1,141 @@
+// Copyright 2025 QMK
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#pragma once
+
+#include <stdint.h>
+
+/**
+ * \file
+ *
+ * \defgroup i2c_master I2C Master API
+ *
+ * \brief API to communicate with I2C devices.
+ * \{
+ */
+
+typedef int16_t i2c_status_t;
+
+#define I2C_STATUS_SUCCESS (0)
+#define I2C_STATUS_ERROR (-1)
+#define I2C_STATUS_TIMEOUT (-2)
+
+#define I2C_TIMEOUT_IMMEDIATE (0)
+#define I2C_TIMEOUT_INFINITE (0xFFFF)
+
+/**
+ * \brief Initialize the I2C driver. This function must be called only once, before any of the below functions can be called.
+ *
+ * This function is weakly defined, meaning it can be overridden if necessary for your particular use case.
+ */
+void i2c_init(void);
+
+/**
+ * \brief Send multiple bytes to the selected I2C device.
+ *
+ * \param address The 7-bit I2C address of the device.
+ * \param data A pointer to the data to transmit.
+ * \param length The number of bytes to write. Take care not to overrun the length of `data`.
+ * \param timeout The time in milliseconds to wait for a response from the target device.
+ *
+ * \return `I2C_STATUS_TIMEOUT` if the timeout period elapses, `I2C_STATUS_ERROR` if some other error occurs, otherwise `I2C_STATUS_SUCCESS`.
+ */
+i2c_status_t i2c_transmit(uint8_t address, const uint8_t* data, uint16_t length, uint16_t timeout);
+
+#if defined(__AVR__) || defined(__DOXYGEN__)
+/**
+ * \brief Send multiple bytes from PROGMEM to the selected I2C device.
+ *
+ * On ARM devices, this function is simply an alias for i2c_transmit(address, data, length, timeout).
+ *
+ * \param address The 7-bit I2C address of the device.
+ * \param data A pointer to the data to transmit.
+ * \param length The number of bytes to write. Take care not to overrun the length of `data`.
+ * \param timeout The time in milliseconds to wait for a response from the target device.
+ *
+ * \return `I2C_STATUS_TIMEOUT` if the timeout period elapses, `I2C_STATUS_ERROR` if some other error occurs, otherwise `I2C_STATUS_SUCCESS`.
+ */
+i2c_status_t i2c_transmit_P(uint8_t address, const uint8_t* data, uint16_t length, uint16_t timeout);
+#else
+# define i2c_transmit_P(address, data, length, timeout) i2c_transmit(address, data, length, timeout)
+#endif
+
+/**
+ * \brief Receive multiple bytes from the selected I2C device.
+ *
+ * \param address The 7-bit I2C address of the device.
+ * \param data A pointer to a buffer to read into.
+ * \param length The number of bytes to read. Take care not to overrun the length of `data`.
+ * \param timeout The time in milliseconds to wait for a response from the target device.
+ *
+ * \return `I2C_STATUS_TIMEOUT` if the timeout period elapses, `I2C_STATUS_ERROR` if some other error occurs, otherwise `I2C_STATUS_SUCCESS`.
+ */
+i2c_status_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout);
+
+/**
+ * \brief Write to a register with an 8-bit address on the I2C device.
+ *
+ * \param devaddr The 7-bit I2C address of the device.
+ * \param regaddr The register address to write to.
+ * \param data A pointer to the data to transmit.
+ * \param length The number of bytes to write. Take care not to overrun the length of `data`.
+ * \param timeout The time in milliseconds to wait for a response from the target device.
+ *
+ * \return `I2C_STATUS_TIMEOUT` if the timeout period elapses, `I2C_STATUS_ERROR` if some other error occurs, otherwise `I2C_STATUS_SUCCESS`.
+ */
+i2c_status_t i2c_write_register(uint8_t devaddr, uint8_t regaddr, const uint8_t* data, uint16_t length, uint16_t timeout);
+
+/**
+ * \brief Write to a register with a 16-bit address (big endian) on the I2C device.
+ *
+ * \param devaddr The 7-bit I2C address of the device.
+ * \param regaddr The register address to write to.
+ * \param data A pointer to the data to transmit.
+ * \param length The number of bytes to write. Take care not to overrun the length of `data`.
+ * \param timeout The time in milliseconds to wait for a response from the target device.
+ *
+ * \return `I2C_STATUS_TIMEOUT` if the timeout period elapses, `I2C_STATUS_ERROR` if some other error occurs, otherwise `I2C_STATUS_SUCCESS`.
+ */
+i2c_status_t i2c_write_register16(uint8_t devaddr, uint16_t regaddr, const uint8_t* data, uint16_t length, uint16_t timeout);
+
+/**
+ * \brief Read from a register with an 8-bit address on the I2C device.
+ *
+ * \param devaddr The 7-bit I2C address of the device.
+ * \param regaddr The register address to read from.
+ * \param data A pointer to a buffer to read into.
+ * \param length The number of bytes to read. Take care not to overrun the length of `data`.
+ * \param timeout The time in milliseconds to wait for a response from the target device.
+ *
+ * \return `I2C_STATUS_TIMEOUT` if the timeout period elapses, `I2C_STATUS_ERROR` if some other error occurs, otherwise `I2C_STATUS_SUCCESS`.
+ */
+i2c_status_t i2c_read_register(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout);
+
+/**
+ * \brief Read from a register with a 16-bit address (big endian) on the I2C device.
+ *
+ * \param devaddr The 7-bit I2C address of the device.
+ * \param regaddr The register address to read from.
+ * \param data A pointer to a buffer to read into.
+ * \param length The number of bytes to read. Take care not to overrun the length of `data`.
+ * \param timeout The time in milliseconds to wait for a response from the target device.
+ *
+ * \return `I2C_STATUS_TIMEOUT` if the timeout period elapses, `I2C_STATUS_ERROR` if some other error occurs, otherwise `I2C_STATUS_SUCCESS`.
+ */
+i2c_status_t i2c_read_register16(uint8_t devaddr, uint16_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout);
+
+/**
+ * \brief Ping the I2C bus for a specific address.
+ *
+ * On ChibiOS a "best effort" attempt is made by reading a single byte from register 0 at the given address. This should generally work except for I2C devices that do not not respond to a register 0 read request, which will result in a false negative result (unsuccessful response to ping attempt).
+ *
+ * This function is weakly defined, meaning it can be overridden if necessary for your particular use case.
+ *
+ * \param address The 7-bit I2C address of the device.
+ * \param timeout The time in milliseconds to wait for a response from the target device.
+ *
+ * \return `I2C_STATUS_TIMEOUT` if the timeout period elapses, `I2C_STATUS_ERROR` if some other error occurs, otherwise `I2C_STATUS_SUCCESS`.
+ */
+i2c_status_t i2c_ping_address(uint8_t address, uint16_t timeout);
+
+/** \} */
diff --git a/drivers/led/apa102.c b/drivers/led/apa102.c
index 050609263d..6a13153374 100644
--- a/drivers/led/apa102.c
+++ b/drivers/led/apa102.c
@@ -24,7 +24,7 @@
# elif defined(PROTOCOL_CHIBIOS)
# include "hal.h"
# include "chibios_config.h"
-# if defined(STM32F0XX) || defined(STM32F1XX) || defined(STM32F3XX) || defined(STM32F4XX) || defined(STM32L0XX) || defined(GD32VF103) || defined(MCU_RP)
+# if defined(STM32F0XX) || defined(STM32F1XX) || defined(STM32F3XX) || defined(STM32F4XX) || defined(STM32L0XX) || defined(AT32F415) || defined(GD32VF103) || defined(MCU_RP)
# define APA102_NOPS (100 / (1000000000L / (CPU_CLOCK / 4))) // This calculates how many loops of 4 nops to run to delay 100 ns
# else
# error APA102_NOPS configuration required
@@ -122,7 +122,7 @@ void apa102_init(void) {
gpio_set_pin_output(APA102_CI_PIN);
}
-void apa102_set_color(uint16_t index, uint8_t red, uint8_t green, uint8_t blue) {
+void apa102_set_color(int 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;
diff --git a/drivers/led/apa102.h b/drivers/led/apa102.h
index 42f1344f0c..6fa3521a3a 100644
--- a/drivers/led/apa102.h
+++ b/drivers/led/apa102.h
@@ -32,7 +32,7 @@
#define APA102_MAX_BRIGHTNESS 31
void apa102_init(void);
-void apa102_set_color(uint16_t index, uint8_t red, uint8_t green, uint8_t blue);
+void apa102_set_color(int 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);
diff --git a/drivers/led/aw20216s.h b/drivers/led/aw20216s.h
index b2c097125f..79b980fcdb 100644
--- a/drivers/led/aw20216s.h
+++ b/drivers/led/aw20216s.h
@@ -22,36 +22,6 @@
#include "gpio.h"
#include "util.h"
-// ======== DEPRECATED DEFINES - DO NOT USE ========
-#ifdef AW_SCALING_MAX
-# define AW20216S_SCALING_MAX AW_SCALING_MAX
-#endif
-#ifdef AW_GLOBAL_CURRENT_MAX
-# define AW20216S_GLOBAL_CURRENT_MAX AW_GLOBAL_CURRENT_MAX
-#endif
-#ifdef AW_SPI_MODE
-# define AW20216S_SPI_MODE AW_SPI_MODE
-#endif
-#ifdef AW_SPI_DIVISOR
-# define AW20216S_SPI_DIVISOR AW_SPI_DIVISOR
-#endif
-#ifdef DRIVER_1_CS
-# define AW20216S_CS_PIN_1 DRIVER_1_CS
-#endif
-#ifdef DRIVER_2_CS
-# define AW20216S_CS_PIN_2 DRIVER_2_CS
-#endif
-#ifdef DRIVER_1_EN
-# define AW20216S_EN_PIN DRIVER_1_EN
-#endif
-#ifdef AW20216S_EN_PIN_1
-# define AW20216S_EN_PIN AW20216S_EN_PIN_1
-#endif
-
-#define aw_led aw20216s_led_t
-#define g_aw_leds g_aw20216s_leds
-// ========
-
#define AW20216S_ID (0b1010 << 4)
#define AW20216S_WRITE 0
#define AW20216S_READ 1
@@ -328,233 +298,3 @@ void aw20216s_flush(void);
#define SW12_CS16 0xD5
#define SW12_CS17 0xD6
#define SW12_CS18 0xD7
-
-// DEPRECATED - DO NOT USE
-
-#define CS1_SW1 SW1_CS1
-#define CS2_SW1 SW1_CS2
-#define CS3_SW1 SW1_CS3
-#define CS4_SW1 SW1_CS4
-#define CS5_SW1 SW1_CS5
-#define CS6_SW1 SW1_CS6
-#define CS7_SW1 SW1_CS7
-#define CS8_SW1 SW1_CS8
-#define CS9_SW1 SW1_CS9
-#define CS10_SW1 SW1_CS10
-#define CS11_SW1 SW1_CS11
-#define CS12_SW1 SW1_CS12
-#define CS13_SW1 SW1_CS13
-#define CS14_SW1 SW1_CS14
-#define CS15_SW1 SW1_CS15
-#define CS16_SW1 SW1_CS16
-#define CS17_SW1 SW1_CS17
-#define CS18_SW1 SW1_CS18
-
-#define CS1_SW2 SW2_CS1
-#define CS2_SW2 SW2_CS2
-#define CS3_SW2 SW2_CS3
-#define CS4_SW2 SW2_CS4
-#define CS5_SW2 SW2_CS5
-#define CS6_SW2 SW2_CS6
-#define CS7_SW2 SW2_CS7
-#define CS8_SW2 SW2_CS8
-#define CS9_SW2 SW2_CS9
-#define CS10_SW2 SW2_CS10
-#define CS11_SW2 SW2_CS11
-#define CS12_SW2 SW2_CS12
-#define CS13_SW2 SW2_CS13
-#define CS14_SW2 SW2_CS14
-#define CS15_SW2 SW2_CS15
-#define CS16_SW2 SW2_CS16
-#define CS17_SW2 SW2_CS17
-#define CS18_SW2 SW2_CS18
-
-#define CS1_SW3 SW3_CS1
-#define CS2_SW3 SW3_CS2
-#define CS3_SW3 SW3_CS3
-#define CS4_SW3 SW3_CS4
-#define CS5_SW3 SW3_CS5
-#define CS6_SW3 SW3_CS6
-#define CS7_SW3 SW3_CS7
-#define CS8_SW3 SW3_CS8
-#define CS9_SW3 SW3_CS9
-#define CS10_SW3 SW3_CS10
-#define CS11_SW3 SW3_CS11
-#define CS12_SW3 SW3_CS12
-#define CS13_SW3 SW3_CS13
-#define CS14_SW3 SW3_CS14
-#define CS15_SW3 SW3_CS15
-#define CS16_SW3 SW3_CS16
-#define CS17_SW3 SW3_CS17
-#define CS18_SW3 SW3_CS18
-
-#define CS1_SW4 SW4_CS1
-#define CS2_SW4 SW4_CS2
-#define CS3_SW4 SW4_CS3
-#define CS4_SW4 SW4_CS4
-#define CS5_SW4 SW4_CS5
-#define CS6_SW4 SW4_CS6
-#define CS7_SW4 SW4_CS7
-#define CS8_SW4 SW4_CS8
-#define CS9_SW4 SW4_CS9
-#define CS10_SW4 SW4_CS10
-#define CS11_SW4 SW4_CS11
-#define CS12_SW4 SW4_CS12
-#define CS13_SW4 SW4_CS13
-#define CS14_SW4 SW4_CS14
-#define CS15_SW4 SW4_CS15
-#define CS16_SW4 SW4_CS16
-#define CS17_SW4 SW4_CS17
-#define CS18_SW4 SW4_CS18
-
-#define CS1_SW5 SW5_CS1
-#define CS2_SW5 SW5_CS2
-#define CS3_SW5 SW5_CS3
-#define CS4_SW5 SW5_CS4
-#define CS5_SW5 SW5_CS5
-#define CS6_SW5 SW5_CS6
-#define CS7_SW5 SW5_CS7
-#define CS8_SW5 SW5_CS8
-#define CS9_SW5 SW5_CS9
-#define CS10_SW5 SW5_CS10
-#define CS11_SW5 SW5_CS11
-#define CS12_SW5 SW5_CS12
-#define CS13_SW5 SW5_CS13
-#define CS14_SW5 SW5_CS14
-#define CS15_SW5 SW5_CS15
-#define CS16_SW5 SW5_CS16
-#define CS17_SW5 SW5_CS17
-#define CS18_SW5 SW5_CS18
-
-#define CS1_SW6 SW6_CS1
-#define CS2_SW6 SW6_CS2
-#define CS3_SW6 SW6_CS3
-#define CS4_SW6 SW6_CS4
-#define CS5_SW6 SW6_CS5
-#define CS6_SW6 SW6_CS6
-#define CS7_SW6 SW6_CS7
-#define CS8_SW6 SW6_CS8
-#define CS9_SW6 SW6_CS9
-#define CS10_SW6 SW6_CS10
-#define CS11_SW6 SW6_CS11
-#define CS12_SW6 SW6_CS12
-#define CS13_SW6 SW6_CS13
-#define CS14_SW6 SW6_CS14
-#define CS15_SW6 SW6_CS15
-#define CS16_SW6 SW6_CS16
-#define CS17_SW6 SW6_CS17
-#define CS18_SW6 SW6_CS18
-
-#define CS1_SW7 SW7_CS1
-#define CS2_SW7 SW7_CS2
-#define CS3_SW7 SW7_CS3
-#define CS4_SW7 SW7_CS4
-#define CS5_SW7 SW7_CS5
-#define CS6_SW7 SW7_CS6
-#define CS7_SW7 SW7_CS7
-#define CS8_SW7 SW7_CS8
-#define CS9_SW7 SW7_CS9
-#define CS10_SW7 SW7_CS10
-#define CS11_SW7 SW7_CS11
-#define CS12_SW7 SW7_CS12
-#define CS13_SW7 SW7_CS13
-#define CS14_SW7 SW7_CS14
-#define CS15_SW7 SW7_CS15
-#define CS16_SW7 SW7_CS16
-#define CS17_SW7 SW7_CS17
-#define CS18_SW7 SW7_CS18
-
-#define CS1_SW8 SW8_CS1
-#define CS2_SW8 SW8_CS2
-#define CS3_SW8 SW8_CS3
-#define CS4_SW8 SW8_CS4
-#define CS5_SW8 SW8_CS5
-#define CS6_SW8 SW8_CS6
-#define CS7_SW8 SW8_CS7
-#define CS8_SW8 SW8_CS8
-#define CS9_SW8 SW8_CS9
-#define CS10_SW8 SW8_CS10
-#define CS11_SW8 SW8_CS11
-#define CS12_SW8 SW8_CS12
-#define CS13_SW8 SW8_CS13
-#define CS14_SW8 SW8_CS14
-#define CS15_SW8 SW8_CS15
-#define CS16_SW8 SW8_CS16
-#define CS17_SW8 SW8_CS17
-#define CS18_SW8 SW8_CS18
-
-#define CS1_SW9 SW9_CS1
-#define CS2_SW9 SW9_CS2
-#define CS3_SW9 SW9_CS3
-#define CS4_SW9 SW9_CS4
-#define CS5_SW9 SW9_CS5
-#define CS6_SW9 SW9_CS6
-#define CS7_SW9 SW9_CS7
-#define CS8_SW9 SW9_CS8
-#define CS9_SW9 SW9_CS9
-#define CS10_SW9 SW9_CS10
-#define CS11_SW9 SW9_CS11
-#define CS12_SW9 SW9_CS12
-#define CS13_SW9 SW9_CS13
-#define CS14_SW9 SW9_CS14
-#define CS15_SW9 SW9_CS15
-#define CS16_SW9 SW9_CS16
-#define CS17_SW9 SW9_CS17
-#define CS18_SW9 SW9_CS18
-
-#define CS1_SW10 SW10_CS1
-#define CS2_SW10 SW10_CS2
-#define CS3_SW10 SW10_CS3
-#define CS4_SW10 SW10_CS4
-#define CS5_SW10 SW10_CS5
-#define CS6_SW10 SW10_CS6
-#define CS7_SW10 SW10_CS7
-#define CS8_SW10 SW10_CS8
-#define CS9_SW10 SW10_CS9
-#define CS10_SW10 SW10_CS10
-#define CS11_SW10 SW10_CS11
-#define CS12_SW10 SW10_CS12
-#define CS13_SW10 SW10_CS13
-#define CS14_SW10 SW10_CS14
-#define CS15_SW10 SW10_CS15
-#define CS16_SW10 SW10_CS16
-#define CS17_SW10 SW10_CS17
-#define CS18_SW10 SW10_CS18
-
-#define CS1_SW11 SW11_CS1
-#define CS2_SW11 SW11_CS2
-#define CS3_SW11 SW11_CS3
-#define CS4_SW11 SW11_CS4
-#define CS5_SW11 SW11_CS5
-#define CS6_SW11 SW11_CS6
-#define CS7_SW11 SW11_CS7
-#define CS8_SW11 SW11_CS8
-#define CS9_SW11 SW11_CS9
-#define CS10_SW11 SW11_CS10
-#define CS11_SW11 SW11_CS11
-#define CS12_SW11 SW11_CS12
-#define CS13_SW11 SW11_CS13
-#define CS14_SW11 SW11_CS14
-#define CS15_SW11 SW11_CS15
-#define CS16_SW11 SW11_CS16
-#define CS17_SW11 SW11_CS17
-#define CS18_SW11 SW11_CS18
-
-#define CS1_SW12 SW12_CS1
-#define CS2_SW12 SW12_CS2
-#define CS3_SW12 SW12_CS3
-#define CS4_SW12 SW12_CS4
-#define CS5_SW12 SW12_CS5
-#define CS6_SW12 SW12_CS6
-#define CS7_SW12 SW12_CS7
-#define CS8_SW12 SW12_CS8
-#define CS9_SW12 SW12_CS9
-#define CS10_SW12 SW12_CS10
-#define CS11_SW12 SW12_CS11
-#define CS12_SW12 SW12_CS12
-#define CS13_SW12 SW12_CS13
-#define CS14_SW12 SW12_CS14
-#define CS15_SW12 SW12_CS15
-#define CS16_SW12 SW12_CS16
-#define CS17_SW12 SW12_CS17
-#define CS18_SW12 SW12_CS18
diff --git a/drivers/led/issi/is31fl3731-mono.h b/drivers/led/issi/is31fl3731-mono.h
index e6e107d309..cc59b45cb3 100644
--- a/drivers/led/issi/is31fl3731-mono.h
+++ b/drivers/led/issi/is31fl3731-mono.h
@@ -23,33 +23,6 @@
#include "progmem.h"
#include "util.h"
-// ======== DEPRECATED DEFINES - DO NOT USE ========
-#ifdef LED_DRIVER_ADDR_1
-# define IS31FL3731_I2C_ADDRESS_1 LED_DRIVER_ADDR_1
-#endif
-#ifdef LED_DRIVER_ADDR_2
-# define IS31FL3731_I2C_ADDRESS_2 LED_DRIVER_ADDR_2
-#endif
-#ifdef LED_DRIVER_ADDR_3
-# define IS31FL3731_I2C_ADDRESS_3 LED_DRIVER_ADDR_3
-#endif
-#ifdef LED_DRIVER_ADDR_4
-# define IS31FL3731_I2C_ADDRESS_4 LED_DRIVER_ADDR_4
-#endif
-#ifdef ISSI_TIMEOUT
-# define IS31FL3731_I2C_TIMEOUT ISSI_TIMEOUT
-#endif
-#ifdef ISSI_PERSISTENCE
-# define IS31FL3731_I2C_PERSISTENCE ISSI_PERSISTENCE
-#endif
-#ifdef ISSI_3731_DEGHOST
-# define IS31FL3731_DEGHOST ISSI_3731_DEGHOST
-#endif
-
-#define is31_led is31fl3731_led_t
-#define g_is31_leds g_is31fl3731_leds
-// ========
-
#define IS31FL3731_REG_COMMAND 0xFD
#define IS31FL3731_COMMAND_FRAME_1 0x00
#define IS31FL3731_COMMAND_FRAME_2 0x01
diff --git a/drivers/led/issi/is31fl3731.h b/drivers/led/issi/is31fl3731.h
index dc229c876d..947b7dc8e9 100644
--- a/drivers/led/issi/is31fl3731.h
+++ b/drivers/led/issi/is31fl3731.h
@@ -22,33 +22,6 @@
#include "progmem.h"
#include "util.h"
-// ======== DEPRECATED DEFINES - DO NOT USE ========
-#ifdef DRIVER_ADDR_1
-# define IS31FL3731_I2C_ADDRESS_1 DRIVER_ADDR_1
-#endif
-#ifdef DRIVER_ADDR_2
-# define IS31FL3731_I2C_ADDRESS_2 DRIVER_ADDR_2
-#endif
-#ifdef DRIVER_ADDR_3
-# define IS31FL3731_I2C_ADDRESS_3 DRIVER_ADDR_3
-#endif
-#ifdef DRIVER_ADDR_4
-# define IS31FL3731_I2C_ADDRESS_4 DRIVER_ADDR_4
-#endif
-#ifdef ISSI_TIMEOUT
-# define IS31FL3731_I2C_TIMEOUT ISSI_TIMEOUT
-#endif
-#ifdef ISSI_PERSISTENCE
-# define IS31FL3731_I2C_PERSISTENCE ISSI_PERSISTENCE
-#endif
-#ifdef ISSI_3731_DEGHOST
-# define IS31FL3731_DEGHOST ISSI_3731_DEGHOST
-#endif
-
-#define is31_led is31fl3731_led_t
-#define g_is31_leds g_is31fl3731_leds
-// ========
-
#define IS31FL3731_REG_COMMAND 0xFD
#define IS31FL3731_COMMAND_FRAME_1 0x00
#define IS31FL3731_COMMAND_FRAME_2 0x01
diff --git a/drivers/led/issi/is31fl3733-mono.h b/drivers/led/issi/is31fl3733-mono.h
index 3786b2ed71..40d340a70d 100644
--- a/drivers/led/issi/is31fl3733-mono.h
+++ b/drivers/led/issi/is31fl3733-mono.h
@@ -25,38 +25,6 @@
#include "progmem.h"
#include "util.h"
-// ======== DEPRECATED DEFINES - DO NOT USE ========
-#ifdef ISSI_TIMEOUT
-# define IS31FL3733_I2C_TIMEOUT ISSI_TIMEOUT
-#endif
-#ifdef ISSI_PERSISTENCE
-# define IS31FL3733_I2C_PERSISTENCE ISSI_PERSISTENCE
-#endif
-#ifdef ISSI_PWM_FREQUENCY
-# define IS31FL3733_PWM_FREQUENCY ISSI_PWM_FREQUENCY
-#endif
-#ifdef ISSI_SWPULLUP
-# define IS31FL3733_SW_PULLUP ISSI_SWPULLUP
-#endif
-#ifdef ISSI_CSPULLUP
-# define IS31FL3733_CS_PULLDOWN ISSI_CSPULLUP
-#endif
-#ifdef ISSI_GLOBALCURRENT
-# define IS31FL3733_GLOBAL_CURRENT ISSI_GLOBALCURRENT
-#endif
-
-#define is31_led is31fl3733_led_t
-#define g_is31_leds g_is31fl3733_leds
-
-#define PUR_0R IS31FL3733_PUR_0_OHM
-#define PUR_05KR IS31FL3733_PUR_1K_OHM
-#define PUR_3KR IS31FL3733_PUR_2K_OHM
-#define PUR_4KR IS31FL3733_PUR_4K_OHM
-#define PUR_8KR IS31FL3733_PUR_8K_OHM
-#define PUR_16KR IS31FL3733_PUR_16K_OHM
-#define PUR_32KR IS31FL3733_PUR_32K_OHM
-// ========
-
#define IS31FL3733_REG_INTERRUPT_MASK 0xF0
#define IS31FL3733_REG_INTERRUPT_STATUS 0xF1
diff --git a/drivers/led/issi/is31fl3733.h b/drivers/led/issi/is31fl3733.h
index fb60c76c2d..8757d5ab07 100644
--- a/drivers/led/issi/is31fl3733.h
+++ b/drivers/led/issi/is31fl3733.h
@@ -24,62 +24,6 @@
#include "progmem.h"
#include "util.h"
-// ======== DEPRECATED DEFINES - DO NOT USE ========
-#ifdef DRIVER_ADDR_1
-# define IS31FL3733_I2C_ADDRESS_1 DRIVER_ADDR_1
-#endif
-#ifdef DRIVER_ADDR_2
-# define IS31FL3733_I2C_ADDRESS_2 DRIVER_ADDR_2
-#endif
-#ifdef DRIVER_ADDR_3
-# define IS31FL3733_I2C_ADDRESS_3 DRIVER_ADDR_3
-#endif
-#ifdef DRIVER_ADDR_4
-# define IS31FL3733_I2C_ADDRESS_4 DRIVER_ADDR_4
-#endif
-#ifdef DRIVER_SYNC_1
-# define IS31FL3733_SYNC_1 DRIVER_SYNC_1
-#endif
-#ifdef DRIVER_SYNC_2
-# define IS31FL3733_SYNC_2 DRIVER_SYNC_2
-#endif
-#ifdef DRIVER_SYNC_3
-# define IS31FL3733_SYNC_3 DRIVER_SYNC_3
-#endif
-#ifdef DRIVER_SYNC_4
-# define IS31FL3733_SYNC_4 DRIVER_SYNC_4
-#endif
-#ifdef ISSI_TIMEOUT
-# define IS31FL3733_I2C_TIMEOUT ISSI_TIMEOUT
-#endif
-#ifdef ISSI_PERSISTENCE
-# define IS31FL3733_I2C_PERSISTENCE ISSI_PERSISTENCE
-#endif
-#ifdef ISSI_PWM_FREQUENCY
-# define IS31FL3733_PWM_FREQUENCY ISSI_PWM_FREQUENCY
-#endif
-#ifdef ISSI_SWPULLUP
-# define IS31FL3733_SW_PULLUP ISSI_SWPULLUP
-#endif
-#ifdef ISSI_CSPULLUP
-# define IS31FL3733_CS_PULLDOWN ISSI_CSPULLUP
-#endif
-#ifdef ISSI_GLOBALCURRENT
-# define IS31FL3733_GLOBAL_CURRENT ISSI_GLOBALCURRENT
-#endif
-
-#define is31_led is31fl3733_led_t
-#define g_is31_leds g_is31fl3733_leds
-
-#define PUR_0R IS31FL3733_PUR_0_OHM
-#define PUR_05KR IS31FL3733_PUR_1K_OHM
-#define PUR_3KR IS31FL3733_PUR_2K_OHM
-#define PUR_4KR IS31FL3733_PUR_4K_OHM
-#define PUR_8KR IS31FL3733_PUR_8K_OHM
-#define PUR_16KR IS31FL3733_PUR_16K_OHM
-#define PUR_32KR IS31FL3733_PUR_32K_OHM
-// ========
-
#define IS31FL3733_REG_INTERRUPT_MASK 0xF0
#define IS31FL3733_REG_INTERRUPT_STATUS 0xF1
@@ -389,209 +333,3 @@ void is31fl3733_flush(void);
#define SW12_CS14 0xBD
#define SW12_CS15 0xBE
#define SW12_CS16 0xBF
-
-// DEPRECATED - DO NOT USE
-
-#define A_1 SW1_CS1
-#define A_2 SW1_CS2
-#define A_3 SW1_CS3
-#define A_4 SW1_CS4
-#define A_5 SW1_CS5
-#define A_6 SW1_CS6
-#define A_7 SW1_CS7
-#define A_8 SW1_CS8
-#define A_9 SW1_CS9
-#define A_10 SW1_CS10
-#define A_11 SW1_CS11
-#define A_12 SW1_CS12
-#define A_13 SW1_CS13
-#define A_14 SW1_CS14
-#define A_15 SW1_CS15
-#define A_16 SW1_CS16
-
-#define B_1 SW2_CS1
-#define B_2 SW2_CS2
-#define B_3 SW2_CS3
-#define B_4 SW2_CS4
-#define B_5 SW2_CS5
-#define B_6 SW2_CS6
-#define B_7 SW2_CS7
-#define B_8 SW2_CS8
-#define B_9 SW2_CS9
-#define B_10 SW2_CS10
-#define B_11 SW2_CS11
-#define B_12 SW2_CS12
-#define B_13 SW2_CS13
-#define B_14 SW2_CS14
-#define B_15 SW2_CS15
-#define B_16 SW2_CS16
-
-#define C_1 SW3_CS1
-#define C_2 SW3_CS2
-#define C_3 SW3_CS3
-#define C_4 SW3_CS4
-#define C_5 SW3_CS5
-#define C_6 SW3_CS6
-#define C_7 SW3_CS7
-#define C_8 SW3_CS8
-#define C_9 SW3_CS9
-#define C_10 SW3_CS10
-#define C_11 SW3_CS11
-#define C_12 SW3_CS12
-#define C_13 SW3_CS13
-#define C_14 SW3_CS14
-#define C_15 SW3_CS15
-#define C_16 SW3_CS16
-
-#define D_1 SW4_CS1
-#define D_2 SW4_CS2
-#define D_3 SW4_CS3
-#define D_4 SW4_CS4
-#define D_5 SW4_CS5
-#define D_6 SW4_CS6
-#define D_7 SW4_CS7
-#define D_8 SW4_CS8
-#define D_9 SW4_CS9
-#define D_10 SW4_CS10
-#define D_11 SW4_CS11
-#define D_12 SW4_CS12
-#define D_13 SW4_CS13
-#define D_14 SW4_CS14
-#define D_15 SW4_CS15
-#define D_16 SW4_CS16
-
-#define E_1 SW5_CS1
-#define E_2 SW5_CS2
-#define E_3 SW5_CS3
-#define E_4 SW5_CS4
-#define E_5 SW5_CS5
-#define E_6 SW5_CS6
-#define E_7 SW5_CS7
-#define E_8 SW5_CS8
-#define E_9 SW5_CS9
-#define E_10 SW5_CS10
-#define E_11 SW5_CS11
-#define E_12 SW5_CS12
-#define E_13 SW5_CS13
-#define E_14 SW5_CS14
-#define E_15 SW5_CS15
-#define E_16 SW5_CS16
-
-#define F_1 SW6_CS1
-#define F_2 SW6_CS2
-#define F_3 SW6_CS3
-#define F_4 SW6_CS4
-#define F_5 SW6_CS5
-#define F_6 SW6_CS6
-#define F_7 SW6_CS7
-#define F_8 SW6_CS8
-#define F_9 SW6_CS9
-#define F_10 SW6_CS10
-#define F_11 SW6_CS11
-#define F_12 SW6_CS12
-#define F_13 SW6_CS13
-#define F_14 SW6_CS14
-#define F_15 SW6_CS15
-#define F_16 SW6_CS16
-
-#define G_1 SW7_CS1
-#define G_2 SW7_CS2
-#define G_3 SW7_CS3
-#define G_4 SW7_CS4
-#define G_5 SW7_CS5
-#define G_6 SW7_CS6
-#define G_7 SW7_CS7
-#define G_8 SW7_CS8
-#define G_9 SW7_CS9
-#define G_10 SW7_CS10
-#define G_11 SW7_CS11
-#define G_12 SW7_CS12
-#define G_13 SW7_CS13
-#define G_14 SW7_CS14
-#define G_15 SW7_CS15
-#define G_16 SW7_CS16
-
-#define H_1 SW8_CS1
-#define H_2 SW8_CS2
-#define H_3 SW8_CS3
-#define H_4 SW8_CS4
-#define H_5 SW8_CS5
-#define H_6 SW8_CS6
-#define H_7 SW8_CS7
-#define H_8 SW8_CS8
-#define H_9 SW8_CS9
-#define H_10 SW8_CS10
-#define H_11 SW8_CS11
-#define H_12 SW8_CS12
-#define H_13 SW8_CS13
-#define H_14 SW8_CS14
-#define H_15 SW8_CS15
-#define H_16 SW8_CS16
-
-#define I_1 SW9_CS1
-#define I_2 SW9_CS2
-#define I_3 SW9_CS3
-#define I_4 SW9_CS4
-#define I_5 SW9_CS5
-#define I_6 SW9_CS6
-#define I_7 SW9_CS7
-#define I_8 SW9_CS8
-#define I_9 SW9_CS9
-#define I_10 SW9_CS10
-#define I_11 SW9_CS11
-#define I_12 SW9_CS12
-#define I_13 SW9_CS13
-#define I_14 SW9_CS14
-#define I_15 SW9_CS15
-#define I_16 SW9_CS16
-
-#define J_1 SW10_CS1
-#define J_2 SW10_CS2
-#define J_3 SW10_CS3
-#define J_4 SW10_CS4
-#define J_5 SW10_CS5
-#define J_6 SW10_CS6
-#define J_7 SW10_CS7
-#define J_8 SW10_CS8
-#define J_9 SW10_CS9
-#define J_10 SW10_CS10
-#define J_11 SW10_CS11
-#define J_12 SW10_CS12
-#define J_13 SW10_CS13
-#define J_14 SW10_CS14
-#define J_15 SW10_CS15
-#define J_16 SW10_CS16
-
-#define K_1 SW11_CS1
-#define K_2 SW11_CS2
-#define K_3 SW11_CS3
-#define K_4 SW11_CS4
-#define K_5 SW11_CS5
-#define K_6 SW11_CS6
-#define K_7 SW11_CS7
-#define K_8 SW11_CS8
-#define K_9 SW11_CS9
-#define K_10 SW11_CS10
-#define K_11 SW11_CS11
-#define K_12 SW11_CS12
-#define K_13 SW11_CS13
-#define K_14 SW11_CS14
-#define K_15 SW11_CS15
-#define K_16 SW11_CS16
-
-#define L_1 SW12_CS1
-#define L_2 SW12_CS2
-#define L_3 SW12_CS3
-#define L_4 SW12_CS4
-#define L_5 SW12_CS5
-#define L_6 SW12_CS6
-#define L_7 SW12_CS7
-#define L_8 SW12_CS8
-#define L_9 SW12_CS9
-#define L_10 SW12_CS10
-#define L_11 SW12_CS11
-#define L_12 SW12_CS12
-#define L_13 SW12_CS13
-#define L_14 SW12_CS14
-#define L_15 SW12_CS15
-#define L_16 SW12_CS16
diff --git a/drivers/led/issi/is31fl3736-mono.h b/drivers/led/issi/is31fl3736-mono.h
index 91c2e0420b..73441ea551 100644
--- a/drivers/led/issi/is31fl3736-mono.h
+++ b/drivers/led/issi/is31fl3736-mono.h
@@ -22,36 +22,6 @@
#include "progmem.h"
#include "util.h"
-// ======== DEPRECATED DEFINES - DO NOT USE ========
-#ifdef ISSI_TIMEOUT
-# define IS31FL3736_I2C_TIMEOUT ISSI_TIMEOUT
-#endif
-#ifdef ISSI_PERSISTENCE
-# define IS31FL3736_I2C_PERSISTENCE ISSI_PERSISTENCE
-#endif
-#ifdef ISSI_SWPULLUP
-# define IS31FL3736_SW_PULLUP ISSI_SWPULLUP
-#endif
-#ifdef ISSI_CSPULLUP
-# define IS31FL3736_CS_PULLDOWN ISSI_CSPULLUP
-#endif
-#ifdef ISSI_GLOBALCURRENT
-# define IS31FL3736_GLOBAL_CURRENT ISSI_GLOBALCURRENT
-#endif
-
-#define is31_led is31fl3736_led_t
-#define g_is31_leds g_is31fl3736_leds
-
-#define PUR_0R IS31FL3736_PUR_0_OHM
-#define PUR_05KR IS31FL3736_PUR_05K_OHM
-#define PUR_1KR IS31FL3736_PUR_1K_OHM
-#define PUR_2KR IS31FL3736_PUR_2K_OHM
-#define PUR_4KR IS31FL3736_PUR_4K_OHM
-#define PUR_8KR IS31FL3736_PUR_8K_OHM
-#define PUR_16KR IS31FL3736_PUR_16K_OHM
-#define PUR_32KR IS31FL3736_PUR_32K_OHM
-// ========
-
#define IS31FL3736_REG_INTERRUPT_MASK 0xF0
#define IS31FL3736_REG_INTERRUPT_STATUS 0xF1
@@ -259,113 +229,3 @@ void is31fl3736_flush(void);
#define SW12_CS6 0xBA
#define SW12_CS7 0xBC
#define SW12_CS8 0xBE
-
-// DEPRECATED - DO NOT USE
-
-#define A_1 SW1_CS1
-#define A_2 SW1_CS2
-#define A_3 SW1_CS3
-#define A_4 SW1_CS4
-#define A_5 SW1_CS5
-#define A_6 SW1_CS6
-#define A_7 SW1_CS7
-#define A_8 SW1_CS8
-
-#define B_1 SW2_CS1
-#define B_2 SW2_CS2
-#define B_3 SW2_CS3
-#define B_4 SW2_CS4
-#define B_5 SW2_CS5
-#define B_6 SW2_CS6
-#define B_7 SW2_CS7
-#define B_8 SW2_CS8
-
-#define C_1 SW3_CS1
-#define C_2 SW3_CS2
-#define C_3 SW3_CS3
-#define C_4 SW3_CS4
-#define C_5 SW3_CS5
-#define C_6 SW3_CS6
-#define C_7 SW3_CS7
-#define C_8 SW3_CS8
-
-#define D_1 SW4_CS1
-#define D_2 SW4_CS2
-#define D_3 SW4_CS3
-#define D_4 SW4_CS4
-#define D_5 SW4_CS5
-#define D_6 SW4_CS6
-#define D_7 SW4_CS7
-#define D_8 SW4_CS8
-
-#define E_1 SW5_CS1
-#define E_2 SW5_CS2
-#define E_3 SW5_CS3
-#define E_4 SW5_CS4
-#define E_5 SW5_CS5
-#define E_6 SW5_CS6
-#define E_7 SW5_CS7
-#define E_8 SW5_CS8
-
-#define F_1 SW6_CS1
-#define F_2 SW6_CS2
-#define F_3 SW6_CS3
-#define F_4 SW6_CS4
-#define F_5 SW6_CS5
-#define F_6 SW6_CS6
-#define F_7 SW6_CS7
-#define F_8 SW6_CS8
-
-#define G_1 SW7_CS1
-#define G_2 SW7_CS2
-#define G_3 SW7_CS3
-#define G_4 SW7_CS4
-#define G_5 SW7_CS5
-#define G_6 SW7_CS6
-#define G_7 SW7_CS7
-#define G_8 SW7_CS8
-
-#define H_1 SW8_CS1
-#define H_2 SW8_CS2
-#define H_3 SW8_CS3
-#define H_4 SW8_CS4
-#define H_5 SW8_CS5
-#define H_6 SW8_CS6
-#define H_7 SW8_CS7
-#define H_8 SW8_CS8
-
-#define I_1 SW9_CS1
-#define I_2 SW9_CS2
-#define I_3 SW9_CS3
-#define I_4 SW9_CS4
-#define I_5 SW9_CS5
-#define I_6 SW9_CS6
-#define I_7 SW9_CS7
-#define I_8 SW9_CS8
-
-#define J_1 SW10_CS1
-#define J_2 SW10_CS2
-#define J_3 SW10_CS3
-#define J_4 SW10_CS4
-#define J_5 SW10_CS5
-#define J_6 SW10_CS6
-#define J_7 SW10_CS7
-#define J_8 SW10_CS8
-
-#define K_1 SW11_CS1
-#define K_2 SW11_CS2
-#define K_3 SW11_CS3
-#define K_4 SW11_CS4
-#define K_5 SW11_CS5
-#define K_6 SW11_CS6
-#define K_7 SW11_CS7
-#define K_8 SW11_CS8
-
-#define L_1 SW12_CS1
-#define L_2 SW12_CS2
-#define L_3 SW12_CS3
-#define L_4 SW12_CS4
-#define L_5 SW12_CS5
-#define L_6 SW12_CS6
-#define L_7 SW12_CS7
-#define L_8 SW12_CS8
diff --git a/drivers/led/issi/is31fl3736.h b/drivers/led/issi/is31fl3736.h
index dae7b3c812..f0eabad819 100644
--- a/drivers/led/issi/is31fl3736.h
+++ b/drivers/led/issi/is31fl3736.h
@@ -22,48 +22,6 @@
#include "progmem.h"
#include "util.h"
-// ======== DEPRECATED DEFINES - DO NOT USE ========
-#ifdef DRIVER_ADDR_1
-# define IS31FL3736_I2C_ADDRESS_1 DRIVER_ADDR_1
-#endif
-#ifdef DRIVER_ADDR_2
-# define IS31FL3736_I2C_ADDRESS_2 DRIVER_ADDR_2
-#endif
-#ifdef DRIVER_ADDR_3
-# define IS31FL3736_I2C_ADDRESS_3 DRIVER_ADDR_3
-#endif
-#ifdef DRIVER_ADDR_4
-# define IS31FL3736_I2C_ADDRESS_4 DRIVER_ADDR_4
-#endif
-#ifdef ISSI_TIMEOUT
-# define IS31FL3736_I2C_TIMEOUT ISSI_TIMEOUT
-#endif
-#ifdef ISSI_PERSISTENCE
-# define IS31FL3736_I2C_PERSISTENCE ISSI_PERSISTENCE
-#endif
-#ifdef ISSI_SWPULLUP
-# define IS31FL3736_SW_PULLUP ISSI_SWPULLUP
-#endif
-#ifdef ISSI_CSPULLUP
-# define IS31FL3736_CS_PULLDOWN ISSI_CSPULLUP
-#endif
-#ifdef ISSI_GLOBALCURRENT
-# define IS31FL3736_GLOBAL_CURRENT ISSI_GLOBALCURRENT
-#endif
-
-#define is31_led is31fl3736_led_t
-#define g_is31_leds g_is31fl3736_leds
-
-#define PUR_0R IS31FL3736_PUR_0_OHM
-#define PUR_05KR IS31FL3736_PUR_0K5_OHM
-#define PUR_1KR IS31FL3736_PUR_1K_OHM
-#define PUR_2KR IS31FL3736_PUR_2K_OHM
-#define PUR_4KR IS31FL3736_PUR_4K_OHM
-#define PUR_8KR IS31FL3736_PUR_8K_OHM
-#define PUR_16KR IS31FL3736_PUR_16K_OHM
-#define PUR_32KR IS31FL3736_PUR_32K_OHM
-// ========
-
#define IS31FL3736_REG_INTERRUPT_MASK 0xF0
#define IS31FL3736_REG_INTERRUPT_STATUS 0xF1
diff --git a/drivers/led/issi/is31fl3737-mono.h b/drivers/led/issi/is31fl3737-mono.h
index 99151c1e7a..40380f9006 100644
--- a/drivers/led/issi/is31fl3737-mono.h
+++ b/drivers/led/issi/is31fl3737-mono.h
@@ -24,36 +24,6 @@
#include "progmem.h"
#include "util.h"
-// ======== DEPRECATED DEFINES - DO NOT USE ========
-#ifdef ISSI_TIMEOUT
-# define IS31FL3737_I2C_TIMEOUT ISSI_TIMEOUT
-#endif
-#ifdef ISSI_PERSISTENCE
-# define IS31FL3737_I2C_PERSISTENCE ISSI_PERSISTENCE
-#endif
-#ifdef ISSI_PWM_FREQUENCY
-# define IS31FL3737_PWM_FREQUENCY ISSI_PWM_FREQUENCY
-#endif
-#ifdef ISSI_SWPULLUP
-# define IS31FL3737_SW_PULLUP ISSI_SWPULLUP
-#endif
-#ifdef ISSI_CSPULLUP
-# define IS31FL3737_CS_PULLDOWN ISSI_CSPULLUP
-#endif
-#ifdef ISSI_GLOBALCURRENT
-# define IS31FL3737_GLOBAL_CURRENT ISSI_GLOBALCURRENT
-#endif
-
-#define PUR_0R IS31FL3737_PUR_0_OHM
-#define PUR_05KR IS31FL3737_PUR_0K5_OHM
-#define PUR_1KR IS31FL3737_PUR_1K_OHM
-#define PUR_2KR IS31FL3737_PUR_2K_OHM
-#define PUR_4KR IS31FL3737_PUR_4K_OHM
-#define PUR_8KR IS31FL3737_PUR_8K_OHM
-#define PUR_16KR IS31FL3737_PUR_16K_OHM
-#define PUR_32KR IS31FL3737_PUR_32K_OHM
-// ========
-
#define IS31FL3737_REG_INTERRUPT_MASK 0xF0
#define IS31FL3737_REG_INTERRUPT_STATUS 0xF1
diff --git a/drivers/led/issi/is31fl3737.h b/drivers/led/issi/is31fl3737.h
index 735a3a1e30..c1a9306a87 100644
--- a/drivers/led/issi/is31fl3737.h
+++ b/drivers/led/issi/is31fl3737.h
@@ -24,51 +24,6 @@
#include "progmem.h"
#include "util.h"
-// ======== DEPRECATED DEFINES - DO NOT USE ========
-#ifdef DRIVER_ADDR_1
-# define IS31FL3737_I2C_ADDRESS_1 DRIVER_ADDR_1
-#endif
-#ifdef DRIVER_ADDR_2
-# define IS31FL3737_I2C_ADDRESS_2 DRIVER_ADDR_2
-#endif
-#ifdef DRIVER_ADDR_3
-# define IS31FL3737_I2C_ADDRESS_3 DRIVER_ADDR_3
-#endif
-#ifdef DRIVER_ADDR_4
-# define IS31FL3737_I2C_ADDRESS_4 DRIVER_ADDR_4
-#endif
-#ifdef ISSI_TIMEOUT
-# define IS31FL3737_I2C_TIMEOUT ISSI_TIMEOUT
-#endif
-#ifdef ISSI_PERSISTENCE
-# define IS31FL3737_I2C_PERSISTENCE ISSI_PERSISTENCE
-#endif
-#ifdef ISSI_PWM_FREQUENCY
-# define IS31FL3737_PWM_FREQUENCY ISSI_PWM_FREQUENCY
-#endif
-#ifdef ISSI_SWPULLUP
-# define IS31FL3737_SW_PULLUP ISSI_SWPULLUP
-#endif
-#ifdef ISSI_CSPULLUP
-# define IS31FL3737_CS_PULLDOWN ISSI_CSPULLUP
-#endif
-#ifdef ISSI_GLOBALCURRENT
-# define IS31FL3737_GLOBAL_CURRENT ISSI_GLOBALCURRENT
-#endif
-
-#define is31_led is31fl3737_led_t
-#define g_is31_leds g_is31fl3737_leds
-
-#define PUR_0R IS31FL3737_PUR_0_OHM
-#define PUR_05KR IS31FL3737_PUR_0K5_OHM
-#define PUR_1KR IS31FL3737_PUR_1K_OHM
-#define PUR_2KR IS31FL3737_PUR_2K_OHM
-#define PUR_4KR IS31FL3737_PUR_4K_OHM
-#define PUR_8KR IS31FL3737_PUR_8K_OHM
-#define PUR_16KR IS31FL3737_PUR_16K_OHM
-#define PUR_32KR IS31FL3737_PUR_32K_OHM
-// ========
-
#define IS31FL3737_REG_INTERRUPT_MASK 0xF0
#define IS31FL3737_REG_INTERRUPT_STATUS 0xF1
@@ -314,161 +269,3 @@ void is31fl3737_flush(void);
#define SW12_CS10 0xBB
#define SW12_CS11 0xBC
#define SW12_CS12 0xBD
-
-// DEPRECATED - DO NOT USE
-
-#define A_1 SW1_CS1
-#define A_2 SW1_CS2
-#define A_3 SW1_CS3
-#define A_4 SW1_CS4
-#define A_5 SW1_CS5
-#define A_6 SW1_CS6
-#define A_7 SW1_CS7
-#define A_8 SW1_CS8
-#define A_9 SW1_CS9
-#define A_10 SW1_CS10
-#define A_11 SW1_CS11
-#define A_12 SW1_CS12
-
-#define B_1 SW2_CS1
-#define B_2 SW2_CS2
-#define B_3 SW2_CS3
-#define B_4 SW2_CS4
-#define B_5 SW2_CS5
-#define B_6 SW2_CS6
-#define B_7 SW2_CS7
-#define B_8 SW2_CS8
-#define B_9 SW2_CS9
-#define B_10 SW2_CS10
-#define B_11 SW2_CS11
-#define B_12 SW2_CS12
-
-#define C_1 SW3_CS1
-#define C_2 SW3_CS2
-#define C_3 SW3_CS3
-#define C_4 SW3_CS4
-#define C_5 SW3_CS5
-#define C_6 SW3_CS6
-#define C_7 SW3_CS7
-#define C_8 SW3_CS8
-#define C_9 SW3_CS9
-#define C_10 SW3_CS10
-#define C_11 SW3_CS11
-#define C_12 SW3_CS12
-
-#define D_1 SW4_CS1
-#define D_2 SW4_CS2
-#define D_3 SW4_CS3
-#define D_4 SW4_CS4
-#define D_5 SW4_CS5
-#define D_6 SW4_CS6
-#define D_7 SW4_CS7
-#define D_8 SW4_CS8
-#define D_9 SW4_CS9
-#define D_10 SW4_CS10
-#define D_11 SW4_CS11
-#define D_12 SW4_CS12
-
-#define E_1 SW5_CS1
-#define E_2 SW5_CS2
-#define E_3 SW5_CS3
-#define E_4 SW5_CS4
-#define E_5 SW5_CS5
-#define E_6 SW5_CS6
-#define E_7 SW5_CS7
-#define E_8 SW5_CS8
-#define E_9 SW5_CS9
-#define E_10 SW5_CS10
-#define E_11 SW5_CS11
-#define E_12 SW5_CS12
-
-#define F_1 SW6_CS1
-#define F_2 SW6_CS2
-#define F_3 SW6_CS3
-#define F_4 SW6_CS4
-#define F_5 SW6_CS5
-#define F_6 SW6_CS6
-#define F_7 SW6_CS7
-#define F_8 SW6_CS8
-#define F_9 SW6_CS9
-#define F_10 SW6_CS10
-#define F_11 SW6_CS11
-#define F_12 SW6_CS12
-
-#define G_1 SW7_CS1
-#define G_2 SW7_CS2
-#define G_3 SW7_CS3
-#define G_4 SW7_CS4
-#define G_5 SW7_CS5
-#define G_6 SW7_CS6
-#define G_7 SW7_CS7
-#define G_8 SW7_CS8
-#define G_9 SW7_CS9
-#define G_10 SW7_CS10
-#define G_11 SW7_CS11
-#define G_12 SW7_CS12
-
-#define H_1 SW8_CS1
-#define H_2 SW8_CS2
-#define H_3 SW8_CS3
-#define H_4 SW8_CS4
-#define H_5 SW8_CS5
-#define H_6 SW8_CS6
-#define H_7 SW8_CS7
-#define H_8 SW8_CS8
-#define H_9 SW8_CS9
-#define H_10 SW8_CS10
-#define H_11 SW8_CS11
-#define H_12 SW8_CS12
-
-#define I_1 SW9_CS1
-#define I_2 SW9_CS2
-#define I_3 SW9_CS3
-#define I_4 SW9_CS4
-#define I_5 SW9_CS5
-#define I_6 SW9_CS6
-#define I_7 SW9_CS7
-#define I_8 SW9_CS8
-#define I_9 SW9_CS9
-#define I_10 SW9_CS10
-#define I_11 SW9_CS11
-#define I_12 SW9_CS12
-
-#define J_1 SW10_CS1
-#define J_2 SW10_CS2
-#define J_3 SW10_CS3
-#define J_4 SW10_CS4
-#define J_5 SW10_CS5
-#define J_6 SW10_CS6
-#define J_7 SW10_CS7
-#define J_8 SW10_CS8
-#define J_9 SW10_CS9
-#define J_10 SW10_CS10
-#define J_11 SW10_CS11
-#define J_12 SW10_CS12
-
-#define K_1 SW11_CS1
-#define K_2 SW11_CS2
-#define K_3 SW11_CS3
-#define K_4 SW11_CS4
-#define K_5 SW11_CS5
-#define K_6 SW11_CS6
-#define K_7 SW11_CS7
-#define K_8 SW11_CS8
-#define K_9 SW11_CS9
-#define K_10 SW11_CS10
-#define K_11 SW11_CS11
-#define K_12 SW11_CS12
-
-#define L_1 SW12_CS1
-#define L_2 SW12_CS2
-#define L_3 SW12_CS3
-#define L_4 SW12_CS4
-#define L_5 SW12_CS5
-#define L_6 SW12_CS6
-#define L_7 SW12_CS7
-#define L_8 SW12_CS8
-#define L_9 SW12_CS9
-#define L_10 SW12_CS10
-#define L_11 SW12_CS11
-#define L_12 SW12_CS12
diff --git a/drivers/led/issi/is31fl3741-mono.h b/drivers/led/issi/is31fl3741-mono.h
index 6d4f70b1b3..d8797bda32 100644
--- a/drivers/led/issi/is31fl3741-mono.h
+++ b/drivers/led/issi/is31fl3741-mono.h
@@ -24,36 +24,6 @@
#include "progmem.h"
#include "util.h"
-// ======== DEPRECATED DEFINES - DO NOT USE ========
-#ifdef ISSI_TIMEOUT
-# define IS31FL3741_I2C_TIMEOUT ISSI_TIMEOUT
-#endif
-#ifdef ISSI_PERSISTENCE
-# define IS31FL3741_I2C_PERSISTENCE ISSI_PERSISTENCE
-#endif
-#ifdef ISSI_CONFIGURATION
-# define IS31FL3741_CONFIGURATION ISSI_CONFIGURATION
-#endif
-#ifdef ISSI_SWPULLUP
-# define IS31FL3741_SW_PULLUP ISSI_SWPULLUP
-#endif
-#ifdef ISSI_CSPULLUP
-# define IS31FL3741_CS_PULLDOWN ISSI_CSPULLUP
-#endif
-#ifdef ISSI_GLOBALCURRENT
-# define IS31FL3741_GLOBAL_CURRENT ISSI_GLOBALCURRENT
-#endif
-
-#define PUR_0R IS31FL3741_PUR_0_OHM
-#define PUR_05KR IS31FL3741_PUR_0K5_OHM
-#define PUR_1KR IS31FL3741_PUR_1K_OHM
-#define PUR_2KR IS31FL3741_PUR_2K_OHM
-#define PUR_4KR IS31FL3741_PUR_4K_OHM
-#define PUR_8KR IS31FL3741_PUR_8K_OHM
-#define PUR_16KR IS31FL3741_PUR_16K_OHM
-#define PUR_32KR IS31FL3741_PUR_32K_OHM
-// ========
-
#define IS31FL3741_REG_INTERRUPT_MASK 0xF0
#define IS31FL3741_REG_INTERRUPT_STATUS 0xF1
#define IS31FL3741_REG_ID 0xFC
@@ -514,374 +484,3 @@ void is31fl3741_flush(void);
#define SW9_CS37 0x1A8
#define SW9_CS38 0x1A9
#define SW9_CS39 0x1AA
-
-// DEPRECATED - DO NOT USE
-
-#define CS1_SW1 SW1_CS1
-#define CS2_SW1 SW1_CS2
-#define CS3_SW1 SW1_CS3
-#define CS4_SW1 SW1_CS4
-#define CS5_SW1 SW1_CS5
-#define CS6_SW1 SW1_CS6
-#define CS7_SW1 SW1_CS7
-#define CS8_SW1 SW1_CS8
-#define CS9_SW1 SW1_CS9
-#define CS10_SW1 SW1_CS10
-#define CS11_SW1 SW1_CS11
-#define CS12_SW1 SW1_CS12
-#define CS13_SW1 SW1_CS13
-#define CS14_SW1 SW1_CS14
-#define CS15_SW1 SW1_CS15
-#define CS16_SW1 SW1_CS16
-#define CS17_SW1 SW1_CS17
-#define CS18_SW1 SW1_CS18
-#define CS19_SW1 SW1_CS19
-#define CS20_SW1 SW1_CS20
-#define CS21_SW1 SW1_CS21
-#define CS22_SW1 SW1_CS22
-#define CS23_SW1 SW1_CS23
-#define CS24_SW1 SW1_CS24
-#define CS25_SW1 SW1_CS25
-#define CS26_SW1 SW1_CS26
-#define CS27_SW1 SW1_CS27
-#define CS28_SW1 SW1_CS28
-#define CS29_SW1 SW1_CS29
-#define CS30_SW1 SW1_CS30
-
-#define CS1_SW2 SW2_CS1
-#define CS2_SW2 SW2_CS2
-#define CS3_SW2 SW2_CS3
-#define CS4_SW2 SW2_CS4
-#define CS5_SW2 SW2_CS5
-#define CS6_SW2 SW2_CS6
-#define CS7_SW2 SW2_CS7
-#define CS8_SW2 SW2_CS8
-#define CS9_SW2 SW2_CS9
-#define CS10_SW2 SW2_CS10
-#define CS11_SW2 SW2_CS11
-#define CS12_SW2 SW2_CS12
-#define CS13_SW2 SW2_CS13
-#define CS14_SW2 SW2_CS14
-#define CS15_SW2 SW2_CS15
-#define CS16_SW2 SW2_CS16
-#define CS17_SW2 SW2_CS17
-#define CS18_SW2 SW2_CS18
-#define CS19_SW2 SW2_CS19
-#define CS20_SW2 SW2_CS20
-#define CS21_SW2 SW2_CS21
-#define CS22_SW2 SW2_CS22
-#define CS23_SW2 SW2_CS23
-#define CS24_SW2 SW2_CS24
-#define CS25_SW2 SW2_CS25
-#define CS26_SW2 SW2_CS26
-#define CS27_SW2 SW2_CS27
-#define CS28_SW2 SW2_CS28
-#define CS29_SW2 SW2_CS29
-#define CS30_SW2 SW2_CS30
-
-#define CS1_SW3 SW3_CS1
-#define CS2_SW3 SW3_CS2
-#define CS3_SW3 SW3_CS3
-#define CS4_SW3 SW3_CS4
-#define CS5_SW3 SW3_CS5
-#define CS6_SW3 SW3_CS6
-#define CS7_SW3 SW3_CS7
-#define CS8_SW3 SW3_CS8
-#define CS9_SW3 SW3_CS9
-#define CS10_SW3 SW3_CS10
-#define CS11_SW3 SW3_CS11
-#define CS12_SW3 SW3_CS12
-#define CS13_SW3 SW3_CS13
-#define CS14_SW3 SW3_CS14
-#define CS15_SW3 SW3_CS15
-#define CS16_SW3 SW3_CS16
-#define CS17_SW3 SW3_CS17
-#define CS18_SW3 SW3_CS18
-#define CS19_SW3 SW3_CS19
-#define CS20_SW3 SW3_CS20
-#define CS21_SW3 SW3_CS21
-#define CS22_SW3 SW3_CS22
-#define CS23_SW3 SW3_CS23
-#define CS24_SW3 SW3_CS24
-#define CS25_SW3 SW3_CS25
-#define CS26_SW3 SW3_CS26
-#define CS27_SW3 SW3_CS27
-#define CS28_SW3 SW3_CS28
-#define CS29_SW3 SW3_CS29
-#define CS30_SW3 SW3_CS30
-
-#define CS1_SW4 SW4_CS1
-#define CS2_SW4 SW4_CS2
-#define CS3_SW4 SW4_CS3
-#define CS4_SW4 SW4_CS4
-#define CS5_SW4 SW4_CS5
-#define CS6_SW4 SW4_CS6
-#define CS7_SW4 SW4_CS7
-#define CS8_SW4 SW4_CS8
-#define CS9_SW4 SW4_CS9
-#define CS10_SW4 SW4_CS10
-#define CS11_SW4 SW4_CS11
-#define CS12_SW4 SW4_CS12
-#define CS13_SW4 SW4_CS13
-#define CS14_SW4 SW4_CS14
-#define CS15_SW4 SW4_CS15
-#define CS16_SW4 SW4_CS16
-#define CS17_SW4 SW4_CS17
-#define CS18_SW4 SW4_CS18
-#define CS19_SW4 SW4_CS19
-#define CS20_SW4 SW4_CS20
-#define CS21_SW4 SW4_CS21
-#define CS22_SW4 SW4_CS22
-#define CS23_SW4 SW4_CS23
-#define CS24_SW4 SW4_CS24
-#define CS25_SW4 SW4_CS25
-#define CS26_SW4 SW4_CS26
-#define CS27_SW4 SW4_CS27
-#define CS28_SW4 SW4_CS28
-#define CS29_SW4 SW4_CS29
-#define CS30_SW4 SW4_CS30
-
-#define CS1_SW5 SW5_CS1
-#define CS2_SW5 SW5_CS2
-#define CS3_SW5 SW5_CS3
-#define CS4_SW5 SW5_CS4
-#define CS5_SW5 SW5_CS5
-#define CS6_SW5 SW5_CS6
-#define CS7_SW5 SW5_CS7
-#define CS8_SW5 SW5_CS8
-#define CS9_SW5 SW5_CS9
-#define CS10_SW5 SW5_CS10
-#define CS11_SW5 SW5_CS11
-#define CS12_SW5 SW5_CS12
-#define CS13_SW5 SW5_CS13
-#define CS14_SW5 SW5_CS14
-#define CS15_SW5 SW5_CS15
-#define CS16_SW5 SW5_CS16
-#define CS17_SW5 SW5_CS17
-#define CS18_SW5 SW5_CS18
-#define CS19_SW5 SW5_CS19
-#define CS20_SW5 SW5_CS20
-#define CS21_SW5 SW5_CS21
-#define CS22_SW5 SW5_CS22
-#define CS23_SW5 SW5_CS23
-#define CS24_SW5 SW5_CS24
-#define CS25_SW5 SW5_CS25
-#define CS26_SW5 SW5_CS26
-#define CS27_SW5 SW5_CS27
-#define CS28_SW5 SW5_CS28
-#define CS29_SW5 SW5_CS29
-#define CS30_SW5 SW5_CS30
-
-#define CS1_SW6 SW6_CS1
-#define CS2_SW6 SW6_CS2
-#define CS3_SW6 SW6_CS3
-#define CS4_SW6 SW6_CS4
-#define CS5_SW6 SW6_CS5
-#define CS6_SW6 SW6_CS6
-#define CS7_SW6 SW6_CS7
-#define CS8_SW6 SW6_CS8
-#define CS9_SW6 SW6_CS9
-#define CS10_SW6 SW6_CS10
-#define CS11_SW6 SW6_CS11
-#define CS12_SW6 SW6_CS12
-#define CS13_SW6 SW6_CS13
-#define CS14_SW6 SW6_CS14
-#define CS15_SW6 SW6_CS15
-#define CS16_SW6 SW6_CS16
-#define CS17_SW6 SW6_CS17
-#define CS18_SW6 SW6_CS18
-#define CS19_SW6 SW6_CS19
-#define CS20_SW6 SW6_CS20
-#define CS21_SW6 SW6_CS21
-#define CS22_SW6 SW6_CS22
-#define CS23_SW6 SW6_CS23
-#define CS24_SW6 SW6_CS24
-#define CS25_SW6 SW6_CS25
-#define CS26_SW6 SW6_CS26
-#define CS27_SW6 SW6_CS27
-#define CS28_SW6 SW6_CS28
-#define CS29_SW6 SW6_CS29
-#define CS30_SW6 SW6_CS30
-
-#define CS1_SW7 SW7_CS1
-#define CS2_SW7 SW7_CS2
-#define CS3_SW7 SW7_CS3
-#define CS4_SW7 SW7_CS4
-#define CS5_SW7 SW7_CS5
-#define CS6_SW7 SW7_CS6
-#define CS7_SW7 SW7_CS7
-#define CS8_SW7 SW7_CS8
-#define CS9_SW7 SW7_CS9
-#define CS10_SW7 SW7_CS10
-#define CS11_SW7 SW7_CS11
-#define CS12_SW7 SW7_CS12
-#define CS13_SW7 SW7_CS13
-#define CS14_SW7 SW7_CS14
-#define CS15_SW7 SW7_CS15
-#define CS16_SW7 SW7_CS16
-#define CS17_SW7 SW7_CS17
-#define CS18_SW7 SW7_CS18
-#define CS19_SW7 SW7_CS19
-#define CS20_SW7 SW7_CS20
-#define CS21_SW7 SW7_CS21
-#define CS22_SW7 SW7_CS22
-#define CS23_SW7 SW7_CS23
-#define CS24_SW7 SW7_CS24
-#define CS25_SW7 SW7_CS25
-#define CS26_SW7 SW7_CS26
-#define CS27_SW7 SW7_CS27
-#define CS28_SW7 SW7_CS28
-#define CS29_SW7 SW7_CS29
-#define CS30_SW7 SW7_CS30
-
-#define CS1_SW8 SW8_CS1
-#define CS2_SW8 SW8_CS2
-#define CS3_SW8 SW8_CS3
-#define CS4_SW8 SW8_CS4
-#define CS5_SW8 SW8_CS5
-#define CS6_SW8 SW8_CS6
-#define CS7_SW8 SW8_CS7
-#define CS8_SW8 SW8_CS8
-#define CS9_SW8 SW8_CS9
-#define CS10_SW8 SW8_CS10
-#define CS11_SW8 SW8_CS11
-#define CS12_SW8 SW8_CS12
-#define CS13_SW8 SW8_CS13
-#define CS14_SW8 SW8_CS14
-#define CS15_SW8 SW8_CS15
-#define CS16_SW8 SW8_CS16
-#define CS17_SW8 SW8_CS17
-#define CS18_SW8 SW8_CS18
-#define CS19_SW8 SW8_CS19
-#define CS20_SW8 SW8_CS20
-#define CS21_SW8 SW8_CS21
-#define CS22_SW8 SW8_CS22
-#define CS23_SW8 SW8_CS23
-#define CS24_SW8 SW8_CS24
-#define CS25_SW8 SW8_CS25
-#define CS26_SW8 SW8_CS26
-#define CS27_SW8 SW8_CS27
-#define CS28_SW8 SW8_CS28
-#define CS29_SW8 SW8_CS29
-#define CS30_SW8 SW8_CS30
-
-#define CS1_SW9 SW9_CS1
-#define CS2_SW9 SW9_CS2
-#define CS3_SW9 SW9_CS3
-#define CS4_SW9 SW9_CS4
-#define CS5_SW9 SW9_CS5
-#define CS6_SW9 SW9_CS6
-#define CS7_SW9 SW9_CS7
-#define CS8_SW9 SW9_CS8
-#define CS9_SW9 SW9_CS9
-#define CS10_SW9 SW9_CS10
-#define CS11_SW9 SW9_CS11
-#define CS12_SW9 SW9_CS12
-#define CS13_SW9 SW9_CS13
-#define CS14_SW9 SW9_CS14
-#define CS15_SW9 SW9_CS15
-#define CS16_SW9 SW9_CS16
-#define CS17_SW9 SW9_CS17
-#define CS18_SW9 SW9_CS18
-#define CS19_SW9 SW9_CS19
-#define CS20_SW9 SW9_CS20
-#define CS21_SW9 SW9_CS21
-#define CS22_SW9 SW9_CS22
-#define CS23_SW9 SW9_CS23
-#define CS24_SW9 SW9_CS24
-#define CS25_SW9 SW9_CS25
-#define CS26_SW9 SW9_CS26
-#define CS27_SW9 SW9_CS27
-#define CS28_SW9 SW9_CS28
-#define CS29_SW9 SW9_CS29
-#define CS30_SW9 SW9_CS30
-
-#define CS31_SW1 SW1_CS31
-#define CS32_SW1 SW1_CS32
-#define CS33_SW1 SW1_CS33
-#define CS34_SW1 SW1_CS34
-#define CS35_SW1 SW1_CS35
-#define CS36_SW1 SW1_CS36
-#define CS37_SW1 SW1_CS37
-#define CS38_SW1 SW1_CS38
-#define CS39_SW1 SW1_CS39
-
-#define CS31_SW2 SW2_CS31
-#define CS32_SW2 SW2_CS32
-#define CS33_SW2 SW2_CS33
-#define CS34_SW2 SW2_CS34
-#define CS35_SW2 SW2_CS35
-#define CS36_SW2 SW2_CS36
-#define CS37_SW2 SW2_CS37
-#define CS38_SW2 SW2_CS38
-#define CS39_SW2 SW2_CS39
-
-#define CS31_SW3 SW3_CS31
-#define CS32_SW3 SW3_CS32
-#define CS33_SW3 SW3_CS33
-#define CS34_SW3 SW3_CS34
-#define CS35_SW3 SW3_CS35
-#define CS36_SW3 SW3_CS36
-#define CS37_SW3 SW3_CS37
-#define CS38_SW3 SW3_CS38
-#define CS39_SW3 SW3_CS39
-
-#define CS31_SW4 SW4_CS31
-#define CS32_SW4 SW4_CS32
-#define CS33_SW4 SW4_CS33
-#define CS34_SW4 SW4_CS34
-#define CS35_SW4 SW4_CS35
-#define CS36_SW4 SW4_CS36
-#define CS37_SW4 SW4_CS37
-#define CS38_SW4 SW4_CS38
-#define CS39_SW4 SW4_CS39
-
-#define CS31_SW5 SW5_CS31
-#define CS32_SW5 SW5_CS32
-#define CS33_SW5 SW5_CS33
-#define CS34_SW5 SW5_CS34
-#define CS35_SW5 SW5_CS35
-#define CS36_SW5 SW5_CS36
-#define CS37_SW5 SW5_CS37
-#define CS38_SW5 SW5_CS38
-#define CS39_SW5 SW5_CS39
-
-#define CS31_SW6 SW6_CS31
-#define CS32_SW6 SW6_CS32
-#define CS33_SW6 SW6_CS33
-#define CS34_SW6 SW6_CS34
-#define CS35_SW6 SW6_CS35
-#define CS36_SW6 SW6_CS36
-#define CS37_SW6 SW6_CS37
-#define CS38_SW6 SW6_CS38
-#define CS39_SW6 SW6_CS39
-
-#define CS31_SW7 SW7_CS31
-#define CS32_SW7 SW7_CS32
-#define CS33_SW7 SW7_CS33
-#define CS34_SW7 SW7_CS34
-#define CS35_SW7 SW7_CS35
-#define CS36_SW7 SW7_CS36
-#define CS37_SW7 SW7_CS37
-#define CS38_SW7 SW7_CS38
-#define CS39_SW7 SW7_CS39
-
-#define CS31_SW8 SW8_CS31
-#define CS32_SW8 SW8_CS32
-#define CS33_SW8 SW8_CS33
-#define CS34_SW8 SW8_CS34
-#define CS35_SW8 SW8_CS35
-#define CS36_SW8 SW8_CS36
-#define CS37_SW8 SW8_CS37
-#define CS38_SW8 SW8_CS38
-#define CS39_SW8 SW8_CS39
-
-#define CS31_SW9 SW9_CS31
-#define CS32_SW9 SW9_CS32
-#define CS33_SW9 SW9_CS33
-#define CS34_SW9 SW9_CS34
-#define CS35_SW9 SW9_CS35
-#define CS36_SW9 SW9_CS36
-#define CS37_SW9 SW9_CS37
-#define CS38_SW9 SW9_CS38
-#define CS39_SW9 SW9_CS39
diff --git a/drivers/led/issi/is31fl3741.h b/drivers/led/issi/is31fl3741.h
index cc9637a4e8..343dffe068 100644
--- a/drivers/led/issi/is31fl3741.h
+++ b/drivers/led/issi/is31fl3741.h
@@ -24,51 +24,6 @@
#include "progmem.h"
#include "util.h"
-// ======== DEPRECATED DEFINES - DO NOT USE ========
-#ifdef DRIVER_ADDR_1
-# define IS31FL3741_I2C_ADDRESS_1 DRIVER_ADDR_1
-#endif
-#ifdef DRIVER_ADDR_2
-# define IS31FL3741_I2C_ADDRESS_2 DRIVER_ADDR_2
-#endif
-#ifdef DRIVER_ADDR_3
-# define IS31FL3741_I2C_ADDRESS_3 DRIVER_ADDR_3
-#endif
-#ifdef DRIVER_ADDR_4
-# define IS31FL3741_I2C_ADDRESS_4 DRIVER_ADDR_4
-#endif
-#ifdef ISSI_TIMEOUT
-# define IS31FL3741_I2C_TIMEOUT ISSI_TIMEOUT
-#endif
-#ifdef ISSI_PERSISTENCE
-# define IS31FL3741_I2C_PERSISTENCE ISSI_PERSISTENCE
-#endif
-#ifdef ISSI_CONFIGURATION
-# define IS31FL3741_CONFIGURATION ISSI_CONFIGURATION
-#endif
-#ifdef ISSI_SWPULLUP
-# define IS31FL3741_SW_PULLUP ISSI_SWPULLUP
-#endif
-#ifdef ISSI_CSPULLUP
-# define IS31FL3741_CS_PULLDOWN ISSI_CSPULLUP
-#endif
-#ifdef ISSI_GLOBALCURRENT
-# define IS31FL3741_GLOBAL_CURRENT ISSI_GLOBALCURRENT
-#endif
-
-#define is31_led is31fl3741_led_t
-#define g_is31_leds g_is31fl3741_leds
-
-#define PUR_0R IS31FL3741_PUR_0_OHM
-#define PUR_05KR IS31FL3741_PUR_0K5_OHM
-#define PUR_1KR IS31FL3741_PUR_1K_OHM
-#define PUR_2KR IS31FL3741_PUR_2K_OHM
-#define PUR_4KR IS31FL3741_PUR_4K_OHM
-#define PUR_8KR IS31FL3741_PUR_8K_OHM
-#define PUR_16KR IS31FL3741_PUR_16K_OHM
-#define PUR_32KR IS31FL3741_PUR_32K_OHM
-// ========
-
#define IS31FL3741_REG_INTERRUPT_MASK 0xF0
#define IS31FL3741_REG_INTERRUPT_STATUS 0xF1
#define IS31FL3741_REG_ID 0xFC
@@ -531,374 +486,3 @@ void is31fl3741_flush(void);
#define SW9_CS37 0x1A8
#define SW9_CS38 0x1A9
#define SW9_CS39 0x1AA
-
-// DEPRECATED - DO NOT USE
-
-#define CS1_SW1 SW1_CS1
-#define CS2_SW1 SW1_CS2
-#define CS3_SW1 SW1_CS3
-#define CS4_SW1 SW1_CS4
-#define CS5_SW1 SW1_CS5
-#define CS6_SW1 SW1_CS6
-#define CS7_SW1 SW1_CS7
-#define CS8_SW1 SW1_CS8
-#define CS9_SW1 SW1_CS9
-#define CS10_SW1 SW1_CS10
-#define CS11_SW1 SW1_CS11
-#define CS12_SW1 SW1_CS12
-#define CS13_SW1 SW1_CS13
-#define CS14_SW1 SW1_CS14
-#define CS15_SW1 SW1_CS15
-#define CS16_SW1 SW1_CS16
-#define CS17_SW1 SW1_CS17
-#define CS18_SW1 SW1_CS18
-#define CS19_SW1 SW1_CS19
-#define CS20_SW1 SW1_CS20
-#define CS21_SW1 SW1_CS21
-#define CS22_SW1 SW1_CS22
-#define CS23_SW1 SW1_CS23
-#define CS24_SW1 SW1_CS24
-#define CS25_SW1 SW1_CS25
-#define CS26_SW1 SW1_CS26
-#define CS27_SW1 SW1_CS27
-#define CS28_SW1 SW1_CS28
-#define CS29_SW1 SW1_CS29
-#define CS30_SW1 SW1_CS30
-
-#define CS1_SW2 SW2_CS1
-#define CS2_SW2 SW2_CS2
-#define CS3_SW2 SW2_CS3
-#define CS4_SW2 SW2_CS4
-#define CS5_SW2 SW2_CS5
-#define CS6_SW2 SW2_CS6
-#define CS7_SW2 SW2_CS7
-#define CS8_SW2 SW2_CS8
-#define CS9_SW2 SW2_CS9
-#define CS10_SW2 SW2_CS10
-#define CS11_SW2 SW2_CS11
-#define CS12_SW2 SW2_CS12
-#define CS13_SW2 SW2_CS13
-#define CS14_SW2 SW2_CS14
-#define CS15_SW2 SW2_CS15
-#define CS16_SW2 SW2_CS16
-#define CS17_SW2 SW2_CS17
-#define CS18_SW2 SW2_CS18
-#define CS19_SW2 SW2_CS19
-#define CS20_SW2 SW2_CS20
-#define CS21_SW2 SW2_CS21
-#define CS22_SW2 SW2_CS22
-#define CS23_SW2 SW2_CS23
-#define CS24_SW2 SW2_CS24
-#define CS25_SW2 SW2_CS25
-#define CS26_SW2 SW2_CS26
-#define CS27_SW2 SW2_CS27
-#define CS28_SW2 SW2_CS28
-#define CS29_SW2 SW2_CS29
-#define CS30_SW2 SW2_CS30
-
-#define CS1_SW3 SW3_CS1
-#define CS2_SW3 SW3_CS2
-#define CS3_SW3 SW3_CS3
-#define CS4_SW3 SW3_CS4
-#define CS5_SW3 SW3_CS5
-#define CS6_SW3 SW3_CS6
-#define CS7_SW3 SW3_CS7
-#define CS8_SW3 SW3_CS8
-#define CS9_SW3 SW3_CS9
-#define CS10_SW3 SW3_CS10
-#define CS11_SW3 SW3_CS11
-#define CS12_SW3 SW3_CS12
-#define CS13_SW3 SW3_CS13
-#define CS14_SW3 SW3_CS14
-#define CS15_SW3 SW3_CS15
-#define CS16_SW3 SW3_CS16
-#define CS17_SW3 SW3_CS17
-#define CS18_SW3 SW3_CS18
-#define CS19_SW3 SW3_CS19
-#define CS20_SW3 SW3_CS20
-#define CS21_SW3 SW3_CS21
-#define CS22_SW3 SW3_CS22
-#define CS23_SW3 SW3_CS23
-#define CS24_SW3 SW3_CS24
-#define CS25_SW3 SW3_CS25
-#define CS26_SW3 SW3_CS26
-#define CS27_SW3 SW3_CS27
-#define CS28_SW3 SW3_CS28
-#define CS29_SW3 SW3_CS29
-#define CS30_SW3 SW3_CS30
-
-#define CS1_SW4 SW4_CS1
-#define CS2_SW4 SW4_CS2
-#define CS3_SW4 SW4_CS3
-#define CS4_SW4 SW4_CS4
-#define CS5_SW4 SW4_CS5
-#define CS6_SW4 SW4_CS6
-#define CS7_SW4 SW4_CS7
-#define CS8_SW4 SW4_CS8
-#define CS9_SW4 SW4_CS9
-#define CS10_SW4 SW4_CS10
-#define CS11_SW4 SW4_CS11
-#define CS12_SW4 SW4_CS12
-#define CS13_SW4 SW4_CS13
-#define CS14_SW4 SW4_CS14
-#define CS15_SW4 SW4_CS15
-#define CS16_SW4 SW4_CS16
-#define CS17_SW4 SW4_CS17
-#define CS18_SW4 SW4_CS18
-#define CS19_SW4 SW4_CS19
-#define CS20_SW4 SW4_CS20
-#define CS21_SW4 SW4_CS21
-#define CS22_SW4 SW4_CS22
-#define CS23_SW4 SW4_CS23
-#define CS24_SW4 SW4_CS24
-#define CS25_SW4 SW4_CS25
-#define CS26_SW4 SW4_CS26
-#define CS27_SW4 SW4_CS27
-#define CS28_SW4 SW4_CS28
-#define CS29_SW4 SW4_CS29
-#define CS30_SW4 SW4_CS30
-
-#define CS1_SW5 SW5_CS1
-#define CS2_SW5 SW5_CS2
-#define CS3_SW5 SW5_CS3
-#define CS4_SW5 SW5_CS4
-#define CS5_SW5 SW5_CS5
-#define CS6_SW5 SW5_CS6
-#define CS7_SW5 SW5_CS7
-#define CS8_SW5 SW5_CS8
-#define CS9_SW5 SW5_CS9
-#define CS10_SW5 SW5_CS10
-#define CS11_SW5 SW5_CS11
-#define CS12_SW5 SW5_CS12
-#define CS13_SW5 SW5_CS13
-#define CS14_SW5 SW5_CS14
-#define CS15_SW5 SW5_CS15
-#define CS16_SW5 SW5_CS16
-#define CS17_SW5 SW5_CS17
-#define CS18_SW5 SW5_CS18
-#define CS19_SW5 SW5_CS19
-#define CS20_SW5 SW5_CS20
-#define CS21_SW5 SW5_CS21
-#define CS22_SW5 SW5_CS22
-#define CS23_SW5 SW5_CS23
-#define CS24_SW5 SW5_CS24
-#define CS25_SW5 SW5_CS25
-#define CS26_SW5 SW5_CS26
-#define CS27_SW5 SW5_CS27
-#define CS28_SW5 SW5_CS28
-#define CS29_SW5 SW5_CS29
-#define CS30_SW5 SW5_CS30
-
-#define CS1_SW6 SW6_CS1
-#define CS2_SW6 SW6_CS2
-#define CS3_SW6 SW6_CS3
-#define CS4_SW6 SW6_CS4
-#define CS5_SW6 SW6_CS5
-#define CS6_SW6 SW6_CS6
-#define CS7_SW6 SW6_CS7
-#define CS8_SW6 SW6_CS8
-#define CS9_SW6 SW6_CS9
-#define CS10_SW6 SW6_CS10
-#define CS11_SW6 SW6_CS11
-#define CS12_SW6 SW6_CS12
-#define CS13_SW6 SW6_CS13
-#define CS14_SW6 SW6_CS14
-#define CS15_SW6 SW6_CS15
-#define CS16_SW6 SW6_CS16
-#define CS17_SW6 SW6_CS17
-#define CS18_SW6 SW6_CS18
-#define CS19_SW6 SW6_CS19
-#define CS20_SW6 SW6_CS20
-#define CS21_SW6 SW6_CS21
-#define CS22_SW6 SW6_CS22
-#define CS23_SW6 SW6_CS23
-#define CS24_SW6 SW6_CS24
-#define CS25_SW6 SW6_CS25
-#define CS26_SW6 SW6_CS26
-#define CS27_SW6 SW6_CS27
-#define CS28_SW6 SW6_CS28
-#define CS29_SW6 SW6_CS29
-#define CS30_SW6 SW6_CS30
-
-#define CS1_SW7 SW7_CS1
-#define CS2_SW7 SW7_CS2
-#define CS3_SW7 SW7_CS3
-#define CS4_SW7 SW7_CS4
-#define CS5_SW7 SW7_CS5
-#define CS6_SW7 SW7_CS6
-#define CS7_SW7 SW7_CS7
-#define CS8_SW7 SW7_CS8
-#define CS9_SW7 SW7_CS9
-#define CS10_SW7 SW7_CS10
-#define CS11_SW7 SW7_CS11
-#define CS12_SW7 SW7_CS12
-#define CS13_SW7 SW7_CS13
-#define CS14_SW7 SW7_CS14
-#define CS15_SW7 SW7_CS15
-#define CS16_SW7 SW7_CS16
-#define CS17_SW7 SW7_CS17
-#define CS18_SW7 SW7_CS18
-#define CS19_SW7 SW7_CS19
-#define CS20_SW7 SW7_CS20
-#define CS21_SW7 SW7_CS21
-#define CS22_SW7 SW7_CS22
-#define CS23_SW7 SW7_CS23
-#define CS24_SW7 SW7_CS24
-#define CS25_SW7 SW7_CS25
-#define CS26_SW7 SW7_CS26
-#define CS27_SW7 SW7_CS27
-#define CS28_SW7 SW7_CS28
-#define CS29_SW7 SW7_CS29
-#define CS30_SW7 SW7_CS30
-
-#define CS1_SW8 SW8_CS1
-#define CS2_SW8 SW8_CS2
-#define CS3_SW8 SW8_CS3
-#define CS4_SW8 SW8_CS4
-#define CS5_SW8 SW8_CS5
-#define CS6_SW8 SW8_CS6
-#define CS7_SW8 SW8_CS7
-#define CS8_SW8 SW8_CS8
-#define CS9_SW8 SW8_CS9
-#define CS10_SW8 SW8_CS10
-#define CS11_SW8 SW8_CS11
-#define CS12_SW8 SW8_CS12
-#define CS13_SW8 SW8_CS13
-#define CS14_SW8 SW8_CS14
-#define CS15_SW8 SW8_CS15
-#define CS16_SW8 SW8_CS16
-#define CS17_SW8 SW8_CS17
-#define CS18_SW8 SW8_CS18
-#define CS19_SW8 SW8_CS19
-#define CS20_SW8 SW8_CS20
-#define CS21_SW8 SW8_CS21
-#define CS22_SW8 SW8_CS22
-#define CS23_SW8 SW8_CS23
-#define CS24_SW8 SW8_CS24
-#define CS25_SW8 SW8_CS25
-#define CS26_SW8 SW8_CS26
-#define CS27_SW8 SW8_CS27
-#define CS28_SW8 SW8_CS28
-#define CS29_SW8 SW8_CS29
-#define CS30_SW8 SW8_CS30
-
-#define CS1_SW9 SW9_CS1
-#define CS2_SW9 SW9_CS2
-#define CS3_SW9 SW9_CS3
-#define CS4_SW9 SW9_CS4
-#define CS5_SW9 SW9_CS5
-#define CS6_SW9 SW9_CS6
-#define CS7_SW9 SW9_CS7
-#define CS8_SW9 SW9_CS8
-#define CS9_SW9 SW9_CS9
-#define CS10_SW9 SW9_CS10
-#define CS11_SW9 SW9_CS11
-#define CS12_SW9 SW9_CS12
-#define CS13_SW9 SW9_CS13
-#define CS14_SW9 SW9_CS14
-#define CS15_SW9 SW9_CS15
-#define CS16_SW9 SW9_CS16
-#define CS17_SW9 SW9_CS17
-#define CS18_SW9 SW9_CS18
-#define CS19_SW9 SW9_CS19
-#define CS20_SW9 SW9_CS20
-#define CS21_SW9 SW9_CS21
-#define CS22_SW9 SW9_CS22
-#define CS23_SW9 SW9_CS23
-#define CS24_SW9 SW9_CS24
-#define CS25_SW9 SW9_CS25
-#define CS26_SW9 SW9_CS26
-#define CS27_SW9 SW9_CS27
-#define CS28_SW9 SW9_CS28
-#define CS29_SW9 SW9_CS29
-#define CS30_SW9 SW9_CS30
-
-#define CS31_SW1 SW1_CS31
-#define CS32_SW1 SW1_CS32
-#define CS33_SW1 SW1_CS33
-#define CS34_SW1 SW1_CS34
-#define CS35_SW1 SW1_CS35
-#define CS36_SW1 SW1_CS36
-#define CS37_SW1 SW1_CS37
-#define CS38_SW1 SW1_CS38
-#define CS39_SW1 SW1_CS39
-
-#define CS31_SW2 SW2_CS31
-#define CS32_SW2 SW2_CS32
-#define CS33_SW2 SW2_CS33
-#define CS34_SW2 SW2_CS34
-#define CS35_SW2 SW2_CS35
-#define CS36_SW2 SW2_CS36
-#define CS37_SW2 SW2_CS37
-#define CS38_SW2 SW2_CS38
-#define CS39_SW2 SW2_CS39
-
-#define CS31_SW3 SW3_CS31
-#define CS32_SW3 SW3_CS32
-#define CS33_SW3 SW3_CS33
-#define CS34_SW3 SW3_CS34
-#define CS35_SW3 SW3_CS35
-#define CS36_SW3 SW3_CS36
-#define CS37_SW3 SW3_CS37
-#define CS38_SW3 SW3_CS38
-#define CS39_SW3 SW3_CS39
-
-#define CS31_SW4 SW4_CS31
-#define CS32_SW4 SW4_CS32
-#define CS33_SW4 SW4_CS33
-#define CS34_SW4 SW4_CS34
-#define CS35_SW4 SW4_CS35
-#define CS36_SW4 SW4_CS36
-#define CS37_SW4 SW4_CS37
-#define CS38_SW4 SW4_CS38
-#define CS39_SW4 SW4_CS39
-
-#define CS31_SW5 SW5_CS31
-#define CS32_SW5 SW5_CS32
-#define CS33_SW5 SW5_CS33
-#define CS34_SW5 SW5_CS34
-#define CS35_SW5 SW5_CS35
-#define CS36_SW5 SW5_CS36
-#define CS37_SW5 SW5_CS37
-#define CS38_SW5 SW5_CS38
-#define CS39_SW5 SW5_CS39
-
-#define CS31_SW6 SW6_CS31
-#define CS32_SW6 SW6_CS32
-#define CS33_SW6 SW6_CS33
-#define CS34_SW6 SW6_CS34
-#define CS35_SW6 SW6_CS35
-#define CS36_SW6 SW6_CS36
-#define CS37_SW6 SW6_CS37
-#define CS38_SW6 SW6_CS38
-#define CS39_SW6 SW6_CS39
-
-#define CS31_SW7 SW7_CS31
-#define CS32_SW7 SW7_CS32
-#define CS33_SW7 SW7_CS33
-#define CS34_SW7 SW7_CS34
-#define CS35_SW7 SW7_CS35
-#define CS36_SW7 SW7_CS36
-#define CS37_SW7 SW7_CS37
-#define CS38_SW7 SW7_CS38
-#define CS39_SW7 SW7_CS39
-
-#define CS31_SW8 SW8_CS31
-#define CS32_SW8 SW8_CS32
-#define CS33_SW8 SW8_CS33
-#define CS34_SW8 SW8_CS34
-#define CS35_SW8 SW8_CS35
-#define CS36_SW8 SW8_CS36
-#define CS37_SW8 SW8_CS37
-#define CS38_SW8 SW8_CS38
-#define CS39_SW8 SW8_CS39
-
-#define CS31_SW9 SW9_CS31
-#define CS32_SW9 SW9_CS32
-#define CS33_SW9 SW9_CS33
-#define CS34_SW9 SW9_CS34
-#define CS35_SW9 SW9_CS35
-#define CS36_SW9 SW9_CS36
-#define CS37_SW9 SW9_CS37
-#define CS38_SW9 SW9_CS38
-#define CS39_SW9 SW9_CS39
diff --git a/drivers/led/issi/is31fl3743a.h b/drivers/led/issi/is31fl3743a.h
index 48aeab46ab..bfff904047 100644
--- a/drivers/led/issi/is31fl3743a.h
+++ b/drivers/led/issi/is31fl3743a.h
@@ -328,214 +328,3 @@ void is31fl3743a_flush(void);
#define SW11_CS16 0xC3
#define SW11_CS17 0xC4
#define SW11_CS18 0xC5
-
-// DEPRECATED - DO NOT USE
-
-#define CS1_SW1 SW1_CS1
-#define CS2_SW1 SW1_CS2
-#define CS3_SW1 SW1_CS3
-#define CS4_SW1 SW1_CS4
-#define CS5_SW1 SW1_CS5
-#define CS6_SW1 SW1_CS6
-#define CS7_SW1 SW1_CS7
-#define CS8_SW1 SW1_CS8
-#define CS9_SW1 SW1_CS9
-#define CS10_SW1 SW1_CS10
-#define CS11_SW1 SW1_CS11
-#define CS12_SW1 SW1_CS12
-#define CS13_SW1 SW1_CS13
-#define CS14_SW1 SW1_CS14
-#define CS15_SW1 SW1_CS15
-#define CS16_SW1 SW1_CS16
-#define CS17_SW1 SW1_CS17
-#define CS18_SW1 SW1_CS18
-
-#define CS1_SW2 SW2_CS1
-#define CS2_SW2 SW2_CS2
-#define CS3_SW2 SW2_CS3
-#define CS4_SW2 SW2_CS4
-#define CS5_SW2 SW2_CS5
-#define CS6_SW2 SW2_CS6
-#define CS7_SW2 SW2_CS7
-#define CS8_SW2 SW2_CS8
-#define CS9_SW2 SW2_CS9
-#define CS10_SW2 SW2_CS10
-#define CS11_SW2 SW2_CS11
-#define CS12_SW2 SW2_CS12
-#define CS13_SW2 SW2_CS13
-#define CS14_SW2 SW2_CS14
-#define CS15_SW2 SW2_CS15
-#define CS16_SW2 SW2_CS16
-#define CS17_SW2 SW2_CS17
-#define CS18_SW2 SW2_CS18
-
-#define CS1_SW3 SW3_CS1
-#define CS2_SW3 SW3_CS2
-#define CS3_SW3 SW3_CS3
-#define CS4_SW3 SW3_CS4
-#define CS5_SW3 SW3_CS5
-#define CS6_SW3 SW3_CS6
-#define CS7_SW3 SW3_CS7
-#define CS8_SW3 SW3_CS8
-#define CS9_SW3 SW3_CS9
-#define CS10_SW3 SW3_CS10
-#define CS11_SW3 SW3_CS11
-#define CS12_SW3 SW3_CS12
-#define CS13_SW3 SW3_CS13
-#define CS14_SW3 SW3_CS14
-#define CS15_SW3 SW3_CS15
-#define CS16_SW3 SW3_CS16
-#define CS17_SW3 SW3_CS17
-#define CS18_SW3 SW3_CS18
-
-#define CS1_SW4 SW4_CS1
-#define CS2_SW4 SW4_CS2
-#define CS3_SW4 SW4_CS3
-#define CS4_SW4 SW4_CS4
-#define CS5_SW4 SW4_CS5
-#define CS6_SW4 SW4_CS6
-#define CS7_SW4 SW4_CS7
-#define CS8_SW4 SW4_CS8
-#define CS9_SW4 SW4_CS9
-#define CS10_SW4 SW4_CS10
-#define CS11_SW4 SW4_CS11
-#define CS12_SW4 SW4_CS12
-#define CS13_SW4 SW4_CS13
-#define CS14_SW4 SW4_CS14
-#define CS15_SW4 SW4_CS15
-#define CS16_SW4 SW4_CS16
-#define CS17_SW4 SW4_CS17
-#define CS18_SW4 SW4_CS18
-
-#define CS1_SW5 SW5_CS1
-#define CS2_SW5 SW5_CS2
-#define CS3_SW5 SW5_CS3
-#define CS4_SW5 SW5_CS4
-#define CS5_SW5 SW5_CS5
-#define CS6_SW5 SW5_CS6
-#define CS7_SW5 SW5_CS7
-#define CS8_SW5 SW5_CS8
-#define CS9_SW5 SW5_CS9
-#define CS10_SW5 SW5_CS10
-#define CS11_SW5 SW5_CS11
-#define CS12_SW5 SW5_CS12
-#define CS13_SW5 SW5_CS13
-#define CS14_SW5 SW5_CS14
-#define CS15_SW5 SW5_CS15
-#define CS16_SW5 SW5_CS16
-#define CS17_SW5 SW5_CS17
-#define CS18_SW5 SW5_CS18
-
-#define CS1_SW6 SW6_CS1
-#define CS2_SW6 SW6_CS2
-#define CS3_SW6 SW6_CS3
-#define CS4_SW6 SW6_CS4
-#define CS5_SW6 SW6_CS5
-#define CS6_SW6 SW6_CS6
-#define CS7_SW6 SW6_CS7
-#define CS8_SW6 SW6_CS8
-#define CS9_SW6 SW6_CS9
-#define CS10_SW6 SW6_CS10
-#define CS11_SW6 SW6_CS11
-#define CS12_SW6 SW6_CS12
-#define CS13_SW6 SW6_CS13
-#define CS14_SW6 SW6_CS14
-#define CS15_SW6 SW6_CS15
-#define CS16_SW6 SW6_CS16
-#define CS17_SW6 SW6_CS17
-#define CS18_SW6 SW6_CS18
-
-#define CS1_SW7 SW7_CS1
-#define CS2_SW7 SW7_CS2
-#define CS3_SW7 SW7_CS3
-#define CS4_SW7 SW7_CS4
-#define CS5_SW7 SW7_CS5
-#define CS6_SW7 SW7_CS6
-#define CS7_SW7 SW7_CS7
-#define CS8_SW7 SW7_CS8
-#define CS9_SW7 SW7_CS9
-#define CS10_SW7 SW7_CS10
-#define CS11_SW7 SW7_CS11
-#define CS12_SW7 SW7_CS12
-#define CS13_SW7 SW7_CS13
-#define CS14_SW7 SW7_CS14
-#define CS15_SW7 SW7_CS15
-#define CS16_SW7 SW7_CS16
-#define CS17_SW7 SW7_CS17
-#define CS18_SW7 SW7_CS18
-
-#define CS1_SW8 SW8_CS1
-#define CS2_SW8 SW8_CS2
-#define CS3_SW8 SW8_CS3
-#define CS4_SW8 SW8_CS4
-#define CS5_SW8 SW8_CS5
-#define CS6_SW8 SW8_CS6
-#define CS7_SW8 SW8_CS7
-#define CS8_SW8 SW8_CS8
-#define CS9_SW8 SW8_CS9
-#define CS10_SW8 SW8_CS10
-#define CS11_SW8 SW8_CS11
-#define CS12_SW8 SW8_CS12
-#define CS13_SW8 SW8_CS13
-#define CS14_SW8 SW8_CS14
-#define CS15_SW8 SW8_CS15
-#define CS16_SW8 SW8_CS16
-#define CS17_SW8 SW8_CS17
-#define CS18_SW8 SW8_CS18
-
-#define CS1_SW9 SW9_CS1
-#define CS2_SW9 SW9_CS2
-#define CS3_SW9 SW9_CS3
-#define CS4_SW9 SW9_CS4
-#define CS5_SW9 SW9_CS5
-#define CS6_SW9 SW9_CS6
-#define CS7_SW9 SW9_CS7
-#define CS8_SW9 SW9_CS8
-#define CS9_SW9 SW9_CS9
-#define CS10_SW9 SW9_CS10
-#define CS11_SW9 SW9_CS11
-#define CS12_SW9 SW9_CS12
-#define CS13_SW9 SW9_CS13
-#define CS14_SW9 SW9_CS14
-#define CS15_SW9 SW9_CS15
-#define CS16_SW9 SW9_CS16
-#define CS17_SW9 SW9_CS17
-#define CS18_SW9 SW9_CS18
-
-#define CS1_SW10 SW10_CS1
-#define CS2_SW10 SW10_CS2
-#define CS3_SW10 SW10_CS3
-#define CS4_SW10 SW10_CS4
-#define CS5_SW10 SW10_CS5
-#define CS6_SW10 SW10_CS6
-#define CS7_SW10 SW10_CS7
-#define CS8_SW10 SW10_CS8
-#define CS9_SW10 SW10_CS9
-#define CS10_SW10 SW10_CS10
-#define CS11_SW10 SW10_CS11
-#define CS12_SW10 SW10_CS12
-#define CS13_SW10 SW10_CS13
-#define CS14_SW10 SW10_CS14
-#define CS15_SW10 SW10_CS15
-#define CS16_SW10 SW10_CS16
-#define CS17_SW10 SW10_CS17
-#define CS18_SW10 SW10_CS18
-
-#define CS1_SW11 SW11_CS1
-#define CS2_SW11 SW11_CS2
-#define CS3_SW11 SW11_CS3
-#define CS4_SW11 SW11_CS4
-#define CS5_SW11 SW11_CS5
-#define CS6_SW11 SW11_CS6
-#define CS7_SW11 SW11_CS7
-#define CS8_SW11 SW11_CS8
-#define CS9_SW11 SW11_CS9
-#define CS10_SW11 SW11_CS10
-#define CS11_SW11 SW11_CS11
-#define CS12_SW11 SW11_CS12
-#define CS13_SW11 SW11_CS13
-#define CS14_SW11 SW11_CS14
-#define CS15_SW11 SW11_CS15
-#define CS16_SW11 SW11_CS16
-#define CS17_SW11 SW11_CS17
-#define CS18_SW11 SW11_CS18
diff --git a/drivers/led/snled27351-mono.h b/drivers/led/snled27351-mono.h
index 43d39934cb..b88ef25f76 100644
--- a/drivers/led/snled27351-mono.h
+++ b/drivers/led/snled27351-mono.h
@@ -21,37 +21,6 @@
#include "progmem.h"
#include "util.h"
-// ======== DEPRECATED DEFINES - DO NOT USE ========
-#ifdef CKLED2001_TIMEOUT
-# define SNLED27351_I2C_TIMEOUT CKLED2001_TIMEOUT
-#endif
-#ifdef CKLED2001_PERSISTENCE
-# define SNLED27351_I2C_PERSISTENCE CKLED2001_PERSISTENCE
-#endif
-#ifdef PHASE_CHANNEL
-# define SNLED27351_PHASE_CHANNEL PHASE_CHANNEL
-#endif
-#ifdef CKLED2001_CURRENT_TUNE
-# define SNLED27351_CURRENT_TUNE CKLED2001_CURRENT_TUNE
-#endif
-
-#define MSKPHASE_12CHANNEL SNLED27351_SCAN_PHASE_12_CHANNEL
-#define MSKPHASE_11CHANNEL SNLED27351_SCAN_PHASE_11_CHANNEL
-#define MSKPHASE_10CHANNEL SNLED27351_SCAN_PHASE_10_CHANNEL
-#define MSKPHASE_9CHANNEL SNLED27351_SCAN_PHASE_9_CHANNEL
-#define MSKPHASE_8CHANNEL SNLED27351_SCAN_PHASE_8_CHANNEL
-#define MSKPHASE_7CHANNEL SNLED27351_SCAN_PHASE_7_CHANNEL
-#define MSKPHASE_6CHANNEL SNLED27351_SCAN_PHASE_6_CHANNEL
-#define MSKPHASE_5CHANNEL SNLED27351_SCAN_PHASE_5_CHANNEL
-#define MSKPHASE_4CHANNEL SNLED27351_SCAN_PHASE_4_CHANNEL
-#define MSKPHASE_3CHANNEL SNLED27351_SCAN_PHASE_3_CHANNEL
-#define MSKPHASE_2CHANNEL SNLED27351_SCAN_PHASE_2_CHANNEL
-#define MSKPHASE_1CHANNEL SNLED27351_SCAN_PHASE_1_CHANNEL
-
-#define ckled2001_led snled27351_led_t
-#define g_ckled2001_leds g_snled27351_leds
-// ========
-
#define SNLED27351_REG_COMMAND 0xFD
#define SNLED27351_COMMAND_LED_CONTROL 0x00
#define SNLED27351_COMMAND_PWM 0x01
@@ -378,209 +347,3 @@ void snled27351_sw_shutdown(uint8_t index);
#define CB12_CA14 0xBD
#define CB12_CA15 0xBE
#define CB12_CA16 0xBF
-
-// DEPRECATED - DO NOT USE
-
-#define A_1 CB1_CA1
-#define A_2 CB1_CA2
-#define A_3 CB1_CA3
-#define A_4 CB1_CA4
-#define A_5 CB1_CA5
-#define A_6 CB1_CA6
-#define A_7 CB1_CA7
-#define A_8 CB1_CA8
-#define A_9 CB1_CA9
-#define A_10 CB1_CA10
-#define A_11 CB1_CA11
-#define A_12 CB1_CA12
-#define A_13 CB1_CA13
-#define A_14 CB1_CA14
-#define A_15 CB1_CA15
-#define A_16 CB1_CA16
-
-#define B_1 CB2_CA1
-#define B_2 CB2_CA2
-#define B_3 CB2_CA3
-#define B_4 CB2_CA4
-#define B_5 CB2_CA5
-#define B_6 CB2_CA6
-#define B_7 CB2_CA7
-#define B_8 CB2_CA8
-#define B_9 CB2_CA9
-#define B_10 CB2_CA10
-#define B_11 CB2_CA11
-#define B_12 CB2_CA12
-#define B_13 CB2_CA13
-#define B_14 CB2_CA14
-#define B_15 CB2_CA15
-#define B_16 CB2_CA16
-
-#define C_1 CB3_CA1
-#define C_2 CB3_CA2
-#define C_3 CB3_CA3
-#define C_4 CB3_CA4
-#define C_5 CB3_CA5
-#define C_6 CB3_CA6
-#define C_7 CB3_CA7
-#define C_8 CB3_CA8
-#define C_9 CB3_CA9
-#define C_10 CB3_CA10
-#define C_11 CB3_CA11
-#define C_12 CB3_CA12
-#define C_13 CB3_CA13
-#define C_14 CB3_CA14
-#define C_15 CB3_CA15
-#define C_16 CB3_CA16
-
-#define D_1 CB4_CA1
-#define D_2 CB4_CA2
-#define D_3 CB4_CA3
-#define D_4 CB4_CA4
-#define D_5 CB4_CA5
-#define D_6 CB4_CA6
-#define D_7 CB4_CA7
-#define D_8 CB4_CA8
-#define D_9 CB4_CA9
-#define D_10 CB4_CA10
-#define D_11 CB4_CA11
-#define D_12 CB4_CA12
-#define D_13 CB4_CA13
-#define D_14 CB4_CA14
-#define D_15 CB4_CA15
-#define D_16 CB4_CA16
-
-#define E_1 CB5_CA1
-#define E_2 CB5_CA2
-#define E_3 CB5_CA3
-#define E_4 CB5_CA4
-#define E_5 CB5_CA5
-#define E_6 CB5_CA6
-#define E_7 CB5_CA7
-#define E_8 CB5_CA8
-#define E_9 CB5_CA9
-#define E_10 CB5_CA10
-#define E_11 CB5_CA11
-#define E_12 CB5_CA12
-#define E_13 CB5_CA13
-#define E_14 CB5_CA14
-#define E_15 CB5_CA15
-#define E_16 CB5_CA16
-
-#define F_1 CB6_CA1
-#define F_2 CB6_CA2
-#define F_3 CB6_CA3
-#define F_4 CB6_CA4
-#define F_5 CB6_CA5
-#define F_6 CB6_CA6
-#define F_7 CB6_CA7
-#define F_8 CB6_CA8
-#define F_9 CB6_CA9
-#define F_10 CB6_CA10
-#define F_11 CB6_CA11
-#define F_12 CB6_CA12
-#define F_13 CB6_CA13
-#define F_14 CB6_CA14
-#define F_15 CB6_CA15
-#define F_16 CB6_CA16
-
-#define G_1 CB7_CA1
-#define G_2 CB7_CA2
-#define G_3 CB7_CA3
-#define G_4 CB7_CA4
-#define G_5 CB7_CA5
-#define G_6 CB7_CA6
-#define G_7 CB7_CA7
-#define G_8 CB7_CA8
-#define G_9 CB7_CA9
-#define G_10 CB7_CA10
-#define G_11 CB7_CA11
-#define G_12 CB7_CA12
-#define G_13 CB7_CA13
-#define G_14 CB7_CA14
-#define G_15 CB7_CA15
-#define G_16 CB7_CA16
-
-#define H_1 CB8_CA1
-#define H_2 CB8_CA2
-#define H_3 CB8_CA3
-#define H_4 CB8_CA4
-#define H_5 CB8_CA5
-#define H_6 CB8_CA6
-#define H_7 CB8_CA7
-#define H_8 CB8_CA8
-#define H_9 CB8_CA9
-#define H_10 CB8_CA10
-#define H_11 CB8_CA11
-#define H_12 CB8_CA12
-#define H_13 CB8_CA13
-#define H_14 CB8_CA14
-#define H_15 CB8_CA15
-#define H_16 CB8_CA16
-
-#define I_1 CB9_CA1
-#define I_2 CB9_CA2
-#define I_3 CB9_CA3
-#define I_4 CB9_CA4
-#define I_5 CB9_CA5
-#define I_6 CB9_CA6
-#define I_7 CB9_CA7
-#define I_8 CB9_CA8
-#define I_9 CB9_CA9
-#define I_10 CB9_CA10
-#define I_11 CB9_CA11
-#define I_12 CB9_CA12
-#define I_13 CB9_CA13
-#define I_14 CB9_CA14
-#define I_15 CB9_CA15
-#define I_16 CB9_CA16
-
-#define J_1 CB10_CA1
-#define J_2 CB10_CA2
-#define J_3 CB10_CA3
-#define J_4 CB10_CA4
-#define J_5 CB10_CA5
-#define J_6 CB10_CA6
-#define J_7 CB10_CA7
-#define J_8 CB10_CA8
-#define J_9 CB10_CA9
-#define J_10 CB10_CA10
-#define J_11 CB10_CA11
-#define J_12 CB10_CA12
-#define J_13 CB10_CA13
-#define J_14 CB10_CA14
-#define J_15 CB10_CA15
-#define J_16 CB10_CA16
-
-#define K_1 CB11_CA1
-#define K_2 CB11_CA2
-#define K_3 CB11_CA3
-#define K_4 CB11_CA4
-#define K_5 CB11_CA5
-#define K_6 CB11_CA6
-#define K_7 CB11_CA7
-#define K_8 CB11_CA8
-#define K_9 CB11_CA9
-#define K_10 CB11_CA10
-#define K_11 CB11_CA11
-#define K_12 CB11_CA12
-#define K_13 CB11_CA13
-#define K_14 CB11_CA14
-#define K_15 CB11_CA15
-#define K_16 CB11_CA16
-
-#define L_1 CB12_CA1
-#define L_2 CB12_CA2
-#define L_3 CB12_CA3
-#define L_4 CB12_CA4
-#define L_5 CB12_CA5
-#define L_6 CB12_CA6
-#define L_7 CB12_CA7
-#define L_8 CB12_CA8
-#define L_9 CB12_CA9
-#define L_10 CB12_CA10
-#define L_11 CB12_CA11
-#define L_12 CB12_CA12
-#define L_13 CB12_CA13
-#define L_14 CB12_CA14
-#define L_15 CB12_CA15
-#define L_16 CB12_CA16
diff --git a/drivers/led/snled27351.h b/drivers/led/snled27351.h
index d902744d14..1b7f05c285 100644
--- a/drivers/led/snled27351.h
+++ b/drivers/led/snled27351.h
@@ -21,49 +21,6 @@
#include "progmem.h"
#include "util.h"
-// ======== DEPRECATED DEFINES - DO NOT USE ========
-#ifdef DRIVER_ADDR_1
-# define SNLED27351_I2C_ADDRESS_1 DRIVER_ADDR_1
-#endif
-#ifdef DRIVER_ADDR_2
-# define SNLED27351_I2C_ADDRESS_2 DRIVER_ADDR_2
-#endif
-#ifdef DRIVER_ADDR_3
-# define SNLED27351_I2C_ADDRESS_3 DRIVER_ADDR_3
-#endif
-#ifdef DRIVER_ADDR_4
-# define SNLED27351_I2C_ADDRESS_4 DRIVER_ADDR_4
-#endif
-#ifdef CKLED2001_TIMEOUT
-# define SNLED27351_I2C_TIMEOUT CKLED2001_TIMEOUT
-#endif
-#ifdef CKLED2001_PERSISTENCE
-# define SNLED27351_I2C_PERSISTENCE CKLED2001_PERSISTENCE
-#endif
-#ifdef PHASE_CHANNEL
-# define SNLED27351_PHASE_CHANNEL PHASE_CHANNEL
-#endif
-#ifdef CKLED2001_CURRENT_TUNE
-# define SNLED27351_CURRENT_TUNE CKLED2001_CURRENT_TUNE
-#endif
-
-#define MSKPHASE_12CHANNEL SNLED27351_SCAN_PHASE_12_CHANNEL
-#define MSKPHASE_11CHANNEL SNLED27351_SCAN_PHASE_11_CHANNEL
-#define MSKPHASE_10CHANNEL SNLED27351_SCAN_PHASE_10_CHANNEL
-#define MSKPHASE_9CHANNEL SNLED27351_SCAN_PHASE_9_CHANNEL
-#define MSKPHASE_8CHANNEL SNLED27351_SCAN_PHASE_8_CHANNEL
-#define MSKPHASE_7CHANNEL SNLED27351_SCAN_PHASE_7_CHANNEL
-#define MSKPHASE_6CHANNEL SNLED27351_SCAN_PHASE_6_CHANNEL
-#define MSKPHASE_5CHANNEL SNLED27351_SCAN_PHASE_5_CHANNEL
-#define MSKPHASE_4CHANNEL SNLED27351_SCAN_PHASE_4_CHANNEL
-#define MSKPHASE_3CHANNEL SNLED27351_SCAN_PHASE_3_CHANNEL
-#define MSKPHASE_2CHANNEL SNLED27351_SCAN_PHASE_2_CHANNEL
-#define MSKPHASE_1CHANNEL SNLED27351_SCAN_PHASE_1_CHANNEL
-
-#define ckled2001_led snled27351_led_t
-#define g_ckled2001_leds g_snled27351_leds
-// ========
-
#define SNLED27351_REG_COMMAND 0xFD
#define SNLED27351_COMMAND_LED_CONTROL 0x00
#define SNLED27351_COMMAND_PWM 0x01
@@ -392,209 +349,3 @@ void snled27351_sw_shutdown(uint8_t index);
#define CB12_CA14 0xBD
#define CB12_CA15 0xBE
#define CB12_CA16 0xBF
-
-// DEPRECATED - DO NOT USE
-
-#define A_1 CB1_CA1
-#define A_2 CB1_CA2
-#define A_3 CB1_CA3
-#define A_4 CB1_CA4
-#define A_5 CB1_CA5
-#define A_6 CB1_CA6
-#define A_7 CB1_CA7
-#define A_8 CB1_CA8
-#define A_9 CB1_CA9
-#define A_10 CB1_CA10
-#define A_11 CB1_CA11
-#define A_12 CB1_CA12
-#define A_13 CB1_CA13
-#define A_14 CB1_CA14
-#define A_15 CB1_CA15
-#define A_16 CB1_CA16
-
-#define B_1 CB2_CA1
-#define B_2 CB2_CA2
-#define B_3 CB2_CA3
-#define B_4 CB2_CA4
-#define B_5 CB2_CA5
-#define B_6 CB2_CA6
-#define B_7 CB2_CA7
-#define B_8 CB2_CA8
-#define B_9 CB2_CA9
-#define B_10 CB2_CA10
-#define B_11 CB2_CA11
-#define B_12 CB2_CA12
-#define B_13 CB2_CA13
-#define B_14 CB2_CA14
-#define B_15 CB2_CA15
-#define B_16 CB2_CA16
-
-#define C_1 CB3_CA1
-#define C_2 CB3_CA2
-#define C_3 CB3_CA3
-#define C_4 CB3_CA4
-#define C_5 CB3_CA5
-#define C_6 CB3_CA6
-#define C_7 CB3_CA7
-#define C_8 CB3_CA8
-#define C_9 CB3_CA9
-#define C_10 CB3_CA10
-#define C_11 CB3_CA11
-#define C_12 CB3_CA12
-#define C_13 CB3_CA13
-#define C_14 CB3_CA14
-#define C_15 CB3_CA15
-#define C_16 CB3_CA16
-
-#define D_1 CB4_CA1
-#define D_2 CB4_CA2
-#define D_3 CB4_CA3
-#define D_4 CB4_CA4
-#define D_5 CB4_CA5
-#define D_6 CB4_CA6
-#define D_7 CB4_CA7
-#define D_8 CB4_CA8
-#define D_9 CB4_CA9
-#define D_10 CB4_CA10
-#define D_11 CB4_CA11
-#define D_12 CB4_CA12
-#define D_13 CB4_CA13
-#define D_14 CB4_CA14
-#define D_15 CB4_CA15
-#define D_16 CB4_CA16
-
-#define E_1 CB5_CA1
-#define E_2 CB5_CA2
-#define E_3 CB5_CA3
-#define E_4 CB5_CA4
-#define E_5 CB5_CA5
-#define E_6 CB5_CA6
-#define E_7 CB5_CA7
-#define E_8 CB5_CA8
-#define E_9 CB5_CA9
-#define E_10 CB5_CA10
-#define E_11 CB5_CA11
-#define E_12 CB5_CA12
-#define E_13 CB5_CA13
-#define E_14 CB5_CA14
-#define E_15 CB5_CA15
-#define E_16 CB5_CA16
-
-#define F_1 CB6_CA1
-#define F_2 CB6_CA2
-#define F_3 CB6_CA3
-#define F_4 CB6_CA4
-#define F_5 CB6_CA5
-#define F_6 CB6_CA6
-#define F_7 CB6_CA7
-#define F_8 CB6_CA8
-#define F_9 CB6_CA9
-#define F_10 CB6_CA10
-#define F_11 CB6_CA11
-#define F_12 CB6_CA12
-#define F_13 CB6_CA13
-#define F_14 CB6_CA14
-#define F_15 CB6_CA15
-#define F_16 CB6_CA16
-
-#define G_1 CB7_CA1
-#define G_2 CB7_CA2
-#define G_3 CB7_CA3
-#define G_4 CB7_CA4
-#define G_5 CB7_CA5
-#define G_6 CB7_CA6
-#define G_7 CB7_CA7
-#define G_8 CB7_CA8
-#define G_9 CB7_CA9
-#define G_10 CB7_CA10
-#define G_11 CB7_CA11
-#define G_12 CB7_CA12
-#define G_13 CB7_CA13
-#define G_14 CB7_CA14
-#define G_15 CB7_CA15
-#define G_16 CB7_CA16
-
-#define H_1 CB8_CA1
-#define H_2 CB8_CA2
-#define H_3 CB8_CA3
-#define H_4 CB8_CA4
-#define H_5 CB8_CA5
-#define H_6 CB8_CA6
-#define H_7 CB8_CA7
-#define H_8 CB8_CA8
-#define H_9 CB8_CA9
-#define H_10 CB8_CA10
-#define H_11 CB8_CA11
-#define H_12 CB8_CA12
-#define H_13 CB8_CA13
-#define H_14 CB8_CA14
-#define H_15 CB8_CA15
-#define H_16 CB8_CA16
-
-#define I_1 CB9_CA1
-#define I_2 CB9_CA2
-#define I_3 CB9_CA3
-#define I_4 CB9_CA4
-#define I_5 CB9_CA5
-#define I_6 CB9_CA6
-#define I_7 CB9_CA7
-#define I_8 CB9_CA8
-#define I_9 CB9_CA9
-#define I_10 CB9_CA10
-#define I_11 CB9_CA11
-#define I_12 CB9_CA12
-#define I_13 CB9_CA13
-#define I_14 CB9_CA14
-#define I_15 CB9_CA15
-#define I_16 CB9_CA16
-
-#define J_1 CB10_CA1
-#define J_2 CB10_CA2
-#define J_3 CB10_CA3
-#define J_4 CB10_CA4
-#define J_5 CB10_CA5
-#define J_6 CB10_CA6
-#define J_7 CB10_CA7
-#define J_8 CB10_CA8
-#define J_9 CB10_CA9
-#define J_10 CB10_CA10
-#define J_11 CB10_CA11
-#define J_12 CB10_CA12
-#define J_13 CB10_CA13
-#define J_14 CB10_CA14
-#define J_15 CB10_CA15
-#define J_16 CB10_CA16
-
-#define K_1 CB11_CA1
-#define K_2 CB11_CA2
-#define K_3 CB11_CA3
-#define K_4 CB11_CA4
-#define K_5 CB11_CA5
-#define K_6 CB11_CA6
-#define K_7 CB11_CA7
-#define K_8 CB11_CA8
-#define K_9 CB11_CA9
-#define K_10 CB11_CA10
-#define K_11 CB11_CA11
-#define K_12 CB11_CA12
-#define K_13 CB11_CA13
-#define K_14 CB11_CA14
-#define K_15 CB11_CA15
-#define K_16 CB11_CA16
-
-#define L_1 CB12_CA1
-#define L_2 CB12_CA2
-#define L_3 CB12_CA3
-#define L_4 CB12_CA4
-#define L_5 CB12_CA5
-#define L_6 CB12_CA6
-#define L_7 CB12_CA7
-#define L_8 CB12_CA8
-#define L_9 CB12_CA9
-#define L_10 CB12_CA10
-#define L_11 CB12_CA11
-#define L_12 CB12_CA12
-#define L_13 CB12_CA13
-#define L_14 CB12_CA14
-#define L_15 CB12_CA15
-#define L_16 CB12_CA16
diff --git a/drivers/ws2812.c b/drivers/led/ws2812.c
index bf234c6f7d..bf234c6f7d 100644
--- a/drivers/ws2812.c
+++ b/drivers/led/ws2812.c
diff --git a/drivers/ws2812.h b/drivers/led/ws2812.h
index 8013e5bd2d..8013e5bd2d 100644
--- a/drivers/ws2812.h
+++ b/drivers/led/ws2812.h
diff --git a/drivers/sensors/azoteq_iqs5xx.c b/drivers/sensors/azoteq_iqs5xx.c
index 1bb64f1984..ae26ee60cf 100644
--- a/drivers/sensors/azoteq_iqs5xx.c
+++ b/drivers/sensors/azoteq_iqs5xx.c
@@ -17,6 +17,7 @@
#define AZOTEQ_IQS5XX_REG_PREVIOUS_CYCLE_TIME 0x000C
#define AZOTEQ_IQS5XX_REG_SYSTEM_CONTROL_1 0x0432
#define AZOTEQ_IQS5XX_REG_REPORT_RATE_ACTIVE 0x057A
+#define AZOTEQ_IQS5XX_REG_IDLE_MODE_TIMEOUT 0x0586
#define AZOTEQ_IQS5XX_REG_SYSTEM_CONFIG_0 0x058E
#define AZOTEQ_IQS5XX_REG_SYSTEM_CONFIG_1 0x058F
#define AZOTEQ_IQS5XX_REG_X_RESOLUTION 0x066E
@@ -77,6 +78,10 @@
#ifndef AZOTEQ_IQS5XX_ZOOM_CONSECUTIVE_DISTANCE
# define AZOTEQ_IQS5XX_ZOOM_CONSECUTIVE_DISTANCE 0x19
#endif
+#ifndef AZOTEQ_IQS5XX_EVENT_MODE
+// Event mode can't be used until the pointing code has changed (stuck buttons)
+# define AZOTEQ_IQS5XX_EVENT_MODE false
+#endif
#if defined(AZOTEQ_IQS5XX_TPS43)
# define AZOTEQ_IQS5XX_WIDTH_MM 43
@@ -112,12 +117,6 @@ static struct {
uint16_t resolution_y;
} azoteq_iqs5xx_device_resolution_t;
-i2c_status_t azoteq_iqs5xx_wake(void) {
- uint8_t data = 0;
- i2c_status_t status = i2c_read_register16(AZOTEQ_IQS5XX_ADDRESS, AZOTEQ_IQS5XX_REG_PREVIOUS_CYCLE_TIME, (uint8_t *)&data, sizeof(data), 1);
- wait_us(150);
- return status;
-}
i2c_status_t azoteq_iqs5xx_end_session(void) {
const uint8_t END_BYTE = 1; // any data
return i2c_write_register16(AZOTEQ_IQS5XX_ADDRESS, AZOTEQ_IQS5XX_REG_END_COMMS, &END_BYTE, 1, AZOTEQ_IQS5XX_TIMEOUT_MS);
@@ -324,14 +323,19 @@ static i2c_status_t azoteq_iqs5xx_init_status = 1;
void azoteq_iqs5xx_init(void) {
i2c_init();
- azoteq_iqs5xx_wake();
+ i2c_ping_address(AZOTEQ_IQS5XX_ADDRESS, 1); // wake
azoteq_iqs5xx_reset_suspend(true, false, true);
wait_ms(100);
- azoteq_iqs5xx_wake();
+ i2c_ping_address(AZOTEQ_IQS5XX_ADDRESS, 1); // wake
if (azoteq_iqs5xx_get_product() != AZOTEQ_IQS5XX_UNKNOWN) {
azoteq_iqs5xx_setup_resolution();
azoteq_iqs5xx_init_status = azoteq_iqs5xx_set_report_rate(AZOTEQ_IQS5XX_REPORT_RATE, AZOTEQ_IQS5XX_ACTIVE, false);
- azoteq_iqs5xx_init_status |= azoteq_iqs5xx_set_event_mode(false, false);
+ azoteq_iqs5xx_init_status |= azoteq_iqs5xx_set_report_rate(AZOTEQ_IQS5XX_REPORT_RATE, AZOTEQ_IQS5XX_IDLE, false);
+ azoteq_iqs5xx_init_status |= azoteq_iqs5xx_set_report_rate(AZOTEQ_IQS5XX_REPORT_RATE, AZOTEQ_IQS5XX_IDLE_TOUCH, false);
+
+ uint8_t no_timeout = 255;
+ azoteq_iqs5xx_init_status |= i2c_write_register16(AZOTEQ_IQS5XX_ADDRESS, AZOTEQ_IQS5XX_REG_IDLE_MODE_TIMEOUT, &no_timeout, 1, AZOTEQ_IQS5XX_TIMEOUT_MS); // Don't enter LP1, LP2 states
+ azoteq_iqs5xx_init_status |= azoteq_iqs5xx_set_event_mode(AZOTEQ_IQS5XX_EVENT_MODE, false);
azoteq_iqs5xx_init_status |= azoteq_iqs5xx_set_reati(true, false);
#if defined(AZOTEQ_IQS5XX_ROTATION_90)
azoteq_iqs5xx_init_status |= azoteq_iqs5xx_set_xy_config(false, true, true, true, false);
@@ -348,21 +352,19 @@ void azoteq_iqs5xx_init(void) {
};
report_mouse_t azoteq_iqs5xx_get_report(report_mouse_t mouse_report) {
- report_mouse_t temp_report = {0};
- static uint8_t previous_button_state = 0;
- static uint8_t read_error_count = 0;
+ report_mouse_t temp_report = {0};
if (azoteq_iqs5xx_init_status == I2C_STATUS_SUCCESS) {
- azoteq_iqs5xx_base_data_t base_data = {0};
-#if !defined(POINTING_DEVICE_MOTION_PIN)
- azoteq_iqs5xx_wake();
-#endif
- i2c_status_t status = azoteq_iqs5xx_get_base_data(&base_data);
- bool ignore_movement = false;
+ azoteq_iqs5xx_base_data_t base_data = {0};
+ i2c_status_t status = azoteq_iqs5xx_get_base_data(&base_data);
+ bool ignore_movement = false;
if (status == I2C_STATUS_SUCCESS) {
- // pd_dprintf("IQS5XX - previous cycle time: %d \n", base_data.previous_cycle_time);
- read_error_count = 0;
+#ifdef POINTING_DEVICE_DEBUG
+ if (base_data.previous_cycle_time > AZOTEQ_IQS5XX_REPORT_RATE) {
+ pd_dprintf("IQS5XX - previous cycle time missed, took: %dms\n", base_data.previous_cycle_time);
+ }
+#endif
if (base_data.gesture_events_0.single_tap || base_data.gesture_events_0.press_and_hold) {
pd_dprintf("IQS5XX - Single tap/hold.\n");
temp_report.buttons = pointing_device_handle_buttons(temp_report.buttons, true, POINTING_DEVICE_BUTTON1);
@@ -403,20 +405,11 @@ report_mouse_t azoteq_iqs5xx_get_report(report_mouse_t mouse_report) {
temp_report.y = CONSTRAIN_HID_XY(AZOTEQ_IQS5XX_COMBINE_H_L_BYTES(base_data.y.h, base_data.y.l));
}
- previous_button_state = temp_report.buttons;
-
} else {
- if (read_error_count > 10) {
- read_error_count = 0;
- previous_button_state = 0;
- } else {
- read_error_count++;
- }
- temp_report.buttons = previous_button_state;
- pd_dprintf("IQS5XX - get report failed: %d \n", status);
+ pd_dprintf("IQS5XX - get report failed, i2c status: %d \n", status);
}
} else {
- pd_dprintf("IQS5XX - Init failed: %d \n", azoteq_iqs5xx_init_status);
+ pd_dprintf("IQS5XX - Init failed, i2c status: %d \n", azoteq_iqs5xx_init_status);
}
return temp_report;
diff --git a/drivers/sensors/azoteq_iqs5xx.h b/drivers/sensors/azoteq_iqs5xx.h
index 4190fe470c..e1e8b67b31 100644
--- a/drivers/sensors/azoteq_iqs5xx.h
+++ b/drivers/sensors/azoteq_iqs5xx.h
@@ -173,7 +173,8 @@ typedef struct {
# define AZOTEQ_IQS5XX_REPORT_RATE 10
#endif
#if !defined(POINTING_DEVICE_TASK_THROTTLE_MS) && !defined(POINTING_DEVICE_MOTION_PIN)
-# define POINTING_DEVICE_TASK_THROTTLE_MS AZOTEQ_IQS5XX_REPORT_RATE
+// Polling the Azoteq isn't recommended, ensuring we only poll after the report is ready stops any unexpected NACKs
+# define POINTING_DEVICE_TASK_THROTTLE_MS AZOTEQ_IQS5XX_REPORT_RATE + 1
#endif
const pointing_device_driver_t azoteq_iqs5xx_pointing_device_driver;
diff --git a/drivers/spi_master.h b/drivers/spi_master.h
new file mode 100644
index 0000000000..d206b812bf
--- /dev/null
+++ b/drivers/spi_master.h
@@ -0,0 +1,116 @@
+// Copyright 2025 QMK
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#pragma once
+
+#include <stdint.h>
+#include <stdbool.h>
+#include "gpio.h"
+
+/**
+ * \file
+ *
+ * \defgroup spi_master SPI Master API
+ *
+ * \brief API to communicate with SPI devices.
+ * \{
+ */
+
+// Hardware SS pin is defined in the header so that user code can refer to it
+#ifdef __AVR__
+# if defined(__AVR_AT90USB162__) || defined(__AVR_ATmega16U2__) || defined(__AVR_ATmega32U2__) || defined(__AVR_ATmega16U4__) || defined(__AVR_ATmega32U4__) || defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB647__) || defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB1287__)
+# define SPI_SS_PIN B0
+# elif defined(__AVR_ATmega32A__)
+# define SPI_SS_PIN B4
+# elif defined(__AVR_ATmega328P__) || defined(__AVR_ATmega328__)
+# define SPI_SS_PIN B2
+# endif
+#endif
+
+typedef int16_t spi_status_t;
+
+#define SPI_STATUS_SUCCESS (0)
+#define SPI_STATUS_ERROR (-1)
+#define SPI_STATUS_TIMEOUT (-2)
+
+#define SPI_TIMEOUT_IMMEDIATE (0)
+#define SPI_TIMEOUT_INFINITE (0xFFFF)
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct spi_start_config_t {
+ pin_t slave_pin;
+ bool lsb_first;
+ uint8_t mode;
+ uint16_t divisor;
+ bool cs_active_low;
+} spi_start_config_t;
+
+/**
+ * \brief Initialize the SPI driver. This function must be called only once, before any of the below functions can be called.
+ */
+void spi_init(void);
+
+/**
+ * \brief Start an SPI transaction.
+ *
+ * \param slavePin The GPIO pin connected to the desired device's `SS` line.
+ * \param lsbFirst Determines the endianness of the transmission. If `true`, the least significant bit of each byte is sent first.
+ * \param mode The SPI mode to use.
+ * \param divisor The SPI clock divisor.
+ *
+ * \return `true` if the operation was successful, otherwise `false` if the supplied parameters are invalid or the SPI peripheral is already in use.
+ */
+bool spi_start(pin_t slavePin, bool lsbFirst, uint8_t mode, uint16_t divisor);
+
+bool spi_start_extended(spi_start_config_t *start_config);
+
+/**
+ * \brief Write a byte to the selected SPI device.
+ *
+ * \param data The byte to write.
+ *
+ * \return `SPI_STATUS_TIMEOUT` if the timeout period elapses, or `SPI_STATUS_SUCCESS`.
+ */
+spi_status_t spi_write(uint8_t data);
+
+/**
+ * \brief Read a byte from the selected SPI device.
+ *
+ * \return `SPI_STATUS_TIMEOUT` if the timeout period elapses, otherwise the byte read from the device.
+ */
+spi_status_t spi_read(void);
+
+/**
+ * \brief Send multiple bytes to the selected SPI device.
+ *
+ * \param data A pointer to the data to write from.
+ * \param length The number of bytes to write. Take care not to overrun the length of `data`.
+ *
+ * \return `SPI_STATUS_TIMEOUT` if the timeout period elapses, `SPI_STATUS_ERROR` if some other error occurs, otherwise `SPI_STATUS_SUCCESS`.
+ */
+spi_status_t spi_transmit(const uint8_t *data, uint16_t length);
+
+/**
+ * \brief Receive multiple bytes from the selected SPI device.
+ *
+ * \param data A pointer to a buffer to read into.
+ * \param length The number of bytes to read. Take care not to overrun the length of `data`.
+ *
+ * \return `SPI_STATUS_TIMEOUT` if the timeout period elapses, `SPI_STATUS_ERROR` if some other error occurs, otherwise `SPI_STATUS_SUCCESS`.
+ */
+spi_status_t spi_receive(uint8_t *data, uint16_t length);
+
+/**
+ * \brief End the current SPI transaction. This will deassert the slave select pin and reset the endianness, mode and divisor configured by `spi_start()`.
+ *
+ */
+void spi_stop(void);
+
+#ifdef __cplusplus
+}
+#endif
+
+/** \} */
diff --git a/drivers/uart.h b/drivers/uart.h
new file mode 100644
index 0000000000..c5068c86e1
--- /dev/null
+++ b/drivers/uart.h
@@ -0,0 +1,62 @@
+// Copyright 2025 QMK
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#pragma once
+
+#include <stdint.h>
+#include <stdbool.h>
+
+/**
+ * \file
+ *
+ * \defgroup uart UART API
+ *
+ * \brief API to communicate with UART devices.
+ * \{
+ */
+
+/**
+ * \brief Initialize the UART driver. This function must be called only once, before any of the below functions can be called.
+ *
+ * \param baud The baud rate to transmit and receive at. This may depend on the device you are communicating with. Common values are 1200, 2400, 4800, 9600, 19200, 38400, 57600, and 115200.
+ */
+void uart_init(uint32_t baud);
+
+/**
+ * \brief Transmit a single byte.
+ *
+ * \param data The byte to write.
+ */
+void uart_write(uint8_t data);
+
+/**
+ * \brief Receive a single byte.
+ *
+ * \return The byte read from the receive buffer. This function will block if the buffer is empty (ie. no data to read).
+ */
+uint8_t uart_read(void);
+
+/**
+ * \brief Transmit multiple bytes.
+ *
+ * \param data A pointer to the data to write from.
+ * \param length The number of bytes to write. Take care not to overrun the length of `data`.
+ */
+void uart_transmit(const uint8_t *data, uint16_t length);
+
+/**
+ * \brief Receive multiple bytes.
+ *
+ * \param data A pointer to a buffer to read into.
+ * \param length The number of bytes to read. Take care not to overrun the length of `data`.
+ */
+void uart_receive(uint8_t *data, uint16_t length);
+
+/**
+ * \brief Return whether the receive buffer contains data. Call this function to determine if `uart_read()` will return data immediately.
+ *
+ * \return true if there is data available to read.
+ */
+bool uart_available(void);
+
+/** \} */
diff --git a/keyboards/0_sixty/rules.mk b/keyboards/0_sixty/rules.mk
deleted file mode 100644
index a0d06a89dd..0000000000
--- a/keyboards/0_sixty/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = 0_sixty/base
diff --git a/keyboards/0xcb/splaytoraid/rules.mk b/keyboards/0xcb/splaytoraid/rules.mk
deleted file mode 100644
index 65884dec4f..0000000000
--- a/keyboards/0xcb/splaytoraid/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = 0xcb/splaytoraid/rp2040_ce
diff --git a/keyboards/1upkeyboards/pi40/rules.mk b/keyboards/1upkeyboards/pi40/rules.mk
deleted file mode 100644
index 48aea570e0..0000000000
--- a/keyboards/1upkeyboards/pi40/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = 1upkeyboards/pi40/mit_v1_0
diff --git a/keyboards/1upkeyboards/pi50/rules.mk b/keyboards/1upkeyboards/pi50/rules.mk
deleted file mode 100644
index a9660074af..0000000000
--- a/keyboards/1upkeyboards/pi50/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = 1upkeyboards/pi50/grid
diff --git a/keyboards/1upkeyboards/sweet16/rules.mk b/keyboards/1upkeyboards/sweet16/rules.mk
deleted file mode 100644
index 7d269ac93f..0000000000
--- a/keyboards/1upkeyboards/sweet16/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = 1upkeyboards/sweet16/v1
diff --git a/keyboards/25keys/aleth42/rules.mk b/keyboards/25keys/aleth42/rules.mk
deleted file mode 100644
index 8034ad5440..0000000000
--- a/keyboards/25keys/aleth42/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = 25keys/aleth42/rev1
diff --git a/keyboards/25keys/zinc/rules.mk b/keyboards/25keys/zinc/rules.mk
deleted file mode 100644
index 1edcb0a345..0000000000
--- a/keyboards/25keys/zinc/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = 25keys/zinc/rev1
diff --git a/keyboards/40percentclub/i75/rules.mk b/keyboards/40percentclub/i75/rules.mk
deleted file mode 100644
index 48b0427550..0000000000
--- a/keyboards/40percentclub/i75/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = 40percentclub/i75/promicro
diff --git a/keyboards/40percentclub/polyandry/rules.mk b/keyboards/40percentclub/polyandry/rules.mk
deleted file mode 100644
index 3064c8202c..0000000000
--- a/keyboards/40percentclub/polyandry/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = 40percentclub/polyandry/promicro
diff --git a/keyboards/8pack/rules.mk b/keyboards/8pack/rules.mk
deleted file mode 100644
index 81024a7119..0000000000
--- a/keyboards/8pack/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = 8pack/rev12
diff --git a/keyboards/adkb96/rules.mk b/keyboards/adkb96/rules.mk
deleted file mode 100644
index ac7561b21d..0000000000
--- a/keyboards/adkb96/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = adkb96/rev1
diff --git a/keyboards/adm42/rules.mk b/keyboards/adm42/rules.mk
deleted file mode 100644
index 06fc88e9f6..0000000000
--- a/keyboards/adm42/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = adm42/rev4 \ No newline at end of file
diff --git a/keyboards/aeboards/constellation/rules.mk b/keyboards/aeboards/constellation/rules.mk
deleted file mode 100755
index bd2af5d22b..0000000000
--- a/keyboards/aeboards/constellation/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = aeboards/constellation/rev1
diff --git a/keyboards/aeboards/ext65/rules.mk b/keyboards/aeboards/ext65/rules.mk
deleted file mode 100644
index d8b0595a5d..0000000000
--- a/keyboards/aeboards/ext65/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = aeboards/ext65/rev2 \ No newline at end of file
diff --git a/keyboards/aeboards/satellite/rules.mk b/keyboards/aeboards/satellite/rules.mk
deleted file mode 100644
index bc32615d2b..0000000000
--- a/keyboards/aeboards/satellite/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = aeboards/satellite/rev1
diff --git a/keyboards/atreus/rules.mk b/keyboards/atreus/rules.mk
deleted file mode 100644
index d933cb327d..0000000000
--- a/keyboards/atreus/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = atreus/astar
diff --git a/keyboards/atreyu/rules.mk b/keyboards/atreyu/rules.mk
deleted file mode 100644
index 4daffe6b9d..0000000000
--- a/keyboards/atreyu/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = atreyu/rev1
diff --git a/keyboards/biacco42/ergo42/rules.mk b/keyboards/biacco42/ergo42/rules.mk
deleted file mode 100644
index 18059c0a3b..0000000000
--- a/keyboards/biacco42/ergo42/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = biacco42/ergo42/rev1
diff --git a/keyboards/binepad/bn009/rules.mk b/keyboards/binepad/bn009/rules.mk
deleted file mode 100644
index 74214d60ed..0000000000
--- a/keyboards/binepad/bn009/rules.mk
+++ /dev/null
@@ -1,3 +0,0 @@
-# This file is mostly left blank
-
-DEFAULT_FOLDER = binepad/bn009/r2
diff --git a/keyboards/binepad/bnr1/rules.mk b/keyboards/binepad/bnr1/rules.mk
deleted file mode 100755
index ce85c57404..0000000000
--- a/keyboards/binepad/bnr1/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = binepad/bnr1/v2
diff --git a/keyboards/boston_meetup/rules.mk b/keyboards/boston_meetup/rules.mk
deleted file mode 100644
index 6d6745a0e5..0000000000
--- a/keyboards/boston_meetup/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = boston_meetup/2019
diff --git a/keyboards/bpiphany/frosty_flake/rules.mk b/keyboards/bpiphany/frosty_flake/rules.mk
deleted file mode 100644
index e5402b32f7..0000000000
--- a/keyboards/bpiphany/frosty_flake/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER=bpiphany/frosty_flake/20140521
diff --git a/keyboards/bpiphany/pegasushoof/rules.mk b/keyboards/bpiphany/pegasushoof/rules.mk
deleted file mode 100644
index 20adecaa08..0000000000
--- a/keyboards/bpiphany/pegasushoof/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER=bpiphany/pegasushoof/2013
diff --git a/keyboards/buzzard/rules.mk b/keyboards/buzzard/rules.mk
deleted file mode 100644
index 2f66720b77..0000000000
--- a/keyboards/buzzard/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = buzzard/rev1
diff --git a/keyboards/clickety_split/leeloo/rules.mk b/keyboards/clickety_split/leeloo/rules.mk
deleted file mode 100644
index 9d35960f7c..0000000000
--- a/keyboards/clickety_split/leeloo/rules.mk
+++ /dev/null
@@ -1,2 +0,0 @@
-# Default Folder
-DEFAULT_FOLDER = clickety_split/leeloo/rev3
diff --git a/keyboards/crkbd/rules.mk b/keyboards/crkbd/rules.mk
deleted file mode 100644
index 836587e45e..0000000000
--- a/keyboards/crkbd/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = crkbd/rev1
diff --git a/keyboards/custommk/genesis/rules.mk b/keyboards/custommk/genesis/rules.mk
deleted file mode 100644
index 3d64c0af2b..0000000000
--- a/keyboards/custommk/genesis/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = custommk/genesis/rev2
diff --git a/keyboards/cxt_studio/12e3/keyboard.json b/keyboards/cxt_studio/12e3/keyboard.json
new file mode 100644
index 0000000000..763f6bd5b9
--- /dev/null
+++ b/keyboards/cxt_studio/12e3/keyboard.json
@@ -0,0 +1,99 @@
+{
+ "manufacturer": "cxt_studio",
+ "keyboard_name": "cxt_studio 12E3",
+ "maintainer": "muge",
+ "bootloader": "atmel-dfu",
+ "diode_direction": "ROW2COL",
+ "features": {
+ "bootmagic": true,
+ "extrakey": true,
+ "mousekey": true,
+ "nkro": true,
+ "encoder": true,
+ "rgb_matrix": true
+ },
+ "ws2812": {
+ "pin": "F7"
+ },
+ "matrix_pins": {
+ "cols": ["D4", "D7", "B4", "B5"],
+ "rows": ["C7", "C6", "D6", "F4"]
+ },
+ "encoder": {
+ "rotary": [
+ {"pin_a": "F5", "pin_b": "F6"},
+ {"pin_a": "E6", "pin_b": "F0"},
+ {"pin_a": "B3", "pin_b": "B2", "resolution": 2}
+ ]
+ },
+ "processor": "atmega32u4",
+ "rgb_matrix": {
+ "animations": {
+ "breathing": 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
+ },
+ "default": {
+ "animation": "solid_reactive_simple"
+ },
+ "driver": "ws2812",
+ "layout": [
+ {"flags": 4, "matrix": [0, 3], "x": 3, "y": 0},
+ {"flags": 4, "matrix": [0, 2], "x": 2, "y": 0},
+ {"flags": 4, "matrix": [0, 1], "x": 1, "y": 0},
+ {"flags": 4, "matrix": [0, 0], "x": 0, "y": 0},
+ {"flags": 4, "matrix": [1, 0], "x": 0, "y": 1},
+ {"flags": 4, "matrix": [1, 1], "x": 1, "y": 1},
+ {"flags": 4, "matrix": [1, 2], "x": 2, "y": 1},
+ {"flags": 4, "matrix": [1, 3], "x": 3, "y": 1},
+ {"flags": 4, "matrix": [2, 3], "x": 3, "y": 2},
+ {"flags": 4, "matrix": [2, 2], "x": 2, "y": 2},
+ {"flags": 4, "matrix": [2, 1], "x": 1, "y": 2},
+ {"flags": 4, "matrix": [2, 0], "x": 0, "y": 2}
+ ]
+ },
+ "url": "",
+ "usb": {
+ "device_version": "1.0.0",
+ "pid": "0x12E3",
+ "vid": "0x0215"
+ },
+ "layouts": {
+ "LAYOUT": {
+ "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": [3, 2], "x": 4, "y": 0},
+ {"matrix": [3, 3], "x": 5, "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": [3, 1], "x": 4, "y": 1, "w": 2, "h": 2},
+
+ {"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}
+ ]
+ }
+ }
+}
+
diff --git a/keyboards/cxt_studio/12e3/keymaps/default/keymap.c b/keyboards/cxt_studio/12e3/keymaps/default/keymap.c
new file mode 100644
index 0000000000..78375680d4
--- /dev/null
+++ b/keyboards/cxt_studio/12e3/keymaps/default/keymap.c
@@ -0,0 +1,40 @@
+// Copyright 2023 QMK
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#include QMK_KEYBOARD_H
+
+enum my_layers {
+ _BASE,
+ _RGBL,
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+ [_BASE] = LAYOUT(
+ KC_PSCR, KC_CUT, KC_COPY, KC_PSTE, MS_BTN3, RM_TOGG,
+ KC_CALC, KC_UNDO, KC_MPLY, KC_MNXT, KC_MUTE,
+ MO(1), KC_LGUI, KC_DEL, KC_APP
+ ),
+
+ [_RGBL] = LAYOUT(
+ RM_NEXT, RM_SATU, KC_INS, KC_DEL, _______, _______,
+ RM_PREV, RM_SATD, KC_PGUP, KC_HOME, _______,
+ _______, QK_BOOT, KC_PGDN, KC_END
+ ),
+};
+
+#if defined(ENCODER_MAP_ENABLE)
+const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
+ // Encoders: Left, Right, Big
+ [_BASE] = {
+ ENCODER_CCW_CW(MS_WHLD, MS_WHLU),
+ ENCODER_CCW_CW(KC_PGDN, KC_PGUP),
+ ENCODER_CCW_CW(KC_VOLD, KC_VOLU)
+ },
+ [_RGBL] = {
+ ENCODER_CCW_CW(RM_HUED, RM_HUEU),
+ ENCODER_CCW_CW(RM_SPDD, RM_SPDU),
+ ENCODER_CCW_CW(RM_VALD, RM_VALU)
+ },
+};
+#endif
diff --git a/keyboards/cxt_studio/12e3/keymaps/default/rules.mk b/keyboards/cxt_studio/12e3/keymaps/default/rules.mk
new file mode 100644
index 0000000000..ee32568148
--- /dev/null
+++ b/keyboards/cxt_studio/12e3/keymaps/default/rules.mk
@@ -0,0 +1 @@
+ENCODER_MAP_ENABLE = yes
diff --git a/keyboards/cxt_studio/12e3/readme.md b/keyboards/cxt_studio/12e3/readme.md
new file mode 100644
index 0000000000..8ea527f473
--- /dev/null
+++ b/keyboards/cxt_studio/12e3/readme.md
@@ -0,0 +1,27 @@
+# cxt_studio/12e3
+
+![cxt_studio/12e3](https://i.postimg.cc/NFK8rY8N/M5rtTSP.png)
+
+3x4 ortho layout, with 3 encoders.
+
+* Keyboard Maintainer: [muge](https://github.com/muge)
+* Hardware Supported: CXT Studio 12E3
+* Hardware Availability: AliExpress, Taobao
+
+Make example for this keyboard (after setting up your build environment):
+
+ make cxt_studio/12e3:default
+
+Flashing example for this keyboard:
+
+ make cxt_studio/12e3: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, located under the large encoder, on the right side
+* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available. It is included in the default layout
diff --git a/keyboards/cxt_studio/12e4/config.h b/keyboards/cxt_studio/12e4/config.h
new file mode 100644
index 0000000000..de0fbad7ec
--- /dev/null
+++ b/keyboards/cxt_studio/12e4/config.h
@@ -0,0 +1,6 @@
+// Copyright 2023 Colin Kinloch (@ColinKinloch)
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#pragma once
+
+#define RGB_MATRIX_TYPING_HEATMAP_SPREAD 9
diff --git a/keyboards/cxt_studio/cxt_studio.c b/keyboards/cxt_studio/12e4/cxt_studio.c
index 2b36905340..03a15e4d48 100644
--- a/keyboards/cxt_studio/cxt_studio.c
+++ b/keyboards/cxt_studio/12e4/cxt_studio.c
@@ -3,8 +3,6 @@
#include "quantum.h"
-static uint8_t anim = 0;
-
#ifdef ENCODER_ENABLE
bool encoder_update_kb(uint8_t index, bool clockwise) {
if (!encoder_update_user(index, clockwise)) {
@@ -21,32 +19,26 @@ bool encoder_update_kb(uint8_t index, bool clockwise) {
break;
case 1: {
if (clockwise) {
- rgblight_increase_hue();
+ rgb_matrix_increase_hue();
} else {
- rgblight_decrease_hue();
+ rgb_matrix_decrease_hue();
}
}
break;
case 2: {
if (clockwise) {
- rgblight_increase_val();
+ rgb_matrix_increase_val();
} else {
- rgblight_decrease_val();
+ rgb_matrix_decrease_val();
}
}
break;
case 3: {
if (clockwise) {
- anim++;
+ rgb_matrix_step();
} else {
- anim--;
+ rgb_matrix_step_reverse();
}
- if (anim >= RGB_MATRIX_EFFECT_MAX) {
- anim = 0;
- } else if (anim < 0) {
- anim = RGB_MATRIX_EFFECT_MAX - 1;
- }
- rgblight_mode(anim);
}
break;
}
diff --git a/keyboards/cxt_studio/keyboard.json b/keyboards/cxt_studio/12e4/keyboard.json
index 7ee7b52d50..b48e75f4ca 100644
--- a/keyboards/cxt_studio/keyboard.json
+++ b/keyboards/cxt_studio/12e4/keyboard.json
@@ -1,6 +1,6 @@
{
"manufacturer": "CXT",
- "keyboard_name": "cxt_studio",
+ "keyboard_name": "cxt_studio 12E4",
"maintainer": "ColinKinloch",
"bootloader": "atmel-dfu",
"diode_direction": "ROW2COL",
diff --git a/keyboards/cxt_studio/keymaps/default/keymap.json b/keyboards/cxt_studio/12e4/keymaps/default/keymap.json
index 9e31833520..b05d3ba179 100644
--- a/keyboards/cxt_studio/keymaps/default/keymap.json
+++ b/keyboards/cxt_studio/12e4/keymaps/default/keymap.json
@@ -1,5 +1,5 @@
{
- "keyboard": "cxt_studio",
+ "keyboard": "cxt_studio/12e4",
"keymap": "default",
"layout": "LAYOUT",
"layers": [
diff --git a/keyboards/cxt_studio/readme.md b/keyboards/cxt_studio/12e4/readme.md
index 6397a3fdfd..760c3544b4 100644
--- a/keyboards/cxt_studio/readme.md
+++ b/keyboards/cxt_studio/12e4/readme.md
@@ -1,20 +1,20 @@
-# cxt_studio
+# cxt_studio/12e4
-![cxt_studio](https://i.imgur.com/AMCTioSh.jpeg)
+![cxt_studio/12e4](https://i.imgur.com/AMCTioSh.jpeg)
3x4 ortho rgb lighting 4 knobs.
* Keyboard Maintainer: [Colin Kinloch](https://github.com/ColinKinloch)
-* Hardware Supported: CXT-Studio
+* Hardware Supported: CXT-Studio/12E4
* Hardware Availability: AliExpress. I think the manufacturer is on Taobao.
Make example for this keyboard (after setting up your build environment):
- make cxt_studio:default
+ make cxt_studio/12e4:default
Flashing example for this keyboard:
- make cxt_studio:default:flash
+ make cxt_studio/12e4: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/cxt_studio/config.h b/keyboards/cxt_studio/config.h
deleted file mode 100644
index e56e07a254..0000000000
--- a/keyboards/cxt_studio/config.h
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright 2023 Colin Kinloch (@ColinKinloch)
-// SPDX-License-Identifier: GPL-2.0-or-later
-
-#pragma once
-
-#define RGB_MATRIX_TYPING_HEATMAP_SPREAD 9
-
-/*
- * 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/dailycraft/bat43/rules.mk b/keyboards/dailycraft/bat43/rules.mk
deleted file mode 100644
index b152851948..0000000000
--- a/keyboards/dailycraft/bat43/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = dailycraft/bat43/rev2
diff --git a/keyboards/dailycraft/claw44/rules.mk b/keyboards/dailycraft/claw44/rules.mk
deleted file mode 100644
index 0344b3ee28..0000000000
--- a/keyboards/dailycraft/claw44/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = dailycraft/claw44/rev1
diff --git a/keyboards/dailycraft/sandbox/rules.mk b/keyboards/dailycraft/sandbox/rules.mk
deleted file mode 100644
index c62f01e18f..0000000000
--- a/keyboards/dailycraft/sandbox/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = dailycraft/sandbox/rev2
diff --git a/keyboards/dailycraft/wings42/rules.mk b/keyboards/dailycraft/wings42/rules.mk
deleted file mode 100644
index b027fec9b9..0000000000
--- a/keyboards/dailycraft/wings42/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = dailycraft/wings42/rev2
diff --git a/keyboards/darkproject/kd83a_bfg_edition/config.h b/keyboards/darkproject/kd83a_bfg_edition/config.h
index 880aabd5d7..fce00d29ab 100644
--- a/keyboards/darkproject/kd83a_bfg_edition/config.h
+++ b/keyboards/darkproject/kd83a_bfg_edition/config.h
@@ -22,8 +22,11 @@
/* SPI Config for LED Driver */
#define SPI_DRIVER SPIDQ
#define SPI_SCK_PIN A5
+#define SPI_SCK_PAL_MODE 5
#define SPI_MOSI_PIN A7
+#define SPI_MOSI_PAL_MODE 5
#define SPI_MISO_PIN A6
+#define SPI_MISO_PAL_MODE 5
#define AW20216S_CS_PIN_1 A15
#define AW20216S_CS_PIN_2 B15
diff --git a/keyboards/darkproject/kd87a_bfg_edition/config.h b/keyboards/darkproject/kd87a_bfg_edition/config.h
index a32f712231..9e68844daf 100644
--- a/keyboards/darkproject/kd87a_bfg_edition/config.h
+++ b/keyboards/darkproject/kd87a_bfg_edition/config.h
@@ -22,8 +22,11 @@
/* SPI Config for LED Driver */
#define SPI_DRIVER SPIDQ
#define SPI_SCK_PIN A5
+#define SPI_SCK_PAL_MODE 5
#define SPI_MOSI_PIN A7
+#define SPI_MOSI_PAL_MODE 5
#define SPI_MISO_PIN A6
+#define SPI_MISO_PAL_MODE 5
#define AW20216S_CS_PIN_1 A15
#define AW20216S_CS_PIN_2 B15
diff --git a/keyboards/delikeeb/vanana/rules.mk b/keyboards/delikeeb/vanana/rules.mk
deleted file mode 100644
index ff3dc1df61..0000000000
--- a/keyboards/delikeeb/vanana/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = delikeeb/vanana/rev2
diff --git a/keyboards/delikeeb/waaffle/rev3/rules.mk b/keyboards/delikeeb/waaffle/rev3/rules.mk
deleted file mode 100644
index dbd58ca5bf..0000000000
--- a/keyboards/delikeeb/waaffle/rev3/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = delikeeb/waaffle/rev3/pro_micro
diff --git a/keyboards/deltasplit75/rules.mk b/keyboards/deltasplit75/rules.mk
deleted file mode 100644
index ee888337e5..0000000000
--- a/keyboards/deltasplit75/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = deltasplit75/v2
diff --git a/keyboards/dp3000/rules.mk b/keyboards/dp3000/rules.mk
deleted file mode 100644
index 0f44aefd44..0000000000
--- a/keyboards/dp3000/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = dp3000/rev1
diff --git a/keyboards/drhigsby/ogurec/rules.mk b/keyboards/drhigsby/ogurec/rules.mk
deleted file mode 100644
index ed83fb6386..0000000000
--- a/keyboards/drhigsby/ogurec/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = drhigsby/ogurec/left_pm
diff --git a/keyboards/duck/octagon/rules.mk b/keyboards/duck/octagon/rules.mk
deleted file mode 100644
index 46bd457bb7..0000000000
--- a/keyboards/duck/octagon/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = duck/octagon/v2 \ No newline at end of file
diff --git a/keyboards/duck/orion/rules.mk b/keyboards/duck/orion/rules.mk
deleted file mode 100644
index 3788e0fbfb..0000000000
--- a/keyboards/duck/orion/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = duck/orion/v3
diff --git a/keyboards/ducky/one2mini/rules.mk b/keyboards/ducky/one2mini/rules.mk
deleted file mode 100644
index 628be832ee..0000000000
--- a/keyboards/ducky/one2mini/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = ducky/one2mini/1861st
diff --git a/keyboards/ducky/one2sf/rules.mk b/keyboards/ducky/one2sf/rules.mk
deleted file mode 100644
index 0c9ddb957f..0000000000
--- a/keyboards/ducky/one2sf/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = ducky/one2sf/1967st
diff --git a/keyboards/dumbpad/rules.mk b/keyboards/dumbpad/rules.mk
deleted file mode 100644
index 87ec1ab01b..0000000000
--- a/keyboards/dumbpad/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = dumbpad/v0x
diff --git a/keyboards/durgod/galaxy/rules.mk b/keyboards/durgod/galaxy/rules.mk
deleted file mode 100644
index ff1e1ff205..0000000000
--- a/keyboards/durgod/galaxy/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER=durgod/dgk6x/galaxy
diff --git a/keyboards/durgod/venus/rules.mk b/keyboards/durgod/venus/rules.mk
deleted file mode 100644
index 57acf2a48c..0000000000
--- a/keyboards/durgod/venus/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER=durgod/dgk6x/venus
diff --git a/keyboards/dztech/tofu/ii/rules.mk b/keyboards/dztech/tofu/ii/rules.mk
deleted file mode 100644
index c08cfdaae9..0000000000
--- a/keyboards/dztech/tofu/ii/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = dztech/tofu/ii/v1
diff --git a/keyboards/dztech/tofu/jr/rules.mk b/keyboards/dztech/tofu/jr/rules.mk
deleted file mode 100644
index 7333c613fd..0000000000
--- a/keyboards/dztech/tofu/jr/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = dztech/tofu/jr/v1
diff --git a/keyboards/eco/rules.mk b/keyboards/eco/rules.mk
deleted file mode 100644
index a3d419658b..0000000000
--- a/keyboards/eco/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = eco/rev2
diff --git a/keyboards/eek/rules.mk b/keyboards/eek/rules.mk
deleted file mode 100644
index 65b8265b53..0000000000
--- a/keyboards/eek/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = eek/silk_down
diff --git a/keyboards/ergoslab/rules.mk b/keyboards/ergoslab/rules.mk
deleted file mode 100644
index 8eb40c77d5..0000000000
--- a/keyboards/ergoslab/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = ergoslab/rev1
diff --git a/keyboards/ergotravel/rules.mk b/keyboards/ergotravel/rules.mk
deleted file mode 100644
index 3f30277bb5..0000000000
--- a/keyboards/ergotravel/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = ergotravel/rev1
diff --git a/keyboards/evyd13/atom47/rules.mk b/keyboards/evyd13/atom47/rules.mk
deleted file mode 100644
index 9d5b753077..0000000000
--- a/keyboards/evyd13/atom47/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = evyd13/atom47/rev4
diff --git a/keyboards/exclusive/e85/rules.mk b/keyboards/exclusive/e85/rules.mk
deleted file mode 100644
index 8eef46d0ab..0000000000
--- a/keyboards/exclusive/e85/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = exclusive/e85/hotswap
diff --git a/keyboards/ferris/0_1/matrix.c b/keyboards/ferris/0_1/matrix.c
index a3e2bebba6..c05b193c1a 100644
--- a/keyboards/ferris/0_1/matrix.c
+++ b/keyboards/ferris/0_1/matrix.c
@@ -29,7 +29,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "i2c_master.h"
extern i2c_status_t mcp23017_status;
-#define I2C_TIMEOUT 1000
+#define MCP23017_I2C_TIMEOUT 1000
// For a better understanding of the i2c protocol, this is a good read:
// https://www.robot-electronics.co.uk/i2c-tutorial
@@ -41,9 +41,7 @@ extern i2c_status_t mcp23017_status;
// All address pins of the mcp23017 are connected to the ground on the ferris
// | 0 | 1 | 0 | 0 | A2 | A1 | A0 |
// | 0 | 1 | 0 | 0 | 0 | 0 | 0 |
-#define I2C_ADDR 0b0100000
-#define I2C_ADDR_WRITE ((I2C_ADDR << 1) | I2C_WRITE)
-#define I2C_ADDR_READ ((I2C_ADDR << 1) | I2C_READ)
+#define I2C_ADDR (0b0100000 << 1)
// Register addresses
// See https://github.com/adafruit/Adafruit-MCP23017-Arduino-Library/blob/master/Adafruit_MCP23017.h
@@ -51,8 +49,8 @@ extern i2c_status_t mcp23017_status;
#define IODIRB 0x01
#define GPPUA 0x0C // GPIO pull-up resistor register
#define GPPUB 0x0D
-#define GPIOA 0x12 // general purpose i/o port register (write modifies OLAT)
-#define GPIOB 0x13
+#define MCP23017_GPIOA 0x12 // general purpose i/o port register (write modifies OLAT)
+#define MCP23017_GPIOB 0x13
#define OLATA 0x14 // output latch register
#define OLATB 0x15
@@ -60,14 +58,14 @@ bool i2c_initialized = 0;
i2c_status_t mcp23017_status = I2C_ADDR;
uint8_t init_mcp23017(void) {
- print("starting init");
+ print("init mcp23017\n");
mcp23017_status = I2C_ADDR;
// I2C subsystem
if (i2c_initialized == 0) {
i2c_init(); // on pins D(1,0)
i2c_initialized = true;
- wait_ms(I2C_TIMEOUT);
+ wait_ms(MCP23017_I2C_TIMEOUT);
}
// set pin direction
@@ -76,8 +74,10 @@ uint8_t init_mcp23017(void) {
// - driving : output : 0
// This means: we will read all the bits on GPIOA
// This means: we will write to the pins 0-4 on GPIOB (in select_rows)
- uint8_t buf[] = {IODIRA, 0b11111111, 0b11110000};
- mcp23017_status = i2c_transmit(I2C_ADDR_WRITE, buf, sizeof(buf), I2C_TIMEOUT);
+ uint8_t buf[] = {0b11111111, 0b11110000};
+ print("before transmit\n");
+ mcp23017_status = i2c_write_register(I2C_ADDR, IODIRA, buf, sizeof(buf), MCP23017_I2C_TIMEOUT);
+ uprintf("after transmit %i\n", mcp23017_status);
if (!mcp23017_status) {
// set pull-up
// - unused : on : 1
@@ -85,8 +85,8 @@ uint8_t init_mcp23017(void) {
// - driving : off : 0
// This means: we will read all the bits on GPIOA
// This means: we will write to the pins 0-4 on GPIOB (in select_rows)
- uint8_t pullup_buf[] = {GPPUA, 0b11111111, 0b11110000};
- mcp23017_status = i2c_transmit(I2C_ADDR_WRITE, pullup_buf, sizeof(pullup_buf), I2C_TIMEOUT);
+ mcp23017_status = i2c_write_register(I2C_ADDR, GPPUA, buf, sizeof(buf), MCP23017_I2C_TIMEOUT);
+ uprintf("after transmit2 %i\n", mcp23017_status);
}
return mcp23017_status;
}
@@ -144,12 +144,12 @@ bool matrix_scan_custom(matrix_row_t current_matrix[]) {
// if (++mcp23017_reset_loop >= 1300) {
// since mcp23017_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
- dprint("trying to reset mcp23017\n");
+ print("trying to reset mcp23017\n");
mcp23017_status = init_mcp23017();
if (mcp23017_status) {
- dprint("right side not responding\n");
+ print("right side not responding\n");
} else {
- dprint("right side attached\n");
+ print("right side attached\n");
}
}
}
@@ -204,18 +204,13 @@ static matrix_row_t read_cols(uint8_t row) {
if (mcp23017_status) { // if there was an error
return 0;
} else {
- uint8_t buf[] = {GPIOA};
- mcp23017_status = i2c_transmit(I2C_ADDR_WRITE, buf, sizeof(buf), I2C_TIMEOUT);
// We read all the pins on GPIOA.
// The initial state was all ones and any depressed key at a given column for the currently selected row will have its bit flipped to zero.
// The return value is a row as represented in the generic matrix code were the rightmost bits represent the lower columns and zeroes represent non-depressed keys while ones represent depressed keys.
// Since the pins connected to eact columns are sequential, and counting from zero up (col 5 -> GPIOA0, col 6 -> GPIOA1 and so on), the only transformation needed is a bitwise not to swap all zeroes and ones.
uint8_t data[] = {0};
- if (!mcp23017_status) {
- mcp23017_status = i2c_receive(I2C_ADDR_READ, data, sizeof(data), I2C_TIMEOUT);
- data[0] = ~(data[0]);
- }
- return data[0];
+ mcp23017_status = i2c_read_register(I2C_ADDR, MCP23017_GPIOA, data, sizeof(data), MCP23017_I2C_TIMEOUT);
+ return ~data[0];
}
}
}
@@ -236,7 +231,7 @@ static void unselect_rows(void) {
static void select_row(uint8_t row) {
if (row < MATRIX_ROWS_PER_SIDE) {
- // select on atmega32u4
+ // select on MCU
pin_t matrix_row_pins_mcu[MATRIX_ROWS_PER_SIDE] = MATRIX_ROW_PINS_MCU;
pin_t pin = matrix_row_pins_mcu[row];
gpio_set_pin_output(pin);
@@ -248,8 +243,8 @@ static void select_row(uint8_t row) {
} else {
// Select the desired row by writing a byte for the entire GPIOB bus where only the bit representing the row we want to select is a zero (write instruction) and every other bit is a one.
// Note that the row - MATRIX_ROWS_PER_SIDE reflects the fact that being on the right hand, the columns are numbered from MATRIX_ROWS_PER_SIDE to MATRIX_ROWS, but the pins we want to write to are indexed from zero up on the GPIOB bus.
- uint8_t buf[] = {GPIOB, 0xFF & ~(1 << (row - MATRIX_ROWS_PER_SIDE))};
- mcp23017_status = i2c_transmit(I2C_ADDR_WRITE, buf, sizeof(buf), I2C_TIMEOUT);
+ uint8_t buf[] = {0xFF & ~(1 << (row - MATRIX_ROWS_PER_SIDE))};
+ mcp23017_status = i2c_write_register(I2C_ADDR, MCP23017_GPIOB, buf, sizeof(buf), MCP23017_I2C_TIMEOUT);
}
}
}
diff --git a/keyboards/ferris/0_2/matrix.c b/keyboards/ferris/0_2/matrix.c
index 74fab717a1..76bbcaf7b5 100644
--- a/keyboards/ferris/0_2/matrix.c
+++ b/keyboards/ferris/0_2/matrix.c
@@ -30,8 +30,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
extern i2c_status_t mcp23017_status;
#define MCP23017_I2C_TIMEOUT 1000
-#define I2C_WRITE 0x00
-#define I2C_READ 0x01
+
// For a better understanding of the i2c protocol, this is a good read:
// https://www.robot-electronics.co.uk/i2c-tutorial
diff --git a/keyboards/fortitude60/rules.mk b/keyboards/fortitude60/rules.mk
deleted file mode 100644
index ef158b8cf0..0000000000
--- a/keyboards/fortitude60/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = fortitude60/rev1
diff --git a/keyboards/fruitykeeb/fruitbar/r1/rules.mk b/keyboards/fruitykeeb/fruitbar/r1/rules.mk
deleted file mode 100644
index 3328de6095..0000000000
--- a/keyboards/fruitykeeb/fruitbar/r1/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = fruitykeeb/fruitbar/r1/promicro
diff --git a/keyboards/ghs/jem/rules.mk b/keyboards/ghs/jem/rules.mk
deleted file mode 100644
index e96c00e5c0..0000000000
--- a/keyboards/ghs/jem/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = ghs/jem/soldered
diff --git a/keyboards/gmmk/gmmk2/p96/config.h b/keyboards/gmmk/gmmk2/p96/config.h
index 1b246e4f3f..852d29df65 100644
--- a/keyboards/gmmk/gmmk2/p96/config.h
+++ b/keyboards/gmmk/gmmk2/p96/config.h
@@ -22,8 +22,11 @@
/* SPI Config for LED Driver */
#define SPI_DRIVER SPIDQ
#define SPI_SCK_PIN A5
+#define SPI_SCK_PAL_MODE 5
#define SPI_MOSI_PIN A7
+#define SPI_MOSI_PAL_MODE 5
#define SPI_MISO_PIN A6
+#define SPI_MISO_PAL_MODE 5
#define AW20216S_CS_PIN_1 A15
#define AW20216S_CS_PIN_2 B15
diff --git a/keyboards/hadron/rules.mk b/keyboards/hadron/rules.mk
deleted file mode 100644
index 8498675750..0000000000
--- a/keyboards/hadron/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = hadron/ver2
diff --git a/keyboards/handwired/bento/rules.mk b/keyboards/handwired/bento/rules.mk
deleted file mode 100644
index e160faab83..0000000000
--- a/keyboards/handwired/bento/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = handwired/bento/rev1
diff --git a/keyboards/handwired/dactyl_manuform/6x6/rules.mk b/keyboards/handwired/dactyl_manuform/6x6/rules.mk
deleted file mode 100644
index 29194b429e..0000000000
--- a/keyboards/handwired/dactyl_manuform/6x6/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = handwired/dactyl_manuform/6x6/promicro
diff --git a/keyboards/handwired/ms_sculpt_mobile/rules.mk b/keyboards/handwired/ms_sculpt_mobile/rules.mk
deleted file mode 100644
index 8a3cc6858c..0000000000
--- a/keyboards/handwired/ms_sculpt_mobile/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = handwired/ms_sculpt_mobile/teensy2pp
diff --git a/keyboards/handwired/onekey/at_start_f415/board.h b/keyboards/handwired/onekey/at_start_f415/board.h
index f4adc2d418..a31d8f8e37 100644
--- a/keyboards/handwired/onekey/at_start_f415/board.h
+++ b/keyboards/handwired/onekey/at_start_f415/board.h
@@ -1,5 +1,5 @@
-// Copyright 2023-2024 HorrorTroll <https://github.com/HorrorTroll>
-// Copyright 2023-2024 Zhaqian <https://github.com/zhaqian12>
+// Copyright 2023-2025 HorrorTroll <https://github.com/HorrorTroll>
+// Copyright 2023-2025 Zhaqian <https://github.com/zhaqian12>
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
diff --git a/keyboards/handwired/onekey/at_start_f415/config.h b/keyboards/handwired/onekey/at_start_f415/config.h
index 0e47e813c5..41aece900c 100644
--- a/keyboards/handwired/onekey/at_start_f415/config.h
+++ b/keyboards/handwired/onekey/at_start_f415/config.h
@@ -1,5 +1,5 @@
-// Copyright 2023-2024 HorrorTroll <https://github.com/HorrorTroll>
-// Copyright 2023-2024 Zhaqian <https://github.com/zhaqian12>
+// Copyright 2023-2025 HorrorTroll <https://github.com/HorrorTroll>
+// Copyright 2023-2025 Zhaqian <https://github.com/zhaqian12>
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
diff --git a/keyboards/handwired/onekey/at_start_f415/halconf.h b/keyboards/handwired/onekey/at_start_f415/halconf.h
index 1423633d15..e3c075936d 100644
--- a/keyboards/handwired/onekey/at_start_f415/halconf.h
+++ b/keyboards/handwired/onekey/at_start_f415/halconf.h
@@ -1,5 +1,5 @@
-// Copyright 2023-2024 HorrorTroll <https://github.com/HorrorTroll>
-// Copyright 2023-2024 Zhaqian <https://github.com/zhaqian12>
+// Copyright 2023-2025 HorrorTroll <https://github.com/HorrorTroll>
+// Copyright 2023-2025 Zhaqian <https://github.com/zhaqian12>
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
diff --git a/keyboards/handwired/onekey/at_start_f415/keyboard.json b/keyboards/handwired/onekey/at_start_f415/keyboard.json
index f598923a6a..6e5683a474 100644
--- a/keyboards/handwired/onekey/at_start_f415/keyboard.json
+++ b/keyboards/handwired/onekey/at_start_f415/keyboard.json
@@ -17,4 +17,8 @@
"ws2812": {
"pin": "B0"
}
+ "apa102": {
+ "data_pin": "B0",
+ "clock_pin": "B1"
+ }
}
diff --git a/keyboards/handwired/onekey/at_start_f415/mcuconf.h b/keyboards/handwired/onekey/at_start_f415/mcuconf.h
index 9bc11d507c..246f6762d3 100644
--- a/keyboards/handwired/onekey/at_start_f415/mcuconf.h
+++ b/keyboards/handwired/onekey/at_start_f415/mcuconf.h
@@ -1,5 +1,5 @@
-// Copyright 2023-2024 HorrorTroll <https://github.com/HorrorTroll>
-// Copyright 2023-2024 Zhaqian <https://github.com/zhaqian12>
+// Copyright 2023-2025 HorrorTroll <https://github.com/HorrorTroll>
+// Copyright 2023-2025 Zhaqian <https://github.com/zhaqian12>
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
diff --git a/keyboards/handwired/onekey/rules.mk b/keyboards/handwired/onekey/rules.mk
deleted file mode 100644
index 2094801ed9..0000000000
--- a/keyboards/handwired/onekey/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = handwired/onekey/promicro
diff --git a/keyboards/handwired/pill60/rules.mk b/keyboards/handwired/pill60/rules.mk
deleted file mode 100644
index 9299a64d61..0000000000
--- a/keyboards/handwired/pill60/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = handwired/pill60/bluepill
diff --git a/keyboards/handwired/postageboard/rules.mk b/keyboards/handwired/postageboard/rules.mk
deleted file mode 100644
index a7fcf6bea6..0000000000
--- a/keyboards/handwired/postageboard/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER=handwired/postageboard/mini
diff --git a/keyboards/handwired/qc60/rules.mk b/keyboards/handwired/qc60/rules.mk
deleted file mode 100644
index 4905848cf9..0000000000
--- a/keyboards/handwired/qc60/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = handwired/qc60/proto
diff --git a/keyboards/handwired/sono1/rules.mk b/keyboards/handwired/sono1/rules.mk
deleted file mode 100644
index 9b472f28f2..0000000000
--- a/keyboards/handwired/sono1/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = handwired/sono1/t2pp
diff --git a/keyboards/handwired/splittest/rules.mk b/keyboards/handwired/splittest/rules.mk
deleted file mode 100644
index ae4d823b53..0000000000
--- a/keyboards/handwired/splittest/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = handwired/splittest/promicro
diff --git a/keyboards/handwired/stef9998/split_5x7/rules.mk b/keyboards/handwired/stef9998/split_5x7/rules.mk
deleted file mode 100644
index f06c490f00..0000000000
--- a/keyboards/handwired/stef9998/split_5x7/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = handwired/stef9998/split_5x7/rev1
diff --git a/keyboards/handwired/symmetric70_proto/promicro/rules.mk b/keyboards/handwired/symmetric70_proto/promicro/rules.mk
deleted file mode 100644
index 7aa985b3f1..0000000000
--- a/keyboards/handwired/symmetric70_proto/promicro/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = handwired/symmetric70_proto/promicro/base
diff --git a/keyboards/handwired/symmetric70_proto/proton_c/rules.mk b/keyboards/handwired/symmetric70_proto/proton_c/rules.mk
deleted file mode 100644
index 28c4536e4b..0000000000
--- a/keyboards/handwired/symmetric70_proto/proton_c/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = handwired/symmetric70_proto/proton_c/base
diff --git a/keyboards/handwired/unk/rules.mk b/keyboards/handwired/unk/rules.mk
deleted file mode 100644
index d4536e0cbb..0000000000
--- a/keyboards/handwired/unk/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = handwired/unk/rev1
diff --git a/keyboards/handwired/xealous/config.h b/keyboards/handwired/xealous/config.h
deleted file mode 100644
index 6cc6b4d1de..0000000000
--- a/keyboards/handwired/xealous/config.h
+++ /dev/null
@@ -1,32 +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 USE_I2C
-#define SCL_CLOCK 800000UL
-
-//#define DEBUG_MATRIX_SCAN_RATE //Use this to determine scan-rate.
-
-#ifdef AUDIO_ENABLE
- #define AUDIO_PIN C6
- #define STARTUP_SONG SONG(STARTUP_SOUND)
- #define NO_MUSIC_MODE
- #define TONE_QWERTY SONG(Q__NOTE(_E4));
- #define TONE_NUMPAD SONG(Q__NOTE(_D4));
-#endif
diff --git a/keyboards/handwired/xealous/matrix.c b/keyboards/handwired/xealous/matrix.c
deleted file mode 100644
index b8ae9fd738..0000000000
--- a/keyboards/handwired/xealous/matrix.c
+++ /dev/null
@@ -1,49 +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/>.
-*/
-
-/*
- * scan matrix
- */
-#include <stdint.h>
-#include <stdbool.h>
-#include <avr/io.h>
-#include "wait.h"
-#include "print.h"
-#include "debug.h"
-#include "util.h"
-#include "matrix.h"
-#include "split_util.h"
-#include "timer.h"
-
-// Copy this code to split_common/matrix.c,
-// and call it instead of the unoptimized col_reader. Scan-rate jumps from 1200->1920
-// Also remove the sleep_us(30), not necessary for this keyboard.
-// In usb_descriptor.c, set .PollingIntervalMS = 0x01
-#define ROW_SHIFTER ((uint8_t)1)
-inline static matrix_row_t optimized_col_reader(void) {
- //MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6, F5, F4 }
- return (PINB & (1 << 6) ? 0 : (ROW_SHIFTER << 0)) |
- (PINB & (1 << 2) ? 0 : (ROW_SHIFTER << 1)) |
- (PINB & (1 << 3) ? 0 : (ROW_SHIFTER << 2)) |
- (PINB & (1 << 1) ? 0 : (ROW_SHIFTER << 3)) |
- (PINF & (1 << 7) ? 0 : (ROW_SHIFTER << 4)) |
- (PINF & (1 << 6) ? 0 : (ROW_SHIFTER << 5)) |
- (PINF & (1 << 5) ? 0 : (ROW_SHIFTER << 6)) |
- (PINF & (1 << 4) ? 0 : (ROW_SHIFTER << 7));
-}
-
-
diff --git a/keyboards/handwired/xealous/rev1/config.h b/keyboards/handwired/xealous/rev1/config.h
index 49be10cce4..2ea66a692c 100644
--- a/keyboards/handwired/xealous/rev1/config.h
+++ b/keyboards/handwired/xealous/rev1/config.h
@@ -18,6 +18,19 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once
+#define USE_I2C
+#define SCL_CLOCK 800000UL
+
+//#define DEBUG_MATRIX_SCAN_RATE //Use this to determine scan-rate.
+
+#ifdef AUDIO_ENABLE
+ #define AUDIO_PIN C6
+ #define STARTUP_SONG SONG(STARTUP_SOUND)
+ #define NO_MUSIC_MODE
+ #define TONE_QWERTY SONG(Q__NOTE(_E4));
+ #define TONE_NUMPAD SONG(Q__NOTE(_D4));
+#endif
+
/*
* Feature disable options
* These options are also useful to firmware size reduction.
diff --git a/keyboards/handwired/xealous/rules.mk b/keyboards/handwired/xealous/rules.mk
deleted file mode 100644
index 4a97d066df..0000000000
--- a/keyboards/handwired/xealous/rules.mk
+++ /dev/null
@@ -1,3 +0,0 @@
-SRC += matrix.c
-
-DEFAULT_FOLDER = handwired/xealous/rev1
diff --git a/keyboards/hillside/46/rules.mk b/keyboards/hillside/46/rules.mk
deleted file mode 100644
index f3e926a8dc..0000000000
--- a/keyboards/hillside/46/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = hillside/46/0_1 \ No newline at end of file
diff --git a/keyboards/hillside/48/rules.mk b/keyboards/hillside/48/rules.mk
deleted file mode 100644
index d8d69d9ec1..0000000000
--- a/keyboards/hillside/48/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = hillside/48/0_1
diff --git a/keyboards/hillside/52/rules.mk b/keyboards/hillside/52/rules.mk
deleted file mode 100644
index 402bc6bb95..0000000000
--- a/keyboards/hillside/52/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = hillside/52/0_1
diff --git a/keyboards/ibm/model_m/mschwingen/mschwingen.c b/keyboards/ibm/model_m/mschwingen/mschwingen.c
index cb4854d8d1..34a878c769 100644
--- a/keyboards/ibm/model_m/mschwingen/mschwingen.c
+++ b/keyboards/ibm/model_m/mschwingen/mschwingen.c
@@ -19,9 +19,12 @@
#include "uart.h"
#include "print.h"
#include "sendchar.h"
-#include "ws2812.h"
#include "sleep_led.h"
+#ifdef KEYBOARD_ibm_model_m_mschwingen_led_ws2812
+#include "ws2812.h"
+#endif
+
#ifdef UART_DEBUG
# undef sendchar
static int8_t capture_sendchar(uint8_t c) {
diff --git a/keyboards/ibnuda/squiggle/rules.mk b/keyboards/ibnuda/squiggle/rules.mk
deleted file mode 100644
index 0214333999..0000000000
--- a/keyboards/ibnuda/squiggle/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = ibnuda/squiggle/rev1
diff --git a/keyboards/idobao/id80/v1/rules.mk b/keyboards/idobao/id80/v1/rules.mk
deleted file mode 100644
index 20283f04be..0000000000
--- a/keyboards/idobao/id80/v1/rules.mk
+++ /dev/null
@@ -1,2 +0,0 @@
-# Defalt to the ansi version
-DEFAULT_FOLDER = idobao/id80/v2/ansi
diff --git a/keyboards/idobao/id80/v3/rules.mk b/keyboards/idobao/id80/v3/rules.mk
deleted file mode 100644
index 218fc05539..0000000000
--- a/keyboards/idobao/id80/v3/rules.mk
+++ /dev/null
@@ -1,2 +0,0 @@
-# Defalt to the ansi version
-DEFAULT_FOLDER = idobao/id80/v3/ansi
diff --git a/keyboards/inett_studio/sq80/rules.mk b/keyboards/inett_studio/sq80/rules.mk
deleted file mode 100644
index d4f8260d93..0000000000
--- a/keyboards/inett_studio/sq80/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = inett_studio/sq80/hotswap_layout_i
diff --git a/keyboards/input_club/infinity60/rules.mk b/keyboards/input_club/infinity60/rules.mk
deleted file mode 100644
index 9c4b1e74c2..0000000000
--- a/keyboards/input_club/infinity60/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = input_club/infinity60/led
diff --git a/keyboards/jacky_studio/bear_65/rules.mk b/keyboards/jacky_studio/bear_65/rules.mk
deleted file mode 100644
index 91bb6f74b9..0000000000
--- a/keyboards/jacky_studio/bear_65/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = jacky_studio/bear_65/rev1
diff --git a/keyboards/jacky_studio/piggy60/rev1/rules.mk b/keyboards/jacky_studio/piggy60/rev1/rules.mk
deleted file mode 100644
index 873e9334ed..0000000000
--- a/keyboards/jacky_studio/piggy60/rev1/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = jacky_studio/piggy60/rev1/solder
diff --git a/keyboards/jacky_studio/piggy60/rules.mk b/keyboards/jacky_studio/piggy60/rules.mk
deleted file mode 100644
index 873e9334ed..0000000000
--- a/keyboards/jacky_studio/piggy60/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = jacky_studio/piggy60/rev1/solder
diff --git a/keyboards/jadookb/jkb65/rules.mk b/keyboards/jadookb/jkb65/rules.mk
deleted file mode 100644
index 2bbb2a41ce..0000000000
--- a/keyboards/jadookb/jkb65/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = jadookb/jkb65/r1
diff --git a/keyboards/jian/rules.mk b/keyboards/jian/rules.mk
deleted file mode 100644
index c19fa00b5c..0000000000
--- a/keyboards/jian/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = jian/rev2
diff --git a/keyboards/jiran/rules.mk b/keyboards/jiran/rules.mk
deleted file mode 100644
index 3ffe13302d..0000000000
--- a/keyboards/jiran/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = jiran/rev1
diff --git a/keyboards/jones/rules.mk b/keyboards/jones/rules.mk
deleted file mode 100644
index 9f0da2abec..0000000000
--- a/keyboards/jones/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = jones/v1
diff --git a/keyboards/jorne/rules.mk b/keyboards/jorne/rules.mk
deleted file mode 100644
index c43649b348..0000000000
--- a/keyboards/jorne/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = jorne/rev1
diff --git a/keyboards/jukaie/jk01/config.h b/keyboards/jukaie/jk01/config.h
index d8dfb9f535..41534ce6c4 100644
--- a/keyboards/jukaie/jk01/config.h
+++ b/keyboards/jukaie/jk01/config.h
@@ -22,8 +22,11 @@
/* SPI Config for LED Driver */
#define SPI_DRIVER SPIDQ
#define SPI_SCK_PIN A5
+#define SPI_SCK_PAL_MODE 5
#define SPI_MOSI_PIN A7
+#define SPI_MOSI_PAL_MODE 5
#define SPI_MISO_PIN A6
+#define SPI_MISO_PAL_MODE 5
#define AW20216S_CS_PIN_1 A15
#define AW20216S_CS_PIN_2 B15
diff --git a/keyboards/junco/rules.mk b/keyboards/junco/rules.mk
deleted file mode 100644
index bb94741e5a..0000000000
--- a/keyboards/junco/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = junco/rev1
diff --git a/keyboards/kakunpc/angel17/rules.mk b/keyboards/kakunpc/angel17/rules.mk
deleted file mode 100644
index 48095d37e6..0000000000
--- a/keyboards/kakunpc/angel17/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = kakunpc/angel17/rev1
diff --git a/keyboards/kakunpc/business_card/rules.mk b/keyboards/kakunpc/business_card/rules.mk
deleted file mode 100644
index 4525d52332..0000000000
--- a/keyboards/kakunpc/business_card/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = kakunpc/business_card/beta
diff --git a/keyboards/kakunpc/suihankey/rules.mk b/keyboards/kakunpc/suihankey/rules.mk
deleted file mode 100644
index 46a0114bd5..0000000000
--- a/keyboards/kakunpc/suihankey/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = kakunpc/suihankey/rev1
diff --git a/keyboards/kakunpc/suihankey/split/rules.mk b/keyboards/kakunpc/suihankey/split/rules.mk
deleted file mode 100644
index 1dc7b014f0..0000000000
--- a/keyboards/kakunpc/suihankey/split/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = kakunpc/suihankey/split/rev1
diff --git a/keyboards/kapcave/paladinpad/rules.mk b/keyboards/kapcave/paladinpad/rules.mk
deleted file mode 100644
index 02685414e3..0000000000
--- a/keyboards/kapcave/paladinpad/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = kapcave/paladinpad/rev2
diff --git a/keyboards/kapl/rules.mk b/keyboards/kapl/rules.mk
deleted file mode 100644
index a5dd22ce1c..0000000000
--- a/keyboards/kapl/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = kapl/rev1
diff --git a/keyboards/kbdfans/d45/rules.mk b/keyboards/kbdfans/d45/rules.mk
deleted file mode 100644
index 041e632f65..0000000000
--- a/keyboards/kbdfans/d45/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = kbdfans/d45/v2
diff --git a/keyboards/kbdfans/kbd75/rules.mk b/keyboards/kbdfans/kbd75/rules.mk
deleted file mode 100644
index 5c46171316..0000000000
--- a/keyboards/kbdfans/kbd75/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = kbdfans/kbd75/rev1
diff --git a/keyboards/keebio/bdn9/rules.mk b/keyboards/keebio/bdn9/rules.mk
deleted file mode 100644
index 431a8ad027..0000000000
--- a/keyboards/keebio/bdn9/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = keebio/bdn9/rev1
diff --git a/keyboards/keebio/convolution/rules.mk b/keyboards/keebio/convolution/rules.mk
deleted file mode 100644
index 9df8bd1c47..0000000000
--- a/keyboards/keebio/convolution/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = keebio/convolution/rev1
diff --git a/keyboards/keebio/dsp40/rules.mk b/keyboards/keebio/dsp40/rules.mk
deleted file mode 100644
index 3e8e9be18c..0000000000
--- a/keyboards/keebio/dsp40/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = keebio/dsp40/rev1
diff --git a/keyboards/keebio/foldkb/rules.mk b/keyboards/keebio/foldkb/rules.mk
deleted file mode 100644
index 6a0522a902..0000000000
--- a/keyboards/keebio/foldkb/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = keebio/foldkb/rev1
diff --git a/keyboards/keebio/kbo5000/rules.mk b/keyboards/keebio/kbo5000/rules.mk
deleted file mode 100644
index 06d2f2f412..0000000000
--- a/keyboards/keebio/kbo5000/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = keebio/kbo5000/rev1
diff --git a/keyboards/keebio/levinson/rules.mk b/keyboards/keebio/levinson/rules.mk
deleted file mode 100644
index 44cdce9d12..0000000000
--- a/keyboards/keebio/levinson/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = keebio/levinson/rev2
diff --git a/keyboards/keebio/quefrency/rules.mk b/keyboards/keebio/quefrency/rules.mk
deleted file mode 100644
index fb40fc8a56..0000000000
--- a/keyboards/keebio/quefrency/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = keebio/quefrency/rev1
diff --git a/keyboards/keebio/rorschach/rules.mk b/keyboards/keebio/rorschach/rules.mk
deleted file mode 100644
index 6cdac68a4e..0000000000
--- a/keyboards/keebio/rorschach/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = keebio/rorschach/rev1
diff --git a/keyboards/keebio/sinc/rules.mk b/keyboards/keebio/sinc/rules.mk
deleted file mode 100644
index 1419957479..0000000000
--- a/keyboards/keebio/sinc/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = keebio/sinc/rev1
diff --git a/keyboards/keebio/viterbi/rules.mk b/keyboards/keebio/viterbi/rules.mk
deleted file mode 100644
index ecf6a3fa87..0000000000
--- a/keyboards/keebio/viterbi/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = keebio/viterbi/rev2
diff --git a/keyboards/keycapsss/kimiko/rules.mk b/keyboards/keycapsss/kimiko/rules.mk
deleted file mode 100644
index cb9f69d6bb..0000000000
--- a/keyboards/keycapsss/kimiko/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = keycapsss/kimiko/rev2
diff --git a/keyboards/keycapsss/plaid_pad/rules.mk b/keyboards/keycapsss/plaid_pad/rules.mk
deleted file mode 100644
index 0ab7cc3141..0000000000
--- a/keyboards/keycapsss/plaid_pad/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = keycapsss/plaid_pad/rev1
diff --git a/keyboards/keyhive/navi10/rules.mk b/keyboards/keyhive/navi10/rules.mk
deleted file mode 100644
index 6ebb2d0ceb..0000000000
--- a/keyboards/keyhive/navi10/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = keyhive/navi10/rev3
diff --git a/keyboards/keyhive/uno/rules.mk b/keyboards/keyhive/uno/rules.mk
deleted file mode 100644
index 3220994593..0000000000
--- a/keyboards/keyhive/uno/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = keyhive/uno/rev1
diff --git a/keyboards/kin80/rules.mk b/keyboards/kin80/rules.mk
deleted file mode 100644
index b264c9cfc5..0000000000
--- a/keyboards/kin80/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = kin80/blackpill401
diff --git a/keyboards/kprepublic/jj40/rules.mk b/keyboards/kprepublic/jj40/rules.mk
deleted file mode 100644
index fa09523958..0000000000
--- a/keyboards/kprepublic/jj40/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = kprepublic/jj40/rev1
diff --git a/keyboards/kprepublic/jj50/rules.mk b/keyboards/kprepublic/jj50/rules.mk
deleted file mode 100644
index 8f77c68db2..0000000000
--- a/keyboards/kprepublic/jj50/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = kprepublic/jj50/rev1
diff --git a/keyboards/kradoindustries/promenade/keyboard.json b/keyboards/kradoindustries/promenade/keyboard.json
index 86330dbc2e..028ba1b24d 100644
--- a/keyboards/kradoindustries/promenade/keyboard.json
+++ b/keyboards/kradoindustries/promenade/keyboard.json
@@ -73,8 +73,8 @@
{"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, "h":1.5},
- {"matrix": [1, 7], "x":7.5, "y":1, "h":1.5},
+ {"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},
@@ -88,6 +88,8 @@
{"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},
@@ -101,8 +103,8 @@
{"matrix": [3, 3], "x":3.5, "y":3},
{"matrix": [3, 4], "x":4.5, "y":3},
{"matrix": [3, 5], "x":5.5, "y":3},
- {"matrix": [3, 6], "x":6.5, "y":2.5, "h":1.5},
- {"matrix": [3, 7], "x":7.5, "y":2.5, "h":1.5},
+ {"matrix": [3, 6], "x":6.5, "y":3},
+ {"matrix": [3, 7], "x":7.5, "y":3},
{"matrix": [3, 8], "x":8.5, "y":3},
{"matrix": [3, 9], "x":9.5, "y":3},
{"matrix": [3, 10], "x":10.5, "y":3},
diff --git a/keyboards/kradoindustries/promenade/keymaps/default/keymap.c b/keyboards/kradoindustries/promenade/keymaps/default/keymap.c
index aef0f28161..be8401e608 100644
--- a/keyboards/kradoindustries/promenade/keymaps/default/keymap.c
+++ b/keyboards/kradoindustries/promenade/keymaps/default/keymap.c
@@ -26,19 +26,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* .-----------------------------------------------------------------------------------------------------------------------------.
* | ESC | 1 | 2 | 3 | 4 | 5 | - | = | 6 | 7 | 8 | 9 | 0 | BACKSP |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
- * | TAB | Q | W | E | R | T | [ | ] | Y | U | I | O | P | ' |
+ * | TAB | Q | W | E | R | T | [ | ] | Y | U | I | O | P | \ |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------|
- * | CAP LK | A | S | D | F | G | | | H | J | K | L | ; | ENTER |
+ * | CAP LK | A | S | D | F | G | HOME | PG UP | H | J | K | L | ; | ENTER |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------|
* | LSHIFT | Z | X | C | V | B | END | PG DN | N | M | , | . | / | RSHIFT |
* |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------|
- * | LCTRL | LGUI | FN | LALT | SPACE | SPACE | SPACE | SPACE | SPACE | LEFT | DOWN | UP | RIGHT | RCTRL |
+ * | LCTRL | LGUI | LALT | FN | SPACE | SPACE | SPACE | SPACE | LEFT | DOWN | UP | RIGHT | RCTRL |
* '-----------------------------------------------------------------------------------------------------------------------------'
*/
[_BASE] = LAYOUT_all(
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
- KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_QUOT,
- KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT,
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
+ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_HOME, KC_PGUP, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_END, KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
KC_LCTL, KC_LGUI, KC_LALT, MO(_FN), KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_RCTL
),
@@ -47,20 +47,20 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* .-----------------------------------------------------------------------------------------------------------------------------.
* | ` | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DEL |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
- * | | Home | Up | End | PgUp | | | | | | | | PRT SC | |
+ * | | HOME | UP | END | PG UP | | | | | | | | PRT SC | |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------|
- * | | Left | Down | Right | PgDn | | | | | | | | | Reset |
+ * | | LEFT | DOWN | RIGHT | PG DN | | | | | | | | ' | RGB Off|
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------|
* | | | | | | | | | | MUTE | VOL DN | VOL UP | \ | |
* |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------|
- * | | | | | | | | | | | | | | Reset |
+ * | | | | | | ENTER | ENTER | BACKSP | | | | | Reset |
* '-----------------------------------------------------------------------------------------------------------------------------'
*/
[_FN] = LAYOUT_all(
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL,
_______, KC_HOME, KC_UP, KC_END, KC_PGUP, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, _______,
- _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______, _______, _______, _______, _______, _______, QK_BOOT,
+ _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______, _______, _______, _______, _______, _______, _______, KC_QUOT, UG_TOGG,
_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_BSLS, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, QK_BOOT
+ _______, _______, _______, _______, _______, KC_ENT, KC_ENT, KC_BSPC, _______, _______, _______, _______, QK_BOOT
)
};
diff --git a/keyboards/kradoindustries/promenade/matrix_diagram.md b/keyboards/kradoindustries/promenade/matrix_diagram.md
index 086471b8b9..3c205c9a99 100644
--- a/keyboards/kradoindustries/promenade/matrix_diagram.md
+++ b/keyboards/kradoindustries/promenade/matrix_diagram.md
@@ -5,10 +5,10 @@
│00 │01 │02 │03 │04 │05 │06 │07 │08 │09 │0A │0B │0C │0D │
├─────┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼─────┤
│10 │11 │12 │13 │14 │15 │16 │17 │18 │19 │1A │1B │1C │1D │
-├─────┼───┼───┼───┼───┼───┤ │ ├───┼───┼───┼───┼───┼─────┤
-│20 │21 │22 │23 │24 │25 ├───┼───┤28 │29 │2A │2B │2C │2D │
-├─────┼───┼───┼───┼───┼───┤36 │37 ├───┼───┼───┼───┼───┼─────┤
-│30 │31 │32 │33 │34 │35 │ │ │38 │39 │3A │3B │3C │3D │
+├─────┼───┼───┼───┼───┼───├───┼───┼───┼───┼───┼───┼───┼─────┤
+│20 │21 │22 │23 │24 │25 │26 │27 │28 │29 │2A │2B │2C │2D │
+├─────┼───┼───┼───┼───┼───├───┼───┼───┼───┼───┼───┼───┼─────┤
+│30 │31 │32 │33 │34 │35 │36 │37 │38 │39 │3A │3B │3C │3D │
├─────┼───┼───┼───┼───┼───┼───┴───┼───┼───┼───┼───┼───┼─────┤
│40 │41 │42 │43 │44 │45 │46 │48 │49 │4A │4B │4C │4D │
└─────┴───┴───┴───┴───┴───┴───────┴───┴───┴───┴───┴───┴─────┘
diff --git a/keyboards/kumaokobo/kudox/rules.mk b/keyboards/kumaokobo/kudox/rules.mk
deleted file mode 100644
index 16c27e7c3b..0000000000
--- a/keyboards/kumaokobo/kudox/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = kumaokobo/kudox/rev3
diff --git a/keyboards/kumaokobo/kudox_full/rules.mk b/keyboards/kumaokobo/kudox_full/rules.mk
deleted file mode 100644
index c912dcd2e5..0000000000
--- a/keyboards/kumaokobo/kudox_full/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = kumaokobo/kudox_full/rev1
diff --git a/keyboards/kumaokobo/kudox_game/rules.mk b/keyboards/kumaokobo/kudox_game/rules.mk
deleted file mode 100644
index 28918ca489..0000000000
--- a/keyboards/kumaokobo/kudox_game/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = kumaokobo/kudox_game/rev2
diff --git a/keyboards/kumaokobo/pico/rules.mk b/keyboards/kumaokobo/pico/rules.mk
deleted file mode 100644
index df859afa0f..0000000000
--- a/keyboards/kumaokobo/pico/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = kumaokobo/pico/65keys
diff --git a/keyboards/lazydesigners/dimple/rules.mk b/keyboards/lazydesigners/dimple/rules.mk
deleted file mode 100644
index cd05623d84..0000000000
--- a/keyboards/lazydesigners/dimple/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = lazydesigners/dimple/staggered/rev1
diff --git a/keyboards/lets_split/rules.mk b/keyboards/lets_split/rules.mk
deleted file mode 100644
index 0fb6d36204..0000000000
--- a/keyboards/lets_split/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = lets_split/rev2
diff --git a/keyboards/lfkeyboards/lfk78/rules.mk b/keyboards/lfkeyboards/lfk78/rules.mk
deleted file mode 100644
index 5ebd387c83..0000000000
--- a/keyboards/lfkeyboards/lfk78/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = lfkeyboards/lfk78/revj
diff --git a/keyboards/lfkeyboards/lfk87/rules.mk b/keyboards/lfkeyboards/lfk87/rules.mk
deleted file mode 100644
index 05b80ac74a..0000000000
--- a/keyboards/lfkeyboards/lfk87/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = lfkeyboards/lfk78/revc
diff --git a/keyboards/lfkeyboards/smk65/rules.mk b/keyboards/lfkeyboards/smk65/rules.mk
deleted file mode 100644
index b2d7497663..0000000000
--- a/keyboards/lfkeyboards/smk65/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = lfkeyboards/smk65/revb
diff --git a/keyboards/lily58/rules.mk b/keyboards/lily58/rules.mk
deleted file mode 100644
index a63bd42ad3..0000000000
--- a/keyboards/lily58/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = lily58/rev1
diff --git a/keyboards/lime/rules.mk b/keyboards/lime/rules.mk
deleted file mode 100644
index 4643abab93..0000000000
--- a/keyboards/lime/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = lime/rev1
diff --git a/keyboards/maple_computing/christmas_tree/rules.mk b/keyboards/maple_computing/christmas_tree/rules.mk
deleted file mode 100644
index 3a6633cf56..0000000000
--- a/keyboards/maple_computing/christmas_tree/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = maple_computing/christmas_tree/v2017
diff --git a/keyboards/maple_computing/ivy/rules.mk b/keyboards/maple_computing/ivy/rules.mk
deleted file mode 100644
index 2665d44abd..0000000000
--- a/keyboards/maple_computing/ivy/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = maple_computing/ivy/rev1
diff --git a/keyboards/maple_computing/launchpad/rules.mk b/keyboards/maple_computing/launchpad/rules.mk
deleted file mode 100644
index 8c35a608a6..0000000000
--- a/keyboards/maple_computing/launchpad/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = maple_computing/launchpad/rev1
diff --git a/keyboards/maple_computing/minidox/rules.mk b/keyboards/maple_computing/minidox/rules.mk
deleted file mode 100644
index d5a7f49e40..0000000000
--- a/keyboards/maple_computing/minidox/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = maple_computing/minidox/rev1
diff --git a/keyboards/mariorion_v25/rules.mk b/keyboards/mariorion_v25/rules.mk
deleted file mode 100644
index f0bfa47284..0000000000
--- a/keyboards/mariorion_v25/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = mariorion_v25/prod
diff --git a/keyboards/marksard/rhymestone/rules.mk b/keyboards/marksard/rhymestone/rules.mk
deleted file mode 100644
index 1833888708..0000000000
--- a/keyboards/marksard/rhymestone/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = marksard/rhymestone/rev1
diff --git a/keyboards/marksard/treadstone32/rules.mk b/keyboards/marksard/treadstone32/rules.mk
deleted file mode 100644
index 2d7ca16d86..0000000000
--- a/keyboards/marksard/treadstone32/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = marksard/treadstone32/rev1
diff --git a/keyboards/marksard/treadstone48/rules.mk b/keyboards/marksard/treadstone48/rules.mk
deleted file mode 100644
index 23865d27e6..0000000000
--- a/keyboards/marksard/treadstone48/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = marksard/treadstone48/rev1
diff --git a/keyboards/maxipad/rules.mk b/keyboards/maxipad/rules.mk
deleted file mode 100644
index 98a712a7b8..0000000000
--- a/keyboards/maxipad/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = maxipad/promicro
diff --git a/keyboards/mechkeys/mechmini/rules.mk b/keyboards/mechkeys/mechmini/rules.mk
deleted file mode 100644
index 9d63d875eb..0000000000
--- a/keyboards/mechkeys/mechmini/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = mechkeys/mechmini/v2
diff --git a/keyboards/mechllama/g35/rules.mk b/keyboards/mechllama/g35/rules.mk
deleted file mode 100644
index 36acf8d17f..0000000000
--- a/keyboards/mechllama/g35/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = mechllama/g35/v2
diff --git a/keyboards/mechlovin/adelais/rgb_led/rules.mk b/keyboards/mechlovin/adelais/rgb_led/rules.mk
deleted file mode 100644
index 18047f12c7..0000000000
--- a/keyboards/mechlovin/adelais/rgb_led/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = mechlovin/adelais/rgb_led/rev1
diff --git a/keyboards/mechlovin/adelais/rules.mk b/keyboards/mechlovin/adelais/rules.mk
deleted file mode 100644
index a1d2ba038d..0000000000
--- a/keyboards/mechlovin/adelais/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = mechlovin/adelais/standard_led/arm/rev2
diff --git a/keyboards/mechlovin/adelais/standard_led/arm/rev4/rules.mk b/keyboards/mechlovin/adelais/standard_led/arm/rev4/rules.mk
deleted file mode 100644
index d348ae660f..0000000000
--- a/keyboards/mechlovin/adelais/standard_led/arm/rev4/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = mechlovin/adelais/standard_led/arm/rev4/stm32f303
diff --git a/keyboards/mechlovin/adelais/standard_led/arm/rules.mk b/keyboards/mechlovin/adelais/standard_led/arm/rules.mk
deleted file mode 100644
index 16a636a342..0000000000
--- a/keyboards/mechlovin/adelais/standard_led/arm/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = mechlovin/adelais/standard_led/arm/rev2 \ No newline at end of file
diff --git a/keyboards/mechlovin/adelais/standard_led/avr/rules.mk b/keyboards/mechlovin/adelais/standard_led/avr/rules.mk
deleted file mode 100644
index f33198890d..0000000000
--- a/keyboards/mechlovin/adelais/standard_led/avr/rules.mk
+++ /dev/null
@@ -1,2 +0,0 @@
-
-DEFAULT_FOLDER = mechlovin/adelais/standard_led/avr/rev1 \ No newline at end of file
diff --git a/keyboards/mechlovin/adelais/standard_led/rules.mk b/keyboards/mechlovin/adelais/standard_led/rules.mk
deleted file mode 100644
index a1d2ba038d..0000000000
--- a/keyboards/mechlovin/adelais/standard_led/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = mechlovin/adelais/standard_led/arm/rev2
diff --git a/keyboards/mechlovin/delphine/rules.mk b/keyboards/mechlovin/delphine/rules.mk
deleted file mode 100644
index 819bce1cd3..0000000000
--- a/keyboards/mechlovin/delphine/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = mechlovin/delphine/mono_led
diff --git a/keyboards/mechlovin/hannah60rgb/rules.mk b/keyboards/mechlovin/hannah60rgb/rules.mk
deleted file mode 100644
index e876a56afb..0000000000
--- a/keyboards/mechlovin/hannah60rgb/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = mechlovin/hannah60rgb/rev1
diff --git a/keyboards/mechlovin/hannah65/rev1/rules.mk b/keyboards/mechlovin/hannah65/rev1/rules.mk
deleted file mode 100644
index ae9bc176a4..0000000000
--- a/keyboards/mechlovin/hannah65/rev1/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = mechlovin/hannah65/rev1/haus
diff --git a/keyboards/mechlovin/hannah65/rules.mk b/keyboards/mechlovin/hannah65/rules.mk
deleted file mode 100644
index ae9bc176a4..0000000000
--- a/keyboards/mechlovin/hannah65/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = mechlovin/hannah65/rev1/haus
diff --git a/keyboards/mechlovin/hannah910/rules.mk b/keyboards/mechlovin/hannah910/rules.mk
deleted file mode 100644
index a356867197..0000000000
--- a/keyboards/mechlovin/hannah910/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = mechlovin/hannah910/rev1
diff --git a/keyboards/mechlovin/hex4b/rules.mk b/keyboards/mechlovin/hex4b/rules.mk
deleted file mode 100644
index e3d9ab46b4..0000000000
--- a/keyboards/mechlovin/hex4b/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = mechlovin/hex4b/rev1
diff --git a/keyboards/mechlovin/infinity87/rev1/rules.mk b/keyboards/mechlovin/infinity87/rev1/rules.mk
deleted file mode 100644
index 101153f240..0000000000
--- a/keyboards/mechlovin/infinity87/rev1/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = mechlovin/infinity87/rev1/standard
diff --git a/keyboards/mechlovin/infinity87/rules.mk b/keyboards/mechlovin/infinity87/rules.mk
deleted file mode 100644
index 4aa072cae7..0000000000
--- a/keyboards/mechlovin/infinity87/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = mechlovin/infinity87/rgb_rev1
diff --git a/keyboards/mechlovin/mechlovin9/rules.mk b/keyboards/mechlovin/mechlovin9/rules.mk
deleted file mode 100644
index 79de7c7d31..0000000000
--- a/keyboards/mechlovin/mechlovin9/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = mechlovin/mechlovin9/rev1
diff --git a/keyboards/mechlovin/olly/jf/rules.mk b/keyboards/mechlovin/olly/jf/rules.mk
deleted file mode 100644
index fa0eceeb8a..0000000000
--- a/keyboards/mechlovin/olly/jf/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = mechlovin/olly/jf/rev1
diff --git a/keyboards/mechlovin/zed1800/rules.mk b/keyboards/mechlovin/zed1800/rules.mk
deleted file mode 100644
index e0088c95c3..0000000000
--- a/keyboards/mechlovin/zed1800/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = mechlovin/zed1800/saber
diff --git a/keyboards/mechlovin/zed65/no_backlight/rules.mk b/keyboards/mechlovin/zed65/no_backlight/rules.mk
deleted file mode 100644
index a699765498..0000000000
--- a/keyboards/mechlovin/zed65/no_backlight/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = mechlovin/zed65/no_backlight/wearhaus66
diff --git a/keyboards/mechlovin/zed65/rules.mk b/keyboards/mechlovin/zed65/rules.mk
deleted file mode 100644
index a699765498..0000000000
--- a/keyboards/mechlovin/zed65/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = mechlovin/zed65/no_backlight/wearhaus66
diff --git a/keyboards/mechwild/bde/rules.mk b/keyboards/mechwild/bde/rules.mk
deleted file mode 100644
index 138a291916..0000000000
--- a/keyboards/mechwild/bde/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = mechwild/bde/rev2
diff --git a/keyboards/mechwild/mokulua/rules.mk b/keyboards/mechwild/mokulua/rules.mk
deleted file mode 100644
index 3a87a143e5..0000000000
--- a/keyboards/mechwild/mokulua/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = mechwild/mokulua/standard \ No newline at end of file
diff --git a/keyboards/mechwild/obe/f401/rules.mk b/keyboards/mechwild/obe/f401/rules.mk
deleted file mode 100644
index 8709dbb4de..0000000000
--- a/keyboards/mechwild/obe/f401/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = mechwild/obe/f401/base
diff --git a/keyboards/mechwild/obe/f411/rules.mk b/keyboards/mechwild/obe/f411/rules.mk
deleted file mode 100644
index e24fe60509..0000000000
--- a/keyboards/mechwild/obe/f411/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = mechwild/obe/f411/base
diff --git a/keyboards/mechwild/obe/rules.mk b/keyboards/mechwild/obe/rules.mk
deleted file mode 100644
index 8709dbb4de..0000000000
--- a/keyboards/mechwild/obe/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = mechwild/obe/f401/base
diff --git a/keyboards/mechwild/waka60/f401/rules.mk b/keyboards/mechwild/waka60/f401/rules.mk
deleted file mode 100644
index a0d74c14eb..0000000000
--- a/keyboards/mechwild/waka60/f401/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = mechwild/waka60/f401/base
diff --git a/keyboards/mechwild/waka60/f411/rules.mk b/keyboards/mechwild/waka60/f411/rules.mk
deleted file mode 100644
index 0dd69ff65f..0000000000
--- a/keyboards/mechwild/waka60/f411/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = mechwild/waka60/f411/base
diff --git a/keyboards/mechwild/waka60/rules.mk b/keyboards/mechwild/waka60/rules.mk
deleted file mode 100644
index a0d74c14eb..0000000000
--- a/keyboards/mechwild/waka60/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = mechwild/waka60/f401/base
diff --git a/keyboards/melgeek/z70ultra/rules.mk b/keyboards/melgeek/z70ultra/rules.mk
deleted file mode 100644
index 8cc384b91f..0000000000
--- a/keyboards/melgeek/z70ultra/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = melgeek/z70ultra/rev1
diff --git a/keyboards/moky/moky88/config.h b/keyboards/moky/moky88/config.h
index a673a38069..7c102e1a97 100644
--- a/keyboards/moky/moky88/config.h
+++ b/keyboards/moky/moky88/config.h
@@ -15,5 +15,4 @@
/* RGB Driver */
#define AW20216S_CS_PIN_1 D2
#define AW20216S_CS_PIN_2 B8
-#define AW20216S_EN_PIN_1 B9
-#define AW20216S_EN_PIN_2 B9
+#define AW20216S_EN_PIN B9
diff --git a/keyboards/moky/moky88/moky88.c b/keyboards/moky/moky88/moky88.c
index 3cbd6e1468..2de672f94f 100644
--- a/keyboards/moky/moky88/moky88.c
+++ b/keyboards/moky/moky88/moky88.c
@@ -23,97 +23,97 @@ const aw20216s_led_t PROGMEM g_aw20216s_leds[AW20216S_LED_COUNT] = {
* | | G location
* | | | B location
* | | | | */
- {0, CS18_SW2, CS17_SW2, CS16_SW2 }, // 0 Esc
- {0, CS18_SW3, CS17_SW3, CS16_SW3 }, // 1 F1
- {0, CS18_SW4, CS17_SW4, CS16_SW4 }, // 2 F2
- {0, CS18_SW5, CS17_SW5, CS16_SW5 }, // 3 F3
- {0, CS18_SW6, CS17_SW6, CS16_SW6 }, // 4 F4
- {0, CS18_SW7, CS17_SW7, CS16_SW7 }, // 5 F5
- {0, CS18_SW8, CS17_SW8, CS16_SW8 }, // 6 F6
- {0, CS18_SW9, CS17_SW9, CS16_SW9 }, // 7 F7
- {0, CS18_SW10, CS17_SW10, CS16_SW10 }, // 8 F8
- {0, CS18_SW11, CS17_SW11, CS16_SW11 }, // 9 F9
- {0, CS18_SW12, CS17_SW12, CS16_SW12 }, // 10 F10
- {1, CS18_SW1, CS17_SW1, CS16_SW1 }, // 11 F11
- {1, CS18_SW2, CS17_SW2, CS16_SW2 }, // 12 F12
- {1, CS18_SW3, CS17_SW3, CS16_SW3 }, // 13 MUTE
- {1, CS18_SW4, CS17_SW4, CS16_SW4 }, // 14 PSCR
- {1, CS18_SW5, CS17_SW5, CS16_SW5 }, // 15 SCRL
- {1, CS18_SW6, CS17_SW6, CS16_SW6 }, // 16 PAUSE
+ {0, SW2_CS18, SW2_CS17, SW2_CS16 }, // 0 Esc
+ {0, SW3_CS18, SW3_CS17, SW3_CS16 }, // 1 F1
+ {0, SW4_CS18, SW4_CS17, SW4_CS16 }, // 2 F2
+ {0, SW5_CS18, SW5_CS17, SW5_CS16 }, // 3 F3
+ {0, SW6_CS18, SW6_CS17, SW6_CS16 }, // 4 F4
+ {0, SW7_CS18, SW7_CS17, SW7_CS16 }, // 5 F5
+ {0, SW8_CS18, SW8_CS17, SW8_CS16 }, // 6 F6
+ {0, SW9_CS18, SW9_CS17, SW9_CS16 }, // 7 F7
+ {0, SW10_CS18, SW10_CS17, SW10_CS16 }, // 8 F8
+ {0, SW11_CS18, SW11_CS17, SW11_CS16 }, // 9 F9
+ {0, SW12_CS18, SW12_CS17, SW12_CS16 }, // 10 F10
+ {1, SW1_CS18, SW1_CS17, SW1_CS16 }, // 11 F11
+ {1, SW2_CS18, SW2_CS17, SW2_CS16 }, // 12 F12
+ {1, SW3_CS18, SW3_CS17, SW3_CS16 }, // 13 MUTE
+ {1, SW4_CS18, SW4_CS17, SW4_CS16 }, // 14 PSCR
+ {1, SW5_CS18, SW5_CS17, SW5_CS16 }, // 15 SCRL
+ {1, SW6_CS18, SW6_CS17, SW6_CS16 }, // 16 PAUSE
- {0, CS15_SW2, CS14_SW2, CS13_SW2 }, // 17 `~
- {0, CS15_SW3, CS14_SW3, CS13_SW3 }, // 18 1
- {0, CS15_SW4, CS14_SW4, CS13_SW4 }, // 19 2
- {0, CS15_SW5, CS14_SW5, CS13_SW5 }, // 20 3
- {0, CS15_SW6, CS14_SW6, CS13_SW6 }, // 21 4
- {0, CS15_SW7, CS14_SW7, CS13_SW7 }, // 22 5
- {0, CS15_SW8, CS14_SW8, CS13_SW8 }, // 23 6
- {0, CS15_SW9, CS14_SW9, CS13_SW9 }, // 24 7
- {0, CS15_SW10, CS14_SW10, CS13_SW10 }, // 25 8
- {0, CS15_SW11, CS14_SW11, CS13_SW11 }, // 26 9
- {0, CS15_SW12, CS14_SW12, CS13_SW12 }, // 27 0
- {1, CS15_SW1, CS14_SW1, CS13_SW1 }, // 28 -_
- {1, CS15_SW2, CS14_SW2, CS13_SW2 }, // 29 =+
- {1, CS15_SW3, CS14_SW3, CS13_SW3 }, // 30 BSPC
- {1, CS15_SW4, CS14_SW4, CS13_SW4 }, // 31 INS
- {1, CS15_SW5, CS14_SW5, CS13_SW5 }, // 32 HOME
- {1, CS15_SW6, CS14_SW6, CS13_SW6 }, // 33 PGUP
+ {0, SW2_CS15, SW2_CS14, SW2_CS13 }, // 17 `~
+ {0, SW3_CS15, SW3_CS14, SW3_CS13 }, // 18 1
+ {0, SW4_CS15, SW4_CS14, SW4_CS13 }, // 19 2
+ {0, SW5_CS15, SW5_CS14, SW5_CS13 }, // 20 3
+ {0, SW6_CS15, SW6_CS14, SW6_CS13 }, // 21 4
+ {0, SW7_CS15, SW7_CS14, SW7_CS13 }, // 22 5
+ {0, SW8_CS15, SW8_CS14, SW8_CS13 }, // 23 6
+ {0, SW9_CS15, SW9_CS14, SW9_CS13 }, // 24 7
+ {0, SW10_CS15, SW10_CS14, SW10_CS13 }, // 25 8
+ {0, SW11_CS15, SW11_CS14, SW11_CS13 }, // 26 9
+ {0, SW12_CS15, SW12_CS14, SW12_CS13 }, // 27 0
+ {1, SW1_CS15, SW1_CS14, SW1_CS13 }, // 28 -_
+ {1, SW2_CS15, SW2_CS14, SW2_CS13 }, // 29 =+
+ {1, SW3_CS15, SW3_CS14, SW3_CS13 }, // 30 BSPC
+ {1, SW4_CS15, SW4_CS14, SW4_CS13 }, // 31 INS
+ {1, SW5_CS15, SW5_CS14, SW5_CS13 }, // 32 HOME
+ {1, SW6_CS15, SW6_CS14, SW6_CS13 }, // 33 PGUP
- {0, CS12_SW2, CS11_SW2, CS10_SW2 }, // 34 Tab
- {0, CS12_SW3, CS11_SW3, CS10_SW3 }, // 35 Q
- {0, CS12_SW4, CS11_SW4, CS10_SW4 }, // 36 W
- {0, CS12_SW5, CS11_SW5, CS10_SW5 }, // 37 E
- {0, CS12_SW6, CS11_SW6, CS10_SW6 }, // 38 R
- {0, CS12_SW7, CS11_SW7, CS10_SW7 }, // 39 T
- {0, CS12_SW8, CS11_SW8, CS10_SW8 }, // 40 Y
- {0, CS12_SW9, CS11_SW9, CS10_SW9 }, // 41 U
- {0, CS12_SW10, CS11_SW10, CS10_SW10 }, // 42 I
- {0, CS12_SW11, CS11_SW11, CS10_SW11 }, // 43 O
- {0, CS12_SW12, CS11_SW12, CS10_SW12 }, // 44 P
- {1, CS12_SW1, CS11_SW1, CS10_SW1 }, // 45 [{
- {1, CS12_SW2, CS11_SW2, CS10_SW2 }, // 48 ]}
- {1, CS12_SW3, CS11_SW3, CS10_SW3 }, // 47 \|
- {1, CS12_SW4, CS11_SW4, CS10_SW4 }, // 48 Del
- {1, CS12_SW5, CS11_SW5, CS10_SW5 }, // 49 End
- {1, CS12_SW6, CS11_SW6, CS10_SW6 }, // 50 PGDN
+ {0, SW2_CS12, SW2_CS11, SW2_CS10 }, // 34 Tab
+ {0, SW3_CS12, SW3_CS11, SW3_CS10 }, // 35 Q
+ {0, SW4_CS12, SW4_CS11, SW4_CS10 }, // 36 W
+ {0, SW5_CS12, SW5_CS11, SW5_CS10 }, // 37 E
+ {0, SW6_CS12, SW6_CS11, SW6_CS10 }, // 38 R
+ {0, SW7_CS12, SW7_CS11, SW7_CS10 }, // 39 T
+ {0, SW8_CS12, SW8_CS11, SW8_CS10 }, // 40 Y
+ {0, SW9_CS12, SW9_CS11, SW9_CS10 }, // 41 U
+ {0, SW10_CS12, SW10_CS11, SW10_CS10 }, // 42 I
+ {0, SW11_CS12, SW11_CS11, SW11_CS10 }, // 43 O
+ {0, SW12_CS12, SW12_CS11, SW12_CS10 }, // 44 P
+ {1, SW1_CS12, SW1_CS11, SW1_CS10 }, // 45 [{
+ {1, SW2_CS12, SW2_CS11, SW2_CS10 }, // 48 ]}
+ {1, SW3_CS12, SW3_CS11, SW3_CS10 }, // 47 \|
+ {1, SW4_CS12, SW4_CS11, SW4_CS10 }, // 48 Del
+ {1, SW5_CS12, SW5_CS11, SW5_CS10 }, // 49 End
+ {1, SW6_CS12, SW6_CS11, SW6_CS10 }, // 50 PGDN
- {0, CS1_SW2, CS2_SW2, CS3_SW2 }, // 51 Caps
- {0, CS1_SW3, CS2_SW3, CS3_SW3 }, // 52 A
- {0, CS1_SW4, CS2_SW4, CS3_SW4 }, // 33 S
- {0, CS1_SW5, CS2_SW5, CS3_SW5 }, // 54 D
- {0, CS1_SW6, CS2_SW6, CS3_SW6 }, // 55 F
- {0, CS1_SW7, CS2_SW7, CS3_SW7 }, // 56 G
- {0, CS1_SW8, CS2_SW8, CS3_SW8 }, // 57 H
- {0, CS1_SW9, CS2_SW9, CS3_SW9 }, // 58 J
- {0, CS1_SW10, CS2_SW10, CS3_SW10 }, // 59 K
- {0, CS1_SW11, CS2_SW11, CS3_SW11 }, // 60 L
- {0, CS1_SW12, CS2_SW12, CS3_SW12 }, // 61 ;:
- {1, CS1_SW1, CS2_SW1, CS3_SW1 }, // 62 '
- {1, CS1_SW3, CS2_SW3, CS3_SW3 }, // 63 Enter
+ {0, SW2_CS1, SW2_CS2, SW2_CS3 }, // 51 Caps
+ {0, SW3_CS1, SW3_CS2, SW3_CS3 }, // 52 A
+ {0, SW4_CS1, SW4_CS2, SW4_CS3 }, // 33 S
+ {0, SW5_CS1, SW5_CS2, SW5_CS3 }, // 54 D
+ {0, SW6_CS1, SW6_CS2, SW6_CS3 }, // 55 F
+ {0, SW7_CS1, SW7_CS2, SW7_CS3 }, // 56 G
+ {0, SW8_CS1, SW8_CS2, SW8_CS3 }, // 57 H
+ {0, SW9_CS1, SW9_CS2, SW9_CS3 }, // 58 J
+ {0, SW10_CS1, SW10_CS2, SW10_CS3 }, // 59 K
+ {0, SW11_CS1, SW11_CS2, SW11_CS3 }, // 60 L
+ {0, SW12_CS1, SW12_CS2, SW12_CS3 }, // 61 ;:
+ {1, SW1_CS1, SW1_CS2, SW1_CS3 }, // 62 '
+ {1, SW3_CS1, SW3_CS2, SW3_CS3 }, // 63 Enter
- {0, CS4_SW2, CS5_SW2, CS6_SW2 }, // 64 Shift
- {0, CS4_SW4, CS5_SW4, CS6_SW4 }, // 65 Z
- {0, CS4_SW5, CS5_SW5, CS6_SW5 }, // 66 X
- {0, CS4_SW6, CS5_SW6, CS6_SW6 }, // 67 C
- {0, CS4_SW7, CS5_SW7, CS6_SW7 }, // 68 V
- {0, CS4_SW8, CS5_SW8, CS6_SW8 }, // 69 B
- {0, CS4_SW9, CS5_SW9, CS6_SW9 }, // 70 N
- {0, CS4_SW10, CS5_SW10, CS6_SW10 }, // 71 M
- {0, CS4_SW11, CS5_SW11, CS6_SW11 }, // 72 ,<
- {0, CS4_SW12, CS5_SW12, CS6_SW12 }, // 73 .>
- {1, CS4_SW1, CS5_SW1, CS6_SW1 }, // 74 ?
- {1, CS4_SW3, CS5_SW3, CS6_SW3 }, // 75 Shift
- {1, CS4_SW5, CS5_SW5, CS6_SW5 }, // 76 Up
+ {0, SW2_CS4, SW2_CS5, SW2_CS6 }, // 64 Shift
+ {0, SW4_CS4, SW4_CS5, SW4_CS6 }, // 65 Z
+ {0, SW5_CS4, SW5_CS5, SW5_CS6 }, // 66 X
+ {0, SW6_CS4, SW6_CS5, SW6_CS6 }, // 67 C
+ {0, SW7_CS4, SW7_CS5, SW7_CS6 }, // 68 V
+ {0, SW8_CS4, SW8_CS5, SW8_CS6 }, // 69 B
+ {0, SW9_CS4, SW9_CS5, SW9_CS6 }, // 70 N
+ {0, SW10_CS4, SW10_CS5, SW10_CS6 }, // 71 M
+ {0, SW11_CS4, SW11_CS5, SW11_CS6 }, // 72 ,<
+ {0, SW12_CS4, SW12_CS5, SW12_CS6 }, // 73 .>
+ {1, SW1_CS4, SW1_CS5, SW1_CS6 }, // 74 ?
+ {1, SW3_CS4, SW3_CS5, SW3_CS6 }, // 75 Shift
+ {1, SW5_CS4, SW5_CS5, SW5_CS6 }, // 76 Up
- {0, CS7_SW2, CS8_SW2, CS9_SW2 }, // 77 Ctrl_L
- {0, CS7_SW3, CS8_SW3, CS9_SW3 }, // 78 Win_L
- {0, CS7_SW4, CS8_SW4, CS9_SW4 }, // 79 ALT_L
- {0, CS7_SW8, CS8_SW8, CS9_SW8 }, // 80 SPACE
- {0, CS7_SW12, CS8_SW12, CS9_SW12 }, // 81 ALT_L
- {1, CS7_SW1, CS8_SW1, CS9_SW1 }, // 82 Win_L
- {1, CS7_SW2, CS8_SW2, CS9_SW2 }, // 83 Fn
- {1, CS7_SW3, CS8_SW3, CS9_SW3 }, // 84 Ctrl_L
- {1, CS7_SW4, CS8_SW4, CS9_SW4 }, // 85 Left
- {1, CS7_SW5, CS8_SW5, CS9_SW5 }, // 86 Down
- {1, CS7_SW6, CS8_SW6, CS9_SW6 }, // 87 Right
+ {0, SW2_CS7, SW2_CS8, SW2_CS9 }, // 77 Ctrl_L
+ {0, SW3_CS7, SW3_CS8, SW3_CS9 }, // 78 Win_L
+ {0, SW4_CS7, SW4_CS8, SW4_CS9 }, // 79 ALT_L
+ {0, SW8_CS7, SW8_CS8, SW8_CS9 }, // 80 SPACE
+ {0, SW12_CS7, SW12_CS8, SW12_CS9 }, // 81 ALT_L
+ {1, SW1_CS7, SW1_CS8, SW1_CS9 }, // 82 Win_L
+ {1, SW2_CS7, SW2_CS8, SW2_CS9 }, // 83 Fn
+ {1, SW3_CS7, SW3_CS8, SW3_CS9 }, // 84 Ctrl_L
+ {1, SW4_CS7, SW4_CS8, SW4_CS9 }, // 85 Left
+ {1, SW5_CS7, SW5_CS8, SW5_CS9 }, // 86 Down
+ {1, SW6_CS7, SW6_CS8, SW6_CS9 }, // 87 Right
};
diff --git a/keyboards/montsinger/rebound/rules.mk b/keyboards/montsinger/rebound/rules.mk
deleted file mode 100644
index d277d184e1..0000000000
--- a/keyboards/montsinger/rebound/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = montsinger/rebound/rev1
diff --git a/keyboards/murcielago/rules.mk b/keyboards/murcielago/rules.mk
deleted file mode 100644
index 661563697a..0000000000
--- a/keyboards/murcielago/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = murcielago/rev1 \ No newline at end of file
diff --git a/keyboards/nullbitsco/scramble/rules.mk b/keyboards/nullbitsco/scramble/rules.mk
deleted file mode 100644
index 5753f7786d..0000000000
--- a/keyboards/nullbitsco/scramble/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = nullbitsco/scramble/v2
diff --git a/keyboards/omkbd/ergodash/rules.mk b/keyboards/omkbd/ergodash/rules.mk
deleted file mode 100644
index 492cdde65d..0000000000
--- a/keyboards/omkbd/ergodash/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = omkbd/ergodash/rev1
diff --git a/keyboards/omkbd/runner3680/rules.mk b/keyboards/omkbd/runner3680/rules.mk
deleted file mode 100644
index 3460ad8964..0000000000
--- a/keyboards/omkbd/runner3680/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = omkbd/runner3680/5x8
diff --git a/keyboards/orthodox/rules.mk b/keyboards/orthodox/rules.mk
deleted file mode 100644
index fd71b6c8fb..0000000000
--- a/keyboards/orthodox/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = orthodox/rev3
diff --git a/keyboards/peej/rosaline/rules.mk b/keyboards/peej/rosaline/rules.mk
deleted file mode 100644
index 928164362a..0000000000
--- a/keyboards/peej/rosaline/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = peej/rosaline/staggered
diff --git a/keyboards/peej/tripel/rules.mk b/keyboards/peej/tripel/rules.mk
deleted file mode 100644
index 8d89700456..0000000000
--- a/keyboards/peej/tripel/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = peej/tripel/left
diff --git a/keyboards/peranekofactory/tone/rules.mk b/keyboards/peranekofactory/tone/rules.mk
deleted file mode 100644
index e87862a9f6..0000000000
--- a/keyboards/peranekofactory/tone/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = peranekofactory/tone/rev2
diff --git a/keyboards/phase_studio/titan65/rules.mk b/keyboards/phase_studio/titan65/rules.mk
deleted file mode 100644
index d55ca35d7a..0000000000
--- a/keyboards/phase_studio/titan65/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = phase_studio/titan65/hotswap
diff --git a/keyboards/pica40/rules.mk b/keyboards/pica40/rules.mk
deleted file mode 100644
index 9670889712..0000000000
--- a/keyboards/pica40/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = pica40/rev2
diff --git a/keyboards/pinky/rules.mk b/keyboards/pinky/rules.mk
deleted file mode 100644
index 89b708f68f..0000000000
--- a/keyboards/pinky/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = pinky/3
diff --git a/keyboards/polilla/rules.mk b/keyboards/polilla/rules.mk
deleted file mode 100644
index 0d72c40bb6..0000000000
--- a/keyboards/polilla/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = polilla/rev1 \ No newline at end of file
diff --git a/keyboards/primekb/meridian/rules.mk b/keyboards/primekb/meridian/rules.mk
deleted file mode 100644
index 585a04ad28..0000000000
--- a/keyboards/primekb/meridian/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = primekb/meridian/ktr1010
diff --git a/keyboards/primekb/prime_e/rules.mk b/keyboards/primekb/prime_e/rules.mk
deleted file mode 100644
index debb966e0d..0000000000
--- a/keyboards/primekb/prime_e/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = primekb/prime_e/std
diff --git a/keyboards/primekb/prime_l/rules.mk b/keyboards/primekb/prime_l/rules.mk
deleted file mode 100644
index 235bfea925..0000000000
--- a/keyboards/primekb/prime_l/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = primekb/prime_l/v1
diff --git a/keyboards/program_yoink/rules.mk b/keyboards/program_yoink/rules.mk
deleted file mode 100644
index a7cc1a2dbf..0000000000
--- a/keyboards/program_yoink/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = program_yoink/staggered
diff --git a/keyboards/projectcain/vault35/rules.mk b/keyboards/projectcain/vault35/rules.mk
deleted file mode 100644
index 3cf3a331d8..0000000000
--- a/keyboards/projectcain/vault35/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = projectcain/vault35/atmega32u4
diff --git a/keyboards/projectd/65/projectd_65_ansi/config.h b/keyboards/projectd/65/projectd_65_ansi/config.h
index c8da5c42a7..6e23afc902 100644
--- a/keyboards/projectd/65/projectd_65_ansi/config.h
+++ b/keyboards/projectd/65/projectd_65_ansi/config.h
@@ -22,8 +22,11 @@
/* SPI Config for LED Driver */
#define SPI_DRIVER SPIDQ
#define SPI_SCK_PIN A5
+#define SPI_SCK_PAL_MODE 5
#define SPI_MOSI_PIN A7
+#define SPI_MOSI_PAL_MODE 5
#define SPI_MISO_PIN A6
+#define SPI_MISO_PAL_MODE 5
#define AW20216S_CS_PIN_1 A15
#define AW20216S_EN_PIN C13
diff --git a/keyboards/projectd/75/ansi/config.h b/keyboards/projectd/75/ansi/config.h
index 282e20a8e2..acbe853949 100644
--- a/keyboards/projectd/75/ansi/config.h
+++ b/keyboards/projectd/75/ansi/config.h
@@ -22,8 +22,11 @@
/* SPI Config for LED Driver */
#define SPI_DRIVER SPIDQ
#define SPI_SCK_PIN A5
+#define SPI_SCK_PAL_MODE 5
#define SPI_MOSI_PIN A7
+#define SPI_MOSI_PAL_MODE 5
#define SPI_MISO_PIN A6
+#define SPI_MISO_PAL_MODE 5
#define AW20216S_CS_PIN_1 A15
#define AW20216S_CS_PIN_2 B15
diff --git a/keyboards/projectd/75/iso/config.h b/keyboards/projectd/75/iso/config.h
index 282e20a8e2..acbe853949 100644
--- a/keyboards/projectd/75/iso/config.h
+++ b/keyboards/projectd/75/iso/config.h
@@ -22,8 +22,11 @@
/* SPI Config for LED Driver */
#define SPI_DRIVER SPIDQ
#define SPI_SCK_PIN A5
+#define SPI_SCK_PAL_MODE 5
#define SPI_MOSI_PIN A7
+#define SPI_MOSI_PAL_MODE 5
#define SPI_MISO_PIN A6
+#define SPI_MISO_PAL_MODE 5
#define AW20216S_CS_PIN_1 A15
#define AW20216S_CS_PIN_2 B15
diff --git a/keyboards/projectkb/alice/rules.mk b/keyboards/projectkb/alice/rules.mk
deleted file mode 100644
index d672576992..0000000000
--- a/keyboards/projectkb/alice/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = projectkb/alice/rev1
diff --git a/keyboards/qpockets/space_space/rules.mk b/keyboards/qpockets/space_space/rules.mk
deleted file mode 100644
index 0ffe2efbf2..0000000000
--- a/keyboards/qpockets/space_space/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = qpockets/space_space/rev2
diff --git a/keyboards/qwertyydox/rules.mk b/keyboards/qwertyydox/rules.mk
deleted file mode 100644
index 688444b566..0000000000
--- a/keyboards/qwertyydox/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = qwertyydox/rev1
diff --git a/keyboards/rate/pistachio/rules.mk b/keyboards/rate/pistachio/rules.mk
deleted file mode 100644
index a5f4485316..0000000000
--- a/keyboards/rate/pistachio/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = rate/pistachio/rev2
diff --git a/keyboards/recompile_keys/choco60/rules.mk b/keyboards/recompile_keys/choco60/rules.mk
deleted file mode 100644
index 6abfd34d47..0000000000
--- a/keyboards/recompile_keys/choco60/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = recompile_keys/choco60/rev1
diff --git a/keyboards/recompile_keys/nomu30/rules.mk b/keyboards/recompile_keys/nomu30/rules.mk
deleted file mode 100644
index 431b619249..0000000000
--- a/keyboards/recompile_keys/nomu30/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = recompile_keys/nomu30/rev1
diff --git a/keyboards/redox/rev1/rules.mk b/keyboards/redox/rev1/rules.mk
deleted file mode 100644
index c971da1680..0000000000
--- a/keyboards/redox/rev1/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = redox/rev1/base
diff --git a/keyboards/rgbkb/mun/rules.mk b/keyboards/rgbkb/mun/rules.mk
deleted file mode 100644
index 317c4d5a87..0000000000
--- a/keyboards/rgbkb/mun/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = rgbkb/mun/rev1
diff --git a/keyboards/rgbkb/pan/rev1/32a/rules.mk b/keyboards/rgbkb/pan/rev1/32a/rules.mk
index c2ee0bc86f..f54ef3e987 100644
--- a/keyboards/rgbkb/pan/rev1/32a/rules.mk
+++ b/keyboards/rgbkb/pan/rev1/32a/rules.mk
@@ -1,2 +1,4 @@
# Processor frequency
F_CPU = 16000000
+
+WS2812_DRIVER_REQUIRED = yes
diff --git a/keyboards/rgbkb/pan/rev1/proton_c/rules.mk b/keyboards/rgbkb/pan/rev1/proton_c/rules.mk
new file mode 100644
index 0000000000..9a69649289
--- /dev/null
+++ b/keyboards/rgbkb/pan/rev1/proton_c/rules.mk
@@ -0,0 +1 @@
+WS2812_DRIVER_REQUIRED = yes
diff --git a/keyboards/rgbkb/pan/rev1/rules.mk b/keyboards/rgbkb/pan/rev1/rules.mk
deleted file mode 100644
index 4d3c0f6679..0000000000
--- a/keyboards/rgbkb/pan/rev1/rules.mk
+++ /dev/null
@@ -1,2 +0,0 @@
-# The default configuration is a atmega32a
-DEFAULT_FOLDER = rgbkb/pan/rev1/32a
diff --git a/keyboards/rgbkb/pan/rules.mk b/keyboards/rgbkb/pan/rules.mk
deleted file mode 100644
index b6f1d46a65..0000000000
--- a/keyboards/rgbkb/pan/rules.mk
+++ /dev/null
@@ -1,3 +0,0 @@
-WS2812_DRIVER_REQUIRED = yes
-
-DEFAULT_FOLDER = rgbkb/pan/rev1
diff --git a/keyboards/rgbkb/sol/rules.mk b/keyboards/rgbkb/sol/rules.mk
deleted file mode 100644
index f8325017f9..0000000000
--- a/keyboards/rgbkb/sol/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = rgbkb/sol/rev2
diff --git a/keyboards/rgbkb/sol3/rev1/keyboard.json b/keyboards/rgbkb/sol3/rev1/keyboard.json
index a81ea7bc21..775e3f8629 100644
--- a/keyboards/rgbkb/sol3/rev1/keyboard.json
+++ b/keyboards/rgbkb/sol3/rev1/keyboard.json
@@ -153,6 +153,8 @@
"pin": "A9"
},
"transport": {
+ "watchdog": true,
+ "watchdog_timeout": 20000,
"sync": {
"indicators": true,
"layer_state": true,
diff --git a/keyboards/rgbkb/sol3/rules.mk b/keyboards/rgbkb/sol3/rules.mk
deleted file mode 100644
index 74804682a2..0000000000
--- a/keyboards/rgbkb/sol3/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = rgbkb/sol3/rev1
diff --git a/keyboards/rgbkb/zen/rules.mk b/keyboards/rgbkb/zen/rules.mk
deleted file mode 100644
index ee94832d4d..0000000000
--- a/keyboards/rgbkb/zen/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = rgbkb/zen/rev2
diff --git a/keyboards/rgbkb/zygomorph/rules.mk b/keyboards/rgbkb/zygomorph/rules.mk
deleted file mode 100644
index 8544e8767d..0000000000
--- a/keyboards/rgbkb/zygomorph/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = rgbkb/zygomorph/rev1
diff --git a/keyboards/rmi_kb/herringbone/rules.mk b/keyboards/rmi_kb/herringbone/rules.mk
deleted file mode 100644
index 1efe9fa4f5..0000000000
--- a/keyboards/rmi_kb/herringbone/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = rmi_kb/herringbone/v1
diff --git a/keyboards/rmi_kb/mona/rules.mk b/keyboards/rmi_kb/mona/rules.mk
deleted file mode 100644
index 54aa705d96..0000000000
--- a/keyboards/rmi_kb/mona/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = rmi_kb/mona/v1_1
diff --git a/keyboards/rmi_kb/tkl_ff/rules.mk b/keyboards/rmi_kb/tkl_ff/rules.mk
deleted file mode 100644
index c8847cc266..0000000000
--- a/keyboards/rmi_kb/tkl_ff/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = rmi_kb/tkl_ff/v1
diff --git a/keyboards/rmi_kb/wete/rules.mk b/keyboards/rmi_kb/wete/rules.mk
deleted file mode 100644
index cda6fbfbe4..0000000000
--- a/keyboards/rmi_kb/wete/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = rmi_kb/wete/v2
diff --git a/keyboards/rookiebwoy/late9/rules.mk b/keyboards/rookiebwoy/late9/rules.mk
deleted file mode 100755
index 358facb3ca..0000000000
--- a/keyboards/rookiebwoy/late9/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = rookiebwoy/late9/rev1
diff --git a/keyboards/rookiebwoy/neopad/rules.mk b/keyboards/rookiebwoy/neopad/rules.mk
deleted file mode 100755
index c34c04435e..0000000000
--- a/keyboards/rookiebwoy/neopad/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = rookiebwoy/neopad/rev1
diff --git a/keyboards/rura66/rules.mk b/keyboards/rura66/rules.mk
deleted file mode 100644
index 556ec17655..0000000000
--- a/keyboards/rura66/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = rura66/rev1
diff --git a/keyboards/salicylic_acid3/7skb/rules.mk b/keyboards/salicylic_acid3/7skb/rules.mk
deleted file mode 100644
index 15364c29a5..0000000000
--- a/keyboards/salicylic_acid3/7skb/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = salicylic_acid3/7skb/rev1
diff --git a/keyboards/salicylic_acid3/getta25/rules.mk b/keyboards/salicylic_acid3/getta25/rules.mk
deleted file mode 100644
index 069fe74b14..0000000000
--- a/keyboards/salicylic_acid3/getta25/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = salicylic_acid3/getta25/rev1
diff --git a/keyboards/salicylic_acid3/jisplit89/rules.mk b/keyboards/salicylic_acid3/jisplit89/rules.mk
deleted file mode 100644
index d54d2ccef4..0000000000
--- a/keyboards/salicylic_acid3/jisplit89/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = salicylic_acid3/jisplit89/rev1
diff --git a/keyboards/salicylic_acid3/naked48/rules.mk b/keyboards/salicylic_acid3/naked48/rules.mk
deleted file mode 100644
index dadfa7a257..0000000000
--- a/keyboards/salicylic_acid3/naked48/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = salicylic_acid3/naked48/rev1
diff --git a/keyboards/salicylic_acid3/naked60/rules.mk b/keyboards/salicylic_acid3/naked60/rules.mk
deleted file mode 100644
index 904309ea35..0000000000
--- a/keyboards/salicylic_acid3/naked60/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = salicylic_acid3/naked60/rev1
diff --git a/keyboards/salicylic_acid3/naked64/rules.mk b/keyboards/salicylic_acid3/naked64/rules.mk
deleted file mode 100644
index 0ac8d83bfc..0000000000
--- a/keyboards/salicylic_acid3/naked64/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = salicylic_acid3/naked64/rev1
diff --git a/keyboards/salicylic_acid3/setta21/rules.mk b/keyboards/salicylic_acid3/setta21/rules.mk
deleted file mode 100644
index 02e68b5748..0000000000
--- a/keyboards/salicylic_acid3/setta21/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = salicylic_acid3/setta21/rev1
diff --git a/keyboards/sawnsprojects/okayu/rules.mk b/keyboards/sawnsprojects/okayu/rules.mk
deleted file mode 100644
index 59655554eb..0000000000
--- a/keyboards/sawnsprojects/okayu/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = sawnsprojects/okayu/stm32f072 \ No newline at end of file
diff --git a/keyboards/sharkoon/skiller_sgk50_s4/keyboard.json b/keyboards/sharkoon/skiller_sgk50_s4/keyboard.json
index 7d36616e52..b7a628fd78 100644
--- a/keyboards/sharkoon/skiller_sgk50_s4/keyboard.json
+++ b/keyboards/sharkoon/skiller_sgk50_s4/keyboard.json
@@ -21,7 +21,7 @@
"rgb_matrix": true
},
"matrix_pins": {
- "cols": ["C0", "C1", "C2", "C3", "A6", "B1", "B10", "B11", "B12", "B13", "B14", "B15", "C6", "C7"],
+ "cols": ["C0", "C1", "C2", "C3", "A6", "B1", "B10", "B11", "B12", "B13", "B14", "C6", "C7", "C8", "C9", "A8"],
"rows": ["A0", "A1", "A2", "A3", "C13"]
},
"processor": "WB32FQ95",
@@ -77,11 +77,15 @@
"driver": "ws2812",
"layout": [
{"matrix": [4, 6], "x": 103, "y": 64, "flags": 4},
+ {"matrix": [4, 9], "x": 154, "y": 64, "flags": 4},
{"matrix": [4, 10], "x": 172, "y": 64, "flags": 4},
{"matrix": [4, 11], "x": 190, "y": 64, "flags": 4},
{"matrix": [4, 12], "x": 207, "y": 64, "flags": 4},
- {"matrix": [4, 13], "x": 224, "y": 64, "flags": 4},
- {"matrix": [3, 13], "x": 224, "y": 48, "flags": 4},
+ {"matrix": [4, 15], "x": 224, "y": 64, "flags": 4},
+ {"matrix": [3, 15], "x": 224, "y": 48, "flags": 4},
+ {"matrix": [3, 14], "x": 224, "y": 48, "flags": 4},
+ {"matrix": [3, 13], "x": 210, "y": 48, "flags": 4},
+ {"matrix": [3, 12], "x": 200, "y": 48, "flags": 4},
{"matrix": [3, 11], "x": 190, "y": 48, "flags": 4},
{"matrix": [3, 10], "x": 172, "y": 48, "flags": 4},
{"matrix": [3, 9], "x": 155, "y": 48, "flags": 4},
@@ -93,6 +97,7 @@
{"matrix": [3, 3], "x": 52, "y": 48, "flags": 4},
{"matrix": [3, 2], "x": 34, "y": 48, "flags": 4},
{"matrix": [3, 1], "x": 17, "y": 48, "flags": 4},
+ {"matrix": [4, 3], "x": 52, "y": 64, "flags": 4},
{"matrix": [4, 2], "x": 34, "y": 64, "flags": 4},
{"matrix": [4, 1], "x": 17, "y": 64, "flags": 4},
{"matrix": [4, 0], "x": 0, "y": 64, "flags": 4},
@@ -109,8 +114,10 @@
{"matrix": [2, 9], "x": 155, "y": 32, "flags": 4},
{"matrix": [2, 10], "x": 172, "y": 32, "flags": 4},
{"matrix": [2, 11], "x": 190, "y": 32, "flags": 4},
- {"matrix": [2, 13], "x": 207, "y": 32, "flags": 4},
- {"matrix": [2, 12], "x": 224, "y": 16, "flags": 4},
+ {"matrix": [2, 12], "x": 200, "y": 32, "flags": 4},
+ {"matrix": [2, 13], "x": 224, "y": 32, "flags": 4},
+ {"matrix": [1, 14], "x": 224, "y": 16, "flags": 4},
+ {"matrix": [1, 13], "x": 224, "y": 16, "flags": 4},
{"matrix": [1, 12], "x": 207, "y": 16, "flags": 4},
{"matrix": [1, 11], "x": 190, "y": 16, "flags": 4},
{"matrix": [1, 10], "x": 172, "y": 16, "flags": 4},
@@ -137,7 +144,9 @@
{"matrix": [0, 10], "x": 172, "y": 0, "flags": 4},
{"matrix": [0, 11], "x": 190, "y": 0, "flags": 4},
{"matrix": [0, 12], "x": 207, "y": 0, "flags": 4},
- {"matrix": [0, 13], "x": 224, "y": 0, "flags": 4}
+ {"matrix": [0, 13], "x": 210, "y": 0, "flags": 4},
+ {"matrix": [0, 14], "x": 210, "y": 0, "flags": 4},
+ {"matrix": [0, 15], "x": 224, "y": 0, "flags": 4}
],
"max_brightness": 110,
"sleep": true,
@@ -145,13 +154,13 @@
},
"url": "",
"usb": {
- "device_version": "1.0.0",
+ "device_version": "1.1.0",
"pid": "0x1020",
"suspend_wakeup_delay": 1000,
"vid": "0x6332"
},
"ws2812": {
- "pin": "A8"
+ "pin": "B15"
},
"community_layouts": ["60_ansi", "60_iso"],
"layouts": {
@@ -170,7 +179,9 @@
{"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": [0, 13], "x": 13, "y": 0, "w": 0.5},
+ {"matrix": [0, 14], "x": 13.5, "y": 0},
+ {"matrix": [0, 15], "x": 14.5, "y": 0, "w": 0.5},
{"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},
@@ -184,7 +195,8 @@
{"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": [1, 13], "x": 13.5, "y": 1},
+ {"matrix": [1, 14], "x": 14.5, "y": 1, "w": 0.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},
@@ -197,28 +209,34 @@
{"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": 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": [2, 12], "x": 12.75, "y": 2},
+ {"matrix": [2, 13], "x": 13.75, "y": 2, "w": 1.25},
+ {"matrix": [3, 0], "x": 0, "y": 3, "w": 0.75},
+ {"matrix": [3, 1], "x": 0.75, "y": 3, "w": 0.5},
+ {"matrix": [3, 2], "x": 1.25, "y": 3},
+ {"matrix": [3, 3], "x": 2.25, "y": 3},
+ {"matrix": [3, 4], "x": 3.25, "y": 3},
+ {"matrix": [3, 5], "x": 4.25, "y": 3},
+ {"matrix": [3, 6], "x": 5.25, "y": 3},
+ {"matrix": [3, 7], "x": 6.25, "y": 3},
+ {"matrix": [3, 8], "x": 7.25, "y": 3},
+ {"matrix": [3, 9], "x": 8.25, "y": 3},
+ {"matrix": [3, 10], "x": 9.25, "y": 3},
+ {"matrix": [3, 11], "x": 10.25, "y": 3},
+ {"matrix": [3, 12], "x": 11.25, "y": 3},
+ {"matrix": [3, 13], "x": 12.25, "y": 3},
+ {"matrix": [3, 14], "x": 13.25, "y": 3, "w": 0.75},
+ {"matrix": [3, 15], "x": 14, "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": 2.5, "y": 4, "w": 1.25},
- {"matrix": [4, 6], "x": 3.75, "y": 4, "w": 6.25},
+ {"matrix": [4, 3], "x": 3.75, "y": 4},
+ {"matrix": [4, 6], "x": 4.75, "y": 4, "w": 4.25},
+ {"matrix": [4, 9], "x": 9, "y": 4},
{"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}
+ {"matrix": [4, 15], "x": 13.75, "y": 4, "w": 1.25}
]
},
"LAYOUT_60_ansi": {
@@ -236,7 +254,7 @@
{"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": [0, 14], "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},
@@ -250,7 +268,7 @@
{"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": [1, 13], "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},
@@ -264,18 +282,18 @@
{"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": [3, 1], "x": 0, "y": 3, "w": 2.25},
+ {"matrix": [3, 3], "x": 2.25, "y": 3},
+ {"matrix": [3, 4], "x": 3.25, "y": 3},
+ {"matrix": [3, 5], "x": 4.25, "y": 3},
+ {"matrix": [3, 6], "x": 5.25, "y": 3},
+ {"matrix": [3, 7], "x": 6.25, "y": 3},
+ {"matrix": [3, 8], "x": 7.25, "y": 3},
+ {"matrix": [3, 9], "x": 8.25, "y": 3},
+ {"matrix": [3, 10], "x": 9.25, "y": 3},
+ {"matrix": [3, 11], "x": 10.25, "y": 3},
+ {"matrix": [3, 12], "x": 11.25, "y": 3},
+ {"matrix": [3, 14], "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},
@@ -283,7 +301,7 @@
{"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}
+ {"matrix": [4, 15], "x": 13.75, "y": 4, "w": 1.25}
]
},
"LAYOUT_60_iso": {
@@ -301,7 +319,7 @@
{"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": [0, 14], "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},
@@ -328,20 +346,20 @@
{"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": [1, 14], "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": [3, 2], "x": 1.25, "y": 3},
+ {"matrix": [3, 3], "x": 2.25, "y": 3},
+ {"matrix": [3, 4], "x": 3.25, "y": 3},
+ {"matrix": [3, 5], "x": 4.25, "y": 3},
+ {"matrix": [3, 6], "x": 5.25, "y": 3},
+ {"matrix": [3, 7], "x": 6.25, "y": 3},
+ {"matrix": [3, 8], "x": 7.25, "y": 3},
+ {"matrix": [3, 9], "x": 8.25, "y": 3},
+ {"matrix": [3, 10], "x": 9.25, "y": 3},
+ {"matrix": [3, 11], "x": 10.25, "y": 3},
+ {"matrix": [3, 12], "x": 11.25, "y": 3},
+ {"matrix": [3, 14], "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},
@@ -349,7 +367,7 @@
{"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}
+ {"matrix": [4, 15], "x": 13.75, "y": 4, "w": 1.25}
]
}
}
diff --git a/keyboards/sharkoon/skiller_sgk50_s4/keymaps/default/keymap.c b/keyboards/sharkoon/skiller_sgk50_s4/keymaps/default/keymap.c
index a8a64d1f2d..9a9e207113 100644
--- a/keyboards/sharkoon/skiller_sgk50_s4/keymaps/default/keymap.c
+++ b/keyboards/sharkoon/skiller_sgk50_s4/keymaps/default/keymap.c
@@ -4,18 +4,18 @@
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [0] = LAYOUT_all(
+ [0] = LAYOUT_60_iso(
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC,
- KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_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_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC,
+ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT,
KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_APP, KC_RCTL
),
- [1] = LAYOUT_all(
+ [1] = LAYOUT_60_iso(
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL,
- _______, _______, _______, _______, _______, _______, KC_INS, _______, KC_UP, KC_PAUS, KC_PGUP, KC_HOME, KC_PSCR, RM_VALU,
- _______, _______, _______, _______, _______, _______, KC_SCRL, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_END, _______,
+ _______, _______, _______, _______, _______, _______, KC_INS, _______, KC_UP, KC_PAUS, KC_PGUP, KC_HOME, KC_PSCR,
+ _______, _______, _______, _______, _______, _______, KC_SCRL, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_END, RM_VALU, _______,
_______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, RM_VALD, _______,
_______, GU_TOGG, _______, _______, _______, _______, RM_HUEU, RM_NEXT
)
diff --git a/keyboards/silakka54/config.h b/keyboards/silakka54/config.h
new file mode 100644
index 0000000000..220b85cd08
--- /dev/null
+++ b/keyboards/silakka54/config.h
@@ -0,0 +1,25 @@
+/* Copyright 2024 Juho T. (@Squalius-cephalus)
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General 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 SERIAL_USART_FULL_DUPLEX
+#define SERIAL_USART_TX_PIN GP0
+#define SERIAL_USART_RX_PIN GP1
+
+#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET
+#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 200U
+#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_LED GP17
diff --git a/keyboards/silakka54/keyboard.json b/keyboards/silakka54/keyboard.json
new file mode 100644
index 0000000000..e1ad9aac9e
--- /dev/null
+++ b/keyboards/silakka54/keyboard.json
@@ -0,0 +1,102 @@
+{
+ "manufacturer": "Squalius-cephalus",
+ "keyboard_name": "silakka54",
+ "maintainer": "Squalius-cephalus",
+ "bootloader": "rp2040",
+ "diode_direction": "COL2ROW",
+ "features": {
+ "bootmagic": true,
+ "extrakey": true,
+ "mousekey": true,
+ "nkro": true
+ },
+ "split": {
+ "enabled": true,
+ "serial": {
+ "driver": "vendor"
+ }
+ },
+ "matrix_pins": {
+ "cols": ["GP7", "GP8", "GP9", "GP10", "GP11", "GP12"],
+ "rows": ["GP2", "GP3", "GP4", "GP5","GP6"]
+ },
+ "processor": "RP2040",
+ "url": "https://github.com/Squalius-cephalus/silakka54",
+ "usb": {
+ "device_version": "1.0.0",
+ "pid": "0x1212",
+ "vid": "0xFEED"
+ },
+ "layouts": {
+ "LAYOUT": {
+ "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": 0, "y": 5},
+ {"matrix": [5, 4], "x": 1, "y": 5},
+ {"matrix": [5, 3], "x": 2, "y": 5},
+ {"matrix": [5, 2], "x": 3, "y": 5},
+ {"matrix": [5, 1], "x": 4, "y": 5},
+ {"matrix": [5, 0], "x": 5, "y": 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": [6, 5], "x": 0, "y": 6},
+ {"matrix": [6, 4], "x": 1, "y": 6},
+ {"matrix": [6, 3], "x": 2, "y": 6},
+ {"matrix": [6, 2], "x": 3, "y": 6},
+ {"matrix": [6, 1], "x": 4, "y": 6},
+ {"matrix": [6, 0], "x": 5, "y": 6},
+
+ {"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": 0, "y": 7},
+ {"matrix": [7, 4], "x": 1, "y": 7},
+ {"matrix": [7, 3], "x": 2, "y": 7},
+ {"matrix": [7, 2], "x": 3, "y": 7},
+ {"matrix": [7, 1], "x": 4, "y": 7},
+ {"matrix": [7, 0], "x": 5, "y": 7},
+
+ {"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": 0, "y": 9},
+ {"matrix": [8, 4], "x": 1, "y": 9},
+ {"matrix": [8, 3], "x": 2, "y": 9},
+ {"matrix": [8, 2], "x": 3, "y": 9},
+ {"matrix": [8, 1], "x": 4, "y": 9},
+ {"matrix": [8, 0], "x": 5, "y": 9},
+
+ {"matrix": [4, 3], "x": 3, "y": 4},
+ {"matrix": [4, 4], "x": 4, "y": 4},
+ {"matrix": [4, 5], "x": 5, "y": 4},
+
+ {"matrix": [9, 5], "x": 3, "y": 9},
+ {"matrix": [9, 4], "x": 4, "y": 9},
+ {"matrix": [9, 3], "x": 5, "y": 9}
+
+
+ ]
+ }
+ }
+}
diff --git a/keyboards/silakka54/keymaps/default/keymap.c b/keyboards/silakka54/keymaps/default/keymap.c
new file mode 100644
index 0000000000..aa5e64efa3
--- /dev/null
+++ b/keyboards/silakka54/keymaps/default/keymap.c
@@ -0,0 +1,22 @@
+// Copyright 2023 QMK
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#include QMK_KEYBOARD_H
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+ [0] = LAYOUT(
+ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
+ KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
+ KC_LGUI, MO(1), KC_SPC, KC_ENT, KC_RCTL, KC_RALT
+ ),
+ [1] = LAYOUT(
+ KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_PGDN, KC_HOME, KC_END, KC_DEL, KC_F12,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_LBRC, KC_RBRC,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
+ )
+};
diff --git a/keyboards/silakka54/readme.md b/keyboards/silakka54/readme.md
new file mode 100644
index 0000000000..08a38aa473
--- /dev/null
+++ b/keyboards/silakka54/readme.md
@@ -0,0 +1,26 @@
+# Silakka54
+
+![Silakka54](https://i.imgur.com/JrsS0kY.png)
+
+Silakka54 is a RP2040 Zero based 54-key column staggered split keyboard. PCB uses hotswap sockets. Design is inspired from REVIUNG41 and Corne keyboards.
+
+* Keyboard Maintainer: [Squalius-cephalus](https://github.com/Squalius-cephalus)
+* Hardware Supported: Silakka54 PCB
+* Hardware Availability: https://github.com/Squalius-cephalus/silakka54
+
+Make example for this keyboard (after setting up your build environment):
+
+ make silakka54:default
+
+Flashing example for this keyboard:
+
+ make silakka54: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 2 ways:
+
+* **Physical boot button**: Hold BOOT button down and connect MCU to the PC
+* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available
diff --git a/keyboards/skyloong/gk61/pro/config.h b/keyboards/skyloong/gk61/pro/config.h
index db02496f8b..aeea36e0bc 100644
--- a/keyboards/skyloong/gk61/pro/config.h
+++ b/keyboards/skyloong/gk61/pro/config.h
@@ -7,6 +7,3 @@
#define IS31FL3743A_SDB_PIN C1
#define CAPS_LOCK_INDEX 28
-#define WIN_MOD_INDEX 16
-#define MAC_MOD_INDEX 17
-#define WIN_LOCK_INDEX 54
diff --git a/keyboards/skyloong/gk61/pro/pro.c b/keyboards/skyloong/gk61/pro/pro.c
index 2299977e0e..11411ba2b1 100644
--- a/keyboards/skyloong/gk61/pro/pro.c
+++ b/keyboards/skyloong/gk61/pro/pro.c
@@ -1,11 +1,8 @@
// Copyright 2023 linlin012 (@linlin012)
// SPDX-License-Identifier: GPL-2.0-or-later
#include "quantum.h"
-int FN_WIN = 0;
-int FN_MAC = 0;
-int L_WIN = 0;
-int L_MAC = 0;
+#if defined(RGB_MATRIX_ENABLE)
const is31fl3743a_led_t PROGMEM g_is31fl3743a_leds[IS31FL3743A_LED_COUNT] = {
/* Refer to IS31 manual for these locations
* driver
@@ -83,7 +80,32 @@ const is31fl3743a_led_t PROGMEM g_is31fl3743a_leds[IS31FL3743A_LED_COUNT] = {
{0, SW10_CS13, SW10_CS14, SW10_CS15}
};
-#if defined(RGB_MATRIX_ENABLE) /*&& defined(CAPS_LOCK_INDEX)*/
+bool rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) {
+ if (!rgb_matrix_indicators_advanced_user(led_min, led_max)) {
+ return false;
+ }
+
+ if (host_keyboard_led_state().caps_lock) {
+ RGB_MATRIX_INDICATOR_SET_COLOR(CAPS_LOCK_INDEX, 255, 255, 255);
+ } else {
+ if (!rgb_matrix_get_flags()) {
+ RGB_MATRIX_INDICATOR_SET_COLOR(CAPS_LOCK_INDEX, 0, 0, 0);
+ }
+ }
+
+ return false;
+}
+
+void suspend_power_down_kb(void) {
+ gpio_write_pin_low(IS31FL3743A_SDB_PIN);
+ suspend_power_down_user();
+}
+
+void suspend_wakeup_init_kb(void) {
+ gpio_write_pin_high(IS31FL3743A_SDB_PIN);
+ suspend_wakeup_init_user();
+}
+#endif
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
if (!process_record_user(keycode, record)) {
@@ -105,124 +127,9 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
}
return false;
# endif
- case TO(0):
- if (record->event.pressed) {
- L_WIN = 1;
- set_single_persistent_default_layer(0); // Save default layer 0 to eeprom
- } else {
- L_WIN = 0;
- }
- return true; // continue all further processing of this key
-
- case MO(2):
- if (record->event.pressed) {
- FN_WIN = 1;
- } else {
- FN_WIN = 0;
- }
- return true; // continue all further processing of this key
-
- case TO(1):
- if (record->event.pressed) {
- L_MAC = 1;
- set_single_persistent_default_layer(1); //Save default layer 1 to eeprom
- } else {
- L_MAC = 0;
- }
- return true; // continue all further processing of this key
-
- case MO(3):
- if (record->event.pressed) {
- FN_MAC = 1;
- } else {
- FN_MAC = 0;
- }
- return true; // continue all further processing of this key
- default:
- return true;
- }
-
-}
-
-bool rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) {
- if (!rgb_matrix_indicators_advanced_user(led_min, led_max)) {
- return false;
- }
-
- if (host_keyboard_led_state().caps_lock) {
- RGB_MATRIX_INDICATOR_SET_COLOR(CAPS_LOCK_INDEX, 255, 255, 255);
- } else {
- if (!rgb_matrix_get_flags()) {
- RGB_MATRIX_INDICATOR_SET_COLOR(CAPS_LOCK_INDEX, 0, 0, 0);
- }
- }
-
- switch (get_highest_layer(layer_state)) {
- case 0:{
- if (L_WIN) {
- RGB_MATRIX_INDICATOR_SET_COLOR(WIN_MOD_INDEX, 255, 255, 255);
- if (!rgb_matrix_get_flags()) {
- RGB_MATRIX_INDICATOR_SET_COLOR(MAC_MOD_INDEX, 0, 0, 0);
- }
- }else{
- if (!rgb_matrix_get_flags()) {
- RGB_MATRIX_INDICATOR_SET_COLOR(WIN_MOD_INDEX, 0, 0, 0);
- }
- }
- } break;
-
- case 1:{
- if (L_MAC) {
- RGB_MATRIX_INDICATOR_SET_COLOR(MAC_MOD_INDEX, 255, 255, 255);
- if (!rgb_matrix_get_flags()) {
- RGB_MATRIX_INDICATOR_SET_COLOR(WIN_MOD_INDEX, 0, 0, 0);
- }
- }else{
- if (!rgb_matrix_get_flags()) {
- RGB_MATRIX_INDICATOR_SET_COLOR(MAC_MOD_INDEX, 0, 0, 0);
- }
- }
- } break;
-
-
- case 2:{
- RGB_MATRIX_INDICATOR_SET_COLOR(WIN_MOD_INDEX, 255, 255, 255);
- if (!rgb_matrix_get_flags()) {
- RGB_MATRIX_INDICATOR_SET_COLOR(MAC_MOD_INDEX, 0, 0, 0);
- }
- } break;
-
- case 3:{
- RGB_MATRIX_INDICATOR_SET_COLOR(MAC_MOD_INDEX, 255, 255, 255);
- if (!rgb_matrix_get_flags()) {
- RGB_MATRIX_INDICATOR_SET_COLOR(WIN_MOD_INDEX, 0, 0, 0);
- }
- } break;
-
- default:{
- if (!rgb_matrix_get_flags()) {
- RGB_MATRIX_INDICATOR_SET_COLOR(WIN_MOD_INDEX, 0, 0, 0);
- RGB_MATRIX_INDICATOR_SET_COLOR(MAC_MOD_INDEX, 0, 0, 0);
- }
- }
}
- return false;
-}
-
-#endif
-void suspend_power_down_kb() {
-# ifdef RGB_MATRIX_ENABLE
- gpio_write_pin_low(IS31FL3743A_SDB_PIN);
-# endif
- suspend_power_down_user();
-}
-
-void suspend_wakeup_init_kb() {
-# ifdef RGB_MATRIX_ENABLE
- gpio_write_pin_high(IS31FL3743A_SDB_PIN);
-# endif
- suspend_wakeup_init_user();
+ return true;
}
void board_init(void) {
diff --git a/keyboards/skyloong/gk61/pro_48/config.h b/keyboards/skyloong/gk61/pro_48/config.h
index 5b4976e2da..7e45ac8354 100644
--- a/keyboards/skyloong/gk61/pro_48/config.h
+++ b/keyboards/skyloong/gk61/pro_48/config.h
@@ -7,7 +7,3 @@
#define IS31FL3743A_SDB_PIN A4
#define CAPS_LOCK_INDEX 28
-#define WIN_MOD_INDEX 16
-#define MAC_MOD_INDEX 17
-
-#define g_suspend_state rgb_matrix_get_suspend_state()
diff --git a/keyboards/skyloong/gk61/pro_48/pro_48.c b/keyboards/skyloong/gk61/pro_48/pro_48.c
index 6da76a1767..11411ba2b1 100644
--- a/keyboards/skyloong/gk61/pro_48/pro_48.c
+++ b/keyboards/skyloong/gk61/pro_48/pro_48.c
@@ -1,12 +1,8 @@
// Copyright 2023 linlin012 (@linlin012)
// SPDX-License-Identifier: GPL-2.0-or-later
#include "quantum.h"
-_Bool FN_WIN = 0;
-_Bool FN_MAC = 0;
-_Bool L_WIN = 0;
-_Bool L_MAC = 0;
-#if defined(RGB_MATRIX_ENABLE) /*&& defined(CAPS_LOCK_INDEX)*/
+#if defined(RGB_MATRIX_ENABLE)
const is31fl3743a_led_t PROGMEM g_is31fl3743a_leds[IS31FL3743A_LED_COUNT] = {
/* Refer to IS31 manual for these locations
* driver
@@ -97,57 +93,9 @@ bool rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) {
}
}
- switch (get_highest_layer(layer_state)) {
- case 2:{
- RGB_MATRIX_INDICATOR_SET_COLOR(WIN_MOD_INDEX, 255, 255, 255);
- if (!rgb_matrix_get_flags()) {
- RGB_MATRIX_INDICATOR_SET_COLOR(MAC_MOD_INDEX, 0, 0, 0);
- }
- } break;
- case 3:{
- RGB_MATRIX_INDICATOR_SET_COLOR(MAC_MOD_INDEX, 255, 255, 255);
- if (!rgb_matrix_get_flags()) {
- RGB_MATRIX_INDICATOR_SET_COLOR(WIN_MOD_INDEX, 0, 0, 0);
- }
- } break;
-
- case 0:{
- if (L_WIN) {
- RGB_MATRIX_INDICATOR_SET_COLOR(WIN_MOD_INDEX, 255, 255, 255);
- if (!rgb_matrix_get_flags()) {
- RGB_MATRIX_INDICATOR_SET_COLOR(MAC_MOD_INDEX, 0, 0, 0);
- }
- }else{
- if (!rgb_matrix_get_flags()) {
- RGB_MATRIX_INDICATOR_SET_COLOR(WIN_MOD_INDEX, 0, 0, 0);
- }
- }
- } break;
-
- case 1:{
- if (L_MAC) {
- RGB_MATRIX_INDICATOR_SET_COLOR(MAC_MOD_INDEX, 255, 255, 255);
- if (!rgb_matrix_get_flags()) {
- RGB_MATRIX_INDICATOR_SET_COLOR(WIN_MOD_INDEX, 0, 0, 0);
- }
- }else{
- if (!rgb_matrix_get_flags()) {
- RGB_MATRIX_INDICATOR_SET_COLOR(MAC_MOD_INDEX, 0, 0, 0);
- }
- }
- } break;
-
- default:{
- if (!rgb_matrix_get_flags()) {
- RGB_MATRIX_INDICATOR_SET_COLOR(WIN_MOD_INDEX, 0, 0, 0);
- RGB_MATRIX_INDICATOR_SET_COLOR(MAC_MOD_INDEX, 0, 0, 0);
- }
- }
- }
return false;
}
-
void suspend_power_down_kb(void) {
gpio_write_pin_low(IS31FL3743A_SDB_PIN);
suspend_power_down_user();
@@ -177,44 +125,11 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
} break;
}
}
- return false;
+ return false;
# endif
- case TO(0):
- if (record->event.pressed) {
- L_WIN = 1;
- set_single_persistent_default_layer(0); // Save default layer 0 to eeprom
- } else {
- L_WIN = 0;
- }
- return true; // continue all further processing of this key
-
- case MO(2):
- if (record->event.pressed) {
- FN_WIN = 1;
- } else {
- FN_WIN = 0;
- }
- return true; // continue all further processing of this key
-
- case TO(1):
- if (record->event.pressed) {
- L_MAC = 1;
- set_single_persistent_default_layer(1); //Save default layer 1 to eeprom
- } else {
- L_MAC = 0;
- }
- return true; // continue all further processing of this key
-
- case MO(3):
- if (record->event.pressed) {
- FN_MAC = 1;
- } else {
- FN_MAC = 0;
- }
- return true; // continue all further processing of this key
- default:
- return true;
}
+
+ return true;
}
void board_init(void) {
diff --git a/keyboards/smoll/lefty/rules.mk b/keyboards/smoll/lefty/rules.mk
deleted file mode 100644
index 6bc5abbdc5..0000000000
--- a/keyboards/smoll/lefty/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = smoll/lefty/rev2
diff --git a/keyboards/sofle/rules.mk b/keyboards/sofle/rules.mk
deleted file mode 100644
index a7307c3499..0000000000
--- a/keyboards/sofle/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = sofle/rev1
diff --git a/keyboards/spaceholdings/nebula68b/rules.mk b/keyboards/spaceholdings/nebula68b/rules.mk
deleted file mode 100644
index 8fe37f83b3..0000000000
--- a/keyboards/spaceholdings/nebula68b/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = spaceholdings/nebula68b/solder
diff --git a/keyboards/spacetime/rules.mk b/keyboards/spacetime/rules.mk
deleted file mode 100644
index ac339c2cef..0000000000
--- a/keyboards/spacetime/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = spacetime/rev1
diff --git a/keyboards/splitkb/aurora/helix/rules.mk b/keyboards/splitkb/aurora/helix/rules.mk
deleted file mode 100644
index 8130273c1f..0000000000
--- a/keyboards/splitkb/aurora/helix/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = splitkb/aurora/helix/rev1 \ No newline at end of file
diff --git a/keyboards/splitkb/aurora/sofle_v2/rules.mk b/keyboards/splitkb/aurora/sofle_v2/rules.mk
deleted file mode 100644
index 4a50c4dbb1..0000000000
--- a/keyboards/splitkb/aurora/sofle_v2/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = splitkb/aurora/sofle_v2/rev1 \ No newline at end of file
diff --git a/keyboards/splitkb/kyria/rev1/rules.mk b/keyboards/splitkb/kyria/rev1/rules.mk
deleted file mode 100644
index 3a8bfbe089..0000000000
--- a/keyboards/splitkb/kyria/rev1/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = splitkb/kyria/rev1/base
diff --git a/keyboards/splitkb/kyria/rev2/rules.mk b/keyboards/splitkb/kyria/rev2/rules.mk
deleted file mode 100644
index fb808070bf..0000000000
--- a/keyboards/splitkb/kyria/rev2/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = splitkb/kyria/rev2/base
diff --git a/keyboards/splitkb/kyria/rules.mk b/keyboards/splitkb/kyria/rules.mk
deleted file mode 100644
index 1342089f56..0000000000
--- a/keyboards/splitkb/kyria/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = splitkb/kyria/rev3
diff --git a/keyboards/splitty/rules.mk b/keyboards/splitty/rules.mk
deleted file mode 100644
index 68b3198bfb..0000000000
--- a/keyboards/splitty/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = splitty/rev1
diff --git a/keyboards/studiokestra/galatea/rules.mk b/keyboards/studiokestra/galatea/rules.mk
deleted file mode 100644
index b5b1db4238..0000000000
--- a/keyboards/studiokestra/galatea/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = studiokestra/galatea/rev1 \ No newline at end of file
diff --git a/keyboards/takashiski/hecomi/rules.mk b/keyboards/takashiski/hecomi/rules.mk
deleted file mode 100644
index 41002fe272..0000000000
--- a/keyboards/takashiski/hecomi/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = takashiski/hecomi/alpha
diff --git a/keyboards/takashiski/namecard2x4/rules.mk b/keyboards/takashiski/namecard2x4/rules.mk
deleted file mode 100644
index f93cfc823d..0000000000
--- a/keyboards/takashiski/namecard2x4/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = takashiski/namecard2x4/rev2
diff --git a/keyboards/themadnoodle/noodlepad/rules.mk b/keyboards/themadnoodle/noodlepad/rules.mk
deleted file mode 100644
index 318832e121..0000000000
--- a/keyboards/themadnoodle/noodlepad/rules.mk
+++ /dev/null
@@ -1,3 +0,0 @@
-# Default folder for noodlepad
-DEFAULT_FOLDER = themadnoodle/noodlepad/v1
-
diff --git a/keyboards/tkw/grandiceps/rules.mk b/keyboards/tkw/grandiceps/rules.mk
deleted file mode 100644
index ab8aeff268..0000000000
--- a/keyboards/tkw/grandiceps/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = tkw/grandiceps/rev1
diff --git a/keyboards/tkw/stoutgat/v2/rules.mk b/keyboards/tkw/stoutgat/v2/rules.mk
deleted file mode 100644
index 1a660af26c..0000000000
--- a/keyboards/tkw/stoutgat/v2/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = tkw/stoutgat/v2/f411
diff --git a/keyboards/tominabox1/le_chiffre/rules.mk b/keyboards/tominabox1/le_chiffre/rules.mk
deleted file mode 100644
index 57b3d94eab..0000000000
--- a/keyboards/tominabox1/le_chiffre/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = tominabox1/le_chiffre/rev1
diff --git a/keyboards/tominabox1/littlefoot_lx/rules.mk b/keyboards/tominabox1/littlefoot_lx/rules.mk
deleted file mode 100644
index 4756f7600f..0000000000
--- a/keyboards/tominabox1/littlefoot_lx/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = tominabox1/littlefoot_lx/rev1
diff --git a/keyboards/tominabox1/underscore33/rules.mk b/keyboards/tominabox1/underscore33/rules.mk
deleted file mode 100644
index b5e13fd420..0000000000
--- a/keyboards/tominabox1/underscore33/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = tominabox1/underscore33/rev1
diff --git a/keyboards/trnthsn/e8ghty/rules.mk b/keyboards/trnthsn/e8ghty/rules.mk
deleted file mode 100644
index e06e8fe182..0000000000
--- a/keyboards/trnthsn/e8ghty/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = trnthsn/e8ghty/stm32f103
diff --git a/keyboards/trnthsn/s6xty5neor2/rules.mk b/keyboards/trnthsn/s6xty5neor2/rules.mk
deleted file mode 100644
index 1fc77fba72..0000000000
--- a/keyboards/trnthsn/s6xty5neor2/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = trnthsn/s6xty5neor2/stm32f103
diff --git a/keyboards/tweetydabird/lotus58/rules.mk b/keyboards/tweetydabird/lotus58/rules.mk
deleted file mode 100644
index 4cd2262cc7..0000000000
--- a/keyboards/tweetydabird/lotus58/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = tweetydabird/lotus58/promicro \ No newline at end of file
diff --git a/keyboards/unison/rules.mk b/keyboards/unison/rules.mk
deleted file mode 100644
index 69c33d71a2..0000000000
--- a/keyboards/unison/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = unison/v04
diff --git a/keyboards/uzu42/rules.mk b/keyboards/uzu42/rules.mk
deleted file mode 100644
index 277e74b715..0000000000
--- a/keyboards/uzu42/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = uzu42/rev1
diff --git a/keyboards/vitamins_included/rules.mk b/keyboards/vitamins_included/rules.mk
deleted file mode 100644
index e3452d41db..0000000000
--- a/keyboards/vitamins_included/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = vitamins_included/rev2
diff --git a/keyboards/whale/sk/rules.mk b/keyboards/whale/sk/rules.mk
deleted file mode 100644
index 1a4ddedfa7..0000000000
--- a/keyboards/whale/sk/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = whale/sk/v3
diff --git a/keyboards/yanghu/unicorne/rules.mk b/keyboards/yanghu/unicorne/rules.mk
deleted file mode 100644
index 96852c8abf..0000000000
--- a/keyboards/yanghu/unicorne/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = yanghu/unicorne/f411
diff --git a/keyboards/ymdk/id75/board.h b/keyboards/ymdk/id75/f103/board.h
index 49270b36a0..49270b36a0 100644
--- a/keyboards/ymdk/id75/board.h
+++ b/keyboards/ymdk/id75/f103/board.h
diff --git a/keyboards/ymdk/id75/config.h b/keyboards/ymdk/id75/f103/config.h
index cb5ac78304..cb5ac78304 100644
--- a/keyboards/ymdk/id75/config.h
+++ b/keyboards/ymdk/id75/f103/config.h
diff --git a/keyboards/ymdk/id75/halconf.h b/keyboards/ymdk/id75/f103/halconf.h
index 612ce4fc4a..612ce4fc4a 100644
--- a/keyboards/ymdk/id75/halconf.h
+++ b/keyboards/ymdk/id75/f103/halconf.h
diff --git a/keyboards/ymdk/id75/f103/keyboard.json b/keyboards/ymdk/id75/f103/keyboard.json
new file mode 100644
index 0000000000..5b1974b3f2
--- /dev/null
+++ b/keyboards/ymdk/id75/f103/keyboard.json
@@ -0,0 +1,13 @@
+{
+ "manufacturer": "YMDK",
+ "bootloader": "uf2boot",
+ "matrix_pins": {
+ "cols": ["A10", "A9", "A8", "B15", "B14", "B13", "B12", "A5", "A6", "A4", "A3", "A2", "A1", "A0", "A15"],
+ "rows": ["B2", "B1", "B0", "A7", "B10"]
+ },
+ "processor": "STM32F103",
+ "ws2812": {
+ "driver": "pwm",
+ "pin": "B9"
+ }
+}
diff --git a/keyboards/ymdk/id75/mcuconf.h b/keyboards/ymdk/id75/f103/mcuconf.h
index 0d3de3dad5..0d3de3dad5 100644
--- a/keyboards/ymdk/id75/mcuconf.h
+++ b/keyboards/ymdk/id75/f103/mcuconf.h
diff --git a/keyboards/ymdk/id75/rules.mk b/keyboards/ymdk/id75/f103/rules.mk
index dbee20ab05..dbee20ab05 100644
--- a/keyboards/ymdk/id75/rules.mk
+++ b/keyboards/ymdk/id75/f103/rules.mk
diff --git a/keyboards/ymdk/id75/keyboard.json b/keyboards/ymdk/id75/info.json
index db0c108542..bbe4d1c73e 100644
--- a/keyboards/ymdk/id75/keyboard.json
+++ b/keyboards/ymdk/id75/info.json
@@ -1,8 +1,6 @@
{
- "manufacturer": "YMDK",
"keyboard_name": "Idobao x YMDK ID75",
"maintainer": "qmk",
- "bootloader": "uf2boot",
"diode_direction": "ROW2COL",
"features": {
"bootmagic": true,
@@ -11,152 +9,143 @@
"nkro": true,
"rgb_matrix": true
},
- "matrix_pins": {
- "cols": ["A10", "A9", "A8", "B15", "B14", "B13", "B12", "A5", "A6", "A4", "A3", "A2", "A1", "A0", "A15"],
- "rows": ["B2", "B1", "B0", "A7", "B10"]
- },
- "processor": "STM32F103",
- "ws2812": {
- "driver": "pwm",
- "pin": "B9"
- },
"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_sat": true,
"band_spiral_sat": true,
"band_spiral_val": true,
+ "band_val": true,
+ "breathing": 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,
+ "cycle_up_down": true,
+ "digital_rain": true,
"dual_beacon": true,
- "rainbow_beacon": true,
- "rainbow_pinwheels": true,
- "raindrops": true,
- "jellybean_raindrops": true,
+ "gradient_left_right": true,
+ "gradient_up_down": true,
"hue_breathing": true,
"hue_pendulum": true,
"hue_wave": true,
- "pixel_rain": true,
+ "jellybean_raindrops": true,
+ "multisplash": true,
"pixel_flow": true,
"pixel_fractal": true,
- "typing_heatmap": true,
- "digital_rain": true,
- "solid_reactive_simple": true,
+ "pixel_rain": true,
+ "rainbow_beacon": true,
+ "rainbow_moving_chevron": true,
+ "rainbow_pinwheels": true,
+ "raindrops": true,
+ "solid_multisplash": 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_reactive_multiwide": true,
+ "solid_reactive_nexus": true,
+ "solid_reactive_simple": true,
+ "solid_reactive_wide": true,
"solid_splash": true,
- "solid_multisplash": true
+ "splash": true,
+ "typing_heatmap": true
},
"driver": "ws2812",
"layout": [
- {"flags": 4, "matrix": [4, 14], "x": 224, "y": 64},
- {"flags": 4, "matrix": [4, 13], "x": 208, "y": 64},
- {"flags": 4, "matrix": [4, 12], "x": 192, "y": 64},
- {"flags": 4, "matrix": [4, 11], "x": 176, "y": 64},
- {"flags": 4, "matrix": [4, 10], "x": 160, "y": 64},
- {"flags": 4, "matrix": [4, 9], "x": 144, "y": 64},
- {"flags": 4, "matrix": [4, 8], "x": 128, "y": 64},
- {"flags": 4, "matrix": [4, 7], "x": 112, "y": 64},
- {"flags": 4, "matrix": [4, 6], "x": 96, "y": 64},
- {"flags": 4, "matrix": [4, 5], "x": 80, "y": 64},
- {"flags": 4, "matrix": [4, 4], "x": 64, "y": 64},
- {"flags": 4, "matrix": [4, 3], "x": 48, "y": 64},
- {"flags": 4, "matrix": [4, 2], "x": 32, "y": 64},
- {"flags": 4, "matrix": [4, 1], "x": 16, "y": 64},
- {"flags": 4, "matrix": [4, 0], "x": 0, "y": 64},
- {"flags": 4, "matrix": [3, 14], "x": 224, "y": 48},
- {"flags": 4, "matrix": [3, 13], "x": 208, "y": 48},
- {"flags": 4, "matrix": [3, 12], "x": 192, "y": 48},
- {"flags": 4, "matrix": [3, 11], "x": 176, "y": 48},
- {"flags": 4, "matrix": [3, 10], "x": 160, "y": 48},
- {"flags": 4, "matrix": [3, 9], "x": 144, "y": 48},
- {"flags": 4, "matrix": [3, 8], "x": 128, "y": 48},
- {"flags": 4, "matrix": [3, 7], "x": 112, "y": 48},
- {"flags": 4, "matrix": [3, 6], "x": 96, "y": 48},
- {"flags": 4, "matrix": [3, 5], "x": 80, "y": 48},
- {"flags": 4, "matrix": [3, 4], "x": 64, "y": 48},
- {"flags": 4, "matrix": [3, 3], "x": 48, "y": 48},
- {"flags": 4, "matrix": [3, 2], "x": 32, "y": 48},
- {"flags": 4, "matrix": [3, 1], "x": 16, "y": 48},
- {"flags": 4, "matrix": [3, 0], "x": 0, "y": 48},
- {"flags": 4, "matrix": [2, 14], "x": 224, "y": 32},
- {"flags": 4, "matrix": [2, 13], "x": 208, "y": 32},
- {"flags": 4, "matrix": [2, 12], "x": 192, "y": 32},
- {"flags": 4, "matrix": [2, 11], "x": 176, "y": 32},
- {"flags": 4, "matrix": [2, 10], "x": 160, "y": 32},
- {"flags": 4, "matrix": [2, 9], "x": 144, "y": 32},
- {"flags": 4, "matrix": [2, 8], "x": 128, "y": 32},
- {"flags": 4, "matrix": [2, 7], "x": 112, "y": 32},
- {"flags": 4, "matrix": [2, 6], "x": 96, "y": 32},
- {"flags": 4, "matrix": [2, 5], "x": 80, "y": 32},
- {"flags": 4, "matrix": [2, 4], "x": 64, "y": 32},
- {"flags": 4, "matrix": [2, 3], "x": 48, "y": 32},
- {"flags": 4, "matrix": [2, 2], "x": 32, "y": 32},
- {"flags": 4, "matrix": [2, 1], "x": 16, "y": 32},
- {"flags": 4, "matrix": [2, 0], "x": 0, "y": 32},
- {"flags": 4, "matrix": [1, 14], "x": 224, "y": 16},
- {"flags": 4, "matrix": [1, 13], "x": 208, "y": 16},
- {"flags": 4, "matrix": [1, 12], "x": 192, "y": 16},
- {"flags": 4, "matrix": [1, 11], "x": 176, "y": 16},
- {"flags": 4, "matrix": [1, 10], "x": 160, "y": 16},
- {"flags": 4, "matrix": [1, 9], "x": 144, "y": 16},
- {"flags": 4, "matrix": [1, 8], "x": 128, "y": 16},
- {"flags": 4, "matrix": [1, 7], "x": 112, "y": 16},
- {"flags": 4, "matrix": [1, 6], "x": 96, "y": 16},
- {"flags": 4, "matrix": [1, 5], "x": 80, "y": 16},
- {"flags": 4, "matrix": [1, 4], "x": 64, "y": 16},
- {"flags": 4, "matrix": [1, 3], "x": 48, "y": 16},
- {"flags": 4, "matrix": [1, 2], "x": 32, "y": 16},
- {"flags": 4, "matrix": [1, 1], "x": 16, "y": 16},
- {"flags": 4, "matrix": [1, 0], "x": 0, "y": 16},
- {"flags": 4, "matrix": [0, 14], "x": 224, "y": 0},
- {"flags": 4, "matrix": [0, 13], "x": 208, "y": 0},
- {"flags": 4, "matrix": [0, 12], "x": 192, "y": 0},
- {"flags": 4, "matrix": [0, 11], "x": 176, "y": 0},
- {"flags": 4, "matrix": [0, 10], "x": 160, "y": 0},
- {"flags": 4, "matrix": [0, 9], "x": 144, "y": 0},
- {"flags": 4, "matrix": [0, 8], "x": 128, "y": 0},
- {"flags": 4, "matrix": [0, 7], "x": 112, "y": 0},
- {"flags": 4, "matrix": [0, 6], "x": 96, "y": 0},
- {"flags": 4, "matrix": [0, 5], "x": 80, "y": 0},
- {"flags": 4, "matrix": [0, 4], "x": 64, "y": 0},
- {"flags": 4, "matrix": [0, 3], "x": 48, "y": 0},
- {"flags": 4, "matrix": [0, 2], "x": 32, "y": 0},
- {"flags": 4, "matrix": [0, 1], "x": 16, "y": 0},
- {"flags": 4, "matrix": [0, 0], "x": 0, "y": 0},
- {"flags": 2, "x": 0, "y": 64},
- {"flags": 2, "x": 38, "y": 64},
- {"flags": 2, "x": 76, "y": 64},
- {"flags": 2, "x": 114, "y": 64},
- {"flags": 2, "x": 152, "y": 64},
- {"flags": 2, "x": 190, "y": 64},
- {"flags": 2, "x": 224, "y": 64},
- {"flags": 2, "x": 0, "y": 0},
- {"flags": 2, "x": 38, "y": 0},
- {"flags": 2, "x": 76, "y": 0},
- {"flags": 2, "x": 114, "y": 0},
- {"flags": 2, "x": 152, "y": 0},
- {"flags": 2, "x": 190, "y": 0},
- {"flags": 2, "x": 224, "y": 0}
+ {"matrix": [4, 14], "x": 224, "y": 64, "flags": 4},
+ {"matrix": [4, 13], "x": 208, "y": 64, "flags": 4},
+ {"matrix": [4, 12], "x": 192, "y": 64, "flags": 4},
+ {"matrix": [4, 11], "x": 176, "y": 64, "flags": 4},
+ {"matrix": [4, 10], "x": 160, "y": 64, "flags": 4},
+ {"matrix": [4, 9], "x": 144, "y": 64, "flags": 4},
+ {"matrix": [4, 8], "x": 128, "y": 64, "flags": 4},
+ {"matrix": [4, 7], "x": 112, "y": 64, "flags": 4},
+ {"matrix": [4, 6], "x": 96, "y": 64, "flags": 4},
+ {"matrix": [4, 5], "x": 80, "y": 64, "flags": 4},
+ {"matrix": [4, 4], "x": 64, "y": 64, "flags": 4},
+ {"matrix": [4, 3], "x": 48, "y": 64, "flags": 4},
+ {"matrix": [4, 2], "x": 32, "y": 64, "flags": 4},
+ {"matrix": [4, 1], "x": 16, "y": 64, "flags": 4},
+ {"matrix": [4, 0], "x": 0, "y": 64, "flags": 4},
+ {"matrix": [3, 14], "x": 224, "y": 48, "flags": 4},
+ {"matrix": [3, 13], "x": 208, "y": 48, "flags": 4},
+ {"matrix": [3, 12], "x": 192, "y": 48, "flags": 4},
+ {"matrix": [3, 11], "x": 176, "y": 48, "flags": 4},
+ {"matrix": [3, 10], "x": 160, "y": 48, "flags": 4},
+ {"matrix": [3, 9], "x": 144, "y": 48, "flags": 4},
+ {"matrix": [3, 8], "x": 128, "y": 48, "flags": 4},
+ {"matrix": [3, 7], "x": 112, "y": 48, "flags": 4},
+ {"matrix": [3, 6], "x": 96, "y": 48, "flags": 4},
+ {"matrix": [3, 5], "x": 80, "y": 48, "flags": 4},
+ {"matrix": [3, 4], "x": 64, "y": 48, "flags": 4},
+ {"matrix": [3, 3], "x": 48, "y": 48, "flags": 4},
+ {"matrix": [3, 2], "x": 32, "y": 48, "flags": 4},
+ {"matrix": [3, 1], "x": 16, "y": 48, "flags": 4},
+ {"matrix": [3, 0], "x": 0, "y": 48, "flags": 4},
+ {"matrix": [2, 14], "x": 224, "y": 32, "flags": 4},
+ {"matrix": [2, 13], "x": 208, "y": 32, "flags": 4},
+ {"matrix": [2, 12], "x": 192, "y": 32, "flags": 4},
+ {"matrix": [2, 11], "x": 176, "y": 32, "flags": 4},
+ {"matrix": [2, 10], "x": 160, "y": 32, "flags": 4},
+ {"matrix": [2, 9], "x": 144, "y": 32, "flags": 4},
+ {"matrix": [2, 8], "x": 128, "y": 32, "flags": 4},
+ {"matrix": [2, 7], "x": 112, "y": 32, "flags": 4},
+ {"matrix": [2, 6], "x": 96, "y": 32, "flags": 4},
+ {"matrix": [2, 5], "x": 80, "y": 32, "flags": 4},
+ {"matrix": [2, 4], "x": 64, "y": 32, "flags": 4},
+ {"matrix": [2, 3], "x": 48, "y": 32, "flags": 4},
+ {"matrix": [2, 2], "x": 32, "y": 32, "flags": 4},
+ {"matrix": [2, 1], "x": 16, "y": 32, "flags": 4},
+ {"matrix": [2, 0], "x": 0, "y": 32, "flags": 4},
+ {"matrix": [1, 14], "x": 224, "y": 16, "flags": 4},
+ {"matrix": [1, 13], "x": 208, "y": 16, "flags": 4},
+ {"matrix": [1, 12], "x": 192, "y": 16, "flags": 4},
+ {"matrix": [1, 11], "x": 176, "y": 16, "flags": 4},
+ {"matrix": [1, 10], "x": 160, "y": 16, "flags": 4},
+ {"matrix": [1, 9], "x": 144, "y": 16, "flags": 4},
+ {"matrix": [1, 8], "x": 128, "y": 16, "flags": 4},
+ {"matrix": [1, 7], "x": 112, "y": 16, "flags": 4},
+ {"matrix": [1, 6], "x": 96, "y": 16, "flags": 4},
+ {"matrix": [1, 5], "x": 80, "y": 16, "flags": 4},
+ {"matrix": [1, 4], "x": 64, "y": 16, "flags": 4},
+ {"matrix": [1, 3], "x": 48, "y": 16, "flags": 4},
+ {"matrix": [1, 2], "x": 32, "y": 16, "flags": 4},
+ {"matrix": [1, 1], "x": 16, "y": 16, "flags": 4},
+ {"matrix": [1, 0], "x": 0, "y": 16, "flags": 4},
+ {"matrix": [0, 14], "x": 224, "y": 0, "flags": 4},
+ {"matrix": [0, 13], "x": 208, "y": 0, "flags": 4},
+ {"matrix": [0, 12], "x": 192, "y": 0, "flags": 4},
+ {"matrix": [0, 11], "x": 176, "y": 0, "flags": 4},
+ {"matrix": [0, 10], "x": 160, "y": 0, "flags": 4},
+ {"matrix": [0, 9], "x": 144, "y": 0, "flags": 4},
+ {"matrix": [0, 8], "x": 128, "y": 0, "flags": 4},
+ {"matrix": [0, 7], "x": 112, "y": 0, "flags": 4},
+ {"matrix": [0, 6], "x": 96, "y": 0, "flags": 4},
+ {"matrix": [0, 5], "x": 80, "y": 0, "flags": 4},
+ {"matrix": [0, 4], "x": 64, "y": 0, "flags": 4},
+ {"matrix": [0, 3], "x": 48, "y": 0, "flags": 4},
+ {"matrix": [0, 2], "x": 32, "y": 0, "flags": 4},
+ {"matrix": [0, 1], "x": 16, "y": 0, "flags": 4},
+ {"matrix": [0, 0], "x": 0, "y": 0, "flags": 4},
+ {"x": 0, "y": 64, "flags": 2},
+ {"x": 38, "y": 64, "flags": 2},
+ {"x": 76, "y": 64, "flags": 2},
+ {"x": 114, "y": 64, "flags": 2},
+ {"x": 152, "y": 64, "flags": 2},
+ {"x": 190, "y": 64, "flags": 2},
+ {"x": 224, "y": 64, "flags": 2},
+ {"x": 0, "y": 0, "flags": 2},
+ {"x": 38, "y": 0, "flags": 2},
+ {"x": 76, "y": 0, "flags": 2},
+ {"x": 114, "y": 0, "flags": 2},
+ {"x": 152, "y": 0, "flags": 2},
+ {"x": 190, "y": 0, "flags": 2},
+ {"x": 224, "y": 0, "flags": 2}
],
"max_brightness": 128,
"sleep": true
diff --git a/keyboards/ymdk/id75/readme.md b/keyboards/ymdk/id75/readme.md
index 9315745f71..4f7e779458 100644
--- a/keyboards/ymdk/id75/readme.md
+++ b/keyboards/ymdk/id75/readme.md
@@ -5,17 +5,18 @@
A 75-key, 5-row ortholinear keyboard with per-key and underglow RGB LEDs.
* Keyboard Maintainer: [The QMK Community](https://github.com/qmk)
-* Hardware Supported: [Idobao x YMDK ID75 PCB (APM32F103CBT6)](https://www.aliexpress.com/item/3256804537842097.html)
- * This PCB uses an ARM Cortex-M3 MCU with 128kb flash. **It is not the same as `idobao/id75` or `ymdk/ymd75`.**
+* Hardware Supported: [Idobao x YMDK ID75](https://www.aliexpress.com/item/3256804537842097.html). **This is not the same PCB as `idobao/id75` or `ymdk/ymd75`.**
+ This keyboard has had multiple PCB revisions, some of which may not work with the firmware in this repository. **Check your PCB before flashing.**
+ * `f103`: (Geehy APM32F103CBT6, uf2boot)
* Hardware Availability: [YMDK](https://ymdkey.com/products/id75-75-keys-ortholinear-layout-qmk-anodized-aluminum-case-plate-hot-swappable-hot-swap-type-c-pcb-mechanical-keyboard-kit), [AliExpress (YMDK Store)](https://www.aliexpress.com/item/2255800125183974.html), [Amazon](https://www.amazon.com/Ortholinear-Anodized-Aluminum-hot-swappable-Mechanical/dp/B07ZQ8CD88)
Make example for this keyboard (after setting up your build environment):
- make ymdk/id75:default
+ make ymdk/id75/f103:default
Flashing example for this keyboard:
- make ymdk/id75:default:flash
+ make ymdk/id75/f103: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).
@@ -27,4 +28,5 @@ Enter the bootloader in 3 ways:
* **Physical reset button**: Press the button on the back of the PCB twice in quick succession.
* **Keycode in layout**: Press the key mapped to `QK_BOOT`. In the pre-supplied keymaps it is on the second layer, in the bottom-right corner.
-After entering the bootloader through one of the three methods above, the keyboard will appear as a USB mass storage device named `MT.KEY`. If the CLI is unable to find this device, the compiled `.uf2` file can be manually copied to it. The keyboard will reboot on completion with the new firmware loaded.
+After entering the bootloader through one of the three methods above, the keyboard will appear as a USB mass storage device. If the CLI is unable to find this device, the compiled `.uf2` file can be manually copied to it. The keyboard will reboot on completion with the new firmware loaded.
+- `f103`: The volume name is `MT.KEY`.
diff --git a/keyboards/ymdk/melody96/rules.mk b/keyboards/ymdk/melody96/rules.mk
deleted file mode 100644
index 806543977b..0000000000
--- a/keyboards/ymdk/melody96/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = ymdk/melody96/soldered
diff --git a/keyboards/ymdk/yd60mq/rules.mk b/keyboards/ymdk/yd60mq/rules.mk
deleted file mode 100644
index c37722c8bb..0000000000
--- a/keyboards/ymdk/yd60mq/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = ymdk/yd60mq/12led
diff --git a/keyboards/yosino58/rules.mk b/keyboards/yosino58/rules.mk
deleted file mode 100644
index c700b6f5b5..0000000000
--- a/keyboards/yosino58/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = yosino58/rev1
diff --git a/keyboards/yushakobo/navpad/10/rules.mk b/keyboards/yushakobo/navpad/10/rules.mk
deleted file mode 100644
index 32daeef814..0000000000
--- a/keyboards/yushakobo/navpad/10/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = yushakobo/navpad/10/rev1
diff --git a/keyboards/yynmt/acperience12/rules.mk b/keyboards/yynmt/acperience12/rules.mk
deleted file mode 100644
index cfe8b8ac18..0000000000
--- a/keyboards/yynmt/acperience12/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-DEFAULT_FOLDER = yynmt/acperience12/rev1
diff --git a/keyboards/zsa/voyager/voyager.c b/keyboards/zsa/voyager/voyager.c
index 6d4f6c5f26..b7ca8f748f 100644
--- a/keyboards/zsa/voyager/voyager.c
+++ b/keyboards/zsa/voyager/voyager.c
@@ -121,7 +121,7 @@ layer_state_t layer_state_set_kb(layer_state_t state) {
#ifdef RGB_MATRIX_ENABLE
// clang-format off
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3731_led_t PROGMEM g_is31fl3731_leds[RGB_MATRIX_LED_COUNT] = {
/* Refer to IS31 manual for these locations
* driver
* | R location
diff --git a/lib/chibios b/lib/chibios
-Subproject be44b3305f9a9fe5f2f49a4e7b978db322dc463
+Subproject 2365f844292513ea0ee9eea6ab778d56f9ccd3b
diff --git a/lib/chibios-contrib b/lib/chibios-contrib
-Subproject 77cb0a4f7589f89e724f5e6ecb1d76d514dd121
+Subproject 3ac181e4ca5cafddaf8b472baa1d09c2b24c77b
diff --git a/lib/python/qmk/cli/__init__.py b/lib/python/qmk/cli/__init__.py
index 2d63dfb447..bb47ea26ed 100644
--- a/lib/python/qmk/cli/__init__.py
+++ b/lib/python/qmk/cli/__init__.py
@@ -82,6 +82,7 @@ subcommands = [
'qmk.cli.new.keymap',
'qmk.cli.painter',
'qmk.cli.pytest',
+ 'qmk.cli.resolve_alias',
'qmk.cli.test.c',
'qmk.cli.userspace.add',
'qmk.cli.userspace.compile',
diff --git a/lib/python/qmk/cli/generate/keyboard_c.py b/lib/python/qmk/cli/generate/keyboard_c.py
index 228b320942..1978de4a22 100755
--- a/lib/python/qmk/cli/generate/keyboard_c.py
+++ b/lib/python/qmk/cli/generate/keyboard_c.py
@@ -1,5 +1,9 @@
"""Used by the make system to generate keyboard.c from info.json.
"""
+import bisect
+import dataclasses
+from typing import Optional
+
from milc import cli
from qmk.info import info_json
@@ -87,6 +91,7 @@ def _gen_matrix_mask(info_data):
lines.append(f' 0b{"".join(reversed(mask[i]))},')
lines.append('};')
lines.append('#endif')
+ lines.append('')
return lines
@@ -122,6 +127,128 @@ def _gen_joystick_axes(info_data):
lines.append('};')
lines.append('#endif')
+ lines.append('')
+
+ return lines
+
+
+class LayoutKey:
+ """Geometric info for one key in a layout."""
+ row: int
+ col: int
+ x: float
+ y: float
+ w: float = 1.0
+ h: float = 1.0
+ hand: Optional[str] = None
+
+ @staticmethod
+ def from_json(key_json):
+ row, col = key_json['matrix']
+ return LayoutKey(
+ row=row,
+ col=col,
+ x=key_json['x'],
+ y=key_json['y'],
+ w=key_json.get('w', 1.0),
+ h=key_json.get('h', 1.0),
+ hand=key_json.get('hand', None),
+ )
+
+ @property
+ def cx(self):
+ """Center x coordinate of the key."""
+ return self.x + self.w / 2.0
+
+ @property
+ def cy(self):
+ """Center y coordinate of the key."""
+ return self.y + self.h / 2.0
+
+
+class Layout:
+ """Geometric info of a layout."""
+ def __init__(self, layout_json):
+ self.keys = [LayoutKey.from_json(key_json) for key_json in layout_json['layout']]
+ self.x_min = min(key.cx for key in self.keys)
+ self.x_max = max(key.cx for key in self.keys)
+ self.x_mid = (self.x_min + self.x_max) / 2
+ # If there is one key with width >= 6u, it is probably the spacebar.
+ i = [i for i, key in enumerate(self.keys) if key.w >= 6.0]
+ self.spacebar = self.keys[i[0]] if len(i) == 1 else None
+
+ def is_symmetric(self, tol: float = 0.02):
+ """Whether the key positions are symmetric about x_mid."""
+ x = sorted([key.cx for key in self.keys])
+ for i in range(len(x)):
+ x_i_mirrored = 2.0 * self.x_mid - x[i]
+ # Find leftmost x element greater than or equal to (x_i_mirrored - tol).
+ j = bisect.bisect_left(x, x_i_mirrored - tol)
+ if j == len(x) or abs(x[j] - x_i_mirrored) > tol:
+ return False
+
+ return True
+
+ def widest_horizontal_gap(self):
+ """Finds the x midpoint of the widest horizontal gap between keys."""
+ x = sorted([key.cx for key in self.keys])
+ x_mid = self.x_mid
+ max_sep = 0
+ for i in range(len(x) - 1):
+ sep = x[i + 1] - x[i]
+ if sep > max_sep:
+ max_sep = sep
+ x_mid = (x[i + 1] + x[i]) / 2
+
+ return x_mid
+
+
+def _gen_chordal_hold_layout(info_data):
+ """Convert info.json content to chordal_hold_layout
+ """
+ # NOTE: If there are multiple layouts, only the first is read.
+ for layout_name, layout_json in info_data['layouts'].items():
+ layout = Layout(layout_json)
+ break
+
+ if layout.is_symmetric():
+ # If the layout is symmetric (e.g. most split keyboards), guess the
+ # handedness based on the sign of (x - layout.x_mid).
+ hand_signs = [key.x - layout.x_mid for key in layout.keys]
+ elif layout.spacebar is not None:
+ # If the layout has a spacebar, form a dividing line through the spacebar,
+ # nearly vertical but with a slight angle to follow typical row stagger.
+ x0 = layout.spacebar.cx - 0.05
+ y0 = layout.spacebar.cy - 1.0
+ hand_signs = [(key.x - x0) - (key.y - y0) / 3.0 for key in layout.keys]
+ else:
+ # Fallback: assume handedness based on the widest horizontal separation.
+ x_mid = layout.widest_horizontal_gap()
+ hand_signs = [key.x - x_mid for key in layout.keys]
+
+ for key, hand_sign in zip(layout.keys, hand_signs):
+ if key.hand is None:
+ if key == layout.spacebar or abs(hand_sign) <= 0.02:
+ key.hand = '*'
+ else:
+ key.hand = 'L' if hand_sign < 0.0 else 'R'
+
+ lines = []
+ lines.append('#ifdef CHORDAL_HOLD')
+ line = ('__attribute__((weak)) const char chordal_hold_layout[MATRIX_ROWS][MATRIX_COLS] PROGMEM = ' + layout_name + '(')
+
+ x_prev = None
+ for key in layout.keys:
+ if x_prev is None or key.x < x_prev:
+ lines.append(line)
+ line = ' '
+ line += f"'{key.hand}', "
+ x_prev = key.x
+
+ lines.append(line[:-2])
+ lines.append(');')
+ lines.append('#endif')
return lines
@@ -136,11 +263,12 @@ def generate_keyboard_c(cli):
kb_info_json = info_json(cli.args.keyboard)
# Build the layouts.h file.
- keyboard_h_lines = [GPL2_HEADER_C_LIKE, GENERATED_HEADER_C_LIKE, '#include QMK_KEYBOARD_H', '']
+ keyboard_c_lines = [GPL2_HEADER_C_LIKE, GENERATED_HEADER_C_LIKE, '#include QMK_KEYBOARD_H', '']
- 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))
+ keyboard_c_lines.extend(_gen_led_configs(kb_info_json))
+ keyboard_c_lines.extend(_gen_matrix_mask(kb_info_json))
+ keyboard_c_lines.extend(_gen_joystick_axes(kb_info_json))
+ keyboard_c_lines.extend(_gen_chordal_hold_layout(kb_info_json))
# Show the results
- dump_lines(cli.args.output, keyboard_h_lines, cli.args.quiet)
+ dump_lines(cli.args.output, keyboard_c_lines, cli.args.quiet)
diff --git a/lib/python/qmk/cli/generate/keyboard_h.py b/lib/python/qmk/cli/generate/keyboard_h.py
index 5863a0983a..cb9528d96b 100755
--- a/lib/python/qmk/cli/generate/keyboard_h.py
+++ b/lib/python/qmk/cli/generate/keyboard_h.py
@@ -22,6 +22,11 @@ def _generate_layouts(keyboard, kb_info_json):
row_num = kb_info_json['matrix_size']['rows']
lines = []
+ lines.append('')
+ lines.append('// Layout content')
+ lines.append('')
+ lines.append('#define XXX KC_NO')
+
for layout_name, layout_data in kb_info_json['layouts'].items():
if layout_data['c_macro']:
continue
@@ -31,7 +36,7 @@ def _generate_layouts(keyboard, kb_info_json):
continue
layout_keys = []
- layout_matrix = [['KC_NO'] * col_num for _ in range(row_num)]
+ layout_matrix = [['XXX'] * col_num for _ in range(row_num)]
for key_data in layout_data['layout']:
row, col = key_data['matrix']
@@ -46,7 +51,7 @@ def _generate_layouts(keyboard, kb_info_json):
lines.append('')
lines.append(f'#define {layout_name}({", ".join(layout_keys)}) {{ \\')
- rows = ', \\\n'.join(['\t {' + ', '.join(row) + '}' for row in layout_matrix])
+ rows = ', \\\n'.join([' { ' + ', '.join(row) + ' }' for row in layout_matrix])
rows += ' \\'
lines.append(rows)
lines.append('}')
@@ -67,6 +72,9 @@ def _generate_keycodes(kb_info_json):
return []
lines = []
+ lines.append('')
+ lines.append('// Keycode content')
+ lines.append('')
lines.append('enum keyboard_keycodes {')
for index, item in enumerate(kb_info_json.get('keycodes')):
@@ -103,17 +111,14 @@ def generate_keyboard_h(cli):
valid_config = dd_layouts or keyboard_h
# Build the layouts.h file.
- keyboard_h_lines = [GPL2_HEADER_C_LIKE, GENERATED_HEADER_C_LIKE, '#pragma once', '#include "quantum.h"']
+ keyboard_h_lines = [GPL2_HEADER_C_LIKE, GENERATED_HEADER_C_LIKE, '#pragma once', '', '#include "quantum.h"']
- keyboard_h_lines.append('')
- keyboard_h_lines.append('// Layout content')
if dd_layouts:
keyboard_h_lines.extend(dd_layouts)
+
if keyboard_h:
keyboard_h_lines.append(f'#include "{Path(keyboard_h).name}"')
- keyboard_h_lines.append('')
- keyboard_h_lines.append('// Keycode content')
if dd_keycodes:
keyboard_h_lines.extend(dd_keycodes)
diff --git a/lib/python/qmk/cli/new/keymap.py b/lib/python/qmk/cli/new/keymap.py
index f1df05636c..8b7160f5f2 100755
--- a/lib/python/qmk/cli/new/keymap.py
+++ b/lib/python/qmk/cli/new/keymap.py
@@ -23,19 +23,17 @@ def validate_keymap_name(name):
def prompt_keyboard():
prompt = """{fg_yellow}Select Keyboard{style_reset_all}
-If you`re unsure you can view a full list of supported keyboards with {fg_yellow}qmk list-keyboards{style_reset_all}.
+If you're unsure you can view a full list of supported keyboards with {fg_yellow}qmk list-keyboards{style_reset_all}.
Keyboard Name? """
-
return question(prompt)
def prompt_user():
prompt = """
{fg_yellow}Name Your Keymap{style_reset_all}
-Used for maintainer, copyright, etc
-Your GitHub Username? """
+Keymap name? """
return question(prompt, default=git_get_username())
diff --git a/lib/python/qmk/cli/resolve_alias.py b/lib/python/qmk/cli/resolve_alias.py
new file mode 100644
index 0000000000..b9ffb46618
--- /dev/null
+++ b/lib/python/qmk/cli/resolve_alias.py
@@ -0,0 +1,16 @@
+from qmk.keyboard import keyboard_folder
+
+from milc import cli
+
+
[email protected]('--allow-unknown', arg_only=True, action='store_true', help="Return original if rule is not a valid keyboard.")
[email protected]('keyboard', arg_only=True, help='The keyboard\'s name')
[email protected]('Resolve DEFAULT_FOLDER and any keyboard_aliases for provided rule')
+def resolve_alias(cli):
+ try:
+ print(keyboard_folder(cli.args.keyboard))
+ except ValueError:
+ if cli.args.allow_unknown:
+ print(cli.args.keyboard)
+ else:
+ raise
diff --git a/lib/python/qmk/cli/via2json.py b/lib/python/qmk/cli/via2json.py
index 537e102640..0997e9ca9f 100755
--- a/lib/python/qmk/cli/via2json.py
+++ b/lib/python/qmk/cli/via2json.py
@@ -9,19 +9,15 @@ import qmk.keyboard
import qmk.path
from qmk.info import info_json
from qmk.json_encoders import KeymapJSONEncoder
-from qmk.commands import parse_configurator_json, dump_lines
-from qmk.keymap import generate_json, list_keymaps, locate_keymap, parse_keymap_c
+from qmk.commands import dump_lines
+from qmk.keymap import generate_json
-def _find_via_layout_macro(keyboard):
- keymap_layout = None
- if 'via' in list_keymaps(keyboard):
- keymap_path = locate_keymap(keyboard, 'via')
- if keymap_path.suffix == '.json':
- keymap_layout = parse_configurator_json(keymap_path)['layout']
- else:
- keymap_layout = parse_keymap_c(keymap_path)['layers'][0]['layout']
- return keymap_layout
+def _find_via_layout_macro(keyboard_data):
+ """Assume layout macro when only 1 is available
+ """
+ layouts = list(keyboard_data['layouts'].keys())
+ return layouts[0] if len(layouts) == 1 else None
def _convert_macros(via_macros):
@@ -130,20 +126,16 @@ def via2json(cli):
This command uses the `qmk.keymap` module to generate a keymap.json from a VIA backup json. The generated keymap is written to stdout, or to a file if -o is provided.
"""
- # Find appropriate layout macro
- keymap_layout = cli.args.layout if cli.args.layout else _find_via_layout_macro(cli.args.keyboard)
- if not keymap_layout:
- cli.log.error(f"Couldn't find LAYOUT macro for keyboard {cli.args.keyboard}. Please specify it with the '-l' argument.")
- return False
-
# Load the VIA backup json
with cli.args.filename.open('r') as fd:
via_backup = json.load(fd)
- # Generate keyboard metadata
keyboard_data = info_json(cli.args.keyboard)
- if not keyboard_data:
- cli.log.error(f'LAYOUT macro {keymap_layout} is not a valid one for keyboard {cli.args.keyboard}!')
+
+ # Find appropriate layout macro
+ keymap_layout = cli.args.layout if cli.args.layout else _find_via_layout_macro(keyboard_data)
+ if not keymap_layout:
+ cli.log.error(f"Couldn't find LAYOUT macro for keyboard {cli.args.keyboard}. Please specify it with the '-l' argument.")
return False
# Get keycode array
diff --git a/lib/python/qmk/flashers.py b/lib/python/qmk/flashers.py
index 7ee1bc8de7..2cca4941d3 100644
--- a/lib/python/qmk/flashers.py
+++ b/lib/python/qmk/flashers.py
@@ -202,6 +202,10 @@ def _flash_mdloader(file):
def _flash_uf2(file):
+ output = cli.run(['util/uf2conv.py', '--info', file]).stdout
+ if 'UF2 File' not in output:
+ return True
+
cli.run(['util/uf2conv.py', '--deploy', file], capture_output=False)
@@ -235,7 +239,8 @@ def flasher(mcu, file):
elif bl == 'md-boot':
_flash_mdloader(file)
elif bl == '_uf2_compatible_':
- _flash_uf2(file)
+ if _flash_uf2(file):
+ return (True, "Flashing only supports uf2 format files.")
else:
return (True, "Known bootloader found but flashing not currently supported!")
diff --git a/platforms/avr/drivers/i2c_master.h b/platforms/avr/drivers/i2c_master.h
deleted file mode 100644
index b797997619..0000000000
--- a/platforms/avr/drivers/i2c_master.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/* Copyright (C) 2019 Elia Ritterbusch
- +
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
-/* Library made by: g4lvanix
- * GitHub repository: https://github.com/g4lvanix/I2C-master-lib
- */
-
-#pragma once
-
-#include <stdint.h>
-
-// ### DEPRECATED - DO NOT USE ###
-#define i2c_writeReg(devaddr, regaddr, data, length, timeout) i2c_write_register(devaddr, regaddr, data, length, timeout)
-#define i2c_writeReg16(devaddr, regaddr, data, length, timeout) i2c_write_register16(devaddr, regaddr, data, length, timeout)
-#define i2c_readReg(devaddr, regaddr, data, length, timeout) i2c_read_register(devaddr, regaddr, data, length, timeout)
-#define i2c_readReg16(devaddr, regaddr, data, length, timeout) i2c_read_register16(devaddr, regaddr, data, length, timeout)
-// ###############################
-
-#define I2C_READ 0x01
-#define I2C_WRITE 0x00
-
-typedef int16_t i2c_status_t;
-
-#define I2C_STATUS_SUCCESS (0)
-#define I2C_STATUS_ERROR (-1)
-#define I2C_STATUS_TIMEOUT (-2)
-
-#define I2C_TIMEOUT_IMMEDIATE (0)
-#define I2C_TIMEOUT_INFINITE (0xFFFF)
-
-void i2c_init(void);
-i2c_status_t i2c_transmit(uint8_t address, const uint8_t* data, uint16_t length, uint16_t timeout);
-i2c_status_t i2c_transmit_P(uint8_t address, const uint8_t* data, uint16_t length, uint16_t timeout);
-i2c_status_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout);
-i2c_status_t i2c_write_register(uint8_t devaddr, uint8_t regaddr, const uint8_t* data, uint16_t length, uint16_t timeout);
-i2c_status_t i2c_write_register16(uint8_t devaddr, uint16_t regaddr, const uint8_t* data, uint16_t length, uint16_t timeout);
-i2c_status_t i2c_read_register(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout);
-i2c_status_t i2c_read_register16(uint8_t devaddr, uint16_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout);
-i2c_status_t i2c_ping_address(uint8_t address, uint16_t timeout);
diff --git a/platforms/avr/drivers/spi_master.h b/platforms/avr/drivers/spi_master.h
deleted file mode 100644
index ebbf7ddeab..0000000000
--- a/platforms/avr/drivers/spi_master.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/* Copyright 2020
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
-
-#pragma once
-
-#include <stdbool.h>
-
-#include "gpio.h"
-
-typedef int16_t spi_status_t;
-
-// Hardware SS pin is defined in the header so that user code can refer to it
-#if defined(__AVR_AT90USB162__) || defined(__AVR_ATmega16U2__) || defined(__AVR_ATmega32U2__) || defined(__AVR_ATmega16U4__) || defined(__AVR_ATmega32U4__) || defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB647__) || defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB1287__)
-# define SPI_SS_PIN B0
-#elif defined(__AVR_ATmega32A__)
-# define SPI_SS_PIN B4
-#elif defined(__AVR_ATmega328P__) || defined(__AVR_ATmega328__)
-# define SPI_SS_PIN B2
-#endif
-
-#define SPI_STATUS_SUCCESS (0)
-#define SPI_STATUS_ERROR (-1)
-#define SPI_STATUS_TIMEOUT (-2)
-
-#define SPI_TIMEOUT_IMMEDIATE (0)
-#define SPI_TIMEOUT_INFINITE (0xFFFF)
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-typedef struct spi_start_config_t {
- pin_t slave_pin;
- bool lsb_first;
- uint8_t mode;
- uint16_t divisor;
- bool cs_active_low;
-} spi_start_config_t;
-
-void spi_init(void);
-
-bool spi_start(pin_t slavePin, bool lsbFirst, uint8_t mode, uint16_t divisor);
-bool spi_start_extended(spi_start_config_t *start_config);
-
-spi_status_t spi_write(uint8_t data);
-
-spi_status_t spi_read(void);
-
-spi_status_t spi_transmit(const uint8_t *data, uint16_t length);
-
-spi_status_t spi_receive(uint8_t *data, uint16_t length);
-
-void spi_stop(void);
-#ifdef __cplusplus
-}
-#endif
diff --git a/platforms/avr/drivers/uart.h b/platforms/avr/drivers/uart.h
deleted file mode 100644
index e2dc664eda..0000000000
--- a/platforms/avr/drivers/uart.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/* UART Example for Teensy USB Development Board
- * http://www.pjrc.com/teensy/
- * Copyright (c) 2009 PJRC.COM, LLC
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-
-#pragma once
-
-#include <stdint.h>
-#include <stdbool.h>
-
-void uart_init(uint32_t baud);
-
-void uart_write(uint8_t data);
-
-uint8_t uart_read(void);
-
-void uart_transmit(const uint8_t *data, uint16_t length);
-
-void uart_receive(uint8_t *data, uint16_t length);
-
-bool uart_available(void);
diff --git a/platforms/avr/timer.c b/platforms/avr/timer.c
index 26ba0e29fa..b2230ad84b 100644
--- a/platforms/avr/timer.c
+++ b/platforms/avr/timer.c
@@ -125,34 +125,6 @@ inline uint32_t timer_read32(void) {
return t;
}
-/** \brief timer elapsed
- *
- * FIXME: needs doc
- */
-inline uint16_t timer_elapsed(uint16_t last) {
- uint32_t t;
-
- ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
- t = timer_count;
- }
-
- return TIMER_DIFF_16((t & 0xFFFF), last);
-}
-
-/** \brief timer elapsed32
- *
- * FIXME: needs doc
- */
-inline uint32_t timer_elapsed32(uint32_t last) {
- uint32_t t;
-
- ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
- t = timer_count;
- }
-
- return TIMER_DIFF_32(t, last);
-}
-
// excecuted once per 1ms.(excess for just timer count?)
#ifndef __AVR_ATmega32A__
# define TIMER_INTERRUPT_VECTOR TIMER0_COMPA_vect
diff --git a/platforms/chibios/boards/GENERIC_AT32_F415XX/board/board.c b/platforms/chibios/boards/GENERIC_AT32_F415XX/board/board.c
index 28cf7c18e0..26b1974e4a 100644
--- a/platforms/chibios/boards/GENERIC_AT32_F415XX/board/board.c
+++ b/platforms/chibios/boards/GENERIC_AT32_F415XX/board/board.c
@@ -1,7 +1,7 @@
/*
ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
- ChibiOS - Copyright (C) 2023..2024 HorrorTroll
- ChibiOS - Copyright (C) 2023..2024 Zhaqian
+ ChibiOS - Copyright (C) 2023..2025 HorrorTroll
+ ChibiOS - Copyright (C) 2023..2025 Zhaqian
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
diff --git a/platforms/chibios/boards/GENERIC_AT32_F415XX/board/board.h b/platforms/chibios/boards/GENERIC_AT32_F415XX/board/board.h
index c3ade198ba..b4909b0a29 100644
--- a/platforms/chibios/boards/GENERIC_AT32_F415XX/board/board.h
+++ b/platforms/chibios/boards/GENERIC_AT32_F415XX/board/board.h
@@ -1,7 +1,7 @@
/*
ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
- ChibiOS - Copyright (C) 2023..2024 HorrorTroll
- ChibiOS - Copyright (C) 2023..2024 Zhaqian
+ ChibiOS - Copyright (C) 2023..2025 HorrorTroll
+ ChibiOS - Copyright (C) 2023..2025 Zhaqian
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -50,6 +50,14 @@
#define AT32F415KB
/*
+ * GPIO settings, allow unused GPIO for smaller chip packages.
+ */
+#if defined(AT32F415KB) || defined(AT32F415KC)
+#define AT32_HAS_GPIOC TRUE
+#define AT32_HAS_GPIOF TRUE
+#endif
+
+/*
* IO pins assignments.
*/
#define GPIOA_PIN0 0U
@@ -142,21 +150,21 @@
* 6 - Open Drain output 2MHz.
* 7 - Open Drain output 50MHz.
* 8 - Digital input with Pull-Up or Pull-Down resistor depending on ODT.
- * 9 - Alternate Push Pull output 10MHz.
- * A - Alternate Push Pull output 2MHz.
- * B - Alternate Push Pull output 50MHz.
+ * 9 - Multiplexing Push Pull output 10MHz.
+ * A - Multiplexing Push Pull output 2MHz.
+ * B - Multiplexing Push Pull output 50MHz.
* C - Reserved.
- * D - Alternate Open Drain output 10MHz.
- * E - Alternate Open Drain output 2MHz.
- * F - Alternate Open Drain output 50MHz.
+ * D - Multiplexing Open Drain output 10MHz.
+ * E - Multiplexing Open Drain output 2MHz.
+ * F - Multiplexing Open Drain output 50MHz.
* Please refer to the AT32 Reference Manual for details.
*/
/*
* Port A setup.
*/
-#define VAL_GPIOACFGLR 0x88888B88 /* PA7...PA0 */
-#define VAL_GPIOACFGHR 0x888888B8 /* PA15...PA8 */
+#define VAL_GPIOACFGLR 0x88888888 /* PA7...PA0 */
+#define VAL_GPIOACFGHR 0x88888888 /* PA15...PA8 */
#define VAL_GPIOAODT 0xFFFFFFFF
/*
diff --git a/platforms/chibios/boards/GENERIC_AT32_F415XX/configs/config.h b/platforms/chibios/boards/GENERIC_AT32_F415XX/configs/config.h
index da60447a0a..01d9a47aac 100644
--- a/platforms/chibios/boards/GENERIC_AT32_F415XX/configs/config.h
+++ b/platforms/chibios/boards/GENERIC_AT32_F415XX/configs/config.h
@@ -1,5 +1,5 @@
-// Copyright 2023-2024 HorrorTroll <https://github.com/HorrorTroll>
-// Copyright 2023-2024 Zhaqian <https://github.com/zhaqian12>
+// Copyright 2023-2025 HorrorTroll <https://github.com/HorrorTroll>
+// Copyright 2023-2025 Zhaqian <https://github.com/zhaqian12>
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
diff --git a/platforms/chibios/boards/GENERIC_AT32_F415XX/configs/mcuconf.h b/platforms/chibios/boards/GENERIC_AT32_F415XX/configs/mcuconf.h
index d148379fe1..e218e4791a 100644
--- a/platforms/chibios/boards/GENERIC_AT32_F415XX/configs/mcuconf.h
+++ b/platforms/chibios/boards/GENERIC_AT32_F415XX/configs/mcuconf.h
@@ -1,7 +1,7 @@
/*
ChibiOS - Copyright (C) 2006..2020 Giovanni Di Sirio
- ChibiOS - Copyright (C) 2023..2024 HorrorTroll
- ChibiOS - Copyright (C) 2023..2024 Zhaqian
+ ChibiOS - Copyright (C) 2023..2025 HorrorTroll
+ ChibiOS - Copyright (C) 2023..2025 Zhaqian
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -63,7 +63,7 @@
#define AT32_USBDIV AT32_USBDIV_DIV3
#define AT32_CLKOUT_SEL AT32_CLKOUT_SEL_NOCLOCK
#define AT32_CLKOUTDIV AT32_CLKOUTDIV_DIV1
-#define AT32_ERTCSEL AT32_ERTCSEL_HEXTDIV
+#define AT32_ERTCSEL AT32_ERTCSEL_NOCLOCK
#define AT32_PVM_ENABLE FALSE
#define AT32_PVMSEL AT32_PVMSEL_LEV1
@@ -136,10 +136,10 @@
#define AT32_I2C_USE_I2C1 FALSE
#define AT32_I2C_USE_I2C2 FALSE
#define AT32_I2C_BUSY_TIMEOUT 50
-#define AT32_I2C_I2C1_IRQ_PRIORITY 5
-#define AT32_I2C_I2C2_IRQ_PRIORITY 5
#define AT32_I2C_I2C1_DMA_PRIORITY 3
#define AT32_I2C_I2C2_DMA_PRIORITY 3
+#define AT32_I2C_I2C1_IRQ_PRIORITY 5
+#define AT32_I2C_I2C2_IRQ_PRIORITY 5
#define AT32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure")
/*
@@ -151,8 +151,6 @@
#define AT32_ICU_USE_TMR4 FALSE
#define AT32_ICU_USE_TMR5 FALSE
#define AT32_ICU_USE_TMR9 FALSE
-#define AT32_ICU_USE_TMR10 FALSE
-#define AT32_ICU_USE_TMR11 FALSE
/*
* PWM driver system settings.
@@ -216,9 +214,13 @@
#define AT32_UART_USE_USART1 FALSE
#define AT32_UART_USE_USART2 FALSE
#define AT32_UART_USE_USART3 FALSE
+#define AT32_UART_USE_UART4 FALSE
+#define AT32_UART_USE_UART5 FALSE
#define AT32_UART_USART1_DMA_PRIORITY 0
#define AT32_UART_USART2_DMA_PRIORITY 0
#define AT32_UART_USART3_DMA_PRIORITY 0
+#define AT32_UART_UART4_DMA_PRIORITY 0
+#define AT32_UART_UART5_DMA_PRIORITY 0
#define AT32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure")
/*
diff --git a/platforms/chibios/boards/GENERIC_STM32_H723XG/configs/mcuconf.h b/platforms/chibios/boards/GENERIC_STM32_H723XG/configs/mcuconf.h
index 0239ec5273..09096c3977 100644
--- a/platforms/chibios/boards/GENERIC_STM32_H723XG/configs/mcuconf.h
+++ b/platforms/chibios/boards/GENERIC_STM32_H723XG/configs/mcuconf.h
@@ -182,6 +182,7 @@
#define STM32_IRQ_FDCAN1_PRIORITY 10
#define STM32_IRQ_FDCAN2_PRIORITY 10
+#define STM32_IRQ_FDCAN3_PRIORITY 10
#define STM32_IRQ_MDMA_PRIORITY 9
@@ -235,6 +236,7 @@
*/
#define STM32_CAN_USE_FDCAN1 FALSE
#define STM32_CAN_USE_FDCAN2 FALSE
+#define STM32_CAN_USE_FDCAN3 FALSE
/*
* DAC driver system settings.
diff --git a/platforms/chibios/boards/QMK_PROTON_C/configs/chconf.h b/platforms/chibios/boards/QMK_PROTON_C/configs/chconf.h
index cc10304a3f..e92b7aeb98 100644
--- a/platforms/chibios/boards/QMK_PROTON_C/configs/chconf.h
+++ b/platforms/chibios/boards/QMK_PROTON_C/configs/chconf.h
@@ -49,6 +49,19 @@
#define CH_CFG_SMP_MODE FALSE
#endif
+/**
+ * @brief Kernel hardening level.
+ * @details This option is the level of functional-safety checks enabled
+ * in the kerkel. The meaning is:
+ * - 0: No checks, maximum performance.
+ * - 1: Reasonable checks.
+ * - 2: All checks.
+ * .
+ */
+#if !defined(CH_CFG_HARDENING_LEVEL)
+#define CH_CFG_HARDENING_LEVEL 0
+#endif
+
/** @} */
/*===========================================================================*/
@@ -361,6 +374,16 @@
#endif
/**
+ * @brief Memory checks APIs.
+ * @details If enabled then the memory checks APIs are included in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_MEMCHECKS)
+#define CH_CFG_USE_MEMCHECKS TRUE
+#endif
+
+/**
* @brief Core Memory Manager APIs.
* @details If enabled then the core memory manager APIs are included
* in the kernel.
diff --git a/platforms/chibios/boards/common/configs/chconf.h b/platforms/chibios/boards/common/configs/chconf.h
index 5db836e37c..6381298ef7 100644
--- a/platforms/chibios/boards/common/configs/chconf.h
+++ b/platforms/chibios/boards/common/configs/chconf.h
@@ -49,6 +49,19 @@
#define CH_CFG_SMP_MODE FALSE
#endif
+/**
+ * @brief Kernel hardening level.
+ * @details This option is the level of functional-safety checks enabled
+ * in the kerkel. The meaning is:
+ * - 0: No checks, maximum performance.
+ * - 1: Reasonable checks.
+ * - 2: All checks.
+ * .
+ */
+#if !defined(CH_CFG_HARDENING_LEVEL)
+#define CH_CFG_HARDENING_LEVEL 0
+#endif
+
/** @} */
/*===========================================================================*/
@@ -361,6 +374,16 @@
#endif
/**
+ * @brief Memory checks APIs.
+ * @details If enabled then the memory checks APIs are included in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_MEMCHECKS)
+#define CH_CFG_USE_MEMCHECKS TRUE
+#endif
+
+/**
* @brief Core Memory Manager APIs.
* @details If enabled then the core memory manager APIs are included
* in the kernel.
diff --git a/platforms/chibios/chibios_config.h b/platforms/chibios/chibios_config.h
index 95136baf30..9ef8e9b4fe 100644
--- a/platforms/chibios/chibios_config.h
+++ b/platforms/chibios/chibios_config.h
@@ -149,8 +149,8 @@
# if defined(AT32F415)
# define USE_GPIOV1
# define USE_I2CV1
-# define PAL_MODE_ALTERNATE_OPENDRAIN PAL_MODE_AT32_ALTERNATE_OPENDRAIN
-# define PAL_MODE_ALTERNATE_PUSHPULL PAL_MODE_AT32_ALTERNATE_PUSHPULL
+# define PAL_MODE_ALTERNATE_OPENDRAIN PAL_MODE_AT32_MUX_OPENDRAIN
+# define PAL_MODE_ALTERNATE_PUSHPULL PAL_MODE_AT32_MUX_PUSHPULL
# define AUDIO_PWM_PAL_MODE PAL_MODE_ALTERNATE_PUSHPULL
# endif
#endif
diff --git a/platforms/chibios/drivers/audio_pwm_hardware.c b/platforms/chibios/drivers/audio_pwm_hardware.c
index 1ba7ec13bc..afa341abb6 100644
--- a/platforms/chibios/drivers/audio_pwm_hardware.c
+++ b/platforms/chibios/drivers/audio_pwm_hardware.c
@@ -41,18 +41,19 @@ static float channel_1_frequency = 0.0f;
void channel_1_set_frequency(float freq) {
channel_1_frequency = freq;
+ pwmcnt_t period;
+ pwmcnt_t width;
if (freq <= 0.0) {
- // a pause/rest has freq=0
- return;
+ period = 2;
+ width = 0;
+ } else {
+ period = (pwmCFG.frequency / freq);
+ width = (pwmcnt_t)(((period) * (pwmcnt_t)((100 - note_timbre) * 100)) / (pwmcnt_t)(10000));
}
-
- pwmcnt_t period = (pwmCFG.frequency / freq);
chSysLockFromISR();
pwmChangePeriodI(&AUDIO_PWM_DRIVER, period);
- pwmEnableChannelI(&AUDIO_PWM_DRIVER, AUDIO_PWM_CHANNEL - 1,
- // adjust the duty-cycle so that the output is for 'note_timbre' duration HIGH
- PWM_PERCENTAGE_TO_WIDTH(&AUDIO_PWM_DRIVER, (100 - note_timbre) * 100));
+ pwmEnableChannelI(&AUDIO_PWM_DRIVER, AUDIO_PWM_CHANNEL - 1, width);
chSysUnlockFromISR();
}
@@ -67,6 +68,9 @@ void channel_1_start(void) {
void channel_1_stop(void) {
pwmStop(&AUDIO_PWM_DRIVER);
+ pwmStart(&AUDIO_PWM_DRIVER, &pwmCFG);
+ pwmEnableChannel(&AUDIO_PWM_DRIVER, AUDIO_PWM_CHANNEL - 1, 0);
+ pwmStop(&AUDIO_PWM_DRIVER);
}
static virtual_timer_t audio_vt;
diff --git a/platforms/chibios/drivers/i2c_master.c b/platforms/chibios/drivers/i2c_master.c
index 0d5fb1e985..1d7fe27633 100644
--- a/platforms/chibios/drivers/i2c_master.c
+++ b/platforms/chibios/drivers/i2c_master.c
@@ -29,17 +29,37 @@
#include "i2c_master.h"
#include "gpio.h"
#include "chibios_config.h"
-#include <string.h>
#include <ch.h>
#include <hal.h>
+#ifndef I2C_DRIVER
+# define I2C_DRIVER I2CD1
+#endif
+
#ifndef I2C1_SCL_PIN
# define I2C1_SCL_PIN B6
#endif
+
+#ifndef I2C1_SCL_PAL_MODE
+# ifdef USE_GPIOV1
+# define I2C1_SCL_PAL_MODE PAL_MODE_ALTERNATE_OPENDRAIN
+# else
+# define I2C1_SCL_PAL_MODE 4
+# endif
+#endif
+
#ifndef I2C1_SDA_PIN
# define I2C1_SDA_PIN B7
#endif
+#ifndef I2C1_SDA_PAL_MODE
+# ifdef USE_GPIOV1
+# define I2C1_SDA_PAL_MODE PAL_MODE_ALTERNATE_OPENDRAIN
+# else
+# define I2C1_SDA_PAL_MODE 4
+# endif
+#endif
+
#ifdef USE_I2CV1
# ifndef I2C1_OPMODE
# define I2C1_OPMODE OPMODE_I2C
@@ -70,27 +90,6 @@
# endif
#endif
-#ifndef I2C_DRIVER
-# define I2C_DRIVER I2CD1
-#endif
-
-#ifdef USE_GPIOV1
-# ifndef I2C1_SCL_PAL_MODE
-# define I2C1_SCL_PAL_MODE PAL_MODE_ALTERNATE_OPENDRAIN
-# endif
-# ifndef I2C1_SDA_PAL_MODE
-# define I2C1_SDA_PAL_MODE PAL_MODE_ALTERNATE_OPENDRAIN
-# endif
-#else
-// The default PAL alternate modes are used to signal that the pins are used for I2C
-# ifndef I2C1_SCL_PAL_MODE
-# define I2C1_SCL_PAL_MODE 4
-# endif
-# ifndef I2C1_SDA_PAL_MODE
-# define I2C1_SDA_PAL_MODE 4
-# endif
-#endif
-
static const I2CConfig i2cconfig = {
#if defined(USE_I2CV1_CONTRIB)
I2C1_CLOCK_SPEED,
diff --git a/platforms/chibios/drivers/i2c_master.h b/platforms/chibios/drivers/i2c_master.h
deleted file mode 100644
index 132ffd14c0..0000000000
--- a/platforms/chibios/drivers/i2c_master.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/* Copyright 2018 Jack Humbert
- * Copyright 2018 Yiancar
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* This library follows the convention of the AVR i2c_master library.
- * As a result addresses are expected to be already shifted (addr << 1).
- * I2CD1 is the default driver which corresponds to pins B6 and B7. This
- * can be changed.
- * Please ensure that HAL_USE_I2C is TRUE in the halconf.h file and that
- * STM32_I2C_USE_I2C1 is TRUE in the mcuconf.h file.
- */
-#pragma once
-
-#include <stdint.h>
-
-// ### DEPRECATED - DO NOT USE ###
-#define i2c_writeReg(devaddr, regaddr, data, length, timeout) i2c_write_register(devaddr, regaddr, data, length, timeout)
-#define i2c_writeReg16(devaddr, regaddr, data, length, timeout) i2c_write_register16(devaddr, regaddr, data, length, timeout)
-#define i2c_readReg(devaddr, regaddr, data, length, timeout) i2c_read_register(devaddr, regaddr, data, length, timeout)
-#define i2c_readReg16(devaddr, regaddr, data, length, timeout) i2c_read_register16(devaddr, regaddr, data, length, timeout)
-// ###############################
-
-typedef int16_t i2c_status_t;
-
-#define I2C_STATUS_SUCCESS (0)
-#define I2C_STATUS_ERROR (-1)
-#define I2C_STATUS_TIMEOUT (-2)
-
-void i2c_init(void);
-i2c_status_t i2c_transmit(uint8_t address, const uint8_t* data, uint16_t length, uint16_t timeout);
-i2c_status_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout);
-i2c_status_t i2c_write_register(uint8_t devaddr, uint8_t regaddr, const uint8_t* data, uint16_t length, uint16_t timeout);
-i2c_status_t i2c_write_register16(uint8_t devaddr, uint16_t regaddr, const uint8_t* data, uint16_t length, uint16_t timeout);
-i2c_status_t i2c_read_register(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout);
-i2c_status_t i2c_read_register16(uint8_t devaddr, uint16_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout);
-i2c_status_t i2c_ping_address(uint8_t address, uint16_t timeout);
diff --git a/platforms/chibios/drivers/spi_master.c b/platforms/chibios/drivers/spi_master.c
index 414e5b10a3..f5e48edfda 100644
--- a/platforms/chibios/drivers/spi_master.c
+++ b/platforms/chibios/drivers/spi_master.c
@@ -15,8 +15,49 @@
*/
#include "spi_master.h"
+#include "chibios_config.h"
+#include <ch.h>
+#include <hal.h>
-#include "timer.h"
+#ifndef SPI_DRIVER
+# define SPI_DRIVER SPID2
+#endif
+
+#ifndef SPI_SCK_PIN
+# define SPI_SCK_PIN B13
+#endif
+
+#ifndef SPI_SCK_PAL_MODE
+# ifdef USE_GPIOV1
+# define SPI_SCK_PAL_MODE PAL_MODE_ALTERNATE_PUSHPULL
+# else
+# define SPI_SCK_PAL_MODE 5
+# endif
+#endif
+
+#ifndef SPI_MOSI_PIN
+# define SPI_MOSI_PIN B15
+#endif
+
+#ifndef SPI_MOSI_PAL_MODE
+# ifdef USE_GPIOV1
+# define SPI_MOSI_PAL_MODE PAL_MODE_ALTERNATE_PUSHPULL
+# else
+# define SPI_MOSI_PAL_MODE 5
+# endif
+#endif
+
+#ifndef SPI_MISO_PIN
+# define SPI_MISO_PIN B14
+#endif
+
+#ifndef SPI_MISO_PAL_MODE
+# ifdef USE_GPIOV1
+# define SPI_MISO_PAL_MODE PAL_MODE_ALTERNATE_PUSHPULL
+# else
+# define SPI_MISO_PAL_MODE 5
+# endif
+#endif
static bool spiStarted = false;
#if SPI_SELECT_MODE == SPI_SELECT_MODE_NONE
diff --git a/platforms/chibios/drivers/spi_master.h b/platforms/chibios/drivers/spi_master.h
deleted file mode 100644
index 4ad6144091..0000000000
--- a/platforms/chibios/drivers/spi_master.h
+++ /dev/null
@@ -1,102 +0,0 @@
-/* Copyright 2020 Nick Brassel (tzarc)
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
-
-#pragma once
-
-#include <ch.h>
-#include <hal.h>
-#include <stdbool.h>
-
-#include "gpio.h"
-#include "chibios_config.h"
-
-#ifndef SPI_DRIVER
-# define SPI_DRIVER SPID2
-#endif
-
-#ifndef SPI_SCK_PIN
-# define SPI_SCK_PIN B13
-#endif
-
-#ifndef SPI_SCK_PAL_MODE
-# if defined(USE_GPIOV1)
-# define SPI_SCK_PAL_MODE PAL_MODE_ALTERNATE_PUSHPULL
-# else
-# define SPI_SCK_PAL_MODE 5
-# endif
-#endif
-
-#ifndef SPI_MOSI_PIN
-# define SPI_MOSI_PIN B15
-#endif
-
-#ifndef SPI_MOSI_PAL_MODE
-# if defined(USE_GPIOV1)
-# define SPI_MOSI_PAL_MODE PAL_MODE_ALTERNATE_PUSHPULL
-# else
-# define SPI_MOSI_PAL_MODE 5
-# endif
-#endif
-
-#ifndef SPI_MISO_PIN
-# define SPI_MISO_PIN B14
-#endif
-
-#ifndef SPI_MISO_PAL_MODE
-# if defined(USE_GPIOV1)
-# define SPI_MISO_PAL_MODE PAL_MODE_ALTERNATE_PUSHPULL
-# else
-# define SPI_MISO_PAL_MODE 5
-# endif
-#endif
-
-typedef int16_t spi_status_t;
-
-#define SPI_STATUS_SUCCESS (0)
-#define SPI_STATUS_ERROR (-1)
-#define SPI_STATUS_TIMEOUT (-2)
-
-#define SPI_TIMEOUT_IMMEDIATE (0)
-#define SPI_TIMEOUT_INFINITE (0xFFFF)
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-typedef struct spi_start_config_t {
- pin_t slave_pin;
- bool lsb_first;
- uint8_t mode;
- uint16_t divisor;
- bool cs_active_low;
-} spi_start_config_t;
-
-void spi_init(void);
-
-bool spi_start(pin_t slavePin, bool lsbFirst, uint8_t mode, uint16_t divisor);
-bool spi_start_extended(spi_start_config_t *start_config);
-
-spi_status_t spi_write(uint8_t data);
-
-spi_status_t spi_read(void);
-
-spi_status_t spi_transmit(const uint8_t *data, uint16_t length);
-
-spi_status_t spi_receive(uint8_t *data, uint16_t length);
-
-void spi_stop(void);
-#ifdef __cplusplus
-}
-#endif
diff --git a/platforms/chibios/drivers/uart.h b/platforms/chibios/drivers/uart.h
deleted file mode 100644
index c1945575f1..0000000000
--- a/platforms/chibios/drivers/uart.h
+++ /dev/null
@@ -1,200 +0,0 @@
-// Copyright 2024 Stefan Kerkmann
-// Copyright 2021 QMK
-// Copyright 2024 Stefan Kerkmann
-// SPDX-License-Identifier: GPL-2.0-or-later
-
-#pragma once
-
-#include <stdint.h>
-#include <stdbool.h>
-
-#include <hal.h>
-
-#include "gpio.h"
-#include "chibios_config.h"
-
-// ======== DEPRECATED DEFINES - DO NOT USE ========
-#ifdef SERIAL_DRIVER
-# define UART_DRIVER SERIAL_DRIVER
-#endif
-#ifdef SD1_TX_PIN
-# define UART_TX_PIN SD1_TX_PIN
-#endif
-#ifdef SD1_RX_PIN
-# define UART_RX_PIN SD1_RX_PIN
-#endif
-#ifdef SD1_CTS_PIN
-# define UART_CTS_PIN SD1_CTS_PIN
-#endif
-#ifdef SD1_RTS_PIN
-# define UART_RTS_PIN SD1_RTS_PIN
-#endif
-#ifdef SD1_TX_PAL_MODE
-# define UART_TX_PAL_MODE SD1_TX_PAL_MODE
-#endif
-#ifdef SD1_RX_PAL_MODE
-# define UART_RX_PAL_MODE SD1_RX_PAL_MODE
-#endif
-#ifdef SD1_CTS_PAL_MODE
-# define UART_RTS_PAL_MODE SD1_CTS_PAL_MODE
-#endif
-#ifdef SD1_RTS_PAL_MODE
-# define UART_TX_PAL_MODE SD1_RTS_PAL_MODE
-#endif
-#ifdef SD1_CR1
-# define UART_CR1 SD1_CR1
-#endif
-#ifdef SD1_CR2
-# define UART_CR2 SD1_CR2
-#endif
-#ifdef SD1_CR3
-# define UART_CR3 SD1_CR3
-#endif
-#ifdef SD1_WRDLEN
-# define UART_WRDLEN SD1_WRDLEN
-#endif
-#ifdef SD1_STPBIT
-# define UART_STPBIT SD1_STPBIT
-#endif
-#ifdef SD1_PARITY
-# define UART_PARITY SD1_PARITY
-#endif
-#ifdef SD1_ATFLCT
-# define UART_ATFLCT SD1_ATFLCT
-#endif
-// ========
-
-#ifndef UART_DRIVER
-# if (HAL_USE_SERIAL == TRUE)
-# define UART_DRIVER SD1
-# elif (HAL_USE_SIO == TRUE)
-# define UART_DRIVER SIOD1
-# endif
-#endif
-
-#ifndef UART_TX_PIN
-# define UART_TX_PIN A9
-#endif
-
-#ifndef UART_RX_PIN
-# define UART_RX_PIN A10
-#endif
-
-#ifndef UART_CTS_PIN
-# define UART_CTS_PIN A11
-#endif
-
-#ifndef UART_RTS_PIN
-# define UART_RTS_PIN A12
-#endif
-
-#ifdef USE_GPIOV1
-# ifndef UART_TX_PAL_MODE
-# define UART_TX_PAL_MODE PAL_MODE_ALTERNATE_PUSHPULL
-# endif
-# ifndef UART_RX_PAL_MODE
-# define UART_RX_PAL_MODE PAL_MODE_INPUT
-# endif
-# ifndef UART_CTS_PAL_MODE
-# define UART_CTS_PAL_MODE PAL_MODE_INPUT
-# endif
-# ifndef UART_RTS_PAL_MODE
-# define UART_RTS_PAL_MODE PAL_MODE_ALTERNATE_PUSHPULL
-# endif
-#else
-# ifndef UART_TX_PAL_MODE
-# define UART_TX_PAL_MODE 7
-# endif
-
-# ifndef UART_RX_PAL_MODE
-# define UART_RX_PAL_MODE 7
-# endif
-
-# ifndef UART_CTS_PAL_MODE
-# define UART_CTS_PAL_MODE 7
-# endif
-
-# ifndef UART_RTS_PAL_MODE
-# define UART_RTS_PAL_MODE 7
-# endif
-#endif
-
-#ifndef UART_CR1
-# define UART_CR1 0
-#endif
-
-#ifndef UART_CR2
-# define UART_CR2 0
-#endif
-
-#ifndef UART_CR3
-# define UART_CR3 0
-#endif
-
-#ifndef UART_WRDLEN
-# define UART_WRDLEN 3
-#endif
-
-#ifndef UART_STPBIT
-# define UART_STPBIT 0
-#endif
-
-#ifndef UART_PARITY
-# define UART_PARITY 0
-#endif
-
-#ifndef UART_ATFLCT
-# define UART_ATFLCT 0
-#endif
-
-/**
- * @brief Initialize the UART driver. This function must be called only once,
- * before any of the below functions can be called.
- *
- * @param baud The baud rate to transmit and receive at. This may depend on the
- * device you are communicating with. Common values are 1200, 2400, 4800, 9600,
- * 19200, 38400, 57600, and 115200.
- */
-void uart_init(uint32_t baud);
-
-/**
- * @brief Transmit a single byte.
- *
- * @param data The byte to transmit.
- */
-void uart_write(uint8_t data);
-
-/**
- * @brief Receive a single byte.
- *
- * @return uint8_t The byte read from the receive buffer. This function will
- * block if the buffer is empty (ie. no data to read).
- */
-uint8_t uart_read(void);
-
-/**
- * @brief Transmit multiple bytes.
- *
- * @param data A pointer to the data to write from.
- * @param length The number of bytes to write. Take care not to overrun the
- * length of `data`.
- */
-void uart_transmit(const uint8_t *data, uint16_t length);
-
-/**
- * @brief Receive multiple bytes.
- *
- * @param data A pointer to the buffer to read into.
- * @param length The number of bytes to read. Take care not to overrun the
- * length of `data`.
- */
-void uart_receive(uint8_t *data, uint16_t length);
-
-/**
- * @brief Return whether the receive buffer contains data. Call this function
- * to determine if `uart_read()` will return data immediately.
- *
- * @return true If there is data available to read.
- * @return false If there is no data available to read.
- */
-bool uart_available(void);
diff --git a/platforms/chibios/drivers/uart_serial.c b/platforms/chibios/drivers/uart_serial.c
index 6aff4eae47..e0afb9768a 100644
--- a/platforms/chibios/drivers/uart_serial.c
+++ b/platforms/chibios/drivers/uart_serial.c
@@ -3,6 +3,89 @@
// SPDX-License-Identifier: GPL-2.0-or-later
#include "uart.h"
+#include "gpio.h"
+#include "chibios_config.h"
+#include <hal.h>
+
+#ifndef UART_DRIVER
+# define UART_DRIVER SD1
+#endif
+
+#ifndef UART_TX_PIN
+# define UART_TX_PIN A9
+#endif
+
+#ifndef UART_TX_PAL_MODE
+# ifdef USE_GPIOV1
+# define UART_TX_PAL_MODE PAL_MODE_ALTERNATE_PUSHPULL
+# else
+# define UART_TX_PAL_MODE 7
+# endif
+#endif
+
+#ifndef UART_RX_PIN
+# define UART_RX_PIN A10
+#endif
+
+#ifndef UART_RX_PAL_MODE
+# ifdef USE_GPIOV1
+# define UART_RX_PAL_MODE PAL_MODE_INPUT
+# else
+# define UART_RX_PAL_MODE 7
+# endif
+#endif
+
+#ifndef UART_CTS_PIN
+# define UART_CTS_PIN A11
+#endif
+
+#ifndef UART_CTS_PAL_MODE
+# ifdef USE_GPIOV1
+# define UART_CTS_PAL_MODE PAL_MODE_INPUT
+# else
+# define UART_CTS_PAL_MODE 7
+# endif
+#endif
+
+#ifndef UART_RTS_PIN
+# define UART_RTS_PIN A12
+#endif
+
+#ifndef UART_RTS_PAL_MODE
+# ifdef USE_GPIOV1
+# define UART_RTS_PAL_MODE PAL_MODE_ALTERNATE_PUSHPULL
+# else
+# define UART_RTS_PAL_MODE 7
+# endif
+#endif
+
+#ifndef UART_CR1
+# define UART_CR1 0
+#endif
+
+#ifndef UART_CR2
+# define UART_CR2 0
+#endif
+
+#ifndef UART_CR3
+# define UART_CR3 0
+#endif
+
+#ifndef UART_WRDLEN
+# define UART_WRDLEN 3
+#endif
+
+#ifndef UART_STPBIT
+# define UART_STPBIT 0
+#endif
+
+#ifndef UART_PARITY
+# define UART_PARITY 0
+#endif
+
+#ifndef UART_ATFLCT
+# define UART_ATFLCT 0
+#endif
#if defined(MCU_KINETIS)
static SerialConfig serialConfig = {SERIAL_DEFAULT_BITRATE};
diff --git a/platforms/chibios/drivers/uart_sio.c b/platforms/chibios/drivers/uart_sio.c
index 442df1c54d..fc12f0abed 100644
--- a/platforms/chibios/drivers/uart_sio.c
+++ b/platforms/chibios/drivers/uart_sio.c
@@ -3,6 +3,73 @@
// SPDX-License-Identifier: GPL-2.0-or-later
#include "uart.h"
+#include "gpio.h"
+#include "chibios_config.h"
+#include <hal.h>
+
+#ifndef UART_DRIVER
+# define UART_DRIVER SIOD1
+#endif
+
+#ifndef UART_TX_PIN
+# define UART_TX_PIN A9
+#endif
+
+#ifndef UART_TX_PAL_MODE
+# ifdef USE_GPIOV1
+# define UART_TX_PAL_MODE PAL_MODE_ALTERNATE_PUSHPULL
+# else
+# define UART_TX_PAL_MODE 7
+# endif
+#endif
+
+#ifndef UART_RX_PIN
+# define UART_RX_PIN A10
+#endif
+
+#ifndef UART_RX_PAL_MODE
+# ifdef USE_GPIOV1
+# define UART_RX_PAL_MODE PAL_MODE_INPUT
+# else
+# define UART_RX_PAL_MODE 7
+# endif
+#endif
+
+#ifndef UART_CTS_PIN
+# define UART_CTS_PIN A11
+#endif
+
+#ifndef UART_CTS_PAL_MODE
+# ifdef USE_GPIOV1
+# define UART_CTS_PAL_MODE PAL_MODE_INPUT
+# else
+# define UART_CTS_PAL_MODE 7
+# endif
+#endif
+
+#ifndef UART_RTS_PIN
+# define UART_RTS_PIN A12
+#endif
+
+#ifndef UART_RTS_PAL_MODE
+# ifdef USE_GPIOV1
+# define UART_RTS_PAL_MODE PAL_MODE_ALTERNATE_PUSHPULL
+# else
+# define UART_RTS_PAL_MODE 7
+# endif
+#endif
+
+#ifndef UART_CR1
+# define UART_CR1 0
+#endif
+
+#ifndef UART_CR2
+# define UART_CR2 0
+#endif
+
+#ifndef UART_CR3
+# define UART_CR3 0
+#endif
#if defined(MCU_RP)
// 38400 baud, 8 data bits, 1 stop bit, no parity, no flow control
diff --git a/platforms/chibios/timer.c b/platforms/chibios/timer.c
index 4a347b445d..9f7eade83f 100644
--- a/platforms/chibios/timer.c
+++ b/platforms/chibios/timer.c
@@ -99,7 +99,7 @@ uint16_t timer_read(void) {
}
uint32_t timer_read32(void) {
- chSysLock();
+ syssts_t sts = chSysGetStatusAndLockX();
uint32_t ticks = get_system_time_ticks() - ticks_offset;
if (ticks < last_ticks) {
// The 32-bit tick counter overflowed and wrapped around. We cannot just extend the counter to 64 bits here,
@@ -114,15 +114,7 @@ uint32_t timer_read32(void) {
}
last_ticks = ticks;
uint32_t ms_offset_copy = ms_offset; // read while still holding the lock to ensure a consistent value
- chSysUnlock();
+ chSysRestoreStatusX(sts);
return (uint32_t)TIME_I2MS(ticks) + ms_offset_copy;
}
-
-uint16_t timer_elapsed(uint16_t last) {
- return TIMER_DIFF_16(timer_read(), last);
-}
-
-uint32_t timer_elapsed32(uint32_t last) {
- return TIMER_DIFF_32(timer_read32(), last);
-}
diff --git a/platforms/test/timer.c b/platforms/test/timer.c
index eb929d7dac..f5ee07fd57 100644
--- a/platforms/test/timer.c
+++ b/platforms/test/timer.c
@@ -60,14 +60,6 @@ uint32_t timer_read32(void) {
return current_time;
}
-uint16_t timer_elapsed(uint16_t last) {
- return TIMER_DIFF_16(timer_read(), last);
-}
-
-uint32_t timer_elapsed32(uint32_t last) {
- return TIMER_DIFF_32(timer_read32(), last);
-}
-
void set_time(uint32_t t) {
current_time = t;
access_counter = 0;
diff --git a/platforms/timer.c b/platforms/timer.c
index 26038dcda3..ba2cf94d2b 100644
--- a/platforms/timer.c
+++ b/platforms/timer.c
@@ -6,3 +6,11 @@
// Generate out-of-line copies for inline functions defined in timer.h.
extern inline fast_timer_t timer_read_fast(void);
extern inline fast_timer_t timer_elapsed_fast(fast_timer_t last);
+
+uint16_t timer_elapsed(uint16_t last) {
+ return TIMER_DIFF_16(timer_read(), last);
+}
+
+uint32_t timer_elapsed32(uint32_t last) {
+ return TIMER_DIFF_32(timer_read32(), last);
+}
diff --git a/platforms/timer.h b/platforms/timer.h
index fb8ff6bc54..8a2ffd476b 100644
--- a/platforms/timer.h
+++ b/platforms/timer.h
@@ -24,10 +24,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <stdint.h>
-#define TIMER_DIFF(a, b, max) ((max == UINT8_MAX) ? ((uint8_t)((a) - (b))) : ((max == UINT16_MAX) ? ((uint16_t)((a) - (b))) : ((max == UINT32_MAX) ? ((uint32_t)((a) - (b))) : ((a) >= (b) ? (a) - (b) : (max) + 1 - (b) + (a)))))
-#define TIMER_DIFF_8(a, b) TIMER_DIFF(a, b, UINT8_MAX)
-#define TIMER_DIFF_16(a, b) TIMER_DIFF(a, b, UINT16_MAX)
-#define TIMER_DIFF_32(a, b) TIMER_DIFF(a, b, UINT32_MAX)
+#define TIMER_DIFF_8(a, b) (uint8_t)((a) - (b))
+#define TIMER_DIFF_16(a, b) (uint16_t)((a) - (b))
+#define TIMER_DIFF_32(a, b) (uint32_t)((a) - (b))
#define TIMER_DIFF_RAW(a, b) TIMER_DIFF_8(a, b)
#ifdef __cplusplus
diff --git a/quantum/action_tapping.c b/quantum/action_tapping.c
index 8f238490f2..e42a98554d 100644
--- a/quantum/action_tapping.c
+++ b/quantum/action_tapping.c
@@ -49,6 +49,45 @@ __attribute__((weak)) bool get_permissive_hold(uint16_t keycode, keyrecord_t *re
}
# endif
+# if defined(CHORDAL_HOLD)
+extern const char chordal_hold_layout[MATRIX_ROWS][MATRIX_COLS] PROGMEM;
+
+# define REGISTERED_TAPS_SIZE 8
+// Array of tap-hold keys that have been settled as tapped but not yet released.
+static keypos_t registered_taps[REGISTERED_TAPS_SIZE] = {};
+static uint8_t num_registered_taps = 0;
+
+/** Adds `key` to the registered_taps array. */
+static void registered_taps_add(keypos_t key);
+/** Returns the index of `key` in registered_taps, or -1 if not found. */
+static int8_t registered_tap_find(keypos_t key);
+/** Removes index `i` from the registered_taps array. */
+static void registered_taps_del_index(uint8_t i);
+/** Logs the registered_taps array for debugging. */
+static void debug_registered_taps(void);
+
+/** \brief Finds which queued events should be held according to Chordal Hold.
+ *
+ * In a situation with multiple unsettled tap-hold key presses, scan the queue
+ * up until the first release, non-tap-hold, or one-shot event and find the
+ * latest event in the queue that settles as held according to
+ * get_chordal_hold().
+ *
+ * \return Index of the first tap, or equivalently, one past the latest hold.
+ */
+static uint8_t waiting_buffer_find_chordal_hold_tap(void);
+
+/** Processes queued events up to and including `key` as tapped. */
+static void waiting_buffer_chordal_hold_taps_until(keypos_t key);
+
+/** \brief Processes and pops buffered events until the first tap-hold event. */
+static void waiting_buffer_process_regular(void);
+
+static bool is_mt_or_lt(uint16_t keycode) {
+ return IS_QK_MOD_TAP(keycode) || IS_QK_LAYER_TAP(keycode);
+}
+# endif // CHORDAL_HOLD
+
# ifdef HOLD_ON_OTHER_KEY_PRESS_PER_KEY
__attribute__((weak)) bool get_hold_on_other_key_press(uint16_t keycode, keyrecord_t *record) {
return false;
@@ -166,6 +205,20 @@ void action_tapping_process(keyrecord_t record) {
bool process_tapping(keyrecord_t *keyp) {
const keyevent_t event = keyp->event;
+# if defined(CHORDAL_HOLD)
+ if (!event.pressed) {
+ const int8_t i = registered_tap_find(event.key);
+ if (i != -1) {
+ // If a tap-hold key was previously settled as tapped, set its
+ // tap.count correspondingly on release.
+ keyp->tap.count = 1;
+ registered_taps_del_index(i);
+ ac_dprintf("Found tap release for [%d]\n", i);
+ debug_registered_taps();
+ }
+ }
+# endif // CHORDAL_HOLD
+
// state machine is in the "reset" state, no tapping key is to be
// processed
if (IS_NOEVENT(tapping_key.event)) {
@@ -188,7 +241,7 @@ bool process_tapping(keyrecord_t *keyp) {
return true;
}
-# if (defined(AUTO_SHIFT_ENABLE) && defined(RETRO_SHIFT)) || defined(PERMISSIVE_HOLD_PER_KEY) || defined(HOLD_ON_OTHER_KEY_PRESS_PER_KEY)
+# if (defined(AUTO_SHIFT_ENABLE) && defined(RETRO_SHIFT)) || defined(PERMISSIVE_HOLD_PER_KEY) || defined(CHORDAL_HOLD) || defined(HOLD_ON_OTHER_KEY_PRESS_PER_KEY)
TAP_DEFINE_KEYCODE;
# endif
@@ -199,6 +252,7 @@ bool process_tapping(keyrecord_t *keyp) {
// early return for tick events
return true;
}
+
if (tapping_key.tap.count == 0) {
if (IS_TAPPING_RECORD(keyp) && !event.pressed) {
// first tap!
@@ -212,6 +266,25 @@ bool process_tapping(keyrecord_t *keyp) {
// enqueue
return false;
}
+# if defined(CHORDAL_HOLD)
+ else if (is_mt_or_lt(tapping_keycode) && !event.pressed && waiting_buffer_typed(event) && !get_chordal_hold(tapping_keycode, &tapping_key, get_record_keycode(keyp, false), keyp)) {
+ // Key release that is not a chord with the tapping key.
+ // Settle the tapping key and any other pending tap-hold
+ // keys preceding the press of this key as tapped.
+
+ ac_dprintf("Tapping: End. Chord considered a tap\n");
+ tapping_key.tap.count = 1;
+ registered_taps_add(tapping_key.event.key);
+ process_record(&tapping_key);
+ tapping_key = (keyrecord_t){0};
+
+ waiting_buffer_chordal_hold_taps_until(event.key);
+ debug_registered_taps();
+ debug_waiting_buffer();
+ // enqueue
+ return false;
+ }
+# endif // CHORDAL_HOLD
/* Process a key typed within TAPPING_TERM
* This can register the key before settlement of tapping,
* useful for long TAPPING_TERM but may prevent fast typing.
@@ -229,6 +302,22 @@ bool process_tapping(keyrecord_t *keyp) {
// clang-format on
ac_dprintf("Tapping: End. No tap. Interfered by typing key\n");
process_record(&tapping_key);
+
+# if defined(CHORDAL_HOLD)
+ uint8_t first_tap = waiting_buffer_find_chordal_hold_tap();
+ ac_dprintf("first_tap = %u\n", first_tap);
+ if (first_tap < WAITING_BUFFER_SIZE) {
+ for (; waiting_buffer_tail != first_tap; waiting_buffer_tail = (waiting_buffer_tail + 1) % WAITING_BUFFER_SIZE) {
+ ac_dprintf("Processing [%u]\n", waiting_buffer_tail);
+ process_record(&waiting_buffer[waiting_buffer_tail]);
+ }
+ }
+
+ waiting_buffer_chordal_hold_taps_until(event.key);
+ debug_registered_taps();
+ debug_waiting_buffer();
+# endif // CHORDAL_HOLD
+
tapping_key = (keyrecord_t){0};
debug_tapping_key();
// enqueue
@@ -237,6 +326,19 @@ bool process_tapping(keyrecord_t *keyp) {
/* Process release event of a key pressed before tapping starts
* Without this unexpected repeating will occur with having fast repeating setting
* https://github.com/tmk/tmk_keyboard/issues/60
+ *
+ * NOTE: This workaround causes events to process out of order,
+ * e.g. in a rolled press of three tap-hold keys like
+ *
+ * "A down, B down, C down, A up, B up, C up"
+ *
+ * events are processed as
+ *
+ * "A down, B down, A up, B up, C down, C up"
+ *
+ * It seems incorrect to process keyp before the tapping key.
+ * This workaround is old, from 2013. This might no longer
+ * be needed for the original problem it was meant to address.
*/
else if (!event.pressed && !waiting_buffer_typed(event)) {
// Modifier/Layer should be retained till end of this tapping.
@@ -271,19 +373,52 @@ bool process_tapping(keyrecord_t *keyp) {
// set interrupted flag when other key pressed during tapping
if (event.pressed) {
tapping_key.tap.interrupted = true;
- if (TAP_GET_HOLD_ON_OTHER_KEY_PRESS
+
+# if defined(CHORDAL_HOLD)
+ if (is_mt_or_lt(tapping_keycode) && !get_chordal_hold(tapping_keycode, &tapping_key, get_record_keycode(keyp, false), keyp)) {
+ // In process_action(), HOLD_ON_OTHER_KEY_PRESS
+ // will revert interrupted events to holds, so
+ // this needs to be set false.
+ tapping_key.tap.interrupted = false;
+
+ if (!is_tap_record(keyp)) {
+ ac_dprintf("Tapping: End. Chord considered a tap\n");
+ tapping_key.tap.count = 1;
+ registered_taps_add(tapping_key.event.key);
+ debug_registered_taps();
+ process_record(&tapping_key);
+ tapping_key = (keyrecord_t){0};
+ }
+ } else
+# endif // CHORDAL_HOLD
+ if (TAP_GET_HOLD_ON_OTHER_KEY_PRESS
# if defined(AUTO_SHIFT_ENABLE) && defined(RETRO_SHIFT)
- // Auto Shift cannot evaluate this early
- // Retro Shift uses the hold action for all nested taps even without HOLD_ON_OTHER_KEY_PRESS, so this is fine to skip
- && !(MAYBE_RETRO_SHIFTING(event, keyp) && get_auto_shifted_key(get_record_keycode(keyp, false), keyp))
+ // Auto Shift cannot evaluate this early
+ // Retro Shift uses the hold action for all nested taps even without HOLD_ON_OTHER_KEY_PRESS, so this is fine to skip
+ && !(MAYBE_RETRO_SHIFTING(event, keyp) && get_auto_shifted_key(get_record_keycode(keyp, false), keyp))
# endif
- ) {
+ ) {
+ // Settle the tapping key as *held*, since
+ // HOLD_ON_OTHER_KEY_PRESS is enabled for this key.
ac_dprintf("Tapping: End. No tap. Interfered by pressed key\n");
process_record(&tapping_key);
- tapping_key = (keyrecord_t){0};
+
+# if defined(CHORDAL_HOLD)
+ if (waiting_buffer_tail != waiting_buffer_head && is_tap_record(&waiting_buffer[waiting_buffer_tail])) {
+ tapping_key = waiting_buffer[waiting_buffer_tail];
+ // Pop tail from the queue.
+ waiting_buffer_tail = (waiting_buffer_tail + 1) % WAITING_BUFFER_SIZE;
+ debug_waiting_buffer();
+ } else
+# endif // CHORDAL_HOLD
+ {
+ tapping_key = (keyrecord_t){0};
+ }
debug_tapping_key();
- // enqueue
- return false;
+
+# if defined(CHORDAL_HOLD)
+ waiting_buffer_process_regular();
+# endif // CHORDAL_HOLD
}
}
// enqueue
@@ -520,26 +655,125 @@ void waiting_buffer_scan_tap(void) {
}
}
-/** \brief Tapping key debug print
- *
- * FIXME: Needs docs
- */
+# ifdef CHORDAL_HOLD
+__attribute__((weak)) bool get_chordal_hold(uint16_t tap_hold_keycode, keyrecord_t *tap_hold_record, uint16_t other_keycode, keyrecord_t *other_record) {
+ return get_chordal_hold_default(tap_hold_record, other_record);
+}
+
+bool get_chordal_hold_default(keyrecord_t *tap_hold_record, keyrecord_t *other_record) {
+ if (tap_hold_record->event.type != KEY_EVENT || other_record->event.type != KEY_EVENT) {
+ return true; // Return true on combos or other non-key events.
+ }
+
+ char tap_hold_hand = chordal_hold_handedness(tap_hold_record->event.key);
+ if (tap_hold_hand == '*') {
+ return true;
+ }
+ char other_hand = chordal_hold_handedness(other_record->event.key);
+ return other_hand == '*' || tap_hold_hand != other_hand;
+}
+
+__attribute__((weak)) char chordal_hold_handedness(keypos_t key) {
+ return (char)pgm_read_byte(&chordal_hold_layout[key.row][key.col]);
+}
+
+static void registered_taps_add(keypos_t key) {
+ if (num_registered_taps >= REGISTERED_TAPS_SIZE) {
+ ac_dprintf("TAPS OVERFLOW: CLEAR ALL STATES\n");
+ clear_keyboard();
+ num_registered_taps = 0;
+ }
+
+ registered_taps[num_registered_taps] = key;
+ ++num_registered_taps;
+}
+
+static int8_t registered_tap_find(keypos_t key) {
+ for (int8_t i = 0; i < num_registered_taps; ++i) {
+ if (KEYEQ(registered_taps[i], key)) {
+ return i;
+ }
+ }
+ return -1;
+}
+
+static void registered_taps_del_index(uint8_t i) {
+ if (i < num_registered_taps) {
+ --num_registered_taps;
+ if (i < num_registered_taps) {
+ registered_taps[i] = registered_taps[num_registered_taps];
+ }
+ }
+}
+
+static void debug_registered_taps(void) {
+ ac_dprintf("registered_taps = { ");
+ for (int8_t i = 0; i < num_registered_taps; ++i) {
+ ac_dprintf("%02X%02X ", registered_taps[i].row, registered_taps[i].col);
+ }
+ ac_dprintf("}\n");
+}
+
+static uint8_t waiting_buffer_find_chordal_hold_tap(void) {
+ keyrecord_t *prev = &tapping_key;
+ uint16_t prev_keycode = get_record_keycode(&tapping_key, false);
+ uint8_t first_tap = WAITING_BUFFER_SIZE;
+ for (uint8_t i = waiting_buffer_tail; i != waiting_buffer_head; i = (i + 1) % WAITING_BUFFER_SIZE) {
+ keyrecord_t * cur = &waiting_buffer[i];
+ const uint16_t cur_keycode = get_record_keycode(cur, false);
+ if (!cur->event.pressed || !is_mt_or_lt(prev_keycode)) {
+ break;
+ } else if (get_chordal_hold(prev_keycode, prev, cur_keycode, cur)) {
+ first_tap = i; // Track one index past the latest hold.
+ }
+ prev = cur;
+ prev_keycode = cur_keycode;
+ }
+ return first_tap;
+}
+
+static void waiting_buffer_chordal_hold_taps_until(keypos_t key) {
+ while (waiting_buffer_tail != waiting_buffer_head) {
+ keyrecord_t *record = &waiting_buffer[waiting_buffer_tail];
+ ac_dprintf("waiting_buffer_chordal_hold_taps_until: processing [%u]\n", waiting_buffer_tail);
+ if (record->event.pressed && is_tap_record(record)) {
+ record->tap.count = 1;
+ registered_taps_add(record->event.key);
+ }
+ process_record(record);
+ waiting_buffer_tail = (waiting_buffer_tail + 1) % WAITING_BUFFER_SIZE;
+
+ if (KEYEQ(key, record->event.key) && record->event.pressed) {
+ break;
+ }
+ }
+}
+
+static void waiting_buffer_process_regular(void) {
+ for (; waiting_buffer_tail != waiting_buffer_head; waiting_buffer_tail = (waiting_buffer_tail + 1) % WAITING_BUFFER_SIZE) {
+ if (is_tap_record(&waiting_buffer[waiting_buffer_tail])) {
+ break; // Stop once a tap-hold key event is reached.
+ }
+ ac_dprintf("waiting_buffer_process_regular: processing [%u]\n", waiting_buffer_tail);
+ process_record(&waiting_buffer[waiting_buffer_tail]);
+ }
+ debug_waiting_buffer();
+}
+# endif // CHORDAL_HOLD
+
+/** \brief Logs tapping key if ACTION_DEBUG is enabled. */
static void debug_tapping_key(void) {
ac_dprintf("TAPPING_KEY=");
debug_record(tapping_key);
ac_dprintf("\n");
}
-/** \brief Waiting buffer debug print
- *
- * FIXME: Needs docs
- */
+/** \brief Logs waiting buffer if ACTION_DEBUG is enabled. */
static void debug_waiting_buffer(void) {
- ac_dprintf("{ ");
+ ac_dprintf("{");
for (uint8_t i = waiting_buffer_tail; i != waiting_buffer_head; i = (i + 1) % WAITING_BUFFER_SIZE) {
- ac_dprintf("[%u]=", i);
+ ac_dprintf(" [%u]=", i);
debug_record(waiting_buffer[i]);
- ac_dprintf(" ");
}
ac_dprintf("}\n");
}
diff --git a/quantum/action_tapping.h b/quantum/action_tapping.h
index 6b518b8298..c3c7b999ec 100644
--- a/quantum/action_tapping.h
+++ b/quantum/action_tapping.h
@@ -46,6 +46,71 @@ bool get_permissive_hold(uint16_t keycode, keyrecord_t *record);
bool get_retro_tapping(uint16_t keycode, keyrecord_t *record);
bool get_hold_on_other_key_press(uint16_t keycode, keyrecord_t *record);
+#ifdef CHORDAL_HOLD
+/**
+ * Callback to say when a key chord before the tapping term may be held.
+ *
+ * In keymap.c, define the callback
+ *
+ * bool get_chordal_hold(uint16_t tap_hold_keycode,
+ * keyrecord_t* tap_hold_record,
+ * uint16_t other_keycode,
+ * keyrecord_t* other_record) {
+ * // Conditions...
+ * }
+ *
+ * This callback is called when:
+ *
+ * 1. `tap_hold_keycode` is pressed.
+ * 2. `other_keycode` is pressed while `tap_hold_keycode` is still held,
+ * provided `other_keycode` is *not* also a tap-hold key and it is pressed
+ * before the tapping term.
+ *
+ * If false is returned, this has the effect of immediately settling the
+ * tap-hold key as tapped. If true is returned, the tap-hold key is still
+ * unsettled, and may be settled as held depending on configuration and
+ * subsequent events.
+ *
+ * @param tap_hold_keycode Keycode of the tap-hold key.
+ * @param tap_hold_record Record from the tap-hold press event.
+ * @param other_keycode Keycode of the other key.
+ * @param other_record Record from the other key's press event.
+ * @return True if the tap-hold key may be considered held; false if tapped.
+ */
+bool get_chordal_hold(uint16_t tap_hold_keycode, keyrecord_t *tap_hold_record, uint16_t other_keycode, keyrecord_t *other_record);
+
+/**
+ * Default "opposite hands rule" for whether a key chord may settle as held.
+ *
+ * This function returns true when the tap-hold key and other key are on
+ * "opposite hands." In detail, handedness of the two keys are compared. If
+ * handedness values differ, or if either handedness is '*', the function
+ * returns true, indicating that it may be held. Otherwise, it returns false,
+ * in which case the tap-hold key is immediately settled at tapped.
+ *
+ * @param tap_hold_record Record of the active tap-hold key press.
+ * @param other_record Record of the other, interrupting key press.
+ * @return True if the tap-hold key may be considered held; false if tapped.
+ */
+bool get_chordal_hold_default(keyrecord_t *tap_hold_record, keyrecord_t *other_record);
+
+/**
+ * Gets the handedness of a key.
+ *
+ * This function returns:
+ * 'L' for keys pressed by the left hand,
+ * 'R' for keys on the right hand,
+ * '*' for keys exempt from the "opposite hands rule." This could be used
+ * perhaps on thumb keys or keys that might be pressed by either hand.
+ *
+ * @param key A key matrix position.
+ * @return Handedness value.
+ */
+char chordal_hold_handedness(keypos_t key);
+
+extern const char chordal_hold_layout[MATRIX_ROWS][MATRIX_COLS] PROGMEM;
+#endif
+
#ifdef DYNAMIC_TAPPING_TERM_ENABLE
extern uint16_t g_tapping_term;
#endif
diff --git a/quantum/audio/audio.c b/quantum/audio/audio.c
index b2611c5f09..2cc3c2d661 100644
--- a/quantum/audio/audio.c
+++ b/quantum/audio/audio.c
@@ -258,11 +258,10 @@ void audio_stop_tone(float pitch) {
for (int i = AUDIO_TONE_STACKSIZE - 1; i >= 0; i--) {
found = (tones[i].pitch == pitch);
if (found) {
- tones[i] = (musical_tone_t){.time_started = 0, .pitch = -1.0f, .duration = 0};
for (int j = i; (j < AUDIO_TONE_STACKSIZE - 1); j++) {
- tones[j] = tones[j + 1];
- tones[j + 1] = (musical_tone_t){.time_started = 0, .pitch = -1.0f, .duration = 0};
+ tones[j] = tones[j + 1];
}
+ tones[AUDIO_TONE_STACKSIZE - 1] = (musical_tone_t){.time_started = 0, .pitch = -1.0f, .duration = 0};
break;
}
}
diff --git a/quantum/debounce/tests/rules.mk b/quantum/debounce/tests/rules.mk
index bbc362d4c7..d38b1cd342 100644
--- a/quantum/debounce/tests/rules.mk
+++ b/quantum/debounce/tests/rules.mk
@@ -16,6 +16,7 @@
DEBOUNCE_COMMON_DEFS := -DMATRIX_ROWS=4 -DMATRIX_COLS=10 -DDEBOUNCE=5
DEBOUNCE_COMMON_SRC := $(QUANTUM_PATH)/debounce/tests/debounce_test_common.cpp \
+ $(PLATFORM_PATH)/timer.c \
$(PLATFORM_PATH)/$(PLATFORM_KEY)/timer.c
debounce_none_DEFS := $(DEBOUNCE_COMMON_DEFS)
diff --git a/quantum/dynamic_keymap.c b/quantum/dynamic_keymap.c
index 3c22bbd445..beb7f9d18f 100644
--- a/quantum/dynamic_keymap.c
+++ b/quantum/dynamic_keymap.c
@@ -245,6 +245,17 @@ void dynamic_keymap_macro_set_buffer(uint16_t offset, uint16_t size, uint8_t *da
}
}
+typedef struct send_string_eeprom_state_t {
+ const uint8_t *ptr;
+} send_string_eeprom_state_t;
+
+char send_string_get_next_eeprom(void *arg) {
+ send_string_eeprom_state_t *state = (send_string_eeprom_state_t *)arg;
+ char ret = eeprom_read_byte(state->ptr);
+ state->ptr++;
+ return ret;
+}
+
void dynamic_keymap_macro_reset(void) {
void *p = (void *)(DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR);
void *end = (void *)(DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR + DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE);
@@ -284,57 +295,6 @@ void dynamic_keymap_macro_send(uint8_t id) {
++p;
}
- // Send the macro string by making a temporary string.
- char data[8] = {0};
- // We already checked there was a null at the end of
- // the buffer, so this cannot go past the end
- while (1) {
- data[0] = eeprom_read_byte(p++);
- data[1] = 0;
- // Stop at the null terminator of this macro string
- if (data[0] == 0) {
- break;
- }
- if (data[0] == SS_QMK_PREFIX) {
- // Get the code
- data[1] = eeprom_read_byte(p++);
- // Unexpected null, abort.
- if (data[1] == 0) {
- return;
- }
- if (data[1] == SS_TAP_CODE || data[1] == SS_DOWN_CODE || data[1] == SS_UP_CODE) {
- // Get the keycode
- data[2] = eeprom_read_byte(p++);
- // Unexpected null, abort.
- if (data[2] == 0) {
- return;
- }
- // Null terminate
- data[3] = 0;
- } else if (data[1] == SS_DELAY_CODE) {
- // Get the number and '|'
- // At most this is 4 digits plus '|'
- uint8_t i = 2;
- while (1) {
- data[i] = eeprom_read_byte(p++);
- // Unexpected null, abort
- if (data[i] == 0) {
- return;
- }
- // Found '|', send it
- if (data[i] == '|') {
- data[i + 1] = 0;
- break;
- }
- // If haven't found '|' by i==6 then
- // number too big, abort
- if (i == 6) {
- return;
- }
- ++i;
- }
- }
- }
- send_string_with_delay(data, DYNAMIC_KEYMAP_MACRO_DELAY);
- }
+ send_string_eeprom_state_t state = {p};
+ send_string_with_delay_impl(send_string_get_next_eeprom, &state, DYNAMIC_KEYMAP_MACRO_DELAY);
}
diff --git a/quantum/keymap_extras/keymap_eurkey.h b/quantum/keymap_extras/keymap_eurkey.h
new file mode 100644
index 0000000000..20f7f58683
--- /dev/null
+++ b/quantum/keymap_extras/keymap_eurkey.h
@@ -0,0 +1,166 @@
+// Copyright 2025 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 EU_GRV KC_GRV // `
+#define EU_1 KC_1 // 1
+#define EU_2 KC_2 // 2
+#define EU_3 KC_3 // 3
+#define EU_4 KC_4 // 4
+#define EU_5 KC_5 // 5
+#define EU_6 KC_6 // 6
+#define EU_7 KC_7 // 7
+#define EU_8 KC_8 // 8
+#define EU_9 KC_9 // 9
+#define EU_0 KC_0 // 0
+#define EU_MINS KC_MINS // -
+#define EU_EQL KC_EQL // =
+#define EU_Q KC_Q // Q
+#define EU_W KC_W // W
+#define EU_E KC_E // E
+#define EU_R KC_R // R
+#define EU_T KC_T // T
+#define EU_Y KC_Y // Y
+#define EU_U KC_U // U
+#define EU_I KC_I // I
+#define EU_O KC_O // O
+#define EU_P KC_P // P
+#define EU_LBRC KC_LBRC // [
+#define EU_RBRC KC_RBRC // ]
+#define EU_BSLS KC_BSLS // (backslash)
+#define EU_A KC_A // A
+#define EU_S KC_S // S
+#define EU_D KC_D // D
+#define EU_F KC_F // F
+#define EU_G KC_G // G
+#define EU_H KC_H // H
+#define EU_J KC_J // J
+#define EU_K KC_K // K
+#define EU_L KC_L // L
+#define EU_SCLN KC_SCLN // ;
+#define EU_QUOT KC_QUOT // '
+#define EU_Z KC_Z // Z
+#define EU_X KC_X // X
+#define EU_C KC_C // C
+#define EU_V KC_V // V
+#define EU_B KC_B // B
+#define EU_N KC_N // N
+#define EU_M KC_M // M
+#define EU_COMM KC_COMM // ,
+#define EU_DOT KC_DOT // .
+#define EU_SLSH KC_SLSH // /
+#define EU_TILD S(EU_GRV) // ~
+#define EU_EXLM S(EU_1) // !
+#define EU_AT S(EU_2) // @
+#define EU_HASH S(EU_3) // #
+#define EU_DLR S(EU_4) // $
+#define EU_PERC S(EU_5) // %
+#define EU_CIRC S(EU_6) // ^
+#define EU_AMPR S(EU_7) // &
+#define EU_ASTR S(EU_8) // *
+#define EU_LPRN S(EU_9) // (
+#define EU_RPRN S(EU_0) // )
+#define EU_UNDS S(EU_MINS) // _
+#define EU_PLUS S(EU_EQL) // +
+#define EU_LCBR S(EU_LBRC) // {
+#define EU_RCBR S(EU_RBRC) // }
+#define EU_PIPE S(EU_BSLS) // |
+#define EU_COLN S(EU_SCLN) // :
+#define EU_DQUO S(EU_QUOT) // "
+#define EU_LABK S(EU_COMM) // <
+#define EU_RABK S(EU_DOT) // >
+#define EU_QUES S(EU_SLSH) // ?
+#define EU_DGRV ALGR(EU_GRV) // ` (dead)
+#define EU_IEXL ALGR(EU_1) // ¡
+#define EU_FORD ALGR(EU_2) // ª
+#define EU_MORD ALGR(EU_3) // º
+#define EU_PND ALGR(EU_4) // £
+#define EU_EURO ALGR(EU_5) // €
+#define EU_DCIR ALGR(EU_6) // ^ (dead)
+#define EU_RNGA ALGR(EU_7) // ˚ (dead)
+#define EU_DLQU ALGR(EU_8) // „
+#define EU_LDQU ALGR(EU_9) // “
+#define EU_RDQU ALGR(EU_0) // ”
+#define EU_NDSH ALGR(EU_MINS) // –
+#define EU_MUL ALGR(EU_EQL) // ×
+#define EU_AE ALGR(EU_Q) // æ
+#define EU_ARNG ALGR(EU_W) // Å
+#define EU_EDIA ALGR(EU_E) // Ë
+#define EU_YACU ALGR(EU_R) // Ý
+#define EU_THRN ALGR(EU_T) // Þ
+#define EU_YDIA ALGR(EU_Y) // Ÿ
+#define EU_UDIA ALGR(EU_U) // Ü
+#define EU_IDIA ALGR(EU_I) // Ï
+#define EU_ODIA ALGR(EU_O) // Ö
+#define EU_OE ALGR(EU_P) // Œ
+#define EU_LDAQ ALGR(EU_LBRC) // «
+#define EU_RDAQ ALGR(EU_RBRC) // »
+#define EU_NOT ALGR(EU_BSLS) // ¬
+#define EU_ADIA ALGR(EU_A) // Ä
+#define EU_SS ALGR(EU_S) // ß
+#define EU_ETH ALGR(EU_D) // Ð
+#define EU_EGRV ALGR(EU_F) // È
+#define EU_EACU ALGR(EU_G) // É
+#define EU_UGRV ALGR(EU_H) // Ù
+#define EU_UACU ALGR(EU_J) // Ú
+#define EU_IJ ALGR(EU_K) // IJ
+#define EU_OSTR ALGR(EU_L) // Ø
+#define EU_DEG ALGR(EU_SCLN) // °
+#define EU_ACUT ALGR(EU_QUOT) // ´ (dead)
+#define EU_AGRV ALGR(EU_Z) // À
+#define EU_AACU ALGR(EU_X) // Á
+#define EU_CCED ALGR(EU_C) // Ç
+#define EU_IGRV ALGR(EU_V) // Ì
+#define EU_IACU ALGR(EU_B) // Í
+#define EU_NTIL ALGR(EU_N) // Ñ
+#define EU_DGRK ALGR(EU_M) // μ (dead Greek key)
+#define EU_OGRV ALGR(EU_COMM) // Ò
+#define EU_OACU ALGR(EU_DOT) // Ó
+#define EU_IQUE ALGR(EU_SLSH) // ¿
+#define EU_DTIL ALGR(EU_TILD) // ~ (dead)
+#define EU_SUP1 S(ALGR(EU_1)) // ¹
+#define EU_SUP2 S(ALGR(EU_2)) // ²
+#define EU_SUP3 S(ALGR(EU_3)) // ³
+#define EU_YEN ALGR(EU_DLR) // ¥
+#define EU_CENT S(EU_EURO) // ¢
+#define EU_CARN S(EU_DCIR) // ˇ (dead)
+#define EU_MACR S(ALGR(EU_7)) // ¯ (dead)
+#define EU_SLQU S(EU_DLQU) // ‚
+#define EU_LSQU S(EU_LDQU) // ‘
+#define EU_RSQU S(EU_RDQU) // ’
+#define EU_MDSH S(EU_NDSH) // —
+#define EU_DIV S(EU_MUL) // ÷
+#define EU_LSAQ S(EU_LDAQ) // ‹
+#define EU_RSAQ S(EU_RDAQ) // ›
+#define EU_BRKP S(ALGR(EU_BSLS)) // ¦
+#define EU_SECT S(ALGR(EU_S)) // §
+#define EU_MDDT S(ALGR(EU_SCLN)) // ·
+#define EU_DIAE ALGR(EU_DQUO) // ¨ (dead)
+#define EU_ELLP ALGR(EU_QUES) // …
+
diff --git a/quantum/keymap_extras/keymap_farsi.h b/quantum/keymap_extras/keymap_farsi.h
index 8e16188a8f..4f34b08d92 100644
--- a/quantum/keymap_extras/keymap_farsi.h
+++ b/quantum/keymap_extras/keymap_farsi.h
@@ -150,7 +150,7 @@
#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_SUBA ALGR(FA_RE) // ٖ
#define FA_HMZB ALGR(FA_DAL) // ء
#define FA_ELLP ALGR(FA_PE) // …
#define FA_COMM ALGR(FA_WAW) // ,
diff --git a/quantum/leader.c b/quantum/leader.c
index 272609ad0c..23e5e8cd6d 100644
--- a/quantum/leader.c
+++ b/quantum/leader.c
@@ -21,6 +21,10 @@ __attribute__((weak)) void leader_start_user(void) {}
__attribute__((weak)) void leader_end_user(void) {}
+__attribute__((weak)) bool leader_add_user(uint16_t keycode) {
+ return false;
+}
+
void leader_start(void) {
if (leading) {
return;
@@ -61,6 +65,9 @@ bool leader_sequence_add(uint16_t keycode) {
leader_sequence[leader_sequence_size] = keycode;
leader_sequence_size++;
+ if (leader_add_user(keycode)) {
+ leader_end();
+ }
return true;
}
diff --git a/quantum/leader.h b/quantum/leader.h
index 3177fcd196..fba6b287ba 100644
--- a/quantum/leader.h
+++ b/quantum/leader.h
@@ -22,6 +22,15 @@ void leader_start_user(void);
void leader_end_user(void);
/**
+ * \brief User callback, invoked when a keycode is added to the leader sequence.
+ *
+ * \param keycode The keycode added to the leader sequence.
+ *
+ * \return `true` to finish the key sequence, `false` to continue.
+ */
+bool leader_add_user(uint16_t keycode);
+
+/**
* Begin the leader sequence, resetting the buffer and timer.
*/
void leader_start(void);
diff --git a/quantum/os_detection/tests/rules.mk b/quantum/os_detection/tests/rules.mk
index 1b69b71ba9..2f31f5e391 100644
--- a/quantum/os_detection/tests/rules.mk
+++ b/quantum/os_detection/tests/rules.mk
@@ -4,4 +4,5 @@ os_detection_DEFS += -DOS_DETECTION_DEBOUNCE=50
os_detection_SRC := \
$(QUANTUM_PATH)/os_detection/tests/os_detection.cpp \
$(QUANTUM_PATH)/os_detection.c \
+ $(PLATFORM_PATH)/timer.c \
$(PLATFORM_PATH)/$(PLATFORM_KEY)/timer.c
diff --git a/quantum/painter/qgf.c b/quantum/painter/qgf.c
index bc2df94933..07c3f80314 100644
--- a/quantum/painter/qgf.c
+++ b/quantum/painter/qgf.c
@@ -255,10 +255,10 @@ bool qgf_validate_stream(qp_stream_t *stream) {
// Read and validate all the frames (automatically validates the frame offset descriptor in the process)
for (uint16_t i = 0; i < frame_count; ++i) {
// Validate the frame descriptor block
- uint8_t bpp;
- bool has_palette;
- bool is_panel_native;
- bool has_delta;
+ uint8_t bpp = 0;
+ bool has_palette = false;
+ bool is_panel_native = false;
+ bool has_delta = false;
if (!qgf_validate_frame_descriptor(stream, i, &bpp, &has_palette, &is_panel_native, &has_delta)) {
return false;
}
diff --git a/quantum/painter/qp_draw_image.c b/quantum/painter/qp_draw_image.c
index 18fa38cb19..a225039af4 100644
--- a/quantum/painter/qp_draw_image.c
+++ b/quantum/painter/qp_draw_image.c
@@ -318,9 +318,9 @@ static deferred_token qp_render_animation_state(animation_state_t *state, uint16
}
static uint32_t animation_callback(uint32_t trigger_time, void *cb_arg) {
- animation_state_t *state = (animation_state_t *)cb_arg;
- uint16_t delay_ms;
- bool ret = qp_render_animation_state(state, &delay_ms);
+ animation_state_t *state = (animation_state_t *)cb_arg;
+ uint16_t delay_ms = 0;
+ bool ret = qp_render_animation_state(state, &delay_ms);
if (!ret) {
// Setting the device to NULL clears the animation slot
state->device = NULL;
diff --git a/quantum/quantum.c b/quantum/quantum.c
index d4ebd58e7f..b63300add8 100644
--- a/quantum/quantum.c
+++ b/quantum/quantum.c
@@ -329,13 +329,13 @@ bool process_record_quantum(keyrecord_t *record) {
#ifdef HAPTIC_ENABLE
process_haptic(keycode, record) &&
#endif
-#if defined(VIA_ENABLE)
- process_record_via(keycode, record) &&
-#endif
#if defined(POINTING_DEVICE_ENABLE) && defined(POINTING_DEVICE_AUTO_MOUSE_ENABLE)
process_auto_mouse(keycode, record) &&
#endif
process_record_kb(keycode, record) &&
+#if defined(VIA_ENABLE)
+ process_record_via(keycode, record) &&
+#endif
#if defined(SECURE_ENABLE)
process_secure(keycode, record) &&
#endif
diff --git a/quantum/rgb_matrix/animations/hue_breathing_anim.h b/quantum/rgb_matrix/animations/hue_breathing_anim.h
index 5316e92dbd..60d7426cfc 100644
--- a/quantum/rgb_matrix/animations/hue_breathing_anim.h
+++ b/quantum/rgb_matrix/animations/hue_breathing_anim.h
@@ -2,21 +2,17 @@
RGB_MATRIX_EFFECT(HUE_BREATHING)
# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
-// Change huedelta to adjust range of hue change. 0-255.
// Hue Breathing - All LED's light up
+hsv_t HUE_BREATHING_math(hsv_t hsv, uint8_t i, uint8_t time) {
+ // Adjust delta between 0-255 to change hue range
+ uint8_t delta = 12;
+ hsv.h = hsv.h + scale8(abs8(sin8(time / 2) - 128) * 2, delta);
+ return hsv;
+}
+
bool HUE_BREATHING(effect_params_t* params) {
- RGB_MATRIX_USE_LIMITS(led_min, led_max);
- uint8_t huedelta = 12;
- hsv_t hsv = rgb_matrix_config.hsv;
- uint16_t time = scale16by8(g_rgb_timer, rgb_matrix_config.speed / 8);
- hsv.h = hsv.h + scale8(abs8(sin8(time) - 128) * 2, huedelta);
- rgb_t rgb = hsv_to_rgb(hsv);
- for (uint8_t i = led_min; i < led_max; i++) {
- RGB_MATRIX_TEST_LED_FLAGS();
- rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
- }
- return rgb_matrix_check_finished_leds(led_max);
+ return effect_runner_i(params, &HUE_BREATHING_math);
}
# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
-#endif // DISABLE_RGB_HUE_BREATHING
+#endif // ENABLE_RGB_MATRIX_HUE_BREATHING
diff --git a/quantum/rgb_matrix/animations/raindrops_anim.h b/quantum/rgb_matrix/animations/raindrops_anim.h
index a682156da2..d4f79adb56 100644
--- a/quantum/rgb_matrix/animations/raindrops_anim.h
+++ b/quantum/rgb_matrix/animations/raindrops_anim.h
@@ -2,35 +2,42 @@
RGB_MATRIX_EFFECT(RAINDROPS)
# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
-static void raindrops_set_color(int i, effect_params_t* params) {
+static void raindrops_set_color(uint8_t i, effect_params_t* params) {
if (!HAS_ANY_FLAGS(g_led_config.flags[i], params->flags)) return;
- hsv_t hsv = {0, rgb_matrix_config.hsv.s, rgb_matrix_config.hsv.v};
+ hsv_t hsv = rgb_matrix_config.hsv;
// Take the shortest path between hues
- int16_t deltaH = ((rgb_matrix_config.hsv.h + 180) % 360 - rgb_matrix_config.hsv.h) / 4;
+ int16_t deltaH = ((hsv.h + 180) % 360 - hsv.h) / 4;
if (deltaH > 127) {
deltaH -= 256;
} else if (deltaH < -127) {
deltaH += 256;
}
- hsv.h = rgb_matrix_config.hsv.h + (deltaH * (random8() & 0x03));
+ hsv.h += (deltaH * random8_max(3));
rgb_t rgb = rgb_matrix_hsv_to_rgb(hsv);
rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
}
bool RAINDROPS(effect_params_t* params) {
+ static uint16_t index = RGB_MATRIX_LED_COUNT + 1;
+
+ // Periodic trigger for LED change
+ if ((params->iter == 0) && (scale16by8(g_rgb_timer, qadd8(rgb_matrix_config.speed, 16)) % 10 == 0)) {
+ index = random8_max(RGB_MATRIX_LED_COUNT);
+ }
+
RGB_MATRIX_USE_LIMITS(led_min, led_max);
- if (!params->init) {
- // Change one LED every tick, make sure speed is not 0
- if (scale16by8(g_rgb_timer, qadd8(rgb_matrix_config.speed, 16)) % 10 == 0) {
- raindrops_set_color(random8_max(RGB_MATRIX_LED_COUNT), params);
- }
- } else {
- for (int i = led_min; i < led_max; i++) {
+ if (params->init) {
+ for (uint8_t i = led_min; i < led_max; i++) {
raindrops_set_color(i, params);
}
}
+ // Change LED once and set index out of range till next trigger
+ else if (led_min <= index && index < led_max) {
+ raindrops_set_color(index, params);
+ index = RGB_MATRIX_LED_COUNT + 1;
+ }
return rgb_matrix_check_finished_leds(led_max);
}
diff --git a/quantum/rgb_matrix/animations/starlight_anim.h b/quantum/rgb_matrix/animations/starlight_anim.h
index 742e843b57..c4f943c5ce 100644
--- a/quantum/rgb_matrix/animations/starlight_anim.h
+++ b/quantum/rgb_matrix/animations/starlight_anim.h
@@ -2,7 +2,9 @@
RGB_MATRIX_EFFECT(STARLIGHT)
# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
-void set_starlight_color(uint8_t i, effect_params_t* params) {
+static void set_starlight_color(uint8_t i, effect_params_t* params) {
+ if (!HAS_ANY_FLAGS(g_led_config.flags[i], params->flags)) return;
+
uint16_t time = scale16by8(g_rgb_timer, rgb_matrix_config.speed / 8);
hsv_t hsv = rgb_matrix_config.hsv;
hsv.v = scale8(abs8(sin8(time) - 128) * 2, hsv.v);
@@ -11,21 +13,26 @@ void set_starlight_color(uint8_t i, effect_params_t* params) {
}
bool STARLIGHT(effect_params_t* params) {
- if (!params->init) {
- if (scale16by8(g_rgb_timer, qadd8(rgb_matrix_config.speed, 5)) % 5 == 0) {
- uint8_t rand_led = random8_max(RGB_MATRIX_LED_COUNT);
- set_starlight_color(rand_led, params);
- }
- return false;
+ static uint16_t index = RGB_MATRIX_LED_COUNT + 1;
+
+ // Periodic trigger for LED change
+ if ((params->iter == 0) && (scale16by8(g_rgb_timer, qadd8(rgb_matrix_config.speed, 5)) % 5 == 0)) {
+ index = random8_max(RGB_MATRIX_LED_COUNT);
}
RGB_MATRIX_USE_LIMITS(led_min, led_max);
- for (uint8_t i = led_min; i < led_max; i++) {
- RGB_MATRIX_TEST_LED_FLAGS();
- set_starlight_color(i, params);
+ if (params->init) {
+ for (uint8_t i = led_min; i < led_max; i++) {
+ set_starlight_color(i, params);
+ }
+ }
+ // Change LED once and set index out of range till next trigger
+ else if (led_min <= index && index < led_max) {
+ set_starlight_color(index, params);
+ index = RGB_MATRIX_LED_COUNT + 1;
}
return rgb_matrix_check_finished_leds(led_max);
}
# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
-#endif // ENABLE_RGB_MATRIX_STARLIGHT \ No newline at end of file
+#endif // ENABLE_RGB_MATRIX_STARLIGHT
diff --git a/quantum/rgb_matrix/animations/starlight_dual_hue_anim.h b/quantum/rgb_matrix/animations/starlight_dual_hue_anim.h
index 50ce5d6ab4..276b8c3fdf 100644
--- a/quantum/rgb_matrix/animations/starlight_dual_hue_anim.h
+++ b/quantum/rgb_matrix/animations/starlight_dual_hue_anim.h
@@ -2,31 +2,38 @@
RGB_MATRIX_EFFECT(STARLIGHT_DUAL_HUE)
# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
-void set_starlight_dual_hue_color(uint8_t i, effect_params_t* params) {
+static void set_starlight_dual_hue_color(uint8_t i, effect_params_t* params) {
+ if (!HAS_ANY_FLAGS(g_led_config.flags[i], params->flags)) return;
+
uint16_t time = scale16by8(g_rgb_timer, rgb_matrix_config.speed / 8);
hsv_t hsv = rgb_matrix_config.hsv;
hsv.v = scale8(abs8(sin8(time) - 128) * 2, hsv.v);
- hsv.h = hsv.h + random8_max((30 + 1 - -30) + -30);
+ hsv.h = hsv.h + random8_max(31);
rgb_t 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) {
- uint8_t rand_led = random8_max(RGB_MATRIX_LED_COUNT);
- set_starlight_dual_hue_color(rand_led, params);
- }
- return false;
+ static uint16_t index = RGB_MATRIX_LED_COUNT + 1;
+
+ // Periodic trigger for LED change
+ if ((params->iter == 0) && (scale16by8(g_rgb_timer, qadd8(rgb_matrix_config.speed, 5)) % 5 == 0)) {
+ index = random8_max(RGB_MATRIX_LED_COUNT);
}
RGB_MATRIX_USE_LIMITS(led_min, led_max);
- for (uint8_t i = led_min; i < led_max; i++) {
- RGB_MATRIX_TEST_LED_FLAGS();
- set_starlight_dual_hue_color(i, params);
+ if (params->init) {
+ for (uint8_t i = led_min; i < led_max; i++) {
+ set_starlight_dual_hue_color(i, params);
+ }
+ }
+ // Change LED once and set index out of range till next trigger
+ else if (led_min <= index && index < led_max) {
+ set_starlight_dual_hue_color(index, params);
+ index = RGB_MATRIX_LED_COUNT + 1;
}
return rgb_matrix_check_finished_leds(led_max);
}
# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
-#endif // ENABLE_RGB_MATRIX_STARLIGHT_DUAL_HUE \ No newline at end of file
+#endif // ENABLE_RGB_MATRIX_STARLIGHT_DUAL_HUE
diff --git a/quantum/rgb_matrix/animations/starlight_dual_sat_anim.h b/quantum/rgb_matrix/animations/starlight_dual_sat_anim.h
index 6def4eea09..e063658982 100644
--- a/quantum/rgb_matrix/animations/starlight_dual_sat_anim.h
+++ b/quantum/rgb_matrix/animations/starlight_dual_sat_anim.h
@@ -2,31 +2,38 @@
RGB_MATRIX_EFFECT(STARLIGHT_DUAL_SAT)
# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
-void set_starlight_dual_sat_color(uint8_t i, effect_params_t* params) {
+static void set_starlight_dual_sat_color(uint8_t i, effect_params_t* params) {
+ if (!HAS_ANY_FLAGS(g_led_config.flags[i], params->flags)) return;
+
uint16_t time = scale16by8(g_rgb_timer, rgb_matrix_config.speed / 8);
hsv_t hsv = rgb_matrix_config.hsv;
hsv.v = scale8(abs8(sin8(time) - 128) * 2, hsv.v);
- hsv.s = hsv.s + random8_max((30 + 1 - -30) + -30);
+ hsv.s = hsv.s + random8_max(31);
rgb_t 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) {
- uint8_t rand_led = random8_max(RGB_MATRIX_LED_COUNT);
- set_starlight_dual_sat_color(rand_led, params);
- }
- return false;
+ static uint16_t index = RGB_MATRIX_LED_COUNT + 1;
+
+ // Periodic trigger for LED change
+ if ((params->iter == 0) && (scale16by8(g_rgb_timer, qadd8(rgb_matrix_config.speed, 5)) % 5 == 0)) {
+ index = random8_max(RGB_MATRIX_LED_COUNT);
}
RGB_MATRIX_USE_LIMITS(led_min, led_max);
- for (uint8_t i = led_min; i < led_max; i++) {
- RGB_MATRIX_TEST_LED_FLAGS();
- set_starlight_dual_sat_color(i, params);
+ if (params->init) {
+ for (uint8_t i = led_min; i < led_max; i++) {
+ set_starlight_dual_sat_color(i, params);
+ }
+ }
+ // Change LED once and set index out of range till next trigger
+ else if (led_min <= index && index < led_max) {
+ set_starlight_dual_sat_color(index, params);
+ index = RGB_MATRIX_LED_COUNT + 1;
}
return rgb_matrix_check_finished_leds(led_max);
}
# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
-#endif // ENABLE_RGB_MATRIX_STARLIGHT_DUAL_SAT \ No newline at end of file
+#endif // ENABLE_RGB_MATRIX_STARLIGHT_DUAL_SAT
diff --git a/quantum/send_string/send_string.c b/quantum/send_string/send_string.c
index 44c5ec5ab9..602f24dabe 100644
--- a/quantum/send_string/send_string.c
+++ b/quantum/send_string/send_string.c
@@ -150,48 +150,65 @@ void send_string(const char *string) {
send_string_with_delay(string, TAP_CODE_DELAY);
}
-void send_string_with_delay(const char *string, uint8_t interval) {
+void send_string_with_delay_impl(char (*getter)(void *), void *arg, uint8_t interval) {
while (1) {
- char ascii_code = *string;
+ char ascii_code = getter(arg);
if (!ascii_code) break;
if (ascii_code == SS_QMK_PREFIX) {
- ascii_code = *(++string);
+ ascii_code = getter(arg);
if (ascii_code == SS_TAP_CODE) {
// tap
- uint8_t keycode = *(++string);
+ uint8_t keycode = getter(arg);
tap_code(keycode);
} else if (ascii_code == SS_DOWN_CODE) {
// down
- uint8_t keycode = *(++string);
+ uint8_t keycode = getter(arg);
register_code(keycode);
} else if (ascii_code == SS_UP_CODE) {
// up
- uint8_t keycode = *(++string);
+ uint8_t keycode = getter(arg);
unregister_code(keycode);
} else if (ascii_code == SS_DELAY_CODE) {
// delay
- int ms = 0;
- uint8_t keycode = *(++string);
+ int ms = 0;
+ ascii_code = getter(arg);
- while (isdigit(keycode)) {
+ while (isdigit(ascii_code)) {
ms *= 10;
- ms += keycode - '0';
- keycode = *(++string);
+ ms += ascii_code - '0';
+ ascii_code = getter(arg);
}
wait_ms(ms);
}
wait_ms(interval);
+
+ // if we had a delay that terminated with a null, we're done
+ if (ascii_code == 0) break;
} else {
send_char_with_delay(ascii_code, interval);
}
-
- ++string;
}
}
+typedef struct send_string_memory_state_t {
+ const char *string;
+} send_string_memory_state_t;
+
+char send_string_get_next_ram(void *arg) {
+ send_string_memory_state_t *state = (send_string_memory_state_t *)arg;
+ char ret = *state->string;
+ state->string++;
+ return ret;
+}
+
+void send_string_with_delay(const char *string, uint8_t interval) {
+ send_string_memory_state_t state = {string};
+ send_string_with_delay_impl(send_string_get_next_ram, &state, interval);
+}
+
void send_char(char ascii_code) {
send_char_with_delay(ascii_code, TAP_CODE_DELAY);
}
@@ -297,42 +314,15 @@ void send_string_P(const char *string) {
send_string_with_delay_P(string, TAP_CODE_DELAY);
}
-void send_string_with_delay_P(const char *string, uint8_t interval) {
- while (1) {
- char ascii_code = pgm_read_byte(string);
- if (!ascii_code) break;
- if (ascii_code == SS_QMK_PREFIX) {
- ascii_code = pgm_read_byte(++string);
-
- if (ascii_code == SS_TAP_CODE) {
- // tap
- uint8_t keycode = pgm_read_byte(++string);
- tap_code(keycode);
- } else if (ascii_code == SS_DOWN_CODE) {
- // down
- uint8_t keycode = pgm_read_byte(++string);
- register_code(keycode);
- } else if (ascii_code == SS_UP_CODE) {
- // up
- uint8_t keycode = pgm_read_byte(++string);
- unregister_code(keycode);
- } else if (ascii_code == SS_DELAY_CODE) {
- // delay
- int ms = 0;
- uint8_t keycode = pgm_read_byte(++string);
-
- while (isdigit(keycode)) {
- ms *= 10;
- ms += keycode - '0';
- keycode = pgm_read_byte(++string);
- }
- wait_ms(ms);
- }
- } else {
- send_char_with_delay(ascii_code, interval);
- }
+char send_string_get_next_progmem(void *arg) {
+ send_string_memory_state_t *state = (send_string_memory_state_t *)arg;
+ char ret = pgm_read_byte(state->string);
+ state->string++;
+ return ret;
+}
- ++string;
- }
+void send_string_with_delay_P(const char *string, uint8_t interval) {
+ send_string_memory_state_t state = {string};
+ send_string_with_delay_impl(send_string_get_next_progmem, &state, interval);
}
#endif
diff --git a/quantum/send_string/send_string.h b/quantum/send_string/send_string.h
index f727ec507d..4f91252075 100644
--- a/quantum/send_string/send_string.h
+++ b/quantum/send_string/send_string.h
@@ -161,4 +161,12 @@ void send_string_with_delay_P(const char *string, uint8_t interval);
*/
#define SEND_STRING_DELAY(string, interval) send_string_with_delay_P(PSTR(string), interval)
+/**
+ * \brief Actual implementation function that iterates and sends the string returned by the getter function.
+ *
+ * The getter assumes that the next byte is available to be read, and returns it. `arg` is passed in and can be whatever
+ * makes most sense for the getter -- each invocation of `getter` must advance its position in the source.
+ */
+void send_string_with_delay_impl(char (*getter)(void *), void *arg, uint8_t interval);
+
/** \} */
diff --git a/quantum/sequencer/tests/rules.mk b/quantum/sequencer/tests/rules.mk
index 611459e060..74b680ae31 100644
--- a/quantum/sequencer/tests/rules.mk
+++ b/quantum/sequencer/tests/rules.mk
@@ -8,4 +8,5 @@ sequencer_SRC := \
$(QUANTUM_PATH)/sequencer/tests/midi_mock.c \
$(QUANTUM_PATH)/sequencer/tests/sequencer_tests.cpp \
$(QUANTUM_PATH)/sequencer/sequencer.c \
+ $(PLATFORM_PATH)/timer.c \
$(PLATFORM_PATH)/$(PLATFORM_KEY)/timer.c
diff --git a/readme.md b/readme.md
index 62aed12066..e5c0d41b7b 100644
--- a/readme.md
+++ b/readme.md
@@ -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_hold_configurations/chordal_hold/default/config.h b/tests/tap_hold_configurations/chordal_hold/default/config.h
new file mode 100644
index 0000000000..2ba155df73
--- /dev/null
+++ b/tests/tap_hold_configurations/chordal_hold/default/config.h
@@ -0,0 +1,21 @@
+/* Copyright 2022 Vladislav Kucheriavykh
+ * Copyright 2024 Google LLC
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#pragma once
+
+#include "test_common.h"
+#define CHORDAL_HOLD
diff --git a/keyboards/splitkb/aurora/corne/rules.mk b/tests/tap_hold_configurations/chordal_hold/default/test.mk
index 9b4b90e972..2b049cea3b 100644
--- a/keyboards/splitkb/aurora/corne/rules.mk
+++ b/tests/tap_hold_configurations/chordal_hold/default/test.mk
@@ -1,4 +1,5 @@
-# Copyright 2022 splitkb.com <[email protected]>
+# Copyright 2022 Vladislav Kucheriavykh
+# Copyright 2024 Google LLC
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -13,4 +14,4 @@
# 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_FOLDER = splitkb/aurora/corne/rev1
+INTROSPECTION_KEYMAP_C = test_keymap.c
diff --git a/tests/tap_hold_configurations/chordal_hold/default/test_keymap.c b/tests/tap_hold_configurations/chordal_hold/default/test_keymap.c
new file mode 100644
index 0000000000..8a6a2c59b0
--- /dev/null
+++ b/tests/tap_hold_configurations/chordal_hold/default/test_keymap.c
@@ -0,0 +1,22 @@
+// Copyright 2024 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.
+
+#include "quantum.h"
+
+const char chordal_hold_layout[MATRIX_ROWS][MATRIX_COLS] PROGMEM = {
+ {'L', 'L', 'L', 'L', 'L', 'R', 'R', 'R', 'R', 'R'},
+ {'L', 'L', 'L', 'L', 'L', 'R', 'R', 'R', 'R', 'R'},
+ {'*', 'L', 'L', 'L', 'L', 'R', 'R', 'R', 'R', 'R'},
+ {'L', 'L', 'L', 'L', 'L', 'R', 'R', 'R', 'R', 'R'},
+};
diff --git a/tests/tap_hold_configurations/chordal_hold/default/test_one_shot_keys.cpp b/tests/tap_hold_configurations/chordal_hold/default/test_one_shot_keys.cpp
new file mode 100644
index 0000000000..ac4edd08b2
--- /dev/null
+++ b/tests/tap_hold_configurations/chordal_hold/default/test_one_shot_keys.cpp
@@ -0,0 +1,168 @@
+/* Copyright 2021 Stefan Kerkmann
+ * Copyright 2024 Google LLC
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "action_util.h"
+#include "keyboard_report_util.hpp"
+#include "test_common.hpp"
+
+using testing::_;
+using testing::InSequence;
+
+class OneShot : public TestFixture {};
+class OneShotParametrizedTestFixture : public ::testing::WithParamInterface<std::pair<KeymapKey, KeymapKey>>, public OneShot {};
+
+TEST_P(OneShotParametrizedTestFixture, OSMWithAdditionalKeypress) {
+ TestDriver driver;
+ KeymapKey osm_key = GetParam().first;
+ KeymapKey regular_key = GetParam().second;
+
+ set_keymap({osm_key, regular_key});
+
+ // Press and release OSM.
+ EXPECT_NO_REPORT(driver);
+ tap_key(osm_key);
+ VERIFY_AND_CLEAR(driver);
+
+ // Press regular key.
+ EXPECT_REPORT(driver, (osm_key.report_code, regular_key.report_code));
+ regular_key.press();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // Release regular key.
+ EXPECT_EMPTY_REPORT(driver);
+ regular_key.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+}
+
+TEST_P(OneShotParametrizedTestFixture, OSMAsRegularModifierWithAdditionalKeypress) {
+ TestDriver driver;
+ KeymapKey osm_key = GetParam().first;
+ KeymapKey regular_key = GetParam().second;
+
+ set_keymap({osm_key, regular_key});
+
+ // Press OSM.
+ EXPECT_NO_REPORT(driver);
+ osm_key.press();
+ run_one_scan_loop();
+ // Press regular key.
+ regular_key.press();
+ run_one_scan_loop();
+ // Release regular key.
+ regular_key.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // Release OSM.
+ EXPECT_REPORT(driver, (regular_key.report_code, osm_key.report_code));
+ EXPECT_EMPTY_REPORT(driver);
+ osm_key.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+}
+
+// clang-format off
+
+INSTANTIATE_TEST_CASE_P(
+ OneShotModifierTests,
+ OneShotParametrizedTestFixture,
+ ::testing::Values(
+ // First is osm key, second is regular key.
+ std::make_pair(KeymapKey{0, 0, 0, OSM(MOD_LSFT), KC_LSFT}, KeymapKey{0, 1, 1, KC_A}),
+ std::make_pair(KeymapKey{0, 0, 0, OSM(MOD_LCTL), KC_LCTL}, KeymapKey{0, 1, 1, KC_A}),
+ std::make_pair(KeymapKey{0, 0, 0, OSM(MOD_LALT), KC_LALT}, KeymapKey{0, 1, 1, KC_A}),
+ std::make_pair(KeymapKey{0, 0, 0, OSM(MOD_LGUI), KC_LGUI}, KeymapKey{0, 1, 1, KC_A}),
+ std::make_pair(KeymapKey{0, 0, 0, OSM(MOD_RCTL), KC_RCTL}, KeymapKey{0, 1, 1, KC_A}),
+ std::make_pair(KeymapKey{0, 0, 0, OSM(MOD_RSFT), KC_RSFT}, KeymapKey{0, 1, 1, KC_A}),
+ std::make_pair(KeymapKey{0, 0, 0, OSM(MOD_RALT), KC_RALT}, KeymapKey{0, 1, 1, KC_A}),
+ std::make_pair(KeymapKey{0, 0, 0, OSM(MOD_RGUI), KC_RGUI}, KeymapKey{0, 1, 1, KC_A})
+ ));
+// clang-format on
+
+TEST_F(OneShot, OSLWithAdditionalKeypress) {
+ TestDriver driver;
+ InSequence s;
+ KeymapKey osl_key = KeymapKey{0, 0, 0, OSL(1)};
+ KeymapKey osl_key1 = KeymapKey{1, 0, 0, KC_X};
+ KeymapKey regular_key0 = KeymapKey{0, 1, 0, KC_Y};
+ KeymapKey regular_key1 = KeymapKey{1, 1, 0, KC_A};
+
+ set_keymap({osl_key, osl_key1, regular_key0, regular_key1});
+
+ // Press OSL key.
+ EXPECT_NO_REPORT(driver);
+ osl_key.press();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // Release OSL key.
+ EXPECT_NO_REPORT(driver);
+ osl_key.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // Press regular key.
+ EXPECT_REPORT(driver, (regular_key1.report_code));
+ EXPECT_EMPTY_REPORT(driver);
+ regular_key1.press();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // Release regular key.
+ EXPECT_NO_REPORT(driver);
+ regular_key1.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+}
+
+TEST_F(OneShot, OSLWithOsmAndAdditionalKeypress) {
+ TestDriver driver;
+ InSequence s;
+ KeymapKey osl_key = KeymapKey{0, 0, 0, OSL(1)};
+ KeymapKey osm_key = KeymapKey{1, 1, 0, OSM(MOD_LSFT), KC_LSFT};
+ KeymapKey regular_key = KeymapKey{1, 1, 1, KC_A};
+ KeymapKey blank_key = KeymapKey{1, 0, 0, KC_NO};
+
+ set_keymap({osl_key, osm_key, regular_key, blank_key});
+
+ // Press OSL key.
+ EXPECT_NO_REPORT(driver);
+ osl_key.press();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // Release OSL key.
+ EXPECT_NO_REPORT(driver);
+ osl_key.release();
+ run_one_scan_loop();
+ EXPECT_TRUE(layer_state_is(1));
+ VERIFY_AND_CLEAR(driver);
+
+ // Press and release OSM.
+ EXPECT_NO_REPORT(driver);
+ tap_key(osm_key);
+ EXPECT_TRUE(layer_state_is(1));
+ VERIFY_AND_CLEAR(driver);
+
+ // Tap regular key.
+ EXPECT_REPORT(driver, (osm_key.report_code, regular_key.report_code));
+ EXPECT_EMPTY_REPORT(driver);
+ tap_key(regular_key);
+ VERIFY_AND_CLEAR(driver);
+}
diff --git a/tests/tap_hold_configurations/chordal_hold/default/test_tap_hold.cpp b/tests/tap_hold_configurations/chordal_hold/default/test_tap_hold.cpp
new file mode 100644
index 0000000000..70949e218c
--- /dev/null
+++ b/tests/tap_hold_configurations/chordal_hold/default/test_tap_hold.cpp
@@ -0,0 +1,264 @@
+// Copyright 2024 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.
+
+#include "keyboard_report_util.hpp"
+#include "keycode.h"
+#include "test_common.hpp"
+#include "action_tapping.h"
+#include "test_fixture.hpp"
+#include "test_keymap_key.hpp"
+
+using testing::_;
+using testing::InSequence;
+
+class ChordalHoldDefault : public TestFixture {};
+
+TEST_F(ChordalHoldDefault, chord_nested_press_settled_as_tap) {
+ TestDriver driver;
+ InSequence s;
+ // Mod-tap key on the left hand.
+ auto mod_tap_key = KeymapKey(0, 1, 0, SFT_T(KC_P));
+ // Regular key on the right hand.
+ auto regular_key = KeymapKey(0, MATRIX_COLS - 1, 0, KC_A);
+
+ set_keymap({mod_tap_key, regular_key});
+
+ // Press mod-tap key.
+ EXPECT_NO_REPORT(driver);
+ mod_tap_key.press();
+ run_one_scan_loop();
+ // Tap regular key.
+ tap_key(regular_key);
+ VERIFY_AND_CLEAR(driver);
+
+ // Release mod-tap key.
+ EXPECT_REPORT(driver, (KC_P));
+ EXPECT_REPORT(driver, (KC_P, KC_A));
+ EXPECT_REPORT(driver, (KC_P));
+ EXPECT_EMPTY_REPORT(driver);
+ mod_tap_key.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+}
+
+TEST_F(ChordalHoldDefault, chord_rolled_press_settled_as_tap) {
+ TestDriver driver;
+ InSequence s;
+ // Mod-tap key on the left hand.
+ auto mod_tap_key = KeymapKey(0, 1, 0, SFT_T(KC_P));
+ // Regular key on the right hand.
+ auto regular_key = KeymapKey(0, MATRIX_COLS - 1, 0, KC_A);
+
+ set_keymap({mod_tap_key, regular_key});
+
+ // Press mod-tap key and regular key.
+ EXPECT_NO_REPORT(driver);
+ mod_tap_key.press();
+ run_one_scan_loop();
+ regular_key.press();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // Release mod-tap key.
+ EXPECT_REPORT(driver, (KC_P));
+ EXPECT_REPORT(driver, (KC_P, KC_A));
+ EXPECT_REPORT(driver, (KC_A));
+ mod_tap_key.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // Release regular key.
+ EXPECT_EMPTY_REPORT(driver);
+ regular_key.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+}
+
+TEST_F(ChordalHoldDefault, non_chord_with_mod_tap_settled_as_tap) {
+ TestDriver driver;
+ InSequence s;
+ // Mod-tap key and regular key both on the left hand.
+ auto mod_tap_key = KeymapKey(0, 1, 0, SFT_T(KC_P));
+ auto regular_key = KeymapKey(0, 2, 0, KC_A);
+
+ set_keymap({mod_tap_key, regular_key});
+
+ // Press mod-tap-hold key.
+ EXPECT_NO_REPORT(driver);
+ mod_tap_key.press();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // Press regular key.
+ EXPECT_REPORT(driver, (KC_P));
+ EXPECT_REPORT(driver, (KC_P, KC_A));
+ regular_key.press();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // Release regular key.
+ EXPECT_REPORT(driver, (KC_P));
+ regular_key.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // Release mod-tap-hold key.
+ EXPECT_EMPTY_REPORT(driver);
+ mod_tap_key.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+}
+
+TEST_F(ChordalHoldDefault, tap_mod_tap_key) {
+ TestDriver driver;
+ InSequence s;
+ auto mod_tap_key = KeymapKey(0, 1, 0, SFT_T(KC_P));
+
+ set_keymap({mod_tap_key});
+
+ EXPECT_NO_REPORT(driver);
+ mod_tap_key.press();
+ idle_for(TAPPING_TERM - 1);
+ VERIFY_AND_CLEAR(driver);
+
+ EXPECT_REPORT(driver, (KC_P));
+ EXPECT_EMPTY_REPORT(driver);
+ mod_tap_key.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+}
+
+TEST_F(ChordalHoldDefault, hold_mod_tap_key) {
+ TestDriver driver;
+ InSequence s;
+ auto mod_tap_key = KeymapKey(0, 1, 0, SFT_T(KC_P));
+
+ set_keymap({mod_tap_key});
+
+ EXPECT_REPORT(driver, (KC_LEFT_SHIFT));
+ mod_tap_key.press();
+ idle_for(TAPPING_TERM + 1);
+ VERIFY_AND_CLEAR(driver);
+
+ EXPECT_EMPTY_REPORT(driver);
+ mod_tap_key.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+}
+
+TEST_F(ChordalHoldDefault, two_mod_taps_same_hand_hold_til_timeout) {
+ TestDriver driver;
+ InSequence s;
+ auto mod_tap_key1 = KeymapKey(0, MATRIX_COLS - 2, 0, RCTL_T(KC_A));
+ auto mod_tap_key2 = KeymapKey(0, MATRIX_COLS - 1, 0, RSFT_T(KC_B));
+
+ set_keymap({mod_tap_key1, mod_tap_key2});
+
+ // Press mod-tap keys.
+ EXPECT_NO_REPORT(driver);
+ mod_tap_key1.press();
+ run_one_scan_loop();
+ mod_tap_key2.press();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // Continue holding til the tapping term.
+ EXPECT_REPORT(driver, (KC_RIGHT_CTRL));
+ EXPECT_REPORT(driver, (KC_RIGHT_CTRL, KC_RIGHT_SHIFT));
+ idle_for(TAPPING_TERM);
+ VERIFY_AND_CLEAR(driver);
+
+ // Release mod-tap keys.
+ EXPECT_REPORT(driver, (KC_RIGHT_SHIFT));
+ mod_tap_key1.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ EXPECT_EMPTY_REPORT(driver);
+ mod_tap_key2.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+}
+
+TEST_F(ChordalHoldDefault, three_mod_taps_same_hand_streak_roll) {
+ TestDriver driver;
+ InSequence s;
+ auto mod_tap_key1 = KeymapKey(0, 1, 0, SFT_T(KC_A));
+ auto mod_tap_key2 = KeymapKey(0, 2, 0, CTL_T(KC_B));
+ auto mod_tap_key3 = KeymapKey(0, 3, 0, RSFT_T(KC_C));
+
+ set_keymap({mod_tap_key1, mod_tap_key2, mod_tap_key3});
+
+ // Press mod-tap keys.
+ EXPECT_NO_REPORT(driver);
+ mod_tap_key1.press();
+ run_one_scan_loop();
+ mod_tap_key2.press();
+ run_one_scan_loop();
+ mod_tap_key3.press();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // Release keys 1, 2, 3.
+ //
+ // NOTE: The correct order of events should be
+ // EXPECT_REPORT(driver, (KC_A, KC_B, KC_C));
+ // EXPECT_REPORT(driver, (KC_B, KC_C));
+ // EXPECT_REPORT(driver, (KC_C));
+ // EXPECT_EMPTY_REPORT(driver);
+ //
+ // However, due to a workaround for https://github.com/tmk/tmk_keyboard/issues/60,
+ // the events are processed out of order, with the first two keys released
+ // before pressing KC_C.
+ EXPECT_REPORT(driver, (KC_A));
+ EXPECT_REPORT(driver, (KC_A, KC_B));
+ EXPECT_REPORT(driver, (KC_B));
+ EXPECT_EMPTY_REPORT(driver);
+ EXPECT_REPORT(driver, (KC_C));
+ EXPECT_EMPTY_REPORT(driver);
+ mod_tap_key1.release();
+ run_one_scan_loop();
+ mod_tap_key2.release();
+ run_one_scan_loop();
+ mod_tap_key3.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+}
+
+TEST_F(ChordalHoldDefault, tap_regular_key_while_layer_tap_key_is_held) {
+ TestDriver driver;
+ InSequence s;
+ auto layer_tap_hold_key = KeymapKey(0, 1, 0, LT(1, KC_P));
+ auto regular_key = KeymapKey(0, MATRIX_COLS - 1, 0, KC_A);
+ auto layer_key = KeymapKey(1, MATRIX_COLS - 1, 0, KC_B);
+
+ set_keymap({layer_tap_hold_key, regular_key, layer_key});
+
+ EXPECT_NO_REPORT(driver);
+ layer_tap_hold_key.press(); // Press layer-tap-hold key.
+ run_one_scan_loop();
+ regular_key.press(); // Press regular key.
+ run_one_scan_loop();
+ regular_key.release(); // Release regular key.
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ EXPECT_REPORT(driver, (KC_P));
+ EXPECT_REPORT(driver, (KC_P, KC_A));
+ EXPECT_REPORT(driver, (KC_P));
+ EXPECT_EMPTY_REPORT(driver);
+ layer_tap_hold_key.release(); // Release layer-tap-hold key.
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+}
diff --git a/tests/tap_hold_configurations/chordal_hold/hold_on_other_key_press/config.h b/tests/tap_hold_configurations/chordal_hold/hold_on_other_key_press/config.h
new file mode 100644
index 0000000000..87094b2fac
--- /dev/null
+++ b/tests/tap_hold_configurations/chordal_hold/hold_on_other_key_press/config.h
@@ -0,0 +1,22 @@
+/* Copyright 2022 Vladislav Kucheriavykh
+ * Copyright 2024 Google LLC
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#pragma once
+
+#include "test_common.h"
+#define CHORDAL_HOLD
+#define HOLD_ON_OTHER_KEY_PRESS
diff --git a/keyboards/splitkb/aurora/lily58/rules.mk b/tests/tap_hold_configurations/chordal_hold/hold_on_other_key_press/test.mk
index 1f5b922836..2b049cea3b 100644
--- a/keyboards/splitkb/aurora/lily58/rules.mk
+++ b/tests/tap_hold_configurations/chordal_hold/hold_on_other_key_press/test.mk
@@ -1,4 +1,5 @@
-# Copyright 2022 splitkb.com <[email protected]>
+# Copyright 2022 Vladislav Kucheriavykh
+# Copyright 2024 Google LLC
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -13,4 +14,4 @@
# 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_FOLDER = splitkb/aurora/lily58/rev1
+INTROSPECTION_KEYMAP_C = test_keymap.c
diff --git a/tests/tap_hold_configurations/chordal_hold/hold_on_other_key_press/test_keymap.c b/tests/tap_hold_configurations/chordal_hold/hold_on_other_key_press/test_keymap.c
new file mode 100644
index 0000000000..8a6a2c59b0
--- /dev/null
+++ b/tests/tap_hold_configurations/chordal_hold/hold_on_other_key_press/test_keymap.c
@@ -0,0 +1,22 @@
+// Copyright 2024 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.
+
+#include "quantum.h"
+
+const char chordal_hold_layout[MATRIX_ROWS][MATRIX_COLS] PROGMEM = {
+ {'L', 'L', 'L', 'L', 'L', 'R', 'R', 'R', 'R', 'R'},
+ {'L', 'L', 'L', 'L', 'L', 'R', 'R', 'R', 'R', 'R'},
+ {'*', 'L', 'L', 'L', 'L', 'R', 'R', 'R', 'R', 'R'},
+ {'L', 'L', 'L', 'L', 'L', 'R', 'R', 'R', 'R', 'R'},
+};
diff --git a/tests/tap_hold_configurations/chordal_hold/hold_on_other_key_press/test_tap_hold.cpp b/tests/tap_hold_configurations/chordal_hold/hold_on_other_key_press/test_tap_hold.cpp
new file mode 100644
index 0000000000..7691f226af
--- /dev/null
+++ b/tests/tap_hold_configurations/chordal_hold/hold_on_other_key_press/test_tap_hold.cpp
@@ -0,0 +1,850 @@
+// Copyright 2024-2025 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.
+
+#include "keyboard_report_util.hpp"
+#include "keycode.h"
+#include "test_common.hpp"
+#include "action_tapping.h"
+#include "test_fixture.hpp"
+#include "test_keymap_key.hpp"
+
+using testing::_;
+using testing::InSequence;
+
+class ChordalHoldHoldOnOtherKeyPress : public TestFixture {};
+
+TEST_F(ChordalHoldHoldOnOtherKeyPress, chord_with_mod_tap_settled_as_hold) {
+ TestDriver driver;
+ InSequence s;
+ // Mod-tap key on the left hand.
+ auto mod_tap_key = KeymapKey(0, 1, 0, SFT_T(KC_P));
+ // Regular key on the right hand.
+ auto regular_key = KeymapKey(0, MATRIX_COLS - 1, 0, KC_A);
+
+ set_keymap({mod_tap_key, regular_key});
+
+ // Press mod-tap-hold key.
+ EXPECT_NO_REPORT(driver);
+ mod_tap_key.press();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // Press regular key.
+ EXPECT_REPORT(driver, (KC_LEFT_SHIFT));
+ EXPECT_REPORT(driver, (KC_LEFT_SHIFT, KC_A));
+ regular_key.press();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // Release regular key.
+ EXPECT_REPORT(driver, (KC_LEFT_SHIFT));
+ regular_key.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // Release mod-tap-hold key.
+ EXPECT_EMPTY_REPORT(driver);
+ mod_tap_key.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+}
+
+TEST_F(ChordalHoldHoldOnOtherKeyPress, chord_nested_press_settled_as_hold) {
+ TestDriver driver;
+ InSequence s;
+ // Mod-tap key on the left hand.
+ auto mod_tap_key = KeymapKey(0, 1, 0, SFT_T(KC_P));
+ // Regular key on the right hand.
+ auto regular_key = KeymapKey(0, MATRIX_COLS - 1, 0, KC_A);
+
+ set_keymap({mod_tap_key, regular_key});
+
+ // Press mod-tap-hold key.
+ EXPECT_NO_REPORT(driver);
+ mod_tap_key.press();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // Tap regular key.
+ EXPECT_REPORT(driver, (KC_LEFT_SHIFT));
+ EXPECT_REPORT(driver, (KC_LEFT_SHIFT, KC_A));
+ EXPECT_REPORT(driver, (KC_LEFT_SHIFT));
+ tap_key(regular_key);
+ VERIFY_AND_CLEAR(driver);
+
+ // Release mod-tap-hold key.
+ EXPECT_EMPTY_REPORT(driver);
+ mod_tap_key.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+}
+
+TEST_F(ChordalHoldHoldOnOtherKeyPress, chord_rolled_press_settled_as_hold) {
+ TestDriver driver;
+ InSequence s;
+ // Mod-tap key on the left hand.
+ auto mod_tap_key = KeymapKey(0, 1, 0, SFT_T(KC_P));
+ // Regular key on the right hand.
+ auto regular_key = KeymapKey(0, MATRIX_COLS - 1, 0, KC_A);
+
+ set_keymap({mod_tap_key, regular_key});
+
+ // Press mod-tap key.
+ EXPECT_NO_REPORT(driver);
+ mod_tap_key.press();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // Press regular key.
+ EXPECT_REPORT(driver, (KC_LEFT_SHIFT));
+ EXPECT_REPORT(driver, (KC_LEFT_SHIFT, KC_A));
+ regular_key.press();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // Release mod-tap key.
+ EXPECT_REPORT(driver, (KC_A));
+ mod_tap_key.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // Release regular key.
+ EXPECT_EMPTY_REPORT(driver);
+ regular_key.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+}
+
+TEST_F(ChordalHoldHoldOnOtherKeyPress, non_chord_with_mod_tap_settled_as_tap) {
+ TestDriver driver;
+ InSequence s;
+ // Mod-tap key and regular key both on the left hand.
+ auto mod_tap_key = KeymapKey(0, 1, 0, SFT_T(KC_P));
+ auto regular_key = KeymapKey(0, 2, 0, KC_A);
+
+ set_keymap({mod_tap_key, regular_key});
+
+ // Press mod-tap-hold key.
+ EXPECT_NO_REPORT(driver);
+ mod_tap_key.press();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // Press regular key.
+ EXPECT_REPORT(driver, (KC_P));
+ EXPECT_REPORT(driver, (KC_P, KC_A));
+ regular_key.press();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // Release regular key.
+ EXPECT_REPORT(driver, (KC_P));
+ regular_key.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // Release mod-tap-hold key.
+ EXPECT_EMPTY_REPORT(driver);
+ mod_tap_key.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+}
+
+TEST_F(ChordalHoldHoldOnOtherKeyPress, tap_mod_tap_key) {
+ TestDriver driver;
+ InSequence s;
+ auto mod_tap_key = KeymapKey(0, 1, 0, SFT_T(KC_P));
+
+ set_keymap({mod_tap_key});
+
+ EXPECT_NO_REPORT(driver);
+ mod_tap_key.press();
+ idle_for(TAPPING_TERM - 1);
+ VERIFY_AND_CLEAR(driver);
+
+ EXPECT_REPORT(driver, (KC_P));
+ EXPECT_EMPTY_REPORT(driver);
+ mod_tap_key.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+}
+
+TEST_F(ChordalHoldHoldOnOtherKeyPress, hold_mod_tap_key) {
+ TestDriver driver;
+ InSequence s;
+ auto mod_tap_key = KeymapKey(0, 1, 0, SFT_T(KC_P));
+
+ set_keymap({mod_tap_key});
+
+ EXPECT_REPORT(driver, (KC_LEFT_SHIFT));
+ mod_tap_key.press();
+ idle_for(TAPPING_TERM + 1);
+ VERIFY_AND_CLEAR(driver);
+
+ EXPECT_EMPTY_REPORT(driver);
+ mod_tap_key.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+}
+
+TEST_F(ChordalHoldHoldOnOtherKeyPress, two_mod_taps_same_hand_hold_til_timeout) {
+ TestDriver driver;
+ InSequence s;
+ auto mod_tap_key1 = KeymapKey(0, MATRIX_COLS - 2, 0, RCTL_T(KC_A));
+ auto mod_tap_key2 = KeymapKey(0, MATRIX_COLS - 1, 0, RSFT_T(KC_B));
+
+ set_keymap({mod_tap_key1, mod_tap_key2});
+
+ // Press mod-tap keys.
+ EXPECT_NO_REPORT(driver);
+ mod_tap_key1.press();
+ run_one_scan_loop();
+ mod_tap_key2.press();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // Continue holding til the tapping term.
+ EXPECT_REPORT(driver, (KC_RIGHT_CTRL));
+ EXPECT_REPORT(driver, (KC_RIGHT_CTRL, KC_RIGHT_SHIFT));
+ idle_for(TAPPING_TERM);
+ VERIFY_AND_CLEAR(driver);
+
+ // Release mod-tap keys.
+ EXPECT_REPORT(driver, (KC_RIGHT_SHIFT));
+ mod_tap_key1.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ EXPECT_EMPTY_REPORT(driver);
+ mod_tap_key2.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+}
+
+TEST_F(ChordalHoldHoldOnOtherKeyPress, two_mod_taps_nested_press_opposite_hands) {
+ TestDriver driver;
+ InSequence s;
+ auto mod_tap_key1 = KeymapKey(0, 1, 0, SFT_T(KC_A));
+ auto mod_tap_key2 = KeymapKey(0, MATRIX_COLS - 1, 0, RSFT_T(KC_B));
+
+ set_keymap({mod_tap_key1, mod_tap_key2});
+
+ // Press first mod-tap key.
+ EXPECT_NO_REPORT(driver);
+ mod_tap_key1.press();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // Press second mod-tap key.
+ EXPECT_REPORT(driver, (KC_LEFT_SHIFT));
+ mod_tap_key2.press();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // Release second mod-tap key.
+ EXPECT_REPORT(driver, (KC_LEFT_SHIFT, KC_B));
+ EXPECT_REPORT(driver, (KC_LEFT_SHIFT));
+ mod_tap_key2.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // Release first mod-tap key.
+ EXPECT_EMPTY_REPORT(driver);
+ mod_tap_key1.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+}
+
+TEST_F(ChordalHoldHoldOnOtherKeyPress, two_mod_taps_nested_press_same_hand) {
+ TestDriver driver;
+ InSequence s;
+ auto mod_tap_key1 = KeymapKey(0, 1, 0, SFT_T(KC_A));
+ auto mod_tap_key2 = KeymapKey(0, 2, 0, RSFT_T(KC_B));
+
+ set_keymap({mod_tap_key1, mod_tap_key2});
+
+ // Press mod-tap keys.
+ EXPECT_NO_REPORT(driver);
+ mod_tap_key1.press();
+ run_one_scan_loop();
+ mod_tap_key2.press();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // Release mod-tap keys.
+ EXPECT_REPORT(driver, (KC_A));
+ EXPECT_REPORT(driver, (KC_A, KC_B));
+ EXPECT_REPORT(driver, (KC_A));
+ EXPECT_EMPTY_REPORT(driver);
+ mod_tap_key2.release();
+ run_one_scan_loop();
+ mod_tap_key1.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+}
+
+TEST_F(ChordalHoldHoldOnOtherKeyPress, three_mod_taps_same_hand_streak_roll) {
+ TestDriver driver;
+ InSequence s;
+ auto mod_tap_key1 = KeymapKey(0, 1, 0, SFT_T(KC_A));
+ auto mod_tap_key2 = KeymapKey(0, 2, 0, CTL_T(KC_B));
+ auto mod_tap_key3 = KeymapKey(0, 3, 0, RSFT_T(KC_C));
+
+ set_keymap({mod_tap_key1, mod_tap_key2, mod_tap_key3});
+
+ // Press mod-tap keys.
+ EXPECT_NO_REPORT(driver);
+ mod_tap_key1.press();
+ run_one_scan_loop();
+ mod_tap_key2.press();
+ run_one_scan_loop();
+ mod_tap_key3.press();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // Release keys 1, 2, 3.
+ //
+ // NOTE: The correct order of events should be
+ // EXPECT_REPORT(driver, (KC_A));
+ // EXPECT_REPORT(driver, (KC_A, KC_B));
+ // EXPECT_REPORT(driver, (KC_A, KC_B, KC_C));
+ // EXPECT_REPORT(driver, (KC_B, KC_C));
+ // EXPECT_REPORT(driver, (KC_C));
+ // EXPECT_EMPTY_REPORT(driver);
+ //
+ // However, due to a workaround for https://github.com/tmk/tmk_keyboard/issues/60,
+ // the events are processed out of order, with the first two keys released
+ // before pressing KC_C.
+ EXPECT_REPORT(driver, (KC_A));
+ EXPECT_REPORT(driver, (KC_A, KC_B));
+ EXPECT_REPORT(driver, (KC_B));
+ EXPECT_EMPTY_REPORT(driver);
+ EXPECT_REPORT(driver, (KC_C));
+ EXPECT_EMPTY_REPORT(driver);
+ mod_tap_key1.release();
+ run_one_scan_loop();
+ mod_tap_key2.release();
+ run_one_scan_loop();
+ mod_tap_key3.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ EXPECT_NO_REPORT(driver);
+ VERIFY_AND_CLEAR(driver);
+}
+
+TEST_F(ChordalHoldHoldOnOtherKeyPress, three_mod_taps_same_hand_streak_orders) {
+ TestDriver driver;
+ InSequence s;
+ auto mod_tap_key1 = KeymapKey(0, 1, 0, SFT_T(KC_A));
+ auto mod_tap_key2 = KeymapKey(0, 2, 0, CTL_T(KC_B));
+ auto mod_tap_key3 = KeymapKey(0, 3, 0, RSFT_T(KC_C));
+
+ set_keymap({mod_tap_key1, mod_tap_key2, mod_tap_key3});
+
+ EXPECT_REPORT(driver, (KC_A));
+ EXPECT_REPORT(driver, (KC_A, KC_B));
+ EXPECT_REPORT(driver, (KC_A, KC_B, KC_C));
+ EXPECT_REPORT(driver, (KC_A, KC_B));
+ EXPECT_REPORT(driver, (KC_A));
+ EXPECT_EMPTY_REPORT(driver);
+ // Press mod-tap keys.
+ mod_tap_key1.press();
+ run_one_scan_loop();
+ mod_tap_key2.press();
+ run_one_scan_loop();
+ mod_tap_key3.press();
+ run_one_scan_loop();
+ // Release keys 3, 2, 1.
+ mod_tap_key3.release();
+ run_one_scan_loop();
+ mod_tap_key2.release();
+ run_one_scan_loop();
+ mod_tap_key1.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ EXPECT_REPORT(driver, (KC_A));
+ EXPECT_REPORT(driver, (KC_A, KC_B));
+ EXPECT_REPORT(driver, (KC_A, KC_B, KC_C));
+ EXPECT_REPORT(driver, (KC_A, KC_B));
+ EXPECT_REPORT(driver, (KC_B));
+ EXPECT_EMPTY_REPORT(driver);
+ idle_for(TAPPING_TERM);
+ // Press mod-tap keys.
+ mod_tap_key1.press();
+ run_one_scan_loop();
+ mod_tap_key2.press();
+ run_one_scan_loop();
+ mod_tap_key3.press();
+ run_one_scan_loop();
+ // Release keys 3, 1, 2.
+ mod_tap_key3.release();
+ run_one_scan_loop();
+ mod_tap_key1.release();
+ run_one_scan_loop();
+ mod_tap_key2.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // NOTE: The correct order of events should be
+ // EXPECT_REPORT(driver, (KC_A));
+ // EXPECT_REPORT(driver, (KC_A, KC_B));
+ // EXPECT_REPORT(driver, (KC_A, KC_B, KC_C));
+ // EXPECT_REPORT(driver, (KC_A, KC_C));
+ // EXPECT_REPORT(driver, (KC_A));
+ // EXPECT_EMPTY_REPORT(driver);
+ //
+ // However, due to a workaround for https://github.com/tmk/tmk_keyboard/issues/60,
+ // the events are processed out of order, with the first two keys released
+ // before pressing KC_C.
+ EXPECT_REPORT(driver, (KC_A));
+ EXPECT_REPORT(driver, (KC_A, KC_B));
+ EXPECT_REPORT(driver, (KC_A));
+ EXPECT_REPORT(driver, (KC_A, KC_C));
+ EXPECT_REPORT(driver, (KC_A));
+ EXPECT_EMPTY_REPORT(driver);
+ idle_for(TAPPING_TERM);
+ // Press mod-tap keys.
+ mod_tap_key1.press();
+ run_one_scan_loop();
+ mod_tap_key2.press();
+ run_one_scan_loop();
+ mod_tap_key3.press();
+ run_one_scan_loop();
+ // Release keys 2, 3, 1.
+ mod_tap_key2.release();
+ run_one_scan_loop();
+ mod_tap_key3.release();
+ run_one_scan_loop();
+ mod_tap_key1.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+}
+
+TEST_F(ChordalHoldHoldOnOtherKeyPress, three_mod_taps_two_left_one_right) {
+ TestDriver driver;
+ InSequence s;
+ auto mod_tap_key1 = KeymapKey(0, 1, 0, SFT_T(KC_A));
+ auto mod_tap_key2 = KeymapKey(0, 2, 0, CTL_T(KC_B));
+ auto mod_tap_key3 = KeymapKey(0, MATRIX_COLS - 1, 0, RSFT_T(KC_C));
+
+ set_keymap({mod_tap_key1, mod_tap_key2, mod_tap_key3});
+
+ // Press mod-tap keys.
+ EXPECT_NO_REPORT(driver);
+ mod_tap_key1.press();
+ run_one_scan_loop();
+ mod_tap_key2.press();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ EXPECT_REPORT(driver, (KC_LEFT_SHIFT));
+ EXPECT_REPORT(driver, (KC_LEFT_SHIFT, KC_LEFT_CTRL));
+ mod_tap_key3.press();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // Release key 3.
+ EXPECT_REPORT(driver, (KC_LEFT_SHIFT, KC_LEFT_CTRL, KC_C));
+ EXPECT_REPORT(driver, (KC_LEFT_SHIFT, KC_LEFT_CTRL));
+ mod_tap_key3.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // Release key 2, then key 1.
+ EXPECT_REPORT(driver, (KC_LEFT_SHIFT));
+ EXPECT_EMPTY_REPORT(driver);
+ mod_tap_key2.release();
+ run_one_scan_loop();
+ mod_tap_key1.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // Press mod-tap keys.
+ EXPECT_NO_REPORT(driver);
+ mod_tap_key1.press();
+ run_one_scan_loop();
+ mod_tap_key2.press();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ EXPECT_REPORT(driver, (KC_LEFT_SHIFT));
+ EXPECT_REPORT(driver, (KC_LEFT_SHIFT, KC_LEFT_CTRL));
+ mod_tap_key3.press();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // Release key 3.
+ EXPECT_REPORT(driver, (KC_LEFT_SHIFT, KC_LEFT_CTRL, KC_C));
+ EXPECT_REPORT(driver, (KC_LEFT_SHIFT, KC_LEFT_CTRL));
+ mod_tap_key3.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // Release key 1, then key 2.
+ EXPECT_REPORT(driver, (KC_LEFT_CTRL));
+ EXPECT_EMPTY_REPORT(driver);
+ mod_tap_key1.release();
+ run_one_scan_loop();
+ mod_tap_key2.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+}
+
+TEST_F(ChordalHoldHoldOnOtherKeyPress, three_mod_taps_one_held_two_tapped) {
+ TestDriver driver;
+ InSequence s;
+ auto mod_tap_key1 = KeymapKey(0, 1, 0, SFT_T(KC_A));
+ auto mod_tap_key2 = KeymapKey(0, MATRIX_COLS - 2, 0, CTL_T(KC_B));
+ auto mod_tap_key3 = KeymapKey(0, MATRIX_COLS - 1, 0, RSFT_T(KC_C));
+
+ set_keymap({mod_tap_key1, mod_tap_key2, mod_tap_key3});
+
+ // Press mod-tap keys.
+ EXPECT_NO_REPORT(driver);
+ mod_tap_key1.press();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ EXPECT_REPORT(driver, (KC_LEFT_SHIFT));
+ mod_tap_key2.press();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // Release keys 3, 2, 1.
+ EXPECT_REPORT(driver, (KC_LEFT_SHIFT, KC_B));
+ EXPECT_REPORT(driver, (KC_LEFT_SHIFT, KC_B, KC_C));
+ EXPECT_REPORT(driver, (KC_LEFT_SHIFT, KC_B));
+ EXPECT_REPORT(driver, (KC_LEFT_SHIFT));
+ EXPECT_EMPTY_REPORT(driver);
+ mod_tap_key3.press();
+ run_one_scan_loop();
+ mod_tap_key3.release();
+ run_one_scan_loop();
+ mod_tap_key2.release();
+ run_one_scan_loop();
+ mod_tap_key1.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // Press mod-tap keys.
+ EXPECT_NO_REPORT(driver);
+ idle_for(TAPPING_TERM);
+ mod_tap_key1.press();
+ run_one_scan_loop();
+
+ EXPECT_REPORT(driver, (KC_LEFT_SHIFT));
+ mod_tap_key2.press();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // Release keys 3, 1, 2.
+ EXPECT_REPORT(driver, (KC_LEFT_SHIFT, KC_B));
+ EXPECT_REPORT(driver, (KC_LEFT_SHIFT, KC_B, KC_C));
+ EXPECT_REPORT(driver, (KC_LEFT_SHIFT, KC_B));
+ EXPECT_REPORT(driver, (KC_B));
+ EXPECT_EMPTY_REPORT(driver);
+ mod_tap_key3.press();
+ run_one_scan_loop();
+ mod_tap_key3.release();
+ run_one_scan_loop();
+ mod_tap_key1.release();
+ run_one_scan_loop();
+ mod_tap_key2.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+}
+
+TEST_F(ChordalHoldHoldOnOtherKeyPress, tap_regular_key_while_layer_tap_key_is_held) {
+ TestDriver driver;
+ InSequence s;
+ auto layer_tap_hold_key = KeymapKey(0, 1, 0, LT(1, KC_P));
+ auto regular_key = KeymapKey(0, MATRIX_COLS - 1, 0, KC_A);
+ auto no_key = KeymapKey(1, 1, 0, XXXXXXX);
+ auto layer_key = KeymapKey(1, MATRIX_COLS - 1, 0, KC_B);
+
+ set_keymap({layer_tap_hold_key, regular_key, no_key, layer_key});
+
+ // Press layer-tap-hold key.
+ EXPECT_NO_REPORT(driver);
+ layer_tap_hold_key.press();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // Press regular key.
+ EXPECT_REPORT(driver, (KC_B));
+ regular_key.press();
+ run_one_scan_loop();
+ EXPECT_EQ(layer_state, 2);
+ VERIFY_AND_CLEAR(driver);
+
+ // Release regular key.
+ EXPECT_EMPTY_REPORT(driver);
+ regular_key.release();
+ run_one_scan_loop();
+ EXPECT_EQ(layer_state, 2);
+ VERIFY_AND_CLEAR(driver);
+
+ // Release layer-tap-hold key.
+ EXPECT_NO_REPORT(driver);
+ layer_tap_hold_key.release();
+ run_one_scan_loop();
+ EXPECT_EQ(layer_state, 0);
+ VERIFY_AND_CLEAR(driver);
+}
+
+TEST_F(ChordalHoldHoldOnOtherKeyPress, long_distinct_taps_of_layer_tap_key_and_regular_key) {
+ TestDriver driver;
+ InSequence s;
+ auto layer_tap_hold_key = KeymapKey(0, 1, 0, LT(1, KC_P));
+ auto regular_key = KeymapKey(0, MATRIX_COLS - 1, 0, KC_A);
+ auto layer_key = KeymapKey(0, MATRIX_COLS - 1, 0, KC_B);
+
+ set_keymap({layer_tap_hold_key, regular_key});
+
+ // Press layer-tap-hold key.
+ EXPECT_NO_REPORT(driver);
+ layer_tap_hold_key.press();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // Idle for tapping term of layer tap hold key.
+ EXPECT_NO_REPORT(driver);
+ idle_for(TAPPING_TERM + 1);
+ EXPECT_EQ(layer_state, 2);
+ VERIFY_AND_CLEAR(driver);
+
+ // Release layer-tap-hold key.
+ EXPECT_NO_REPORT(driver);
+ layer_tap_hold_key.release();
+ run_one_scan_loop();
+ EXPECT_EQ(layer_state, 0);
+ VERIFY_AND_CLEAR(driver);
+
+ // Press regular key.
+ EXPECT_REPORT(driver, (KC_A));
+ regular_key.press();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // Release regular key.
+ EXPECT_EMPTY_REPORT(driver);
+ regular_key.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+}
+
+TEST_F(ChordalHoldHoldOnOtherKeyPress, nested_tap_of_layer_0_layer_tap_keys) {
+ TestDriver driver;
+ InSequence s;
+ // The keys are layer-taps on layer 0 but regular keys on layer 1.
+ auto first_layer_tap_key = KeymapKey(0, 1, 0, LT(1, KC_A));
+ auto second_layer_tap_key = KeymapKey(0, MATRIX_COLS - 1, 0, LT(1, KC_P));
+ auto first_key_on_layer = KeymapKey(1, 1, 0, KC_B);
+ auto second_key_on_layer = KeymapKey(1, MATRIX_COLS - 1, 0, KC_Q);
+
+ set_keymap({first_layer_tap_key, second_layer_tap_key, first_key_on_layer, second_key_on_layer});
+
+ // Press first layer-tap key.
+ EXPECT_NO_REPORT(driver);
+ first_layer_tap_key.press();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // Press second layer-tap key.
+ EXPECT_REPORT(driver, (KC_Q));
+ second_layer_tap_key.press();
+ run_one_scan_loop();
+ EXPECT_EQ(layer_state, 2);
+ VERIFY_AND_CLEAR(driver);
+
+ // Release second layer-tap key.
+ EXPECT_EMPTY_REPORT(driver);
+ second_layer_tap_key.release();
+ run_one_scan_loop();
+ EXPECT_EQ(layer_state, 2);
+ VERIFY_AND_CLEAR(driver);
+
+ // Release first layer-tap key.
+ EXPECT_NO_REPORT(driver);
+ first_layer_tap_key.release();
+ run_one_scan_loop();
+ EXPECT_EQ(layer_state, 0);
+ VERIFY_AND_CLEAR(driver);
+}
+
+TEST_F(ChordalHoldHoldOnOtherKeyPress, lt_mt_one_regular_key) {
+ TestDriver driver;
+ InSequence s;
+ auto lt_key = KeymapKey(0, 1, 0, LT(1, KC_A));
+ auto mt_key0 = KeymapKey(0, 2, 0, SFT_T(KC_B));
+ auto mt_key1 = KeymapKey(1, 2, 0, CTL_T(KC_C));
+ auto regular_key = KeymapKey(1, MATRIX_COLS - 1, 0, KC_X);
+ auto no_key0 = KeymapKey(0, MATRIX_COLS - 1, 0, XXXXXXX);
+ auto no_key1 = KeymapKey(1, 1, 0, XXXXXXX);
+
+ set_keymap({lt_key, mt_key0, mt_key1, regular_key, no_key0, no_key1});
+
+ // Press LT, MT.
+ EXPECT_NO_REPORT(driver);
+ lt_key.press();
+ run_one_scan_loop();
+ mt_key1.press();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // Press regular key.
+ EXPECT_REPORT(driver, (KC_LCTL));
+ EXPECT_REPORT(driver, (KC_LCTL, KC_X));
+ regular_key.press();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // Release the regular key.
+ EXPECT_REPORT(driver, (KC_LCTL));
+ regular_key.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // Release MT key.
+ EXPECT_EMPTY_REPORT(driver);
+ mt_key1.release();
+ run_one_scan_loop();
+ EXPECT_EQ(get_mods(), 0);
+ VERIFY_AND_CLEAR(driver);
+
+ // Release LT key.
+ lt_key.release();
+ run_one_scan_loop();
+ EXPECT_EQ(layer_state, 0);
+ VERIFY_AND_CLEAR(driver);
+}
+
+TEST_F(ChordalHoldHoldOnOtherKeyPress, nested_tap_of_layer_tap_keys) {
+ TestDriver driver;
+ InSequence s;
+ // The keys are layer-taps on all layers.
+ auto first_key_layer_0 = KeymapKey(0, 1, 0, LT(1, KC_A));
+ auto second_key_layer_0 = KeymapKey(0, MATRIX_COLS - 1, 0, LT(1, KC_P));
+ auto first_key_layer_1 = KeymapKey(1, 1, 0, LT(2, KC_B));
+ auto second_key_layer_1 = KeymapKey(1, MATRIX_COLS - 1, 0, LT(2, KC_Q));
+ auto first_key_layer_2 = KeymapKey(2, 1, 0, KC_TRNS);
+ auto second_key_layer_2 = KeymapKey(2, MATRIX_COLS - 1, 0, KC_TRNS);
+
+ set_keymap({first_key_layer_0, second_key_layer_0, first_key_layer_1, second_key_layer_1, first_key_layer_2, second_key_layer_2});
+
+ // Press first layer-tap key.
+ EXPECT_NO_REPORT(driver);
+ first_key_layer_0.press();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // Press second layer-tap key.
+ EXPECT_NO_REPORT(driver);
+ second_key_layer_0.press();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // Release second layer-tap key.
+ EXPECT_REPORT(driver, (KC_Q));
+ EXPECT_EMPTY_REPORT(driver);
+ second_key_layer_0.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // Release first layer-tap key.
+ EXPECT_NO_REPORT(driver);
+ first_key_layer_0.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+}
+
+TEST_F(ChordalHoldHoldOnOtherKeyPress, roll_layer_tap_key_with_regular_key) {
+ TestDriver driver;
+ InSequence s;
+
+ auto layer_tap_hold_key = KeymapKey(0, 1, 0, LT(1, KC_P));
+ auto regular_key = KeymapKey(0, MATRIX_COLS - 1, 0, KC_A);
+ auto layer_key = KeymapKey(1, MATRIX_COLS - 1, 0, KC_B);
+
+ set_keymap({layer_tap_hold_key, regular_key, layer_key});
+
+ // Press layer-tap-hold key.
+ EXPECT_NO_REPORT(driver);
+ layer_tap_hold_key.press();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // Press regular key.
+ EXPECT_REPORT(driver, (KC_B));
+ regular_key.press();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // Release layer-tap-hold key.
+ EXPECT_NO_REPORT(driver);
+ layer_tap_hold_key.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // Release regular key.
+ EXPECT_EMPTY_REPORT(driver);
+ regular_key.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+}
+
+TEST_F(ChordalHoldHoldOnOtherKeyPress, two_mod_tap_keys_stuttered_press) {
+ TestDriver driver;
+ InSequence s;
+
+ auto mod_tap_key1 = KeymapKey(0, 1, 0, LSFT_T(KC_A));
+ auto mod_tap_key2 = KeymapKey(0, 2, 0, LCTL_T(KC_B));
+
+ set_keymap({mod_tap_key1, mod_tap_key2});
+
+ // Hold first mod-tap key until the tapping term.
+ EXPECT_REPORT(driver, (KC_LSFT));
+ mod_tap_key1.press();
+ idle_for(TAPPING_TERM + 1);
+ VERIFY_AND_CLEAR(driver);
+
+ // Press the second mod-tap key, then quickly release and press the first.
+ EXPECT_NO_REPORT(driver);
+ mod_tap_key2.press();
+ run_one_scan_loop();
+ mod_tap_key1.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ EXPECT_REPORT(driver, (KC_LSFT, KC_B));
+ EXPECT_REPORT(driver, (KC_B));
+ EXPECT_REPORT(driver, (KC_B, KC_A));
+ mod_tap_key1.press();
+ run_one_scan_loop();
+ EXPECT_EQ(get_mods(), 0); // Verify that Shift was released.
+ VERIFY_AND_CLEAR(driver);
+
+ // Release both keys.
+ EXPECT_REPORT(driver, (KC_A));
+ mod_tap_key2.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ EXPECT_EMPTY_REPORT(driver);
+ mod_tap_key1.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+}
diff --git a/tests/tap_hold_configurations/chordal_hold/permissive_hold/config.h b/tests/tap_hold_configurations/chordal_hold/permissive_hold/config.h
new file mode 100644
index 0000000000..f7bb7ab0ec
--- /dev/null
+++ b/tests/tap_hold_configurations/chordal_hold/permissive_hold/config.h
@@ -0,0 +1,22 @@
+/* Copyright 2022 Vladislav Kucheriavykh
+ * Copyright 2024 Google LLC
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#pragma once
+
+#include "test_common.h"
+#define CHORDAL_HOLD
+#define PERMISSIVE_HOLD
diff --git a/keyboards/splitkb/aurora/sweep/rules.mk b/tests/tap_hold_configurations/chordal_hold/permissive_hold/test.mk
index ec1e102039..2b049cea3b 100644
--- a/keyboards/splitkb/aurora/sweep/rules.mk
+++ b/tests/tap_hold_configurations/chordal_hold/permissive_hold/test.mk
@@ -1,4 +1,5 @@
-# Copyright 2022 splitkb.com <[email protected]>
+# Copyright 2022 Vladislav Kucheriavykh
+# Copyright 2024 Google LLC
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -13,4 +14,4 @@
# 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_FOLDER = splitkb/aurora/sweep/rev1
+INTROSPECTION_KEYMAP_C = test_keymap.c
diff --git a/tests/tap_hold_configurations/chordal_hold/permissive_hold/test_keymap.c b/tests/tap_hold_configurations/chordal_hold/permissive_hold/test_keymap.c
new file mode 100644
index 0000000000..8a6a2c59b0
--- /dev/null
+++ b/tests/tap_hold_configurations/chordal_hold/permissive_hold/test_keymap.c
@@ -0,0 +1,22 @@
+// Copyright 2024 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.
+
+#include "quantum.h"
+
+const char chordal_hold_layout[MATRIX_ROWS][MATRIX_COLS] PROGMEM = {
+ {'L', 'L', 'L', 'L', 'L', 'R', 'R', 'R', 'R', 'R'},
+ {'L', 'L', 'L', 'L', 'L', 'R', 'R', 'R', 'R', 'R'},
+ {'*', 'L', 'L', 'L', 'L', 'R', 'R', 'R', 'R', 'R'},
+ {'L', 'L', 'L', 'L', 'L', 'R', 'R', 'R', 'R', 'R'},
+};
diff --git a/tests/tap_hold_configurations/chordal_hold/permissive_hold/test_one_shot_keys.cpp b/tests/tap_hold_configurations/chordal_hold/permissive_hold/test_one_shot_keys.cpp
new file mode 100644
index 0000000000..e48cba73e2
--- /dev/null
+++ b/tests/tap_hold_configurations/chordal_hold/permissive_hold/test_one_shot_keys.cpp
@@ -0,0 +1,174 @@
+/* Copyright 2021 Stefan Kerkmann
+ * Copyright 2024 Google LLC
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "action_util.h"
+#include "keyboard_report_util.hpp"
+#include "test_common.hpp"
+
+using testing::_;
+using testing::InSequence;
+
+class OneShot : public TestFixture {};
+class OneShotParametrizedTestFixture : public ::testing::WithParamInterface<std::pair<KeymapKey, KeymapKey>>, public OneShot {};
+
+TEST_P(OneShotParametrizedTestFixture, OSMWithAdditionalKeypress) {
+ TestDriver driver;
+ KeymapKey osm_key = GetParam().first;
+ KeymapKey regular_key = GetParam().second;
+
+ set_keymap({osm_key, regular_key});
+
+ // Press and release OSM.
+ EXPECT_NO_REPORT(driver);
+ tap_key(osm_key);
+ VERIFY_AND_CLEAR(driver);
+
+ // Press regular key.
+ EXPECT_REPORT(driver, (osm_key.report_code, regular_key.report_code));
+ regular_key.press();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // Release regular key.
+ EXPECT_EMPTY_REPORT(driver);
+ regular_key.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+}
+
+TEST_P(OneShotParametrizedTestFixture, OSMAsRegularModifierWithAdditionalKeypress) {
+ TestDriver driver;
+ KeymapKey osm_key = GetParam().first;
+ KeymapKey regular_key = GetParam().second;
+
+ set_keymap({osm_key, regular_key});
+
+ // Press OSM.
+ EXPECT_NO_REPORT(driver);
+ osm_key.press();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // Press regular key.
+ EXPECT_NO_REPORT(driver);
+ regular_key.press();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // Release regular key.
+ EXPECT_REPORT(driver, (osm_key.report_code)).Times(2);
+ EXPECT_REPORT(driver, (regular_key.report_code, osm_key.report_code));
+ regular_key.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // Release OSM.
+ EXPECT_EMPTY_REPORT(driver);
+ osm_key.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+}
+
+// clang-format off
+
+INSTANTIATE_TEST_CASE_P(
+ OneShotModifierTests,
+ OneShotParametrizedTestFixture,
+ ::testing::Values(
+ // First is osm key, second is regular key.
+ std::make_pair(KeymapKey{0, 0, 0, OSM(MOD_LSFT), KC_LSFT}, KeymapKey{0, 1, 1, KC_A}),
+ std::make_pair(KeymapKey{0, 0, 0, OSM(MOD_LCTL), KC_LCTL}, KeymapKey{0, 1, 1, KC_A}),
+ std::make_pair(KeymapKey{0, 0, 0, OSM(MOD_LALT), KC_LALT}, KeymapKey{0, 1, 1, KC_A}),
+ std::make_pair(KeymapKey{0, 0, 0, OSM(MOD_LGUI), KC_LGUI}, KeymapKey{0, 1, 1, KC_A}),
+ std::make_pair(KeymapKey{0, 0, 0, OSM(MOD_RCTL), KC_RCTL}, KeymapKey{0, 1, 1, KC_A}),
+ std::make_pair(KeymapKey{0, 0, 0, OSM(MOD_RSFT), KC_RSFT}, KeymapKey{0, 1, 1, KC_A}),
+ std::make_pair(KeymapKey{0, 0, 0, OSM(MOD_RALT), KC_RALT}, KeymapKey{0, 1, 1, KC_A}),
+ std::make_pair(KeymapKey{0, 0, 0, OSM(MOD_RGUI), KC_RGUI}, KeymapKey{0, 1, 1, KC_A})
+ ));
+// clang-format on
+
+TEST_F(OneShot, OSLWithAdditionalKeypress) {
+ TestDriver driver;
+ InSequence s;
+ KeymapKey osl_key = KeymapKey{0, 0, 0, OSL(1)};
+ KeymapKey osl_key1 = KeymapKey{1, 0, 0, KC_X};
+ KeymapKey regular_key0 = KeymapKey{0, 1, 0, KC_Y};
+ KeymapKey regular_key1 = KeymapKey{1, 1, 0, KC_A};
+
+ set_keymap({osl_key, osl_key1, regular_key0, regular_key1});
+
+ // Press OSL key.
+ EXPECT_NO_REPORT(driver);
+ osl_key.press();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // Release OSL key.
+ EXPECT_NO_REPORT(driver);
+ osl_key.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // Press regular key.
+ EXPECT_REPORT(driver, (regular_key1.report_code));
+ EXPECT_EMPTY_REPORT(driver);
+ regular_key1.press();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // Release regular key.
+ EXPECT_NO_REPORT(driver);
+ regular_key1.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+}
+
+TEST_F(OneShot, OSLWithOsmAndAdditionalKeypress) {
+ TestDriver driver;
+ InSequence s;
+ KeymapKey osl_key = KeymapKey{0, 0, 0, OSL(1)};
+ KeymapKey osm_key = KeymapKey{1, 1, 0, OSM(MOD_LSFT), KC_LSFT};
+ KeymapKey regular_key = KeymapKey{1, 1, 1, KC_A};
+ KeymapKey blank_key = KeymapKey{1, 0, 0, KC_NO};
+
+ set_keymap({osl_key, osm_key, regular_key, blank_key});
+
+ // Press OSL key.
+ EXPECT_NO_REPORT(driver);
+ osl_key.press();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // Release OSL key.
+ EXPECT_NO_REPORT(driver);
+ osl_key.release();
+ run_one_scan_loop();
+ EXPECT_TRUE(layer_state_is(1));
+ VERIFY_AND_CLEAR(driver);
+
+ // Press and release OSM.
+ EXPECT_NO_REPORT(driver);
+ tap_key(osm_key);
+ EXPECT_TRUE(layer_state_is(1));
+ VERIFY_AND_CLEAR(driver);
+
+ // Tap regular key.
+ EXPECT_REPORT(driver, (osm_key.report_code, regular_key.report_code));
+ EXPECT_EMPTY_REPORT(driver);
+ tap_key(regular_key);
+ VERIFY_AND_CLEAR(driver);
+}
diff --git a/tests/tap_hold_configurations/chordal_hold/permissive_hold/test_tap_hold.cpp b/tests/tap_hold_configurations/chordal_hold/permissive_hold/test_tap_hold.cpp
new file mode 100644
index 0000000000..19e73edb02
--- /dev/null
+++ b/tests/tap_hold_configurations/chordal_hold/permissive_hold/test_tap_hold.cpp
@@ -0,0 +1,941 @@
+// Copyright 2024-2025 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.
+
+#include "keyboard_report_util.hpp"
+#include "keycode.h"
+#include "test_common.hpp"
+#include "action_tapping.h"
+#include "test_fixture.hpp"
+#include "test_keymap_key.hpp"
+
+using testing::_;
+using testing::InSequence;
+
+class ChordalHoldPermissiveHold : public TestFixture {};
+
+TEST_F(ChordalHoldPermissiveHold, chordal_hold_handedness) {
+ EXPECT_EQ(chordal_hold_handedness({.col = 0, .row = 0}), 'L');
+ EXPECT_EQ(chordal_hold_handedness({.col = MATRIX_COLS - 1, .row = 0}), 'R');
+ EXPECT_EQ(chordal_hold_handedness({.col = 0, .row = 2}), '*');
+}
+
+TEST_F(ChordalHoldPermissiveHold, get_chordal_hold_default) {
+ auto make_record = [](uint8_t row, uint8_t col, keyevent_type_t type = KEY_EVENT) {
+ return keyrecord_t{
+ .event =
+ {
+ .key = {.col = col, .row = row},
+ .type = type,
+ .pressed = true,
+ },
+ };
+ };
+ // Create two records on the left hand.
+ keyrecord_t record_l0 = make_record(0, 0);
+ keyrecord_t record_l1 = make_record(1, 0);
+ // Create a record on the right hand.
+ keyrecord_t record_r = make_record(0, MATRIX_COLS - 1);
+
+ // Function should return true when records are on opposite hands.
+ EXPECT_TRUE(get_chordal_hold_default(&record_l0, &record_r));
+ EXPECT_TRUE(get_chordal_hold_default(&record_r, &record_l0));
+ // ... and false when on the same hand.
+ EXPECT_FALSE(get_chordal_hold_default(&record_l0, &record_l1));
+ EXPECT_FALSE(get_chordal_hold_default(&record_l1, &record_l0));
+ // But (2, 0) has handedness '*', for which true is returned for chords
+ // with either hand.
+ keyrecord_t record_l2 = make_record(2, 0);
+ EXPECT_TRUE(get_chordal_hold_default(&record_l2, &record_l0));
+ EXPECT_TRUE(get_chordal_hold_default(&record_l2, &record_r));
+
+ // Create a record resulting from a combo.
+ keyrecord_t record_combo = make_record(0, 0, COMBO_EVENT);
+ // Function returns true in all cases.
+ EXPECT_TRUE(get_chordal_hold_default(&record_l0, &record_combo));
+ EXPECT_TRUE(get_chordal_hold_default(&record_r, &record_combo));
+ EXPECT_TRUE(get_chordal_hold_default(&record_combo, &record_l0));
+ EXPECT_TRUE(get_chordal_hold_default(&record_combo, &record_r));
+}
+
+TEST_F(ChordalHoldPermissiveHold, chord_nested_press_settled_as_hold) {
+ TestDriver driver;
+ InSequence s;
+ // Mod-tap key on the left hand.
+ auto mod_tap_key = KeymapKey(0, 1, 0, SFT_T(KC_P));
+ // Regular key on the right hand.
+ auto regular_key = KeymapKey(0, MATRIX_COLS - 1, 0, KC_A);
+
+ set_keymap({mod_tap_key, regular_key});
+
+ // Press mod-tap key.
+ EXPECT_NO_REPORT(driver);
+ mod_tap_key.press();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // Tap regular key.
+ EXPECT_REPORT(driver, (KC_LEFT_SHIFT));
+ EXPECT_REPORT(driver, (KC_LEFT_SHIFT, KC_A));
+ EXPECT_REPORT(driver, (KC_LEFT_SHIFT));
+ tap_key(regular_key);
+ VERIFY_AND_CLEAR(driver);
+
+ // Release mod-tap key.
+ EXPECT_EMPTY_REPORT(driver);
+ mod_tap_key.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+}
+
+TEST_F(ChordalHoldPermissiveHold, chord_rolled_press_settled_as_tap) {
+ TestDriver driver;
+ InSequence s;
+ // Mod-tap key on the left hand.
+ auto mod_tap_key = KeymapKey(0, 1, 0, SFT_T(KC_P));
+ // Regular key on the right hand.
+ auto regular_key = KeymapKey(0, MATRIX_COLS - 1, 0, KC_A);
+
+ set_keymap({mod_tap_key, regular_key});
+
+ // Press mod-tap key and regular key.
+ EXPECT_NO_REPORT(driver);
+ mod_tap_key.press();
+ run_one_scan_loop();
+ regular_key.press();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // Release mod-tap key.
+ EXPECT_REPORT(driver, (KC_P));
+ EXPECT_REPORT(driver, (KC_P, KC_A));
+ EXPECT_REPORT(driver, (KC_A));
+ mod_tap_key.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // Release regular key.
+ EXPECT_EMPTY_REPORT(driver);
+ regular_key.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+}
+
+TEST_F(ChordalHoldPermissiveHold, non_chord_with_mod_tap_settled_as_tap) {
+ TestDriver driver;
+ InSequence s;
+ // Mod-tap key and regular key both on the left hand.
+ auto mod_tap_key = KeymapKey(0, 1, 0, SFT_T(KC_P));
+ auto regular_key = KeymapKey(0, 2, 0, KC_A);
+
+ set_keymap({mod_tap_key, regular_key});
+
+ // Press mod-tap-hold key.
+ EXPECT_NO_REPORT(driver);
+ mod_tap_key.press();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // Press regular key.
+ EXPECT_REPORT(driver, (KC_P));
+ EXPECT_REPORT(driver, (KC_P, KC_A));
+ regular_key.press();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // Release regular key.
+ EXPECT_REPORT(driver, (KC_P));
+ regular_key.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // Release mod-tap-hold key.
+ EXPECT_EMPTY_REPORT(driver);
+ mod_tap_key.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+}
+
+TEST_F(ChordalHoldPermissiveHold, tap_mod_tap_key) {
+ TestDriver driver;
+ InSequence s;
+ auto mod_tap_key = KeymapKey(0, 1, 0, SFT_T(KC_P));
+
+ set_keymap({mod_tap_key});
+
+ EXPECT_NO_REPORT(driver);
+ mod_tap_key.press();
+ idle_for(TAPPING_TERM - 1);
+ VERIFY_AND_CLEAR(driver);
+
+ EXPECT_REPORT(driver, (KC_P));
+ EXPECT_EMPTY_REPORT(driver);
+ mod_tap_key.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+}
+
+TEST_F(ChordalHoldPermissiveHold, hold_mod_tap_key) {
+ TestDriver driver;
+ InSequence s;
+ auto mod_tap_key = KeymapKey(0, 1, 0, SFT_T(KC_P));
+
+ set_keymap({mod_tap_key});
+
+ EXPECT_REPORT(driver, (KC_LEFT_SHIFT));
+ mod_tap_key.press();
+ idle_for(TAPPING_TERM + 1);
+ VERIFY_AND_CLEAR(driver);
+
+ EXPECT_EMPTY_REPORT(driver);
+ mod_tap_key.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+}
+
+TEST_F(ChordalHoldPermissiveHold, two_mod_taps_same_hand_hold_til_timeout) {
+ TestDriver driver;
+ InSequence s;
+ auto mod_tap_key1 = KeymapKey(0, MATRIX_COLS - 2, 0, RCTL_T(KC_A));
+ auto mod_tap_key2 = KeymapKey(0, MATRIX_COLS - 1, 0, RSFT_T(KC_B));
+
+ set_keymap({mod_tap_key1, mod_tap_key2});
+
+ // Press mod-tap keys.
+ EXPECT_NO_REPORT(driver);
+ mod_tap_key1.press();
+ run_one_scan_loop();
+ mod_tap_key2.press();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // Continue holding til the tapping term.
+ EXPECT_REPORT(driver, (KC_RIGHT_CTRL));
+ EXPECT_REPORT(driver, (KC_RIGHT_CTRL, KC_RIGHT_SHIFT));
+ idle_for(TAPPING_TERM);
+ VERIFY_AND_CLEAR(driver);
+
+ // Release mod-tap keys.
+ EXPECT_REPORT(driver, (KC_RIGHT_SHIFT));
+ mod_tap_key1.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ EXPECT_EMPTY_REPORT(driver);
+ mod_tap_key2.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+}
+
+TEST_F(ChordalHoldPermissiveHold, two_mod_taps_nested_press_opposite_hands) {
+ TestDriver driver;
+ InSequence s;
+ auto mod_tap_key1 = KeymapKey(0, 1, 0, SFT_T(KC_A));
+ auto mod_tap_key2 = KeymapKey(0, MATRIX_COLS - 1, 0, RSFT_T(KC_B));
+
+ set_keymap({mod_tap_key1, mod_tap_key2});
+
+ // Press mod-tap keys.
+ EXPECT_NO_REPORT(driver);
+ mod_tap_key1.press();
+ run_one_scan_loop();
+ mod_tap_key2.press();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // Release mod-tap keys.
+ EXPECT_REPORT(driver, (KC_LEFT_SHIFT));
+ EXPECT_REPORT(driver, (KC_LEFT_SHIFT, KC_B));
+ EXPECT_REPORT(driver, (KC_LEFT_SHIFT));
+ mod_tap_key2.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ EXPECT_EMPTY_REPORT(driver);
+ mod_tap_key1.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+}
+
+TEST_F(ChordalHoldPermissiveHold, two_mod_taps_nested_press_same_hand) {
+ TestDriver driver;
+ InSequence s;
+ auto mod_tap_key1 = KeymapKey(0, 1, 0, SFT_T(KC_A));
+ auto mod_tap_key2 = KeymapKey(0, 2, 0, RSFT_T(KC_B));
+
+ set_keymap({mod_tap_key1, mod_tap_key2});
+
+ // Press mod-tap keys.
+ EXPECT_NO_REPORT(driver);
+ mod_tap_key1.press();
+ run_one_scan_loop();
+ mod_tap_key2.press();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // Release mod-tap keys.
+ EXPECT_REPORT(driver, (KC_A));
+ EXPECT_REPORT(driver, (KC_A, KC_B));
+ EXPECT_REPORT(driver, (KC_A));
+ mod_tap_key2.release();
+ run_one_scan_loop();
+
+ EXPECT_EMPTY_REPORT(driver);
+ mod_tap_key1.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+}
+
+TEST_F(ChordalHoldPermissiveHold, three_mod_taps_same_hand_streak_roll) {
+ TestDriver driver;
+ InSequence s;
+ auto mod_tap_key1 = KeymapKey(0, 1, 0, SFT_T(KC_A));
+ auto mod_tap_key2 = KeymapKey(0, 2, 0, CTL_T(KC_B));
+ auto mod_tap_key3 = KeymapKey(0, 3, 0, RSFT_T(KC_C));
+
+ set_keymap({mod_tap_key1, mod_tap_key2, mod_tap_key3});
+
+ // Press mod-tap keys.
+ EXPECT_NO_REPORT(driver);
+ mod_tap_key1.press();
+ run_one_scan_loop();
+ mod_tap_key2.press();
+ run_one_scan_loop();
+ mod_tap_key3.press();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // Release keys 1, 2, 3.
+ //
+ // NOTE: The correct order of events should be
+ // EXPECT_REPORT(driver, (KC_A, KC_B, KC_C));
+ // EXPECT_REPORT(driver, (KC_B, KC_C));
+ // EXPECT_REPORT(driver, (KC_C));
+ // EXPECT_EMPTY_REPORT(driver);
+ //
+ // However, due to a workaround for https://github.com/tmk/tmk_keyboard/issues/60,
+ // the events are processed out of order, with the first two keys released
+ // before pressing KC_C.
+ EXPECT_REPORT(driver, (KC_A));
+ EXPECT_REPORT(driver, (KC_A, KC_B));
+ EXPECT_REPORT(driver, (KC_B));
+ EXPECT_EMPTY_REPORT(driver);
+ EXPECT_REPORT(driver, (KC_C));
+ EXPECT_EMPTY_REPORT(driver);
+ mod_tap_key1.release();
+ run_one_scan_loop();
+ mod_tap_key2.release();
+ run_one_scan_loop();
+ mod_tap_key3.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+}
+
+TEST_F(ChordalHoldPermissiveHold, three_mod_taps_same_hand_streak_orders) {
+ TestDriver driver;
+ InSequence s;
+ auto mod_tap_key1 = KeymapKey(0, 1, 0, SFT_T(KC_A));
+ auto mod_tap_key2 = KeymapKey(0, 2, 0, CTL_T(KC_B));
+ auto mod_tap_key3 = KeymapKey(0, 3, 0, RSFT_T(KC_C));
+
+ set_keymap({mod_tap_key1, mod_tap_key2, mod_tap_key3});
+
+ // Press mod-tap keys.
+ EXPECT_NO_REPORT(driver);
+ mod_tap_key1.press();
+ run_one_scan_loop();
+ mod_tap_key2.press();
+ run_one_scan_loop();
+ mod_tap_key3.press();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // Release keys 3, 2, 1.
+ EXPECT_REPORT(driver, (KC_A));
+ EXPECT_REPORT(driver, (KC_A, KC_B));
+ EXPECT_REPORT(driver, (KC_A, KC_B, KC_C));
+ EXPECT_REPORT(driver, (KC_A, KC_B));
+ mod_tap_key3.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ EXPECT_REPORT(driver, (KC_A));
+ mod_tap_key2.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ EXPECT_EMPTY_REPORT(driver);
+ mod_tap_key1.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // Press mod-tap keys.
+ EXPECT_NO_REPORT(driver);
+ idle_for(TAPPING_TERM);
+ mod_tap_key1.press();
+ run_one_scan_loop();
+ mod_tap_key2.press();
+ run_one_scan_loop();
+ mod_tap_key3.press();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // Release keys 3, 1, 2.
+ EXPECT_REPORT(driver, (KC_A));
+ EXPECT_REPORT(driver, (KC_A, KC_B));
+ EXPECT_REPORT(driver, (KC_A, KC_B, KC_C));
+ EXPECT_REPORT(driver, (KC_A, KC_B));
+ mod_tap_key3.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ EXPECT_REPORT(driver, (KC_B));
+ mod_tap_key1.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ EXPECT_EMPTY_REPORT(driver);
+ mod_tap_key2.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // Press mod-tap keys.
+ EXPECT_NO_REPORT(driver);
+ idle_for(TAPPING_TERM);
+ mod_tap_key1.press();
+ run_one_scan_loop();
+ mod_tap_key2.press();
+ run_one_scan_loop();
+ mod_tap_key3.press();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // Release keys 2, 3, 1.
+ //
+ // NOTE: The correct order of events should be
+ // EXPECT_REPORT(driver, (KC_A, KC_B, KC_C));
+ // EXPECT_REPORT(driver, (KC_A, KC_C));
+ // EXPECT_REPORT(driver, (KC_A));
+ // EXPECT_EMPTY_REPORT(driver);
+ //
+ // However, due to a workaround for https://github.com/tmk/tmk_keyboard/issues/60,
+ // the events are processed out of order.
+ EXPECT_REPORT(driver, (KC_A));
+ EXPECT_REPORT(driver, (KC_A, KC_B));
+ EXPECT_REPORT(driver, (KC_A));
+ EXPECT_REPORT(driver, (KC_A, KC_C));
+ EXPECT_REPORT(driver, (KC_A));
+ EXPECT_EMPTY_REPORT(driver);
+ mod_tap_key2.release();
+ run_one_scan_loop();
+ mod_tap_key3.release();
+ run_one_scan_loop();
+ mod_tap_key1.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ EXPECT_NO_REPORT(driver);
+ VERIFY_AND_CLEAR(driver);
+}
+
+TEST_F(ChordalHoldPermissiveHold, three_mod_taps_opposite_hands_roll) {
+ TestDriver driver;
+ InSequence s;
+ auto mod_tap_key1 = KeymapKey(0, 1, 0, SFT_T(KC_A));
+ auto mod_tap_key2 = KeymapKey(0, 2, 0, CTL_T(KC_B));
+ auto mod_tap_key3 = KeymapKey(0, MATRIX_COLS - 1, 0, RSFT_T(KC_C));
+
+ set_keymap({mod_tap_key1, mod_tap_key2, mod_tap_key3});
+
+ // Press mod-tap keys.
+ EXPECT_NO_REPORT(driver);
+ mod_tap_key1.press();
+ run_one_scan_loop();
+ mod_tap_key2.press();
+ run_one_scan_loop();
+ mod_tap_key3.press();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // Release keys 1, 2, 3.
+ //
+ // NOTE: The correct order of events should be
+ // EXPECT_REPORT(driver, (KC_A, KC_B));
+ // EXPECT_REPORT(driver, (KC_A, KC_B, KC_C));
+ // EXPECT_REPORT(driver, (KC_B, KC_C));
+ // EXPECT_REPORT(driver, (KC_C));
+ // EXPECT_EMPTY_REPORT(driver);
+ //
+ // However, due to a workaround for https://github.com/tmk/tmk_keyboard/issues/60,
+ // the events are processed out of order, with the first two keys released
+ // before pressing KC_C.
+ EXPECT_REPORT(driver, (KC_A));
+ EXPECT_REPORT(driver, (KC_A, KC_B));
+ EXPECT_REPORT(driver, (KC_B));
+ EXPECT_EMPTY_REPORT(driver);
+ EXPECT_REPORT(driver, (KC_C));
+ EXPECT_EMPTY_REPORT(driver);
+ mod_tap_key1.release();
+ run_one_scan_loop();
+ mod_tap_key2.release();
+ run_one_scan_loop();
+ mod_tap_key3.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+}
+
+TEST_F(ChordalHoldPermissiveHold, three_mod_taps_two_left_one_right) {
+ TestDriver driver;
+ InSequence s;
+ auto mod_tap_key1 = KeymapKey(0, 1, 0, SFT_T(KC_A));
+ auto mod_tap_key2 = KeymapKey(0, 2, 0, CTL_T(KC_B));
+ auto mod_tap_key3 = KeymapKey(0, MATRIX_COLS - 1, 0, RSFT_T(KC_C));
+
+ set_keymap({mod_tap_key1, mod_tap_key2, mod_tap_key3});
+
+ // Press mod-tap keys.
+ EXPECT_NO_REPORT(driver);
+ mod_tap_key1.press();
+ run_one_scan_loop();
+ mod_tap_key2.press();
+ run_one_scan_loop();
+ mod_tap_key3.press();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // Release key 3.
+ EXPECT_REPORT(driver, (KC_LEFT_SHIFT));
+ EXPECT_REPORT(driver, (KC_LEFT_SHIFT, KC_LEFT_CTRL));
+ EXPECT_REPORT(driver, (KC_LEFT_SHIFT, KC_LEFT_CTRL, KC_C));
+ EXPECT_REPORT(driver, (KC_LEFT_SHIFT, KC_LEFT_CTRL));
+ mod_tap_key3.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // Release key 2, then key 1.
+ EXPECT_REPORT(driver, (KC_LEFT_SHIFT));
+ mod_tap_key2.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ EXPECT_EMPTY_REPORT(driver);
+ mod_tap_key1.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // Press mod-tap keys.
+ EXPECT_NO_REPORT(driver);
+ idle_for(TAPPING_TERM);
+ mod_tap_key1.press();
+ run_one_scan_loop();
+ mod_tap_key2.press();
+ run_one_scan_loop();
+ mod_tap_key3.press();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // Release key 3.
+ EXPECT_REPORT(driver, (KC_LEFT_SHIFT));
+ EXPECT_REPORT(driver, (KC_LEFT_SHIFT, KC_LEFT_CTRL));
+ EXPECT_REPORT(driver, (KC_LEFT_SHIFT, KC_LEFT_CTRL, KC_C));
+ EXPECT_REPORT(driver, (KC_LEFT_SHIFT, KC_LEFT_CTRL));
+ mod_tap_key3.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // Release key 1, then key 2.
+ EXPECT_REPORT(driver, (KC_LEFT_CTRL));
+ mod_tap_key1.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ EXPECT_EMPTY_REPORT(driver);
+ mod_tap_key2.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+}
+
+TEST_F(ChordalHoldPermissiveHold, three_mod_taps_one_held_two_tapped) {
+ TestDriver driver;
+ InSequence s;
+ auto mod_tap_key1 = KeymapKey(0, 1, 0, SFT_T(KC_A));
+ auto mod_tap_key2 = KeymapKey(0, MATRIX_COLS - 2, 0, CTL_T(KC_B));
+ auto mod_tap_key3 = KeymapKey(0, MATRIX_COLS - 1, 0, RSFT_T(KC_C));
+
+ set_keymap({mod_tap_key1, mod_tap_key2, mod_tap_key3});
+
+ // Press mod-tap keys.
+ EXPECT_NO_REPORT(driver);
+ mod_tap_key1.press();
+ run_one_scan_loop();
+ mod_tap_key2.press();
+ run_one_scan_loop();
+ mod_tap_key3.press();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // Release keys 3, 2, 1.
+ EXPECT_REPORT(driver, (KC_LEFT_SHIFT));
+ EXPECT_REPORT(driver, (KC_LEFT_SHIFT, KC_B));
+ EXPECT_REPORT(driver, (KC_LEFT_SHIFT, KC_B, KC_C));
+ EXPECT_REPORT(driver, (KC_LEFT_SHIFT, KC_B));
+ mod_tap_key3.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ EXPECT_REPORT(driver, (KC_LEFT_SHIFT));
+ mod_tap_key2.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ EXPECT_EMPTY_REPORT(driver);
+ mod_tap_key1.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // Press mod-tap keys.
+ EXPECT_NO_REPORT(driver);
+ idle_for(TAPPING_TERM);
+ mod_tap_key1.press();
+ run_one_scan_loop();
+ mod_tap_key2.press();
+ run_one_scan_loop();
+ mod_tap_key3.press();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // Release keys 3, 1, 2.
+ EXPECT_REPORT(driver, (KC_LEFT_SHIFT));
+ EXPECT_REPORT(driver, (KC_LEFT_SHIFT, KC_B));
+ EXPECT_REPORT(driver, (KC_LEFT_SHIFT, KC_B, KC_C));
+ EXPECT_REPORT(driver, (KC_LEFT_SHIFT, KC_B));
+ mod_tap_key3.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ EXPECT_REPORT(driver, (KC_B));
+ mod_tap_key1.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ EXPECT_EMPTY_REPORT(driver);
+ mod_tap_key2.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+}
+
+TEST_F(ChordalHoldPermissiveHold, two_mod_taps_one_regular_key) {
+ TestDriver driver;
+ InSequence s;
+ auto mod_tap_key1 = KeymapKey(0, 1, 0, SFT_T(KC_A));
+ auto mod_tap_key2 = KeymapKey(0, MATRIX_COLS - 2, 0, CTL_T(KC_B));
+ auto regular_key = KeymapKey(0, MATRIX_COLS - 1, 0, KC_C);
+
+ set_keymap({mod_tap_key1, mod_tap_key2, regular_key});
+
+ // Press keys.
+ EXPECT_NO_REPORT(driver);
+ mod_tap_key1.press();
+ run_one_scan_loop();
+ mod_tap_key2.press();
+ run_one_scan_loop();
+ regular_key.press();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // Release keys.
+ EXPECT_REPORT(driver, (KC_LEFT_SHIFT));
+ EXPECT_REPORT(driver, (KC_LEFT_SHIFT, KC_B));
+ EXPECT_REPORT(driver, (KC_LEFT_SHIFT, KC_B, KC_C));
+ EXPECT_REPORT(driver, (KC_LEFT_SHIFT, KC_C));
+ mod_tap_key2.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ EXPECT_REPORT(driver, (KC_LEFT_SHIFT));
+ regular_key.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ EXPECT_EMPTY_REPORT(driver);
+ mod_tap_key1.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // Press mod-tap keys.
+ EXPECT_NO_REPORT(driver);
+ idle_for(TAPPING_TERM);
+ mod_tap_key1.press();
+ run_one_scan_loop();
+ mod_tap_key2.press();
+ run_one_scan_loop();
+ regular_key.press();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // Release keys.
+ EXPECT_REPORT(driver, (KC_LEFT_SHIFT));
+ EXPECT_REPORT(driver, (KC_LEFT_SHIFT, KC_B));
+ EXPECT_REPORT(driver, (KC_LEFT_SHIFT, KC_B, KC_C));
+ EXPECT_REPORT(driver, (KC_LEFT_SHIFT, KC_B));
+ regular_key.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ EXPECT_REPORT(driver, (KC_B));
+ mod_tap_key1.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ EXPECT_EMPTY_REPORT(driver);
+ mod_tap_key2.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+}
+
+TEST_F(ChordalHoldPermissiveHold, tap_regular_key_while_layer_tap_key_is_held) {
+ TestDriver driver;
+ InSequence s;
+ auto layer_tap_hold_key = KeymapKey(0, 1, 0, LT(1, KC_P));
+ auto regular_key = KeymapKey(0, MATRIX_COLS - 1, 0, KC_A);
+ auto no_key = KeymapKey(1, 1, 0, XXXXXXX);
+ auto layer_key = KeymapKey(1, MATRIX_COLS - 1, 0, KC_B);
+
+ set_keymap({layer_tap_hold_key, regular_key, no_key, layer_key});
+
+ // Press layer-tap-hold key.
+ EXPECT_NO_REPORT(driver);
+ layer_tap_hold_key.press();
+ run_one_scan_loop();
+ // Press regular key.
+ regular_key.press();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // Release regular key.
+ EXPECT_REPORT(driver, (KC_B));
+ EXPECT_EMPTY_REPORT(driver);
+ regular_key.release();
+ run_one_scan_loop();
+ EXPECT_EQ(layer_state, 2);
+ VERIFY_AND_CLEAR(driver);
+
+ // Release layer-tap-hold key.
+ EXPECT_NO_REPORT(driver);
+ layer_tap_hold_key.release();
+ run_one_scan_loop();
+ EXPECT_EQ(layer_state, 0);
+ VERIFY_AND_CLEAR(driver);
+}
+
+TEST_F(ChordalHoldPermissiveHold, nested_tap_of_layer_0_layer_tap_keys) {
+ TestDriver driver;
+ InSequence s;
+ // The keys are layer-taps on layer 2 but regular keys on layer 1.
+ auto first_layer_tap_key = KeymapKey(0, 1, 0, LT(1, KC_A));
+ auto second_layer_tap_key = KeymapKey(0, MATRIX_COLS - 1, 0, LT(1, KC_P));
+ auto first_key_on_layer = KeymapKey(1, 1, 0, KC_B);
+ auto second_key_on_layer = KeymapKey(1, MATRIX_COLS - 1, 0, KC_Q);
+
+ set_keymap({first_layer_tap_key, second_layer_tap_key, first_key_on_layer, second_key_on_layer});
+
+ // Press first layer-tap key.
+ EXPECT_NO_REPORT(driver);
+ first_layer_tap_key.press();
+ run_one_scan_loop();
+ // Press second layer-tap key.
+ second_layer_tap_key.press();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // Release second layer-tap key.
+ EXPECT_REPORT(driver, (KC_Q));
+ EXPECT_EMPTY_REPORT(driver);
+ second_layer_tap_key.release();
+ run_one_scan_loop();
+ EXPECT_EQ(layer_state, 2);
+ VERIFY_AND_CLEAR(driver);
+
+ // Release first layer-tap key.
+ EXPECT_NO_REPORT(driver);
+ first_layer_tap_key.release();
+ run_one_scan_loop();
+ EXPECT_EQ(layer_state, 0);
+ VERIFY_AND_CLEAR(driver);
+}
+
+TEST_F(ChordalHoldPermissiveHold, lt_mt_one_regular_key) {
+ TestDriver driver;
+ InSequence s;
+ auto lt_key = KeymapKey(0, 1, 0, LT(1, KC_A));
+ auto mt_key0 = KeymapKey(0, 2, 0, SFT_T(KC_B));
+ auto mt_key1 = KeymapKey(1, 2, 0, CTL_T(KC_C));
+ auto regular_key = KeymapKey(1, MATRIX_COLS - 1, 0, KC_X);
+ auto no_key0 = KeymapKey(0, MATRIX_COLS - 1, 0, XXXXXXX);
+ auto no_key1 = KeymapKey(1, 1, 0, XXXXXXX);
+
+ set_keymap({lt_key, mt_key0, mt_key1, regular_key, no_key0, no_key1});
+
+ // Press LT, MT, and regular key.
+ EXPECT_NO_REPORT(driver);
+ lt_key.press();
+ run_one_scan_loop();
+ mt_key1.press();
+ run_one_scan_loop();
+ regular_key.press();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // Release the regular key.
+ EXPECT_REPORT(driver, (KC_LCTL));
+ EXPECT_REPORT(driver, (KC_LCTL, KC_X));
+ EXPECT_REPORT(driver, (KC_LCTL));
+ regular_key.release();
+ run_one_scan_loop();
+ EXPECT_EQ(get_mods(), MOD_BIT_LCTRL);
+ EXPECT_EQ(layer_state, 2);
+ VERIFY_AND_CLEAR(driver);
+
+ // Release MT key.
+ EXPECT_EMPTY_REPORT(driver);
+ mt_key1.release();
+ run_one_scan_loop();
+ EXPECT_EQ(get_mods(), 0);
+ VERIFY_AND_CLEAR(driver);
+
+ // Release LT key.
+ EXPECT_NO_REPORT(driver);
+ lt_key.release();
+ run_one_scan_loop();
+ EXPECT_EQ(layer_state, 0);
+ VERIFY_AND_CLEAR(driver);
+}
+
+TEST_F(ChordalHoldPermissiveHold, nested_tap_of_layer_tap_keys) {
+ TestDriver driver;
+ InSequence s;
+ // The keys are layer-taps on all layers.
+ auto first_key_layer_0 = KeymapKey(0, 1, 0, LT(1, KC_A));
+ auto second_key_layer_0 = KeymapKey(0, MATRIX_COLS - 1, 0, LT(1, KC_P));
+ auto first_key_layer_1 = KeymapKey(1, 1, 0, LT(2, KC_B));
+ auto second_key_layer_1 = KeymapKey(1, MATRIX_COLS - 1, 0, LT(2, KC_Q));
+ auto first_key_layer_2 = KeymapKey(2, 1, 0, KC_TRNS);
+ auto second_key_layer_2 = KeymapKey(2, MATRIX_COLS - 1, 0, KC_TRNS);
+
+ set_keymap({first_key_layer_0, second_key_layer_0, first_key_layer_1, second_key_layer_1, first_key_layer_2, second_key_layer_2});
+
+ // Press first layer-tap key.
+ EXPECT_NO_REPORT(driver);
+ first_key_layer_0.press();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // Press second layer-tap key.
+ EXPECT_NO_REPORT(driver);
+ second_key_layer_0.press();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // Release second layer-tap key.
+ EXPECT_REPORT(driver, (KC_Q));
+ EXPECT_EMPTY_REPORT(driver);
+ second_key_layer_0.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // Release first layer-tap key.
+ EXPECT_NO_REPORT(driver);
+ first_key_layer_0.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+}
+
+TEST_F(ChordalHoldPermissiveHold, roll_layer_tap_key_with_regular_key) {
+ TestDriver driver;
+ InSequence s;
+
+ auto layer_tap_hold_key = KeymapKey(0, 1, 0, LT(1, KC_P));
+ auto regular_key = KeymapKey(0, MATRIX_COLS - 1, 0, KC_A);
+ auto layer_key = KeymapKey(1, MATRIX_COLS - 1, 0, KC_B);
+
+ set_keymap({layer_tap_hold_key, regular_key, layer_key});
+
+ // Press layer-tap-hold key.
+ EXPECT_NO_REPORT(driver);
+ layer_tap_hold_key.press();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // Press regular key.
+ EXPECT_NO_REPORT(driver);
+ regular_key.press();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // Release layer-tap-hold key.
+ EXPECT_REPORT(driver, (KC_P));
+ EXPECT_REPORT(driver, (KC_P, KC_A));
+ EXPECT_REPORT(driver, (KC_A));
+ layer_tap_hold_key.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ // Release regular key.
+ EXPECT_EMPTY_REPORT(driver);
+ regular_key.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+}
+
+TEST_F(ChordalHoldPermissiveHold, two_mod_tap_keys_stuttered_press) {
+ TestDriver driver;
+ InSequence s;
+
+ auto mod_tap_key1 = KeymapKey(0, 1, 0, LSFT_T(KC_A));
+ auto mod_tap_key2 = KeymapKey(0, 2, 0, LCTL_T(KC_B));
+
+ set_keymap({mod_tap_key1, mod_tap_key2});
+
+ // Hold first mod-tap key until the tapping term.
+ EXPECT_REPORT(driver, (KC_LSFT));
+ mod_tap_key1.press();
+ idle_for(TAPPING_TERM + 1);
+ VERIFY_AND_CLEAR(driver);
+
+ // Press the second mod-tap key, then quickly release and press the first.
+ EXPECT_NO_REPORT(driver);
+ mod_tap_key2.press();
+ run_one_scan_loop();
+ mod_tap_key1.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ EXPECT_REPORT(driver, (KC_LSFT, KC_B));
+ EXPECT_REPORT(driver, (KC_B));
+ EXPECT_REPORT(driver, (KC_B, KC_A));
+ mod_tap_key1.press();
+ run_one_scan_loop();
+ EXPECT_EQ(get_mods(), 0); // Verify that Shift was released.
+ VERIFY_AND_CLEAR(driver);
+
+ // Release both keys.
+ EXPECT_REPORT(driver, (KC_A));
+ mod_tap_key2.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+
+ EXPECT_EMPTY_REPORT(driver);
+ mod_tap_key1.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+}
diff --git a/tests/tap_hold_configurations/chordal_hold/retro_shift_permissive_hold/config.h b/tests/tap_hold_configurations/chordal_hold/retro_shift_permissive_hold/config.h
new file mode 100644
index 0000000000..4d704c5978
--- /dev/null
+++ b/tests/tap_hold_configurations/chordal_hold/retro_shift_permissive_hold/config.h
@@ -0,0 +1,28 @@
+/* Copyright 2022 Isaac Elenbaas
+ * Copyright 2024 Google LLC
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#pragma once
+
+#include "test_common.h"
+
+#define CHORDAL_HOLD
+#define PERMISSIVE_HOLD
+
+#define RETRO_SHIFT 2 * TAPPING_TERM
+// releases between AUTO_SHIFT_TIMEOUT and TAPPING_TERM are not tested
+#define AUTO_SHIFT_TIMEOUT TAPPING_TERM
+#define AUTO_SHIFT_MODIFIERS
diff --git a/tests/tap_hold_configurations/chordal_hold/retro_shift_permissive_hold/test.mk b/tests/tap_hold_configurations/chordal_hold/retro_shift_permissive_hold/test.mk
new file mode 100644
index 0000000000..c39dfa9cb1
--- /dev/null
+++ b/tests/tap_hold_configurations/chordal_hold/retro_shift_permissive_hold/test.mk
@@ -0,0 +1,18 @@
+# Copyright 2022 Isaac Elenbaas
+# Copyright 2024 Google LLC
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+AUTO_SHIFT_ENABLE = yes
+INTROSPECTION_KEYMAP_C = test_keymap.c
diff --git a/tests/tap_hold_configurations/chordal_hold/retro_shift_permissive_hold/test_keymap.c b/tests/tap_hold_configurations/chordal_hold/retro_shift_permissive_hold/test_keymap.c
new file mode 100644
index 0000000000..8a6a2c59b0
--- /dev/null
+++ b/tests/tap_hold_configurations/chordal_hold/retro_shift_permissive_hold/test_keymap.c
@@ -0,0 +1,22 @@
+// Copyright 2024 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.
+
+#include "quantum.h"
+
+const char chordal_hold_layout[MATRIX_ROWS][MATRIX_COLS] PROGMEM = {
+ {'L', 'L', 'L', 'L', 'L', 'R', 'R', 'R', 'R', 'R'},
+ {'L', 'L', 'L', 'L', 'L', 'R', 'R', 'R', 'R', 'R'},
+ {'*', 'L', 'L', 'L', 'L', 'R', 'R', 'R', 'R', 'R'},
+ {'L', 'L', 'L', 'L', 'L', 'R', 'R', 'R', 'R', 'R'},
+};
diff --git a/tests/tap_hold_configurations/chordal_hold/retro_shift_permissive_hold/test_retro_shift.cpp b/tests/tap_hold_configurations/chordal_hold/retro_shift_permissive_hold/test_retro_shift.cpp
new file mode 100644
index 0000000000..16fbabbd8a
--- /dev/null
+++ b/tests/tap_hold_configurations/chordal_hold/retro_shift_permissive_hold/test_retro_shift.cpp
@@ -0,0 +1,420 @@
+/* Copyright 2022 Isaac Elenbaas
+ * Copyright 2024 Google LLC
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "keyboard_report_util.hpp"
+#include "keycode.h"
+#include "test_common.hpp"
+#include "action_tapping.h"
+#include "test_fixture.hpp"
+#include "test_keymap_key.hpp"
+
+bool get_auto_shifted_key(uint16_t keycode, keyrecord_t *record) {
+ return true;
+}
+
+using testing::_;
+using testing::AnyNumber;
+using testing::AnyOf;
+using testing::InSequence;
+
+class RetroShiftPermissiveHold : public TestFixture {};
+
+TEST_F(RetroShiftPermissiveHold, tap_regular_key_while_mod_tap_key_is_held_under_tapping_term) {
+ TestDriver driver;
+ InSequence s;
+ auto mod_tap_hold_key = KeymapKey(0, 0, 0, CTL_T(KC_P));
+ auto regular_key = KeymapKey(0, MATRIX_COLS - 1, 0, KC_A);
+
+ set_keymap({mod_tap_hold_key, regular_key});
+
+ /* Press mod-tap-hold key. */
+ EXPECT_NO_REPORT(driver);
+ mod_tap_hold_key.press();
+ run_one_scan_loop();
+ testing::Mock::VerifyAndClearExpectations(&driver);
+
+ /* Press regular key. */
+ EXPECT_NO_REPORT(driver);
+ regular_key.press();
+ run_one_scan_loop();
+ testing::Mock::VerifyAndClearExpectations(&driver);
+
+ /* Release regular key. */
+ EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LCTL))).Times(AnyNumber());
+ EXPECT_REPORT(driver, (KC_LCTL, KC_A));
+ EXPECT_REPORT(driver, (KC_LCTL));
+ regular_key.release();
+ run_one_scan_loop();
+ testing::Mock::VerifyAndClearExpectations(&driver);
+
+ /* Release mod-tap-hold key. */
+ EXPECT_EMPTY_REPORT(driver);
+ mod_tap_hold_key.release();
+ run_one_scan_loop();
+ testing::Mock::VerifyAndClearExpectations(&driver);
+}
+
+TEST_F(RetroShiftPermissiveHold, tap_mod_tap_key_while_mod_tap_key_is_held_under_tapping_term) {
+ TestDriver driver;
+ InSequence s;
+ auto mod_tap_hold_key = KeymapKey(0, 0, 0, CTL_T(KC_P));
+ auto mod_tap_regular_key = KeymapKey(0, MATRIX_COLS - 1, 0, ALT_T(KC_A));
+
+ set_keymap({mod_tap_hold_key, mod_tap_regular_key});
+
+ /* Press mod-tap-hold key. */
+ EXPECT_NO_REPORT(driver);
+ mod_tap_hold_key.press();
+ run_one_scan_loop();
+ testing::Mock::VerifyAndClearExpectations(&driver);
+
+ /* Press mod-tap-regular key. */
+ EXPECT_NO_REPORT(driver);
+ mod_tap_regular_key.press();
+ run_one_scan_loop();
+ testing::Mock::VerifyAndClearExpectations(&driver);
+
+ /* Release mod-tap-regular key. */
+ EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LCTL))).Times(AnyNumber());
+ EXPECT_REPORT(driver, (KC_LCTL, KC_A));
+ EXPECT_REPORT(driver, (KC_LCTL));
+ mod_tap_regular_key.release();
+ run_one_scan_loop();
+ testing::Mock::VerifyAndClearExpectations(&driver);
+
+ /* Release mod-tap-hold key. */
+ EXPECT_EMPTY_REPORT(driver);
+ mod_tap_hold_key.release();
+ run_one_scan_loop();
+ testing::Mock::VerifyAndClearExpectations(&driver);
+}
+
+TEST_F(RetroShiftPermissiveHold, tap_regular_key_while_mod_tap_key_is_held_over_tapping_term) {
+ TestDriver driver;
+ InSequence s;
+ auto mod_tap_hold_key = KeymapKey(0, 0, 0, CTL_T(KC_P));
+ auto regular_key = KeymapKey(0, MATRIX_COLS - 1, 0, KC_A);
+
+ set_keymap({mod_tap_hold_key, regular_key});
+
+ /* Press mod-tap-hold key. */
+ EXPECT_NO_REPORT(driver);
+ mod_tap_hold_key.press();
+ run_one_scan_loop();
+ testing::Mock::VerifyAndClearExpectations(&driver);
+
+ /* Press regular key. */
+ EXPECT_NO_REPORT(driver);
+ regular_key.press();
+ run_one_scan_loop();
+ testing::Mock::VerifyAndClearExpectations(&driver);
+
+ /* Release regular key. */
+ EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LCTL))).Times(AnyNumber());
+ EXPECT_REPORT(driver, (KC_LCTL, KC_A));
+ EXPECT_REPORT(driver, (KC_LCTL));
+ regular_key.release();
+ run_one_scan_loop();
+ idle_for(TAPPING_TERM);
+ testing::Mock::VerifyAndClearExpectations(&driver);
+
+ /* Release mod-tap-hold key. */
+ EXPECT_EMPTY_REPORT(driver);
+ mod_tap_hold_key.release();
+ run_one_scan_loop();
+ testing::Mock::VerifyAndClearExpectations(&driver);
+}
+
+TEST_F(RetroShiftPermissiveHold, tap_mod_tap_key_while_mod_tap_key_is_held_over_tapping_term) {
+ TestDriver driver;
+ InSequence s;
+ auto mod_tap_hold_key = KeymapKey(0, 0, 0, CTL_T(KC_P));
+ auto mod_tap_regular_key = KeymapKey(0, MATRIX_COLS - 1, 0, ALT_T(KC_A));
+
+ set_keymap({mod_tap_hold_key, mod_tap_regular_key});
+
+ /* Press mod-tap-hold key. */
+ EXPECT_NO_REPORT(driver);
+ mod_tap_hold_key.press();
+ run_one_scan_loop();
+ testing::Mock::VerifyAndClearExpectations(&driver);
+
+ /* Press mod-tap-regular key. */
+ EXPECT_NO_REPORT(driver);
+ mod_tap_regular_key.press();
+ run_one_scan_loop();
+ testing::Mock::VerifyAndClearExpectations(&driver);
+
+ /* Release mod-tap-regular key. */
+ EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LCTL))).Times(AnyNumber());
+ EXPECT_REPORT(driver, (KC_LCTL, KC_A));
+ EXPECT_REPORT(driver, (KC_LCTL));
+ mod_tap_regular_key.release();
+ run_one_scan_loop();
+ idle_for(TAPPING_TERM);
+ testing::Mock::VerifyAndClearExpectations(&driver);
+
+ /* Release mod-tap-hold key. */
+ EXPECT_EMPTY_REPORT(driver);
+ mod_tap_hold_key.release();
+ run_one_scan_loop();
+ testing::Mock::VerifyAndClearExpectations(&driver);
+}
+
+TEST_F(RetroShiftPermissiveHold, hold_regular_key_while_mod_tap_key_is_held_over_tapping_term) {
+ TestDriver driver;
+ InSequence s;
+ auto mod_tap_hold_key = KeymapKey(0, 0, 0, CTL_T(KC_P));
+ auto regular_key = KeymapKey(0, MATRIX_COLS - 1, 0, KC_A);
+
+ set_keymap({mod_tap_hold_key, regular_key});
+
+ /* Press mod-tap-hold key. */
+ EXPECT_NO_REPORT(driver);
+ mod_tap_hold_key.press();
+ run_one_scan_loop();
+ testing::Mock::VerifyAndClearExpectations(&driver);
+
+ /* Press regular key. */
+ EXPECT_NO_REPORT(driver);
+ regular_key.press();
+ run_one_scan_loop();
+ idle_for(AUTO_SHIFT_TIMEOUT);
+ testing::Mock::VerifyAndClearExpectations(&driver);
+
+ /* Release regular key. */
+ // clang-format off
+ EXPECT_CALL(driver, send_keyboard_mock(AnyOf(
+ KeyboardReport(KC_LCTL, KC_LSFT),
+ KeyboardReport(KC_LSFT),
+ KeyboardReport(KC_LCTL))))
+ .Times(AnyNumber());
+ // clang-format on
+ EXPECT_REPORT(driver, (KC_LCTL, KC_LSFT, KC_A));
+ // clang-format off
+ EXPECT_CALL(driver, send_keyboard_mock(AnyOf(
+ KeyboardReport(KC_LCTL, KC_LSFT),
+ KeyboardReport(KC_LSFT))))
+ .Times(AnyNumber());
+ // clang-format on
+ EXPECT_REPORT(driver, (KC_LCTL));
+ regular_key.release();
+ run_one_scan_loop();
+ testing::Mock::VerifyAndClearExpectations(&driver);
+
+ /* Release mod-tap-hold key. */
+ EXPECT_EMPTY_REPORT(driver);
+ mod_tap_hold_key.release();
+ run_one_scan_loop();
+ testing::Mock::VerifyAndClearExpectations(&driver);
+}
+
+TEST_F(RetroShiftPermissiveHold, hold_mod_tap_key_while_mod_tap_key_is_held_over_tapping_term) {
+ TestDriver driver;
+ InSequence s;
+ auto mod_tap_hold_key = KeymapKey(0, 0, 0, CTL_T(KC_P));
+ auto mod_tap_regular_key = KeymapKey(0, MATRIX_COLS - 1, 0, ALT_T(KC_A));
+
+ set_keymap({mod_tap_hold_key, mod_tap_regular_key});
+
+ /* Press mod-tap-hold key. */
+ EXPECT_NO_REPORT(driver);
+ mod_tap_hold_key.press();
+ run_one_scan_loop();
+ testing::Mock::VerifyAndClearExpectations(&driver);
+
+ /* Press mod-tap-regular key. */
+ EXPECT_NO_REPORT(driver);
+ mod_tap_regular_key.press();
+ run_one_scan_loop();
+ idle_for(AUTO_SHIFT_TIMEOUT);
+ testing::Mock::VerifyAndClearExpectations(&driver);
+
+ /* Release mod-tap-regular key. */
+ // clang-format off
+ EXPECT_CALL(driver, send_keyboard_mock(AnyOf(
+ KeyboardReport(KC_LCTL, KC_LSFT),
+ KeyboardReport(KC_LSFT),
+ KeyboardReport(KC_LCTL))))
+ .Times(AnyNumber());
+ // clang-format on
+ EXPECT_REPORT(driver, (KC_LCTL, KC_LSFT, KC_A));
+ // clang-format off
+ EXPECT_CALL(driver, send_keyboard_mock(AnyOf(
+ KeyboardReport(KC_LCTL, KC_LSFT),
+ KeyboardReport(KC_LSFT))))
+ .Times(AnyNumber());
+ // clang-format on
+ EXPECT_REPORT(driver, (KC_LCTL));
+ mod_tap_regular_key.release();
+ run_one_scan_loop();
+ idle_for(TAPPING_TERM);
+ testing::Mock::VerifyAndClearExpectations(&driver);
+
+ /* Release mod-tap-hold key. */
+ EXPECT_EMPTY_REPORT(driver);
+ mod_tap_hold_key.release();
+ run_one_scan_loop();
+ testing::Mock::VerifyAndClearExpectations(&driver);
+}
+
+TEST_F(RetroShiftPermissiveHold, roll_tap_regular_key_while_mod_tap_key_is_held_under_tapping_term) {
+ TestDriver driver;
+ InSequence s;
+ auto mod_tap_hold_key = KeymapKey(0, 0, 0, CTL_T(KC_P));
+ auto regular_key = KeymapKey(0, MATRIX_COLS - 1, 0, KC_A);
+
+ set_keymap({mod_tap_hold_key, regular_key});
+
+ /* Press mod-tap-hold key. */
+ EXPECT_NO_REPORT(driver);
+ mod_tap_hold_key.press();
+ run_one_scan_loop();
+ testing::Mock::VerifyAndClearExpectations(&driver);
+
+ /* Press regular key. */
+ EXPECT_NO_REPORT(driver);
+ regular_key.press();
+ run_one_scan_loop();
+ testing::Mock::VerifyAndClearExpectations(&driver);
+
+ /* Release mod-tap-hold key. */
+ EXPECT_REPORT(driver, (KC_P));
+ EXPECT_EMPTY_REPORT(driver);
+ mod_tap_hold_key.release();
+ run_one_scan_loop();
+ testing::Mock::VerifyAndClearExpectations(&driver);
+
+ /* Release regular key. */
+ EXPECT_REPORT(driver, (KC_A));
+ EXPECT_EMPTY_REPORT(driver);
+ regular_key.release();
+ run_one_scan_loop();
+ testing::Mock::VerifyAndClearExpectations(&driver);
+}
+
+TEST_F(RetroShiftPermissiveHold, roll_tap_mod_tap_key_while_mod_tap_key_is_held_under_tapping_term) {
+ TestDriver driver;
+ InSequence s;
+ auto mod_tap_hold_key = KeymapKey(0, 0, 0, CTL_T(KC_P));
+ auto mod_tap_regular_key = KeymapKey(0, MATRIX_COLS - 1, 0, ALT_T(KC_A));
+
+ set_keymap({mod_tap_hold_key, mod_tap_regular_key});
+
+ /* Press mod-tap-hold key. */
+ EXPECT_NO_REPORT(driver);
+ mod_tap_hold_key.press();
+ run_one_scan_loop();
+ testing::Mock::VerifyAndClearExpectations(&driver);
+
+ /* Press mod-tap-regular key. */
+ EXPECT_NO_REPORT(driver);
+ mod_tap_regular_key.press();
+ run_one_scan_loop();
+ testing::Mock::VerifyAndClearExpectations(&driver);
+
+ /* Release mod-tap-hold key. */
+ EXPECT_REPORT(driver, (KC_P));
+ EXPECT_EMPTY_REPORT(driver);
+ mod_tap_hold_key.release();
+ run_one_scan_loop();
+ testing::Mock::VerifyAndClearExpectations(&driver);
+
+ /* Release mod-tap-regular key. */
+ EXPECT_REPORT(driver, (KC_A));
+ EXPECT_EMPTY_REPORT(driver);
+ mod_tap_regular_key.release();
+ run_one_scan_loop();
+ testing::Mock::VerifyAndClearExpectations(&driver);
+}
+
+TEST_F(RetroShiftPermissiveHold, roll_hold_regular_key_while_mod_tap_key_is_held_under_tapping_term) {
+ TestDriver driver;
+ InSequence s;
+ auto mod_tap_hold_key = KeymapKey(0, 0, 0, CTL_T(KC_P));
+ auto regular_key = KeymapKey(0, MATRIX_COLS - 1, 0, KC_A);
+
+ set_keymap({mod_tap_hold_key, regular_key});
+
+ /* Press mod-tap-hold key. */
+ EXPECT_NO_REPORT(driver);
+ mod_tap_hold_key.press();
+ run_one_scan_loop();
+ testing::Mock::VerifyAndClearExpectations(&driver);
+
+ /* Press regular key. */
+ EXPECT_NO_REPORT(driver);
+ regular_key.press();
+ run_one_scan_loop();
+ testing::Mock::VerifyAndClearExpectations(&driver);
+
+ /* Release mod-tap-hold key. */
+ EXPECT_REPORT(driver, (KC_P));
+ EXPECT_EMPTY_REPORT(driver);
+ EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT))).Times(AnyNumber());
+ EXPECT_REPORT(driver, (KC_LSFT, KC_A));
+ EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT))).Times(AnyNumber());
+ EXPECT_EMPTY_REPORT(driver);
+ mod_tap_hold_key.release();
+ run_one_scan_loop();
+ idle_for(AUTO_SHIFT_TIMEOUT);
+ testing::Mock::VerifyAndClearExpectations(&driver);
+
+ /* Release regular key. */
+ EXPECT_NO_REPORT(driver);
+ regular_key.release();
+ run_one_scan_loop();
+ testing::Mock::VerifyAndClearExpectations(&driver);
+}
+
+TEST_F(RetroShiftPermissiveHold, roll_hold_mod_tap_key_while_mod_tap_key_is_held_under_tapping_term) {
+ TestDriver driver;
+ InSequence s;
+ auto mod_tap_hold_key = KeymapKey(0, 0, 0, CTL_T(KC_P));
+ auto mod_tap_regular_key = KeymapKey(0, MATRIX_COLS - 1, 0, ALT_T(KC_A));
+
+ set_keymap({mod_tap_hold_key, mod_tap_regular_key});
+
+ /* Press mod-tap-hold key. */
+ EXPECT_NO_REPORT(driver);
+ mod_tap_hold_key.press();
+ run_one_scan_loop();
+ testing::Mock::VerifyAndClearExpectations(&driver);
+
+ /* Press mod-tap-regular key. */
+ EXPECT_NO_REPORT(driver);
+ mod_tap_regular_key.press();
+ run_one_scan_loop();
+ testing::Mock::VerifyAndClearExpectations(&driver);
+
+ /* Release mod-tap-hold key. */
+ EXPECT_REPORT(driver, (KC_P));
+ EXPECT_EMPTY_REPORT(driver);
+ mod_tap_hold_key.release();
+ run_one_scan_loop();
+ testing::Mock::VerifyAndClearExpectations(&driver);
+
+ /* Release mod-tap-regular key. */
+ EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT))).Times(AnyNumber());
+ EXPECT_REPORT(driver, (KC_LSFT, KC_A));
+ EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT))).Times(AnyNumber());
+ EXPECT_EMPTY_REPORT(driver);
+ idle_for(AUTO_SHIFT_TIMEOUT);
+ mod_tap_regular_key.release();
+ run_one_scan_loop();
+ testing::Mock::VerifyAndClearExpectations(&driver);
+}
diff --git a/tmk_core/protocol/chibios/usb_main.c b/tmk_core/protocol/chibios/usb_main.c
index 2a287e0d98..5a5354416f 100644
--- a/tmk_core/protocol/chibios/usb_main.c
+++ b/tmk_core/protocol/chibios/usb_main.c
@@ -325,18 +325,10 @@ static bool usb_requests_hook_cb(USBDriver *usbp) {
return false;
}
-static __attribute__((unused)) void dummy_cb(USBDriver *usbp) {
- (void)usbp;
-}
-
static const USBConfig usbcfg = {
usb_event_cb, /* USB events callback */
usb_get_descriptor_cb, /* Device GET_DESCRIPTOR request callback */
usb_requests_hook_cb, /* Requests hook callback */
-#if STM32_USB_USE_OTG1 == TRUE || STM32_USB_USE_OTG2 == TRUE
- dummy_cb, /* Workaround for OTG Peripherals not servicing new interrupts
- after resuming from suspend. */
-#endif
};
void init_usb_driver(USBDriver *usbp) {
diff --git a/util/install/macos.sh b/util/install/macos.sh
index a1b79fe868..4db2f9be6b 100755
--- a/util/install/macos.sh
+++ b/util/install/macos.sh
@@ -9,23 +9,24 @@ _qmk_install_prepare() {
return 1
fi
+ # Conflicts with arm-none-eabi toolchain from osx-cross
+ brew uninstall --ignore-dependencies --cask gcc-arm-embedded >/dev/null 2>&1
+ brew uninstall --ignore-dependencies homebrew/core/arm-none-eabi-gcc >/dev/null 2>&1
+ brew uninstall --ignore-dependencies homebrew/core/arm-none-eabi-binutils >/dev/null 2>&1
+ brew uninstall --ignore-dependencies osx-cross/arm/arm-gcc-bin@8 >/dev/null 2>&1
+
brew update && brew upgrade --formulae
}
_qmk_install() {
echo "Installing dependencies"
- # All macOS dependencies are managed in the Homebrew package:
- # https://github.com/qmk/homebrew-qmk
+ # All macOS & Python dependencies are managed in the Homebrew package:
+ # https://github.com/qmk/homebrew-qmk
brew install qmk/qmk/qmk
- # Conflicts with new toolchain formulae
- brew uninstall --ignore-dependencies arm-gcc-bin@8 >/dev/null 2>&1
-
# Keg-only, so need to be manually linked
brew link --force avr-gcc@8
brew link --force arm-none-eabi-binutils
brew link --force arm-none-eabi-gcc@8
-
- python3 -m pip install -r $QMK_FIRMWARE_DIR/requirements.txt
}