summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile26
-rw-r--r--builddefs/build_full_test.mk8
-rw-r--r--builddefs/build_json.mk10
-rw-r--r--builddefs/build_keyboard.mk63
-rw-r--r--builddefs/build_test.mk16
-rw-r--r--builddefs/common_features.mk267
-rw-r--r--builddefs/common_rules.mk31
-rw-r--r--builddefs/generic_features.mk1
-rw-r--r--builddefs/message.mk5
-rw-r--r--data/mappings/info_config.hjson24
-rw-r--r--data/mappings/info_rules.hjson1
-rw-r--r--data/mappings/keyboard_aliases.hjson22
-rw-r--r--data/schemas/keyboard.jsonschema50
-rw-r--r--docs/_summary.md2
-rw-r--r--docs/apa102_driver.md49
-rw-r--r--docs/eeprom_driver.md12
-rw-r--r--docs/feature_auto_shift.md18
-rw-r--r--docs/feature_backlight.md4
-rw-r--r--docs/feature_led_matrix.md47
-rw-r--r--docs/feature_oled_driver.md56
-rw-r--r--docs/feature_rgb_matrix.md242
-rw-r--r--docs/feature_rgblight.md37
-rw-r--r--docs/feature_split_keyboard.md2
-rw-r--r--docs/feature_velocikey.md29
-rw-r--r--docs/i2c_driver.md12
-rw-r--r--docs/ja/_summary.md1
-rw-r--r--docs/ja/feature_velocikey.md34
-rw-r--r--docs/quantum_painter.md43
-rw-r--r--docs/quantum_painter_lvgl.md8
-rw-r--r--docs/reference_info_json.md74
-rw-r--r--docs/spi_driver.md17
-rw-r--r--docs/squeezing_avr.md1
-rw-r--r--docs/uart_driver.md12
-rw-r--r--docs/unit_testing.md4
-rw-r--r--docs/ws2812_driver.md278
-rw-r--r--docs/zh-cn/_summary.md1
-rw-r--r--drivers/haptic/solenoid.c5
-rw-r--r--drivers/led/apa102.c10
-rw-r--r--drivers/led/apa102.h2
-rw-r--r--drivers/led/aw20216.c168
-rw-r--r--drivers/led/aw20216s.c168
-rw-r--r--drivers/led/aw20216s.h (renamed from drivers/led/aw20216.h)47
-rw-r--r--drivers/led/ckled2001-simple.c221
-rw-r--r--drivers/led/ckled2001-simple.h337
-rw-r--r--drivers/led/ckled2001.c236
-rw-r--r--drivers/led/ckled2001.h339
-rw-r--r--drivers/led/issi/is31fl3218-simple.c143
-rw-r--r--drivers/led/issi/is31fl3218-simple.h60
-rw-r--r--drivers/led/issi/is31fl3218.c118
-rw-r--r--drivers/led/issi/is31fl3218.h38
-rw-r--r--drivers/led/issi/is31fl3731-simple.c123
-rw-r--r--drivers/led/issi/is31fl3731-simple.h30
-rw-r--r--drivers/led/issi/is31fl3731.c114
-rw-r--r--drivers/led/issi/is31fl3731.h30
-rw-r--r--drivers/led/issi/is31fl3733-simple.c140
-rw-r--r--drivers/led/issi/is31fl3733-simple.h79
-rw-r--r--drivers/led/issi/is31fl3733.c137
-rw-r--r--drivers/led/issi/is31fl3733.h78
-rw-r--r--drivers/led/issi/is31fl3736-simple.c222
-rw-r--r--drivers/led/issi/is31fl3736-simple.h218
-rw-r--r--drivers/led/issi/is31fl3736.c183
-rw-r--r--drivers/led/issi/is31fl3736.h88
-rw-r--r--drivers/led/issi/is31fl3737-simple.c219
-rw-r--r--drivers/led/issi/is31fl3737-simple.h256
-rw-r--r--drivers/led/issi/is31fl3737.c133
-rw-r--r--drivers/led/issi/is31fl3737.h70
-rw-r--r--drivers/led/issi/is31fl3741-simple.c253
-rw-r--r--drivers/led/issi/is31fl3741-simple.h471
-rw-r--r--drivers/led/issi/is31fl3741.c155
-rw-r--r--drivers/led/issi/is31fl3741.h76
-rw-r--r--drivers/led/issi/is31flcommon.h8
-rw-r--r--drivers/led/snled27351-simple.c220
-rw-r--r--drivers/led/snled27351-simple.h376
-rw-r--r--drivers/led/snled27351.c235
-rw-r--r--drivers/led/snled27351.h378
-rw-r--r--drivers/oled/oled_driver.c4
-rw-r--r--drivers/oled/oled_driver.h20
-rw-r--r--drivers/ps2/ps2_mouse.c13
-rw-r--r--drivers/sensors/pmw3320.c2
-rw-r--r--drivers/sensors/pmw3360.c2
-rw-r--r--drivers/sensors/pmw3389.c2
-rw-r--r--drivers/ws2812.h2
-rw-r--r--keyboards/1k/keymaps/default/rgblite.h2
-rw-r--r--keyboards/1k/keymaps/media/rgblite.h2
-rw-r--r--keyboards/1upkeyboards/1upocarina/info.json1
-rw-r--r--keyboards/1upkeyboards/1upocarina/rules.mk2
-rw-r--r--keyboards/1upkeyboards/pi60/config.h2
-rw-r--r--keyboards/1upkeyboards/pi60/info.json787
-rw-r--r--keyboards/1upkeyboards/pi60/keymaps/default/keymap.c8
-rw-r--r--keyboards/1upkeyboards/pi60/keymaps/via/keymap.c20
-rw-r--r--keyboards/1upkeyboards/pi60/matrix_diagram.md60
-rw-r--r--keyboards/1upkeyboards/pi60_hse/config.h2
-rw-r--r--keyboards/1upkeyboards/pi60_hse/info.json3
-rw-r--r--keyboards/1upkeyboards/super16/keymaps/15game/keymap.c2
-rw-r--r--keyboards/1upkeyboards/sweet16v2/kb2040/config.h2
-rw-r--r--keyboards/1upkeyboards/sweet16v2/kb2040/info.json3
-rw-r--r--keyboards/1upkeyboards/sweet16v2/pro_micro/config.h3
-rw-r--r--keyboards/1upkeyboards/sweet16v2/pro_micro/info.json3
-rw-r--r--keyboards/25keys/zinc/keymaps/ginjake/keymap.c8
-rw-r--r--keyboards/3w6/rev1/rules.mk2
-rw-r--r--keyboards/3w6/rev2/rules.mk2
-rw-r--r--keyboards/40percentclub/ut47/rules.mk2
-rw-r--r--keyboards/4pplet/eagle_viper_rep/rev_a/config.h5
-rw-r--r--keyboards/4pplet/eagle_viper_rep/rev_a/info.json3
-rw-r--r--keyboards/4pplet/eagle_viper_rep/rev_b/config.h3
-rw-r--r--keyboards/4pplet/eagle_viper_rep/rev_b/info.json3
-rw-r--r--keyboards/4pplet/perk60_iso/rev_a/config.h6
-rw-r--r--keyboards/4pplet/perk60_iso/rev_a/rev_a.c2
-rw-r--r--keyboards/abko/ak84bt/ak84bt.c2
-rw-r--r--keyboards/abko/ak84bt/config.h6
-rw-r--r--keyboards/acheron/apollo/87h/gamma/config.h4
-rw-r--r--keyboards/acheron/apollo/87h/gamma/gamma.c2
-rw-r--r--keyboards/acheron/shark/beta/info.json3
-rw-r--r--keyboards/acheron/shark/beta/rules.mk3
-rw-r--r--keyboards/adm42/config.h21
-rw-r--r--keyboards/adm42/info.json90
-rw-r--r--keyboards/adm42/rev4/config.h44
-rw-r--r--keyboards/adm42/rev4/info.json163
-rw-r--r--keyboards/adm42/rev4/keymaps/default/config.h2
-rw-r--r--keyboards/adm42/rev4/keymaps/default/keymap.c204
-rw-r--r--keyboards/adm42/rev4/keymaps/default/keymap.json44
-rw-r--r--keyboards/adm42/rev4/rev4.c39
-rw-r--r--keyboards/adm42/rev4/rules.mk2
-rw-r--r--keyboards/adm42/rules.mk16
-rw-r--r--keyboards/aeboards/constellation/rev2/info.json3
-rwxr-xr-xkeyboards/aeboards/constellation/rev2/rules.mk2
-rw-r--r--keyboards/aeboards/ext65/rev1/info.json5
-rw-r--r--keyboards/aeboards/ext65/rev1/keymaps/default/keymap.c20
-rw-r--r--keyboards/aeboards/ext65/rev1/keymaps/via/keymap.c20
-rw-r--r--keyboards/aeboards/ext65/rev2/config.h2
-rw-r--r--keyboards/aeboards/ext65/rev2/info.json5
-rw-r--r--keyboards/aeboards/ext65/rev2/keymaps/default/keymap.c20
-rw-r--r--keyboards/aeboards/ext65/rev2/keymaps/via/keymap.c20
-rw-r--r--keyboards/aeboards/ext65/rev3/info.json5
-rw-r--r--keyboards/aeboards/ext65/rev3/keymaps/default/keymap.c20
-rw-r--r--keyboards/aeboards/ext65/rev3/keymaps/via/keymap.c20
-rw-r--r--keyboards/aeboards/satellite/rev1/config.h6
-rw-r--r--keyboards/aeboards/satellite/rev1/rev1.c2
-rw-r--r--keyboards/aeboards/satellite/rev1/rules.mk2
-rw-r--r--keyboards/akko/5108/5108.c4
-rw-r--r--keyboards/akko/5108/config.h10
-rw-r--r--keyboards/akko/5108/info.json12
-rw-r--r--keyboards/akko/5108/rules.mk3
-rw-r--r--keyboards/akko/acr87/acr87.c4
-rw-r--r--keyboards/akko/acr87/config.h12
-rw-r--r--keyboards/akko/acr87/info.json12
-rw-r--r--keyboards/akko/acr87/rules.mk4
-rw-r--r--keyboards/akko/top40/config.h10
-rw-r--r--keyboards/akko/top40/info.json12
-rw-r--r--keyboards/akko/top40/rules.mk7
-rw-r--r--keyboards/akko/top40/top40.c4
-rw-r--r--keyboards/anavi/knob1/rules.mk2
-rw-r--r--keyboards/anavi/knobs3/rules.mk2
-rw-r--r--keyboards/annepro2/annepro2_ble.c2
-rw-r--r--keyboards/annepro2/c15/config.h4
-rw-r--r--keyboards/annepro2/c15/info.json7
-rw-r--r--keyboards/annepro2/c15/rules.mk4
-rw-r--r--keyboards/annepro2/c18/config.h4
-rw-r--r--keyboards/annepro2/c18/info.json7
-rw-r--r--keyboards/annepro2/c18/rules.mk4
-rw-r--r--keyboards/axolstudio/yeti/hotswap/config.h4
-rw-r--r--keyboards/axolstudio/yeti/hotswap/hotswap.c2
-rw-r--r--keyboards/bajjak/rules.mk2
-rw-r--r--keyboards/barleycorn_smd/rules.mk2
-rw-r--r--keyboards/bastardkb/charybdis/3x5/blackpill/info.json3
-rw-r--r--keyboards/bastardkb/charybdis/3x5/blackpill/rules.mk1
-rw-r--r--keyboards/bastardkb/charybdis/3x5/v2/splinky_2/rules.mk4
-rw-r--r--keyboards/bastardkb/charybdis/3x5/v2/splinky_3/rules.mk4
-rw-r--r--keyboards/bastardkb/charybdis/3x6/blackpill/info.json3
-rw-r--r--keyboards/bastardkb/charybdis/3x6/blackpill/rules.mk1
-rw-r--r--keyboards/bastardkb/charybdis/3x6/v2/splinky_2/rules.mk4
-rw-r--r--keyboards/bastardkb/charybdis/3x6/v2/splinky_3/rules.mk4
-rw-r--r--keyboards/bastardkb/charybdis/4x6/blackpill/info.json3
-rw-r--r--keyboards/bastardkb/charybdis/4x6/blackpill/rules.mk1
-rw-r--r--keyboards/bastardkb/charybdis/4x6/v2/splinky_2/rules.mk4
-rw-r--r--keyboards/bastardkb/charybdis/4x6/v2/splinky_3/rules.mk4
-rw-r--r--keyboards/bastardkb/dilemma/3x5_2/assembled/rules.mk3
-rw-r--r--keyboards/bastardkb/dilemma/3x5_2/splinky/rules.mk3
-rw-r--r--keyboards/bastardkb/dilemma/3x5_3/rules.mk3
-rw-r--r--keyboards/bastardkb/scylla/blackpill/info.json3
-rw-r--r--keyboards/bastardkb/scylla/blackpill/rules.mk1
-rw-r--r--keyboards/bastardkb/scylla/v2/splinky_2/rules.mk4
-rw-r--r--keyboards/bastardkb/scylla/v2/splinky_3/rules.mk4
-rw-r--r--keyboards/bastardkb/skeletyl/blackpill/info.json3
-rw-r--r--keyboards/bastardkb/skeletyl/blackpill/rules.mk1
-rw-r--r--keyboards/bastardkb/skeletyl/v2/splinky_2/rules.mk4
-rw-r--r--keyboards/bastardkb/skeletyl/v2/splinky_3/rules.mk4
-rw-r--r--keyboards/bastardkb/tbkmini/blackpill/info.json3
-rw-r--r--keyboards/bastardkb/tbkmini/blackpill/rules.mk1
-rw-r--r--keyboards/bastardkb/tbkmini/v2/splinky_2/rules.mk4
-rw-r--r--keyboards/bastardkb/tbkmini/v2/splinky_3/rules.mk4
-rwxr-xr-xkeyboards/bemeier/bmek/config.h2
-rwxr-xr-xkeyboards/bemeier/bmek/info.json3
-rwxr-xr-xkeyboards/binepad/bn006/config.h8
-rwxr-xr-xkeyboards/binepad/bn006/info.json5
-rwxr-xr-xkeyboards/binepad/bn006/rules.mk6
-rw-r--r--keyboards/binepad/bn009/r2/config.h12
-rw-r--r--keyboards/binepad/bn009/r2/info.json5
-rw-r--r--keyboards/binepad/bnr1/v2/config.h7
-rw-r--r--keyboards/binepad/bnr1/v2/rules.mk6
-rw-r--r--keyboards/bioi/ble.h30
-rw-r--r--keyboards/bioi/bluetooth_custom.c (renamed from keyboards/bioi/ble.c)41
-rw-r--r--keyboards/bioi/g60/rules.mk6
-rw-r--r--keyboards/bioi/g60ble/rules.mk7
-rw-r--r--keyboards/bioi/morgan65/rules.mk6
-rw-r--r--keyboards/bioi/usart.c1522
-rw-r--r--keyboards/bioi/usart.h436
-rw-r--r--keyboards/bpiphany/kitten_paw/keymaps/ickerwx/keymap.c1
-rw-r--r--keyboards/bt66tech/bt66tech60/config.h2
-rw-r--r--keyboards/canary/canary60rgb/canary60rgb.c2
-rw-r--r--keyboards/canary/canary60rgb/v1/config.h4
-rw-r--r--keyboards/cannonkeys/an_c/config.h2
-rw-r--r--keyboards/cannonkeys/atlas/config.h2
-rw-r--r--keyboards/cannonkeys/brutalv2_1800/rules.mk3
-rw-r--r--keyboards/cannonkeys/caerdroia/rules.mk3
-rw-r--r--keyboards/cannonkeys/cloudline/config.h2
-rw-r--r--keyboards/cannonkeys/db60/config.h2
-rw-r--r--keyboards/cannonkeys/devastatingtkl/config.h2
-rw-r--r--keyboards/cannonkeys/instant60/config.h2
-rw-r--r--keyboards/cannonkeys/instant65/config.h2
-rw-r--r--keyboards/cannonkeys/malicious_ergo/config.h2
-rw-r--r--keyboards/cannonkeys/obliterated75/config.h2
-rw-r--r--keyboards/cannonkeys/ortho48/config.h2
-rw-r--r--keyboards/cannonkeys/ortho48v2/rules.mk3
-rw-r--r--keyboards/cannonkeys/ortho60/config.h2
-rw-r--r--keyboards/cannonkeys/ortho60v2/rules.mk3
-rw-r--r--keyboards/cannonkeys/ortho75/config.h2
-rw-r--r--keyboards/cannonkeys/practice60/config.h2
-rw-r--r--keyboards/cannonkeys/practice65/config.h2
-rw-r--r--keyboards/cannonkeys/ripple/config.h2
-rw-r--r--keyboards/cannonkeys/sagittarius/config.h2
-rw-r--r--keyboards/cannonkeys/savage65/config.h2
-rw-r--r--keyboards/cannonkeys/serenity/config.h2
-rw-r--r--keyboards/cannonkeys/tmov2/config.h2
-rw-r--r--keyboards/cannonkeys/tsukuyomi/config.h2
-rw-r--r--keyboards/cannonkeys/typeb/rules.mk3
-rw-r--r--keyboards/capsunlocked/cu75/config.h2
-rw-r--r--keyboards/capsunlocked/cu75/cu75.c45
-rw-r--r--keyboards/capsunlocked/cu75/cu75.h17
-rw-r--r--keyboards/capsunlocked/cu75/info.json24
-rw-r--r--keyboards/capsunlocked/cu75/keymaps/default/rules.mk5
-rw-r--r--keyboards/capsunlocked/cu75/keymaps/iso/rules.mk5
-rw-r--r--keyboards/capsunlocked/cu75/post_rules.mk4
-rw-r--r--keyboards/capsunlocked/cu75/rules.mk3
-rw-r--r--keyboards/centromere/rules.mk2
-rw-r--r--keyboards/chosfox/cf81/cf81.c4
-rw-r--r--keyboards/chosfox/cf81/config.h10
-rw-r--r--keyboards/chosfox/cf81/info.json8
-rw-r--r--keyboards/chosfox/cf81/rules.mk2
-rw-r--r--keyboards/chromatonemini/chromatonemini.c60
-rw-r--r--keyboards/chromatonemini/config.h49
-rw-r--r--keyboards/chromatonemini/info.json180
-rw-r--r--keyboards/chromatonemini/rules.mk1
-rw-r--r--keyboards/citrus/erdnuss65/info.json50
-rw-r--r--keyboards/citrus/erdnuss65/keymaps/default/keymap.c11
-rw-r--r--keyboards/citrus/erdnuss65/keymaps/via/keymap.c13
-rw-r--r--keyboards/clickety_split/leeloo/info.json141
-rw-r--r--keyboards/clickety_split/leeloo/keymaps/default/config.h38
-rw-r--r--keyboards/clickety_split/leeloo/keymaps/default/keymap.c26
-rw-r--r--keyboards/clickety_split/leeloo/leeloo.c32
-rw-r--r--keyboards/clickety_split/leeloo/readme.md31
-rw-r--r--keyboards/clickety_split/leeloo/rev1/info.json6
-rw-r--r--keyboards/clickety_split/leeloo/rev2/config.h22
-rw-r--r--keyboards/clickety_split/leeloo/rev2/info.json102
-rw-r--r--keyboards/clickety_split/leeloo/rev2/rules.mk1
-rw-r--r--keyboards/clickety_split/leeloo/rev3/config.h22
-rw-r--r--keyboards/clickety_split/leeloo/rev3/info.json86
-rw-r--r--keyboards/clickety_split/leeloo/rev3/rules.mk1
-rw-r--r--keyboards/clickety_split/leeloo/rules.mk17
-rw-r--r--keyboards/clueboard/2x1800/2021/rules.mk3
-rw-r--r--keyboards/clueboard/66/keymaps/magicmonty/keymap.c6
-rw-r--r--keyboards/clueboard/66_hotswap/gen1/config.h11
-rw-r--r--keyboards/clueboard/66_hotswap/gen1/gen1.c2
-rw-r--r--keyboards/converter/palm_usb/rules.mk2
-rw-r--r--keyboards/converter/sun_usb/rules.mk2
-rw-r--r--keyboards/crimsonkeyboards/resume1800/info.json8
-rw-r--r--keyboards/crimsonkeyboards/resume1800/keymaps/dee/keymap.c2
-rw-r--r--keyboards/crimsonkeyboards/resume1800/keymaps/default/keymap.c2
-rw-r--r--keyboards/crimsonkeyboards/resume1800/keymaps/iso/keymap.c2
-rw-r--r--keyboards/crimsonkeyboards/resume1800/keymaps/via/keymap.c2
-rw-r--r--keyboards/crkbd/keymaps/vlukash_trackpad_right/keymap.c9
-rw-r--r--keyboards/crowboard/rules.mk2
-rw-r--r--keyboards/custommk/ergostrafer/info.json3
-rw-r--r--keyboards/custommk/ergostrafer/rules.mk2
-rw-r--r--keyboards/custommk/evo70_r2/info.json3
-rw-r--r--keyboards/custommk/evo70_r2/rules.mk2
-rw-r--r--keyboards/dc01/left/rules.mk4
-rw-r--r--keyboards/deng/thirty/config.h5
-rw-r--r--keyboards/deng/thirty/info.json3
-rwxr-xr-xkeyboards/dichotomy/rules.mk2
-rw-r--r--keyboards/dm9records/lain/config.h2
-rw-r--r--keyboards/dm9records/lain/info.json3
-rw-r--r--keyboards/dm9records/plaid/keymaps/gipsy-king/keymap.c2
-rw-r--r--keyboards/doio/kb16/rev2/rules.mk4
-rw-r--r--keyboards/doio/kb30/config.h3
-rw-r--r--keyboards/dp3000/info.json59
-rw-r--r--keyboards/dp3000/readme.md13
-rw-r--r--keyboards/dp3000/rev1/info.json59
-rw-r--r--keyboards/dp3000/rev1/rules.mk1
-rw-r--r--keyboards/dp3000/rev2/info.json31
-rw-r--r--keyboards/dp3000/rev2/rules.mk1
-rw-r--r--keyboards/dp3000/rules.mk2
-rw-r--r--keyboards/dp60/config.h6
-rw-r--r--keyboards/dp60/dp60.c2
-rw-r--r--keyboards/dp60/keymaps/indicator/indicator.c4
-rw-r--r--keyboards/dp60/keymaps/indicator/led_driver.c2
-rw-r--r--keyboards/drop/alt/v2/config.h13
-rw-r--r--keyboards/drop/alt/v2/info.json1
-rw-r--r--keyboards/drop/alt/v2/v2.c2
-rw-r--r--keyboards/drop/cstm80/config.h13
-rw-r--r--keyboards/drop/cstm80/cstm80.c2
-rw-r--r--keyboards/drop/cstm80/info.json1
-rw-r--r--keyboards/drop/ctrl/v2/config.h13
-rw-r--r--keyboards/drop/ctrl/v2/info.json1
-rw-r--r--keyboards/drop/ctrl/v2/v2.c2
-rw-r--r--keyboards/drop/sense75/config.h13
-rw-r--r--keyboards/drop/sense75/info.json1
-rw-r--r--keyboards/drop/sense75/sense75.c2
-rw-r--r--keyboards/drop/shift/v2/config.h15
-rw-r--r--keyboards/drop/shift/v2/info.json1
-rw-r--r--keyboards/drop/shift/v2/v2.c2
-rw-r--r--keyboards/durgod/dgk6x/config.h17
-rw-r--r--keyboards/durgod/dgk6x/galaxy/galaxy.c2
-rw-r--r--keyboards/durgod/dgk6x/hades_ansi/hades_ansi.c2
-rw-r--r--keyboards/durgod/dgk6x/hades_iso/hades_iso.c2
-rw-r--r--keyboards/durgod/dgk6x/venus/venus.c2
-rw-r--r--keyboards/dyz/dyz60/config.h20
-rw-r--r--keyboards/dyz/dyz60_hs/config.h20
-rw-r--r--keyboards/dyz/selka40/config.h20
-rw-r--r--keyboards/dyz/synthesis60/config.h20
-rw-r--r--keyboards/dztech/dz60rgb/dz60rgb.c2
-rw-r--r--keyboards/dztech/dz60rgb/v1/config.h4
-rw-r--r--keyboards/dztech/dz60rgb/v2/config.h4
-rw-r--r--keyboards/dztech/dz60rgb/v2_1/config.h4
-rw-r--r--keyboards/dztech/dz60rgb_ansi/dz60rgb_ansi.c2
-rw-r--r--keyboards/dztech/dz60rgb_ansi/v1/config.h4
-rw-r--r--keyboards/dztech/dz60rgb_ansi/v2/config.h4
-rw-r--r--keyboards/dztech/dz60rgb_ansi/v2_1/config.h4
-rw-r--r--keyboards/dztech/dz60rgb_wkl/dz60rgb_wkl.c2
-rw-r--r--keyboards/dztech/dz60rgb_wkl/v1/config.h4
-rw-r--r--keyboards/dztech/dz60rgb_wkl/v2/config.h4
-rw-r--r--keyboards/dztech/dz60rgb_wkl/v2_1/config.h4
-rw-r--r--keyboards/dztech/dz64rgb/config.h4
-rw-r--r--keyboards/dztech/dz64rgb/dz64rgb.c2
-rw-r--r--keyboards/dztech/dz65rgb/v1/config.h6
-rw-r--r--keyboards/dztech/dz65rgb/v1/v1.c2
-rw-r--r--keyboards/dztech/dz65rgb/v2/config.h6
-rw-r--r--keyboards/dztech/dz65rgb/v2/v2.c2
-rwxr-xr-xkeyboards/dztech/dz65rgb/v3/config.h4
-rwxr-xr-xkeyboards/dztech/dz65rgb/v3/v3.c2
-rw-r--r--keyboards/dztech/og60/info.json448
-rw-r--r--keyboards/dztech/tofu/ii/v1/config.h6
-rw-r--r--keyboards/dztech/tofu/ii/v1/v1.c2
-rw-r--r--keyboards/dztech/tofu/jr/v1/config.h6
-rw-r--r--keyboards/dztech/tofu/jr/v1/readme.md (renamed from keyboards/dztech/tofu/jr/readme.md)4
-rw-r--r--keyboards/dztech/tofu/jr/v1/v1.c2
-rw-r--r--keyboards/dztech/tofu/jr/v2/config.h24
-rw-r--r--keyboards/dztech/tofu/jr/v2/info.json124
-rw-r--r--keyboards/dztech/tofu/jr/v2/readme.md22
-rw-r--r--keyboards/dztech/tofu/jr/v2/rules.mk1
-rw-r--r--keyboards/dztech/tofu60/info.json740
-rw-r--r--keyboards/dztech/tofu60/keymaps/default/keymap.c (renamed from keyboards/dztech/og60/keymaps/default/keymap.c)0
-rw-r--r--keyboards/dztech/tofu60/keymaps/via/keymap.c (renamed from keyboards/dztech/og60/keymaps/via/keymap.c)0
-rw-r--r--keyboards/dztech/tofu60/keymaps/via/rules.mk (renamed from keyboards/dztech/og60/keymaps/via/rules.mk)0
-rw-r--r--keyboards/dztech/tofu60/matrix_diagram.md24
-rw-r--r--keyboards/dztech/tofu60/readme.md (renamed from keyboards/dztech/og60/readme.md)6
-rw-r--r--keyboards/dztech/tofu60/rules.mk (renamed from keyboards/dztech/og60/rules.mk)0
-rw-r--r--keyboards/eason/aeroboard/config.h2
-rw-r--r--keyboards/era/divine/config.h20
-rw-r--r--keyboards/era/divine/halconf.h21
-rw-r--r--keyboards/era/divine/info.json9
-rw-r--r--keyboards/era/divine/mcuconf.h22
-rw-r--r--keyboards/era/divine/readme.md4
-rw-r--r--keyboards/ergodox_ez/config.h6
-rw-r--r--keyboards/ergodox_ez/ergodox_ez.c2
-rw-r--r--keyboards/ergodox_ez/keymaps/pvinis/keymap.c1
-rw-r--r--keyboards/ergodox_ez/led_i2c.c2
-rw-r--r--keyboards/ergodox_ez/rules.mk2
-rw-r--r--keyboards/ergodox_stm32/rules.mk2
-rw-r--r--keyboards/ergoslab/keymaps/default/keymap.c8
-rw-r--r--keyboards/ergoslab/rev1/info.json5
-rw-r--r--keyboards/evolv/info.json8
-rwxr-xr-xkeyboards/evolv/keymaps/default/keymap.c22
-rwxr-xr-xkeyboards/evolv/keymaps/gondolindrim/keymap.c8
-rwxr-xr-xkeyboards/evolv/keymaps/iso/keymap.c22
-rwxr-xr-xkeyboards/evolv/keymaps/via/keymap.c22
-rw-r--r--keyboards/evyd13/atom47/rev5/config.h14
-rw-r--r--keyboards/evyd13/atom47/rev5/rev5.c2
-rw-r--r--keyboards/exclusive/e6_rgb/config.h4
-rw-r--r--keyboards/exclusive/e6_rgb/e6_rgb.c2
-rw-r--r--keyboards/eyeohdesigns/babyv/info.json42
-rwxr-xr-xkeyboards/fallacy/config.h4
-rwxr-xr-xkeyboards/fallacy/indicators.c2
-rwxr-xr-xkeyboards/fallacy/rules.mk2
-rw-r--r--keyboards/fc660c/actuation_point.c87
-rw-r--r--keyboards/fc660c/ad5258.c52
-rw-r--r--keyboards/fc660c/ad5258.h (renamed from keyboards/dyz/dyz_tkl/config.h)12
-rw-r--r--keyboards/fc660c/config.h2
-rw-r--r--keyboards/fc660c/fc660c.c45
-rw-r--r--keyboards/fc660c/fc660c.h (renamed from keyboards/fc660c/actuation_point.h)8
-rw-r--r--keyboards/fc660c/i2c.c162
-rw-r--r--keyboards/fc660c/i2c.h46
-rw-r--r--keyboards/fc660c/rules.mk6
-rw-r--r--keyboards/fc980c/actuation_point.c87
-rw-r--r--keyboards/fc980c/ad5258.c52
-rw-r--r--keyboards/fc980c/ad5258.h (renamed from keyboards/dyz/dyz40/config.h)12
-rw-r--r--keyboards/fc980c/config.h2
-rw-r--r--keyboards/fc980c/fc980c.c44
-rw-r--r--keyboards/fc980c/fc980c.h (renamed from keyboards/fc980c/actuation_point.h)8
-rw-r--r--keyboards/fc980c/i2c.c162
-rw-r--r--keyboards/fc980c/i2c.h46
-rw-r--r--keyboards/fc980c/keymaps/actuation-point-example/config.h8
-rw-r--r--keyboards/fc980c/keymaps/actuation-point-example/keymap.c5
-rw-r--r--keyboards/fc980c/rules.mk6
-rw-r--r--keyboards/feker/ik75/config.h6
-rw-r--r--keyboards/feker/ik75/ik75.c2
-rw-r--r--keyboards/ferris/0_1/rules.mk2
-rw-r--r--keyboards/ferris/0_2/bling/bling.c2
-rw-r--r--keyboards/ferris/0_2/bling/config.h6
-rw-r--r--keyboards/ferris/0_2/rules.mk2
-rwxr-xr-xkeyboards/flashquark/horizon_z/config.h4
-rwxr-xr-xkeyboards/flashquark/horizon_z/horizon_z.c2
-rw-r--r--keyboards/frobiac/blackbowl/rules.mk2
-rw-r--r--keyboards/frooastboard/walnut/config.h10
-rw-r--r--keyboards/frooastboard/walnut/walnut.c2
-rw-r--r--keyboards/gboards/butterstick/sten.h2
-rw-r--r--keyboards/gboards/ergotaco/rules.mk3
-rw-r--r--keyboards/gboards/georgi/rules.mk3
-rw-r--r--keyboards/gboards/georgi/sten.h2
-rw-r--r--keyboards/gboards/gergo/keymaps/colemak/rules.mk3
-rw-r--r--keyboards/gboards/gergo/keymaps/default/rules.mk3
-rw-r--r--keyboards/gboards/gergo/keymaps/germ/rules.mk3
-rw-r--r--keyboards/gboards/gergo/keymaps/gotham/rules.mk3
-rw-r--r--keyboards/gboards/gergo/rules.mk2
-rw-r--r--keyboards/gboards/gergoplex/rules.mk2
-rw-r--r--keyboards/geekboards/tester/config.h6
-rw-r--r--keyboards/geekboards/tester/tester.c2
-rw-r--r--keyboards/geistmaschine/macropod/rules.mk2
-rw-r--r--keyboards/geonworks/frogmini/fmh/info.json3
-rw-r--r--keyboards/geonworks/frogmini/fmh/rules.mk3
-rw-r--r--keyboards/geonworks/frogmini/fms/info.json3
-rw-r--r--keyboards/geonworks/frogmini/fms/rules.mk3
-rwxr-xr-xkeyboards/gizmo_engineering/gk6/config.h6
-rwxr-xr-xkeyboards/gizmo_engineering/gk6/gk6.c2
-rw-r--r--keyboards/gkeyboard/gpad8_2r/config.h2
-rw-r--r--keyboards/gkeyboard/gpad8_2r/info.json3
-rw-r--r--keyboards/glenpickle/chimera_ergo/rules.mk2
-rw-r--r--keyboards/glenpickle/chimera_ls/rules.mk2
-rw-r--r--keyboards/glenpickle/chimera_ortho/rules.mk2
-rw-r--r--keyboards/glenpickle/chimera_ortho_plus/rules.mk2
-rw-r--r--keyboards/gmmk/gmmk2/p65/ansi/ansi.c4
-rw-r--r--keyboards/gmmk/gmmk2/p65/ansi/info.json2
-rw-r--r--keyboards/gmmk/gmmk2/p65/ansi/rules.mk2
-rw-r--r--keyboards/gmmk/gmmk2/p65/config.h10
-rw-r--r--keyboards/gmmk/gmmk2/p65/iso/info.json7
-rw-r--r--keyboards/gmmk/gmmk2/p65/iso/iso.c4
-rw-r--r--keyboards/gmmk/gmmk2/p65/iso/keymaps/default/keymap.c12
-rw-r--r--keyboards/gmmk/gmmk2/p65/iso/keymaps/via/keymap.c22
-rw-r--r--keyboards/gmmk/gmmk2/p65/iso/rules.mk2
-rw-r--r--keyboards/gmmk/gmmk2/p96/ansi/ansi.c4
-rw-r--r--keyboards/gmmk/gmmk2/p96/ansi/info.json9
-rw-r--r--keyboards/gmmk/gmmk2/p96/ansi/rules.mk2
-rw-r--r--keyboards/gmmk/gmmk2/p96/config.h11
-rw-r--r--keyboards/gmmk/gmmk2/p96/iso/info.json9
-rw-r--r--keyboards/gmmk/gmmk2/p96/iso/iso.c4
-rw-r--r--keyboards/gmmk/gmmk2/p96/iso/rules.mk2
-rw-r--r--keyboards/gmmk/numpad/config.h9
-rw-r--r--keyboards/gmmk/numpad/info.json9
-rw-r--r--keyboards/gmmk/numpad/numpad.c19
-rw-r--r--keyboards/gmmk/numpad/rules.mk3
-rw-r--r--keyboards/gmmk/pro/config.h10
-rw-r--r--keyboards/gmmk/pro/rev1/ansi/ansi.c2
-rw-r--r--keyboards/gmmk/pro/rev1/ansi/info.json2
-rw-r--r--keyboards/gmmk/pro/rev1/ansi/keymaps/mattgauf/ansi.c241
-rw-r--r--keyboards/gmmk/pro/rev1/ansi/keymaps/mattgauf/config.h63
-rw-r--r--keyboards/gmmk/pro/rev1/ansi/keymaps/mattgauf/helpers.c25
-rw-r--r--keyboards/gmmk/pro/rev1/ansi/keymaps/mattgauf/keymap.c222
-rw-r--r--keyboards/gmmk/pro/rev1/ansi/keymaps/mattgauf/keymap_helpers.h165
-rw-r--r--keyboards/gmmk/pro/rev1/ansi/keymaps/mattgauf/readme.md52
-rw-r--r--keyboards/gmmk/pro/rev1/ansi/keymaps/mattgauf/rules.mk6
-rw-r--r--keyboards/gmmk/pro/rev1/iso/info.json2
-rw-r--r--keyboards/gmmk/pro/rev1/iso/iso.c2
-rw-r--r--keyboards/gmmk/pro/rev2/ansi/ansi.c2
-rw-r--r--keyboards/gmmk/pro/rev2/ansi/info.json9
-rw-r--r--keyboards/gmmk/pro/rev2/ansi/rules.mk2
-rw-r--r--keyboards/gmmk/pro/rev2/config.h1
-rw-r--r--keyboards/gmmk/pro/rev2/iso/info.json9
-rw-r--r--keyboards/gmmk/pro/rev2/iso/iso.c2
-rw-r--r--keyboards/gmmk/pro/rev2/iso/rules.mk2
-rw-r--r--keyboards/handwired/co60/rev7/config.h2
-rw-r--r--keyboards/handwired/dactyl/rules.mk2
-rw-r--r--keyboards/handwired/dactyl_manuform/dmote/62key/config.h5
-rw-r--r--keyboards/handwired/dactyl_manuform/dmote/62key/keymaps/default/config.h3
-rw-r--r--keyboards/handwired/dactyl_manuform/dmote/62key/rules.mk5
-rw-r--r--keyboards/handwired/dactyl_manuform/dmote/readme.md16
-rw-r--r--keyboards/handwired/dactyl_minidox/info.json8
-rw-r--r--keyboards/handwired/dactyl_minidox/rules.mk13
-rw-r--r--keyboards/handwired/dmote/config.h (renamed from keyboards/kabedon/kabedon980/config.h)5
-rw-r--r--keyboards/handwired/dmote/info.json (renamed from keyboards/handwired/dactyl_manuform/dmote/62key/info.json)90
-rw-r--r--keyboards/handwired/dmote/keymaps/default/keymap.c (renamed from keyboards/handwired/dactyl_manuform/dmote/62key/keymaps/default/keymap.c)93
-rw-r--r--keyboards/handwired/dmote/readme.md29
-rw-r--r--keyboards/handwired/dmote/rules.mk1
-rw-r--r--keyboards/handwired/dqz11n1g/rules.mk2
-rw-r--r--keyboards/handwired/dygma/raise/rules.mk2
-rw-r--r--keyboards/handwired/frenchdev/rules.mk4
-rw-r--r--keyboards/handwired/lagrange/rules.mk3
-rw-r--r--keyboards/handwired/lovelive9/keymaps/default/keymap.c20
-rw-r--r--keyboards/handwired/onekey/kb2040/rules.mk2
-rw-r--r--keyboards/handwired/onekey/keymaps/i2c_scanner/rules.mk2
-rw-r--r--keyboards/handwired/orbweaver/config.h4
-rw-r--r--keyboards/handwired/orbweaver/orbweaver.c2
-rw-r--r--keyboards/handwired/phantagom/baragon/info.json1
-rw-r--r--keyboards/handwired/phantagom/baragon/rules.mk3
-rw-r--r--keyboards/handwired/phantagom/varan/info.json1
-rw-r--r--keyboards/handwired/phantagom/varan/rules.mk3
-rw-r--r--keyboards/handwired/promethium/rgbsps.c2
-rw-r--r--keyboards/handwired/pterodactyl/rules.mk2
-rw-r--r--keyboards/handwired/rabijl/rotary_numpad/info.json66
-rw-r--r--keyboards/handwired/rabijl/rotary_numpad/keymaps/default/keymap.c62
-rw-r--r--keyboards/handwired/rabijl/rotary_numpad/keymaps/default/rules.mk2
-rw-r--r--keyboards/handwired/rabijl/rotary_numpad/readme.md67
-rw-r--r--keyboards/handwired/rabijl/rotary_numpad/rules.mk1
-rw-r--r--keyboards/handwired/steamvan/rev1/config.h2
-rw-r--r--keyboards/handwired/swiftrax/beegboy/config.h21
-rw-r--r--keyboards/handwired/swiftrax/cowfish/config.h21
-rw-r--r--keyboards/handwired/swiftrax/glacier/config.h21
-rw-r--r--keyboards/handwired/swiftrax/joypad/config.h21
-rw-r--r--keyboards/handwired/swiftrax/koalafications/config.h21
-rw-r--r--keyboards/handwired/swiftrax/nodu/config.h21
-rw-r--r--keyboards/handwired/swiftrax/pandamic/config.h21
-rw-r--r--keyboards/handwired/swiftrax/the_galleon/config.h21
-rw-r--r--keyboards/handwired/swiftrax/the_galleon/info.json3
-rw-r--r--keyboards/handwired/tractyl_manuform/5x6_right/f303/info.json3
-rw-r--r--keyboards/handwired/tractyl_manuform/5x6_right/f303/rules.mk1
-rw-r--r--keyboards/handwired/tractyl_manuform/5x6_right/f411/info.json3
-rw-r--r--keyboards/handwired/tractyl_manuform/5x6_right/f411/rules.mk1
-rw-r--r--keyboards/handwired/traveller/keymaps/default/keymap.c1
-rw-r--r--keyboards/hazel/bad_wings/rules.mk2
-rw-r--r--keyboards/hfdkb/ac001/config.h1
-rw-r--r--keyboards/hfdkb/ac001/info.json7
-rw-r--r--keyboards/hfdkb/ac001/rules.mk2
-rw-r--r--keyboards/hineybush/hbcp/hbcp.c14
-rw-r--r--keyboards/hineybush/hbcp/keymaps/hiney/keymap.c12
-rw-r--r--keyboards/horrortroll/handwired_k552/config.h4
-rw-r--r--keyboards/horrortroll/handwired_k552/info.json7
-rw-r--r--keyboards/horrortroll/handwired_k552/rules.mk4
-rw-r--r--keyboards/hotdox/rules.mk2
-rw-r--r--keyboards/hs60/v1/config.h6
-rw-r--r--keyboards/hs60/v1/v1.c4
-rw-r--r--keyboards/hs60/v2/ansi/config.h2
-rw-r--r--keyboards/hs60/v2/ansi/rules.mk4
-rw-r--r--keyboards/hs60/v2/hhkb/config.h2
-rw-r--r--keyboards/hs60/v2/hhkb/rules.mk4
-rw-r--r--keyboards/hs60/v2/iso/config.h2
-rw-r--r--keyboards/hs60/v2/iso/rules.mk4
-rw-r--r--keyboards/ibm/model_m/mschwingen/mschwingen.c22
-rw-r--r--keyboards/ibm/model_m/mschwingen/rules.mk4
-rw-r--r--keyboards/ibm/model_m/yugo_m/config.h4
-rw-r--r--keyboards/ibm/model_m/yugo_m/info.json5
-rw-r--r--keyboards/idyllic/tinny50_rgb/config.h3
-rw-r--r--keyboards/idyllic/tinny50_rgb/info.json3
-rw-r--r--keyboards/ilumkb/simpler61/config.h4
-rw-r--r--keyboards/ilumkb/simpler61/simpler61.c2
-rw-r--r--keyboards/ilumkb/simpler64/config.h4
-rw-r--r--keyboards/ilumkb/simpler64/simpler64.c2
-rw-r--r--keyboards/inett_studio/sqx/hotswap/config.h6
-rw-r--r--keyboards/inett_studio/sqx/hotswap/hotswap.c2
-rw-r--r--keyboards/inett_studio/sqx/universal/config.h6
-rw-r--r--keyboards/inett_studio/sqx/universal/universal.c2
-rw-r--r--keyboards/ingrained/rules.mk2
-rw-r--r--keyboards/inland/kb83/config.h7
-rw-r--r--keyboards/inland/kb83/info.json9
-rw-r--r--keyboards/inland/kb83/kb83.c4
-rw-r--r--keyboards/inland/kb83/rules.mk2
-rw-r--r--keyboards/inland/mk47/config.h6
-rw-r--r--keyboards/inland/mk47/info.json11
-rw-r--r--keyboards/inland/mk47/mk47.c4
-rw-r--r--keyboards/inland/mk47/rules.mk3
-rw-r--r--keyboards/input_club/ergodox_infinity/config.h4
-rw-r--r--keyboards/input_club/ergodox_infinity/ergodox_infinity.c7
-rw-r--r--keyboards/input_club/infinity60/keymaps/default/keymap.c3
-rw-r--r--keyboards/input_club/infinity60/keymaps/jpetermans/config.h6
-rw-r--r--keyboards/input_club/infinity60/keymaps/jpetermans/keymap.c264
-rw-r--r--keyboards/input_club/infinity60/keymaps/jpetermans/readme.md87
-rw-r--r--keyboards/input_club/infinity60/led.c58
-rw-r--r--keyboards/input_club/infinity60/led/config.h15
-rw-r--r--keyboards/input_club/infinity60/led/halconf.h8
-rw-r--r--keyboards/input_club/infinity60/led/info.json94
-rw-r--r--keyboards/input_club/infinity60/led/led.c83
-rw-r--r--keyboards/input_club/infinity60/led/rules.mk3
-rw-r--r--keyboards/input_club/infinity60/led_controller.c488
-rw-r--r--keyboards/input_club/infinity60/led_controller.h121
-rw-r--r--keyboards/input_club/k_type/config.h6
-rw-r--r--keyboards/input_club/k_type/is31fl3733-dual.c140
-rw-r--r--keyboards/input_club/k_type/is31fl3733-dual.h37
-rw-r--r--keyboards/input_club/k_type/k_type-rgbdriver.c10
-rw-r--r--keyboards/input_club/k_type/k_type.c17
-rw-r--r--keyboards/input_club/k_type/post_rules.mk5
-rw-r--r--keyboards/input_club/k_type/rules.mk5
-rw-r--r--keyboards/input_club/whitefox/config.h4
-rw-r--r--keyboards/input_club/whitefox/whitefox.c5
-rw-r--r--keyboards/jacky_studio/piggy60/rev2/info.json1
-rw-r--r--keyboards/jian/keymaps/advanced/config.h2
-rw-r--r--keyboards/jian/keymaps/advanced/keymap.c119
-rw-r--r--keyboards/jian/rev1/config.h6
-rw-r--r--keyboards/jian/rev1/info.json17
-rw-r--r--keyboards/jian/rev1/rules.mk1
-rw-r--r--keyboards/jolofsor/denial75/info.json6
-rw-r--r--keyboards/jolofsor/denial75/keymaps/default/keymap.c6
-rw-r--r--keyboards/jolofsor/denial75/keymaps/via/keymap.c24
-rw-r--r--keyboards/jones/v1/config.h5
-rw-r--r--keyboards/jones/v1/info.json6
-rw-r--r--keyboards/jones/v1/rules.mk3
-rw-r--r--keyboards/kabedon/kabedon980/info.json3
-rw-r--r--keyboards/kagizaraya/chidori/rules.mk2
-rw-r--r--keyboards/kbdcraft/adam64/adam64.c2
-rw-r--r--keyboards/kbdcraft/adam64/config.h4
-rw-r--r--keyboards/kbdfans/bella/rgb/config.h4
-rw-r--r--keyboards/kbdfans/bella/rgb/rgb.c2
-rw-r--r--keyboards/kbdfans/bella/rgb_iso/config.h4
-rw-r--r--keyboards/kbdfans/bella/rgb_iso/rgb_iso.c2
-rw-r--r--keyboards/kbdfans/boop65/rgb/config.h4
-rw-r--r--keyboards/kbdfans/boop65/rgb/rgb.c2
-rw-r--r--keyboards/kbdfans/kbd67/mkiirgb/v1/config.h6
-rw-r--r--keyboards/kbdfans/kbd67/mkiirgb/v1/v1.c2
-rw-r--r--keyboards/kbdfans/kbd67/mkiirgb/v2/config.h6
-rw-r--r--keyboards/kbdfans/kbd67/mkiirgb/v2/v2.c2
-rwxr-xr-xkeyboards/kbdfans/kbd67/mkiirgb/v3/config.h4
-rw-r--r--keyboards/kbdfans/kbd67/mkiirgb/v3/info.json3
-rwxr-xr-xkeyboards/kbdfans/kbd67/mkiirgb/v3/v3.c10
-rw-r--r--keyboards/kbdfans/kbdmini/config.h4
-rw-r--r--keyboards/kbdfans/kbdmini/kbdmini.c2
-rwxr-xr-xkeyboards/kbdfans/maja/config.h6
-rwxr-xr-xkeyboards/kbdfans/maja/maja.c2
-rw-r--r--keyboards/kbdfans/niu_mini/keymaps/xtonhasvim/keymap.c2
-rw-r--r--keyboards/kc60/info.json645
-rw-r--r--keyboards/kc60/keymaps/dbroqua/keymap.c139
-rw-r--r--keyboards/kc60/keymaps/dbroqua_hhkb/keymap.c89
-rw-r--r--keyboards/kc60/keymaps/default/keymap.c2
-rw-r--r--keyboards/kc60/keymaps/sgoodwin/keymap.c50
-rw-r--r--keyboards/kc60/keymaps/stanleylai/config.h3
-rw-r--r--keyboards/kc60/keymaps/stanleylai/keymap.c72
-rw-r--r--keyboards/kc60/keymaps/via/keymap.c2
-rw-r--r--keyboards/kc60/keymaps/wigguno/keymap.c84
-rw-r--r--keyboards/kc60/matrix_diagram.md33
-rw-r--r--keyboards/keebio/cepstrum/rev1/info.json1
-rw-r--r--keyboards/keebio/cepstrum/rev1/rules.mk1
-rw-r--r--keyboards/keebio/levinson/keymaps/xtonhasvim/keymap.c2
-rw-r--r--keyboards/keebsforall/coarse60/config.h2
-rwxr-xr-xkeyboards/keebwerk/mega/ansi/config.h2
-rwxr-xr-xkeyboards/keebwerk/mega/ansi/rules.mk2
-rw-r--r--keyboards/keyboardio/model01/rules.mk2
-rw-r--r--keyboards/keychron/c1_pro/ansi/rgb/config.h11
-rw-r--r--keyboards/keychron/c1_pro/ansi/rgb/info.json2
-rw-r--r--keyboards/keychron/c1_pro/ansi/rgb/rgb.c4
-rw-r--r--keyboards/keychron/c1_pro/ansi/white/config.h9
-rw-r--r--keyboards/keychron/c1_pro/ansi/white/info.json2
-rw-r--r--keyboards/keychron/c1_pro/ansi/white/white.c4
-rw-r--r--keyboards/keychron/c2_pro/ansi/rgb/config.h8
-rw-r--r--keyboards/keychron/c2_pro/ansi/rgb/info.json2
-rw-r--r--keyboards/keychron/c2_pro/ansi/rgb/rgb.c4
-rw-r--r--keyboards/keychron/c2_pro/ansi/white/config.h6
-rw-r--r--keyboards/keychron/c2_pro/ansi/white/info.json2
-rw-r--r--keyboards/keychron/c2_pro/ansi/white/white.c4
-rw-r--r--keyboards/keychron/q0/base/base.c (renamed from keyboards/keychron/q0/rev_0130/rev_0130.c)4
-rw-r--r--keyboards/keychron/q0/base/config.h (renamed from keyboards/keychron/q0/rev_0130/config.h)7
-rw-r--r--keyboards/keychron/q0/base/info.json (renamed from keyboards/keychron/q0/rev_0130/info.json)47
-rw-r--r--keyboards/keychron/q0/base/keymaps/default/keymap.c (renamed from keyboards/keychron/q0/rev_0130/keymaps/default/keymap.c)0
-rw-r--r--keyboards/keychron/q0/base/keymaps/keychron/keymap.c (renamed from keyboards/keychron/q0/rev_0130/keymaps/keychron/keymap.c)0
-rw-r--r--keyboards/keychron/q0/base/keymaps/keychron/rules.mk (renamed from keyboards/keychron/q0/rev_0130/keymaps/keychron/rules.mk)0
-rw-r--r--keyboards/keychron/q0/base/keymaps/via/keymap.c (renamed from keyboards/keychron/q0/rev_0130/keymaps/via/keymap.c)0
-rw-r--r--keyboards/keychron/q0/base/keymaps/via/rules.mk (renamed from keyboards/keychron/q0/rev_0130/keymaps/via/rules.mk)0
-rw-r--r--keyboards/keychron/q0/base/readme.md (renamed from keyboards/keychron/q0/rev_0130/readme.md)0
-rw-r--r--keyboards/keychron/q0/base/rules.mk1
-rw-r--r--keyboards/keychron/q0/config.h6
-rw-r--r--keyboards/keychron/q0/info.json52
-rw-r--r--keyboards/keychron/q0/plus/config.h (renamed from keyboards/keychron/q0/rev_0131/config.h)16
-rw-r--r--keyboards/keychron/q0/plus/info.json (renamed from keyboards/keychron/q0/rev_0131/info.json)49
-rw-r--r--keyboards/keychron/q0/plus/keymaps/default/keymap.c (renamed from keyboards/keychron/q0/rev_0131/keymaps/default/keymap.c)0
-rw-r--r--keyboards/keychron/q0/plus/keymaps/default/rules.mk (renamed from keyboards/keychron/q0/rev_0131/keymaps/default/rules.mk)0
-rw-r--r--keyboards/keychron/q0/plus/keymaps/keychron/keymap.c (renamed from keyboards/keychron/q0/rev_0131/keymaps/keychron/keymap.c)0
-rw-r--r--keyboards/keychron/q0/plus/keymaps/keychron/rules.mk (renamed from keyboards/keychron/q0/rev_0131/keymaps/keychron/rules.mk)0
-rw-r--r--keyboards/keychron/q0/plus/keymaps/via/keymap.c (renamed from keyboards/keychron/q0/rev_0131/keymaps/via/keymap.c)0
-rw-r--r--keyboards/keychron/q0/plus/keymaps/via/rules.mk (renamed from keyboards/keychron/q0/rev_0131/keymaps/via/rules.mk)0
-rw-r--r--keyboards/keychron/q0/plus/plus.c (renamed from keyboards/keychron/q0/rev_0131/rev_0131.c)4
-rw-r--r--keyboards/keychron/q0/plus/readme.md12
-rw-r--r--keyboards/keychron/q0/plus/rules.mk1
-rw-r--r--keyboards/keychron/q0/readme.md10
-rw-r--r--keyboards/keychron/q0/rev_0130/rules.mk3
-rw-r--r--keyboards/keychron/q0/rev_0131/readme.md6
-rw-r--r--keyboards/keychron/q0/rev_0131/rules.mk3
-rw-r--r--keyboards/keychron/q1/ansi/info.json115
-rw-r--r--keyboards/keychron/q1/ansi/rules.mk15
-rw-r--r--keyboards/keychron/q1/ansi_encoder/info.json120
-rw-r--r--keyboards/keychron/q1/ansi_encoder/rules.mk16
-rw-r--r--keyboards/keychron/q1/config.h80
-rw-r--r--keyboards/keychron/q1/iso/info.json116
-rw-r--r--keyboards/keychron/q1/iso/rules.mk15
-rw-r--r--keyboards/keychron/q1/iso_encoder/info.json121
-rw-r--r--keyboards/keychron/q1/q1.c38
-rw-r--r--keyboards/keychron/q1/readme.md21
-rw-r--r--keyboards/keychron/q10/ansi_encoder/ansi_encoder.c4
-rw-r--r--keyboards/keychron/q10/ansi_encoder/info.json2
-rw-r--r--keyboards/keychron/q10/ansi_encoder/rules.mk2
-rw-r--r--keyboards/keychron/q10/config.h11
-rw-r--r--keyboards/keychron/q10/iso_encoder/info.json2
-rw-r--r--keyboards/keychron/q10/iso_encoder/iso_encoder.c4
-rw-r--r--keyboards/keychron/q10/iso_encoder/rules.mk2
-rwxr-xr-xkeyboards/keychron/q11/ansi_encoder/ansi_encoder.c4
-rw-r--r--keyboards/keychron/q11/ansi_encoder/rules.mk5
-rwxr-xr-xkeyboards/keychron/q11/config.h6
-rwxr-xr-xkeyboards/keychron/q11/info.json2
-rwxr-xr-xkeyboards/keychron/q11/iso_encoder/iso_encoder.c4
-rw-r--r--keyboards/keychron/q12/ansi_encoder/ansi_encoder.c4
-rw-r--r--keyboards/keychron/q12/ansi_encoder/info.json2
-rw-r--r--keyboards/keychron/q12/ansi_encoder/rules.mk2
-rw-r--r--keyboards/keychron/q12/config.h8
-rw-r--r--keyboards/keychron/q12/iso_encoder/info.json2
-rw-r--r--keyboards/keychron/q12/iso_encoder/iso_encoder.c4
-rw-r--r--keyboards/keychron/q12/iso_encoder/rules.mk2
-rw-r--r--keyboards/keychron/q1v1/ansi/ansi.c (renamed from keyboards/keychron/q1/ansi_encoder/ansi_encoder.c)42
-rw-r--r--keyboards/keychron/q1v1/ansi/config.h (renamed from keyboards/keychron/q1/iso/config.h)7
-rw-r--r--keyboards/keychron/q1v1/ansi/info.json190
-rw-r--r--keyboards/keychron/q1v1/ansi/keymaps/default/keymap.c (renamed from keyboards/keychron/q1/ansi/keymaps/default/keymap.c)0
-rw-r--r--keyboards/keychron/q1v1/ansi/keymaps/gtg465x/README.md (renamed from keyboards/keychron/q1/ansi/keymaps/gtg465x/README.md)0
-rw-r--r--keyboards/keychron/q1v1/ansi/keymaps/gtg465x/config.h (renamed from keyboards/keychron/q1/ansi/keymaps/gtg465x/config.h)0
-rw-r--r--keyboards/keychron/q1v1/ansi/keymaps/gtg465x/keymap.c (renamed from keyboards/keychron/q1/ansi/keymaps/gtg465x/keymap.c)0
-rw-r--r--keyboards/keychron/q1v1/ansi/keymaps/gtg465x/keymap_user.h (renamed from keyboards/keychron/q1/ansi/keymaps/gtg465x/keymap_user.h)0
-rw-r--r--keyboards/keychron/q1v1/ansi/keymaps/gtg465x/rgb_matrix_user.c (renamed from keyboards/keychron/q1/ansi/keymaps/gtg465x/rgb_matrix_user.c)0
-rw-r--r--keyboards/keychron/q1v1/ansi/keymaps/gtg465x/rgb_matrix_user.h (renamed from keyboards/keychron/q1/ansi/keymaps/gtg465x/rgb_matrix_user.h)0
-rw-r--r--keyboards/keychron/q1v1/ansi/keymaps/gtg465x/rules.mk (renamed from keyboards/keychron/q1/ansi/keymaps/gtg465x/rules.mk)0
-rw-r--r--keyboards/keychron/q1v1/ansi/keymaps/keychron/keymap.c (renamed from keyboards/keychron/q1/ansi/keymaps/keychron/keymap.c)0
-rw-r--r--keyboards/keychron/q1v1/ansi/keymaps/keychron/rules.mk (renamed from keyboards/keychron/q1/ansi/keymaps/keychron/rules.mk)0
-rw-r--r--keyboards/keychron/q1v1/ansi/keymaps/mkillewald/config.h (renamed from keyboards/keychron/q1/ansi/keymaps/mkillewald/config.h)0
-rw-r--r--keyboards/keychron/q1v1/ansi/keymaps/mkillewald/keymap.c (renamed from keyboards/keychron/q1/ansi/keymaps/mkillewald/keymap.c)0
-rw-r--r--keyboards/keychron/q1v1/ansi/keymaps/mkillewald/keymap_user.h (renamed from keyboards/keychron/q1/ansi/keymaps/mkillewald/keymap_user.h)0
-rw-r--r--keyboards/keychron/q1v1/ansi/keymaps/mkillewald/readme.md (renamed from keyboards/keychron/q1/ansi/keymaps/mkillewald/readme.md)0
-rw-r--r--keyboards/keychron/q1v1/ansi/keymaps/mkillewald/rgb_matrix_user.c (renamed from keyboards/keychron/q1/ansi/keymaps/mkillewald/rgb_matrix_user.c)0
-rw-r--r--keyboards/keychron/q1v1/ansi/keymaps/mkillewald/rgb_matrix_user.h (renamed from keyboards/keychron/q1/ansi/keymaps/mkillewald/rgb_matrix_user.h)0
-rw-r--r--keyboards/keychron/q1v1/ansi/keymaps/mkillewald/rules.mk (renamed from keyboards/keychron/q1/ansi/keymaps/mkillewald/rules.mk)0
-rw-r--r--keyboards/keychron/q1v1/ansi/keymaps/teimor/config.h (renamed from keyboards/keychron/q1/ansi/keymaps/teimor/config.h)0
-rw-r--r--keyboards/keychron/q1v1/ansi/keymaps/teimor/keymap.c (renamed from keyboards/keychron/q1/ansi/keymaps/teimor/keymap.c)0
-rw-r--r--keyboards/keychron/q1v1/ansi/keymaps/teimor/keymap_user.h (renamed from keyboards/keychron/q1/ansi/keymaps/teimor/keymap_user.h)0
-rw-r--r--keyboards/keychron/q1v1/ansi/keymaps/teimor/readme.md (renamed from keyboards/keychron/q1/ansi/keymaps/teimor/readme.md)0
-rw-r--r--keyboards/keychron/q1v1/ansi/keymaps/teimor/rgb_matrix_user.c (renamed from keyboards/keychron/q1/ansi/keymaps/teimor/rgb_matrix_user.c)0
-rw-r--r--keyboards/keychron/q1v1/ansi/keymaps/teimor/rgb_matrix_user.h (renamed from keyboards/keychron/q1/ansi/keymaps/teimor/rgb_matrix_user.h)0
-rw-r--r--keyboards/keychron/q1v1/ansi/keymaps/teimor/rules.mk (renamed from keyboards/keychron/q1/ansi/keymaps/teimor/rules.mk)0
-rw-r--r--keyboards/keychron/q1v1/ansi/keymaps/teimor/tap_dance_mac_caps.c (renamed from keyboards/keychron/q1/ansi/keymaps/teimor/tap_dance_mac_caps.c)0
-rw-r--r--keyboards/keychron/q1v1/ansi/keymaps/teimor/tap_dance_mac_caps.h (renamed from keyboards/keychron/q1/ansi/keymaps/teimor/tap_dance_mac_caps.h)0
-rw-r--r--keyboards/keychron/q1v1/ansi/keymaps/teimor/tap_dance_setup.c (renamed from keyboards/keychron/q1/ansi/keymaps/teimor/tap_dance_setup.c)0
-rw-r--r--keyboards/keychron/q1v1/ansi/keymaps/teimor/tap_dance_setup.h (renamed from keyboards/keychron/q1/ansi/keymaps/teimor/tap_dance_setup.h)0
-rw-r--r--keyboards/keychron/q1v1/ansi/keymaps/teimor/tap_dance_user.c (renamed from keyboards/keychron/q1/ansi/keymaps/teimor/tap_dance_user.c)0
-rw-r--r--keyboards/keychron/q1v1/ansi/keymaps/teimor/tap_dance_win_caps.c (renamed from keyboards/keychron/q1/ansi/keymaps/teimor/tap_dance_win_caps.c)0
-rw-r--r--keyboards/keychron/q1v1/ansi/keymaps/teimor/tap_dance_win_caps.h (renamed from keyboards/keychron/q1/ansi/keymaps/teimor/tap_dance_win_caps.h)0
-rw-r--r--keyboards/keychron/q1v1/ansi/keymaps/via/keymap.c (renamed from keyboards/keychron/q1/ansi/keymaps/via/keymap.c)0
-rw-r--r--keyboards/keychron/q1v1/ansi/keymaps/via/rules.mk (renamed from keyboards/keychron/q1/ansi/keymaps/via/rules.mk)0
-rw-r--r--keyboards/keychron/q1v1/ansi/readme.md (renamed from keyboards/keychron/q1/ansi/readme.md)0
-rw-r--r--keyboards/keychron/q1v1/ansi/rules.mk1
-rw-r--r--keyboards/keychron/q1v1/ansi_encoder/ansi_encoder.c (renamed from keyboards/keychron/q1/iso/iso.c)48
-rw-r--r--keyboards/keychron/q1v1/ansi_encoder/config.h (renamed from keyboards/keychron/q1/ansi/config.h)7
-rw-r--r--keyboards/keychron/q1v1/ansi_encoder/info.json196
-rw-r--r--keyboards/keychron/q1v1/ansi_encoder/keymaps/default/keymap.c (renamed from keyboards/keychron/q1/ansi_encoder/keymaps/default/keymap.c)0
-rw-r--r--keyboards/keychron/q1v1/ansi_encoder/keymaps/default/rules.mk (renamed from keyboards/keychron/q1/ansi_encoder/keymaps/default/rules.mk)0
-rw-r--r--keyboards/keychron/q1v1/ansi_encoder/keymaps/keychron/keymap.c (renamed from keyboards/keychron/q1/ansi_encoder/keymaps/keychron/keymap.c)0
-rw-r--r--keyboards/keychron/q1v1/ansi_encoder/keymaps/keychron/rules.mk (renamed from keyboards/keychron/q1/ansi_encoder/keymaps/keychron/rules.mk)0
-rw-r--r--keyboards/keychron/q1v1/ansi_encoder/keymaps/via/keymap.c (renamed from keyboards/keychron/q1/ansi_encoder/keymaps/via/keymap.c)0
-rw-r--r--keyboards/keychron/q1v1/ansi_encoder/keymaps/via/rules.mk (renamed from keyboards/keychron/q1/ansi_encoder/keymaps/via/rules.mk)0
-rw-r--r--keyboards/keychron/q1v1/ansi_encoder/readme.md (renamed from keyboards/keychron/q1/ansi_encoder/readme.md)0
-rw-r--r--keyboards/keychron/q1v1/ansi_encoder/rules.mk1
-rw-r--r--keyboards/keychron/q1v1/config.h (renamed from keyboards/keychron/q1/iso_encoder/config.h)26
-rw-r--r--keyboards/keychron/q1v1/info.json54
-rw-r--r--keyboards/keychron/q1v1/iso/config.h (renamed from keyboards/keychron/q1/ansi_encoder/config.h)7
-rw-r--r--keyboards/keychron/q1v1/iso/info.json192
-rw-r--r--keyboards/keychron/q1v1/iso/iso.c (renamed from keyboards/keychron/q1/ansi/ansi.c)18
-rw-r--r--keyboards/keychron/q1v1/iso/keymaps/default/keymap.c (renamed from keyboards/keychron/q1/iso/keymaps/default/keymap.c)0
-rw-r--r--keyboards/keychron/q1v1/iso/keymaps/keychron/keymap.c (renamed from keyboards/keychron/q1/iso/keymaps/keychron/keymap.c)0
-rw-r--r--keyboards/keychron/q1v1/iso/keymaps/keychron/rules.mk (renamed from keyboards/keychron/q1/iso/keymaps/keychron/rules.mk)0
-rw-r--r--keyboards/keychron/q1v1/iso/keymaps/kubahorak/README.md (renamed from keyboards/keychron/q1/iso/keymaps/kubahorak/README.md)0
-rw-r--r--keyboards/keychron/q1v1/iso/keymaps/kubahorak/config.h (renamed from keyboards/keychron/q1/iso/keymaps/kubahorak/config.h)0
-rw-r--r--keyboards/keychron/q1v1/iso/keymaps/kubahorak/keymap.c (renamed from keyboards/keychron/q1/iso/keymaps/kubahorak/keymap.c)0
-rw-r--r--keyboards/keychron/q1v1/iso/keymaps/kubahorak/keymap_user.h (renamed from keyboards/keychron/q1/iso/keymaps/kubahorak/keymap_user.h)0
-rw-r--r--keyboards/keychron/q1v1/iso/keymaps/kubahorak/rgb_matrix_user.c (renamed from keyboards/keychron/q1/iso/keymaps/kubahorak/rgb_matrix_user.c)0
-rw-r--r--keyboards/keychron/q1v1/iso/keymaps/kubahorak/rgb_matrix_user.h (renamed from keyboards/keychron/q1/iso/keymaps/kubahorak/rgb_matrix_user.h)0
-rw-r--r--keyboards/keychron/q1v1/iso/keymaps/kubahorak/rules.mk (renamed from keyboards/keychron/q1/iso/keymaps/kubahorak/rules.mk)0
-rw-r--r--keyboards/keychron/q1v1/iso/keymaps/mkillewald_iso/config.h (renamed from keyboards/keychron/q1/iso/keymaps/mkillewald_iso/config.h)0
-rw-r--r--keyboards/keychron/q1v1/iso/keymaps/mkillewald_iso/keymap.c (renamed from keyboards/keychron/q1/iso/keymaps/mkillewald_iso/keymap.c)0
-rw-r--r--keyboards/keychron/q1v1/iso/keymaps/mkillewald_iso/keymap_user.h (renamed from keyboards/keychron/q1/iso/keymaps/mkillewald_iso/keymap_user.h)0
-rw-r--r--keyboards/keychron/q1v1/iso/keymaps/mkillewald_iso/readme.md (renamed from keyboards/keychron/q1/iso/keymaps/mkillewald_iso/readme.md)0
-rw-r--r--keyboards/keychron/q1v1/iso/keymaps/mkillewald_iso/rgb_matrix_user.c (renamed from keyboards/keychron/q1/iso/keymaps/mkillewald_iso/rgb_matrix_user.c)0
-rw-r--r--keyboards/keychron/q1v1/iso/keymaps/mkillewald_iso/rgb_matrix_user.h (renamed from keyboards/keychron/q1/iso/keymaps/mkillewald_iso/rgb_matrix_user.h)0
-rw-r--r--keyboards/keychron/q1v1/iso/keymaps/mkillewald_iso/rules.mk (renamed from keyboards/keychron/q1/iso/keymaps/mkillewald_iso/rules.mk)0
-rw-r--r--keyboards/keychron/q1v1/iso/keymaps/via/keymap.c (renamed from keyboards/keychron/q1/iso/keymaps/via/keymap.c)0
-rw-r--r--keyboards/keychron/q1v1/iso/keymaps/via/rules.mk (renamed from keyboards/keychron/q1/iso/keymaps/via/rules.mk)0
-rw-r--r--keyboards/keychron/q1v1/iso/keymaps/victorsavu3/config.h (renamed from keyboards/keychron/q1/iso/keymaps/victorsavu3/config.h)0
-rw-r--r--keyboards/keychron/q1v1/iso/keymaps/victorsavu3/keymap.c (renamed from keyboards/keychron/q1/iso/keymaps/victorsavu3/keymap.c)0
-rw-r--r--keyboards/keychron/q1v1/iso/keymaps/victorsavu3/readme.md (renamed from keyboards/keychron/q1/iso/keymaps/victorsavu3/readme.md)0
-rw-r--r--keyboards/keychron/q1v1/iso/keymaps/victorsavu3/rules.mk (renamed from keyboards/keychron/q1/iso/keymaps/victorsavu3/rules.mk)0
-rw-r--r--keyboards/keychron/q1v1/iso/readme.md (renamed from keyboards/keychron/q1/iso/readme.md)0
-rw-r--r--keyboards/keychron/q1v1/iso/rules.mk1
-rw-r--r--keyboards/keychron/q1v1/iso_encoder/config.h23
-rw-r--r--keyboards/keychron/q1v1/iso_encoder/info.json199
-rw-r--r--keyboards/keychron/q1v1/iso_encoder/iso_encoder.c (renamed from keyboards/keychron/q1/iso_encoder/iso_encoder.c)43
-rw-r--r--keyboards/keychron/q1v1/iso_encoder/keymaps/default/keymap.c (renamed from keyboards/keychron/q1/iso_encoder/keymaps/default/keymap.c)0
-rw-r--r--keyboards/keychron/q1v1/iso_encoder/keymaps/default/rules.mk (renamed from keyboards/keychron/q1/iso_encoder/keymaps/default/rules.mk)0
-rw-r--r--keyboards/keychron/q1v1/iso_encoder/keymaps/keychron/keymap.c (renamed from keyboards/keychron/q1/iso_encoder/keymaps/keychron/keymap.c)0
-rw-r--r--keyboards/keychron/q1v1/iso_encoder/keymaps/keychron/rules.mk (renamed from keyboards/keychron/q1/iso_encoder/keymaps/keychron/rules.mk)0
-rw-r--r--keyboards/keychron/q1v1/iso_encoder/keymaps/via/keymap.c (renamed from keyboards/keychron/q1/iso_encoder/keymaps/via/keymap.c)0
-rw-r--r--keyboards/keychron/q1v1/iso_encoder/keymaps/via/rules.mk (renamed from keyboards/keychron/q1/iso_encoder/keymaps/via/rules.mk)0
-rw-r--r--keyboards/keychron/q1v1/iso_encoder/readme.md (renamed from keyboards/keychron/q1/iso_encoder/readme.md)0
-rw-r--r--keyboards/keychron/q1v1/iso_encoder/rules.mk2
-rw-r--r--keyboards/keychron/q1v1/q1v1.c73
-rw-r--r--keyboards/keychron/q1v1/readme.md27
-rw-r--r--keyboards/keychron/q2/ansi/ansi.c33
-rw-r--r--keyboards/keychron/q2/ansi/config.h7
-rw-r--r--keyboards/keychron/q2/ansi/info.json87
-rw-r--r--keyboards/keychron/q2/ansi/rules.mk19
-rw-r--r--keyboards/keychron/q2/ansi_encoder/ansi_encoder.c33
-rw-r--r--keyboards/keychron/q2/ansi_encoder/config.h8
-rw-r--r--keyboards/keychron/q2/ansi_encoder/info.json92
-rw-r--r--keyboards/keychron/q2/ansi_encoder/rules.mk19
-rw-r--r--keyboards/keychron/q2/config.h66
-rw-r--r--keyboards/keychron/q2/info.json60
-rw-r--r--keyboards/keychron/q2/iso/config.h7
-rw-r--r--keyboards/keychron/q2/iso/info.json88
-rw-r--r--keyboards/keychron/q2/iso/iso.c33
-rw-r--r--keyboards/keychron/q2/iso/rules.mk19
-rw-r--r--keyboards/keychron/q2/iso_encoder/config.h8
-rw-r--r--keyboards/keychron/q2/iso_encoder/info.json93
-rw-r--r--keyboards/keychron/q2/iso_encoder/iso_encoder.c33
-rw-r--r--keyboards/keychron/q2/iso_encoder/rules.mk19
-rw-r--r--keyboards/keychron/q2/jis/config.h6
-rw-r--r--keyboards/keychron/q2/jis/info.json89
-rw-r--r--keyboards/keychron/q2/jis/jis.c33
-rw-r--r--keyboards/keychron/q2/jis/rules.mk18
-rw-r--r--keyboards/keychron/q2/jis_encoder/config.h9
-rw-r--r--keyboards/keychron/q2/jis_encoder/info.json94
-rw-r--r--keyboards/keychron/q2/jis_encoder/jis_encoder.c33
-rw-r--r--keyboards/keychron/q2/jis_encoder/rules.mk19
-rw-r--r--keyboards/keychron/q2/readme.md16
-rw-r--r--keyboards/keychron/q3/ansi/ansi.c36
-rw-r--r--keyboards/keychron/q3/ansi/config.h12
-rw-r--r--keyboards/keychron/q3/ansi/info.json107
-rw-r--r--keyboards/keychron/q3/ansi/rules.mk19
-rw-r--r--keyboards/keychron/q3/ansi_encoder/ansi_encoder.c36
-rw-r--r--keyboards/keychron/q3/ansi_encoder/config.h9
-rw-r--r--keyboards/keychron/q3/ansi_encoder/info.json108
-rw-r--r--keyboards/keychron/q3/ansi_encoder/rules.mk21
-rw-r--r--keyboards/keychron/q3/config.h72
-rw-r--r--keyboards/keychron/q3/info.json52
-rw-r--r--keyboards/keychron/q3/iso/config.h12
-rw-r--r--keyboards/keychron/q3/iso/info.json108
-rw-r--r--keyboards/keychron/q3/iso/iso.c36
-rw-r--r--keyboards/keychron/q3/iso/rules.mk19
-rw-r--r--keyboards/keychron/q3/iso_encoder/config.h9
-rw-r--r--keyboards/keychron/q3/iso_encoder/info.json109
-rw-r--r--keyboards/keychron/q3/iso_encoder/iso_encoder.c36
-rw-r--r--keyboards/keychron/q3/iso_encoder/rules.mk21
-rw-r--r--keyboards/keychron/q3/jis/config.h12
-rw-r--r--keyboards/keychron/q3/jis/info.json114
-rw-r--r--keyboards/keychron/q3/jis/jis.c36
-rw-r--r--keyboards/keychron/q3/jis/rules.mk19
-rw-r--r--keyboards/keychron/q3/jis_encoder/config.h15
-rw-r--r--keyboards/keychron/q3/jis_encoder/info.json116
-rw-r--r--keyboards/keychron/q3/jis_encoder/jis_encoder.c36
-rw-r--r--keyboards/keychron/q3/jis_encoder/rules.mk21
-rw-r--r--keyboards/keychron/q3/readme.md22
-rw-r--r--keyboards/keychron/q4/ansi/config.h20
-rw-r--r--keyboards/keychron/q4/ansi/info.json147
-rw-r--r--keyboards/keychron/q4/ansi/keymaps/default/keymap.c (renamed from keyboards/keychron/q4/ansi_v1/keymaps/default/keymap.c)0
-rw-r--r--keyboards/keychron/q4/ansi/keymaps/keychron/keymap.c (renamed from keyboards/keychron/q4/ansi_v1/keymaps/keychron/keymap.c)0
-rw-r--r--keyboards/keychron/q4/ansi/keymaps/keychron/rules.mk (renamed from keyboards/keychron/q4/ansi_v1/keymaps/keychron/rules.mk)0
-rw-r--r--keyboards/keychron/q4/ansi/keymaps/via/keymap.c (renamed from keyboards/keychron/q4/ansi_v1/keymaps/via/keymap.c)0
-rw-r--r--keyboards/keychron/q4/ansi/keymaps/via/rules.mk (renamed from keyboards/keychron/q4/ansi_v1/keymaps/via/rules.mk)0
-rw-r--r--keyboards/keychron/q4/ansi/readme.md (renamed from keyboards/keychron/q4/ansi_v1/readme.md)0
-rw-r--r--keyboards/keychron/q4/ansi/v1/config.h (renamed from keyboards/keychron/q4/ansi_v2/config.h)15
-rw-r--r--keyboards/keychron/q4/ansi/v1/rules.mk1
-rw-r--r--keyboards/keychron/q4/ansi/v1/v1.c (renamed from keyboards/keychron/q4/ansi_v1/ansi_v1.c)33
-rw-r--r--keyboards/keychron/q4/ansi/v2/config.h24
-rw-r--r--keyboards/keychron/q4/ansi/v2/rules.mk1
-rw-r--r--keyboards/keychron/q4/ansi/v2/v2.c (renamed from keyboards/keychron/q4/ansi_v2/ansi_v2.c)33
-rw-r--r--keyboards/keychron/q4/ansi_v1/config.h35
-rw-r--r--keyboards/keychron/q4/ansi_v1/info.json92
-rw-r--r--keyboards/keychron/q4/ansi_v1/rules.mk18
-rw-r--r--keyboards/keychron/q4/ansi_v2/info.json92
-rw-r--r--keyboards/keychron/q4/ansi_v2/keymaps/default/keymap.c66
-rw-r--r--keyboards/keychron/q4/ansi_v2/keymaps/keychron/keymap.c75
-rw-r--r--keyboards/keychron/q4/ansi_v2/keymaps/keychron/rules.mk4
-rw-r--r--keyboards/keychron/q4/ansi_v2/keymaps/via/keymap.c66
-rw-r--r--keyboards/keychron/q4/ansi_v2/keymaps/via/rules.mk1
-rw-r--r--keyboards/keychron/q4/ansi_v2/readme.md1
-rw-r--r--keyboards/keychron/q4/ansi_v2/rules.mk18
-rw-r--r--keyboards/keychron/q4/config.h56
-rw-r--r--keyboards/keychron/q4/info.json62
-rw-r--r--keyboards/keychron/q4/iso/config.h10
-rw-r--r--keyboards/keychron/q4/iso/info.json81
-rw-r--r--keyboards/keychron/q4/iso/iso.c33
-rw-r--r--keyboards/keychron/q4/iso/rules.mk19
-rw-r--r--keyboards/keychron/q4/readme.md14
-rw-r--r--keyboards/keychron/q5/ansi/ansi.c4
-rw-r--r--keyboards/keychron/q5/ansi/info.json2
-rw-r--r--keyboards/keychron/q5/ansi/rules.mk2
-rw-r--r--keyboards/keychron/q5/ansi_encoder/ansi_encoder.c4
-rw-r--r--keyboards/keychron/q5/ansi_encoder/info.json2
-rw-r--r--keyboards/keychron/q5/ansi_encoder/rules.mk2
-rw-r--r--keyboards/keychron/q5/config.h8
-rw-r--r--keyboards/keychron/q5/iso/info.json2
-rw-r--r--keyboards/keychron/q5/iso/iso.c4
-rw-r--r--keyboards/keychron/q5/iso/rules.mk2
-rw-r--r--keyboards/keychron/q5/iso_encoder/info.json2
-rw-r--r--keyboards/keychron/q5/iso_encoder/iso_encoder.c4
-rw-r--r--keyboards/keychron/q5/iso_encoder/rules.mk2
-rw-r--r--keyboards/keychron/q6/ansi/ansi.c4
-rw-r--r--keyboards/keychron/q6/ansi/info.json2
-rw-r--r--keyboards/keychron/q6/ansi/rules.mk2
-rw-r--r--keyboards/keychron/q6/ansi_encoder/ansi_encoder.c4
-rw-r--r--keyboards/keychron/q6/ansi_encoder/info.json2
-rw-r--r--keyboards/keychron/q6/ansi_encoder/rules.mk2
-rw-r--r--keyboards/keychron/q6/config.h8
-rw-r--r--keyboards/keychron/q6/iso/info.json2
-rw-r--r--keyboards/keychron/q6/iso/iso.c4
-rw-r--r--keyboards/keychron/q6/iso/rules.mk2
-rw-r--r--keyboards/keychron/q6/iso_encoder/info.json2
-rw-r--r--keyboards/keychron/q6/iso_encoder/iso_encoder.c4
-rw-r--r--keyboards/keychron/q6/iso_encoder/rules.mk2
-rw-r--r--keyboards/keychron/q60/ansi/ansi.c4
-rw-r--r--keyboards/keychron/q60/ansi/info.json2
-rw-r--r--keyboards/keychron/q60/ansi/rules.mk3
-rw-r--r--keyboards/keychron/q60/config.h6
-rw-r--r--keyboards/keychron/q65/ansi_encoder/ansi_encoder.c4
-rw-r--r--keyboards/keychron/q65/ansi_encoder/info.json2
-rw-r--r--keyboards/keychron/q65/ansi_encoder/rules.mk2
-rw-r--r--keyboards/keychron/q65/config.h11
-rw-r--r--keyboards/keychron/q7/ansi/ansi.c4
-rw-r--r--keyboards/keychron/q7/ansi/info.json2
-rw-r--r--keyboards/keychron/q7/ansi/rules.mk3
-rw-r--r--keyboards/keychron/q7/config.h11
-rw-r--r--keyboards/keychron/q7/iso/info.json2
-rw-r--r--keyboards/keychron/q7/iso/iso.c4
-rw-r--r--keyboards/keychron/q7/iso/rules.mk3
-rw-r--r--keyboards/keychron/q8/ansi/ansi.c4
-rw-r--r--keyboards/keychron/q8/ansi/info.json2
-rw-r--r--keyboards/keychron/q8/ansi/rules.mk3
-rw-r--r--keyboards/keychron/q8/ansi_encoder/ansi_encoder.c4
-rw-r--r--keyboards/keychron/q8/ansi_encoder/info.json2
-rw-r--r--keyboards/keychron/q8/ansi_encoder/rules.mk3
-rw-r--r--keyboards/keychron/q8/config.h11
-rw-r--r--keyboards/keychron/q8/iso/info.json2
-rw-r--r--keyboards/keychron/q8/iso/iso.c4
-rw-r--r--keyboards/keychron/q8/iso/rules.mk3
-rw-r--r--keyboards/keychron/q8/iso_encoder/info.json2
-rw-r--r--keyboards/keychron/q8/iso_encoder/iso_encoder.c4
-rw-r--r--keyboards/keychron/q8/iso_encoder/rules.mk3
-rw-r--r--keyboards/keychron/q9/ansi/ansi.c4
-rw-r--r--keyboards/keychron/q9/ansi/info.json2
-rw-r--r--keyboards/keychron/q9/ansi/rules.mk3
-rw-r--r--keyboards/keychron/q9/ansi_encoder/ansi_encoder.c4
-rw-r--r--keyboards/keychron/q9/ansi_encoder/info.json2
-rw-r--r--keyboards/keychron/q9/ansi_encoder/rules.mk3
-rw-r--r--keyboards/keychron/q9/config.h6
-rw-r--r--keyboards/keychron/q9/iso/info.json2
-rw-r--r--keyboards/keychron/q9/iso/iso.c4
-rw-r--r--keyboards/keychron/q9/iso/rules.mk3
-rw-r--r--keyboards/keychron/q9/iso_encoder/info.json2
-rw-r--r--keyboards/keychron/q9/iso_encoder/iso_encoder.c4
-rw-r--r--keyboards/keychron/q9/iso_encoder/rules.mk3
-rwxr-xr-xkeyboards/keychron/q9_plus/ansi_encoder/ansi_encoder.c4
-rwxr-xr-xkeyboards/keychron/q9_plus/config.h6
-rwxr-xr-xkeyboards/keychron/q9_plus/info.json2
-rw-r--r--keyboards/keychron/s1/ansi/rgb/config.h11
-rw-r--r--keyboards/keychron/s1/ansi/rgb/info.json2
-rw-r--r--keyboards/keychron/s1/ansi/rgb/rgb.c4
-rw-r--r--keyboards/keychron/s1/ansi/rgb/rules.mk3
-rw-r--r--keyboards/keychron/s1/ansi/white/config.h9
-rw-r--r--keyboards/keychron/s1/ansi/white/info.json2
-rw-r--r--keyboards/keychron/s1/ansi/white/rules.mk3
-rw-r--r--keyboards/keychron/s1/ansi/white/white.c4
-rw-r--r--keyboards/keychron/v1/ansi/ansi.c4
-rw-r--r--keyboards/keychron/v1/ansi/config.h2
-rw-r--r--keyboards/keychron/v1/ansi/info.json2
-rw-r--r--keyboards/keychron/v1/ansi/rules.mk2
-rw-r--r--keyboards/keychron/v1/ansi_encoder/ansi_encoder.c4
-rw-r--r--keyboards/keychron/v1/ansi_encoder/config.h2
-rw-r--r--keyboards/keychron/v1/ansi_encoder/info.json2
-rw-r--r--keyboards/keychron/v1/ansi_encoder/rules.mk2
-rw-r--r--keyboards/keychron/v1/config.h9
-rw-r--r--keyboards/keychron/v1/iso/config.h2
-rw-r--r--keyboards/keychron/v1/iso/info.json2
-rw-r--r--keyboards/keychron/v1/iso/iso.c4
-rw-r--r--keyboards/keychron/v1/iso/rules.mk2
-rw-r--r--keyboards/keychron/v1/iso_encoder/config.h2
-rw-r--r--keyboards/keychron/v1/iso_encoder/info.json2
-rw-r--r--keyboards/keychron/v1/iso_encoder/iso_encoder.c4
-rw-r--r--keyboards/keychron/v1/iso_encoder/rules.mk2
-rw-r--r--keyboards/keychron/v1/jis/config.h7
-rw-r--r--keyboards/keychron/v1/jis/info.json2
-rw-r--r--keyboards/keychron/v1/jis/jis.c4
-rw-r--r--keyboards/keychron/v1/jis/rules.mk2
-rw-r--r--keyboards/keychron/v1/jis_encoder/config.h2
-rw-r--r--keyboards/keychron/v1/jis_encoder/info.json2
-rw-r--r--keyboards/keychron/v1/jis_encoder/jis_encoder.c4
-rw-r--r--keyboards/keychron/v1/jis_encoder/rules.mk2
-rw-r--r--keyboards/keychron/v10/ansi_encoder/ansi_encoder.c4
-rw-r--r--keyboards/keychron/v10/ansi_encoder/info.json2
-rw-r--r--keyboards/keychron/v10/ansi_encoder/rules.mk2
-rw-r--r--keyboards/keychron/v10/config.h11
-rw-r--r--keyboards/keychron/v10/iso_encoder/info.json2
-rw-r--r--keyboards/keychron/v10/iso_encoder/iso_encoder.c4
-rw-r--r--keyboards/keychron/v10/iso_encoder/rules.mk2
-rw-r--r--keyboards/keychron/v2/ansi/ansi.c4
-rw-r--r--keyboards/keychron/v2/ansi/config.h2
-rw-r--r--keyboards/keychron/v2/ansi/info.json2
-rw-r--r--keyboards/keychron/v2/ansi/rules.mk3
-rw-r--r--keyboards/keychron/v2/ansi_encoder/ansi_encoder.c4
-rw-r--r--keyboards/keychron/v2/ansi_encoder/info.json2
-rw-r--r--keyboards/keychron/v2/ansi_encoder/rules.mk3
-rw-r--r--keyboards/keychron/v2/config.h9
-rw-r--r--keyboards/keychron/v2/iso/info.json2
-rw-r--r--keyboards/keychron/v2/iso/iso.c4
-rw-r--r--keyboards/keychron/v2/iso/rules.mk3
-rw-r--r--keyboards/keychron/v2/iso_encoder/info.json2
-rw-r--r--keyboards/keychron/v2/iso_encoder/iso_encoder.c4
-rw-r--r--keyboards/keychron/v2/iso_encoder/rules.mk3
-rw-r--r--keyboards/keychron/v2/jis/config.h2
-rw-r--r--keyboards/keychron/v2/jis/info.json2
-rw-r--r--keyboards/keychron/v2/jis/jis.c4
-rw-r--r--keyboards/keychron/v2/jis/rules.mk3
-rw-r--r--keyboards/keychron/v2/jis_encoder/config.h2
-rw-r--r--keyboards/keychron/v2/jis_encoder/info.json2
-rw-r--r--keyboards/keychron/v2/jis_encoder/jis_encoder.c4
-rw-r--r--keyboards/keychron/v2/jis_encoder/rules.mk3
-rw-r--r--keyboards/keychron/v3/ansi/ansi.c4
-rw-r--r--keyboards/keychron/v3/ansi/config.h2
-rw-r--r--keyboards/keychron/v3/ansi/info.json2
-rw-r--r--keyboards/keychron/v3/ansi/rules.mk3
-rw-r--r--keyboards/keychron/v3/ansi_encoder/ansi_encoder.c4
-rw-r--r--keyboards/keychron/v3/ansi_encoder/info.json2
-rw-r--r--keyboards/keychron/v3/ansi_encoder/rules.mk2
-rw-r--r--keyboards/keychron/v3/config.h9
-rw-r--r--keyboards/keychron/v3/iso/info.json2
-rw-r--r--keyboards/keychron/v3/iso/iso.c4
-rw-r--r--keyboards/keychron/v3/iso/rules.mk3
-rw-r--r--keyboards/keychron/v3/iso_encoder/info.json2
-rw-r--r--keyboards/keychron/v3/iso_encoder/iso_encoder.c4
-rw-r--r--keyboards/keychron/v3/iso_encoder/rules.mk2
-rw-r--r--keyboards/keychron/v3/jis/config.h2
-rw-r--r--keyboards/keychron/v3/jis/info.json2
-rw-r--r--keyboards/keychron/v3/jis/jis.c4
-rw-r--r--keyboards/keychron/v3/jis/rules.mk3
-rw-r--r--keyboards/keychron/v3/jis_encoder/config.h2
-rw-r--r--keyboards/keychron/v3/jis_encoder/info.json2
-rw-r--r--keyboards/keychron/v3/jis_encoder/jis_encoder.c4
-rw-r--r--keyboards/keychron/v3/jis_encoder/rules.mk2
-rw-r--r--keyboards/keychron/v4/ansi/ansi.c4
-rw-r--r--keyboards/keychron/v4/ansi/info.json2
-rw-r--r--keyboards/keychron/v4/ansi/rules.mk3
-rw-r--r--keyboards/keychron/v4/config.h6
-rw-r--r--keyboards/keychron/v4/iso/info.json2
-rw-r--r--keyboards/keychron/v4/iso/iso.c4
-rw-r--r--keyboards/keychron/v4/iso/rules.mk3
-rw-r--r--keyboards/keychron/v5/ansi/ansi.c4
-rw-r--r--keyboards/keychron/v5/ansi/info.json2
-rw-r--r--keyboards/keychron/v5/ansi/rules.mk2
-rw-r--r--keyboards/keychron/v5/ansi_encoder/ansi_encoder.c4
-rw-r--r--keyboards/keychron/v5/ansi_encoder/info.json2
-rw-r--r--keyboards/keychron/v5/ansi_encoder/rules.mk2
-rw-r--r--keyboards/keychron/v5/config.h8
-rw-r--r--keyboards/keychron/v5/iso/info.json2
-rw-r--r--keyboards/keychron/v5/iso/iso.c4
-rw-r--r--keyboards/keychron/v5/iso/rules.mk2
-rw-r--r--keyboards/keychron/v5/iso_encoder/info.json2
-rw-r--r--keyboards/keychron/v5/iso_encoder/iso_encoder.c4
-rw-r--r--keyboards/keychron/v5/iso_encoder/rules.mk2
-rw-r--r--keyboards/keychron/v6/ansi/ansi.c4
-rw-r--r--keyboards/keychron/v6/ansi/info.json2
-rw-r--r--keyboards/keychron/v6/ansi/rules.mk2
-rw-r--r--keyboards/keychron/v6/ansi_encoder/ansi_encoder.c4
-rw-r--r--keyboards/keychron/v6/ansi_encoder/info.json2
-rw-r--r--keyboards/keychron/v6/ansi_encoder/rules.mk2
-rw-r--r--keyboards/keychron/v6/config.h8
-rw-r--r--keyboards/keychron/v6/iso/info.json2
-rw-r--r--keyboards/keychron/v6/iso/iso.c4
-rw-r--r--keyboards/keychron/v6/iso/rules.mk2
-rw-r--r--keyboards/keychron/v6/iso_encoder/info.json2
-rw-r--r--keyboards/keychron/v6/iso_encoder/iso_encoder.c4
-rw-r--r--keyboards/keychron/v6/iso_encoder/rules.mk2
-rw-r--r--keyboards/keychron/v7/ansi/ansi.c4
-rw-r--r--keyboards/keychron/v7/ansi/info.json2
-rw-r--r--keyboards/keychron/v7/ansi/rules.mk3
-rw-r--r--keyboards/keychron/v7/config.h11
-rw-r--r--keyboards/keychron/v7/iso/info.json2
-rw-r--r--keyboards/keychron/v7/iso/iso.c4
-rw-r--r--keyboards/keychron/v7/iso/rules.mk3
-rw-r--r--keyboards/keychron/v8/ansi/ansi.c4
-rw-r--r--keyboards/keychron/v8/ansi/info.json2
-rw-r--r--keyboards/keychron/v8/ansi/rules.mk3
-rw-r--r--keyboards/keychron/v8/ansi_encoder/ansi_encoder.c4
-rw-r--r--keyboards/keychron/v8/ansi_encoder/info.json2
-rw-r--r--keyboards/keychron/v8/ansi_encoder/rules.mk3
-rw-r--r--keyboards/keychron/v8/config.h11
-rw-r--r--keyboards/keychron/v8/iso/info.json2
-rw-r--r--keyboards/keychron/v8/iso/iso.c4
-rw-r--r--keyboards/keychron/v8/iso/rules.mk3
-rw-r--r--keyboards/keychron/v8/iso_encoder/info.json2
-rw-r--r--keyboards/keychron/v8/iso_encoder/iso_encoder.c4
-rw-r--r--keyboards/keychron/v8/iso_encoder/rules.mk3
-rwxr-xr-xkeyboards/keyhive/honeycomb/rules.mk2
-rw-r--r--keyboards/kikoslab/kl90/config.h21
-rw-r--r--keyboards/kingly_keys/ave/ortho/keymaps/default/keymap.c4
-rw-r--r--keyboards/kingly_keys/ave/staggered/keymaps/default/keymap.c4
-rwxr-xr-xkeyboards/kprepublic/bm40hsrgb/keymaps/wolff_abnt2/config.h74
-rwxr-xr-xkeyboards/kprepublic/bm40hsrgb/keymaps/wolff_abnt2/rules.mk19
-rw-r--r--keyboards/kprepublic/bm40hsrgb/readme.md8
-rwxr-xr-xkeyboards/kprepublic/bm40hsrgb/rev1/config.h (renamed from keyboards/kprepublic/bm40hsrgb/config.h)0
-rw-r--r--keyboards/kprepublic/bm40hsrgb/rev1/info.json (renamed from keyboards/kprepublic/bm40hsrgb/info.json)0
-rwxr-xr-xkeyboards/kprepublic/bm40hsrgb/rev1/keymaps/default/keymap.c (renamed from keyboards/kprepublic/bm40hsrgb/keymaps/default/keymap.c)0
-rw-r--r--keyboards/kprepublic/bm40hsrgb/rev1/keymaps/default/readme.md (renamed from keyboards/kprepublic/bm40hsrgb/keymaps/default/readme.md)0
-rw-r--r--keyboards/kprepublic/bm40hsrgb/rev1/keymaps/gabustoledo/config.h (renamed from keyboards/kprepublic/bm40hsrgb/keymaps/gabustoledo/config.h)0
-rwxr-xr-xkeyboards/kprepublic/bm40hsrgb/rev1/keymaps/gabustoledo/keymap.c (renamed from keyboards/kprepublic/bm40hsrgb/keymaps/gabustoledo/keymap.c)0
-rw-r--r--keyboards/kprepublic/bm40hsrgb/rev1/keymaps/gabustoledo/readme.md (renamed from keyboards/kprepublic/bm40hsrgb/keymaps/gabustoledo/readme.md)0
-rw-r--r--keyboards/kprepublic/bm40hsrgb/rev1/keymaps/gabustoledo/rules.mk (renamed from keyboards/kprepublic/bm40hsrgb/keymaps/gabustoledo/rules.mk)0
-rw-r--r--keyboards/kprepublic/bm40hsrgb/rev1/keymaps/signynt/config.h (renamed from keyboards/kprepublic/bm40hsrgb/keymaps/signynt/config.h)0
-rw-r--r--keyboards/kprepublic/bm40hsrgb/rev1/keymaps/signynt/keymap.c (renamed from keyboards/kprepublic/bm40hsrgb/keymaps/signynt/keymap.c)0
-rw-r--r--keyboards/kprepublic/bm40hsrgb/rev1/keymaps/signynt/readme.md (renamed from keyboards/kprepublic/bm40hsrgb/keymaps/signynt/readme.md)0
-rw-r--r--keyboards/kprepublic/bm40hsrgb/rev1/keymaps/signynt/rules.mk (renamed from keyboards/kprepublic/bm40hsrgb/keymaps/signynt/rules.mk)0
-rw-r--r--keyboards/kprepublic/bm40hsrgb/rev1/keymaps/signynt_2_loud/config.h (renamed from keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_loud/config.h)0
-rw-r--r--keyboards/kprepublic/bm40hsrgb/rev1/keymaps/signynt_2_loud/keymap.c (renamed from keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_loud/keymap.c)0
-rw-r--r--keyboards/kprepublic/bm40hsrgb/rev1/keymaps/signynt_2_loud/readme.md (renamed from keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_loud/readme.md)0
-rw-r--r--keyboards/kprepublic/bm40hsrgb/rev1/keymaps/signynt_2_loud/rules.mk (renamed from keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_loud/rules.mk)0
-rw-r--r--keyboards/kprepublic/bm40hsrgb/rev1/keymaps/signynt_2_quiet/config.h (renamed from keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_quiet/config.h)0
-rw-r--r--keyboards/kprepublic/bm40hsrgb/rev1/keymaps/signynt_2_quiet/keymap.c (renamed from keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_quiet/keymap.c)0
-rw-r--r--keyboards/kprepublic/bm40hsrgb/rev1/keymaps/signynt_2_quiet/readme.md (renamed from keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_quiet/readme.md)0
-rw-r--r--keyboards/kprepublic/bm40hsrgb/rev1/keymaps/signynt_2_quiet/rules.mk (renamed from keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_quiet/rules.mk)0
-rw-r--r--keyboards/kprepublic/bm40hsrgb/rev1/keymaps/via/keymap.c (renamed from keyboards/kprepublic/bm40hsrgb/keymaps/via/keymap.c)0
-rw-r--r--keyboards/kprepublic/bm40hsrgb/rev1/keymaps/via/readme.md (renamed from keyboards/kprepublic/bm40hsrgb/keymaps/via/readme.md)0
-rw-r--r--keyboards/kprepublic/bm40hsrgb/rev1/keymaps/via/rules.mk (renamed from keyboards/kprepublic/bm40hsrgb/keymaps/via/rules.mk)0
-rwxr-xr-xkeyboards/kprepublic/bm40hsrgb/rev1/keymaps/wolff_abnt2/keymap.c (renamed from keyboards/kprepublic/bm40hsrgb/keymaps/wolff_abnt2/keymap.c)0
-rwxr-xr-xkeyboards/kprepublic/bm40hsrgb/rev1/keymaps/wolff_abnt2/readme.md (renamed from keyboards/kprepublic/bm40hsrgb/keymaps/wolff_abnt2/readme.md)0
-rw-r--r--keyboards/kprepublic/bm40hsrgb/rev1/readme.md21
-rwxr-xr-xkeyboards/kprepublic/bm40hsrgb/rev1/rev1.c (renamed from keyboards/kprepublic/bm40hsrgb/bm40hsrgb.c)0
-rwxr-xr-xkeyboards/kprepublic/bm40hsrgb/rev1/rules.mk (renamed from keyboards/kprepublic/bm40hsrgb/rules.mk)0
-rwxr-xr-xkeyboards/kprepublic/bm40hsrgb/rev2/config.h22
-rw-r--r--keyboards/kprepublic/bm40hsrgb/rev2/info.json197
-rwxr-xr-xkeyboards/kprepublic/bm40hsrgb/rev2/keymaps/default/keymap.c101
-rw-r--r--keyboards/kprepublic/bm40hsrgb/rev2/keymaps/default/rules.mk (renamed from keyboards/clickety_split/leeloo/keymaps/default/rules.mk)0
-rw-r--r--keyboards/kprepublic/bm40hsrgb/rev2/keymaps/via/keymap.c100
-rw-r--r--keyboards/kprepublic/bm40hsrgb/rev2/keymaps/via/rules.mk3
-rw-r--r--keyboards/kprepublic/bm40hsrgb/rev2/readme.md29
-rwxr-xr-xkeyboards/kprepublic/bm40hsrgb/rev2/rev2.c73
-rw-r--r--keyboards/kprepublic/bm40hsrgb/rev2/rules.mk0
-rw-r--r--keyboards/kprepublic/bm60hsrgb/rev2/config.h4
-rw-r--r--keyboards/kprepublic/bm60hsrgb/rev2/rev2.c4
-rw-r--r--keyboards/kprepublic/bm60hsrgb/rev2/rules.mk2
-rw-r--r--keyboards/kprepublic/bm60hsrgb_ec/rev2/config.h4
-rw-r--r--keyboards/kprepublic/bm60hsrgb_ec/rev2/rev2.c2
-rw-r--r--keyboards/kprepublic/bm60hsrgb_iso/rev2/config.h4
-rw-r--r--keyboards/kprepublic/bm60hsrgb_iso/rev2/rev2.c4
-rw-r--r--keyboards/kprepublic/bm60hsrgb_iso/rev2/rules.mk2
-rw-r--r--keyboards/kprepublic/bm60hsrgb_poker/rev2/config.h4
-rw-r--r--keyboards/kprepublic/bm60hsrgb_poker/rev2/rev2.c4
-rw-r--r--keyboards/kprepublic/bm60hsrgb_poker/rev2/rules.mk2
-rw-r--r--keyboards/kprepublic/bm68hsrgb/rev2/config.h4
-rw-r--r--keyboards/kprepublic/bm68hsrgb/rev2/rev2.c2
-rw-r--r--keyboards/kprepublic/bm80v2/bm80v2.c2
-rw-r--r--keyboards/kprepublic/bm80v2/config.h4
-rw-r--r--keyboards/kprepublic/bm80v2_iso/bm80v2_iso.c2
-rw-r--r--keyboards/kprepublic/bm80v2_iso/config.h4
-rw-r--r--keyboards/ktec/ergodone/rules.mk2
-rw-r--r--keyboards/latincompass/latin17rgb/config.h13
-rw-r--r--keyboards/latincompass/latin17rgb/latin17rgb.c2
-rw-r--r--keyboards/latincompass/latin60rgb/config.h4
-rw-r--r--keyboards/latincompass/latin60rgb/latin60rgb.c2
-rw-r--r--keyboards/latincompass/latin6rgb/config.h11
-rw-r--r--keyboards/latincompass/latin6rgb/latin6rgb.c2
-rw-r--r--keyboards/lfkeyboards/TWIlib.c296
-rw-r--r--keyboards/lfkeyboards/TWIlib.h71
-rw-r--r--keyboards/lfkeyboards/issi.c244
-rw-r--r--keyboards/lfkeyboards/issi.h39
-rw-r--r--keyboards/lfkeyboards/lfk65_hs/config.h2
-rw-r--r--keyboards/lfkeyboards/lfk65_hs/info.json22
-rw-r--r--keyboards/lfkeyboards/lfk65_hs/lfk65_hs.c5
-rw-r--r--keyboards/lfkeyboards/lfk65_hs/lfk65_hs.h3
-rw-r--r--keyboards/lfkeyboards/lfk65_hs/rules.mk2
-rw-r--r--keyboards/lfkeyboards/lfk78/config.h2
-rw-r--r--keyboards/lfkeyboards/lfk78/keymaps/ca178858/keymap.c19
-rw-r--r--keyboards/lfkeyboards/lfk78/keymaps/ca178858/rules.mk33
-rw-r--r--keyboards/lfkeyboards/lfk78/keymaps/default/keymap.c10
-rw-r--r--keyboards/lfkeyboards/lfk78/keymaps/iso/keymap.c10
-rw-r--r--keyboards/lfkeyboards/lfk78/keymaps/split_bs_osx/keymap.c10
-rw-r--r--keyboards/lfkeyboards/lfk78/lfk78.c113
-rw-r--r--keyboards/lfkeyboards/lfk78/lfk78.h15
-rw-r--r--keyboards/lfkeyboards/lfk78/post_rules.mk11
-rw-r--r--keyboards/lfkeyboards/lfk78/revb/info.json24
-rw-r--r--keyboards/lfkeyboards/lfk78/revb/revb.c19
-rw-r--r--keyboards/lfkeyboards/lfk78/revc/info.json24
-rw-r--r--keyboards/lfkeyboards/lfk78/revc/revc.c14
-rw-r--r--keyboards/lfkeyboards/lfk78/revj/info.json24
-rw-r--r--keyboards/lfkeyboards/lfk78/revj/revj.c14
-rw-r--r--keyboards/lfkeyboards/lfk78/rules.mk6
-rw-r--r--keyboards/lfkeyboards/lfk87/config.h2
-rw-r--r--keyboards/lfkeyboards/lfk87/info.json10
-rw-r--r--keyboards/lfkeyboards/lfk87/keymaps/ca178858/keymap.c11
-rw-r--r--keyboards/lfkeyboards/lfk87/keymaps/ca178858/rules.mk15
-rw-r--r--keyboards/lfkeyboards/lfk87/keymaps/default/keymap.c10
-rw-r--r--keyboards/lfkeyboards/lfk87/keymaps/default/rules.mk12
-rw-r--r--keyboards/lfkeyboards/lfk87/keymaps/gbchk/keymap.c10
-rw-r--r--keyboards/lfkeyboards/lfk87/keymaps/gbchk/rules.mk15
-rw-r--r--keyboards/lfkeyboards/lfk87/keymaps/iso/keymap.c10
-rw-r--r--keyboards/lfkeyboards/lfk87/keymaps/iso/rules.mk13
-rw-r--r--keyboards/lfkeyboards/lfk87/lfk87.c98
-rw-r--r--keyboards/lfkeyboards/lfk87/lfk87.h19
-rw-r--r--keyboards/lfkeyboards/lfk87/post_rules.mk4
-rw-r--r--keyboards/lfkeyboards/lfk87/reva/info.json16
-rw-r--r--keyboards/lfkeyboards/lfk87/reva/reva.c16
-rw-r--r--keyboards/lfkeyboards/lfk87/revc/info.json16
-rw-r--r--keyboards/lfkeyboards/lfk87/revc/revc.c17
-rw-r--r--keyboards/lfkeyboards/lfk87/rules.mk8
-rw-r--r--keyboards/lfkeyboards/lfkpad/info.json20
-rw-r--r--keyboards/lfkeyboards/lfkpad/keymaps/pascalpfeil/keymap.c15
-rw-r--r--keyboards/lfkeyboards/lfkpad/lfkpad.c52
-rw-r--r--keyboards/lfkeyboards/lfkpad/post_rules.mk4
-rw-r--r--keyboards/lfkeyboards/lfkpad/rules.mk7
-rw-r--r--keyboards/lfkeyboards/lighting.c158
-rw-r--r--keyboards/lfkeyboards/lighting.h49
-rw-r--r--keyboards/lfkeyboards/mini1800/config.h2
-rw-r--r--keyboards/lfkeyboards/mini1800/info.json24
-rw-r--r--keyboards/lfkeyboards/mini1800/keymaps/ca178858/keymap.c10
-rw-r--r--keyboards/lfkeyboards/mini1800/keymaps/default/keymap.c10
-rw-r--r--keyboards/lfkeyboards/mini1800/mini1800.c111
-rw-r--r--keyboards/lfkeyboards/mini1800/mini1800.h18
-rw-r--r--keyboards/lfkeyboards/mini1800/reva/post_rules.mk4
-rw-r--r--keyboards/lfkeyboards/mini1800/reva/rules.mk8
-rw-r--r--keyboards/lfkeyboards/mini1800/revc/post_rules.mk4
-rw-r--r--keyboards/lfkeyboards/mini1800/revc/rules.mk8
-rw-r--r--keyboards/lfkeyboards/smk65/keymaps/default/rules.mk8
-rw-r--r--keyboards/lfkeyboards/smk65/keymaps/iso/rules.mk8
-rw-r--r--keyboards/lfkeyboards/smk65/post_rules.mk4
-rw-r--r--keyboards/lfkeyboards/smk65/revb/config.h2
-rw-r--r--keyboards/lfkeyboards/smk65/revb/info.json23
-rw-r--r--keyboards/lfkeyboards/smk65/revb/revb.c37
-rw-r--r--keyboards/lfkeyboards/smk65/revb/revb.h17
-rw-r--r--keyboards/lfkeyboards/smk65/revb/rules.mk9
-rw-r--r--keyboards/lfkeyboards/smk65/revf/info.json4
-rw-r--r--keyboards/lfkeyboards/smk65/revf/rules.mk4
-rw-r--r--keyboards/manyboard/macro/keymaps/default/keymap.c6
-rw-r--r--keyboards/manyboard/macro/keymaps/via/keymap.c6
-rw-r--r--keyboards/matrix/abelx/abelx.c2
-rw-r--r--keyboards/matrix/abelx/rules.mk2
-rw-r--r--keyboards/matrix/m20add/config.h4
-rw-r--r--keyboards/matrix/m20add/rgb_ring.c4
-rw-r--r--keyboards/matrix/m20add/rules.mk2
-rw-r--r--keyboards/matrix/noah/config.h6
-rw-r--r--keyboards/matrix/noah/noah.c4
-rw-r--r--keyboards/mechlovin/adelais/rgb_led/rev2/config.h13
-rw-r--r--keyboards/mechlovin/adelais/rgb_led/rev2/rev2.c2
-rw-r--r--keyboards/mechlovin/adelais/rgb_led/rev3/config.h13
-rw-r--r--keyboards/mechlovin/adelais/rgb_led/rev3/rev3.c2
-rw-r--r--keyboards/mechlovin/delphine/rgb_led/config.h12
-rw-r--r--keyboards/mechlovin/delphine/rgb_led/rgb_led.c2
-rw-r--r--keyboards/mechlovin/hannah60rgb/rev2/config.h14
-rw-r--r--keyboards/mechlovin/hannah60rgb/rev2/rev2.c2
-rw-r--r--keyboards/mechlovin/hex6c/config.h3
-rw-r--r--keyboards/mechlovin/hex6c/info.json5
-rw-r--r--keyboards/mechlovin/infinity87/rgb_rev1/config.h11
-rw-r--r--keyboards/mechlovin/infinity87/rgb_rev1/rgb_rev1.c2
-rw-r--r--keyboards/mechlovin/olly/octagon/config.h11
-rw-r--r--keyboards/mechlovin/olly/octagon/octagon.c2
-rw-r--r--keyboards/mechlovin/zed60/config.h2
-rw-r--r--keyboards/mechlovin/zed65/910/config.h2
-rw-r--r--keyboards/mechlovin/zed65/mono_led/config.h11
-rw-r--r--keyboards/mechlovin/zed65/mono_led/mono_led.c2
-rw-r--r--keyboards/mechlovin/zed65/no_backlight/wearhaus66/config.h2
-rw-r--r--keyboards/mechlovin/zed65/rev1/config.h2
-rw-r--r--keyboards/mechwild/sugarglider/config.h2
-rw-r--r--keyboards/mechwild/sugarglider/info.json3
-rw-r--r--keyboards/mechwild/sugarglider/rules.mk2
-rwxr-xr-xkeyboards/melgeek/mach80/config.h4
-rwxr-xr-xkeyboards/melgeek/mach80/rev1/rev1.c6
-rwxr-xr-xkeyboards/melgeek/mach80/rev2/rev2.c6
-rw-r--r--keyboards/melgeek/mj61/config.h4
-rw-r--r--keyboards/melgeek/mj61/rev1/rev1.c2
-rw-r--r--keyboards/melgeek/mj61/rev2/rev2.c2
-rw-r--r--keyboards/melgeek/mj63/config.h4
-rw-r--r--keyboards/melgeek/mj63/rev1/rev1.c2
-rw-r--r--keyboards/melgeek/mj63/rev2/rev2.c2
-rw-r--r--keyboards/melgeek/mj64/config.h4
-rw-r--r--keyboards/melgeek/mj64/rev1/rev1.c2
-rw-r--r--keyboards/melgeek/mj64/rev2/rev2.c2
-rw-r--r--keyboards/melgeek/mj64/rev3/rev3.c2
-rw-r--r--keyboards/melgeek/mj65/config.h4
-rw-r--r--keyboards/melgeek/mj65/rev3/rev3.c2
-rwxr-xr-xkeyboards/melgeek/mojo68/config.h4
-rwxr-xr-xkeyboards/melgeek/mojo68/rev1/rev1.c6
-rw-r--r--keyboards/melgeek/mojo75/config.h4
-rw-r--r--keyboards/melgeek/mojo75/rev1/rev1.c2
-rwxr-xr-xkeyboards/melgeek/tegic/config.h4
-rwxr-xr-xkeyboards/melgeek/tegic/rev1/rev1.c2
-rw-r--r--keyboards/melgeek/z70ultra/config.h4
-rw-r--r--keyboards/melgeek/z70ultra/z70ultra.c6
-rw-r--r--keyboards/miller/gm862/config.h4
-rw-r--r--keyboards/miller/gm862/gm862.c2
-rw-r--r--keyboards/mitosis/rules.mk2
-rw-r--r--keyboards/mlego/m65/config.h21
-rw-r--r--keyboards/mlego/m65/info.json84
-rw-r--r--keyboards/mlego/m65/keymaps/default/config.h18
-rw-r--r--keyboards/mlego/m65/keymaps/default/keymap.c94
-rw-r--r--keyboards/mlego/m65/keymaps/default/rules.mk1
-rw-r--r--keyboards/mlego/m65/keymaps/dk/config.h20
-rw-r--r--keyboards/mlego/m65/keymaps/dk/keymap.c121
-rw-r--r--keyboards/mlego/m65/keymaps/dk/readme.md13
-rw-r--r--keyboards/mlego/m65/keymaps/uk/config.h27
-rw-r--r--keyboards/mlego/m65/keymaps/uk/keymap.c308
-rw-r--r--keyboards/mlego/m65/keymaps/uk/rules.mk1
-rw-r--r--keyboards/mlego/m65/keymaps/via/config.h20
-rw-r--r--keyboards/mlego/m65/keymaps/via/keymap.c118
-rw-r--r--keyboards/mlego/m65/lib/glcdfont.c233
-rw-r--r--keyboards/mlego/m65/m65.c249
-rw-r--r--keyboards/mlego/m65/m65.h165
-rw-r--r--keyboards/mlego/m65/readme.md2
-rw-r--r--keyboards/mlego/m65/rev1/config.h21
-rw-r--r--keyboards/mlego/m65/rev1/info.json130
-rw-r--r--keyboards/mlego/m65/rev1/mcuconf.h22
-rw-r--r--keyboards/mlego/m65/rev1/rules.mk14
-rw-r--r--keyboards/mlego/m65/rev2/board.h17
-rw-r--r--keyboards/mlego/m65/rev2/config.h21
-rw-r--r--keyboards/mlego/m65/rev2/info.json129
-rw-r--r--keyboards/mlego/m65/rev2/mcuconf.h22
-rw-r--r--keyboards/mlego/m65/rev2/rules.mk14
-rw-r--r--keyboards/mlego/m65/rev3/config.h21
-rw-r--r--keyboards/mlego/m65/rev3/halconf.h22
-rw-r--r--keyboards/mlego/m65/rev3/info.json131
-rw-r--r--keyboards/mlego/m65/rev3/mcuconf.h22
-rw-r--r--keyboards/mlego/m65/rev3/rules.mk14
-rw-r--r--keyboards/mlego/m65/rev4/config.h30
-rw-r--r--keyboards/mlego/m65/rev4/halconf.h22
-rw-r--r--keyboards/mlego/m65/rev4/info.json133
-rw-r--r--keyboards/mlego/m65/rev4/mcuconf.h22
-rw-r--r--keyboards/mlego/m65/rev4/rules.mk15
-rw-r--r--keyboards/mode/m65ha_alpha/info.json3
-rw-r--r--keyboards/mode/m65ha_alpha/rules.mk2
-rw-r--r--keyboards/mode/m65hi_alpha/info.json3
-rw-r--r--keyboards/mode/m65hi_alpha/rules.mk2
-rw-r--r--keyboards/mode/m65s/info.json3
-rw-r--r--keyboards/mode/m65s/rules.mk2
-rw-r--r--keyboards/mode/m75h/config.h21
-rw-r--r--keyboards/mode/m75h/info.json5
-rw-r--r--keyboards/mode/m75s/config.h3
-rw-r--r--keyboards/mode/m75s/info.json5
-rwxr-xr-xkeyboards/molecule/rules.mk2
-rw-r--r--keyboards/monsgeek/m1/config.h10
-rw-r--r--keyboards/monsgeek/m1/info.json12
-rw-r--r--keyboards/monsgeek/m1/m1.c4
-rw-r--r--keyboards/monsgeek/m1/rules.mk7
-rw-r--r--keyboards/monsgeek/m5/config.h10
-rw-r--r--keyboards/monsgeek/m5/info.json12
-rw-r--r--keyboards/monsgeek/m5/m5.c4
-rw-r--r--keyboards/monsgeek/m5/rules.mk3
-rw-r--r--keyboards/monsgeek/m6/config.h10
-rw-r--r--keyboards/monsgeek/m6/info.json12
-rw-r--r--keyboards/monsgeek/m6/m6.c4
-rw-r--r--keyboards/monsgeek/m6/rules.mk3
-rw-r--r--keyboards/moon/rules.mk2
-rw-r--r--keyboards/moonlander/config.h10
-rw-r--r--keyboards/moonlander/info.json11
-rw-r--r--keyboards/moonlander/keymaps/default/keymap.c6
-rw-r--r--keyboards/moonlander/keymaps/via/keymap.c16
-rw-r--r--keyboards/moonlander/moonlander.c2
-rw-r--r--keyboards/moonlander/rules.mk3
-rw-r--r--keyboards/mt/mt64rgb/config.h4
-rw-r--r--keyboards/mt/mt64rgb/mt64rgb.c2
-rw-r--r--keyboards/mt/mt84/config.h6
-rw-r--r--keyboards/mt/mt84/mt84.c2
-rw-r--r--keyboards/mt/split75/rules.mk2
-rw-r--r--keyboards/mxss/config.h3
-rw-r--r--keyboards/mxss/info.json9
-rw-r--r--keyboards/mxss/keymaps/default/keymap.c17
-rw-r--r--keyboards/mxss/keymaps/via/keymap.c3
-rw-r--r--keyboards/mxss/mxss.c73
-rw-r--r--keyboards/mxss/mxss_frontled.c278
-rw-r--r--keyboards/mxss/mxss_frontled.h87
-rw-r--r--keyboards/mxss/readme.md34
-rw-r--r--keyboards/mxss/rgblight.c1392
-rw-r--r--keyboards/mxss/rules.mk23
-rw-r--r--keyboards/mxss/templates/keymap.c35
-rw-r--r--keyboards/nack/config.h2
-rw-r--r--keyboards/neson_design/700e/700e.c10
-rw-r--r--keyboards/neson_design/700e/config.h6
-rw-r--r--keyboards/neson_design/700e/rules.mk3
-rw-r--r--keyboards/neson_design/n6/config.h6
-rw-r--r--keyboards/neson_design/n6/n6.c6
-rw-r--r--keyboards/neson_design/n6/rules.mk3
-rw-r--r--keyboards/neson_design/nico/nico.c4
-rwxr-xr-xkeyboards/novelkeys/nk65/config.h2
-rwxr-xr-xkeyboards/novelkeys/nk65/rules.mk4
-rwxr-xr-xkeyboards/novelkeys/nk87/config.h2
-rwxr-xr-xkeyboards/novelkeys/nk87/rules.mk4
-rwxr-xr-xkeyboards/novelkeys/nk_plus/info.json1
-rw-r--r--keyboards/novelkeys/nk_plus/rules.mk5
-rw-r--r--keyboards/nullbitsco/nibble/rules.mk2
-rw-r--r--keyboards/nullbitsco/snap/rules.mk4
-rw-r--r--keyboards/nullbitsco/tidbit/rules.mk4
-rw-r--r--keyboards/oddforge/vea/rules.mk2
-rw-r--r--keyboards/oddforge/vea/ws2812_custom.c6
-rw-r--r--keyboards/onekeyco/dango40/config.h21
-rw-r--r--keyboards/onekeyco/dango40/info.json3
-rw-r--r--keyboards/opendeck/32/rev1/config.h4
-rw-r--r--keyboards/opendeck/32/rev1/rev1.c2
-rw-r--r--keyboards/owlab/voice65/hotswap/config.h4
-rw-r--r--keyboards/owlab/voice65/hotswap/hotswap.c2
-rw-r--r--keyboards/owlab/voice65/soldered/config.h4
-rw-r--r--keyboards/owlab/voice65/soldered/soldered.c2
-rw-r--r--keyboards/phage_studio/pila87/rules.mk4
-rw-r--r--keyboards/phoenix/config.h1
-rw-r--r--keyboards/phoenix/halconf.h2
-rw-r--r--keyboards/planck/ez/config.h4
-rw-r--r--keyboards/planck/ez/ez.c2
-rw-r--r--keyboards/planck/light/config.h13
-rw-r--r--keyboards/planck/light/light.c2
-rw-r--r--keyboards/playkbtw/pk64rgb/config.h4
-rw-r--r--keyboards/playkbtw/pk64rgb/pk64rgb.c2
-rw-r--r--keyboards/plywrks/ply8x/config.h2
-rw-r--r--keyboards/primekb/meridian/config.h2
-rw-r--r--keyboards/primekb/meridian/ws2812/config.h2
-rw-r--r--keyboards/primekb/prime_e/config.h2
-rw-r--r--keyboards/primekb/prime_e/info.json3
-rw-r--r--keyboards/projectd/65/projectd_65_ansi/config.h11
-rw-r--r--keyboards/projectd/65/projectd_65_ansi/info.json9
-rw-r--r--keyboards/projectd/65/projectd_65_ansi/projectd_65_ansi.c4
-rw-r--r--keyboards/projectd/65/projectd_65_ansi/rules.mk3
-rw-r--r--keyboards/projectkb/alice/rev1/config.h2
-rw-r--r--keyboards/projectkb/alice/rev2/config.h2
-rw-r--r--keyboards/pteron36/config.h3
-rw-r--r--keyboards/pteron36/info.json3
-rw-r--r--keyboards/qvex/lynepad2/config.h2
-rw-r--r--keyboards/qvex/lynepad2/info.json3
-rw-r--r--keyboards/rart/rartlice/config.h2
-rw-r--r--keyboards/redox_w/rules.mk2
-rw-r--r--keyboards/redragon/k667/config.h6
-rw-r--r--keyboards/redragon/k667/k667.c2
-rw-r--r--keyboards/rgbkb/mun/config.h3
-rw-r--r--keyboards/rgbkb/mun/rev1/info.json5
-rw-r--r--keyboards/rgbkb/mun/rules.mk2
-rw-r--r--keyboards/rgbkb/pan/pan.c2
-rw-r--r--keyboards/rgbkb/sol3/config.h3
-rw-r--r--keyboards/rgbkb/sol3/rev1/info.json5
-rw-r--r--keyboards/rgbkb/sol3/rules.mk2
-rw-r--r--keyboards/riot_pad/config.h2
-rw-r--r--keyboards/satt/comet46/rules.mk2
-rw-r--r--keyboards/sawnsprojects/okayu/stm32f072/config.h2
-rw-r--r--keyboards/sawnsprojects/okayu/stm32f103/config.h2
-rw-r--r--keyboards/sawnsprojects/okayu/stm32f303/config.h2
-rw-r--r--keyboards/sirius/uni660/rev1/config.h2
-rw-r--r--keyboards/sirius/uni660/rev1/rules.mk2
-rw-r--r--keyboards/sirius/uni660/rev2/ansi/config.h2
-rw-r--r--keyboards/sirius/uni660/rev2/iso/config.h2
-rw-r--r--keyboards/sirius/uni660/rev2/rules.mk2
-rw-r--r--keyboards/skyloong/gk61/pro/config.h21
-rw-r--r--keyboards/skyloong/gk61/pro/halconf.h7
-rw-r--r--keyboards/skyloong/gk61/pro/info.json338
-rw-r--r--keyboards/skyloong/gk61/pro/keymaps/default/keymap.c44
-rw-r--r--keyboards/skyloong/gk61/pro/keymaps/default/rules.mk1
-rw-r--r--keyboards/skyloong/gk61/pro/keymaps/via/keymap.c67
-rw-r--r--keyboards/skyloong/gk61/pro/keymaps/via/rules.mk2
-rw-r--r--keyboards/skyloong/gk61/pro/mcuconf.h11
-rw-r--r--keyboards/skyloong/gk61/pro/pro.c235
-rw-r--r--keyboards/skyloong/gk61/pro/readme.md33
-rw-r--r--keyboards/skyloong/gk61/pro/rules.mk1
-rw-r--r--keyboards/skyloong/gk61/pro_48/config.h18
-rw-r--r--keyboards/skyloong/gk61/pro_48/halconf.h7
-rw-r--r--keyboards/skyloong/gk61/pro_48/info.json338
-rw-r--r--keyboards/skyloong/gk61/pro_48/keymaps/default/keymap.c44
-rw-r--r--keyboards/skyloong/gk61/pro_48/keymaps/default/rules.mk1
-rw-r--r--keyboards/skyloong/gk61/pro_48/keymaps/via/keymap.c68
-rw-r--r--keyboards/skyloong/gk61/pro_48/keymaps/via/rules.mk2
-rw-r--r--keyboards/skyloong/gk61/pro_48/mcuconf.h11
-rw-r--r--keyboards/skyloong/gk61/pro_48/pro_48.c227
-rw-r--r--keyboards/skyloong/gk61/pro_48/readme.md33
-rw-r--r--keyboards/skyloong/gk61/pro_48/rules.mk1
-rw-r--r--keyboards/skyloong/gk61/v1/config.h26
-rw-r--r--keyboards/skyloong/gk61/v1/halconf.h21
-rw-r--r--keyboards/skyloong/gk61/v1/info.json331
-rw-r--r--keyboards/skyloong/gk61/v1/keymaps/default/keymap.c47
-rw-r--r--keyboards/skyloong/gk61/v1/keymaps/via/keymap.c47
-rw-r--r--keyboards/skyloong/gk61/v1/keymaps/via/rules.mk (renamed from keyboards/mlego/m65/keymaps/via/rules.mk)0
-rw-r--r--keyboards/skyloong/gk61/v1/mcuconf.h21
-rw-r--r--keyboards/skyloong/gk61/v1/readme.md33
-rw-r--r--keyboards/skyloong/gk61/v1/rules.mk1
-rw-r--r--keyboards/skyloong/gk61/v1/v1.c119
-rw-r--r--keyboards/skyloong/qk21/v1/config.h12
-rw-r--r--keyboards/skyloong/qk21/v1/info.json129
-rw-r--r--keyboards/skyloong/qk21/v1/keymaps/default/keymap.c54
-rw-r--r--keyboards/skyloong/qk21/v1/keymaps/via/keymap.c54
-rw-r--r--keyboards/skyloong/qk21/v1/keymaps/via/rules.mk1
-rw-r--r--keyboards/skyloong/qk21/v1/readme.md27
-rw-r--r--keyboards/skyloong/qk21/v1/rules.mk1
-rw-r--r--keyboards/skyloong/qk21/v1/v1.c49
-rw-r--r--keyboards/smallkeyboard/config.h11
-rw-r--r--keyboards/smallkeyboard/smallkeyboard.c2
-rw-r--r--keyboards/smithrune/iron165r2/f411/info.json3
-rw-r--r--keyboards/smithrune/iron165r2/f411/rules.mk2
-rwxr-xr-xkeyboards/spaceholdings/nebula12/config.h4
-rwxr-xr-xkeyboards/spaceholdings/nebula12/rules.mk2
-rwxr-xr-xkeyboards/spaceholdings/nebula68/config.h2
-rwxr-xr-xkeyboards/spaceholdings/nebula68/rules.mk2
-rw-r--r--keyboards/spiderisland/split78/rules.mk2
-rw-r--r--keyboards/sporewoh/banime40/config.h20
-rw-r--r--keyboards/sporewoh/banime40/info.json3
-rw-r--r--keyboards/stront/info.json1
-rw-r--r--keyboards/stront/rules.mk1
-rw-r--r--keyboards/swiftrax/retropad/config.h21
-rw-r--r--keyboards/switchplate/southpaw_65/rules.mk2
-rwxr-xr-xkeyboards/sx60/rules.mk2
-rw-r--r--keyboards/system76/launch_1/rules.mk2
-rw-r--r--keyboards/teleport/native/ansi/keymaps/default/keymap.c6
-rw-r--r--keyboards/teleport/native/ansi/keymaps/perfmode/keymap.c6
-rw-r--r--keyboards/teleport/native/ansi/keymaps/via/keymap.c6
-rw-r--r--keyboards/teleport/native/config.h13
-rw-r--r--keyboards/teleport/native/iso/keymaps/default/keymap.c6
-rw-r--r--keyboards/teleport/native/iso/keymaps/perfmode/keymap.c6
-rw-r--r--keyboards/teleport/native/iso/keymaps/via/keymap.c6
-rw-r--r--keyboards/teleport/native/native.c2
-rw-r--r--keyboards/telophase/rules.mk2
-rw-r--r--keyboards/terrazzo/config.h4
-rw-r--r--keyboards/terrazzo/terrazzo.c2
-rwxr-xr-xkeyboards/tetris/keymaps/default/keymap.c34
-rw-r--r--keyboards/thevankeyboards/minivan/keymaps/halvves/keymap.c28
-rw-r--r--keyboards/thevankeyboards/minivan/keymaps/jetpacktuxedo/keymap.c8
-rw-r--r--keyboards/thevankeyboards/minivan/keymaps/josjoha/keymap.c20
-rw-r--r--keyboards/tkc/portico/config.h8
-rw-r--r--keyboards/tkc/portico/portico.c2
-rw-r--r--keyboards/tkc/portico/rules.mk2
-rw-r--r--keyboards/tkc/portico68v2/config.h4
-rw-r--r--keyboards/tkc/portico68v2/portico68v2.c2
-rw-r--r--keyboards/tkc/portico75/config.h6
-rw-r--r--keyboards/tkc/portico75/keymaps/via/rules.mk2
-rw-r--r--keyboards/tkc/portico75/portico75.c2
-rw-r--r--keyboards/tkw/grandiceps/rev2/info.json3
-rw-r--r--keyboards/tkw/grandiceps/rev2/rules.mk2
-rw-r--r--keyboards/tominabox1/le_chiffre/keymaps/default/keymap.c145
-rw-r--r--keyboards/tominabox1/le_chiffre/keymaps/via/keymap.c106
-rw-r--r--keyboards/tominabox1/le_chiffre/le_chiffre.c123
-rw-r--r--keyboards/tominabox1/le_chiffre/le_chiffre.h17
-rw-r--r--keyboards/tominabox1/le_chiffre/post_config.h14
-rw-r--r--keyboards/torn/rules.mk2
-rw-r--r--keyboards/touchpad/rules.mk3
-rw-r--r--keyboards/tzarc/djinn/info.json3
-rw-r--r--keyboards/tzarc/djinn/rules.mk2
-rw-r--r--keyboards/tzarc/ghoul/info.json3
-rw-r--r--keyboards/tzarc/ghoul/rules.mk1
-rw-r--r--keyboards/v60_type_r/keymaps/xtonhasvim/keymap.c2
-rw-r--r--keyboards/vertex/angle65/config.h2
-rw-r--r--keyboards/vertex/arc60/config.h2
-rw-r--r--keyboards/vertex/arc60h/config.h2
-rw-r--r--keyboards/viendi8l/info.json3
-rw-r--r--keyboards/viendi8l/rules.mk3
-rw-r--r--keyboards/viktus/sp111/rules.mk2
-rw-r--r--keyboards/wilba_tech/rama_works_kara/config.h2
-rw-r--r--keyboards/wilba_tech/rama_works_kara/rules.mk4
-rw-r--r--keyboards/wilba_tech/rama_works_koyu/config.h2
-rw-r--r--keyboards/wilba_tech/rama_works_koyu/rules.mk4
-rw-r--r--keyboards/wilba_tech/rama_works_m10_b/config.h2
-rw-r--r--keyboards/wilba_tech/rama_works_m10_b/info.json3
-rw-r--r--keyboards/wilba_tech/rama_works_m10_c/config.h4
-rw-r--r--keyboards/wilba_tech/rama_works_m10_c/info.json3
-rw-r--r--keyboards/wilba_tech/rama_works_m10_c/rules.mk4
-rw-r--r--keyboards/wilba_tech/rama_works_m50_a/config.h2
-rw-r--r--keyboards/wilba_tech/rama_works_m50_a/rules.mk4
-rw-r--r--keyboards/wilba_tech/rama_works_m60_a/config.h2
-rw-r--r--keyboards/wilba_tech/rama_works_m60_a/keymaps/zyber/config.h4
-rw-r--r--keyboards/wilba_tech/rama_works_m60_a/rules.mk4
-rw-r--r--keyboards/wilba_tech/rama_works_m65_b/config.h2
-rw-r--r--keyboards/wilba_tech/rama_works_m65_b/rules.mk4
-rw-r--r--keyboards/wilba_tech/rama_works_m65_bx/config.h2
-rw-r--r--keyboards/wilba_tech/rama_works_m65_bx/rules.mk4
-rw-r--r--keyboards/wilba_tech/rama_works_m6_b/config.h2
-rw-r--r--keyboards/wilba_tech/rama_works_m6_b/rules.mk4
-rw-r--r--keyboards/wilba_tech/rama_works_u80_a/config.h2
-rw-r--r--keyboards/wilba_tech/rama_works_u80_a/rules.mk4
-rw-r--r--keyboards/wilba_tech/wt60_a/config.h3
-rw-r--r--keyboards/wilba_tech/wt60_a/rules.mk4
-rw-r--r--keyboards/wilba_tech/wt60_b/config.h2
-rw-r--r--keyboards/wilba_tech/wt60_b/rules.mk4
-rw-r--r--keyboards/wilba_tech/wt60_bx/config.h2
-rw-r--r--keyboards/wilba_tech/wt60_bx/rules.mk4
-rw-r--r--keyboards/wilba_tech/wt60_c/config.h2
-rw-r--r--keyboards/wilba_tech/wt60_c/rules.mk4
-rw-r--r--keyboards/wilba_tech/wt65_a/config.h3
-rw-r--r--keyboards/wilba_tech/wt65_a/rules.mk4
-rw-r--r--keyboards/wilba_tech/wt65_b/config.h3
-rw-r--r--keyboards/wilba_tech/wt65_b/rules.mk4
-rw-r--r--keyboards/wilba_tech/wt75_a/config.h3
-rw-r--r--keyboards/wilba_tech/wt75_a/rules.mk4
-rw-r--r--keyboards/wilba_tech/wt75_b/config.h3
-rw-r--r--keyboards/wilba_tech/wt75_b/rules.mk4
-rw-r--r--keyboards/wilba_tech/wt75_c/config.h3
-rw-r--r--keyboards/wilba_tech/wt75_c/rules.mk4
-rw-r--r--keyboards/wilba_tech/wt80_a/config.h3
-rw-r--r--keyboards/wilba_tech/wt80_a/rules.mk4
-rw-r--r--keyboards/wilba_tech/wt_mono_backlight.c138
-rw-r--r--keyboards/wilba_tech/wt_rgb_backlight.c91
-rw-r--r--keyboards/wilba_tech/zeal60/config.h2
-rw-r--r--keyboards/wilba_tech/zeal60/rules.mk4
-rw-r--r--keyboards/wilba_tech/zeal65/config.h2
-rw-r--r--keyboards/wilba_tech/zeal65/rules.mk4
-rwxr-xr-xkeyboards/woodkeys/meira/TWIlib.c300
-rwxr-xr-xkeyboards/woodkeys/meira/TWIlib.h71
-rw-r--r--keyboards/woodkeys/meira/config.h2
-rw-r--r--keyboards/woodkeys/meira/featherble/config.h1
-rw-r--r--keyboards/woodkeys/meira/info.json10
-rwxr-xr-xkeyboards/woodkeys/meira/issi.c286
-rwxr-xr-xkeyboards/woodkeys/meira/issi.h39
-rw-r--r--keyboards/woodkeys/meira/keymaps/cole/keymap.c1
-rw-r--r--keyboards/woodkeys/meira/keymaps/default/keymap.c1
-rw-r--r--keyboards/woodkeys/meira/keymaps/grahampheath/keymap.c9
-rw-r--r--keyboards/woodkeys/meira/keymaps/grahampheath/rules.mk2
-rw-r--r--keyboards/woodkeys/meira/keymaps/takmiya/keymap.c10
-rwxr-xr-xkeyboards/woodkeys/meira/lighting.c84
-rwxr-xr-xkeyboards/woodkeys/meira/lighting.h6
-rw-r--r--keyboards/woodkeys/meira/matrix.c9
-rw-r--r--keyboards/woodkeys/meira/meira.c39
-rw-r--r--keyboards/woodkeys/meira/meira.h1
-rw-r--r--keyboards/woodkeys/meira/post_rules.mk9
-rw-r--r--keyboards/woodkeys/meira/promicro/config.h2
-rw-r--r--keyboards/woodkeys/meira/rules.mk4
-rw-r--r--keyboards/work_louder/rgb_functions.c2
-rw-r--r--keyboards/xbows/knight/config.h8
-rw-r--r--keyboards/xbows/knight/knight.c2
-rw-r--r--keyboards/xbows/knight_plus/config.h8
-rw-r--r--keyboards/xbows/knight_plus/knight_plus.c2
-rw-r--r--keyboards/xbows/nature/config.h8
-rw-r--r--keyboards/xbows/nature/nature.c2
-rw-r--r--keyboards/xbows/numpad/config.h4
-rw-r--r--keyboards/xbows/numpad/numpad.c2
-rw-r--r--keyboards/xbows/ranger/config.h8
-rw-r--r--keyboards/xbows/ranger/ranger.c2
-rw-r--r--keyboards/xbows/woody/config.h6
-rw-r--r--keyboards/xbows/woody/woody.c2
-rw-r--r--keyboards/xelus/dawn60/rev1/config.h2
-rw-r--r--keyboards/xelus/dawn60/rev1/rules.mk2
-rw-r--r--keyboards/xelus/dawn60/rev1_qmk/config.h6
-rw-r--r--keyboards/xelus/dawn60/rev1_qmk/rev1_qmk.c4
-rw-r--r--keyboards/xelus/dawn60/rev1_qmk/rules.mk2
-rw-r--r--keyboards/xelus/kangaroo/rev1/info.json3
-rw-r--r--keyboards/xelus/kangaroo/rev1/rules.mk2
-rw-r--r--keyboards/xelus/kangaroo/rev2/config.h3
-rw-r--r--keyboards/xelus/kangaroo/rev2/info.json5
-rw-r--r--keyboards/xelus/kangaroo/rev2/rules.mk5
-rw-r--r--keyboards/xelus/pachi/rgb/rev1/config.h4
-rw-r--r--keyboards/xelus/pachi/rgb/rev1/info.json3
-rw-r--r--keyboards/xelus/pachi/rgb/rev1/rev1.c2
-rw-r--r--keyboards/xelus/pachi/rgb/rev1/rules.mk2
-rw-r--r--keyboards/xelus/pachi/rgb/rev2/config.h4
-rw-r--r--keyboards/xelus/pachi/rgb/rev2/info.json3
-rw-r--r--keyboards/xelus/pachi/rgb/rev2/rev2.c2
-rw-r--r--keyboards/xelus/pachi/rgb/rev2/rules.mk2
-rw-r--r--keyboards/xelus/rs108/info.json3
-rw-r--r--keyboards/xelus/rs108/rules.mk2
-rw-r--r--keyboards/xelus/rs60/rev2_0/info.json3
-rw-r--r--keyboards/xelus/rs60/rev2_0/rules.mk1
-rw-r--r--keyboards/xelus/rs60/rev2_1/config.h3
-rw-r--r--keyboards/xelus/rs60/rev2_1/info.json5
-rw-r--r--keyboards/xelus/rs60/rev2_1/rules.mk3
-rw-r--r--keyboards/xelus/valor/rev2/info.json3
-rw-r--r--keyboards/xelus/valor/rev2/rules.mk1
-rw-r--r--keyboards/xelus/valor_frl_tkl/rev1/info.json3
-rw-r--r--keyboards/xelus/valor_frl_tkl/rev1/rules.mk3
-rw-r--r--keyboards/xelus/xs108/info.json3
-rw-r--r--keyboards/xelus/xs108/rules.mk2
-rw-r--r--keyboards/xelus/xs60/hotswap/info.json3
-rw-r--r--keyboards/xelus/xs60/hotswap/rules.mk2
-rw-r--r--keyboards/xelus/xs60/soldered/info.json3
-rw-r--r--keyboards/xelus/xs60/soldered/rules.mk2
-rw-r--r--keyboards/xiudi/xd002/keymaps/multilayer_rgb/rgblite.h2
-rw-r--r--keyboards/xiudi/xd002/keymaps/rgb_lite/rgblite.h2
-rw-r--r--keyboards/xiudi/xd75/keymaps/odyssey/keymap.c8
-rw-r--r--keyboards/xiudi/xd84/rules.mk2
-rw-r--r--keyboards/xiudi/xd96/rules.mk2
-rw-r--r--keyboards/yiancardesigns/barleycorn/rules.mk2
-rw-r--r--keyboards/yiancardesigns/gingham/rules.mk4
-rw-r--r--keyboards/yiancardesigns/seigaiha/rules.mk2
-rw-r--r--keyboards/ymdk/id75/info.json1
-rw-r--r--keyboards/ymdk/melody96/hotswap/info.json501
-rw-r--r--keyboards/ymdk/melody96/hotswap/keymaps/default/keymap.c23
-rw-r--r--keyboards/ymdk/melody96/hotswap/keymaps/via/keymap.c23
-rw-r--r--keyboards/ymdk/melody96/hotswap/keymaps/via/rules.mk (renamed from keyboards/ymdk/melody96/keymaps/via/rules.mk)0
-rw-r--r--keyboards/ymdk/melody96/hotswap/keymaps/zunger/config.h (renamed from keyboards/ymdk/melody96/keymaps/zunger/config.h)0
-rw-r--r--keyboards/ymdk/melody96/hotswap/keymaps/zunger/keymap.c (renamed from keyboards/ymdk/melody96/keymaps/zunger/keymap.c)12
-rw-r--r--keyboards/ymdk/melody96/hotswap/keymaps/zunger/readme.md (renamed from keyboards/ymdk/melody96/keymaps/zunger/readme.md)0
-rw-r--r--keyboards/ymdk/melody96/hotswap/keymaps/zunger/rules.mk (renamed from keyboards/ymdk/melody96/keymaps/zunger/rules.mk)0
-rw-r--r--keyboards/ymdk/melody96/hotswap/matrix_diagram.md23
-rw-r--r--keyboards/ymdk/melody96/hotswap/readme.md19
-rw-r--r--keyboards/ymdk/melody96/hotswap/rules.mk1
-rw-r--r--keyboards/ymdk/melody96/rules.mk13
-rw-r--r--keyboards/ymdk/melody96/soldered/config.h (renamed from keyboards/ymdk/melody96/config.h)0
-rw-r--r--keyboards/ymdk/melody96/soldered/info.json (renamed from keyboards/ymdk/melody96/info.json)0
-rw-r--r--keyboards/ymdk/melody96/soldered/keymaps/crilith/keymap.c (renamed from keyboards/ymdk/melody96/keymaps/crilith/keymap.c)0
-rw-r--r--keyboards/ymdk/melody96/soldered/keymaps/default/keymap.c (renamed from keyboards/ymdk/melody96/keymaps/default/keymap.c)0
-rw-r--r--keyboards/ymdk/melody96/soldered/keymaps/default_96_with60_split_num0/keymap.c (renamed from keyboards/ymdk/melody96/keymaps/default_96_with60_split_num0/keymap.c)0
-rw-r--r--keyboards/ymdk/melody96/soldered/keymaps/dvz/config.h (renamed from keyboards/ymdk/melody96/keymaps/dvz/config.h)0
-rw-r--r--keyboards/ymdk/melody96/soldered/keymaps/dvz/keymap.c (renamed from keyboards/ymdk/melody96/keymaps/dvz/keymap.c)0
-rw-r--r--keyboards/ymdk/melody96/soldered/keymaps/dvz/readme.md (renamed from keyboards/ymdk/melody96/keymaps/dvz/readme.md)0
-rw-r--r--keyboards/ymdk/melody96/soldered/keymaps/dvz/rules.mk (renamed from keyboards/ymdk/melody96/keymaps/dvz/rules.mk)0
-rw-r--r--keyboards/ymdk/melody96/soldered/keymaps/konstantin/config.h (renamed from keyboards/ymdk/melody96/keymaps/konstantin/config.h)0
-rw-r--r--keyboards/ymdk/melody96/soldered/keymaps/konstantin/keymap.c (renamed from keyboards/ymdk/melody96/keymaps/konstantin/keymap.c)0
-rw-r--r--keyboards/ymdk/melody96/soldered/keymaps/konstantin/rules.mk (renamed from keyboards/ymdk/melody96/keymaps/konstantin/rules.mk)0
-rw-r--r--keyboards/ymdk/melody96/soldered/keymaps/via/keymap.c (renamed from keyboards/ymdk/melody96/keymaps/via/keymap.c)0
-rw-r--r--keyboards/ymdk/melody96/soldered/keymaps/via/rules.mk2
-rw-r--r--keyboards/ymdk/melody96/soldered/matrix_diagram.md (renamed from keyboards/ymdk/melody96/matrix_diagram.md)2
-rw-r--r--keyboards/ymdk/melody96/soldered/readme.md (renamed from keyboards/ymdk/melody96/readme.md)4
-rw-r--r--keyboards/ymdk/melody96/soldered/rules.mk (renamed from keyboards/keychron/q1/iso_encoder/rules.mk)10
-rw-r--r--keyboards/ymdk/sp64/rules.mk2
-rw-r--r--keyboards/zoo/wampus/config.h2
-rw-r--r--keyboards/zykrah/fuyu/config.h2
-rw-r--r--keyboards/zykrah/fuyu/info.json3
-rw-r--r--keyboards/zykrah/fuyu/keymaps/via/keymap.c10
-rw-r--r--keyboards/zykrah/slime88/config.h2
-rw-r--r--keyboards/zykrah/slime88/info.json3
-rw-r--r--layouts/community/60_iso/unxmaal/config.h32
-rw-r--r--layouts/default/fullsize_extended_ansi/default_fullsize_extended_ansi/keymap.c32
-rw-r--r--layouts/default/fullsize_extended_ansi/info.json124
-rw-r--r--layouts/default/fullsize_extended_ansi/layout.json6
-rw-r--r--layouts/default/fullsize_extended_ansi/readme.md3
-rw-r--r--layouts/default/fullsize_extended_iso/default_fullsize_extended_iso/keymap.c32
-rw-r--r--layouts/default/fullsize_extended_iso/info.json125
-rw-r--r--layouts/default/fullsize_extended_iso/layout.json6
-rw-r--r--layouts/default/fullsize_extended_iso/readme.md3
-rw-r--r--layouts/default/fullsize_extended_jis/default_fullsize_extended_jis/keymap.c32
-rw-r--r--layouts/default/fullsize_extended_jis/info.json129
-rw-r--r--layouts/default/fullsize_extended_jis/layout.json6
-rw-r--r--layouts/default/fullsize_extended_jis/readme.md3
-rw-r--r--layouts/default/readme.md54
-rwxr-xr-xlib/python/qmk/cli/generate/config_h.py5
-rwxr-xr-xlib/python/qmk/cli/generate/rules_mk.py26
-rw-r--r--lib/python/qmk/info.py11
-rw-r--r--platforms/avr/drivers/ws2812_bitbang.c4
-rw-r--r--platforms/avr/drivers/ws2812_i2c.c4
-rw-r--r--platforms/avr/flash.mk4
-rw-r--r--platforms/avr/platform.mk23
-rw-r--r--platforms/chibios/_pin_defs.h527
-rw-r--r--platforms/chibios/boards/BONSAI_C4/configs/config.h2
-rw-r--r--platforms/chibios/boards/BONSAI_C4/configs/halconf.h2
-rw-r--r--platforms/chibios/boards/GENERIC_PROMICRO_RP2040/configs/mcuconf.h1
-rw-r--r--platforms/chibios/boards/GENERIC_RP_RP2040/configs/mcuconf.h1
-rw-r--r--platforms/chibios/boards/GENERIC_WB32_F3G71XX/board/board.c5
-rw-r--r--platforms/chibios/boards/GENERIC_WB32_FQ95XX/board/board.c5
-rw-r--r--platforms/chibios/boards/QMK_BLOK/configs/mcuconf.h1
-rw-r--r--platforms/chibios/boards/QMK_PM2040/configs/mcuconf.h1
-rw-r--r--platforms/chibios/bootloader.mk1
-rw-r--r--platforms/chibios/chibios_config.h4
-rw-r--r--platforms/chibios/drivers/audio_dac_additive.c28
-rw-r--r--platforms/chibios/drivers/eeprom/eeprom_kinetis_flexram.c8
-rw-r--r--platforms/chibios/drivers/serial.c2
-rw-r--r--platforms/chibios/drivers/spi_master.c72
-rw-r--r--platforms/chibios/drivers/vendor/RP/RP2040/ws2812_vendor.c2
-rw-r--r--platforms/chibios/drivers/wear_leveling/wear_leveling_efl_config.h2
-rw-r--r--platforms/chibios/drivers/wear_leveling/wear_leveling_rp2040_flash.c4
-rw-r--r--platforms/chibios/drivers/wear_leveling/wear_leveling_rp2040_flash_config.h2
-rw-r--r--platforms/chibios/drivers/ws2812_bitbang.c2
-rw-r--r--platforms/chibios/drivers/ws2812_pwm.c2
-rw-r--r--platforms/chibios/drivers/ws2812_spi.c20
-rw-r--r--platforms/chibios/vendors/RP/stage2_bootloaders.c12
-rw-r--r--platforms/test/timer.c41
-rw-r--r--quantum/action.c4
-rw-r--r--quantum/action_tapping.c78
-rw-r--r--quantum/backlight/backlight.c21
-rw-r--r--quantum/color.c2
-rw-r--r--quantum/color.h52
-rw-r--r--quantum/debounce/none.c10
-rw-r--r--quantum/debounce/sym_defer_g.c15
-rw-r--r--quantum/debounce/sym_eager_pr.c4
-rw-r--r--quantum/debounce/tests/asym_eager_defer_pk_tests.cpp29
-rw-r--r--quantum/debounce/tests/debounce_test_common.cpp25
-rw-r--r--quantum/debounce/tests/debounce_test_common.h5
-rw-r--r--quantum/debounce/tests/none_tests.cpp256
-rw-r--r--quantum/debounce/tests/rules.mk5
-rw-r--r--quantum/debounce/tests/sym_defer_g_tests.cpp18
-rw-r--r--quantum/debounce/tests/sym_defer_pk_tests.cpp18
-rw-r--r--quantum/debounce/tests/sym_defer_pr_tests.cpp18
-rw-r--r--quantum/debounce/tests/sym_eager_pk_tests.cpp18
-rw-r--r--quantum/debounce/tests/sym_eager_pr_tests.cpp18
-rw-r--r--quantum/debounce/tests/testlist.mk1
-rw-r--r--quantum/eeconfig.c6
-rw-r--r--quantum/eeconfig.h3
-rw-r--r--quantum/haptic.c12
-rw-r--r--quantum/keyboard.c23
-rw-r--r--quantum/led_matrix/led_matrix.c33
-rw-r--r--quantum/led_matrix/led_matrix.h56
-rw-r--r--quantum/led_matrix/led_matrix_drivers.c223
-rw-r--r--quantum/led_matrix/led_matrix_types.h15
-rw-r--r--quantum/mousekey.c15
-rw-r--r--quantum/painter/lvgl/qp_lvgl.c11
-rw-r--r--quantum/painter/lvgl/qp_lvgl.h4
-rw-r--r--quantum/painter/qp.c121
-rw-r--r--quantum/painter/qp.h35
-rw-r--r--quantum/painter/qp_draw_ellipse.c12
-rw-r--r--quantum/process_keycode/process_auto_shift.c29
-rw-r--r--quantum/process_keycode/process_auto_shift.h1
-rw-r--r--quantum/quantum.c10
-rw-r--r--quantum/quantum.h6
-rw-r--r--quantum/rgb_matrix/animations/flower_blooming_anim.h53
-rw-r--r--quantum/rgb_matrix/animations/rgb_matrix_effects.inc1
-rw-r--r--quantum/rgb_matrix/rgb_matrix.c54
-rw-r--r--quantum/rgb_matrix/rgb_matrix.h75
-rw-r--r--quantum/rgb_matrix/rgb_matrix_drivers.c132
-rw-r--r--quantum/rgb_matrix/rgb_matrix_types.h15
-rw-r--r--quantum/rgblight/rgblight.c137
-rw-r--r--quantum/rgblight/rgblight.h27
-rw-r--r--quantum/util.h4
-rw-r--r--quantum/velocikey.c40
-rw-r--r--quantum/velocikey.h10
-rw-r--r--quantum/via.c10
-rw-r--r--readme.md4
-rw-r--r--tests/auto_shift/auto_shift_repeat/auto_shift_no_auto_repeat/config.h (renamed from keyboards/novelkeys/nk1/config.h)9
-rw-r--r--tests/auto_shift/auto_shift_repeat/auto_shift_no_auto_repeat/test.mk20
-rw-r--r--tests/auto_shift/auto_shift_repeat/auto_shift_no_auto_repeat/test_auto_shift.cpp105
-rw-r--r--tests/auto_shift/auto_shift_repeat/config.h (renamed from keyboards/aozora/config.h)7
-rw-r--r--tests/auto_shift/auto_shift_repeat/test.mk20
-rw-r--r--tests/auto_shift/auto_shift_repeat/test_auto_shift.cpp107
-rw-r--r--tests/auto_shift/config.h2
-rw-r--r--tests/auto_shift/retro_shift/tap_hold_configurations/default_mod_tap/config.h (renamed from keyboards/input_club/infinity60/halconf.h)15
-rw-r--r--tests/auto_shift/retro_shift/tap_hold_configurations/default_mod_tap/no_timeout/config.h21
-rw-r--r--tests/auto_shift/retro_shift/tap_hold_configurations/default_mod_tap/no_timeout/test.mk20
-rw-r--r--tests/auto_shift/retro_shift/tap_hold_configurations/default_mod_tap/no_timeout/test_retro_shift.cpp57
-rw-r--r--tests/auto_shift/retro_shift/tap_hold_configurations/default_mod_tap/test.mk20
-rw-r--r--tests/auto_shift/retro_shift/tap_hold_configurations/default_mod_tap/test_retro_shift.cpp485
-rw-r--r--tests/auto_shift/retro_shift/tap_hold_configurations/hold_on_other_key_press/config.h26
-rw-r--r--tests/auto_shift/retro_shift/tap_hold_configurations/hold_on_other_key_press/test.mk20
-rw-r--r--tests/auto_shift/retro_shift/tap_hold_configurations/hold_on_other_key_press/test_retro_shift.cpp442
-rw-r--r--tests/auto_shift/retro_shift/tap_hold_configurations/permissive_hold/config.h26
-rw-r--r--tests/auto_shift/retro_shift/tap_hold_configurations/permissive_hold/test.mk20
-rw-r--r--tests/auto_shift/retro_shift/tap_hold_configurations/permissive_hold/test_retro_shift.cpp419
-rw-r--r--tests/auto_shift/retro_shift/tap_hold_configurations/permissive_hold_hold_on_other_key_press/config.h27
-rw-r--r--tests/auto_shift/retro_shift/tap_hold_configurations/permissive_hold_hold_on_other_key_press/test.mk20
-rw-r--r--tests/auto_shift/retro_shift/tap_hold_configurations/permissive_hold_hold_on_other_key_press/test_retro_shift.cpp442
-rw-r--r--tests/auto_shift/test.mk2
-rw-r--r--tests/basic/config.h2
-rw-r--r--tests/basic/test.mk2
-rw-r--r--tests/basic/test_one_shot_keys.cpp46
-rw-r--r--tests/caps_word/auto_shift/config.h21
-rw-r--r--tests/caps_word/auto_shift/retro_shift/config.h (renamed from tests/caps_word/caps_word_autoshift/config.h)0
-rw-r--r--tests/caps_word/auto_shift/retro_shift/test.mk (renamed from tests/caps_word/caps_word_autoshift/test.mk)0
-rw-r--r--tests/caps_word/auto_shift/retro_shift/test_caps_word_retroshift.cpp (renamed from tests/caps_word/caps_word_autoshift/test_caps_word_autoshift.cpp)4
-rw-r--r--tests/caps_word/auto_shift/test.mk18
-rw-r--r--tests/caps_word/auto_shift/test_caps_word_autoshift.cpp66
-rw-r--r--tests/caps_word/unicodemap/config.h (renamed from tests/caps_word/caps_word_unicodemap/config.h)0
-rw-r--r--tests/caps_word/unicodemap/test.mk (renamed from tests/caps_word/caps_word_unicodemap/test.mk)0
-rw-r--r--tests/caps_word/unicodemap/test_caps_word_unicodemap.cpp (renamed from tests/caps_word/caps_word_unicodemap/test_caps_word_unicodemap.cpp)0
-rw-r--r--tests/tap_hold_configurations/default_mod_tap/test.mk2
-rw-r--r--tests/tap_hold_configurations/permissive_hold/config.h2
-rw-r--r--tests/test_common/build.mk2
-rw-r--r--tests/test_common/main.cpp2
-rw-r--r--tests/test_common/test_common.h2
-rw-r--r--tmk_core/protocol/arm_atsam/usb/udi_device_epsize.h2
-rw-r--r--tmk_core/protocol/host.h3
-rw-r--r--tmk_core/protocol/report.c8
-rw-r--r--tmk_core/protocol/report.h19
-rw-r--r--tmk_core/protocol/usb_descriptor.c4
-rw-r--r--tmk_core/protocol/usb_descriptor.h2
-rw-r--r--users/brandonschlack/brandonschlack.c8
-rw-r--r--users/curry/rgb_lighting_user.c2
-rw-r--r--users/romus/romus.c20
-rw-r--r--users/tominabox1/dimple_rgb.c10
-rw-r--r--users/xtonhasvim/fancylighting.c4
-rw-r--r--users/xtonhasvim/fancylighting.h2
-rw-r--r--users/zer09/lights.h2
1864 files changed, 24088 insertions, 21588 deletions
diff --git a/Makefile b/Makefile
index 9f2e4636a4..9ef406e420 100644
--- a/Makefile
+++ b/Makefile
@@ -300,17 +300,18 @@ endef
define BUILD_TEST
TEST_PATH := $1
TEST_NAME := $$(notdir $$(TEST_PATH))
+ TEST_FULL_NAME := $$(subst /,_,$$(patsubst $$(ROOT_DIR)tests/%,%,$$(TEST_PATH)))
MAKE_TARGET := $2
COMMAND := $1
MAKE_CMD := $$(MAKE) -r -R -C $(ROOT_DIR) -f $(BUILDDEFS_PATH)/build_test.mk $$(MAKE_TARGET)
- MAKE_VARS := TEST=$$(TEST_NAME) TEST_PATH=$$(TEST_PATH) FULL_TESTS="$$(FULL_TESTS)"
+ MAKE_VARS := TEST=$$(TEST_NAME) TEST_OUTPUT=$$(TEST_FULL_NAME) TEST_PATH=$$(TEST_PATH) FULL_TESTS="$$(FULL_TESTS)"
MAKE_MSG := $$(MSG_MAKE_TEST)
$$(eval $$(call BUILD))
ifneq ($$(MAKE_TARGET),clean)
- TEST_EXECUTABLE := $$(TEST_OUTPUT_DIR)/$$(TEST_NAME).elf
- TESTS += $$(TEST_NAME)
+ TEST_EXECUTABLE := $$(TEST_OUTPUT_DIR)/$$(TEST_FULL_NAME).elf
+ TESTS += $$(TEST_FULL_NAME)
TEST_MSG := $$(MSG_TEST)
- $$(TEST_NAME)_COMMAND := \
+ $$(TEST_FULL_NAME)_COMMAND := \
printf "$$(TEST_MSG)\n"; \
$$(TEST_EXECUTABLE); \
if [ $$$$? -gt 0 ]; \
@@ -322,15 +323,22 @@ endef
define PARSE_TEST
TESTS :=
- TEST_NAME := $$(firstword $$(subst :, ,$$(RULE)))
- TEST_TARGET := $$(subst $$(TEST_NAME),,$$(subst $$(TEST_NAME):,,$$(RULE)))
+ # list of possible targets, colon-delimited, to reassign to MAKE_TARGET and remove
+ TARGETS := :clean:
+ ifneq (,$$(findstring :$$(lastword $$(subst :, ,$$(RULE))):, $$(TARGETS)))
+ MAKE_TARGET := $$(lastword $$(subst :, ,$$(RULE)))
+ TEST_SUBPATH := $$(subst $$(eval) ,/,$$(wordlist 2, $$(words $$(subst :, ,$$(RULE))), _ $$(subst :, ,$$(RULE))))
+ else
+ MAKE_TARGET :=
+ TEST_SUBPATH := $$(subst :,/,$$(RULE))
+ endif
include $(BUILDDEFS_PATH)/testlist.mk
- ifeq ($$(TEST_NAME),all)
+ ifeq ($$(RULE),all)
MATCHED_TESTS := $$(TEST_LIST)
else
- MATCHED_TESTS := $$(foreach TEST, $$(TEST_LIST),$$(if $$(findstring x$$(TEST_NAME)x, x$$(notdir $$(TEST))x), $$(TEST),))
+ MATCHED_TESTS := $$(foreach TEST, $$(TEST_LIST),$$(if $$(findstring /$$(TEST_SUBPATH)/, $$(patsubst %,%/,$$(TEST))), $$(TEST),))
endif
- $$(foreach TEST,$$(MATCHED_TESTS),$$(eval $$(call BUILD_TEST,$$(TEST),$$(TEST_TARGET))))
+ $$(foreach TEST,$$(MATCHED_TESTS),$$(eval $$(call BUILD_TEST,$$(TEST),$$(MAKE_TARGET))))
endef
diff --git a/builddefs/build_full_test.mk b/builddefs/build_full_test.mk
index 85ee0898ec..63f9fea915 100644
--- a/builddefs/build_full_test.mk
+++ b/builddefs/build_full_test.mk
@@ -13,10 +13,10 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-$(TEST)_INC := \
+$(TEST_OUTPUT)_INC := \
tests/test_common/common_config.h
-$(TEST)_SRC := \
+$(TEST_OUTPUT)_SRC := \
$(QUANTUM_SRC) \
$(SRC) \
$(QUANTUM_PATH)/keymap_introspection.c \
@@ -30,8 +30,8 @@ $(TEST)_SRC := \
tests/test_common/test_logger.cpp \
$(patsubst $(ROOTDIR)/%,%,$(wildcard $(TEST_PATH)/*.cpp))
-$(TEST)_DEFS := $(OPT_DEFS) "-DKEYMAP_C=\"keymap.c\""
+$(TEST_OUTPUT)_DEFS := $(OPT_DEFS) "-DKEYMAP_C=\"keymap.c\""
-$(TEST)_CONFIG := $(TEST_PATH)/config.h
+$(TEST_OUTPUT)_CONFIG := $(TEST_PATH)/config.h
VPATH += $(TOP_DIR)/tests/test_common
diff --git a/builddefs/build_json.mk b/builddefs/build_json.mk
index 0c034eb2ae..e29d678e48 100644
--- a/builddefs/build_json.mk
+++ b/builddefs/build_json.mk
@@ -1,17 +1,17 @@
# Look for a json keymap file
ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_5)/keymap.json)","")
KEYMAP_JSON := $(MAIN_KEYMAP_PATH_5)/keymap.json
- KEYMAP_PATH := $(MAIN_KEYMAP_PATH_5)
+ KEYMAP_JSON_PATH := $(MAIN_KEYMAP_PATH_5)
else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_4)/keymap.json)","")
KEYMAP_JSON := $(MAIN_KEYMAP_PATH_4)/keymap.json
- KEYMAP_PATH := $(MAIN_KEYMAP_PATH_4)
+ KEYMAP_JSON_PATH := $(MAIN_KEYMAP_PATH_4)
else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_3)/keymap.json)","")
KEYMAP_JSON := $(MAIN_KEYMAP_PATH_3)/keymap.json
- KEYMAP_PATH := $(MAIN_KEYMAP_PATH_3)
+ KEYMAP_JSON_PATH := $(MAIN_KEYMAP_PATH_3)
else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_2)/keymap.json)","")
KEYMAP_JSON := $(MAIN_KEYMAP_PATH_2)/keymap.json
- KEYMAP_PATH := $(MAIN_KEYMAP_PATH_2)
+ KEYMAP_JSON_PATH := $(MAIN_KEYMAP_PATH_2)
else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_1)/keymap.json)","")
KEYMAP_JSON := $(MAIN_KEYMAP_PATH_1)/keymap.json
- KEYMAP_PATH := $(MAIN_KEYMAP_PATH_1)
+ KEYMAP_JSON_PATH := $(MAIN_KEYMAP_PATH_1)
endif
diff --git a/builddefs/build_keyboard.mk b/builddefs/build_keyboard.mk
index 6ae6bc686b..a1c1d5b976 100644
--- a/builddefs/build_keyboard.mk
+++ b/builddefs/build_keyboard.mk
@@ -127,39 +127,44 @@ include $(INFO_RULES_MK)
include $(BUILDDEFS_PATH)/build_json.mk
# Pull in keymap level rules.mk
-ifeq ("$(wildcard $(KEYMAP_PATH))", "")
- # Look through the possible keymap folders until we find a matching keymap.c
- ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_1)/keymap.c)","")
- -include $(MAIN_KEYMAP_PATH_1)/rules.mk
- KEYMAP_C := $(MAIN_KEYMAP_PATH_1)/keymap.c
- KEYMAP_PATH := $(MAIN_KEYMAP_PATH_1)
- else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_2)/keymap.c)","")
- -include $(MAIN_KEYMAP_PATH_2)/rules.mk
- KEYMAP_C := $(MAIN_KEYMAP_PATH_2)/keymap.c
- KEYMAP_PATH := $(MAIN_KEYMAP_PATH_2)
- else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_3)/keymap.c)","")
- -include $(MAIN_KEYMAP_PATH_3)/rules.mk
- KEYMAP_C := $(MAIN_KEYMAP_PATH_3)/keymap.c
- KEYMAP_PATH := $(MAIN_KEYMAP_PATH_3)
- else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_4)/keymap.c)","")
- -include $(MAIN_KEYMAP_PATH_4)/rules.mk
- KEYMAP_C := $(MAIN_KEYMAP_PATH_4)/keymap.c
- KEYMAP_PATH := $(MAIN_KEYMAP_PATH_4)
- else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_5)/keymap.c)","")
- -include $(MAIN_KEYMAP_PATH_5)/rules.mk
- KEYMAP_C := $(MAIN_KEYMAP_PATH_5)/keymap.c
- KEYMAP_PATH := $(MAIN_KEYMAP_PATH_5)
- else ifneq ($(LAYOUTS),)
- # If we haven't found a keymap yet fall back to community layouts
- include $(BUILDDEFS_PATH)/build_layout.mk
- else
- $(call CATASTROPHIC_ERROR,Invalid keymap,Could not find keymap)
- # this state should never be reached
- endif
+# Look through the possible keymap folders until we find a matching keymap.c
+ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_1)/keymap.c)","")
+ -include $(MAIN_KEYMAP_PATH_1)/rules.mk
+ KEYMAP_C := $(MAIN_KEYMAP_PATH_1)/keymap.c
+ KEYMAP_PATH := $(MAIN_KEYMAP_PATH_1)
+else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_2)/keymap.c)","")
+ -include $(MAIN_KEYMAP_PATH_2)/rules.mk
+ KEYMAP_C := $(MAIN_KEYMAP_PATH_2)/keymap.c
+ KEYMAP_PATH := $(MAIN_KEYMAP_PATH_2)
+else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_3)/keymap.c)","")
+ -include $(MAIN_KEYMAP_PATH_3)/rules.mk
+ KEYMAP_C := $(MAIN_KEYMAP_PATH_3)/keymap.c
+ KEYMAP_PATH := $(MAIN_KEYMAP_PATH_3)
+else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_4)/keymap.c)","")
+ -include $(MAIN_KEYMAP_PATH_4)/rules.mk
+ KEYMAP_C := $(MAIN_KEYMAP_PATH_4)/keymap.c
+ KEYMAP_PATH := $(MAIN_KEYMAP_PATH_4)
+else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_5)/keymap.c)","")
+ -include $(MAIN_KEYMAP_PATH_5)/rules.mk
+ KEYMAP_C := $(MAIN_KEYMAP_PATH_5)/keymap.c
+ KEYMAP_PATH := $(MAIN_KEYMAP_PATH_5)
+else ifneq ($(LAYOUTS),)
+ # If we haven't found a keymap yet fall back to community layouts
+ include $(BUILDDEFS_PATH)/build_layout.mk
+# Not finding keymap.c is fine if we found a keymap.json
+else ifeq ("$(wildcard $(KEYMAP_JSON_PATH))", "")
+ $(call CATASTROPHIC_ERROR,Invalid keymap,Could not find keymap)
+ # this state should never be reached
endif
# Have we found a keymap.json?
ifneq ("$(wildcard $(KEYMAP_JSON))", "")
+ ifneq ("$(wildcard $(KEYMAP_C))", "")
+ $(call WARNING_MESSAGE,Keymap is specified as both keymap.json and keymap.c -- keymap.json file wins.)
+ endif
+
+ KEYMAP_PATH := $(KEYMAP_JSON_PATH)
+
KEYMAP_C := $(INTERMEDIATE_OUTPUT)/src/keymap.c
KEYMAP_H := $(INTERMEDIATE_OUTPUT)/src/config.h
diff --git a/builddefs/build_test.mk b/builddefs/build_test.mk
index 9eead77bea..2cc1134da5 100644
--- a/builddefs/build_test.mk
+++ b/builddefs/build_test.mk
@@ -9,13 +9,13 @@ OPT = g
include paths.mk
include $(BUILDDEFS_PATH)/message.mk
-TARGET=test/$(TEST)
+TARGET=test/$(TEST_OUTPUT)
GTEST_OUTPUT = $(BUILD_DIR)/gtest
TEST_OBJ = $(BUILD_DIR)/test_obj
-OUTPUTS := $(TEST_OBJ)/$(TEST) $(GTEST_OUTPUT)
+OUTPUTS := $(TEST_OBJ)/$(TEST_OUTPUT) $(GTEST_OUTPUT)
GTEST_INC := \
$(LIB_PATH)/googletest/googletest/include \
@@ -71,18 +71,18 @@ ifneq ($(filter $(FULL_TESTS),$(TEST)),)
include $(BUILDDEFS_PATH)/build_full_test.mk
endif
-$(TEST)_SRC += \
+$(TEST_OUTPUT)_SRC += \
tests/test_common/main.cpp \
$(QUANTUM_PATH)/logging/print.c
ifneq ($(strip $(INTROSPECTION_KEYMAP_C)),)
-$(TEST)_DEFS += -DINTROSPECTION_KEYMAP_C=\"$(strip $(INTROSPECTION_KEYMAP_C))\"
+$(TEST_OUTPUT)_DEFS += -DINTROSPECTION_KEYMAP_C=\"$(strip $(INTROSPECTION_KEYMAP_C))\"
endif
-$(TEST_OBJ)/$(TEST)_SRC := $($(TEST)_SRC)
-$(TEST_OBJ)/$(TEST)_INC := $($(TEST)_INC) $(VPATH) $(GTEST_INC)
-$(TEST_OBJ)/$(TEST)_DEFS := $($(TEST)_DEFS)
-$(TEST_OBJ)/$(TEST)_CONFIG := $($(TEST)_CONFIG)
+$(TEST_OBJ)/$(TEST_OUTPUT)_SRC := $($(TEST_OUTPUT)_SRC)
+$(TEST_OBJ)/$(TEST_OUTPUT)_INC := $($(TEST_OUTPUT)_INC) $(VPATH) $(GTEST_INC)
+$(TEST_OBJ)/$(TEST_OUTPUT)_DEFS := $($(TEST_OUTPUT)_DEFS)
+$(TEST_OBJ)/$(TEST_OUTPUT)_CONFIG := $($(TEST_OUTPUT)_CONFIG)
include $(PLATFORM_PATH)/$(PLATFORM_KEY)/platform.mk
include $(BUILDDEFS_PATH)/common_rules.mk
diff --git a/builddefs/common_features.mk b/builddefs/common_features.mk
index 094eda6fef..84a0300579 100644
--- a/builddefs/common_features.mk
+++ b/builddefs/common_features.mk
@@ -151,30 +151,25 @@ ifeq ($(strip $(POINTING_DEVICE_ENABLE)), yes)
endif
OPT_DEFS += -DPOINTING_DEVICE_DRIVER_$(strip $(POINTING_DEVICE_DRIVER))
ifeq ($(strip $(POINTING_DEVICE_DRIVER)), adns9800)
- OPT_DEFS += -DSTM32_SPI -DHAL_USE_SPI=TRUE
- QUANTUM_LIB_SRC += spi_master.c
+ SPI_DRIVER_REQUIRED = yes
else ifeq ($(strip $(POINTING_DEVICE_DRIVER)), analog_joystick)
OPT_DEFS += -DSTM32_ADC -DHAL_USE_ADC=TRUE
LIB_SRC += analog.c
else ifeq ($(strip $(POINTING_DEVICE_DRIVER)), cirque_pinnacle_i2c)
- OPT_DEFS += -DSTM32_I2C -DHAL_USE_I2C=TRUE
+ I2C_DRIVER_REQUIRED = yes
SRC += drivers/sensors/cirque_pinnacle.c
SRC += drivers/sensors/cirque_pinnacle_gestures.c
SRC += $(QUANTUM_DIR)/pointing_device/pointing_device_gestures.c
- QUANTUM_LIB_SRC += i2c_master.c
else ifeq ($(strip $(POINTING_DEVICE_DRIVER)), cirque_pinnacle_spi)
- OPT_DEFS += -DSTM32_SPI -DHAL_USE_SPI=TRUE
+ SPI_DRIVER_REQUIRED = yes
SRC += drivers/sensors/cirque_pinnacle.c
SRC += drivers/sensors/cirque_pinnacle_gestures.c
SRC += $(QUANTUM_DIR)/pointing_device/pointing_device_gestures.c
- QUANTUM_LIB_SRC += spi_master.c
else ifeq ($(strip $(POINTING_DEVICE_DRIVER)), pimoroni_trackball)
- OPT_DEFS += -DSTM32_SPI -DHAL_USE_I2C=TRUE
- QUANTUM_LIB_SRC += i2c_master.c
+ I2C_DRIVER_REQUIRED = yes
else ifneq ($(filter $(strip $(POINTING_DEVICE_DRIVER)),pmw3360 pmw3389),)
- OPT_DEFS += -DSTM32_SPI -DHAL_USE_SPI=TRUE
+ SPI_DRIVER_REQUIRED = yes
SRC += drivers/sensors/pmw33xx_common.c
- QUANTUM_LIB_SRC += spi_master.c
endif
endif
endif
@@ -204,12 +199,12 @@ else
else ifeq ($(strip $(EEPROM_DRIVER)), i2c)
# External I2C EEPROM implementation
OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_I2C
- QUANTUM_LIB_SRC += i2c_master.c
+ I2C_DRIVER_REQUIRED = yes
SRC += eeprom_driver.c eeprom_i2c.c
else ifeq ($(strip $(EEPROM_DRIVER)), spi)
# External SPI EEPROM implementation
OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_SPI
- QUANTUM_LIB_SRC += spi_master.c
+ SPI_DRIVER_REQUIRED = yes
SRC += eeprom_driver.c eeprom_spi.c
else ifeq ($(strip $(EEPROM_DRIVER)), legacy_stm32_flash)
# STM32 Emulated EEPROM, backed by MCU flash (soon to be deprecated)
@@ -308,10 +303,10 @@ ifneq ($(strip $(FLASH_DRIVER)), none)
else
OPT_DEFS += -DFLASH_ENABLE
ifeq ($(strip $(FLASH_DRIVER)),spi)
+ SPI_DRIVER_REQUIRED = yes
OPT_DEFS += -DFLASH_DRIVER -DFLASH_SPI
COMMON_VPATH += $(DRIVER_PATH)/flash
SRC += flash_spi.c
- QUANTUM_LIB_SRC += spi_master.c
endif
endif
endif
@@ -328,6 +323,7 @@ ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
COMMON_VPATH += $(QUANTUM_DIR)/rgblight
POST_CONFIG_H += $(QUANTUM_DIR)/rgblight/rgblight_post_config.h
OPT_DEFS += -DRGBLIGHT_ENABLE
+ OPT_DEFS += -DRGBLIGHT_$(strip $(shell echo $(RGBLIGHT_DRIVER) | tr '[:lower:]' '[:upper:]'))
SRC += $(QUANTUM_DIR)/color.c
SRC += $(QUANTUM_DIR)/rgblight/rgblight.c
CIE1931_CURVE := yes
@@ -342,20 +338,28 @@ ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
APA102_DRIVER_REQUIRED := yes
endif
- ifeq ($(strip $(RGBLIGHT_DRIVER)), custom)
- OPT_DEFS += -DRGBLIGHT_CUSTOM_DRIVER
+ ifeq ($(strip $(VELOCIKEY_ENABLE)), yes)
+ OPT_DEFS += -DVELOCIKEY_ENABLE
endif
endif
+# Deprecated driver names - do not use
+ifeq ($(strip $(LED_MATRIX_DRIVER)), aw20216)
+LED_MATRIX_DRIVER := aw20216s
+endif
+ifeq ($(strip $(LED_MATRIX_DRIVER)), ckled2001)
+LED_MATRIX_DRIVER := snled27351
+endif
+
LED_MATRIX_ENABLE ?= no
-VALID_LED_MATRIX_TYPES := is31fl3731 is31fl3742a is31fl3743a is31fl3745 is31fl3746a ckled2001 custom
-# TODO: is31fl3733 is31fl3737 is31fl3741
+VALID_LED_MATRIX_TYPES := is31fl3218 is31fl3731 is31fl3733 is31fl3736 is31fl3737 is31fl3741 is31fl3742a is31fl3743a is31fl3745 is31fl3746a snled27351 custom
ifeq ($(strip $(LED_MATRIX_ENABLE)), yes)
ifeq ($(filter $(LED_MATRIX_DRIVER),$(VALID_LED_MATRIX_TYPES)),)
$(call CATASTROPHIC_ERROR,Invalid LED_MATRIX_DRIVER,LED_MATRIX_DRIVER="$(LED_MATRIX_DRIVER)" is not a valid matrix type)
endif
OPT_DEFS += -DLED_MATRIX_ENABLE
+ OPT_DEFS += -DLED_MATRIX_$(strip $(shell echo $(LED_MATRIX_DRIVER) | tr '[:lower:]' '[:upper:]'))
ifneq (,$(filter $(MCU), atmega16u2 atmega32u2 at90usb162))
# ATmegaxxU2 does not have hardware MUL instruction - lib8tion must be told to use software multiplication routines
OPT_DEFS += -DLIB8_ATTINY
@@ -370,58 +374,95 @@ endif
SRC += $(LIB_PATH)/lib8tion/lib8tion.c
CIE1931_CURVE := yes
+ ifeq ($(strip $(LED_MATRIX_DRIVER)), is31fl3218)
+ I2C_DRIVER_REQUIRED = yes
+ COMMON_VPATH += $(DRIVER_PATH)/led/issi
+ SRC += is31fl3218-simple.c
+ endif
+
ifeq ($(strip $(LED_MATRIX_DRIVER)), is31fl3731)
- OPT_DEFS += -DIS31FL3731 -DSTM32_I2C -DHAL_USE_I2C=TRUE
+ I2C_DRIVER_REQUIRED = yes
COMMON_VPATH += $(DRIVER_PATH)/led/issi
SRC += is31fl3731-simple.c
- QUANTUM_LIB_SRC += i2c_master.c
endif
- ifeq ($(strip $(LED_MATRIX_DRIVER)), is31fl3742a)
- OPT_DEFS += -DIS31FLCOMMON -DIS31FL3742A -DSTM32_I2C -DHAL_USE_I2C=TRUE
+ ifeq ($(strip $(LED_MATRIX_DRIVER)), is31fl3733)
+ I2C_DRIVER_REQUIRED = yes
+ COMMON_VPATH += $(DRIVER_PATH)/led/issi
+ SRC += is31fl3733-simple.c
+ endif
+
+ ifeq ($(strip $(LED_MATRIX_DRIVER)), is31fl3736)
+ I2C_DRIVER_REQUIRED = yes
+ COMMON_VPATH += $(DRIVER_PATH)/led/issi
+ SRC += is31fl3736-simple.c
+ endif
+
+ ifeq ($(strip $(LED_MATRIX_DRIVER)), is31fl3737)
+ I2C_DRIVER_REQUIRED = yes
+ COMMON_VPATH += $(DRIVER_PATH)/led/issi
+ SRC += is31fl3737-simple.c
+ endif
+
+ ifeq ($(strip $(LED_MATRIX_DRIVER)), is31fl3741)
+ I2C_DRIVER_REQUIRED = yes
+ COMMON_VPATH += $(DRIVER_PATH)/led/issi
+ SRC += is31fl3741-simple.c
+ endif
+
+ ifeq ($(strip $(LED_MATRIX_DRIVER)), is31fl3742a)
+ OPT_DEFS += -DIS31FLCOMMON
+ I2C_DRIVER_REQUIRED = yes
COMMON_VPATH += $(DRIVER_PATH)/led/issi
SRC += is31flcommon.c
- QUANTUM_LIB_SRC += i2c_master.c
endif
- ifeq ($(strip $(LED_MATRIX_DRIVER)), is31fl3743a)
- OPT_DEFS += -DIS31FLCOMMON -DIS31FL3743A -DSTM32_I2C -DHAL_USE_I2C=TRUE
+ ifeq ($(strip $(LED_MATRIX_DRIVER)), is31fl3743a)
+ OPT_DEFS += -DIS31FLCOMMON
+ I2C_DRIVER_REQUIRED = yes
COMMON_VPATH += $(DRIVER_PATH)/led/issi
SRC += is31flcommon.c
- QUANTUM_LIB_SRC += i2c_master.c
endif
- ifeq ($(strip $(LED_MATRIX_DRIVER)), is31fl3745)
- OPT_DEFS += -DIS31FLCOMMON -DIS31FL3745 -DSTM32_I2C -DHAL_USE_I2C=TRUE
+ ifeq ($(strip $(LED_MATRIX_DRIVER)), is31fl3745)
+ OPT_DEFS += -DIS31FLCOMMON
+ I2C_DRIVER_REQUIRED = yes
COMMON_VPATH += $(DRIVER_PATH)/led/issi
SRC += is31flcommon.c
- QUANTUM_LIB_SRC += i2c_master.c
endif
- ifeq ($(strip $(LED_MATRIX_DRIVER)), is31fl3746a)
- OPT_DEFS += -DIS31FLCOMMON -DIS31FL3746A -DSTM32_I2C -DHAL_USE_I2C=TRUE
+ ifeq ($(strip $(LED_MATRIX_DRIVER)), is31fl3746a)
+ OPT_DEFS += -DIS31FLCOMMON
+ I2C_DRIVER_REQUIRED = yes
COMMON_VPATH += $(DRIVER_PATH)/led/issi
SRC += is31flcommon.c
- QUANTUM_LIB_SRC += i2c_master.c
endif
- ifeq ($(strip $(LED_MATRIX_DRIVER)), ckled2001)
- OPT_DEFS += -DCKLED2001 -DSTM32_I2C -DHAL_USE_I2C=TRUE
+ ifeq ($(strip $(LED_MATRIX_DRIVER)), snled27351)
+ I2C_DRIVER_REQUIRED = yes
COMMON_VPATH += $(DRIVER_PATH)/led
- SRC += ckled2001-simple.c
- QUANTUM_LIB_SRC += i2c_master.c
+ SRC += snled27351-simple.c
endif
endif
+# Deprecated driver names - do not use
+ifeq ($(strip $(RGB_MATRIX_DRIVER)), aw20216)
+RGB_MATRIX_DRIVER := aw20216s
+endif
+ifeq ($(strip $(RGB_MATRIX_DRIVER)), ckled2001)
+RGB_MATRIX_DRIVER := snled27351
+endif
+
RGB_MATRIX_ENABLE ?= no
-VALID_RGB_MATRIX_TYPES := aw20216 is31fl3731 is31fl3733 is31fl3736 is31fl3737 is31fl3741 is31fl3742a is31fl3743a is31fl3745 is31fl3746a ckled2001 ws2812 custom
+VALID_RGB_MATRIX_TYPES := aw20216s is31fl3218 is31fl3731 is31fl3733 is31fl3736 is31fl3737 is31fl3741 is31fl3742a is31fl3743a is31fl3745 is31fl3746a snled27351 ws2812 custom
ifeq ($(strip $(RGB_MATRIX_ENABLE)), yes)
ifeq ($(filter $(RGB_MATRIX_DRIVER),$(VALID_RGB_MATRIX_TYPES)),)
$(call CATASTROPHIC_ERROR,Invalid RGB_MATRIX_DRIVER,RGB_MATRIX_DRIVER="$(RGB_MATRIX_DRIVER)" is not a valid matrix type)
endif
OPT_DEFS += -DRGB_MATRIX_ENABLE
+ OPT_DEFS += -DRGB_MATRIX_$(strip $(shell echo $(RGB_MATRIX_DRIVER) | tr '[:lower:]' '[:upper:]'))
ifneq (,$(filter $(MCU), atmega16u2 atmega32u2 at90usb162))
# ATmegaxxU2 does not have hardware MUL instruction - lib8tion must be told to use software multiplication routines
OPT_DEFS += -DLIB8_ATTINY
@@ -437,90 +478,87 @@ endif
CIE1931_CURVE := yes
RGB_KEYCODES_ENABLE := yes
- ifeq ($(strip $(RGB_MATRIX_DRIVER)), aw20216)
- OPT_DEFS += -DAW20216 -DSTM32_SPI -DHAL_USE_SPI=TRUE
+ ifeq ($(strip $(RGB_MATRIX_DRIVER)), aw20216s)
+ SPI_DRIVER_REQUIRED = yes
COMMON_VPATH += $(DRIVER_PATH)/led
- SRC += aw20216.c
- QUANTUM_LIB_SRC += spi_master.c
+ SRC += aw20216s.c
+ endif
+
+ ifeq ($(strip $(RGB_MATRIX_DRIVER)), is31fl3218)
+ I2C_DRIVER_REQUIRED = yes
+ COMMON_VPATH += $(DRIVER_PATH)/led/issi
+ SRC += is31fl3218.c
endif
ifeq ($(strip $(RGB_MATRIX_DRIVER)), is31fl3731)
- OPT_DEFS += -DIS31FL3731 -DSTM32_I2C -DHAL_USE_I2C=TRUE
+ I2C_DRIVER_REQUIRED = yes
COMMON_VPATH += $(DRIVER_PATH)/led/issi
SRC += is31fl3731.c
- QUANTUM_LIB_SRC += i2c_master.c
endif
ifeq ($(strip $(RGB_MATRIX_DRIVER)), is31fl3733)
- OPT_DEFS += -DIS31FL3733 -DSTM32_I2C -DHAL_USE_I2C=TRUE
+ I2C_DRIVER_REQUIRED = yes
COMMON_VPATH += $(DRIVER_PATH)/led/issi
SRC += is31fl3733.c
- QUANTUM_LIB_SRC += i2c_master.c
endif
ifeq ($(strip $(RGB_MATRIX_DRIVER)), is31fl3736)
- OPT_DEFS += -DIS31FL3736 -DSTM32_I2C -DHAL_USE_I2C=TRUE
+ I2C_DRIVER_REQUIRED = yes
COMMON_VPATH += $(DRIVER_PATH)/led/issi
SRC += is31fl3736.c
- QUANTUM_LIB_SRC += i2c_master.c
endif
ifeq ($(strip $(RGB_MATRIX_DRIVER)), is31fl3737)
- OPT_DEFS += -DIS31FL3737 -DSTM32_I2C -DHAL_USE_I2C=TRUE
+ I2C_DRIVER_REQUIRED = yes
COMMON_VPATH += $(DRIVER_PATH)/led/issi
SRC += is31fl3737.c
- QUANTUM_LIB_SRC += i2c_master.c
endif
ifeq ($(strip $(RGB_MATRIX_DRIVER)), is31fl3741)
- OPT_DEFS += -DIS31FL3741 -DSTM32_I2C -DHAL_USE_I2C=TRUE
+ I2C_DRIVER_REQUIRED = yes
COMMON_VPATH += $(DRIVER_PATH)/led/issi
SRC += is31fl3741.c
- QUANTUM_LIB_SRC += i2c_master.c
endif
- ifeq ($(strip $(RGB_MATRIX_DRIVER)), is31fl3742a)
- OPT_DEFS += -DIS31FLCOMMON -DIS31FL3742A -DSTM32_I2C -DHAL_USE_I2C=TRUE
+ ifeq ($(strip $(RGB_MATRIX_DRIVER)), is31fl3742a)
+ OPT_DEFS += -DIS31FLCOMMON
+ I2C_DRIVER_REQUIRED = yes
COMMON_VPATH += $(DRIVER_PATH)/led/issi
SRC += is31flcommon.c
- QUANTUM_LIB_SRC += i2c_master.c
endif
- ifeq ($(strip $(RGB_MATRIX_DRIVER)), is31fl3743a)
- OPT_DEFS += -DIS31FLCOMMON -DIS31FL3743A -DSTM32_I2C -DHAL_USE_I2C=TRUE
+ ifeq ($(strip $(RGB_MATRIX_DRIVER)), is31fl3743a)
+ OPT_DEFS += -DIS31FLCOMMON
+ I2C_DRIVER_REQUIRED = yes
COMMON_VPATH += $(DRIVER_PATH)/led/issi
SRC += is31flcommon.c
- QUANTUM_LIB_SRC += i2c_master.c
endif
- ifeq ($(strip $(RGB_MATRIX_DRIVER)), is31fl3745)
- OPT_DEFS += -DIS31FLCOMMON -DIS31FL3745 -DSTM32_I2C -DHAL_USE_I2C=TRUE
+ ifeq ($(strip $(RGB_MATRIX_DRIVER)), is31fl3745)
+ OPT_DEFS += -DIS31FLCOMMON
+ I2C_DRIVER_REQUIRED = yes
COMMON_VPATH += $(DRIVER_PATH)/led/issi
SRC += is31flcommon.c
- QUANTUM_LIB_SRC += i2c_master.c
endif
- ifeq ($(strip $(RGB_MATRIX_DRIVER)), is31fl3746a)
- OPT_DEFS += -DIS31FLCOMMON -DIS31FL3746A -DSTM32_I2C -DHAL_USE_I2C=TRUE
+ ifeq ($(strip $(RGB_MATRIX_DRIVER)), is31fl3746a)
+ OPT_DEFS += -DIS31FLCOMMON
+ I2C_DRIVER_REQUIRED = yes
COMMON_VPATH += $(DRIVER_PATH)/led/issi
SRC += is31flcommon.c
- QUANTUM_LIB_SRC += i2c_master.c
endif
- ifeq ($(strip $(RGB_MATRIX_DRIVER)), ckled2001)
- OPT_DEFS += -DCKLED2001 -DSTM32_I2C -DHAL_USE_I2C=TRUE
+ ifeq ($(strip $(RGB_MATRIX_DRIVER)), snled27351)
+ I2C_DRIVER_REQUIRED = yes
COMMON_VPATH += $(DRIVER_PATH)/led
- SRC += ckled2001.c
- QUANTUM_LIB_SRC += i2c_master.c
+ SRC += snled27351.c
endif
ifeq ($(strip $(RGB_MATRIX_DRIVER)), ws2812)
- OPT_DEFS += -DWS2812
WS2812_DRIVER_REQUIRED := yes
endif
ifeq ($(strip $(RGB_MATRIX_DRIVER)), apa102)
- OPT_DEFS += -DAPA102
APA102_DRIVER_REQUIRED := yes
endif
@@ -567,6 +605,7 @@ ifeq ($(strip $(BACKLIGHT_ENABLE)), yes)
SRC += $(QUANTUM_DIR)/backlight/backlight.c
SRC += $(QUANTUM_DIR)/process_keycode/process_backlight.c
OPT_DEFS += -DBACKLIGHT_ENABLE
+ OPT_DEFS += -DBACKLIGHT_$(strip $(shell echo $(BACKLIGHT_DRIVER) | tr '[:lower:]' '[:upper:]'))
ifneq ($(strip $(BACKLIGHT_DRIVER)), custom)
SRC += $(QUANTUM_DIR)/backlight/backlight_driver_common.c
@@ -579,35 +618,6 @@ ifeq ($(strip $(BACKLIGHT_ENABLE)), yes)
endif
endif
-VALID_WS2812_DRIVER_TYPES := bitbang custom i2c pwm spi vendor
-
-WS2812_DRIVER ?= bitbang
-ifeq ($(strip $(WS2812_DRIVER_REQUIRED)), yes)
- ifeq ($(filter $(WS2812_DRIVER),$(VALID_WS2812_DRIVER_TYPES)),)
- $(call CATASTROPHIC_ERROR,Invalid WS2812_DRIVER,WS2812_DRIVER="$(WS2812_DRIVER)" is not a valid WS2812 driver)
- endif
-
- OPT_DEFS += -DWS2812_DRIVER_$(strip $(shell echo $(WS2812_DRIVER) | tr '[:lower:]' '[:upper:]'))
-
- SRC += ws2812_$(strip $(WS2812_DRIVER)).c
-
- ifeq ($(strip $(PLATFORM)), CHIBIOS)
- ifeq ($(strip $(WS2812_DRIVER)), pwm)
- OPT_DEFS += -DSTM32_DMA_REQUIRED=TRUE
- endif
- endif
-
- # add extra deps
- ifeq ($(strip $(WS2812_DRIVER)), i2c)
- QUANTUM_LIB_SRC += i2c_master.c
- endif
-endif
-
-ifeq ($(strip $(APA102_DRIVER_REQUIRED)), yes)
- COMMON_VPATH += $(DRIVER_PATH)/led
- SRC += apa102.c
-endif
-
ifeq ($(strip $(CIE1931_CURVE)), yes)
OPT_DEFS += -DUSE_CIE1931_CURVE
LED_TABLES := yes
@@ -724,17 +734,16 @@ ifeq ($(strip $(HAPTIC_ENABLE)),yes)
ifeq ($(filter $(HAPTIC_DRIVER),$(VALID_HAPTIC_DRIVER_TYPES)),)
$(call CATASTROPHIC_ERROR,Invalid HAPTIC_DRIVER,HAPTIC_DRIVER="$(HAPTIC_DRIVER)" is not a valid Haptic driver)
else
+ OPT_DEFS += -DHAPTIC_$(strip $(shell echo $(HAPTIC_DRIVER) | tr '[:lower:]' '[:upper:]'))
COMMON_VPATH += $(DRIVER_PATH)/haptic
ifeq ($(strip $(HAPTIC_DRIVER)), drv2605l)
+ I2C_DRIVER_REQUIRED = yes
SRC += drv2605l.c
- QUANTUM_LIB_SRC += i2c_master.c
- OPT_DEFS += -DHAPTIC_DRV2605L
endif
ifeq ($(strip $(HAPTIC_DRIVER)), solenoid)
SRC += solenoid.c
- OPT_DEFS += -DHAPTIC_SOLENOID
endif
endif
endif
@@ -757,6 +766,7 @@ ifeq ($(strip $(OLED_ENABLE)), yes)
$(call CATASTROPHIC_ERROR,Invalid OLED_TRANSPORT,OLED_TRANSPORT="$(OLED_TRANSPORT)" is not a valid OLED transport)
else
OPT_DEFS += -DOLED_ENABLE
+ OPT_DEFS += -DOLED_$(strip $(shell echo $(OLED_DRIVER) | tr '[:lower:]' '[:upper:]'))
COMMON_VPATH += $(DRIVER_PATH)/oled
ifneq ($(strip $(OLED_DRIVER)), custom)
SRC += oled_driver.c
@@ -764,10 +774,10 @@ ifeq ($(strip $(OLED_ENABLE)), yes)
OPT_DEFS += -DOLED_TRANSPORT_$(strip $(shell echo $(OLED_TRANSPORT) | tr '[:lower:]' '[:upper:]'))
ifeq ($(strip $(OLED_TRANSPORT)), i2c)
- QUANTUM_LIB_SRC += i2c_master.c
+ I2C_DRIVER_REQUIRED = yes
endif
ifeq ($(strip $(OLED_TRANSPORT)), spi)
- QUANTUM_LIB_SRC += spi_master.c
+ SPI_DRIVER_REQUIRED = yes
endif
endif
endif
@@ -775,9 +785,9 @@ endif
ifeq ($(strip $(ST7565_ENABLE)), yes)
OPT_DEFS += -DST7565_ENABLE
+ SPI_DRIVER_REQUIRED = yes
COMMON_VPATH += $(DRIVER_PATH)/oled # For glcdfont.h
COMMON_VPATH += $(DRIVER_PATH)/lcd
- QUANTUM_LIB_SRC += spi_master.c
SRC += st7565.c
endif
@@ -909,23 +919,22 @@ ifeq ($(strip $(BLUETOOTH_ENABLE)), yes)
$(call CATASTROPHIC_ERROR,Invalid BLUETOOTH_DRIVER,BLUETOOTH_DRIVER="$(BLUETOOTH_DRIVER)" is not a valid Bluetooth driver type)
endif
OPT_DEFS += -DBLUETOOTH_ENABLE
+ OPT_DEFS += -DBLUETOOTH_$(strip $(shell echo $(BLUETOOTH_DRIVER) | tr '[:lower:]' '[:upper:]'))
NO_USB_STARTUP_CHECK := yes
COMMON_VPATH += $(DRIVER_PATH)/bluetooth
SRC += outputselect.c
ifeq ($(strip $(BLUETOOTH_DRIVER)), bluefruit_le)
- OPT_DEFS += -DBLUETOOTH_BLUEFRUIT_LE -DHAL_USE_SPI=TRUE
+ SPI_DRIVER_REQUIRED = yes
SRC += $(DRIVER_PATH)/bluetooth/bluetooth.c
SRC += $(DRIVER_PATH)/bluetooth/bluefruit_le.cpp
QUANTUM_LIB_SRC += analog.c
- QUANTUM_LIB_SRC += spi_master.c
endif
ifeq ($(strip $(BLUETOOTH_DRIVER)), rn42)
- OPT_DEFS += -DBLUETOOTH_RN42 -DHAL_USE_SERIAL=TRUE
+ UART_DRIVER_REQUIRED = yes
SRC += $(DRIVER_PATH)/bluetooth/bluetooth.c
SRC += $(DRIVER_PATH)/bluetooth/rn42.c
- QUANTUM_LIB_SRC += uart.c
endif
endif
@@ -944,3 +953,47 @@ ifeq ($(strip $(OS_DETECTION_ENABLE)), yes)
OPT_DEFS += -DOS_DETECTION_DEBUG_ENABLE
endif
endif
+
+VALID_WS2812_DRIVER_TYPES := bitbang custom i2c pwm spi vendor
+
+WS2812_DRIVER ?= bitbang
+ifeq ($(strip $(WS2812_DRIVER_REQUIRED)), yes)
+ ifeq ($(filter $(WS2812_DRIVER),$(VALID_WS2812_DRIVER_TYPES)),)
+ $(call CATASTROPHIC_ERROR,Invalid WS2812_DRIVER,WS2812_DRIVER="$(WS2812_DRIVER)" is not a valid WS2812 driver)
+ endif
+
+ OPT_DEFS += -DWS2812_$(strip $(shell echo $(WS2812_DRIVER) | tr '[:lower:]' '[:upper:]'))
+
+ SRC += ws2812_$(strip $(WS2812_DRIVER)).c
+
+ ifeq ($(strip $(PLATFORM)), CHIBIOS)
+ ifeq ($(strip $(WS2812_DRIVER)), pwm)
+ OPT_DEFS += -DSTM32_DMA_REQUIRED=TRUE
+ endif
+ endif
+
+ # add extra deps
+ ifeq ($(strip $(WS2812_DRIVER)), i2c)
+ I2C_DRIVER_REQUIRED = yes
+ endif
+endif
+
+ifeq ($(strip $(APA102_DRIVER_REQUIRED)), yes)
+ COMMON_VPATH += $(DRIVER_PATH)/led
+ SRC += apa102.c
+endif
+
+ifeq ($(strip $(I2C_DRIVER_REQUIRED)), yes)
+ OPT_DEFS += -DHAL_USE_I2C=TRUE
+ QUANTUM_LIB_SRC += i2c_master.c
+endif
+
+ifeq ($(strip $(SPI_DRIVER_REQUIRED)), yes)
+ OPT_DEFS += -DHAL_USE_SPI=TRUE
+ QUANTUM_LIB_SRC += spi_master.c
+endif
+
+ifeq ($(strip $(UART_DRIVER_REQUIRED)), yes)
+ OPT_DEFS += -DHAL_USE_SERIAL=TRUE
+ QUANTUM_LIB_SRC += uart.c
+endif
diff --git a/builddefs/common_rules.mk b/builddefs/common_rules.mk
index d20e9ad74d..52dccbe475 100644
--- a/builddefs/common_rules.mk
+++ b/builddefs/common_rules.mk
@@ -12,6 +12,9 @@ vpath %.hpp $(VPATH_SRC)
vpath %.S $(VPATH_SRC)
VPATH :=
+# Helper to return the distinct elements of a list
+uniq = $(if $1,$(firstword $1) $(call uniq,$(filter-out $(firstword $1),$1)))
+
# Convert all SRC to OBJ
define OBJ_FROM_SRC
$(patsubst %.c,$1/%.o,$(patsubst %.cpp,$1/%.o,$(patsubst %.cc,$1/%.o,$(patsubst %.S,$1/%.o,$(patsubst %.clib,$1/%.a,$($1_SRC))))))
@@ -264,7 +267,7 @@ BEGIN = gccversion sizebefore
# Note the obj.txt depeendency is there to force linking if a source file is deleted
%.elf: $(OBJ) $(MASTER_OUTPUT)/cflags.txt $(MASTER_OUTPUT)/ldflags.txt $(MASTER_OUTPUT)/obj.txt | $(BEGIN)
@$(SILENT) || printf "$(MSG_LINKING) $@" | $(AWK_CMD)
- $(eval CMD=MAKE=$(MAKE) $(CC) $(ALL_CFLAGS) $(filter-out %.txt,$^) --output $@ $(LDFLAGS))
+ $(eval CMD=MAKE=$(MAKE) $(CC) $(ALL_CFLAGS) $(call uniq,$(OBJ)) --output $@ $(LDFLAGS))
@$(BUILD_CMD)
@@ -380,33 +383,9 @@ dump_vars:
objs-size:
for i in $(OBJ); do echo $$i; done | sort | xargs $(SIZE)
-ifeq ($(findstring avr-gcc,$(CC)),avr-gcc)
-SIZE_MARGIN = 1024
+# size check optionally implemented in its platform.mk
check-size:
- $(eval MAX_SIZE=$(shell n=`$(CC) -E -mmcu=$(MCU) -D__ASSEMBLER__ $(CFLAGS) $(OPT_DEFS) platforms/avr/bootloader_size.c 2> /dev/null | $(SED) -ne 's/\r//;/^#/n;/^AVR_SIZE:/,$${s/^AVR_SIZE: //;p;}'` && echo $$(($$n)) || echo 0))
- $(eval CURRENT_SIZE=$(shell if [ -f $(BUILD_DIR)/$(TARGET).hex ]; then $(SIZE) --target=$(FORMAT) $(BUILD_DIR)/$(TARGET).hex | $(AWK) 'NR==2 {print $$4}'; else printf 0; fi))
- $(eval FREE_SIZE=$(shell expr $(MAX_SIZE) - $(CURRENT_SIZE)))
- $(eval OVER_SIZE=$(shell expr $(CURRENT_SIZE) - $(MAX_SIZE)))
- $(eval PERCENT_SIZE=$(shell expr $(CURRENT_SIZE) \* 100 / $(MAX_SIZE)))
- if [ $(MAX_SIZE) -gt 0 ] && [ $(CURRENT_SIZE) -gt 0 ]; then \
- $(SILENT) || printf "$(MSG_CHECK_FILESIZE)" | $(AWK_CMD); \
- if [ $(CURRENT_SIZE) -gt $(MAX_SIZE) ]; then \
- $(REMOVE) $(TARGET).$(FIRMWARE_FORMAT); \
- $(REMOVE) $(BUILD_DIR)/$(TARGET).{hex,bin,uf2}; \
- printf "\n * $(MSG_FILE_TOO_BIG)"; $(PRINT_ERROR_PLAIN); \
- else \
- if [ $(FREE_SIZE) -lt $(SIZE_MARGIN) ]; then \
- $(PRINT_WARNING_PLAIN); printf " * $(MSG_FILE_NEAR_LIMIT)"; \
- else \
- $(PRINT_OK); $(SILENT) || printf " * $(MSG_FILE_JUST_RIGHT)"; \
- fi ; \
- fi ; \
- fi
-else
-check-size:
- $(SILENT) || echo "$(MSG_CHECK_FILESIZE_SKIPPED)"
-endif
check-md5:
$(MD5SUM) $(BUILD_DIR)/$(TARGET).$(FIRMWARE_FORMAT)
diff --git a/builddefs/generic_features.mk b/builddefs/generic_features.mk
index 4e058dcd26..afd8bbd276 100644
--- a/builddefs/generic_features.mk
+++ b/builddefs/generic_features.mk
@@ -37,7 +37,6 @@ GENERIC_FEATURES = \
SPACE_CADET \
SWAP_HANDS \
TAP_DANCE \
- VELOCIKEY \
WPM \
DYNAMIC_TAPPING_TERM \
TRI_LAYER
diff --git a/builddefs/message.mk b/builddefs/message.mk
index bf39554dab..7c8f87f990 100644
--- a/builddefs/message.mk
+++ b/builddefs/message.mk
@@ -91,7 +91,6 @@ MSG_AVAILABLE_KEYMAPS = $(eval $(call GENERATE_MSG_AVAILABLE_KEYMAPS))$(MSG_AVAI
MSG_BOOTLOADER_NOT_FOUND_BASE = Bootloader not found. Make sure the board is in bootloader mode. See https://docs.qmk.fm/\#/newbs_flashing\n
MSG_CHECK_FILESIZE = Checking file size of $(TARGET).$(FIRMWARE_FORMAT)
-MSG_CHECK_FILESIZE_SKIPPED = (Firmware size check does not yet support $(MCU_ORIG); skipping)
MSG_FILE_TOO_BIG = $(ERROR_COLOR)The firmware is too large!$(NO_COLOR) $(CURRENT_SIZE)/$(MAX_SIZE) ($(OVER_SIZE) bytes over)\n
MSG_FILE_TOO_SMALL = The firmware is too small! $(CURRENT_SIZE)/$(MAX_SIZE)\n
MSG_FILE_JUST_RIGHT = The firmware size is fine - $(CURRENT_SIZE)/$(MAX_SIZE) ($(PERCENT_SIZE)%%, $(FREE_SIZE) bytes free)\n
@@ -104,6 +103,10 @@ MSG_BOOTLOADER_NOT_FOUND = $(ERROR_COLOR)ERROR:$(NO_COLOR) $(MSG_BOOTLOADER_NOT_
BOOTLOADER_RETRY_TIME ?= 0.5
MSG_BOOTLOADER_NOT_FOUND_QUICK_RETRY = $(MSG_BOOTLOADER_NOT_FOUND_BASE) Trying again every $(BOOTLOADER_RETRY_TIME)s (Ctrl+C to cancel)
+define WARNING_MESSAGE
+ $(shell printf "\n %-99s $(WARN_STRING)\n" "$1" >&2)
+endef
+
define CATASTROPHIC_ERROR
$(shell printf "\n * %-99s $(ERROR_STRING)\n" "$2" >&2)
$(error $1)
diff --git a/data/mappings/info_config.hjson b/data/mappings/info_config.hjson
index ab9a4a0e45..4cebe906b4 100644
--- a/data/mappings/info_config.hjson
+++ b/data/mappings/info_config.hjson
@@ -49,6 +49,10 @@
"DYNAMIC_KEYMAP_EEPROM_MAX_ADDR": {"info_key": "dynamic_keymap.eeprom_max_addr", "value_type": "int"},
"DYNAMIC_KEYMAP_LAYER_COUNT": {"info_key": "dynamic_keymap.layer_count", "value_type": "int"},
+ // EEPROM
+ "WEAR_LEVELING_BACKING_SIZE": {"info_key": "eeprom.wear_leveling.backing_size", "value_type": "int", "to_json": false},
+ "WEAR_LEVELING_LOGICAL_SIZE": {"info_key": "eeprom.wear_leveling.logical_size", "value_type": "int", "to_json": false},
+
// Indicators
"LED_CAPS_LOCK_PIN": {"info_key": "indicators.caps_lock"},
"LED_NUM_LOCK_PIN": {"info_key": "indicators.num_lock"},
@@ -63,7 +67,11 @@
"LEADER_TIMEOUT": {"info_key": "leader_key.timeout", "value_type": "int"},
// LED Matrix
+ "LED_DISABLE_WHEN_USB_SUSPENDED": {"info_key": "led_matrix.sleep", "value_type": "bool"},
"LED_MATRIX_CENTER": {"info_key": "led_matrix.center_point", "value_type": "array.int"},
+ "LED_MATRIX_KEYRELEASES": {"info_key": "led_matrix.react_on_keyup", "value_type": "bool"},
+ "LED_MATRIX_LED_FLUSH_LIMIT": {"info_key": "led_matrix.led_flush_limit", "value_type": "int"},
+ "LED_MATRIX_LED_PROCESS_LIMIT": {"info_key": "led_matrix.led_process_limit", "value_type": "int", "to_json": false},
"LED_MATRIX_MAXIMUM_BRIGHTNESS": {"info_key": "led_matrix.max_brightness", "value_type": "int"},
"LED_MATRIX_SPD_STEP": {"info_key": "led_matrix.speed_steps", "value_type": "int"},
"LED_MATRIX_SPLIT": {"info_key": "led_matrix.split_count", "value_type": "array.int"},
@@ -100,8 +108,12 @@
"PS2_DATA_PIN": {"info_key": "ps2.data_pin"},
// RGB Matrix
+ "RGB_DISABLE_WHEN_USB_SUSPENDED": {"info_key": "rgb_matrix.sleep", "value_type": "bool"},
"RGB_MATRIX_CENTER": {"info_key": "rgb_matrix.center_point", "value_type": "array.int"},
"RGB_MATRIX_HUE_STEP": {"info_key": "rgb_matrix.hue_steps", "value_type": "int"},
+ "RGB_MATRIX_KEYRELEASES": {"info_key": "rgb_matrix.react_on_keyup", "value_type": "bool"},
+ "RGB_MATRIX_LED_FLUSH_LIMIT": {"info_key": "rgb_matrix.led_flush_limit", "value_type": "int"},
+ "RGB_MATRIX_LED_PROCESS_LIMIT": {"info_key": "rgb_matrix.led_process_limit", "value_type": "int", "to_json": false},
"RGB_MATRIX_MAXIMUM_BRIGHTNESS": {"info_key": "rgb_matrix.max_brightness", "value_type": "int"},
"RGB_MATRIX_SAT_STEP": {"info_key": "rgb_matrix.sat_steps", "value_type": "int"},
"RGB_MATRIX_SPD_STEP": {"info_key": "rgb_matrix.speed_steps", "value_type": "int"},
@@ -134,13 +146,21 @@
// Split Keyboard
"SOFT_SERIAL_PIN": {"info_key": "split.soft_serial_pin"},
"SOFT_SERIAL_SPEED": {"info_key": "split.soft_serial_speed"},
- "SPLIT_MODS_ENABLE": {"info_key": "split.transport.sync_modifiers", "value_type": "bool"},
- "SPLIT_TRANSPORT_MIRROR": {"info_key": "split.transport.sync_matrix_state", "value_type": "bool"},
"SPLIT_USB_DETECT": {"info_key": "split.usb_detect.enabled", "value_type": "bool"},
"SPLIT_USB_TIMEOUT": {"info_key": "split.usb_detect.timeout", "value_type": "int"},
"SPLIT_USB_TIMEOUT_POLL": {"info_key": "split.usb_detect.polling_interval", "value_type": "int"},
"SPLIT_WATCHDOG_ENABLE": {"info_key": "split.transport.watchdog", "value_type": "bool"},
"SPLIT_WATCHDOG_TIMEOUT": {"info_key": "split.transport.watchdog_timeout", "value_type": "int"},
+ "SPLIT_ACTIVITY_ENABLE": {"info_key": "split.transport.sync.activity", "value_type": "bool"},
+ "SPLIT_DETECTED_OS_ENABLE": {"info_key": "split.transport.sync.detected_os", "value_type": "bool"},
+ "SPLIT_HAPTIC_ENABLE": {"info_key": "split.transport.sync.haptic", "value_type": "bool"},
+ "SPLIT_LAYER_STATE_ENABLE": {"info_key": "split.transport.sync.layer_state", "value_type": "bool"},
+ "SPLIT_LED_STATE_ENABLE": {"info_key": "split.transport.sync.indicators", "value_type": "bool"},
+ "SPLIT_TRANSPORT_MIRROR": {"info_key": "split.transport.sync.matrix_state", "value_type": "bool"},
+ "SPLIT_MODS_ENABLE": {"info_key": "split.transport.sync.modifiers", "value_type": "bool"},
+ "SPLIT_OLED_ENABLE": {"info_key": "split.transport.sync.oled", "value_type": "bool"},
+ "SPLIT_ST7565_ENABLE": {"info_key": "split.transport.sync.st7565", "value_type": "bool"},
+ "SPLIT_WPM_ENABLE": {"info_key": "split.transport.sync.wpm", "value_type": "bool"},
// Tapping
"HOLD_ON_OTHER_KEY_PRESS": {"info_key": "tapping.hold_on_other_key_press", "value_type": "bool"},
diff --git a/data/mappings/info_rules.hjson b/data/mappings/info_rules.hjson
index 07191551da..6a0f0a3030 100644
--- a/data/mappings/info_rules.hjson
+++ b/data/mappings/info_rules.hjson
@@ -42,6 +42,7 @@
"STENO_ENABLE": {"info_key": "stenography.enabled", "value_type": "bool"},
"STENO_PROTOCOL": {"info_key": "stenography.protocol"},
"WAIT_FOR_USB": {"info_key": "usb.wait_for", "value_type": "bool"},
+ "WEAR_LEVELING_DRIVER": {"info_key": "eeprom.wear_leveling.driver"},
"WS2812_DRIVER": {"info_key": "ws2812.driver"},
// Items we want flagged in lint
diff --git a/data/mappings/keyboard_aliases.hjson b/data/mappings/keyboard_aliases.hjson
index 8e4265dc01..4e602b6856 100644
--- a/data/mappings/keyboard_aliases.hjson
+++ b/data/mappings/keyboard_aliases.hjson
@@ -176,6 +176,9 @@
"dztech/volcano660": {
"target": "ilumkb/volcano660"
},
+ "dztech/og60": {
+ "target": "dztech/tofu60"
+ },
"eek": {
"target": "eek/silk_down"
},
@@ -209,6 +212,9 @@
"handwired/dactyl_manuform/6x6_kinesis": {
"target": "handwired/dactyl_kinesis"
},
+ "handwired/dactyl_manuform/dmote/62key": {
+ "target": "handwired/dmote"
+ },
"handwired/ferris": {
"target": "ferris/0_1"
},
@@ -894,6 +900,18 @@
"kelowna/rgb64": {
"target": "weirdo/kelowna/rgb64"
},
+ "keychron/q0": {
+ "target": "keychron/q0/base"
+ },
+ "keychron/q1": {
+ "target": "keychron/q1v1/ansi"
+ }
+ "keychron/q4": {
+ "target": "keychron/q4/ansi/v1"
+ }
+ "kprepublic/bm40hsrgb": {
+ "target": "kprepublic/bm40hsrgb/rev1"
+ },
"kprepublic/bm65hsrgb_iso": {
"target": "kprepublic/bm65hsrgb_iso/rev1"
},
@@ -1322,5 +1340,9 @@
},
"zinc/reva": {
"target": "25keys/zinc/reva"
+ },
+ // Moved during 2023 Q4 cycle
+ "ymdk/melody96": {
+ "target": "ymdk/melody96/soldered"
}
}
diff --git a/data/schemas/keyboard.jsonschema b/data/schemas/keyboard.jsonschema
index 4053387f3b..8ff94fb9f2 100644
--- a/data/schemas/keyboard.jsonschema
+++ b/data/schemas/keyboard.jsonschema
@@ -247,7 +247,19 @@
},
"eeprom": {
"properties": {
- "driver": {"type": "string"}
+ "driver": {"type": "string"},
+ "wear_leveling": {
+ "type": "object",
+ "additionalProperties": false,
+ "properties": {
+ "driver": {
+ "type": "string",
+ "enum": ["custom", "embedded_flash", "legacy", "rp2040_flash", "spi_flash"]
+ },
+ "backing_size": {"$ref": "qmk.definitions.v1#/unsigned_int"},
+ "logical_size": {"$ref": "qmk.definitions.v1#/unsigned_int"}
+ }
+ }
}
},
"encoder": {
@@ -390,6 +402,10 @@
"timeout": {"$ref": "qmk.definitions.v1#/unsigned_int"},
"val_steps": {"$ref": "qmk.definitions.v1#/unsigned_int"},
"speed_steps": {"$ref": "qmk.definitions.v1#/unsigned_int"},
+ "led_flush_limit": {"$ref": "qmk.definitions.v1#/unsigned_int"},
+ "led_process_limit": {"$ref": "qmk.definitions.v1#/unsigned_int"},
+ "react_on_keyup": {"type": "boolean"},
+ "sleep": {"type": "boolean"},
"split_count": {
"type": "array",
"minItems": 2,
@@ -442,6 +458,10 @@
"sat_steps": {"$ref": "qmk.definitions.v1#/unsigned_int"},
"val_steps": {"$ref": "qmk.definitions.v1#/unsigned_int"},
"speed_steps": {"$ref": "qmk.definitions.v1#/unsigned_int"},
+ "led_flush_limit": {"$ref": "qmk.definitions.v1#/unsigned_int"},
+ "led_process_limit": {"$ref": "qmk.definitions.v1#/unsigned_int"},
+ "react_on_keyup": {"type": "boolean"},
+ "sleep": {"type": "boolean"},
"split_count": {
"type": "array",
"minItems": 2,
@@ -643,10 +663,32 @@
"type": "string",
"enum": ["custom", "i2c", "serial", "serial_usart"]
},
- "sync_matrix_state": {"type": "boolean"},
- "sync_modifiers": {"type": "boolean"},
+ "sync": {
+ "type": "object",
+ "additionalProperties": false,
+ "properties": {
+ "activity": {"type": "boolean"},
+ "detected_os": {"type": "boolean"},
+ "haptic": {"type": "boolean"},
+ "layer_state": {"type": "boolean"},
+ "indicators": {"type": "boolean"},
+ "matrix_state": {"type": "boolean"},
+ "modifiers": {"type": "boolean"},
+ "oled": {"type": "boolean"},
+ "st7565": {"type": "boolean"},
+ "wpm": {"type": "boolean"}
+ }
+ }
"watchdog": {"type": "boolean"},
- "watchdog_timeout": {"$ref": "qmk.definitions.v1#/unsigned_int"}
+ "watchdog_timeout": {"$ref": "qmk.definitions.v1#/unsigned_int"},
+ "sync_matrix_state": {
+ "type": "boolean",
+ "$comment": "Deprecated: use sync.matrix_state instead"
+ },
+ "sync_modifiers": {
+ "type": "boolean",
+ "$comment": "Deprecated: use sync.modifiers instead"
+ }
}
},
"usb_detect": {
diff --git a/docs/_summary.md b/docs/_summary.md
index 26a543aee4..722c5f9c5d 100644
--- a/docs/_summary.md
+++ b/docs/_summary.md
@@ -126,7 +126,6 @@
* [PS/2 Mouse](feature_ps2_mouse.md)
* [Split Keyboard](feature_split_keyboard.md)
* [Stenography](feature_stenography.md)
- * [Velocikey](feature_velocikey.md)
* Keyboard Building
* [Easy Maker for One Offs](easy_maker.md)
@@ -148,6 +147,7 @@
* [Compatible Microcontrollers](compatible_microcontrollers.md)
* [Drivers](hardware_drivers.md)
* [ADC Driver](adc_driver.md)
+ * [APA102 Driver](apa102_driver.md)
* [Audio Driver](audio_driver.md)
* [I2C Driver](i2c_driver.md)
* [SPI Driver](spi_driver.md)
diff --git a/docs/apa102_driver.md b/docs/apa102_driver.md
new file mode 100644
index 0000000000..1da2de6ca3
--- /dev/null
+++ b/docs/apa102_driver.md
@@ -0,0 +1,49 @@
+# APA102 Driver :id=apa102-driver
+
+This driver provides support for APA102 addressable RGB LEDs. They are similar to the [WS2812](ws2812_driver.md) LEDs, but have increased data and refresh rates.
+
+## Usage :id=usage
+
+In most cases, the APA102 driver code is automatically included if you are using either the [RGBLight](feature_rgblight.md) or [RGB Matrix](feature_rgb_matrix.md) feature with the `apa102` driver set, and you would use those APIs instead.
+
+However, if you need to use the driver standalone, add the following to your `rules.mk`:
+
+```make
+APA102_DRIVER_REQUIRED = yes
+```
+
+You can then call the APA102 API by including `apa102.h` in your code.
+
+## Basic Configuration :id=basic-configuration
+
+Add the following to your `config.h`:
+
+|Define |Default |Description |
+|---------------------------|-------------|------------------------------------------------------------------|
+|`APA102_DI_PIN` |*Not defined*|The GPIO pin connected to the DI pin of the first LED in the chain|
+|`APA102_CI_PIN` |*Not defined*|The GPIO pin connected to the CI pin of the first LED in the chain|
+|`APA102_DEFAULT_BRIGHTNESS`|`31` |The default global brightness level of the LEDs, from 0 to 31 |
+
+## API :id=api
+
+### `void apa102_setleds(rgb_led_t *start_led, uint16_t num_leds)`
+
+Send RGB data to the APA102 LED chain.
+
+#### Arguments :id=api-apa102-setleds-arguments
+
+ - `rgb_led_t *start_led`
+ A pointer to the LED array.
+ - `uint16_t num_leds`
+ The length of the LED array.
+
+---
+
+### `void apa102_set_brightness(uint8_t brightness)`
+
+Set the global brightness.
+
+#### Arguments :id=api-apa102-set-brightness-arguments
+
+ - `uint8_t brightness`
+ The brightness level to set, from 0 to 31.
diff --git a/docs/eeprom_driver.md b/docs/eeprom_driver.md
index 50d8bcb7b3..34b6f51cbe 100644
--- a/docs/eeprom_driver.md
+++ b/docs/eeprom_driver.md
@@ -105,11 +105,11 @@ Configurable options in your keyboard's `config.h`:
`config.h` override | Default | Description
-----------------------------------------|-------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-`#define WEAR_LEVELING_EFL_FIRST_SECTOR` | _unset_ | The first sector on the MCU to use. By default this is not defined and calculated at runtime based on the MCU. However, different flash sizes on MCUs may require custom configuration.
-`#define WEAR_LEVELING_EFL_FLASH_SIZE` | _unset_ | Allows overriding the flash size available for use for wear-leveling. Under normal circumstances this is automatically calculated and should not need to be overridden. Specifying a size larger than the amount actually available in flash will usually prevent the MCU from booting.
-`#define WEAR_LEVELING_LOGICAL_SIZE` | `1024` | Number of bytes "exposed" to the rest of QMK and denotes the size of the usable EEPROM.
-`#define WEAR_LEVELING_BACKING_SIZE` | `2048` | Number of bytes used by the wear-leveling algorithm for its underlying storage, and needs to be a multiple of the logical size.
-`#define BACKING_STORE_WRITE_SIZE` | _automatic_ | The byte width of the underlying write used on the MCU, and is usually automatically determined from the selected MCU family. If an error occurs in the auto-detection, you'll need to consult the MCU's datasheet and determine this value, specifying it directly.
+`#define WEAR_LEVELING_EFL_FIRST_SECTOR` | _unset_ | The first sector on the MCU to use. By default this is not defined and calculated at runtime based on the MCU. However, different flash sizes on MCUs may require custom configuration.
+`#define WEAR_LEVELING_EFL_FLASH_SIZE` | _unset_ | Allows overriding the flash size available for use for wear-leveling. Under normal circumstances this is automatically calculated and should not need to be overridden. Specifying a size larger than the amount actually available in flash will usually prevent the MCU from booting.
+`#define WEAR_LEVELING_LOGICAL_SIZE` | `(backing_size/2)` | Number of bytes "exposed" to the rest of QMK and denotes the size of the usable EEPROM.
+`#define WEAR_LEVELING_BACKING_SIZE` | `2048` | Number of bytes used by the wear-leveling algorithm for its underlying storage, and needs to be a multiple of the logical size.
+`#define BACKING_STORE_WRITE_SIZE` | _automatic_ | The byte width of the underlying write used on the MCU, and is usually automatically determined from the selected MCU family. If an error occurs in the auto-detection, you'll need to consult the MCU's datasheet and determine this value, specifying it directly.
!> If your MCU does not boot after swapping to the EFL wear-leveling driver, it's likely that the flash size is incorrectly detected, usually as an MCU with larger flash and may require overriding.
@@ -139,7 +139,7 @@ Configurable options in your keyboard's `config.h`:
------------------------------------------|----------------------------|--------------------------------------------------------------------------------------------------------------------------------
`#define WEAR_LEVELING_RP2040_FLASH_SIZE` | `PICO_FLASH_SIZE_BYTES` | Number of bytes of flash on the board.
`#define WEAR_LEVELING_RP2040_FLASH_BASE` | `(flash_size-sector_size)` | The byte-wise location that the backing storage should be located.
-`#define WEAR_LEVELING_LOGICAL_SIZE` | `4096` | Number of bytes "exposed" to the rest of QMK and denotes the size of the usable EEPROM.
+`#define WEAR_LEVELING_LOGICAL_SIZE` | `(backing_size/2)` | Number of bytes "exposed" to the rest of QMK and denotes the size of the usable EEPROM.
`#define WEAR_LEVELING_BACKING_SIZE` | `8192` | Number of bytes used by the wear-leveling algorithm for its underlying storage, and needs to be a multiple of the logical size as well as the sector size.
`#define BACKING_STORE_WRITE_SIZE` | `2` | The write width used whenever a write is performed on the external flash peripheral.
diff --git a/docs/feature_auto_shift.md b/docs/feature_auto_shift.md
index 6241cbaeb1..74be33cdd4 100644
--- a/docs/feature_auto_shift.md
+++ b/docs/feature_auto_shift.md
@@ -180,18 +180,18 @@ For more granular control, there is `get_auto_shifted_key`. The default function
bool get_auto_shifted_key(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
# ifndef NO_AUTO_SHIFT_ALPHA
- case KC_A ... KC_Z:
+ case AUTO_SHIFT_ALPHA:
# endif
# ifndef NO_AUTO_SHIFT_NUMERIC
- case KC_1 ... KC_0:
+ case AUTO_SHIFT_NUMERIC:
# endif
# ifndef NO_AUTO_SHIFT_SPECIAL
-# ifndef NO_AUTO_SHIFT_TAB
+# ifndef NO_AUTO_SHIFT_TAB
case KC_TAB:
-# endif
-# ifndef NO_AUTO_SHIFT_SYMBOLS
+# endif
+# ifndef NO_AUTO_SHIFT_SYMBOLS
case AUTO_SHIFT_SYMBOLS:
-# endif
+# endif
# endif
# ifdef AUTO_SHIFT_ENTER
case KC_ENT:
@@ -310,10 +310,16 @@ generating taps on release. For example:
#define RETRO_SHIFT 500
```
+Without a value set, holds of any length without an interrupting key will produce the shifted value.
+
This value (if set) must be greater than one's `TAPPING_TERM`, as the key press
must be designated as a 'hold' by `process_tapping` before we send the modifier.
+[Per-key tapping terms](tap_hold.md#tapping-term) can be used as a workaround.
There is no such limitation in regards to `AUTO_SHIFT_TIMEOUT` for normal keys.
+**Note:** Tap Holds must be added to Auto Shift, see [here.](feature_auto_shift.md#auto-shift-per-key)
+`IS_RETRO` may be helpful if one wants all Tap Holds retro shifted.
+
### Retro Shift and Tap Hold Configurations
Tap Hold Configurations work a little differently when using Retro Shift.
diff --git a/docs/feature_backlight.md b/docs/feature_backlight.md
index d032c33f18..89916aa813 100644
--- a/docs/feature_backlight.md
+++ b/docs/feature_backlight.md
@@ -37,8 +37,10 @@ Add the following to your `config.h`:
|`BREATHING_PERIOD` |`6` |The length of one backlight "breath" in seconds |
|`BACKLIGHT_ON_STATE` |`1` |The state of the backlight pin when the backlight is "on" - `1` for high, `0` for low |
|`BACKLIGHT_LIMIT_VAL` |`255` |The maximum duty cycle of the backlight -- `255` allows for full brightness, any lower will decrease the maximum.|
+|`BACKLIGHT_DEFAULT_ON` |`true` |Enable backlight upon clearing the EEPROM |
+|`BACKLIGHT_DEFAULT_BREATHING`|`false` |Whether to enable backlight breathing upon clearing the EEPROM |
|`BACKLIGHT_DEFAULT_LEVEL` |`BACKLIGHT_LEVELS`|The default backlight level to use upon clearing the EEPROM |
-|`BACKLIGHT_DEFAULT_BREATHING`|*Not defined* |Whether to enable backlight breathing upon clearing the EEPROM |
+|`BACKLIGHT_PWM_PERIOD` |2048Hz |Defaults to `BACKLIGHT_PWM_COUNTER_FREQUENCY / 2048`, which results in a PWM frequency of 2048Hz. |
Unless you are designing your own keyboard, you generally should not need to change the `BACKLIGHT_PIN` or `BACKLIGHT_ON_STATE`.
diff --git a/docs/feature_led_matrix.md b/docs/feature_led_matrix.md
index fd56a45725..87f4f36f1d 100644
--- a/docs/feature_led_matrix.md
+++ b/docs/feature_led_matrix.md
@@ -19,9 +19,9 @@ You can use between 1 and 4 IS31FL3731 IC's. Do not specify `LED_DRIVER_ADDR_<N>
| Variable | Description | Default |
|----------|-------------|---------|
-| `ISSI_TIMEOUT` | (Optional) How long to wait for i2c messages, in milliseconds | 100 |
-| `ISSI_PERSISTENCE` | (Optional) Retry failed messages this many times | 0 |
-| `LED_DRIVER_COUNT` | (Required) How many LED driver IC's are present | |
+| `IS31FL3731_I2C_TIMEOUT` | (Optional) How long to wait for i2c messages, in milliseconds | 100 |
+| `IS31FL3731_I2C_PERSISTENCE` | (Optional) Retry failed messages this many times | 0 |
+| `IS31FL3731_DRIVER_COUNT` | (Required) How many LED driver IC's are present | |
| `LED_MATRIX_LED_COUNT` | (Required) How many LED lights are present across all drivers | |
| `LED_DRIVER_ADDR_1` | (Required) Address for the first LED driver | |
| `LED_DRIVER_ADDR_2` | (Optional) Address for the second LED driver | |
@@ -34,14 +34,16 @@ Here is an example using 2 drivers.
// This is a 7-bit address, that gets left-shifted and bit 0
// set to 0 for write, 1 for read (as per I2C protocol)
// The address will vary depending on your wiring:
-// 0b1110100 AD <-> GND
-// 0b1110111 AD <-> VCC
-// 0b1110101 AD <-> SCL
-// 0b1110110 AD <-> SDA
-#define LED_DRIVER_ADDR_1 0b1110100
-#define LED_DRIVER_ADDR_2 0b1110110
-
-#define LED_DRIVER_COUNT 2
+// 00 AD <-> GND
+// 01 AD <-> SCL
+// 10 AD <-> SDA
+// 11 AD <-> VCC
+// ADDR represents A1:A0 of the 7-bit address.
+// The result is: 0b11101(ADDR)
+#define LED_DRIVER_ADDR_1 IS31FL3731_I2C_ADDRESS_GND
+#define LED_DRIVER_ADDR_2 IS31FL3731_I2C_ADDRESS_SDA
+
+#define IS31FL3731_DRIVER_COUNT 2
#define LED_DRIVER_1_LED_TOTAL 25
#define LED_DRIVER_2_LED_TOTAL 24
#define LED_MATRIX_LED_COUNT (LED_DRIVER_1_LED_TOTAL + LED_DRIVER_2_LED_TOTAL)
@@ -49,12 +51,12 @@ Here is an example using 2 drivers.
!> Note the parentheses, this is so when `LED_MATRIX_LED_COUNT` is used in code and expanded, the values are added together before any additional math is applied to them. As an example, `rand() % (LED_DRIVER_1_LED_TOTAL + LED_DRIVER_2_LED_TOTAL)` will give very different results than `rand() % LED_DRIVER_1_LED_TOTAL + LED_DRIVER_2_LED_TOTAL`.
-For split keyboards using `LED_MATRIX_SPLIT` with an LED driver, you can either have the same driver address or different driver addresses. If using different addresses, use `DRIVER_ADDR_1` for one and `DRIVER_ADDR_2` for the other one. Then, in `g_is31_leds`, fill out the correct driver index (0 or 1). If using one address, use `DRIVER_ADDR_1` for both, and use index 0 for `g_is31_leds`.
+For split keyboards using `LED_MATRIX_SPLIT` with an LED driver, you can either have the same driver address or different driver addresses. If using different addresses, use `DRIVER_ADDR_1` for one and `DRIVER_ADDR_2` for the other one. Then, in `g_is31fl3731_leds`, fill out the correct driver index (0 or 1). If using one address, use `DRIVER_ADDR_1` for both, and use index 0 for `g_is31fl3731_leds`.
Define these arrays listing all the LEDs in your `<keyboard>.c`:
```c
-const is31_led PROGMEM g_is31_leds[LED_MATRIX_LED_COUNT] = {
+const is31fl3731_led_t PROGMEM g_is31fl3731_leds[LED_MATRIX_LED_COUNT] = {
/* Refer to IS31 manual for these locations
* driver
* | LED address
@@ -159,7 +161,7 @@ Then Define the array listing all the LEDs you want to override in your `<keyboa
```c
const is31_led PROGMEM g_is31_scaling[ISSI_MANUAL_SCALING] = {
- * LED Index
+/* LED Index
* | Scaling
* | | */
{5, 120},
@@ -248,16 +250,16 @@ enum led_matrix_effects {
LED_MATRIX_CYCLE_OUT_IN, // Full gradient scrolling out to in
LED_MATRIX_DUAL_BEACON, // Full gradient spinning around center of keyboard
LED_MATRIX_SOLID_REACTIVE_SIMPLE, // Pulses keys hit then fades out
- LED_MATRIX_SOLID_REACTIVE_WIDE // Value pulses near a single key hit then fades out
- LED_MATRIX_SOLID_REACTIVE_MULTIWIDE // Value pulses near multiple key hits then fades out
- LED_MATRIX_SOLID_REACTIVE_CROSS // Value pulses the same column and row of a single key hit then fades out
- LED_MATRIX_SOLID_REACTIVE_MULTICROSS // Value pulses the same column and row of multiple key hits then fades out
- LED_MATRIX_SOLID_REACTIVE_NEXUS // Value pulses away on the same column and row of a single key hit then fades out
- LED_MATRIX_SOLID_REACTIVE_MULTINEXUS // Value pulses away on the same column and row of multiple key hits then fades out
+ LED_MATRIX_SOLID_REACTIVE_WIDE, // Value pulses near a single key hit then fades out
+ LED_MATRIX_SOLID_REACTIVE_MULTIWIDE, // Value pulses near multiple key hits then fades out
+ LED_MATRIX_SOLID_REACTIVE_CROSS, // Value pulses the same column and row of a single key hit then fades out
+ LED_MATRIX_SOLID_REACTIVE_MULTICROSS, // Value pulses the same column and row of multiple key hits then fades out
+ LED_MATRIX_SOLID_REACTIVE_NEXUS, // Value pulses away on the same column and row of a single key hit then fades out
+ LED_MATRIX_SOLID_REACTIVE_MULTINEXUS, // Value pulses away on the same column and row of multiple key hits then fades out
LED_MATRIX_SOLID_SPLASH, // Value pulses away from a single key hit then fades out
LED_MATRIX_SOLID_MULTISPLASH, // Value pulses away from multiple key hits then fades out
- LED_MATRIX_WAVE_LEFT_RIGHT // Sine wave scrolling from left to right
- LED_MATRIX_WAVE_UP_DOWN // Sine wave scrolling from up to down
+ LED_MATRIX_WAVE_LEFT_RIGHT, // Sine wave scrolling from left to right
+ LED_MATRIX_WAVE_UP_DOWN, // Sine wave scrolling from up to down
LED_MATRIX_EFFECT_MAX
};
```
@@ -363,6 +365,7 @@ For inspiration and examples, check out the built-in effects under `quantum/led_
#define LED_MATRIX_LED_PROCESS_LIMIT (LED_MATRIX_LED_COUNT + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness)
#define LED_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness)
#define LED_MATRIX_MAXIMUM_BRIGHTNESS 255 // limits maximum brightness of LEDs
+#define LED_MATRIX_DEFAULT_ON true // Sets the default enabled state, if none has been set
#define LED_MATRIX_DEFAULT_MODE LED_MATRIX_SOLID // Sets the default mode, if none has been set
#define LED_MATRIX_DEFAULT_VAL LED_MATRIX_MAXIMUM_BRIGHTNESS // Sets the default brightness value, if none has been set
#define LED_MATRIX_DEFAULT_SPD 127 // Sets the default animation speed, if none has been set
diff --git a/docs/feature_oled_driver.md b/docs/feature_oled_driver.md
index e67f80c879..452f729e14 100644
--- a/docs/feature_oled_driver.md
+++ b/docs/feature_oled_driver.md
@@ -167,6 +167,42 @@ bool oled_task_user(void) {
#endif
```
+Render a message before booting into bootloader mode.
+```c
+void oled_render_boot(bool bootloader) {
+ oled_clear();
+ for (int i = 0; i < 16; i++) {
+ oled_set_cursor(0, i);
+ if (bootloader) {
+ oled_write_P(PSTR("Awaiting New Firmware "), false);
+ } else {
+ oled_write_P(PSTR("Rebooting "), false);
+ }
+ }
+
+ oled_render_dirty(true);
+}
+
+bool reboot = false;
+
+bool uint16_t keycode, keyrecord_t *record) {
+ if (record->event.pressed) {
+
+ // Display a special message prior to rebooting...
+ if (keycode == QK_BOOT) {
+ reboot = true;
+ }
+ }
+
+ return true;
+}
+
+void shutdown_user(void) {
+ oled_render_boot(reboot);
+}
+
+```
+
## Basic Configuration
These configuration options should be placed in `config.h`. Example:
@@ -276,7 +312,7 @@ Rotation on SH1106 and SH1107 is noticeably less efficient than on SSD1306, beca
## OLED API
```c
-// OLED rotation enum values are flags
+// OLED Rotation enum values are flags
typedef enum {
OLED_ROTATION_0 = 0,
OLED_ROTATION_90 = 1,
@@ -284,7 +320,7 @@ typedef enum {
OLED_ROTATION_270 = 3, // OLED_ROTATION_90 | OLED_ROTATION_180
} oled_rotation_t;
-// Initialize the OLED display, rotating the rendered output based on the define passed in.
+// Initialize the oled display, rotating the rendered output based on the define passed in.
// Returns true if the OLED was initialized successfully
bool oled_init(oled_rotation_t rotation);
@@ -302,8 +338,12 @@ bool oled_send_data(const uint8_t *data, uint16_t size);
// Clears the display buffer, resets cursor position to 0, and sets the buffer to dirty for rendering
void oled_clear(void);
-// Renders the dirty chunks of the buffer to OLED display
-void oled_render(void);
+// Alias to oled_render_dirty to avoid a change in api.
+#define oled_render() oled_render_dirty(false)
+
+// Renders all dirty blocks to the display at one time or a subset depending on the value of
+// all.
+void oled_render_dirty(bool all);
// Moves cursor to character position indicated by column and line, wraps if out of bounds
// Max column denoted by 'oled_max_chars()' and max lines by 'oled_max_lines()' functions
@@ -334,8 +374,6 @@ void oled_write_ln(const char *data, bool invert);
// Pans the buffer to the right (or left by passing true) by moving contents of the buffer
// Useful for moving the screen in preparation for new drawing
-// oled_scroll_left or oled_scroll_right should be preferred for all cases of moving a static
-// image such as a logo or to avoid burn-in as it's much, much less cpu intensive
void oled_pan(bool left);
// Returns a pointer to the requested start index in the buffer plus remaining
@@ -352,6 +390,7 @@ void oled_write_raw_byte(const char data, uint16_t index);
// Coordinates start at top-left and go right and down for positive x and y
void oled_write_pixel(uint8_t x, uint8_t y, bool on);
+#if defined(__AVR__)
// Writes a PROGMEM string to the buffer at current cursor position
// Advances the cursor while writing, inverts the pixels if true
// Remapped to call 'void oled_write(const char *data, bool invert);' on ARM
@@ -365,6 +404,11 @@ void oled_write_ln_P(const char *data, bool invert);
// Writes a PROGMEM string to the buffer at current cursor position
void oled_write_raw_P(const char *data, uint16_t size);
+#else
+# define oled_write_P(data, invert) oled_write(data, invert)
+# define oled_write_ln_P(data, invert) oled_write_ln(data, invert)
+# define oled_write_raw_P(data, size) oled_write_raw(data, size)
+#endif // defined(__AVR__)
// Can be used to manually turn on the screen if it is off
// Returns true if the screen was on or turns on
diff --git a/docs/feature_rgb_matrix.md b/docs/feature_rgb_matrix.md
index 44899d70d9..82b45583ec 100644
--- a/docs/feature_rgb_matrix.md
+++ b/docs/feature_rgb_matrix.md
@@ -19,10 +19,10 @@ You can use between 1 and 4 IS31FL3731 IC's. Do not specify `DRIVER_ADDR_<N>` de
| Variable | Description | Default |
|----------|-------------|---------|
-| `ISSI_TIMEOUT` | (Optional) How long to wait for i2c messages, in milliseconds | 100 |
-| `ISSI_PERSISTENCE` | (Optional) Retry failed messages this many times | 0 |
-| `ISSI_3731_DEGHOST` | (Optional) Set this define to enable de-ghosting by halving Vcc during blanking time | |
-| `DRIVER_COUNT` | (Required) How many RGB driver IC's are present | |
+| `IS31FL3731_I2C_TIMEOUT` | (Optional) How long to wait for i2c messages, in milliseconds | 100 |
+| `IS31FL3731_I2C_PERSISTENCE` | (Optional) Retry failed messages this many times | 0 |
+| `IS31FL3731_DEGHOST` | (Optional) Set this define to enable de-ghosting by halving Vcc during blanking time | |
+| `IS31FL3731_DRIVER_COUNT` | (Required) How many RGB driver IC's are present | |
| `RGB_MATRIX_LED_COUNT` | (Required) How many RGB lights are present across all drivers | |
| `DRIVER_ADDR_1` | (Required) Address for the first RGB driver | |
| `DRIVER_ADDR_2` | (Optional) Address for the second RGB driver | |
@@ -35,14 +35,16 @@ Here is an example using 2 drivers.
// This is a 7-bit address, that gets left-shifted and bit 0
// set to 0 for write, 1 for read (as per I2C protocol)
// The address will vary depending on your wiring:
-// 0b1110100 AD <-> GND
-// 0b1110111 AD <-> VCC
-// 0b1110101 AD <-> SCL
-// 0b1110110 AD <-> SDA
-#define DRIVER_ADDR_1 0b1110100
-#define DRIVER_ADDR_2 0b1110110
-
-#define DRIVER_COUNT 2
+// 00 AD <-> GND
+// 01 AD <-> SCL
+// 10 AD <-> SDA
+// 11 AD <-> VCC
+// ADDR represents A1:A0 of the 7-bit address.
+// The result is: 0b11101(ADDR)
+#define DRIVER_ADDR_1 IS31FL3731_I2C_ADDRESS_GND
+#define DRIVER_ADDR_2 IS31FL3731_I2C_ADDRESS_SDA
+
+#define IS31FL3731_DRIVER_COUNT 2
#define DRIVER_1_LED_TOTAL 25
#define DRIVER_2_LED_TOTAL 24
#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
@@ -50,12 +52,12 @@ Here is an example using 2 drivers.
!> Note the parentheses, this is so when `RGB_MATRIX_LED_COUNT` is used in code and expanded, the values are added together before any additional math is applied to them. As an example, `rand() % (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)` will give very different results than `rand() % DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL`.
-For split keyboards using `RGB_MATRIX_SPLIT` with an LED driver, you can either have the same driver address or different driver addresses. If using different addresses, use `DRIVER_ADDR_1` for one and `DRIVER_ADDR_2` for the other one. Then, in `g_is31_leds`, fill out the correct driver index (0 or 1). If using one address, use `DRIVER_ADDR_1` for both, and use index 0 for `g_is31_leds`.
+For split keyboards using `RGB_MATRIX_SPLIT` with an LED driver, you can either have the same driver address or different driver addresses. If using different addresses, use `DRIVER_ADDR_1` for one and `DRIVER_ADDR_2` for the other one. Then, in `g_is31fl3731_leds`, fill out the correct driver index (0 or 1). If using one address, use `DRIVER_ADDR_1` for both, and use index 0 for `g_is31fl3731_leds`.
Define these arrays listing all the LEDs in your `<keyboard>.c`:
```c
-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
@@ -83,13 +85,13 @@ You can use between 1 and 4 IS31FL3733 IC's. Do not specify `DRIVER_ADDR_<N>` de
| Variable | Description | Default |
|----------|-------------|---------|
-| `ISSI_TIMEOUT` | (Optional) How long to wait for i2c messages, in milliseconds | 100 |
-| `ISSI_PERSISTENCE` | (Optional) Retry failed messages this many times | 0 |
-| `ISSI_PWM_FREQUENCY` | (Optional) PWM Frequency Setting - IS31FL3733B only | 0 |
-| `ISSI_GLOBALCURRENT` | (Optional) Configuration for the Global Current Register | 0xFF |
-| `ISSI_SWPULLUP` | (Optional) Set the value of the SWx lines on-chip de-ghosting resistors | PUR_0R (Disabled) |
-| `ISSI_CSPULLUP` | (Optional) Set the value of the CSx lines on-chip de-ghosting resistors | PUR_0R (Disabled) |
-| `DRIVER_COUNT` | (Required) How many RGB driver IC's are present | |
+| `IS31FL3733_I2C_TIMEOUT` | (Optional) How long to wait for i2c messages, in milliseconds | 100 |
+| `IS31FL3733_I2C_PERSISTENCE` | (Optional) Retry failed messages this many times | 0 |
+| `IS31FL3733_PWM_FREQUENCY` | (Optional) PWM Frequency Setting - IS31FL3733B only | 0 |
+| `IS31FL3733_GLOBALCURRENT` | (Optional) Configuration for the Global Current Register | 0xFF |
+| `IS31FL3733_SWPULLUP` | (Optional) Set the value of the SWx lines on-chip de-ghosting resistors | PUR_0R (Disabled) |
+| `IS31FL3733_CSPULLUP` | (Optional) Set the value of the CSx lines on-chip de-ghosting resistors | PUR_0R (Disabled) |
+| `IS31FL3733_DRIVER_COUNT` | (Required) How many RGB driver IC's are present | |
| `RGB_MATRIX_LED_COUNT` | (Required) How many RGB lights are present across all drivers | |
| `DRIVER_ADDR_1` | (Required) Address for the first RGB driver | |
| `DRIVER_ADDR_2` | (Optional) Address for the second RGB driver | |
@@ -100,17 +102,17 @@ You can use between 1 and 4 IS31FL3733 IC's. Do not specify `DRIVER_ADDR_<N>` de
| `DRIVER_SYNC_3` | (Optional) Sync configuration for the third RGB driver | 0 |
| `DRIVER_SYNC_4` | (Optional) Sync configuration for the fourth RGB driver | 0 |
-The IS31FL3733 IC's have on-chip resistors that can be enabled to allow for de-ghosting of the RGB matrix. By default these resistors are not enabled (`ISSI_SWPULLUP`/`ISSI_CSPULLUP` are given the value of`PUR_0R`), the values that can be set to enable de-ghosting are as follows:
+The IS31FL3733 IC's have on-chip resistors that can be enabled to allow for de-ghosting of the RGB matrix. By default these resistors are not enabled (`IS31FL3733_SWPULLUP`/`IS31FL3733_CSPULLUP` are given the value of `IS31FL3733_PUR_0R`), the values that can be set to enable de-ghosting are as follows:
-| `ISSI_SWPULLUP/ISSI_CSPULLUP` | Description |
+| `IS31FL3733_SWPULLUP/IS31FL3733_CSPULLUP` | Description |
|----------------------|-------------|
-| `PUR_0R` | (default) Do not use the on-chip resistors/enable de-ghosting |
-| `PUR_05KR` | The 0.5k Ohm resistor used during blanking period (t_NOL) |
-| `PUR_3KR` | The 3k Ohm resistor used at all times |
-| `PUR_4KR` | The 4k Ohm resistor used at all times |
-| `PUR_8KR` | The 8k Ohm resistor used at all times |
-| `PUR_16KR` | The 16k Ohm resistor used at all times |
-| `PUR_32KR` | The 32k Ohm resistor used during blanking period (t_NOL) |
+| `IS31FL3733_PUR_0R` | (default) Do not use the on-chip resistors/enable de-ghosting |
+| `IS31FL3733_PUR_05KR` | The 0.5k Ohm resistor used during blanking period (t_NOL) |
+| `IS31FL3733_PUR_3KR` | The 3k Ohm resistor used at all times |
+| `IS31FL3733_PUR_4KR` | The 4k Ohm resistor used at all times |
+| `IS31FL3733_PUR_8KR` | The 8k Ohm resistor used at all times |
+| `IS31FL3733_PUR_16KR` | The 16k Ohm resistor used at all times |
+| `IS31FL3733_PUR_32KR` | The 32k Ohm resistor used during blanking period (t_NOL) |
Here is an example using 2 drivers.
@@ -118,17 +120,17 @@ Here is an example using 2 drivers.
// This is a 7-bit address, that gets left-shifted and bit 0
// set to 0 for write, 1 for read (as per I2C protocol)
// The address will vary depending on your wiring:
-// 00 <-> GND
-// 01 <-> SCL
-// 10 <-> SDA
-// 11 <-> VCC
+// 00 ADDRn <-> GND
+// 01 ADDRn <-> SCL
+// 10 ADDRn <-> SDA
+// 11 ADDRn <-> VCC
// ADDR1 represents A1:A0 of the 7-bit address.
// ADDR2 represents A3:A2 of the 7-bit address.
// The result is: 0b101(ADDR2)(ADDR1)
-#define DRIVER_ADDR_1 0b1010000
-#define DRIVER_ADDR_2 0b1010011
+#define DRIVER_ADDR_1 IS31FL3733_I2C_ADDRESS_GND_GND
+#define DRIVER_ADDR_2 IS31FL3733_I2C_ADDRESS_GND_VCC
-#define DRIVER_COUNT 2
+#define IS31FL3733_DRIVER_COUNT 2
#define DRIVER_1_LED_TOTAL 58
#define DRIVER_2_LED_TOTAL 10
#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
@@ -141,7 +143,7 @@ Currently only 4 drivers are supported, but it would be trivial to support all 8
Define these arrays listing all the LEDs in your `<keyboard>.c`:
```c
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3733_led_t PROGMEM g_is31fl3733_leds[RGB_MATRIX_LED_COUNT] = {
/* Refer to IS31 manual for these locations
* driver
* | R location
@@ -170,31 +172,31 @@ Configure the hardware via your `config.h`:
| Variable | Description | Default |
|----------|-------------|---------|
-| `ISSI_TIMEOUT` | (Optional) How long to wait for i2c messages, in milliseconds | 100 |
-| `ISSI_PERSISTENCE` | (Optional) Retry failed messages this many times | 0 |
-| `ISSI_PWM_FREQUENCY` | (Optional) PWM Frequency Setting - IS31FL3736B only | 0 |
-| `ISSI_GLOBALCURRENT` | (Optional) Configuration for the Global Current Register | 0xFF |
-| `ISSI_SWPULLUP` | (Optional) Set the value of the SWx lines on-chip de-ghosting resistors | PUR_0R (Disabled) |
-| `ISSI_CSPULLUP` | (Optional) Set the value of the CSx lines on-chip de-ghosting resistors | PUR_0R (Disabled) |
-| `DRIVER_COUNT` | (Required) How many RGB driver IC's are present | |
+| `IS31FL3736_I2C_TIMEOUT` | (Optional) How long to wait for i2c messages, in milliseconds | 100 |
+| `IS31FL3736_PERSISTENCE` | (Optional) Retry failed messages this many times | 0 |
+| `IS31FL3736_PWM_FREQUENCY` | (Optional) PWM Frequency Setting - IS31FL3736B only | 0 |
+| `IS31FL3736_GLOBALCURRENT` | (Optional) Configuration for the Global Current Register | 0xFF |
+| `IS31FL3736_SWPULLUP` | (Optional) Set the value of the SWx lines on-chip de-ghosting resistors | PUR_0R (Disabled) |
+| `IS31FL3736_CSPULLUP` | (Optional) Set the value of the CSx lines on-chip de-ghosting resistors | PUR_0R (Disabled) |
+| `IS31FL3736_DRIVER_COUNT` | (Required) How many RGB driver IC's are present | |
| `RGB_MATRIX_LED_COUNT` | (Required) How many RGB lights are present across all drivers | |
| `DRIVER_ADDR_1` | (Required) Address for the first RGB driver | |
| `DRIVER_ADDR_2` | (Optional) Address for the second RGB driver | |
| `DRIVER_ADDR_3` | (Optional) Address for the third RGB driver | |
| `DRIVER_ADDR_4` | (Optional) Address for the fourth RGB driver | |
-The IS31FL3736 IC's have on-chip resistors that can be enabled to allow for de-ghosting of the RGB matrix. By default these resistors are not enabled (`ISSI_SWPULLUP`/`ISSI_CSPULLUP` are given the value of`PUR_0R`), the values that can be set to enable de-ghosting are as follows:
+The IS31FL3736 IC's have on-chip resistors that can be enabled to allow for de-ghosting of the RGB matrix. By default these resistors are not enabled (`IS31FL3736_SWPULLUP`/`IS31FL3736_CSPULLUP` are given the value of `IS31FL3736_PUR_0R`), the values that can be set to enable de-ghosting are as follows:
-| `ISSI_SWPULLUP/ISSI_CSPULLUP` | Description |
+| `IS31FL3736_SWPULLUP/IS31FL3736_CSPULLUP` | Description |
|----------------------|-------------|
-| `PUR_0R` | (default) Do not use the on-chip resistors/enable de-ghosting |
-| `PUR_05KR` | The 0.5k Ohm resistor used during blanking period (t_NOL) |
-| `PUR_1KR` | The 1k Ohm resistor used during blanking period (t_NOL) |
-| `PUR_2KR` | The 2k Ohm resistor used during blanking period (t_NOL) |
-| `PUR_4KR` | The 4k Ohm resistor used during blanking period (t_NOL) |
-| `PUR_8KR` | The 8k Ohm resistor during blanking period (t_NOL) |
-| `PUR_16KR` | The 16k Ohm resistor during blanking period (t_NOL) |
-| `PUR_32KR` | The 32k Ohm resistor used during blanking period (t_NOL) |
+| `IS31FL3736_PUR_0R` | (default) Do not use the on-chip resistors/enable de-ghosting |
+| `IS31FL3736_PUR_05KR` | The 0.5k Ohm resistor used during blanking period (t_NOL) |
+| `IS31FL3736_PUR_1KR` | The 1k Ohm resistor used during blanking period (t_NOL) |
+| `IS31FL3736_PUR_2KR` | The 2k Ohm resistor used during blanking period (t_NOL) |
+| `IS31FL3736_PUR_4KR` | The 4k Ohm resistor used during blanking period (t_NOL) |
+| `IS31FL3736_PUR_8KR` | The 8k Ohm resistor during blanking period (t_NOL) |
+| `IS31FL3736_PUR_16KR` | The 16k Ohm resistor during blanking period (t_NOL) |
+| `IS31FL3736_PUR_32KR` | The 32k Ohm resistor used during blanking period (t_NOL) |
Here is an example using 2 drivers.
@@ -202,16 +204,17 @@ Here is an example using 2 drivers.
// This is a 7-bit address, that gets left-shifted and bit 0
// set to 0 for write, 1 for read (as per I2C protocol)
// The address will vary depending on your wiring:
-// 0000 <-> GND
-// 0101 <-> SCL
-// 1010 <-> SDA
-// 1111 <-> VCC
-// ADDR represents A3:A0 of the 7-bit address.
-// The result is: 0b101(ADDR)
-#define DRIVER_ADDR_1 0b1010000
-#define DRIVER_ADDR_2 0b1010001
+// 00 ADDRn <-> GND
+// 01 ADDRn <-> SCL
+// 10 ADDRn <-> SDA
+// 11 ADDRn <-> VCC
+// ADDR1 represents A1:A0 of the 7-bit address.
+// ADDR2 represents A3:A2 of the 7-bit address.
+// The result is: 0b101(ADDR2)(ADDR1)
+#define DRIVER_ADDR_1 IS31FL3736_I2C_ADDRESS_GND_GND
+#define DRIVER_ADDR_2 IS31FL3736_I2C_ADDRESS_GND_SCL
-#define DRIVER_COUNT 2
+#define IS31FL3736_DRIVER_COUNT 2
#define DRIVER_1_LED_TOTAL 30
#define DRIVER_2_LED_TOTAL 32
#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
@@ -221,7 +224,7 @@ Here is an example using 2 drivers.
Define these arrays listing all the LEDs in your `<keyboard>.c`:
```c
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3736_led_t PROGMEM g_is31fl3736_leds[RGB_MATRIX_LED_COUNT] = {
/* Refer to IS31 manual for these locations
* driver
* | R location
@@ -246,31 +249,31 @@ Configure the hardware via your `config.h`:
| Variable | Description | Default |
|----------|-------------|---------|
-| `ISSI_TIMEOUT` | (Optional) How long to wait for i2c messages, in milliseconds | 100 |
-| `ISSI_PERSISTENCE` | (Optional) Retry failed messages this many times | 0 |
-| `ISSI_PWM_FREQUENCY` | (Optional) PWM Frequency Setting - IS31FL3737B only | 0 |
-| `ISSI_GLOBALCURRENT` | (Optional) Configuration for the Global Current Register | 0xFF |
-| `ISSI_SWPULLUP` | (Optional) Set the value of the SWx lines on-chip de-ghosting resistors | PUR_0R (Disabled) |
-| `ISSI_CSPULLUP` | (Optional) Set the value of the CSx lines on-chip de-ghosting resistors | PUR_0R (Disabled) |
-| `DRIVER_COUNT` | (Required) How many RGB driver IC's are present | |
+| `IS31FL3737_I2C_TIMEOUT` | (Optional) How long to wait for i2c messages, in milliseconds | 100 |
+| `IS31FL3737_I2C_PERSISTENCE` | (Optional) Retry failed messages this many times | 0 |
+| `IS31FL3737_PWM_FREQUENCY` | (Optional) PWM Frequency Setting - IS31FL3737B only | 0 |
+| `IS31FL3737_GLOBALCURRENT` | (Optional) Configuration for the Global Current Register | 0xFF |
+| `IS31FL3737_SWPULLUP` | (Optional) Set the value of the SWx lines on-chip de-ghosting resistors | PUR_0R (Disabled) |
+| `IS31FL3737_CSPULLUP` | (Optional) Set the value of the CSx lines on-chip de-ghosting resistors | PUR_0R (Disabled) |
+| `IS31FL3737_DRIVER_COUNT` | (Required) How many RGB driver IC's are present | |
| `RGB_MATRIX_LED_COUNT` | (Required) How many RGB lights are present across all drivers | |
| `DRIVER_ADDR_1` | (Required) Address for the first RGB driver | |
| `DRIVER_ADDR_2` | (Optional) Address for the second RGB driver | |
| `DRIVER_ADDR_3` | (Optional) Address for the third RGB driver | |
| `DRIVER_ADDR_4` | (Optional) Address for the fourth RGB driver | |
-The IS31FL3737 IC's have on-chip resistors that can be enabled to allow for de-ghosting of the RGB matrix. By default these resistors are not enabled (`ISSI_SWPULLUP`/`ISSI_CSPULLUP` are given the value of`PUR_0R`), the values that can be set to enable de-ghosting are as follows:
+The IS31FL3737 IC's have on-chip resistors that can be enabled to allow for de-ghosting of the RGB matrix. By default these resistors are not enabled (`IS31FL3737_SWPULLUP`/`IS31FL3737_CSPULLUP` are given the value of `IS31FL3737_PUR_0R`), the values that can be set to enable de-ghosting are as follows:
-| `ISSI_SWPULLUP/ISSI_CSPULLUP` | Description |
+| `IS31FL3737_SWPULLUP/IS31FL3737_CSPULLUP` | Description |
|----------------------|-------------|
-| `PUR_0R` | (default) Do not use the on-chip resistors/enable de-ghosting |
-| `PUR_05KR` | The 0.5k Ohm resistor used during blanking period (t_NOL) |
-| `PUR_1KR` | The 1k Ohm resistor used during blanking period (t_NOL) |
-| `PUR_2KR` | The 2k Ohm resistor used during blanking period (t_NOL) |
-| `PUR_4KR` | The 4k Ohm resistor used during blanking period (t_NOL) |
-| `PUR_8KR` | The 8k Ohm resistor during blanking period (t_NOL) |
-| `PUR_16KR` | The 16k Ohm resistor during blanking period (t_NOL) |
-| `PUR_32KR` | The 32k Ohm resistor used during blanking period (t_NOL) |
+| `IS31FL3737_PUR_0R` | (default) Do not use the on-chip resistors/enable de-ghosting |
+| `IS31FL3737_PUR_05KR` | The 0.5k Ohm resistor used during blanking period (t_NOL) |
+| `IS31FL3737_PUR_1KR` | The 1k Ohm resistor used during blanking period (t_NOL) |
+| `IS31FL3737_PUR_2KR` | The 2k Ohm resistor used during blanking period (t_NOL) |
+| `IS31FL3737_PUR_4KR` | The 4k Ohm resistor used during blanking period (t_NOL) |
+| `IS31FL3737_PUR_8KR` | The 8k Ohm resistor during blanking period (t_NOL) |
+| `IS31FL3737_PUR_16KR` | The 16k Ohm resistor during blanking period (t_NOL) |
+| `IS31FL3737_PUR_32KR` | The 32k Ohm resistor used during blanking period (t_NOL) |
Here is an example using 2 drivers.
@@ -278,16 +281,16 @@ Here is an example using 2 drivers.
// This is a 7-bit address, that gets left-shifted and bit 0
// set to 0 for write, 1 for read (as per I2C protocol)
// The address will vary depending on your wiring:
-// 0000 <-> GND
-// 0101 <-> SCL
-// 1010 <-> SDA
-// 1111 <-> VCC
+// 0000 ADDR <-> GND
+// 0101 ADDR <-> SCL
+// 1010 ADDR <-> SDA
+// 1111 ADDR <-> VCC
// ADDR represents A3:A0 of the 7-bit address.
// The result is: 0b101(ADDR)
-#define DRIVER_ADDR_1 0b1010000
-#define DRIVER_ADDR_2 0b1010001
+#define DRIVER_ADDR_1 IS31FL3737_I2C_ADDRESS_GND
+#define DRIVER_ADDR_2 IS31FL3737_I2C_ADDRESS_SCL
-#define DRIVER_COUNT 2
+#define IS31FL3737_DRIVER_COUNT 2
#define DRIVER_1_LED_TOTAL 30
#define DRIVER_2_LED_TOTAL 36
#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
@@ -297,7 +300,7 @@ Here is an example using 2 drivers.
Define these arrays listing all the LEDs in your `<keyboard>.c`:
```c
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3737_led_t PROGMEM g_is31fl3737_leds[RGB_MATRIX_LED_COUNT] = {
/* Refer to IS31 manual for these locations
* driver
* | R location
@@ -407,7 +410,7 @@ Then Define the array listing all the LEDs you want to override in your `<keyboa
```c
const is31_led PROGMEM g_is31_scaling[ISSI_MANUAL_SCALING] = {
- * LED Index
+/* LED Index
* | R scaling
* | | G scaling
* | | | B scaling
@@ -465,41 +468,41 @@ Configure the hardware via your `config.h`:
```
---
-### AW20216 :id=aw20216
-There is basic support for addressable RGB matrix lighting with the SPI AW20216 RGB controller. To enable it, add this to your `rules.mk`:
+### AW20216S :id=aw20216s
+There is basic support for addressable RGB matrix lighting with the SPI AW20216S RGB controller. To enable it, add this to your `rules.mk`:
```make
RGB_MATRIX_ENABLE = yes
-RGB_MATRIX_DRIVER = aw20216
+RGB_MATRIX_DRIVER = aw20216s
```
-You can use up to 2 AW20216 IC's. Do not specify `DRIVER_<N>_xxx` defines for IC's that are not present on your keyboard. You can define the following items in `config.h`:
+You can use up to 2 AW20216S IC's. Do not specify `DRIVER_<N>_xxx` defines for IC's that are not present on your keyboard. You can define the following items in `config.h`:
| Variable | Description | Default |
|----------|-------------|---------|
-| `DRIVER_1_CS` | (Required) MCU pin connected to first RGB driver chip select line | B13 |
-| `DRIVER_2_CS` | (Optional) MCU pin connected to second RGB driver chip select line | |
-| `DRIVER_1_EN` | (Required) MCU pin connected to first RGB driver hardware enable line | C13 |
-| `DRIVER_2_EN` | (Optional) MCU pin connected to second RGB driver hardware enable line | |
+| `AW20216S_DRIVER_1_CS` | (Required) MCU pin connected to first RGB driver chip select line | B13 |
+| `AW20216S_DRIVER_2_CS` | (Optional) MCU pin connected to second RGB driver chip select line | |
+| `AW20216S_DRIVER_1_EN` | (Required) MCU pin connected to first RGB driver hardware enable line | C13 |
+| `AW20216S_DRIVER_2_EN` | (Optional) MCU pin connected to second RGB driver hardware enable line | |
| `DRIVER_1_LED_TOTAL` | (Required) How many RGB lights are connected to first RGB driver | |
| `DRIVER_2_LED_TOTAL` | (Optional) How many RGB lights are connected to second RGB driver | |
-| `DRIVER_COUNT` | (Required) How many RGB driver IC's are present | |
+| `AW20216S_DRIVER_COUNT` | (Required) How many RGB driver IC's are present | |
| `RGB_MATRIX_LED_COUNT` | (Required) How many RGB lights are present across all drivers | |
-| `AW_SCALING_MAX` | (Optional) LED current scaling value (0-255, higher values mean LED is brighter at full PWM) | 150 |
-| `AW_GLOBAL_CURRENT_MAX` | (Optional) Driver global current limit (0-255, higher values means the driver may consume more power) | 150 |
-| `AW_SPI_MODE` | (Optional) Mode for SPI communication (0-3, defines polarity and phase of the clock) | 3 |
-| `AW_SPI_DIVISOR` | (Optional) Clock divisor for SPI communication (powers of 2, smaller numbers means faster communication, should not be less than 4) | 4 |
+| `AW20216S_SCALING_MAX` | (Optional) LED current scaling value (0-255, higher values mean LED is brighter at full PWM) | 150 |
+| `AW20216S_GLOBAL_CURRENT_MAX` | (Optional) Driver global current limit (0-255, higher values means the driver may consume more power) | 150 |
+| `AW20216S_SPI_MODE` | (Optional) Mode for SPI communication (0-3, defines polarity and phase of the clock) | 3 |
+| `AW20216S_SPI_DIVISOR` | (Optional) Clock divisor for SPI communication (powers of 2, smaller numbers means faster communication, should not be less than 4) | 4 |
Here is an example using 2 drivers.
```c
-#define DRIVER_1_CS B13
-#define DRIVER_2_CS B14
+#define AW20216S_DRIVER_1_CS B13
+#define AW20216S_DRIVER_2_CS B14
// Hardware enable lines may be connected to the same pin
-#define DRIVER_1_EN C13
-#define DRIVER_2_EN C13
+#define AW20216S_DRIVER_1_EN C13
+#define AW20216S_DRIVER_2_EN C13
-#define DRIVER_COUNT 2
+#define AW20216S_DRIVER_COUNT 2
#define DRIVER_1_LED_TOTAL 66
#define DRIVER_2_LED_TOTAL 32
#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
@@ -510,10 +513,10 @@ Here is an example using 2 drivers.
Define these arrays listing all the LEDs in your `<keyboard>.c`:
```c
-const aw_led PROGMEM g_aw_leds[RGB_MATRIX_LED_COUNT] = {
-/* Each AW20216 channel is controlled by a register at some offset between 0x00
+const aw20216s_led_t PROGMEM g_aw20216s_leds[RGB_MATRIX_LED_COUNT] = {
+/* Each AW20216S channel is controlled by a register at some offset between 0x00
* and 0xD7 inclusive.
- * See drivers/awinic/aw20216.h for the mapping between register offsets and
+ * See drivers/led/aw20216s.h for the mapping between register offsets and
* driver pin locations.
* driver
* | R location
@@ -642,6 +645,7 @@ enum rgb_matrix_effects {
RGB_MATRIX_DUAL_BEACON, // Full gradient spinning around center of keyboard
RGB_MATRIX_RAINBOW_BEACON, // Full tighter gradient spinning around center of keyboard
RGB_MATRIX_RAINBOW_PINWHEELS, // Full dual gradients spinning two halfs of keyboard
+ RGB_MATRIX_FLOWER_BLOOMING, // Full tighter gradient of first half scrolling left to right and second half scrolling right to left
RGB_MATRIX_RAINDROPS, // Randomly changes a single key's hue
RGB_MATRIX_JELLYBEAN_RAINDROPS, // Randomly changes a single key's hue and saturation
RGB_MATRIX_HUE_BREATHING, // Hue shifts up a slight ammount at the same time, then shifts back
@@ -654,12 +658,12 @@ enum rgb_matrix_effects {
RGB_MATRIX_DIGITAL_RAIN, // That famous computer simulation
RGB_MATRIX_SOLID_REACTIVE_SIMPLE, // Pulses keys hit to hue & value then fades value out
RGB_MATRIX_SOLID_REACTIVE, // Static single hue, pulses keys hit to shifted hue then fades to current hue
- RGB_MATRIX_SOLID_REACTIVE_WIDE // Hue & value pulse near a single key hit then fades value out
- RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE // Hue & value pulse near multiple key hits then fades value out
- RGB_MATRIX_SOLID_REACTIVE_CROSS // Hue & value pulse the same column and row of a single key hit then fades value out
- RGB_MATRIX_SOLID_REACTIVE_MULTICROSS // Hue & value pulse the same column and row of multiple key hits then fades value out
- RGB_MATRIX_SOLID_REACTIVE_NEXUS // Hue & value pulse away on the same column and row of a single key hit then fades value out
- RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS // Hue & value pulse away on the same column and row of multiple key hits then fades value out
+ RGB_MATRIX_SOLID_REACTIVE_WIDE, // Hue & value pulse near a single key hit then fades value out
+ RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE, // Hue & value pulse near multiple key hits then fades value out
+ RGB_MATRIX_SOLID_REACTIVE_CROSS, // Hue & value pulse the same column and row of a single key hit then fades value out
+ RGB_MATRIX_SOLID_REACTIVE_MULTICROSS, // Hue & value pulse the same column and row of multiple key hits then fades value out
+ RGB_MATRIX_SOLID_REACTIVE_NEXUS, // Hue & value pulse away on the same column and row of a single key hit then fades value out
+ RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS, // Hue & value pulse away on the same column and row of multiple key hits then fades value out
RGB_MATRIX_SPLASH, // Full gradient & value pulse away from a single key hit then fades value out
RGB_MATRIX_MULTISPLASH, // Full gradient & value pulse away from multiple key hits then fades value out
RGB_MATRIX_SOLID_SPLASH, // Hue & value pulse away from a single key hit then fades value out
@@ -694,6 +698,7 @@ You can enable a single effect by defining `ENABLE_[EFFECT_NAME]` in your `confi
|`#define ENABLE_RGB_MATRIX_DUAL_BEACON` |Enables `RGB_MATRIX_DUAL_BEACON` |
|`#define ENABLE_RGB_MATRIX_RAINBOW_BEACON` |Enables `RGB_MATRIX_RAINBOW_BEACON` |
|`#define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS` |Enables `RGB_MATRIX_RAINBOW_PINWHEELS` |
+|`#define ENABLE_RGB_MATRIX_FLOWER_BLOOMING` |Enables `RGB_MATRIX_FLOWER_BLOOMING` |
|`#define ENABLE_RGB_MATRIX_RAINDROPS` |Enables `RGB_MATRIX_RAINDROPS` |
|`#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS` |Enables `RGB_MATRIX_JELLYBEAN_RAINDROPS` |
|`#define ENABLE_RGB_MATRIX_HUE_BREATHING` |Enables `RGB_MATRIX_HUE_BREATHING` |
@@ -875,6 +880,7 @@ These are defined in [`color.h`](https://github.com/qmk/qmk_firmware/blob/master
#define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_CYCLE_LEFT_RIGHT // Sets the default mode, if none has been set
#define RGB_MATRIX_DEFAULT_HUE 0 // Sets the default hue value, if none has been set
#define RGB_MATRIX_DEFAULT_SAT 255 // Sets the default saturation value, if none has been set
+#define RGB_MATRIX_DEFAULT_ON true // Sets the default enabled state, if none has been set
#define RGB_MATRIX_DEFAULT_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS // Sets the default brightness value, if none has been set
#define RGB_MATRIX_DEFAULT_SPD 127 // Sets the default animation speed, if none has been set
#define RGB_MATRIX_DISABLE_KEYCODES // disables control of rgb matrix by keycodes (must use code functions to control the feature)
diff --git a/docs/feature_rgblight.md b/docs/feature_rgblight.md
index 39b7e6a6f1..2db878eb5f 100644
--- a/docs/feature_rgblight.md
+++ b/docs/feature_rgblight.md
@@ -102,6 +102,7 @@ Your RGB lighting can be configured by placing these `#define`s in your `config.
|`RGBLIGHT_DEFAULT_SAT` |`UINT8_MAX` (255) |The default saturation to use upon clearing the EEPROM |
|`RGBLIGHT_DEFAULT_VAL` |`RGBLIGHT_LIMIT_VAL` |The default value (brightness) to use upon clearing the EEPROM |
|`RGBLIGHT_DEFAULT_SPD` |`0` |The default speed to use upon clearing the EEPROM |
+|`RGBLIGHT_DEFAULT_ON` |`true` |Enable RGB lighting upon clearing the EEPROM |
## Effects and Animations
@@ -370,9 +371,9 @@ If you need to change your RGB lighting in code, for example in a macro to chang
Example:
```c
-sethsv(HSV_WHITE, (LED_TYPE *)&led[0]); // led 0
-sethsv(HSV_RED, (LED_TYPE *)&led[1]); // led 1
-sethsv(HSV_GREEN, (LED_TYPE *)&led[2]); // led 2
+sethsv(HSV_WHITE, (rgb_led_t *)&led[0]); // led 0
+sethsv(HSV_RED, (rgb_led_t *)&led[1]); // led 1
+sethsv(HSV_GREEN, (rgb_led_t *)&led[2]); // led 2
rgblight_set(); // Utility functions do not call rgblight_set() automatically, so they need to be called explicitly.
```
@@ -552,3 +553,33 @@ In addition to setting the Clipping Range, you can use `RGBLIGHT_LED_MAP` togeth
## Hardware Modification
If your keyboard lacks onboard underglow LEDs, you may often be able to solder on an RGB LED strip yourself. You will need to find an unused pin to wire to the data pin of your LED strip. Some keyboards may break out unused pins from the MCU to make soldering easier. The other two pins, VCC and GND, must also be connected to the appropriate power pins.
+
+## Velocikey
+
+Velocikey is a feature that lets you control the speed of lighting effects (like the Rainbow Swirl effect) with the speed of your typing. The faster you type, the faster the lights will go!
+
+### Usage
+For Velocikey to take effect, there are two steps. First, when compiling your keyboard, you'll need to set `VELOCIKEY_ENABLE=yes` in `rules.mk`, e.g.:
+
+```
+MOUSEKEY_ENABLE = no
+STENO_ENABLE = no
+EXTRAKEY_ENABLE = yes
+VELOCIKEY_ENABLE = yes
+```
+
+Then, while using your keyboard, you need to also turn it on with the `VK_TOGG` keycode, which toggles the feature on and off.
+
+The following light effects will all be controlled by Velocikey when it is enabled:
+ - RGB Breathing
+ - RGB Rainbow Mood
+ - RGB Rainbow Swirl
+ - RGB Snake
+ - RGB Knight
+
+Support for LED breathing effects is planned but not available yet.
+
+ As long as Velocikey is enabled, it will control the speed regardless of any other speed setting that your RGB lights are currently on.
+
+ ### Configuration
+ Velocikey doesn't currently support any configuration via keyboard settings. If you want to adjust something like the speed increase or decay rate, you would need to edit `velocikey.c` and adjust the values there to achieve the kinds of speeds that you like.
diff --git a/docs/feature_split_keyboard.md b/docs/feature_split_keyboard.md
index 1705ea9222..c67f04995b 100644
--- a/docs/feature_split_keyboard.md
+++ b/docs/feature_split_keyboard.md
@@ -298,7 +298,7 @@ This enables transmitting the pointing device status to the master side of the s
#define SPLIT_HAPTIC_ENABLE
```
-This enables triggering of haptic feedback on the slave side of the split keyboard. For DRV2605L this will send the mode, but for solenoids it is expected that the desired mode is already set up on the slave.
+This enables the triggering of haptic feedback on the slave side of the split keyboard. This will send information to the slave side such as the mode, dwell, and whether buzz is enabled.
```c
#define SPLIT_ACTIVITY_ENABLE
diff --git a/docs/feature_velocikey.md b/docs/feature_velocikey.md
deleted file mode 100644
index aeb1865e8a..0000000000
--- a/docs/feature_velocikey.md
+++ /dev/null
@@ -1,29 +0,0 @@
-# Velocikey
-
-Velocikey is a feature that lets you control the speed of lighting effects (like the Rainbow Swirl effect) with the speed of your typing. The faster you type, the faster the lights will go!
-
-## Usage
-For Velocikey to take effect, there are two steps. First, when compiling your keyboard, you'll need to set `VELOCIKEY_ENABLE=yes` in `rules.mk`, e.g.:
-
-```
-MOUSEKEY_ENABLE = no
-STENO_ENABLE = no
-EXTRAKEY_ENABLE = yes
-VELOCIKEY_ENABLE = yes
-```
-
-Then, while using your keyboard, you need to also turn it on with the `VK_TOGG` keycode, which toggles the feature on and off.
-
-The following light effects will all be controlled by Velocikey when it is enabled:
- - RGB Breathing
- - RGB Rainbow Mood
- - RGB Rainbow Swirl
- - RGB Snake
- - RGB Knight
-
-Support for LED breathing effects is planned but not available yet.
-
- As long as Velocikey is enabled, it will control the speed regardless of any other speed setting that your RGB lights are currently on.
-
- ## Configuration
- Velocikey doesn't currently support any configuration via keyboard settings. If you want to adjust something like the speed increase or decay rate, you would need to edit `velocikey.c` and adjust the values there to achieve the kinds of speeds that you like.
diff --git a/docs/i2c_driver.md b/docs/i2c_driver.md
index 92b666b5e3..faff0a1d7b 100644
--- a/docs/i2c_driver.md
+++ b/docs/i2c_driver.md
@@ -2,6 +2,18 @@
The I2C Master drivers used in QMK have a set of common functions to allow portability between MCUs.
+## Usage :id=usage
+
+In most cases, the I2C Master driver code is automatically included if you are using a feature or driver which requires it, such as [OLED](feature_oled_driver.md).
+
+However, if you need to use the driver standalone, add the following to your `rules.mk`:
+
+```make
+I2C_DRIVER_REQUIRED = yes
+```
+
+You can then call the I2C API by including `i2c_master.h` in your code.
+
## I2C Addressing :id=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
diff --git a/docs/ja/_summary.md b/docs/ja/_summary.md
index 4d6f2348d5..f26665e614 100644
--- a/docs/ja/_summary.md
+++ b/docs/ja/_summary.md
@@ -112,7 +112,6 @@
* [分割キーボード](ja/feature_split_keyboard.md)
* [速記](ja/feature_stenography.md)
* [感熱式プリンタ](ja/feature_thermal_printer.md)
- * [Velocikey](ja/feature_velocikey.md)
* QMK の開発
* [PR チェックリスト](ja/pr_checklist.md)
diff --git a/docs/ja/feature_velocikey.md b/docs/ja/feature_velocikey.md
deleted file mode 100644
index b13969a195..0000000000
--- a/docs/ja/feature_velocikey.md
+++ /dev/null
@@ -1,34 +0,0 @@
-# Velocikey
-
-<!---
- original document: 0.8.147:docs/feature_velocikey.md
- git diff 0.8.147 HEAD -- docs/feature_velocikey.md | cat
--->
-
-Velocikey は入力の速度を使って(レインボー渦巻効果のような)ライト効果の速度を制御できる機能です。速く入力すればするほどライトが速くなります!
-
-## 使用法
-Velocikey を使うためには、2つのステップがあります。最初に、キーボードをコンパイルする時に、`rules.mk` に `VELOCIKEY_ENABLE=yes` を設定する必要があります。例えば:
-
-```
-MOUSEKEY_ENABLE = no
-STENO_ENABLE = no
-EXTRAKEY_ENABLE = yes
-VELOCIKEY_ENABLE = yes
-```
-
-次に、キーボードの使用中に、VLK_TOG キーコードを使って Velocikey を有効にする必要もあります。これは機能をオンおよびオフにします。
-
-以下の全てのライト効果が、Velocikey を有効にすることで制御されます:
-- RGB 明滅動作
-- RGB レインボームード
-- RGB レインボー渦巻
-- RGB スネーク
-- RGB ナイト
-
-LED 明滅動作の効果のサポートは計画されていますがまだ利用できません。
-
-Velocikey が有効になっている限り、現在オンになっている RGB ライトの他の全ての速度設定に関係なく、速度が制御されます。
-
-## 設定
-Velocikey は現在のところキーボード設定を介したどのような設定もサポートしません。速度の増加あるいは減少率などを調整したい場合は、`velocikey.c` を編集し、そこで値を調整して、好みの速度を実現する必要があります。
diff --git a/docs/quantum_painter.md b/docs/quantum_painter.md
index 5e399183f8..8acf6aeb36 100644
--- a/docs/quantum_painter.md
+++ b/docs/quantum_painter.md
@@ -857,13 +857,52 @@ void keyboard_post_init_kb(void) {
<!-- tabs:start -->
-#### ** Get Geometry **
+#### ** Gettters **
+
+These functions allow external code to retrieve the current width, height, rotation, and drawing offsets.
+
+<!-- tabs:start -->
+
+#### ** Width **
+
+```c
+uint16_t qp_get_width(painter_device_t device);
+```
+
+#### ** Height **
+
+```c
+uint16_t qp_get_height(painter_device_t device);
+```
+
+#### ** Rotation **
+
+```c
+painter_rotation_t qp_get_rotation(painter_device_t device);
+```
+
+#### ** Offset X **
+
+```c
+uint16_t qp_get_offset_x(painter_device_t device);
+```
+
+#### ** Offset Y **
+
+```c
+uint16_t qp_get_offset_y(painter_device_t device);
+```
+
+##### ** Everything **
+
+Convenience function to call all the previous ones at once.
+Note: You can pass `NULL` for the values you are not interested in.
```c
void qp_get_geometry(painter_device_t device, uint16_t *width, uint16_t *height, painter_rotation_t *rotation, uint16_t *offset_x, uint16_t *offset_y);
```
-The `qp_get_geometry` function allows external code to retrieve the current width, height, rotation, and drawing offsets.
+<!-- tabs:end -->
#### ** Set Viewport Offsets **
diff --git a/docs/quantum_painter_lvgl.md b/docs/quantum_painter_lvgl.md
index 4d10160baf..b4f31ad4af 100644
--- a/docs/quantum_painter_lvgl.md
+++ b/docs/quantum_painter_lvgl.md
@@ -53,3 +53,11 @@ The `qp_lvgl_detach` function stops the internal LVGL ticks and releases resourc
## Enabling/Disabling LVGL features :id=lvgl-configuring
You can overwrite LVGL specific features in your `lv_conf.h` file.
+
+## Changing the LVGL task frequency
+
+When LVGL is running, your keyboard's responsiveness may decrease, causing missing keystrokes or encoder rotations, especially during the animation of dynamically-generated content. This occurs because LVGL operates as a scheduled task with a default task rate of five milliseconds. While a fast task rate is advantageous when LVGL is responsible for detecting and processing inputs, it can lead to excessive recalculations of displayed content, which may slow down QMK's matrix scanning. If you rely on QMK instead of LVGL for processing inputs, it can be beneficial to increase the time between calls to the LVGL task handler to better match your preferred display update rate. To do this, add this to your `config.h`:
+
+```c
+#define QP_LVGL_TASK_PERIOD 40
+```
diff --git a/docs/reference_info_json.md b/docs/reference_info_json.md
index 91581afc73..e05b09c6cd 100644
--- a/docs/reference_info_json.md
+++ b/docs/reference_info_json.md
@@ -88,7 +88,7 @@ You can create `info.json` files at every level under `qmk_firmware/keyboards/<k
## APA102 :id=apa102
-Configures the APA102 driver.
+Configures the [APA102](apa102_driver.md) driver.
* `apa102`
* `clock_pin` (Required)
@@ -202,6 +202,13 @@ Configures the [EEPROM](eeprom_driver.md) driver.
* `driver`
* The EEPROM backend to use. Must be one of `custom`, `i2c`, `legacy_stm32_flash`, `spi`, `transient`, `vendor`, `wear_leveling`.
* Default: `"vendor"`
+ * `wear_leveling`
+ * `driver`
+ * The driver to use. Must be one of `embedded_flash`, `legacy`, `rp2040_flash`, `spi_flash`, `custom`.
+ * `backing_size`
+ * Number of bytes used by the wear-leveling algorithm for its underlying storage, and needs to be a multiple of the logical size.
+ * `logical_size`
+ * Number of bytes “exposed” to the rest of QMK and denotes the size of the usable EEPROM.
## Encoder :id=encoder
@@ -322,7 +329,7 @@ Configures the [LED Matrix](feature_led_matrix.md) feature.
* The centroid (geometric center) of the LEDs. Used for certain effects.
* Default: `[112, 32]`
* `driver` (Required)
- * The driver to use. Must be one of `ckled2001`, `custom`, `is31fl3731`, `is31fl3742a`, `is31fl3743a`, `is31fl3745`, `is31fl3746a`.
+ * The driver to use. Must be one of `custom`, `is31fl3218`, `is31fl3731`, `is31fl3733`, `is31fl3736`, `is31fl3737`, `is31fl3741`, `is31fl3742a`, `is31fl3743a`, `is31fl3745`, `is31fl3746a`, `snled27351`.
* `layout` (Required)
* List of LED configuration dictionaries. Each dictionary contains:
* `flags` (Required)
@@ -335,9 +342,21 @@ Configures the [LED Matrix](feature_led_matrix.md) feature.
* The key matrix position associated with the LED.
* Example: `[0, 2]`
* Example: `{"matrix": [2, 1], "x": 20, "y": 48, "flags": 2}`
+ * `led_flush_limit`
+ * Limits in milliseconds how frequently an animation will update the LEDs.
+ * Default: `16`
+ * `led_process_limit`
+ * Limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness).
+ * Default: `led_count / 5`
* `max_brightness`
* The maximum value which brightness is scaled to, from 0 to 255.
* Default: `255`
+ * `react_on_keyup`
+ * Animations react to keyup instead of keydown.
+ * Default: `false`
+ * `sleep`
+ * Turn off the LEDs when the host goes to sleep.
+ * Default: `false`
* `speed_steps`
* The number of speed adjustment steps.
* Default: `16`
@@ -523,7 +542,7 @@ Configures the [RGB Matrix](feature_rgb_matrix.md) feature.
* The centroid (geometric center) of the LEDs. Used for certain effects.
* Default: `[112, 32]`
* `driver` (Required)
- * The driver to use. Must be one of `aw20216`, `ckled2001`, `custom`, `is31fl3731`, `is31fl3733`, `is31fl3736`, `is31fl3737`, `is31fl3741`, `is31fl3742a`, `is31fl3743a`, `is31fl3745`, `is31fl3746a`, `ws2812`.
+ * The driver to use. Must be one of `aw20216s`, `custom`, `is31fl3218`, `is31fl3731`, `is31fl3733`, `is31fl3736`, `is31fl3737`, `is31fl3741`, `is31fl3742a`, `is31fl3743a`, `is31fl3745`, `is31fl3746a`, `snled27351`, `ws2812`.
* `hue_steps`
* The number of hue adjustment steps.
* Default: `8`
@@ -539,12 +558,24 @@ Configures the [RGB Matrix](feature_rgb_matrix.md) feature.
* The key matrix position associated with the LED.
* Example: `[0, 2]`
* Example: `{"matrix": [2, 1], "x": 20, "y": 48, "flags": 2}`
+ * `led_flush_limit`
+ * Limits in milliseconds how frequently an animation will update the LEDs.
+ * Default: `16`
+ * `led_process_limit`
+ * Limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness).
+ * Default: `led_count / 5`
* `max_brightness`
* The maximum value which the HSV "V" component is scaled to, from 0 to 255.
* Default: `255`
+ * `react_on_keyup`
+ * Animations react to keyup instead of keydown.
+ * Default: `false`
* `sat_steps`
* The number of saturation adjustment steps.
* Default: `16`
+ * `sleep`
+ * Turn off the LEDs when the host goes to sleep.
+ * Default: `false`
* `speed_steps`
* The number of speed adjustment steps.
* Default: `16`
@@ -602,12 +633,37 @@ Configures the [Split Keyboard](feature_split_keyboard.md) feature.
* `transport`
* `protocol`
* The split transport protocol to use. Must be one of `custom`, `i2c`, `serial`, `serial_usart`.
- * `sync_matrix_state`
- * Mirror the main/primary half's matrix state to the secondary half.
- * Default: `false`
- * `sync_modifiers`
- * Mirror the modifier state to the secondary half.
- * Default: `false`
+ * `sync`
+ * `activity`
+ * Mirror the activity timestamps to the secondary half.
+ * Default: `false`
+ * `detected_os`
+ * Mirror the [detected OS](feature_os_detection.md) to the secondary half.
+ * Default: `false`
+ * `haptic`
+ * Mirror the haptic state and process haptic feedback to the secondary half.
+ * Default: `false`
+ * `layer_state`
+ * Mirror the layer state to the secondary half.
+ * Default: `false`
+ * `indicators`
+ * Mirror the indicator state to the secondary half.
+ * Default: `false`
+ * `matrix_state`
+ * Mirror the main/primary half's matrix state to the secondary half.
+ * Default: `false`
+ * `modifiers`
+ * Mirror the modifier state to the secondary half.
+ * Default: `false`
+ * `oled`
+ * Mirror the OLED on/off status to the secondary half.
+ * Default: `false`
+ * `st7565`
+ * Mirror the ST7565 on/off status to the secondary half.
+ * Default: `false`
+ * `wpm`
+ * Mirror the current WPM value to the secondary half.
+ * Default: `false`
* `watchdog`
* Reboot the secondary half if it loses connection.
* Default: `false`
diff --git a/docs/spi_driver.md b/docs/spi_driver.md
index c1c6831e73..569a19f1db 100644
--- a/docs/spi_driver.md
+++ b/docs/spi_driver.md
@@ -2,6 +2,18 @@
The SPI Master drivers used in QMK have a set of common functions to allow portability between MCUs.
+## Usage :id=usage
+
+In most cases, the SPI Master driver code is automatically included if you are using a feature or driver which requires it, such as [OLED](feature_oled_driver.md).
+
+However, if you need to use the driver standalone, add the following to your `rules.mk`:
+
+```make
+SPI_DRIVER_REQUIRED = yes
+```
+
+You can then call the SPI API by including `spi_master.h` in your code.
+
## AVR Configuration :id=avr-configuration
No special setup is required - just connect the `SS`, `SCK`, `MOSI` and `MISO` pins of your SPI devices to the matching pins on the MCU:
@@ -49,6 +61,11 @@ Configuration-wise, you'll need to set up the peripheral as per your MCU's datas
As per the AVR configuration, you may choose any other standard GPIO as a slave select pin, which should be supplied to `spi_start()`.
+If a complete SPI interface is not required, then the following can be done to disable certain SPI pins, so they don't occupy a GPIO unnecessarily:
+ - in `config.h`: `#define SPI_MISO_PIN NO_PIN`
+ - in `config.h`: `#define SPI_MOSI_PIN NO_PIN`
+ - in `mcuconf.h`: `#define SPI_SELECT_MODE SPI_SELECT_MODE_NONE`, in this case the `slavePin` argument passed to `spi_start()` may be `NO_PIN` if the slave select pin is not used.
+
## API :id=api
### `void spi_init(void)` :id=api-spi-init
diff --git a/docs/squeezing_avr.md b/docs/squeezing_avr.md
index b437901bdb..af015b4b18 100644
--- a/docs/squeezing_avr.md
+++ b/docs/squeezing_avr.md
@@ -168,6 +168,7 @@ For RGB Matrix, these need to be explicitly enabled as well. To disable any that
#undef ENABLE_RGB_MATRIX_DUAL_BEACON
#undef ENABLE_RGB_MATRIX_RAINBOW_BEACON
#undef ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS
+#undef ENABLE_RGB_MATRIX_FLOWER_BLOOMING
#undef ENABLE_RGB_MATRIX_RAINDROPS
#undef ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
#undef ENABLE_RGB_MATRIX_HUE_BREATHING
diff --git a/docs/uart_driver.md b/docs/uart_driver.md
index a44f2c28d9..a88278d543 100644
--- a/docs/uart_driver.md
+++ b/docs/uart_driver.md
@@ -4,6 +4,18 @@ The UART drivers used in QMK have a set of common functions to allow portability
Currently, this driver does not support enabling hardware flow control (the `RTS` and `CTS` pins) if available, but may do so in future.
+## Usage :id=usage
+
+In most cases, the UART driver code is automatically included if you are using a feature or driver which requires it.
+
+However, if you need to use the driver standalone, add the following to your `rules.mk`:
+
+```make
+UART_DRIVER_REQUIRED = yes
+```
+
+You can then call the UART API by including `uart.h` in your code.
+
## AVR Configuration :id=avr-configuration
No special setup is required - just connect the `RX` and `TX` pins of your UART device to the opposite pins on the MCU:
diff --git a/docs/unit_testing.md b/docs/unit_testing.md
index 47a1055796..60787fdffc 100644
--- a/docs/unit_testing.md
+++ b/docs/unit_testing.md
@@ -36,7 +36,9 @@ Note how there's several different tests, each mocking out a separate part. Also
## Running the Tests
-To run all the tests in the codebase, type `make test:all`. You can also run test matching a substring by typing `make test:matchingsubstring` Note that the tests are always compiled with the native compiler of your platform, so they are also run like any other program on your computer.
+To run all the tests in the codebase, type `make test:all`. You can also run test matching a substring by typing `make test:matchingsubstring`. `matchingsubstring` can contain colons to be more specific; `make test:tap_hold_configurations` will run the `tap_hold_configurations` tests for all features while `make test:retro_shift:tap_hold_configurations` will run the `tap_hold_configurations` tests for only the Retro Shift feature.
+
+Note that the tests are always compiled with the native compiler of your platform, so they are also run like any other program on your computer.
## Debugging the Tests
diff --git a/docs/ws2812_driver.md b/docs/ws2812_driver.md
index f8cad20ce0..244d39dbe0 100644
--- a/docs/ws2812_driver.md
+++ b/docs/ws2812_driver.md
@@ -1,189 +1,229 @@
-# WS2812 Driver
-This driver powers the [RGB Lighting](feature_rgblight.md) and [RGB Matrix](feature_rgb_matrix.md) features.
+# WS2812 Driver :id=ws2812-driver
-Currently QMK supports the following addressable LEDs (however, the white LED in RGBW variants is not supported):
+This driver provides support for WorldSemi addressable RGB(W) LEDs, and compatible equivalents:
- WS2811, WS2812, WS2812B, WS2812C, etc.
- SK6812, SK6812MINI, SK6805
+ * WS2811, WS2812, WS2812B, WS2812C, etc.
+ * SK6812, SK6812MINI, SK6805
-These LEDs are called "addressable" because instead of using a wire per color, each LED contains a small microchip that understands a special protocol sent over a single wire. The chip passes on the remaining data to the next LED, allowing them to be chained together. In this way, you can easily control the color of the individual LEDs.
+These LEDs are often called "addressable" because instead of using a wire per color (and per LED), each LED contains a small microchip that understands a special protocol sent over a single wire.
+The LEDs can be chained together, and the remaining data is passed on to the next. In this way, you can easily control the color of many LEDs using a single GPIO.
-## Supported Driver Types
+## Usage :id=usage
-| | AVR | ARM |
-| -------- | ------------------ | ------------------ |
-| bit bang | :heavy_check_mark: | :heavy_check_mark: |
-| I2C | :heavy_check_mark: | |
-| SPI | | :heavy_check_mark: |
-| PWM | | :heavy_check_mark: |
-| PIO | | :heavy_check_mark: |
+In most cases, the WS2812 driver code is automatically included if you are using either the [RGBLight](feature_rgblight.md) or [RGB Matrix](feature_rgb_matrix.md) feature with the `ws2812` driver set, and you would use those APIs instead.
-## Driver configuration
+However, if you need to use the driver standalone, add the following to your `rules.mk`:
-### All drivers
+```make
+WS2812_DRIVER_REQUIRED = yes
+```
+
+You can then call the WS2812 API by including `ws2812.h` in your code.
+
+## Basic Configuration :id=basic-configuration
+
+Add the following to your `config.h`:
+
+|Define |Default |Description |
+|-------------------|-----------------------|------------------------------------------------------------------------------------------------|
+|`WS2812_DI_PIN` |*Not defined* |The GPIO pin connected to the DI pin of the first LED in the chain |
+|`WS2812_LED_COUNT` |*Not defined* |Number of LEDs in the WS2812 chain - automatically set when RGBLight or RGB Matrix is configured|
+|`WS2812_TIMING` |`1250` |The total length of a bit (TH+TL) in nanoseconds |
+|`WS2812_T1H` |`900` |The length of a "1" bit's high phase in nanoseconds |
+|`WS2812_T0H` |`350` |The length of a "0" bit's high phase in nanoseconds |
+|`WS2812_TRST_US` |`280` |The length of the reset phase in microseconds |
+|`WS2812_BYTE_ORDER`|`WS2812_BYTE_ORDER_GRB`|The byte order of the RGB data |
+
+### Timing Adjustment :id=timing-adjustment
-Different versions of the addressable LEDs have differing requirements for the T<sub>RST</sub> period between frames.
-The default setting is 280 µs, which should work for most cases, but this can be overridden in your config.h. e.g.:
+The WS2812 LED communication protocol works by encoding a "1" bit with a long high pulse (T<sub>1</sub>H), and a "0" bit with a shorter pulse (T<sub>0</sub>H). The total cycle length of a bit is the same.
+The "reset" pulse (T<sub>RST</sub>) latches the sent RGB data to all of the LEDs and denotes a completed "frame".
+
+Some WS2812 variants have slightly different timing parameter requirements, which can be accounted for if necessary using the above `#define`s in your `config.h`.
+
+### Byte Order :id=byte-order
+
+Some WS2812 variants may have their color components in a different physical or logical order. For example, the WS2812B-2020 has physically swapped red and green LEDs, which causes the wrong color to be displayed, because the default order of the bytes sent over the wire is defined as GRB.
+If you find your LED colors are consistently swapped, you may need to change the byte order by adding the following to your `config.h`:
```c
-#define WS2812_TRST_US 80
+#define WS2812_BYTE_ORDER WS2812_BYTE_ORDER_GRB
```
-#### Byte Order
+Where the byte order may be one of:
+
+|Byte Order|Known Devices |
+|----------|----------------------------|
+|`GRB` |Most WS2812s, SK6812, SK6805|
+|`RGB` |WS2812B-2020 |
+|`BGR` |TM1812 |
-Some variants of the WS2812 may have their color components in a different physical or logical order. For example, the WS2812B-2020 has physically swapped red and green LEDs, which causes the wrong color to be displayed, because the default order of the bytes sent over the wire is defined as GRB.
-In this case, you can change the byte order by defining `WS2812_BYTE_ORDER` as one of the following values:
+## Driver Configuration :id=driver-configuration
-| Byte order | Known devices |
-| --------------------------------- | ----------------------------- |
-| `WS2812_BYTE_ORDER_GRB` (default) | Most WS2812's, SK6812, SK6805 |
-| `WS2812_BYTE_ORDER_RGB` | WS2812B-2020 |
-| `WS2812_BYTE_ORDER_BGR` | TM1812 |
+Driver selection can be configured in `rules.mk` as `WS2812_DRIVER`, or in `info.json` as `ws2812.driver`. Valid values are `bitbang` (default), `i2c`, `spi`, `pwm`, `vendor`, or `custom`. See below for information on individual drivers.
+### Bitbang Driver :id=bitbang-driver
-### Bitbang
-Default driver, the absence of configuration assumes this driver. To configure it, add this to your rules.mk:
+This is the default WS2812 driver. It operates by "bit-banging" ie. directly toggling the GPIO.
+
+Please note that on AVR devices, due to the tight timing requirements longer chains and/or heavy CPU loads may cause visible lag. Unfortunately this driver is usually the only option for AVR.
```make
WS2812_DRIVER = bitbang
```
-!> This driver is not hardware accelerated and may not be performant on heavily loaded systems.
+### I2C Driver :id=i2c-driver
+
+A specialized driver mainly used for PS2AVRGB (Bootmapper Client) boards, which possess an ATtiny85 that handles the WS2812 LEDs.
+
+```make
+WS2812_DRIVER = i2c
+```
+
+The following `#define`s apply only to the `i2c` driver:
-#### Adjusting bit timings
+|Define |Default|Description |
+|--------------------|-------|---------------------------------|
+|`WS2812_I2C_ADDRESS`|`0xB0` |The I2C address of the ATtiny85. |
+|`WS2812_I2C_TIMEOUT`|`100` |The I2C timeout, in milliseconds.|
-The WS2812 LED communication topology depends on a serialized timed window. Different versions of the addressable LEDs have differing requirements for the timing parameters, for instance, of the SK6812.
-You can tune these parameters through the definition of the following macros:
+### PIO Driver :id=pio-driver
-| Macro | Default | AVR | ARM |
-| --------------- | ---------------------------- | ------------------ | ------------------ |
-| `WS2812_TIMING` | `1250` | :heavy_check_mark: | :heavy_check_mark: |
-| `WS2812_T0H` | `350` | :heavy_check_mark: | :heavy_check_mark: |
-| `WS2812_T0L` | `WS2812_TIMING - WS2812_T0H` | | :heavy_check_mark: |
-| `WS2812_T1H` | `900` | :heavy_check_mark: | :heavy_check_mark: |
-| `WS2812_T1L` | `WS2812_TIMING - WS2812_T1H` | | :heavy_check_mark: |
+This driver is RP2040-only, and leverages the onboard PIO (programmable I/O) system and DMA to offload processing from the CPU.
-### I2C
-Targeting boards where WS2812 support is offloaded to a 2nd MCU. Currently the driver is limited to AVR given the known consumers are ps2avrGB/BMC. To configure it, add this to your rules.mk:
+The WS2812 PIO program uses one state machine, six instructions and one DMA interrupt handler callback. Due to the implementation the time resolution for this driver is 50 ns - any value not specified in this interval will be rounded to the next matching interval.
```make
-WS2812_DRIVER = i2c
+WS2812_DRIVER = vendor
```
-Configure the hardware via your config.h:
-```c
-#define WS2812_I2C_ADDRESS 0xB0 // default: 0xB0
-#define WS2812_I2C_TIMEOUT 100 // default: 100
+### PWM Driver :id=pwm-driver
+
+This driver is ARM-only, and leverages the onboard PWM peripheral and DMA to offload processing from the CPU.
+
+```make
+WS2812_DRIVER = pwm
```
-### SPI
-Targeting STM32 boards where WS2812 support is offloaded to an SPI hardware device. The advantage is that the use of DMA offloads processing of the WS2812 protocol from the MCU. `WS2812_DI_PIN` for this driver is the configured SPI MOSI pin. Due to the nature of repurposing SPI to drive the LEDs, the other SPI pins, MISO and SCK, **must** remain unused. To configure it, add this to your rules.mk:
+### SPI Driver :id=spi-driver
+
+This driver is ARM-only, and leverages the onboard SPI peripheral and DMA to offload processing from the CPU. The DI pin **must** be connected to the MOSI pin on the MCU, and all other SPI pins **must** be left unused. This is also very dependent on your MCU's SPI peripheral clock speed, and may or may not be possible depending on the MCU selected.
```make
WS2812_DRIVER = spi
```
-Configure the hardware via your config.h:
-```c
-#define WS2812_SPI SPID1 // default: SPID1
-#define WS2812_SPI_MOSI_PAL_MODE 5 // MOSI pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 5
-#define WS2812_SPI_SCK_PIN B3 // Required for F072, may be for others -- SCK pin, see the respective datasheet for the appropriate values for your MCU. default: unspecified
-#define WS2812_SPI_SCK_PAL_MODE 5 // SCK pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 5
-```
+## ChibiOS/ARM Configuration :id=arm-configuration
-You must also turn on the SPI feature in your halconf.h and mcuconf.h
+The following defines apply only to ARM devices:
-#### Circular Buffer Mode
-Some boards may flicker while in the normal buffer mode. To fix this issue, circular buffer mode may be used to rectify the issue.
+|Define |Default |Description |
+|------------|------------------------------|---------------------------------------------------------------------------------|
+|`WS2812_T1L`|`(WS2812_TIMING - WS2812_T1H)`|The length of a "1" bit's low phase in nanoseconds (bitbang and PIO drivers only)|
+|`WS2812_T0L`|`(WS2812_TIMING - WS2812_T0H)`|The length of a "0" bit's low phase in nanoseconds (bitbang and PIO drivers only)|
-By default, the circular buffer mode is disabled.
+### Push-Pull and Open Drain :id=push-pull-open-drain
-To enable this alternative buffer mode, place this into your `config.h` file:
-```c
-#define WS2812_SPI_USE_CIRCULAR_BUFFER
-```
+By default, the GPIO used for data transmission is configured as a *push-pull* output, meaning the pin is effectively always driven either to VCC or to ground.
-#### Setting baudrate with divisor
-To adjust the baudrate at which the SPI peripheral is configured, users will need to derive the target baudrate from the clock tree provided by STM32CubeMX.
+For situations where the logic level voltage is lower than the power supply voltage, however, this can pose an issue. The solution is to configure the pin for *open drain* mode instead, and use a pullup resistor between the DI pin and VCC. In this mode, the MCU can only pull the GPIO *low*, or leave it floating. The pullup resistor is then responsible for pulling the line high, when the MCU is not driving the GPIO.
-Only divisors of 2, 4, 8, 16, 32, 64, 128 and 256 are supported by hardware.
+To configure the DI pin for open drain configuration, add the following to your `config.h`:
-| Define | Default | Description |
-| -------------------- | ------- | ----------------------------------- |
-| `WS2812_SPI_DIVISOR` | `16` | SPI source clock peripheral divisor |
+```c
+#define WS2812_EXTERNAL_PULLUP
+```
-#### Testing Notes
+### SPI Driver :id=arm-spi-driver
-While not an exhaustive list, the following table provides the scenarios that have been partially validated:
+Depending on the ChibiOS board configuration, you may need to enable SPI at the keyboard level. For STM32, this would look like:
-| | SPI1 | SPI2 | SPI3 |
-| ---- | ------------------------------------------- | --------------------------------------- | --------------------- |
-| f072 | ? | B15 :heavy_check_mark: (needs SCK: B13) | N/A |
-| f103 | A7 :heavy_check_mark: | B15 :heavy_check_mark: | N/A |
-| f303 | A7 :heavy_check_mark: B5 :heavy_check_mark: | B15 :heavy_check_mark: | B5 :heavy_check_mark: |
+`halconf.h`:
+```c
+#define HAL_USE_SPI TRUE
+```
+`mcuconf.h`:
+```c
+#undef STM32_SPI_USE_SPI1
+#define STM32_SPI_USE_SPI1 TRUE
+```
-*Other supported ChibiOS boards and/or pins may function, it will be highly chip and configuration dependent.*
+The following `define`s apply only to the `spi` driver:
-### PWM
+|Define |Default |Description |
+|--------------------------------|-------------|-------------------------------------------------------------------------------|
+|`WS2812_SPI_DRIVER` |`SPID1` |The SPI driver to use |
+|`WS2812_SPI_MOSI_PAL_MODE` |`5` |The MOSI pin alternative function to use |
+|`WS2812_SPI_SCK_PIN` |*Not defined*|The SCK pin - required for F072 and possibly others |
+|`WS2812_SPI_SCK_PAL_MODE` |`5` |The SCK pin alternative function to use - required for F072 and possibly others|
+|`WS2812_SPI_DIVISOR` |`16` |The divisor used to adjust the baudrate |
+|`WS2812_SPI_USE_CIRCULAR_BUFFER`|*Not defined*|Enable a circular buffer for improved rendering |
-Targeting STM32 boards where WS2812 support is offloaded to an PWM timer and DMA stream. The advantage is that the use of DMA offloads processing of the WS2812 protocol from the MCU. To configure it, add this to your rules.mk:
+#### Setting the Baudrate :id=arm-spi-baudrate
-```make
-WS2812_DRIVER = pwm
-```
+To adjust the SPI baudrate, you will need to derive the target baudrate from the clock tree provided by STM32CubeMX, and add the following to your `config.h`:
-Configure the hardware via your config.h:
```c
-#define WS2812_PWM_DRIVER PWMD2 // default: PWMD2
-#define WS2812_PWM_CHANNEL 2 // default: 2
-#define WS2812_PWM_PAL_MODE 2 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 2
-//#define WS2812_PWM_COMPLEMENTARY_OUTPUT // Define for a complementary timer output (TIMx_CHyN); omit for a normal timer output (TIMx_CHy).
-#define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA Stream for TIMx_UP, see the respective reference manual for the appropriate values for your MCU.
-#define WS2812_DMA_CHANNEL 2 // DMA Channel for TIMx_UP, see the respective reference manual for the appropriate values for your MCU.
-#define WS2812_DMAMUX_ID STM32_DMAMUX1_TIM2_UP // DMAMUX configuration for TIMx_UP -- only required if your MCU has a DMAMUX peripheral, see the respective reference manual for the appropriate values for your MCU.
+#define WS2812_SPI_DIVISOR 16
```
-Note that using a complementary timer output (TIMx_CHyN) is possible only for advanced-control timers (TIM1, TIM8, TIM20 on STM32), and the `STM32_PWM_USE_ADVANCED` option in mcuconf.h must be set to `TRUE`. Complementary outputs of general-purpose timers are not supported due to ChibiOS limitations.
+Only divisors of 2, 4, 8, 16, 32, 64, 128 and 256 are supported on STM32 devices. Other MCUs may have similar constraints -- check the reference manual for your respective MCU for specifics.
+
+#### Circular Buffer :id=arm-spi-circular-buffer
-You must also turn on the PWM feature in your halconf.h and mcuconf.h
+A circular buffer can be enabled if you experience flickering.
-#### Testing Notes
+To enable the circular buffer, add the following to your `config.h`:
-While not an exhaustive list, the following table provides the scenarios that have been partially validated:
+```c
+#define WS2812_SPI_USE_CIRCULAR_BUFFER
+```
-| | Status |
-| --------- | ------------------ |
-| f072 | ? |
-| f103 | :heavy_check_mark: |
-| f303 | :heavy_check_mark: |
-| f401/f411 | :heavy_check_mark: |
+### PIO Driver :id=arm-pio-driver
-*Other supported ChibiOS boards and/or pins may function, it will be highly chip and configuration dependent.*
+The following `#define`s apply only to the PIO driver:
-### PIO
+|Define |Default |Description |
+|---------------------|-------------|---------------------------------------|
+|`WS2812_PIO_USE_PIO1`|*Not defined*|Use the PIO1 peripheral instead of PIO0|
-Targeting Raspberry Pi RP2040 boards only where WS2812 support is offloaded to an dedicated PIO implementation. This offloads processing of the WS2812 protocol from the MCU to a dedicated PIO program using DMA transfers.
+### PWM Driver :id=arm-pwm-driver
-To configure it, add this to your rules.mk:
+Depending on the ChibiOS board configuration, you may need to enable PWM at the keyboard level. For STM32, this would look like:
-```make
-WS2812_DRIVER = vendor
+`halconf.h`:
+```c
+#define HAL_USE_PWM TRUE
```
-
-Configure the hardware via your config.h:
+`mcuconf.h`:
```c
-#define WS2812_PIO_USE_PIO1 // Force the usage of PIO1 peripheral, by default the WS2812 implementation uses the PIO0 peripheral
+#undef STM32_PWM_USE_TIM2
+#define STM32_PWM_USE_TIM2 TRUE
```
-The WS2812 PIO programm uses 1 state machine, 6 instructions and one DMA interrupt handler callback. Due to the implementation the time resolution for this drivers is 50ns, any value not specified in this interval will be rounded to the next matching interval.
+The following `#define`s apply only to the `pwm` driver:
-### Push Pull and Open Drain Configuration
-The default configuration is a push pull on the defined pin.
-This can be configured for bitbang, PWM and SPI.
+|Define |Default |Description |
+|---------------------------------|--------------------|------------------------------------------------------------------------------------------|
+|`WS2812_PWM_DRIVER` |`PWMD2` |The PWM driver to use |
+|`WS2812_PWM_CHANNEL` |`2` |The PWM channel to use |
+|`WS2812_PWM_PAL_MODE` |`2` |The pin alternative function to use |
+|`WS2812_DMA_STREAM` |`STM32_DMA1_STREAM2`|The DMA Stream for `TIMx_UP` |
+|`WS2812_DMA_CHANNEL` |`2` |The DMA Channel for `TIMx_UP` |
+|`WS2812_DMAMUX_ID` |*Not defined* |The DMAMUX configuration for `TIMx_UP` - only required if your MCU has a DMAMUX peripheral|
+|`WS2812_PWM_COMPLEMENTARY_OUTPUT`|*Not defined* |Whether the PWM output is complementary (`TIMx_CHyN`) |
-Note: This only applies to STM32 boards.
+?> Using a complementary timer output (`TIMx_CHyN`) is possible only for advanced-control timers (1, 8 and 20 on STM32), and the `STM32_PWM_USE_ADVANCED` option in `mcuconf.h` must be set to `TRUE`. Complementary outputs of general-purpose timers are not supported due to ChibiOS limitations.
- To configure the `WS2812_DI_PIN` to open drain configuration add this to your config.h file:
-```c
-#define WS2812_EXTERNAL_PULLUP
-```
+## API :id=api
+
+### `void ws2812_setleds(rgb_led_t *ledarray, uint16_t number_of_leds)` :id=api-ws2812-setleds
+
+Send RGB data to the WS2812 LED chain.
+
+#### Arguments :id=api-ws2812-setleds-arguments
+
+ - `rgb_led_t *ledarray`
+ A pointer to the LED array.
+ - `uint16_t number_of_leds`
+ The length of the LED array.
diff --git a/docs/zh-cn/_summary.md b/docs/zh-cn/_summary.md
index 0fc92e33d3..a076f1a8c6 100644
--- a/docs/zh-cn/_summary.md
+++ b/docs/zh-cn/_summary.md
@@ -121,7 +121,6 @@
* [分体式键盘](zh-cn/feature_split_keyboard.md)
* [速记](zh-cn/feature_stenography.md)
* [热敏打印机](zh-cn/feature_thermal_printer.md)
- * [Velocikey](zh-cn/feature_velocikey.md)
* QMK开发
* [PR Checklist](zh-cn/pr_checklist.md)
diff --git a/drivers/haptic/solenoid.c b/drivers/haptic/solenoid.c
index 4e43903255..da4095cda4 100644
--- a/drivers/haptic/solenoid.c
+++ b/drivers/haptic/solenoid.c
@@ -23,7 +23,6 @@
#include "util.h"
#include <stdlib.h>
-uint8_t solenoid_dwell = SOLENOID_DEFAULT_DWELL;
static pin_t solenoid_pads[] = SOLENOID_PINS;
#define NUMBER_OF_SOLENOIDS ARRAY_SIZE(solenoid_pads)
bool solenoid_on[NUMBER_OF_SOLENOIDS] = {false};
@@ -53,7 +52,7 @@ void solenoid_set_buzz(uint8_t buzz) {
}
void solenoid_set_dwell(uint8_t dwell) {
- solenoid_dwell = dwell;
+ haptic_set_dwell(dwell);
}
/**
@@ -119,7 +118,7 @@ void solenoid_check(void) {
elapsed[i] = timer_elapsed(solenoid_start[i]);
// Check if it's time to finish this solenoid click cycle
- if (elapsed[i] > solenoid_dwell) {
+ if (elapsed[i] > haptic_config.dwell) {
solenoid_stop(i);
continue;
}
diff --git a/drivers/led/apa102.c b/drivers/led/apa102.c
index 766d8cd2eb..527519eb8a 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)
+# if defined(STM32F0XX) || defined(STM32F1XX) || defined(STM32F3XX) || defined(STM32F4XX) || defined(STM32L0XX) || 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
@@ -61,18 +61,18 @@ void static apa102_end_frame(uint16_t num_leds);
void static apa102_send_frame(uint8_t red, uint8_t green, uint8_t blue, uint8_t brightness);
void static apa102_send_byte(uint8_t byte);
-void apa102_setleds(LED_TYPE *start_led, uint16_t num_leds) {
- LED_TYPE *end = start_led + num_leds;
+void apa102_setleds(rgb_led_t *start_led, uint16_t num_leds) {
+ rgb_led_t *end = start_led + num_leds;
apa102_start_frame();
- for (LED_TYPE *led = start_led; led < end; led++) {
+ for (rgb_led_t *led = start_led; led < end; led++) {
apa102_send_frame(led->r, led->g, led->b, apa102_led_brightness);
}
apa102_end_frame(num_leds);
}
// Overwrite the default rgblight_call_driver to use apa102 driver
-void rgblight_call_driver(LED_TYPE *start_led, uint8_t num_leds) {
+void rgblight_call_driver(rgb_led_t *start_led, uint8_t num_leds) {
apa102_setleds(start_led, num_leds);
}
diff --git a/drivers/led/apa102.h b/drivers/led/apa102.h
index 58cf020c1e..cd0a19d445 100644
--- a/drivers/led/apa102.h
+++ b/drivers/led/apa102.h
@@ -37,5 +37,5 @@ extern uint8_t apa102_led_brightness;
* - Set the data-out pin as output
* - Send out the LED data
*/
-void apa102_setleds(LED_TYPE *start_led, uint16_t num_leds);
+void apa102_setleds(rgb_led_t *start_led, uint16_t num_leds);
void apa102_set_brightness(uint8_t brightness);
diff --git a/drivers/led/aw20216.c b/drivers/led/aw20216.c
deleted file mode 100644
index 479643add4..0000000000
--- a/drivers/led/aw20216.c
+++ /dev/null
@@ -1,168 +0,0 @@
-/* Copyright 2021 Jasper Chan
- * 2023 Huckies <https://github.com/Huckies>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General 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 "aw20216.h"
-#include "wait.h"
-#include "spi_master.h"
-
-/* The AW20216 appears to be somewhat similar to the IS31FL743, although quite
- * a few things are different, such as the command byte format and page ordering.
- * The LED addresses start from 0x00 instead of 0x01.
- */
-#define AWINIC_ID 0b1010 << 4
-
-#define AW_PAGE_FUNCTION 0x00 << 1 // PG0, Function registers
-#define AW_PAGE_PWM 0x01 << 1 // PG1, LED PWM control
-#define AW_PAGE_SCALING 0x02 << 1 // PG2, LED current scaling control
-#define AW_PAGE_PATCHOICE 0x03 << 1 // PG3, Pattern choice?
-#define AW_PAGE_PWMSCALING 0x04 << 1 // PG4, LED PWM + Scaling control?
-
-#define AW_WRITE 0
-#define AW_READ 1
-
-#define AW_REG_CONFIGURATION 0x00 // PG0
-#define AW_REG_GLOBALCURRENT 0x01 // PG0
-#define AW_REG_RESET 0x2F // PG0
-#define AW_REG_MIXFUNCTION 0x46 // PG0
-
-// Default value of AW_REG_CONFIGURATION
-// D7:D4 = 1011, SWSEL (SW1~SW12 active)
-// D3 = 0?, reserved (apparently this should be 1 but it doesn't seem to matter)
-// D2:D1 = 00, OSDE (open/short detection enable)
-// D0 = 0, CHIPEN (write 1 to enable LEDs when hardware enable pulled high)
-#define AW_CONFIG_DEFAULT 0b10110000
-#define AW_MIXCR_DEFAULT 0b00000000
-#define AW_RESET_CMD 0xAE
-#define AW_CHIPEN 1
-#define AW_LPEN (0x01 << 1)
-
-#define AW_PWM_REGISTER_COUNT 216
-
-#ifndef AW_SCALING_MAX
-# define AW_SCALING_MAX 150
-#endif
-
-#ifndef AW_GLOBAL_CURRENT_MAX
-# define AW_GLOBAL_CURRENT_MAX 150
-#endif
-
-#ifndef AW_SPI_MODE
-# define AW_SPI_MODE 0
-#endif
-
-#ifndef AW_SPI_DIVISOR
-# define AW_SPI_DIVISOR 4
-#endif
-
-uint8_t g_pwm_buffer[DRIVER_COUNT][AW_PWM_REGISTER_COUNT];
-bool g_pwm_buffer_update_required[DRIVER_COUNT] = {false};
-
-bool aw20216_write(pin_t cs_pin, uint8_t page, uint8_t reg, uint8_t* data, uint8_t len) {
- static uint8_t s_spi_transfer_buffer[2] = {0};
-
- if (!spi_start(cs_pin, false, AW_SPI_MODE, AW_SPI_DIVISOR)) {
- spi_stop();
- return false;
- }
-
- s_spi_transfer_buffer[0] = (AWINIC_ID | page | AW_WRITE);
- s_spi_transfer_buffer[1] = reg;
-
- if (spi_transmit(s_spi_transfer_buffer, 2) != SPI_STATUS_SUCCESS) {
- spi_stop();
- return false;
- }
-
- if (spi_transmit(data, len) != SPI_STATUS_SUCCESS) {
- spi_stop();
- return false;
- }
-
- spi_stop();
- return true;
-}
-
-static inline bool aw20216_write_register(pin_t cs_pin, uint8_t page, uint8_t reg, uint8_t value) {
- // Little wrapper so callers need not care about sending a buffer
- return aw20216_write(cs_pin, page, reg, &value, 1);
-}
-
-void aw20216_soft_reset(pin_t cs_pin) {
- aw20216_write_register(cs_pin, AW_PAGE_FUNCTION, AW_REG_RESET, AW_RESET_CMD);
-}
-
-static void aw20216_init_scaling(pin_t cs_pin) {
- // Set constant current to the max, control brightness with PWM
- for (uint8_t i = 0; i < AW_PWM_REGISTER_COUNT; i++) {
- aw20216_write_register(cs_pin, AW_PAGE_SCALING, i, AW_SCALING_MAX);
- }
-}
-
-static inline void aw20216_init_current_limit(pin_t cs_pin) {
- // Push config
- aw20216_write_register(cs_pin, AW_PAGE_FUNCTION, AW_REG_GLOBALCURRENT, AW_GLOBAL_CURRENT_MAX);
-}
-
-static inline void aw20216_soft_enable(pin_t cs_pin) {
- // Push config
- aw20216_write_register(cs_pin, AW_PAGE_FUNCTION, AW_REG_CONFIGURATION, AW_CONFIG_DEFAULT | AW_CHIPEN);
-}
-
-static inline void aw20216_auto_lowpower(pin_t cs_pin) {
- aw20216_write_register(cs_pin, AW_PAGE_FUNCTION, AW_REG_MIXFUNCTION, AW_MIXCR_DEFAULT | AW_LPEN);
-}
-
-void aw20216_init(pin_t cs_pin, pin_t en_pin) {
- setPinOutput(en_pin);
- writePinHigh(en_pin);
-
- aw20216_soft_reset(cs_pin);
- wait_ms(2);
-
- // Drivers should start with all scaling and PWM registers as off
- aw20216_init_current_limit(cs_pin);
- aw20216_init_scaling(cs_pin);
-
- aw20216_soft_enable(cs_pin);
- aw20216_auto_lowpower(cs_pin);
-}
-
-void aw20216_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) {
- aw_led led;
- memcpy_P(&led, (&g_aw_leds[index]), sizeof(led));
-
- if (g_pwm_buffer[led.driver][led.r] == red && g_pwm_buffer[led.driver][led.g] == green && g_pwm_buffer[led.driver][led.b] == blue) {
- return;
- }
- g_pwm_buffer[led.driver][led.r] = red;
- g_pwm_buffer[led.driver][led.g] = green;
- g_pwm_buffer[led.driver][led.b] = blue;
- g_pwm_buffer_update_required[led.driver] = true;
-}
-
-void aw20216_set_color_all(uint8_t red, uint8_t green, uint8_t blue) {
- for (uint8_t i = 0; i < RGB_MATRIX_LED_COUNT; i++) {
- aw20216_set_color(i, red, green, blue);
- }
-}
-
-void aw20216_update_pwm_buffers(pin_t cs_pin, uint8_t index) {
- if (g_pwm_buffer_update_required[index]) {
- aw20216_write(cs_pin, AW_PAGE_PWM, 0, g_pwm_buffer[index], AW_PWM_REGISTER_COUNT);
- }
- g_pwm_buffer_update_required[index] = false;
-}
diff --git a/drivers/led/aw20216s.c b/drivers/led/aw20216s.c
new file mode 100644
index 0000000000..078a694d30
--- /dev/null
+++ b/drivers/led/aw20216s.c
@@ -0,0 +1,168 @@
+/* Copyright 2021 Jasper Chan
+ * 2023 Huckies <https://github.com/Huckies>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General 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 "aw20216s.h"
+#include "wait.h"
+#include "spi_master.h"
+
+/* The AW20216S appears to be somewhat similar to the IS31FL743, although quite
+ * a few things are different, such as the command byte format and page ordering.
+ * The LED addresses start from 0x00 instead of 0x01.
+ */
+#define AW20216S_ID 0b1010 << 4
+
+#define AW20216S_PAGE_FUNCTION 0x00 << 1 // PG0, Function registers
+#define AW20216S_PAGE_PWM 0x01 << 1 // PG1, LED PWM control
+#define AW20216S_PAGE_SCALING 0x02 << 1 // PG2, LED current scaling control
+#define AW20216S_PAGE_PATCHOICE 0x03 << 1 // PG3, Pattern choice?
+#define AW20216S_PAGE_PWMSCALING 0x04 << 1 // PG4, LED PWM + Scaling control?
+
+#define AW20216S_WRITE 0
+#define AW20216S_READ 1
+
+#define AW20216S_REG_CONFIGURATION 0x00 // PG0
+#define AW20216S_REG_GLOBALCURRENT 0x01 // PG0
+#define AW20216S_REG_RESET 0x2F // PG0
+#define AW20216S_REG_MIXFUNCTION 0x46 // PG0
+
+// Default value of AW20216S_REG_CONFIGURATION
+// D7:D4 = 1011, SWSEL (SW1~SW12 active)
+// D3 = 0?, reserved (apparently this should be 1 but it doesn't seem to matter)
+// D2:D1 = 00, OSDE (open/short detection enable)
+// D0 = 0, CHIPEN (write 1 to enable LEDs when hardware enable pulled high)
+#define AW20216S_CONFIG_DEFAULT 0b10110000
+#define AW20216S_MIXCR_DEFAULT 0b00000000
+#define AW20216S_RESET_CMD 0xAE
+#define AW20216S_CHIPEN 1
+#define AW20216S_LPEN (0x01 << 1)
+
+#define AW20216S_PWM_REGISTER_COUNT 216
+
+#ifndef AW20216S_SCALING_MAX
+# define AW20216S_SCALING_MAX 150
+#endif
+
+#ifndef AW20216S_GLOBAL_CURRENT_MAX
+# define AW20216S_GLOBAL_CURRENT_MAX 150
+#endif
+
+#ifndef AW20216S_SPI_MODE
+# define AW20216S_SPI_MODE 0
+#endif
+
+#ifndef AW20216S_SPI_DIVISOR
+# define AW20216S_SPI_DIVISOR 4
+#endif
+
+uint8_t g_pwm_buffer[AW20216S_DRIVER_COUNT][AW20216S_PWM_REGISTER_COUNT];
+bool g_pwm_buffer_update_required[AW20216S_DRIVER_COUNT] = {false};
+
+bool aw20216s_write(pin_t cs_pin, uint8_t page, uint8_t reg, uint8_t* data, uint8_t len) {
+ static uint8_t s_spi_transfer_buffer[2] = {0};
+
+ if (!spi_start(cs_pin, false, AW20216S_SPI_MODE, AW20216S_SPI_DIVISOR)) {
+ spi_stop();
+ return false;
+ }
+
+ s_spi_transfer_buffer[0] = (AW20216S_ID | page | AW20216S_WRITE);
+ s_spi_transfer_buffer[1] = reg;
+
+ if (spi_transmit(s_spi_transfer_buffer, 2) != SPI_STATUS_SUCCESS) {
+ spi_stop();
+ return false;
+ }
+
+ if (spi_transmit(data, len) != SPI_STATUS_SUCCESS) {
+ spi_stop();
+ return false;
+ }
+
+ spi_stop();
+ return true;
+}
+
+static inline bool aw20216s_write_register(pin_t cs_pin, uint8_t page, uint8_t reg, uint8_t value) {
+ // Little wrapper so callers need not care about sending a buffer
+ return aw20216s_write(cs_pin, page, reg, &value, 1);
+}
+
+void aw20216s_soft_reset(pin_t cs_pin) {
+ aw20216s_write_register(cs_pin, AW20216S_PAGE_FUNCTION, AW20216S_REG_RESET, AW20216S_RESET_CMD);
+}
+
+static void aw20216s_init_scaling(pin_t cs_pin) {
+ // Set constant current to the max, control brightness with PWM
+ for (uint8_t i = 0; i < AW20216S_PWM_REGISTER_COUNT; i++) {
+ aw20216s_write_register(cs_pin, AW20216S_PAGE_SCALING, i, AW20216S_SCALING_MAX);
+ }
+}
+
+static inline void aw20216s_init_current_limit(pin_t cs_pin) {
+ // Push config
+ aw20216s_write_register(cs_pin, AW20216S_PAGE_FUNCTION, AW20216S_REG_GLOBALCURRENT, AW20216S_GLOBAL_CURRENT_MAX);
+}
+
+static inline void aw20216s_soft_enable(pin_t cs_pin) {
+ // Push config
+ aw20216s_write_register(cs_pin, AW20216S_PAGE_FUNCTION, AW20216S_REG_CONFIGURATION, AW20216S_CONFIG_DEFAULT | AW20216S_CHIPEN);
+}
+
+static inline void aw20216s_auto_lowpower(pin_t cs_pin) {
+ aw20216s_write_register(cs_pin, AW20216S_PAGE_FUNCTION, AW20216S_REG_MIXFUNCTION, AW20216S_MIXCR_DEFAULT | AW20216S_LPEN);
+}
+
+void aw20216s_init(pin_t cs_pin, pin_t en_pin) {
+ setPinOutput(en_pin);
+ writePinHigh(en_pin);
+
+ aw20216s_soft_reset(cs_pin);
+ wait_ms(2);
+
+ // Drivers should start with all scaling and PWM registers as off
+ aw20216s_init_current_limit(cs_pin);
+ aw20216s_init_scaling(cs_pin);
+
+ aw20216s_soft_enable(cs_pin);
+ aw20216s_auto_lowpower(cs_pin);
+}
+
+void aw20216s_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) {
+ aw20216s_led_t led;
+ memcpy_P(&led, (&g_aw20216s_leds[index]), sizeof(led));
+
+ if (g_pwm_buffer[led.driver][led.r] == red && g_pwm_buffer[led.driver][led.g] == green && g_pwm_buffer[led.driver][led.b] == blue) {
+ return;
+ }
+ g_pwm_buffer[led.driver][led.r] = red;
+ g_pwm_buffer[led.driver][led.g] = green;
+ g_pwm_buffer[led.driver][led.b] = blue;
+ g_pwm_buffer_update_required[led.driver] = true;
+}
+
+void aw20216s_set_color_all(uint8_t red, uint8_t green, uint8_t blue) {
+ for (uint8_t i = 0; i < RGB_MATRIX_LED_COUNT; i++) {
+ aw20216s_set_color(i, red, green, blue);
+ }
+}
+
+void aw20216s_update_pwm_buffers(pin_t cs_pin, uint8_t index) {
+ if (g_pwm_buffer_update_required[index]) {
+ aw20216s_write(cs_pin, AW20216S_PAGE_PWM, 0, g_pwm_buffer[index], AW20216S_PWM_REGISTER_COUNT);
+ }
+ g_pwm_buffer_update_required[index] = false;
+}
diff --git a/drivers/led/aw20216.h b/drivers/led/aw20216s.h
index e342cb6bac..e8f1e0344f 100644
--- a/drivers/led/aw20216.h
+++ b/drivers/led/aw20216s.h
@@ -21,19 +21,52 @@
#include "progmem.h"
#include "gpio.h"
-typedef struct aw_led {
+// ======== DEPRECATED DEFINES - DO NOT USE ========
+#ifdef DRIVER_COUNT
+# define AW20216S_DRIVER_COUNT DRIVER_COUNT
+#endif
+#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_DRIVER_1_CS DRIVER_1_CS
+#endif
+#ifdef DRIVER_2_CS
+# define AW20216S_DRIVER_2_CS DRIVER_2_CS
+#endif
+#ifdef DRIVER_1_EN
+# define AW20216S_DRIVER_1_EN DRIVER_1_EN
+#endif
+#ifdef DRIVER_2_EN
+# define AW20216S_DRIVER_2_EN DRIVER_2_EN
+#endif
+
+#define aw_led aw20216s_led_t
+#define g_aw_leds g_aw20216s_leds
+// ========
+
+typedef struct aw20216s_led_t {
uint8_t driver : 2;
uint8_t r;
uint8_t g;
uint8_t b;
-} aw_led;
+} aw20216s_led_t;
-extern const aw_led PROGMEM g_aw_leds[RGB_MATRIX_LED_COUNT];
+extern const aw20216s_led_t PROGMEM g_aw20216s_leds[RGB_MATRIX_LED_COUNT];
-void aw20216_init(pin_t cs_pin, pin_t en_pin);
-void aw20216_set_color(int index, uint8_t red, uint8_t green, uint8_t blue);
-void aw20216_set_color_all(uint8_t red, uint8_t green, uint8_t blue);
-void aw20216_update_pwm_buffers(pin_t cs_pin, uint8_t index);
+void aw20216s_init(pin_t cs_pin, pin_t en_pin);
+void aw20216s_set_color(int index, uint8_t red, uint8_t green, uint8_t blue);
+void aw20216s_set_color_all(uint8_t red, uint8_t green, uint8_t blue);
+void aw20216s_update_pwm_buffers(pin_t cs_pin, uint8_t index);
#define CS1_SW1 0x00
#define CS2_SW1 0x01
diff --git a/drivers/led/ckled2001-simple.c b/drivers/led/ckled2001-simple.c
deleted file mode 100644
index c4d4c0a4cc..0000000000
--- a/drivers/led/ckled2001-simple.c
+++ /dev/null
@@ -1,221 +0,0 @@
-/* Copyright 2021 @ Keychron (https://www.keychron.com)
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "ckled2001-simple.h"
-#include "i2c_master.h"
-#include "wait.h"
-
-#ifndef CKLED2001_TIMEOUT
-# define CKLED2001_TIMEOUT 100
-#endif
-
-#ifndef CKLED2001_PERSISTENCE
-# define CKLED2001_PERSISTENCE 0
-#endif
-
-#ifndef PHASE_CHANNEL
-# define PHASE_CHANNEL MSKPHASE_12CHANNEL
-#endif
-
-#ifndef CKLED2001_CURRENT_TUNE
-# define CKLED2001_CURRENT_TUNE \
- { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }
-#endif
-
-// Transfer buffer for TWITransmitData()
-uint8_t g_twi_transfer_buffer[20];
-
-// These buffers match the CKLED2001 PWM registers.
-// The control buffers match the PG0 LED On/Off registers.
-// Storing them like this is optimal for I2C transfers to the registers.
-// We could optimize this and take out the unused registers from these
-// buffers and the transfers in ckled2001_write_pwm_buffer() but it's
-// probably not worth the extra complexity.
-uint8_t g_pwm_buffer[DRIVER_COUNT][192];
-bool g_pwm_buffer_update_required[DRIVER_COUNT] = {false};
-
-uint8_t g_led_control_registers[DRIVER_COUNT][24] = {0};
-bool g_led_control_registers_update_required[DRIVER_COUNT] = {false};
-
-bool ckled2001_write_register(uint8_t addr, uint8_t reg, uint8_t data) {
- // If the transaction fails function returns false.
- g_twi_transfer_buffer[0] = reg;
- g_twi_transfer_buffer[1] = data;
-
-#if CKLED2001_PERSISTENCE > 0
- for (uint8_t i = 0; i < CKLED2001_PERSISTENCE; i++) {
- if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, CKLED2001_TIMEOUT) != 0) {
- return false;
- }
- }
-#else
- if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, CKLED2001_TIMEOUT) != 0) {
- return false;
- }
-#endif
- return true;
-}
-
-bool ckled2001_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer) {
- // Assumes PG1 is already selected.
- // If any of the transactions fails function returns false.
- // Transmit PWM registers in 12 transfers of 16 bytes.
- // g_twi_transfer_buffer[] is 20 bytes
-
- // Iterate over the pwm_buffer contents at 16 byte intervals.
- for (int i = 0; i < 192; i += 16) {
- g_twi_transfer_buffer[0] = i;
- // Copy the data from i to i+15.
- // Device will auto-increment register for data after the first byte
- // Thus this sets registers 0x00-0x0F, 0x10-0x1F, etc. in one transfer.
- for (int j = 0; j < 16; j++) {
- g_twi_transfer_buffer[1 + j] = pwm_buffer[i + j];
- }
-
-#if CKLED2001_PERSISTENCE > 0
- for (uint8_t i = 0; i < CKLED2001_PERSISTENCE; i++) {
- if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, CKLED2001_TIMEOUT) != 0) {
- return false;
- }
- }
-#else
- if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, CKLED2001_TIMEOUT) != 0) {
- return false;
- }
-#endif
- }
- return true;
-}
-
-void ckled2001_init(uint8_t addr) {
- // Select to function page
- ckled2001_write_register(addr, CONFIGURE_CMD_PAGE, FUNCTION_PAGE);
- // Setting LED driver to shutdown mode
- ckled2001_write_register(addr, CONFIGURATION_REG, MSKSW_SHUT_DOWN_MODE);
- // Setting internal channel pulldown/pullup
- ckled2001_write_register(addr, PDU_REG, MSKSET_CA_CB_CHANNEL);
- // Select number of scan phase
- ckled2001_write_register(addr, SCAN_PHASE_REG, PHASE_CHANNEL);
- // Setting PWM Delay Phase
- ckled2001_write_register(addr, SLEW_RATE_CONTROL_MODE1_REG, MSKPWM_DELAY_PHASE_ENABLE);
- // Setting Driving/Sinking Channel Slew Rate
- ckled2001_write_register(addr, SLEW_RATE_CONTROL_MODE2_REG, MSKDRIVING_SINKING_CHHANNEL_SLEWRATE_ENABLE);
- // Setting Iref
- ckled2001_write_register(addr, SOFTWARE_SLEEP_REG, MSKSLEEP_DISABLE);
- // Set LED CONTROL PAGE (Page 0)
- ckled2001_write_register(addr, CONFIGURE_CMD_PAGE, LED_CONTROL_PAGE);
- for (int i = 0; i < LED_CONTROL_ON_OFF_LENGTH; i++) {
- ckled2001_write_register(addr, i, 0x00);
- }
-
- // Set PWM PAGE (Page 1)
- ckled2001_write_register(addr, CONFIGURE_CMD_PAGE, LED_PWM_PAGE);
- for (int i = 0; i < LED_CURRENT_TUNE_LENGTH; i++) {
- ckled2001_write_register(addr, i, 0x00);
- }
-
- // Set CURRENT PAGE (Page 4)
- uint8_t current_tuen_reg_list[LED_CURRENT_TUNE_LENGTH] = CKLED2001_CURRENT_TUNE;
- ckled2001_write_register(addr, CONFIGURE_CMD_PAGE, CURRENT_TUNE_PAGE);
- for (int i = 0; i < LED_CURRENT_TUNE_LENGTH; i++) {
- ckled2001_write_register(addr, i, current_tuen_reg_list[i]);
- }
-
- // Enable LEDs ON/OFF
- ckled2001_write_register(addr, CONFIGURE_CMD_PAGE, LED_CONTROL_PAGE);
- for (int i = 0; i < LED_CONTROL_ON_OFF_LENGTH; i++) {
- ckled2001_write_register(addr, i, 0xFF);
- }
-
- // Select to function page
- ckled2001_write_register(addr, CONFIGURE_CMD_PAGE, FUNCTION_PAGE);
- // Setting LED driver to normal mode
- ckled2001_write_register(addr, CONFIGURATION_REG, MSKSW_NORMAL_MODE);
-}
-
-void ckled2001_set_value(int index, uint8_t value) {
- ckled2001_led led;
- if (index >= 0 && index < LED_MATRIX_LED_COUNT) {
- memcpy_P(&led, (&g_ckled2001_leds[index]), sizeof(led));
-
- if (g_pwm_buffer[led.driver][led.v] == value) {
- return;
- }
- g_pwm_buffer[led.driver][led.v] = value;
- g_pwm_buffer_update_required[led.driver] = true;
- }
-}
-
-void ckled2001_set_value_all(uint8_t value) {
- for (int i = 0; i < LED_MATRIX_LED_COUNT; i++) {
- ckled2001_set_value(i, value);
- }
-}
-
-void ckled2001_set_led_control_register(uint8_t index, bool value) {
- ckled2001_led led;
- memcpy_P(&led, (&g_ckled2001_leds[index]), sizeof(led));
-
- uint8_t control_register = led.v / 8;
- uint8_t bit_value = led.v % 8;
-
- if (value) {
- g_led_control_registers[led.driver][control_register] |= (1 << bit_value);
- } else {
- g_led_control_registers[led.driver][control_register] &= ~(1 << bit_value);
- }
-
- g_led_control_registers_update_required[led.driver] = true;
-}
-
-void ckled2001_update_pwm_buffers(uint8_t addr, uint8_t index) {
- if (g_pwm_buffer_update_required[index]) {
- ckled2001_write_register(addr, CONFIGURE_CMD_PAGE, LED_PWM_PAGE);
-
- // If any of the transactions fail we risk writing dirty PG0,
- // refresh page 0 just in case.
- if (!ckled2001_write_pwm_buffer(addr, g_pwm_buffer[index])) {
- g_led_control_registers_update_required[index] = true;
- }
- }
- g_pwm_buffer_update_required[index] = false;
-}
-
-void ckled2001_update_led_control_registers(uint8_t addr, uint8_t index) {
- if (g_led_control_registers_update_required[index]) {
- ckled2001_write_register(addr, CONFIGURE_CMD_PAGE, LED_CONTROL_PAGE);
- for (int i = 0; i < 24; i++) {
- ckled2001_write_register(addr, i, g_led_control_registers[index][i]);
- }
- }
- g_led_control_registers_update_required[index] = false;
-}
-
-void ckled2001_sw_return_normal(uint8_t addr) {
- // Select to function page
- ckled2001_write_register(addr, CONFIGURE_CMD_PAGE, FUNCTION_PAGE);
- // Setting LED driver to normal mode
- ckled2001_write_register(addr, CONFIGURATION_REG, MSKSW_NORMAL_MODE);
-}
-
-void ckled2001_sw_shutdown(uint8_t addr) {
- // Select to function page
- ckled2001_write_register(addr, CONFIGURE_CMD_PAGE, FUNCTION_PAGE);
- // Setting LED driver to shutdown mode
- ckled2001_write_register(addr, CONFIGURATION_REG, MSKSW_SHUT_DOWN_MODE);
- // Write SW Sleep Register
- ckled2001_write_register(addr, SOFTWARE_SLEEP_REG, MSKSLEEP_ENABLE);
-}
diff --git a/drivers/led/ckled2001-simple.h b/drivers/led/ckled2001-simple.h
deleted file mode 100644
index c94df62dd2..0000000000
--- a/drivers/led/ckled2001-simple.h
+++ /dev/null
@@ -1,337 +0,0 @@
-/* Copyright 2021 @ Keychron (https://www.keychron.com)
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#pragma once
-
-#include <stdint.h>
-#include <stdbool.h>
-#include "progmem.h"
-
-typedef struct ckled2001_led {
- uint8_t driver : 2;
- uint8_t v;
-} __attribute__((packed)) ckled2001_led;
-
-extern const ckled2001_led PROGMEM g_ckled2001_leds[LED_MATRIX_LED_COUNT];
-
-void ckled2001_init(uint8_t addr);
-bool ckled2001_write_register(uint8_t addr, uint8_t reg, uint8_t data);
-bool ckled2001_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer);
-
-void ckled2001_set_value(int index, uint8_t value);
-void ckled2001_set_value_all(uint8_t value);
-
-void ckled2001_set_led_control_register(uint8_t index, bool value);
-
-// This should not be called from an interrupt
-// (eg. from a timer interrupt).
-// Call this while idle (in between matrix scans).
-// If the buffer is dirty, it will update the driver with the buffer.
-void ckled2001_update_pwm_buffers(uint8_t addr, uint8_t index);
-void ckled2001_update_led_control_registers(uint8_t addr, uint8_t index);
-
-void ckled2001_sw_return_normal(uint8_t addr);
-void ckled2001_sw_shutdown(uint8_t addr);
-
-// Registers Page Define
-#define CONFIGURE_CMD_PAGE 0xFD
-#define LED_CONTROL_PAGE 0x00
-#define LED_PWM_PAGE 0x01
-#define FUNCTION_PAGE 0x03
-#define CURRENT_TUNE_PAGE 0x04
-
-// Function Register: address 0x00
-#define CONFIGURATION_REG 0x00
-#define MSKSW_SHUT_DOWN_MODE (0x0 << 0)
-#define MSKSW_NORMAL_MODE (0x1 << 0)
-
-#define DRIVER_ID_REG 0x11
-#define CKLED2001_ID 0x8A
-
-#define PDU_REG 0x13
-#define MSKSET_CA_CB_CHANNEL 0xAA
-#define MSKCLR_CA_CB_CHANNEL 0x00
-
-#define SCAN_PHASE_REG 0x14
-#define MSKPHASE_12CHANNEL 0x00
-#define MSKPHASE_11CHANNEL 0x01
-#define MSKPHASE_10CHANNEL 0x02
-#define MSKPHASE_9CHANNEL 0x03
-#define MSKPHASE_8CHANNEL 0x04
-#define MSKPHASE_7CHANNEL 0x05
-#define MSKPHASE_6CHANNEL 0x06
-#define MSKPHASE_5CHANNEL 0x07
-#define MSKPHASE_4CHANNEL 0x08
-#define MSKPHASE_3CHANNEL 0x09
-#define MSKPHASE_2CHANNEL 0x0A
-#define MSKPHASE_1CHANNEL 0x0B
-
-#define SLEW_RATE_CONTROL_MODE1_REG 0x15
-#define MSKPWM_DELAY_PHASE_ENABLE 0x04
-#define MSKPWM_DELAY_PHASE_DISABLE 0x00
-
-#define SLEW_RATE_CONTROL_MODE2_REG 0x16
-#define MSKDRIVING_SINKING_CHHANNEL_SLEWRATE_ENABLE 0xC0
-#define MSKDRIVING_SINKING_CHHANNEL_SLEWRATE_DISABLE 0x00
-
-#define OPEN_SHORT_ENABLE_REG 0x17
-#define MSKOPEN_DETECTION_ENABLE (0x01 << 7)
-#define MSKOPEN_DETECTION_DISABLE (0x00)
-
-#define MSKSHORT_DETECTION_ENABLE (0x01 << 6)
-#define MSKSHORT_DETECTION_DISABLE (0x00)
-
-#define OPEN_SHORT_DUTY_REG 0x18
-#define OPEN_SHORT_FLAG_REG 0x19
-
-#define MSKOPEN_DETECTION_INTERRUPT_ENABLE (0x01 << 7)
-#define MSKOPEN_DETECTION_INTERRUPT_DISABLE (0x00)
-
-#define MSKSHORT_DETECTION_INTERRUPT_ENABLE (0x01 << 6)
-#define MSKSHORT_DETECTION_INTERRUPT_DISABLE (0x00)
-
-#define SOFTWARE_SLEEP_REG 0x1A
-#define MSKSLEEP_ENABLE 0x02
-#define MSKSLEEP_DISABLE 0x00
-
-// LED Control Registers
-#define LED_CONTROL_ON_OFF_FIRST_ADDR 0x0
-#define LED_CONTROL_ON_OFF_LAST_ADDR 0x17
-#define LED_CONTROL_ON_OFF_LENGTH ((LED_CONTROL_ON_OFF_LAST_ADDR - LED_CONTROL_ON_OFF_FIRST_ADDR) + 1)
-
-#define LED_CONTROL_OPEN_FIRST_ADDR 0x18
-#define LED_CONTROL_OPEN_LAST_ADDR 0x2F
-#define LED_CONTROL_OPEN_LENGTH ((LED_CONTROL_OPEN_LAST_ADDR - LED_CONTROL_OPEN_FIRST_ADDR) + 1)
-
-#define LED_CONTROL_SHORT_FIRST_ADDR 0x30
-#define LED_CONTROL_SHORT_LAST_ADDR 0x47
-#define LED_CONTROL_SHORT_LENGTH ((LED_CONTROL_SHORT_LAST_ADDR - LED_CONTROL_SHORT_FIRST_ADDR) + 1)
-
-#define LED_CONTROL_PAGE_LENGTH 0x48
-
-// LED Control Registers
-#define LED_PWM_FIRST_ADDR 0x00
-#define LED_PWM_LAST_ADDR 0xBF
-#define LED_PWM_LENGTH 0xC0
-
-// Current Tune Registers
-#define LED_CURRENT_TUNE_FIRST_ADDR 0x00
-#define LED_CURRENT_TUNE_LAST_ADDR 0x0B
-#define LED_CURRENT_TUNE_LENGTH 0x0C
-
-#define A_1 0x00
-#define A_2 0x01
-#define A_3 0x02
-#define A_4 0x03
-#define A_5 0x04
-#define A_6 0x05
-#define A_7 0x06
-#define A_8 0x07
-#define A_9 0x08
-#define A_10 0x09
-#define A_11 0x0A
-#define A_12 0x0B
-#define A_13 0x0C
-#define A_14 0x0D
-#define A_15 0x0E
-#define A_16 0x0F
-
-#define B_1 0x10
-#define B_2 0x11
-#define B_3 0x12
-#define B_4 0x13
-#define B_5 0x14
-#define B_6 0x15
-#define B_7 0x16
-#define B_8 0x17
-#define B_9 0x18
-#define B_10 0x19
-#define B_11 0x1A
-#define B_12 0x1B
-#define B_13 0x1C
-#define B_14 0x1D
-#define B_15 0x1E
-#define B_16 0x1F
-
-#define C_1 0x20
-#define C_2 0x21
-#define C_3 0x22
-#define C_4 0x23
-#define C_5 0x24
-#define C_6 0x25
-#define C_7 0x26
-#define C_8 0x27
-#define C_9 0x28
-#define C_10 0x29
-#define C_11 0x2A
-#define C_12 0x2B
-#define C_13 0x2C
-#define C_14 0x2D
-#define C_15 0x2E
-#define C_16 0x2F
-
-#define D_1 0x30
-#define D_2 0x31
-#define D_3 0x32
-#define D_4 0x33
-#define D_5 0x34
-#define D_6 0x35
-#define D_7 0x36
-#define D_8 0x37
-#define D_9 0x38
-#define D_10 0x39
-#define D_11 0x3A
-#define D_12 0x3B
-#define D_13 0x3C
-#define D_14 0x3D
-#define D_15 0x3E
-#define D_16 0x3F
-
-#define E_1 0x40
-#define E_2 0x41
-#define E_3 0x42
-#define E_4 0x43
-#define E_5 0x44
-#define E_6 0x45
-#define E_7 0x46
-#define E_8 0x47
-#define E_9 0x48
-#define E_10 0x49
-#define E_11 0x4A
-#define E_12 0x4B
-#define E_13 0x4C
-#define E_14 0x4D
-#define E_15 0x4E
-#define E_16 0x4F
-
-#define F_1 0x50
-#define F_2 0x51
-#define F_3 0x52
-#define F_4 0x53
-#define F_5 0x54
-#define F_6 0x55
-#define F_7 0x56
-#define F_8 0x57
-#define F_9 0x58
-#define F_10 0x59
-#define F_11 0x5A
-#define F_12 0x5B
-#define F_13 0x5C
-#define F_14 0x5D
-#define F_15 0x5E
-#define F_16 0x5F
-
-#define G_1 0x60
-#define G_2 0x61
-#define G_3 0x62
-#define G_4 0x63
-#define G_5 0x64
-#define G_6 0x65
-#define G_7 0x66
-#define G_8 0x67
-#define G_9 0x68
-#define G_10 0x69
-#define G_11 0x6A
-#define G_12 0x6B
-#define G_13 0x6C
-#define G_14 0x6D
-#define G_15 0x6E
-#define G_16 0x6F
-
-#define H_1 0x70
-#define H_2 0x71
-#define H_3 0x72
-#define H_4 0x73
-#define H_5 0x74
-#define H_6 0x75
-#define H_7 0x76
-#define H_8 0x77
-#define H_9 0x78
-#define H_10 0x79
-#define H_11 0x7A
-#define H_12 0x7B
-#define H_13 0x7C
-#define H_14 0x7D
-#define H_15 0x7E
-#define H_16 0x7F
-
-#define I_1 0x80
-#define I_2 0x81
-#define I_3 0x82
-#define I_4 0x83
-#define I_5 0x84
-#define I_6 0x85
-#define I_7 0x86
-#define I_8 0x87
-#define I_9 0x88
-#define I_10 0x89
-#define I_11 0x8A
-#define I_12 0x8B
-#define I_13 0x8C
-#define I_14 0x8D
-#define I_15 0x8E
-#define I_16 0x8F
-
-#define J_1 0x90
-#define J_2 0x91
-#define J_3 0x92
-#define J_4 0x93
-#define J_5 0x94
-#define J_6 0x95
-#define J_7 0x96
-#define J_8 0x97
-#define J_9 0x98
-#define J_10 0x99
-#define J_11 0x9A
-#define J_12 0x9B
-#define J_13 0x9C
-#define J_14 0x9D
-#define J_15 0x9E
-#define J_16 0x9F
-
-#define K_1 0xA0
-#define K_2 0xA1
-#define K_3 0xA2
-#define K_4 0xA3
-#define K_5 0xA4
-#define K_6 0xA5
-#define K_7 0xA6
-#define K_8 0xA7
-#define K_9 0xA8
-#define K_10 0xA9
-#define K_11 0xAA
-#define K_12 0xAB
-#define K_13 0xAC
-#define K_14 0xAD
-#define K_15 0xAE
-#define K_16 0xAF
-
-#define L_1 0xB0
-#define L_2 0xB1
-#define L_3 0xB2
-#define L_4 0xB3
-#define L_5 0xB4
-#define L_6 0xB5
-#define L_7 0xB6
-#define L_8 0xB7
-#define L_9 0xB8
-#define L_10 0xB9
-#define L_11 0xBA
-#define L_12 0xBB
-#define L_13 0xBC
-#define L_14 0xBD
-#define L_15 0xBE
-#define L_16 0xBF \ No newline at end of file
diff --git a/drivers/led/ckled2001.c b/drivers/led/ckled2001.c
deleted file mode 100644
index 6ababf55e9..0000000000
--- a/drivers/led/ckled2001.c
+++ /dev/null
@@ -1,236 +0,0 @@
-/* Copyright 2021 @ Keychron (https://www.keychron.com)
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "ckled2001.h"
-#include "i2c_master.h"
-#include "wait.h"
-
-#ifndef CKLED2001_TIMEOUT
-# define CKLED2001_TIMEOUT 100
-#endif
-
-#ifndef CKLED2001_PERSISTENCE
-# define CKLED2001_PERSISTENCE 0
-#endif
-
-#ifndef PHASE_CHANNEL
-# define PHASE_CHANNEL MSKPHASE_12CHANNEL
-#endif
-
-#ifndef CKLED2001_CURRENT_TUNE
-# define CKLED2001_CURRENT_TUNE \
- { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }
-#endif
-
-// Transfer buffer for TWITransmitData()
-uint8_t g_twi_transfer_buffer[65];
-
-// These buffers match the CKLED2001 PWM registers.
-// The control buffers match the PG0 LED On/Off registers.
-// Storing them like this is optimal for I2C transfers to the registers.
-// We could optimize this and take out the unused registers from these
-// buffers and the transfers in ckled2001_write_pwm_buffer() but it's
-// probably not worth the extra complexity.
-uint8_t g_pwm_buffer[DRIVER_COUNT][192];
-bool g_pwm_buffer_update_required[DRIVER_COUNT] = {false};
-
-uint8_t g_led_control_registers[DRIVER_COUNT][24] = {0};
-bool g_led_control_registers_update_required[DRIVER_COUNT] = {false};
-
-bool ckled2001_write_register(uint8_t addr, uint8_t reg, uint8_t data) {
- // If the transaction fails function returns false.
- g_twi_transfer_buffer[0] = reg;
- g_twi_transfer_buffer[1] = data;
-
-#if CKLED2001_PERSISTENCE > 0
- for (uint8_t i = 0; i < CKLED2001_PERSISTENCE; i++) {
- if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, CKLED2001_TIMEOUT) != 0) {
- return false;
- }
- }
-#else
- if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, CKLED2001_TIMEOUT) != 0) {
- return false;
- }
-#endif
- return true;
-}
-
-bool ckled2001_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer) {
- // Assumes PG1 is already selected.
- // If any of the transactions fails function returns false.
- // Transmit PWM registers in 3 transfers of 64 bytes.
-
- // Iterate over the pwm_buffer contents at 64 byte intervals.
- for (uint8_t i = 0; i < 192; i += 64) {
- g_twi_transfer_buffer[0] = i;
- // Copy the data from i to i+63.
- // Device will auto-increment register for data after the first byte
- // Thus this sets registers 0x00-0x0F, 0x10-0x1F, etc. in one transfer.
- for (uint8_t j = 0; j < 64; j++) {
- g_twi_transfer_buffer[1 + j] = pwm_buffer[i + j];
- }
-
-#if CKLED2001_PERSISTENCE > 0
- for (uint8_t i = 0; i < CKLED2001_PERSISTENCE; i++) {
- if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 65, CKLED2001_TIMEOUT) != 0) {
- return false;
- }
- }
-#else
- if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 65, CKLED2001_TIMEOUT) != 0) {
- return false;
- }
-#endif
- }
- return true;
-}
-
-void ckled2001_init(uint8_t addr) {
- // Select to function page
- ckled2001_write_register(addr, CONFIGURE_CMD_PAGE, FUNCTION_PAGE);
- // Setting LED driver to shutdown mode
- ckled2001_write_register(addr, CONFIGURATION_REG, MSKSW_SHUT_DOWN_MODE);
- // Setting internal channel pulldown/pullup
- ckled2001_write_register(addr, PDU_REG, MSKSET_CA_CB_CHANNEL);
- // Select number of scan phase
- ckled2001_write_register(addr, SCAN_PHASE_REG, PHASE_CHANNEL);
- // Setting PWM Delay Phase
- ckled2001_write_register(addr, SLEW_RATE_CONTROL_MODE1_REG, MSKPWM_DELAY_PHASE_ENABLE);
- // Setting Driving/Sinking Channel Slew Rate
- ckled2001_write_register(addr, SLEW_RATE_CONTROL_MODE2_REG, MSKDRIVING_SINKING_CHHANNEL_SLEWRATE_ENABLE);
- // Setting Iref
- ckled2001_write_register(addr, SOFTWARE_SLEEP_REG, MSKSLEEP_DISABLE);
- // Set LED CONTROL PAGE (Page 0)
- ckled2001_write_register(addr, CONFIGURE_CMD_PAGE, LED_CONTROL_PAGE);
- for (int i = 0; i < LED_CONTROL_ON_OFF_LENGTH; i++) {
- ckled2001_write_register(addr, i, 0x00);
- }
-
- // Set PWM PAGE (Page 1)
- ckled2001_write_register(addr, CONFIGURE_CMD_PAGE, LED_PWM_PAGE);
- for (int i = 0; i < LED_CURRENT_TUNE_LENGTH; i++) {
- ckled2001_write_register(addr, i, 0x00);
- }
-
- // Set CURRENT PAGE (Page 4)
- uint8_t current_tuen_reg_list[LED_CURRENT_TUNE_LENGTH] = CKLED2001_CURRENT_TUNE;
- ckled2001_write_register(addr, CONFIGURE_CMD_PAGE, CURRENT_TUNE_PAGE);
- for (int i = 0; i < LED_CURRENT_TUNE_LENGTH; i++) {
- ckled2001_write_register(addr, i, current_tuen_reg_list[i]);
- }
-
- // Enable LEDs ON/OFF
- ckled2001_write_register(addr, CONFIGURE_CMD_PAGE, LED_CONTROL_PAGE);
- for (int i = 0; i < LED_CONTROL_ON_OFF_LENGTH; i++) {
- ckled2001_write_register(addr, i, 0xFF);
- }
-
- // Select to function page
- ckled2001_write_register(addr, CONFIGURE_CMD_PAGE, FUNCTION_PAGE);
- // Setting LED driver to normal mode
- ckled2001_write_register(addr, CONFIGURATION_REG, MSKSW_NORMAL_MODE);
-}
-
-void ckled2001_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) {
- ckled2001_led led;
- if (index >= 0 && index < RGB_MATRIX_LED_COUNT) {
- memcpy_P(&led, (&g_ckled2001_leds[index]), sizeof(led));
-
- if (g_pwm_buffer[led.driver][led.r] == red && g_pwm_buffer[led.driver][led.g] == green && g_pwm_buffer[led.driver][led.b] == blue) {
- return;
- }
- g_pwm_buffer[led.driver][led.r] = red;
- g_pwm_buffer[led.driver][led.g] = green;
- g_pwm_buffer[led.driver][led.b] = blue;
- g_pwm_buffer_update_required[led.driver] = true;
- }
-}
-
-void ckled2001_set_color_all(uint8_t red, uint8_t green, uint8_t blue) {
- for (int i = 0; i < RGB_MATRIX_LED_COUNT; i++) {
- ckled2001_set_color(i, red, green, blue);
- }
-}
-
-void ckled2001_set_led_control_register(uint8_t index, bool red, bool green, bool blue) {
- ckled2001_led led;
- memcpy_P(&led, (&g_ckled2001_leds[index]), sizeof(led));
-
- uint8_t control_register_r = led.r / 8;
- uint8_t control_register_g = led.g / 8;
- uint8_t control_register_b = led.b / 8;
- uint8_t bit_r = led.r % 8;
- uint8_t bit_g = led.g % 8;
- uint8_t bit_b = led.b % 8;
-
- if (red) {
- g_led_control_registers[led.driver][control_register_r] |= (1 << bit_r);
- } else {
- g_led_control_registers[led.driver][control_register_r] &= ~(1 << bit_r);
- }
- if (green) {
- g_led_control_registers[led.driver][control_register_g] |= (1 << bit_g);
- } else {
- g_led_control_registers[led.driver][control_register_g] &= ~(1 << bit_g);
- }
- if (blue) {
- g_led_control_registers[led.driver][control_register_b] |= (1 << bit_b);
- } else {
- g_led_control_registers[led.driver][control_register_b] &= ~(1 << bit_b);
- }
-
- g_led_control_registers_update_required[led.driver] = true;
-}
-
-void ckled2001_update_pwm_buffers(uint8_t addr, uint8_t index) {
- if (g_pwm_buffer_update_required[index]) {
- ckled2001_write_register(addr, CONFIGURE_CMD_PAGE, LED_PWM_PAGE);
-
- // If any of the transactions fail we risk writing dirty PG0,
- // refresh page 0 just in case.
- if (!ckled2001_write_pwm_buffer(addr, g_pwm_buffer[index])) {
- g_led_control_registers_update_required[index] = true;
- }
- }
- g_pwm_buffer_update_required[index] = false;
-}
-
-void ckled2001_update_led_control_registers(uint8_t addr, uint8_t index) {
- if (g_led_control_registers_update_required[index]) {
- ckled2001_write_register(addr, CONFIGURE_CMD_PAGE, LED_CONTROL_PAGE);
- for (int i = 0; i < 24; i++) {
- ckled2001_write_register(addr, i, g_led_control_registers[index][i]);
- }
- }
- g_led_control_registers_update_required[index] = false;
-}
-
-void ckled2001_sw_return_normal(uint8_t addr) {
- // Select to function page
- ckled2001_write_register(addr, CONFIGURE_CMD_PAGE, FUNCTION_PAGE);
- // Setting LED driver to normal mode
- ckled2001_write_register(addr, CONFIGURATION_REG, MSKSW_NORMAL_MODE);
-}
-
-void ckled2001_sw_shutdown(uint8_t addr) {
- // Select to function page
- ckled2001_write_register(addr, CONFIGURE_CMD_PAGE, FUNCTION_PAGE);
- // Setting LED driver to shutdown mode
- ckled2001_write_register(addr, CONFIGURATION_REG, MSKSW_SHUT_DOWN_MODE);
- // Write SW Sleep Register
- ckled2001_write_register(addr, SOFTWARE_SLEEP_REG, MSKSLEEP_ENABLE);
-}
diff --git a/drivers/led/ckled2001.h b/drivers/led/ckled2001.h
deleted file mode 100644
index 32da137fb7..0000000000
--- a/drivers/led/ckled2001.h
+++ /dev/null
@@ -1,339 +0,0 @@
-/* Copyright 2021 @ Keychron (https://www.keychron.com)
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#pragma once
-
-#include <stdint.h>
-#include <stdbool.h>
-#include "progmem.h"
-
-typedef struct ckled2001_led {
- uint8_t driver : 2;
- uint8_t r;
- uint8_t g;
- uint8_t b;
-} __attribute__((packed)) ckled2001_led;
-
-extern const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT];
-
-void ckled2001_init(uint8_t addr);
-bool ckled2001_write_register(uint8_t addr, uint8_t reg, uint8_t data);
-bool ckled2001_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer);
-
-void ckled2001_set_color(int index, uint8_t red, uint8_t green, uint8_t blue);
-void ckled2001_set_color_all(uint8_t red, uint8_t green, uint8_t blue);
-
-void ckled2001_set_led_control_register(uint8_t index, bool red, bool green, bool blue);
-
-// This should not be called from an interrupt
-// (eg. from a timer interrupt).
-// Call this while idle (in between matrix scans).
-// If the buffer is dirty, it will update the driver with the buffer.
-void ckled2001_update_pwm_buffers(uint8_t addr, uint8_t index);
-void ckled2001_update_led_control_registers(uint8_t addr, uint8_t index);
-
-void ckled2001_sw_return_normal(uint8_t addr);
-void ckled2001_sw_shutdown(uint8_t addr);
-
-// Registers Page Define
-#define CONFIGURE_CMD_PAGE 0xFD
-#define LED_CONTROL_PAGE 0x00
-#define LED_PWM_PAGE 0x01
-#define FUNCTION_PAGE 0x03
-#define CURRENT_TUNE_PAGE 0x04
-
-// Function Register: address 0x00
-#define CONFIGURATION_REG 0x00
-#define MSKSW_SHUT_DOWN_MODE (0x0 << 0)
-#define MSKSW_NORMAL_MODE (0x1 << 0)
-
-#define DRIVER_ID_REG 0x11
-#define CKLED2001_ID 0x8A
-
-#define PDU_REG 0x13
-#define MSKSET_CA_CB_CHANNEL 0xAA
-#define MSKCLR_CA_CB_CHANNEL 0x00
-
-#define SCAN_PHASE_REG 0x14
-#define MSKPHASE_12CHANNEL 0x00
-#define MSKPHASE_11CHANNEL 0x01
-#define MSKPHASE_10CHANNEL 0x02
-#define MSKPHASE_9CHANNEL 0x03
-#define MSKPHASE_8CHANNEL 0x04
-#define MSKPHASE_7CHANNEL 0x05
-#define MSKPHASE_6CHANNEL 0x06
-#define MSKPHASE_5CHANNEL 0x07
-#define MSKPHASE_4CHANNEL 0x08
-#define MSKPHASE_3CHANNEL 0x09
-#define MSKPHASE_2CHANNEL 0x0A
-#define MSKPHASE_1CHANNEL 0x0B
-
-#define SLEW_RATE_CONTROL_MODE1_REG 0x15
-#define MSKPWM_DELAY_PHASE_ENABLE 0x04
-#define MSKPWM_DELAY_PHASE_DISABLE 0x00
-
-#define SLEW_RATE_CONTROL_MODE2_REG 0x16
-#define MSKDRIVING_SINKING_CHHANNEL_SLEWRATE_ENABLE 0xC0
-#define MSKDRIVING_SINKING_CHHANNEL_SLEWRATE_DISABLE 0x00
-
-#define OPEN_SHORT_ENABLE_REG 0x17
-#define MSKOPEN_DETECTION_ENABLE (0x01 << 7)
-#define MSKOPEN_DETECTION_DISABLE (0x00)
-
-#define MSKSHORT_DETECTION_ENABLE (0x01 << 6)
-#define MSKSHORT_DETECTION_DISABLE (0x00)
-
-#define OPEN_SHORT_DUTY_REG 0x18
-#define OPEN_SHORT_FLAG_REG 0x19
-
-#define MSKOPEN_DETECTION_INTERRUPT_ENABLE (0x01 << 7)
-#define MSKOPEN_DETECTION_INTERRUPT_DISABLE (0x00)
-
-#define MSKSHORT_DETECTION_INTERRUPT_ENABLE (0x01 << 6)
-#define MSKSHORT_DETECTION_INTERRUPT_DISABLE (0x00)
-
-#define SOFTWARE_SLEEP_REG 0x1A
-#define MSKSLEEP_ENABLE 0x02
-#define MSKSLEEP_DISABLE 0x00
-
-// LED Control Registers
-#define LED_CONTROL_ON_OFF_FIRST_ADDR 0x0
-#define LED_CONTROL_ON_OFF_LAST_ADDR 0x17
-#define LED_CONTROL_ON_OFF_LENGTH ((LED_CONTROL_ON_OFF_LAST_ADDR - LED_CONTROL_ON_OFF_FIRST_ADDR) + 1)
-
-#define LED_CONTROL_OPEN_FIRST_ADDR 0x18
-#define LED_CONTROL_OPEN_LAST_ADDR 0x2F
-#define LED_CONTROL_OPEN_LENGTH ((LED_CONTROL_OPEN_LAST_ADDR - LED_CONTROL_OPEN_FIRST_ADDR) + 1)
-
-#define LED_CONTROL_SHORT_FIRST_ADDR 0x30
-#define LED_CONTROL_SHORT_LAST_ADDR 0x47
-#define LED_CONTROL_SHORT_LENGTH ((LED_CONTROL_SHORT_LAST_ADDR - LED_CONTROL_SHORT_FIRST_ADDR) + 1)
-
-#define LED_CONTROL_PAGE_LENGTH 0x48
-
-// LED Control Registers
-#define LED_PWM_FIRST_ADDR 0x00
-#define LED_PWM_LAST_ADDR 0xBF
-#define LED_PWM_LENGTH 0xC0
-
-// Current Tune Registers
-#define LED_CURRENT_TUNE_FIRST_ADDR 0x00
-#define LED_CURRENT_TUNE_LAST_ADDR 0x0B
-#define LED_CURRENT_TUNE_LENGTH 0x0C
-
-#define A_1 0x00
-#define A_2 0x01
-#define A_3 0x02
-#define A_4 0x03
-#define A_5 0x04
-#define A_6 0x05
-#define A_7 0x06
-#define A_8 0x07
-#define A_9 0x08
-#define A_10 0x09
-#define A_11 0x0A
-#define A_12 0x0B
-#define A_13 0x0C
-#define A_14 0x0D
-#define A_15 0x0E
-#define A_16 0x0F
-
-#define B_1 0x10
-#define B_2 0x11
-#define B_3 0x12
-#define B_4 0x13
-#define B_5 0x14
-#define B_6 0x15
-#define B_7 0x16
-#define B_8 0x17
-#define B_9 0x18
-#define B_10 0x19
-#define B_11 0x1A
-#define B_12 0x1B
-#define B_13 0x1C
-#define B_14 0x1D
-#define B_15 0x1E
-#define B_16 0x1F
-
-#define C_1 0x20
-#define C_2 0x21
-#define C_3 0x22
-#define C_4 0x23
-#define C_5 0x24
-#define C_6 0x25
-#define C_7 0x26
-#define C_8 0x27
-#define C_9 0x28
-#define C_10 0x29
-#define C_11 0x2A
-#define C_12 0x2B
-#define C_13 0x2C
-#define C_14 0x2D
-#define C_15 0x2E
-#define C_16 0x2F
-
-#define D_1 0x30
-#define D_2 0x31
-#define D_3 0x32
-#define D_4 0x33
-#define D_5 0x34
-#define D_6 0x35
-#define D_7 0x36
-#define D_8 0x37
-#define D_9 0x38
-#define D_10 0x39
-#define D_11 0x3A
-#define D_12 0x3B
-#define D_13 0x3C
-#define D_14 0x3D
-#define D_15 0x3E
-#define D_16 0x3F
-
-#define E_1 0x40
-#define E_2 0x41
-#define E_3 0x42
-#define E_4 0x43
-#define E_5 0x44
-#define E_6 0x45
-#define E_7 0x46
-#define E_8 0x47
-#define E_9 0x48
-#define E_10 0x49
-#define E_11 0x4A
-#define E_12 0x4B
-#define E_13 0x4C
-#define E_14 0x4D
-#define E_15 0x4E
-#define E_16 0x4F
-
-#define F_1 0x50
-#define F_2 0x51
-#define F_3 0x52
-#define F_4 0x53
-#define F_5 0x54
-#define F_6 0x55
-#define F_7 0x56
-#define F_8 0x57
-#define F_9 0x58
-#define F_10 0x59
-#define F_11 0x5A
-#define F_12 0x5B
-#define F_13 0x5C
-#define F_14 0x5D
-#define F_15 0x5E
-#define F_16 0x5F
-
-#define G_1 0x60
-#define G_2 0x61
-#define G_3 0x62
-#define G_4 0x63
-#define G_5 0x64
-#define G_6 0x65
-#define G_7 0x66
-#define G_8 0x67
-#define G_9 0x68
-#define G_10 0x69
-#define G_11 0x6A
-#define G_12 0x6B
-#define G_13 0x6C
-#define G_14 0x6D
-#define G_15 0x6E
-#define G_16 0x6F
-
-#define H_1 0x70
-#define H_2 0x71
-#define H_3 0x72
-#define H_4 0x73
-#define H_5 0x74
-#define H_6 0x75
-#define H_7 0x76
-#define H_8 0x77
-#define H_9 0x78
-#define H_10 0x79
-#define H_11 0x7A
-#define H_12 0x7B
-#define H_13 0x7C
-#define H_14 0x7D
-#define H_15 0x7E
-#define H_16 0x7F
-
-#define I_1 0x80
-#define I_2 0x81
-#define I_3 0x82
-#define I_4 0x83
-#define I_5 0x84
-#define I_6 0x85
-#define I_7 0x86
-#define I_8 0x87
-#define I_9 0x88
-#define I_10 0x89
-#define I_11 0x8A
-#define I_12 0x8B
-#define I_13 0x8C
-#define I_14 0x8D
-#define I_15 0x8E
-#define I_16 0x8F
-
-#define J_1 0x90
-#define J_2 0x91
-#define J_3 0x92
-#define J_4 0x93
-#define J_5 0x94
-#define J_6 0x95
-#define J_7 0x96
-#define J_8 0x97
-#define J_9 0x98
-#define J_10 0x99
-#define J_11 0x9A
-#define J_12 0x9B
-#define J_13 0x9C
-#define J_14 0x9D
-#define J_15 0x9E
-#define J_16 0x9F
-
-#define K_1 0xA0
-#define K_2 0xA1
-#define K_3 0xA2
-#define K_4 0xA3
-#define K_5 0xA4
-#define K_6 0xA5
-#define K_7 0xA6
-#define K_8 0xA7
-#define K_9 0xA8
-#define K_10 0xA9
-#define K_11 0xAA
-#define K_12 0xAB
-#define K_13 0xAC
-#define K_14 0xAD
-#define K_15 0xAE
-#define K_16 0xAF
-
-#define L_1 0xB0
-#define L_2 0xB1
-#define L_3 0xB2
-#define L_4 0xB3
-#define L_5 0xB4
-#define L_6 0xB5
-#define L_7 0xB6
-#define L_8 0xB7
-#define L_9 0xB8
-#define L_10 0xB9
-#define L_11 0xBA
-#define L_12 0xBB
-#define L_13 0xBC
-#define L_14 0xBD
-#define L_15 0xBE
-#define L_16 0xBF \ No newline at end of file
diff --git a/drivers/led/issi/is31fl3218-simple.c b/drivers/led/issi/is31fl3218-simple.c
new file mode 100644
index 0000000000..a78dedfcf1
--- /dev/null
+++ b/drivers/led/issi/is31fl3218-simple.c
@@ -0,0 +1,143 @@
+/* Copyright 2018 Jason Williams (Wilba)
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+#include "is31fl3218.h"
+#include <string.h>
+#include "i2c_master.h"
+
+// These are the register addresses
+#define IS31FL3218_REG_SHUTDOWN 0x00
+#define IS31FL3218_REG_PWM 0x01
+#define IS31FL3218_REG_CONTROL 0x13
+#define IS31FL3218_REG_UPDATE 0x16
+#define IS31FL3218_REG_RESET 0x17
+
+#ifndef IS31FL3218_I2C_TIMEOUT
+# define IS31FL3218_I2C_TIMEOUT 100
+#endif
+
+#ifndef IS31FL3218_I2C_PERSISTENCE
+# define IS31FL3218_I2C_PERSISTENCE 0
+#endif
+
+// Reusable buffer for transfers
+uint8_t g_twi_transfer_buffer[20];
+
+// IS31FL3218 has 18 PWM outputs and a fixed I2C address, so no chaining.
+uint8_t g_pwm_buffer[18];
+bool g_pwm_buffer_update_required = false;
+
+uint8_t g_led_control_registers[3] = {0};
+bool g_led_control_registers_update_required = false;
+
+void is31fl3218_write_register(uint8_t reg, uint8_t data) {
+ g_twi_transfer_buffer[0] = reg;
+ g_twi_transfer_buffer[1] = data;
+#if IS31FL3218_I2C_PERSISTENCE > 0
+ for (uint8_t i = 0; i < IS31FL3218_I2C_PERSISTENCE; i++) {
+ if (i2c_transmit(IS31FL3218_I2C_ADDRESS << 1, g_twi_transfer_buffer, 2, IS31FL3218_I2C_TIMEOUT) == 0) break;
+ }
+#else
+ i2c_transmit(IS31FL3218_I2C_ADDRESS << 1, g_twi_transfer_buffer, 2, IS31FL3218_I2C_TIMEOUT);
+#endif
+}
+
+void is31fl3218_write_pwm_buffer(uint8_t *pwm_buffer) {
+ g_twi_transfer_buffer[0] = IS31FL3218_REG_PWM;
+ memcpy(g_twi_transfer_buffer + 1, pwm_buffer, 18);
+
+#if IS31FL3218_I2C_PERSISTENCE > 0
+ for (uint8_t i = 0; i < IS31FL3218_I2C_PERSISTENCE; i++) {
+ i2c_transmit(IS31FL3218_I2C_ADDRESS << 1, g_twi_transfer_buffer, 19, IS31FL3218_I2C_TIMEOUT);
+ }
+#else
+ i2c_transmit(IS31FL3218_I2C_ADDRESS << 1, g_twi_transfer_buffer, 19, IS31FL3218_I2C_TIMEOUT);
+#endif
+}
+
+void is31fl3218_init(void) {
+ // In case we ever want to reinitialize (?)
+ is31fl3218_write_register(IS31FL3218_REG_RESET, 0x00);
+
+ // Turn off software shutdown
+ is31fl3218_write_register(IS31FL3218_REG_SHUTDOWN, 0x01);
+
+ // Set all PWM values to zero
+ for (uint8_t i = 0; i < 18; i++) {
+ is31fl3218_write_register(IS31FL3218_REG_PWM + i, 0x00);
+ }
+
+ // turn off all LEDs in the LED control register
+ for (uint8_t i = 0; i < 3; i++) {
+ is31fl3218_write_register(IS31FL3218_REG_CONTROL + i, 0x00);
+ }
+
+ // Load PWM registers and LED Control register data
+ is31fl3218_write_register(IS31FL3218_REG_UPDATE, 0x01);
+}
+
+void is31fl3218_set_value(int index, uint8_t value) {
+ is31fl3218_led_t led;
+ if (index >= 0 && index < LED_MATRIX_LED_COUNT) {
+ memcpy_P(&led, (&g_is31fl3218_leds[index]), sizeof(led));
+ }
+ if (g_pwm_buffer[led.v - IS31FL3218_REG_PWM] == value) {
+ return;
+ }
+ g_pwm_buffer[led.v - IS31FL3218_REG_PWM] = value;
+ g_pwm_buffer_update_required = true;
+}
+
+void is31fl3218_set_value_all(uint8_t value) {
+ for (int i = 0; i < LED_MATRIX_LED_COUNT; i++) {
+ is31fl3218_set_value(i, value);
+ }
+}
+
+void is31fl3218_set_led_control_register(uint8_t index, bool value) {
+ is31fl3218_led_t led;
+ memcpy_P(&led, (&g_is31fl3218_leds[index]), sizeof(led));
+
+ uint8_t control_register = (led.v - IS31FL3218_REG_PWM) / 6;
+ uint8_t bit_value = (led.v - IS31FL3218_REG_PWM) % 6;
+
+ if (value) {
+ g_led_control_registers[control_register] |= (1 << bit_value);
+ } else {
+ g_led_control_registers[control_register] &= ~(1 << bit_value);
+ }
+
+ g_led_control_registers_update_required = true;
+}
+
+void is31fl3218_update_pwm_buffers(void) {
+ if (g_pwm_buffer_update_required) {
+ is31fl3218_write_pwm_buffer(g_pwm_buffer);
+ // Load PWM registers and LED Control register data
+ is31fl3218_write_register(IS31FL3218_REG_UPDATE, 0x01);
+
+ g_pwm_buffer_update_required = false;
+ }
+}
+
+void is31fl3218_update_led_control_registers(void) {
+ if (g_led_control_registers_update_required) {
+ for (int i = 0; i < 3; i++) {
+ is31fl3218_write_register(IS31FL3218_REG_CONTROL + i, g_led_control_registers[i]);
+ }
+
+ g_led_control_registers_update_required = false;
+ }
+}
diff --git a/drivers/led/issi/is31fl3218-simple.h b/drivers/led/issi/is31fl3218-simple.h
new file mode 100644
index 0000000000..2260361ec6
--- /dev/null
+++ b/drivers/led/issi/is31fl3218-simple.h
@@ -0,0 +1,60 @@
+/* Copyright 2018 Jason Williams (Wilba)
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#pragma once
+
+#include <stdint.h>
+#include <stdbool.h>
+#include "progmem.h"
+
+#define IS31FL3218_I2C_ADDRESS 0x54
+
+typedef struct is31fl3218_led_t {
+ uint8_t v;
+} __attribute__((packed)) is31fl3218_led_t;
+
+extern const is31fl3218_led_t PROGMEM g_is31fl3218_leds[LED_MATRIX_LED_COUNT];
+
+void is31fl3218_init(void);
+
+void is31fl3218_set_value(int index, uint8_t value);
+
+void is31fl3218_set_value_all(uint8_t value);
+
+void is31fl3218_set_led_control_register(uint8_t index, bool value);
+
+void is31fl3218_update_pwm_buffers(void);
+
+void is31fl3218_update_led_control_registers(void);
+
+#define OUT1 0x01
+#define OUT2 0x02
+#define OUT3 0x03
+#define OUT4 0x04
+#define OUT5 0x05
+#define OUT6 0x06
+#define OUT7 0x07
+#define OUT8 0x08
+#define OUT9 0x09
+#define OUT10 0x0A
+#define OUT11 0x0B
+#define OUT12 0x0C
+#define OUT13 0x0D
+#define OUT14 0x0E
+#define OUT15 0x0F
+#define OUT16 0x10
+#define OUT17 0x11
+#define OUT18 0x12
diff --git a/drivers/led/issi/is31fl3218.c b/drivers/led/issi/is31fl3218.c
index 970e9a0be9..87a0acfc08 100644
--- a/drivers/led/issi/is31fl3218.c
+++ b/drivers/led/issi/is31fl3218.c
@@ -14,84 +14,146 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "is31fl3218.h"
+#include <string.h>
#include "i2c_master.h"
-// This is the full 8-bit address
-#define ISSI_ADDRESS 0b10101000
-
// These are the register addresses
-#define ISSI_REG_SHUTDOWN 0x00
-#define ISSI_REG_PWM 0x01
-#define ISSI_REG_CONTROL 0x13
-#define ISSI_REG_UPDATE 0x16
-#define ISSI_REG_RESET 0x17
+#define IS31FL3218_REG_SHUTDOWN 0x00
+#define IS31FL3218_REG_PWM 0x01
+#define IS31FL3218_REG_CONTROL 0x13
+#define IS31FL3218_REG_UPDATE 0x16
+#define IS31FL3218_REG_RESET 0x17
+
+#ifndef IS31FL3218_I2C_TIMEOUT
+# define IS31FL3218_I2C_TIMEOUT 100
+#endif
-// Default timeout if no I2C response
-#define ISSI_TIMEOUT 100
+#ifndef IS31FL3218_I2C_PERSISTENCE
+# define IS31FL3218_I2C_PERSISTENCE 0
+#endif
// Reusable buffer for transfers
uint8_t g_twi_transfer_buffer[20];
// IS31FL3218 has 18 PWM outputs and a fixed I2C address, so no chaining.
-// If used as RGB LED driver, LEDs are assigned RGB,RGB,RGB,RGB,RGB,RGB
uint8_t g_pwm_buffer[18];
bool g_pwm_buffer_update_required = false;
+uint8_t g_led_control_registers[3] = {0};
+bool g_led_control_registers_update_required = false;
+
void is31fl3218_write_register(uint8_t reg, uint8_t data) {
g_twi_transfer_buffer[0] = reg;
g_twi_transfer_buffer[1] = data;
- i2c_transmit(ISSI_ADDRESS, g_twi_transfer_buffer, 2, ISSI_TIMEOUT);
+#if IS31FL3218_I2C_PERSISTENCE > 0
+ for (uint8_t i = 0; i < IS31FL3218_I2C_PERSISTENCE; i++) {
+ if (i2c_transmit(IS31FL3218_I2C_ADDRESS << 1, g_twi_transfer_buffer, 2, IS31FL3218_I2C_TIMEOUT) == 0) break;
+ }
+#else
+ i2c_transmit(IS31FL3218_I2C_ADDRESS << 1, g_twi_transfer_buffer, 2, IS31FL3218_I2C_TIMEOUT);
+#endif
}
void is31fl3218_write_pwm_buffer(uint8_t *pwm_buffer) {
- g_twi_transfer_buffer[0] = ISSI_REG_PWM;
+ g_twi_transfer_buffer[0] = IS31FL3218_REG_PWM;
memcpy(g_twi_transfer_buffer + 1, pwm_buffer, 18);
- i2c_transmit(ISSI_ADDRESS, g_twi_transfer_buffer, 19, ISSI_TIMEOUT);
+#if IS31FL3218_I2C_PERSISTENCE > 0
+ for (uint8_t i = 0; i < IS31FL3218_I2C_PERSISTENCE; i++) {
+ i2c_transmit(IS31FL3218_I2C_ADDRESS << 1, g_twi_transfer_buffer, 19, IS31FL3218_I2C_TIMEOUT);
+ }
+#else
+ i2c_transmit(IS31FL3218_I2C_ADDRESS << 1, g_twi_transfer_buffer, 19, IS31FL3218_I2C_TIMEOUT);
+#endif
}
void is31fl3218_init(void) {
// In case we ever want to reinitialize (?)
- is31fl3218_write_register(ISSI_REG_RESET, 0x00);
+ is31fl3218_write_register(IS31FL3218_REG_RESET, 0x00);
// Turn off software shutdown
- is31fl3218_write_register(ISSI_REG_SHUTDOWN, 0x01);
+ is31fl3218_write_register(IS31FL3218_REG_SHUTDOWN, 0x01);
// Set all PWM values to zero
for (uint8_t i = 0; i < 18; i++) {
- is31fl3218_write_register(ISSI_REG_PWM + i, 0x00);
+ is31fl3218_write_register(IS31FL3218_REG_PWM + i, 0x00);
}
- // Enable all channels
+ // turn off all LEDs in the LED control register
for (uint8_t i = 0; i < 3; i++) {
- is31fl3218_write_register(ISSI_REG_CONTROL + i, 0b00111111);
+ is31fl3218_write_register(IS31FL3218_REG_CONTROL + i, 0x00);
}
// Load PWM registers and LED Control register data
- is31fl3218_write_register(ISSI_REG_UPDATE, 0x01);
+ is31fl3218_write_register(IS31FL3218_REG_UPDATE, 0x01);
}
void is31fl3218_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) {
- if (g_pwm_buffer[index * 3 + 0] == red && g_pwm_buffer[index * 3 + 1] == green && g_pwm_buffer[index * 3 + 2] == blue) {
+ is31fl3218_led_t led;
+ if (index >= 0 && index < RGB_MATRIX_LED_COUNT) {
+ memcpy_P(&led, (&g_is31fl3218_leds[index]), sizeof(led));
+ }
+ if (g_pwm_buffer[led.r - IS31FL3218_REG_PWM] == red && g_pwm_buffer[led.g - IS31FL3218_REG_PWM] == green && g_pwm_buffer[led.b - IS31FL3218_REG_PWM] == blue) {
return;
}
- g_pwm_buffer[index * 3 + 0] = red;
- g_pwm_buffer[index * 3 + 1] = green;
- g_pwm_buffer[index * 3 + 2] = blue;
- g_pwm_buffer_update_required = true;
+ g_pwm_buffer[led.r - IS31FL3218_REG_PWM] = red;
+ g_pwm_buffer[led.g - IS31FL3218_REG_PWM] = green;
+ g_pwm_buffer[led.b - IS31FL3218_REG_PWM] = blue;
+ g_pwm_buffer_update_required = true;
}
void is31fl3218_set_color_all(uint8_t red, uint8_t green, uint8_t blue) {
- for (int i = 0; i < 6; i++) {
+ for (int i = 0; i < RGB_MATRIX_LED_COUNT; i++) {
is31fl3218_set_color(i, red, green, blue);
}
}
+void is31fl3218_set_led_control_register(uint8_t index, bool red, bool green, bool blue) {
+ is31fl3218_led_t led;
+ memcpy_P(&led, (&g_is31fl3218_leds[index]), sizeof(led));
+
+ uint8_t control_register_r = (led.r - IS31FL3218_REG_PWM) / 6;
+ uint8_t control_register_g = (led.g - IS31FL3218_REG_PWM) / 6;
+ uint8_t control_register_b = (led.b - IS31FL3218_REG_PWM) / 6;
+ uint8_t bit_r = (led.r - IS31FL3218_REG_PWM) % 6;
+ uint8_t bit_g = (led.g - IS31FL3218_REG_PWM) % 6;
+ uint8_t bit_b = (led.b - IS31FL3218_REG_PWM) % 6;
+
+ if (red) {
+ g_led_control_registers[control_register_r] |= (1 << bit_r);
+ } else {
+ g_led_control_registers[control_register_r] &= ~(1 << bit_r);
+ }
+ if (green) {
+ g_led_control_registers[control_register_g] |= (1 << bit_g);
+ } else {
+ g_led_control_registers[control_register_g] &= ~(1 << bit_g);
+ }
+ if (blue) {
+ g_led_control_registers[control_register_b] |= (1 << bit_b);
+ } else {
+ g_led_control_registers[control_register_b] &= ~(1 << bit_b);
+ }
+
+ g_led_control_registers_update_required = true;
+}
+
void is31fl3218_update_pwm_buffers(void) {
if (g_pwm_buffer_update_required) {
is31fl3218_write_pwm_buffer(g_pwm_buffer);
// Load PWM registers and LED Control register data
- is31fl3218_write_register(ISSI_REG_UPDATE, 0x01);
+ is31fl3218_write_register(IS31FL3218_REG_UPDATE, 0x01);
+
+ g_pwm_buffer_update_required = false;
+ }
+}
+
+void is31fl3218_update_led_control_registers(void) {
+ if (g_led_control_registers_update_required) {
+ for (int i = 0; i < 3; i++) {
+ is31fl3218_write_register(IS31FL3218_REG_CONTROL + i, g_led_control_registers[i]);
+ }
+
+ g_led_control_registers_update_required = false;
}
- g_pwm_buffer_update_required = false;
}
diff --git a/drivers/led/issi/is31fl3218.h b/drivers/led/issi/is31fl3218.h
index 2fe3768432..a5ac44fd1d 100644
--- a/drivers/led/issi/is31fl3218.h
+++ b/drivers/led/issi/is31fl3218.h
@@ -18,9 +18,45 @@
#include <stdint.h>
#include <stdbool.h>
-#include <string.h>
+#include "progmem.h"
+
+#define IS31FL3218_I2C_ADDRESS 0x54
+
+typedef struct is31fl3218_led_t {
+ uint8_t r;
+ uint8_t g;
+ uint8_t b;
+} __attribute__((packed)) is31fl3218_led_t;
+
+extern const is31fl3218_led_t PROGMEM g_is31fl3218_leds[RGB_MATRIX_LED_COUNT];
void is31fl3218_init(void);
+
void is31fl3218_set_color(int index, uint8_t red, uint8_t green, uint8_t blue);
+
void is31fl3218_set_color_all(uint8_t red, uint8_t green, uint8_t blue);
+
+void is31fl3218_set_led_control_register(uint8_t index, bool red, bool green, bool blue);
+
void is31fl3218_update_pwm_buffers(void);
+
+void is31fl3218_update_led_control_registers(void);
+
+#define OUT1 0x01
+#define OUT2 0x02
+#define OUT3 0x03
+#define OUT4 0x04
+#define OUT5 0x05
+#define OUT6 0x06
+#define OUT7 0x07
+#define OUT8 0x08
+#define OUT9 0x09
+#define OUT10 0x0A
+#define OUT11 0x0B
+#define OUT12 0x0C
+#define OUT13 0x0D
+#define OUT14 0x0E
+#define OUT15 0x0F
+#define OUT16 0x10
+#define OUT17 0x11
+#define OUT18 0x12
diff --git a/drivers/led/issi/is31fl3731-simple.c b/drivers/led/issi/is31fl3731-simple.c
index f7f6980a3b..f9ad703ced 100644
--- a/drivers/led/issi/is31fl3731-simple.c
+++ b/drivers/led/issi/is31fl3731-simple.c
@@ -18,44 +18,36 @@
*/
#include "is31fl3731-simple.h"
+#include <string.h>
#include "i2c_master.h"
#include "wait.h"
-// This is a 7-bit address, that gets left-shifted and bit 0
-// set to 0 for write, 1 for read (as per I2C protocol)
-// The address will vary depending on your wiring:
-// 0b1110100 AD <-> GND
-// 0b1110111 AD <-> VCC
-// 0b1110101 AD <-> SCL
-// 0b1110110 AD <-> SDA
-#define ISSI_ADDR_DEFAULT 0x74
+#define IS31FL3731_REG_CONFIG 0x00
+#define IS31FL3731_REG_CONFIG_PICTUREMODE 0x00
+#define IS31FL3731_REG_CONFIG_AUTOPLAYMODE 0x08
+#define IS31FL3731_REG_CONFIG_AUDIOPLAYMODE 0x18
-#define ISSI_REG_CONFIG 0x00
-#define ISSI_REG_CONFIG_PICTUREMODE 0x00
-#define ISSI_REG_CONFIG_AUTOPLAYMODE 0x08
-#define ISSI_REG_CONFIG_AUDIOPLAYMODE 0x18
+#define IS31FL3731_CONF_PICTUREMODE 0x00
+#define IS31FL3731_CONF_AUTOFRAMEMODE 0x04
+#define IS31FL3731_CONF_AUDIOMODE 0x08
-#define ISSI_CONF_PICTUREMODE 0x00
-#define ISSI_CONF_AUTOFRAMEMODE 0x04
-#define ISSI_CONF_AUDIOMODE 0x08
-
-#define ISSI_REG_PICTUREFRAME 0x01
+#define IS31FL3731_REG_PICTUREFRAME 0x01
// Not defined in the datasheet -- See AN for IC
-#define ISSI_REG_GHOST_IMAGE_PREVENTION 0xC2 // Set bit 4 to enable de-ghosting
+#define IS31FL3731_REG_GHOST_IMAGE_PREVENTION 0xC2 // Set bit 4 to enable de-ghosting
-#define ISSI_REG_SHUTDOWN 0x0A
-#define ISSI_REG_AUDIOSYNC 0x06
+#define IS31FL3731_REG_SHUTDOWN 0x0A
+#define IS31FL3731_REG_AUDIOSYNC 0x06
-#define ISSI_COMMANDREGISTER 0xFD
-#define ISSI_BANK_FUNCTIONREG 0x0B // helpfully called 'page nine'
+#define IS31FL3731_COMMANDREGISTER 0xFD
+#define IS31FL3731_BANK_FUNCTIONREG 0x0B // helpfully called 'page nine'
-#ifndef ISSI_TIMEOUT
-# define ISSI_TIMEOUT 100
+#ifndef IS31FL3731_I2C_TIMEOUT
+# define IS31FL3731_I2C_TIMEOUT 100
#endif
-#ifndef ISSI_PERSISTENCE
-# define ISSI_PERSISTENCE 0
+#ifndef IS31FL3731_I2C_PERSISTENCE
+# define IS31FL3731_I2C_PERSISTENCE 0
#endif
// Transfer buffer for TWITransmitData()
@@ -66,47 +58,24 @@ uint8_t g_twi_transfer_buffer[20];
// We could optimize this and take out the unused registers from these
// buffers and the transfers in is31fl3731_write_pwm_buffer() but it's
// probably not worth the extra complexity.
-uint8_t g_pwm_buffer[LED_DRIVER_COUNT][144];
-bool g_pwm_buffer_update_required[LED_DRIVER_COUNT] = {false};
-
-/* There's probably a better way to init this... */
-#if LED_DRIVER_COUNT == 1
-uint8_t g_led_control_registers[LED_DRIVER_COUNT][18] = {{0}};
-#elif LED_DRIVER_COUNT == 2
-uint8_t g_led_control_registers[LED_DRIVER_COUNT][18] = {{0}, {0}};
-#elif LED_DRIVER_COUNT == 3
-uint8_t g_led_control_registers[LED_DRIVER_COUNT][18] = {{0}, {0}, {0}};
-#elif LED_DRIVER_COUNT == 4
-uint8_t g_led_control_registers[LED_DRIVER_COUNT][18] = {{0}, {0}, {0}, {0}};
-#endif
-bool g_led_control_registers_update_required[LED_DRIVER_COUNT] = {false};
-
-// This is the bit pattern in the LED control registers
-// (for matrix A, add one to register for matrix B)
-//
-// reg - b7 b6 b5 b4 b3 b2 b1 b0
-// 0x00 - R08,R07,R06,R05,R04,R03,R02,R01
-// 0x02 - G08,G07,G06,G05,G04,G03,G02,R00
-// 0x04 - B08,B07,B06,B05,B04,B03,G01,G00
-// 0x06 - - , - , - , - , - ,B02,B01,B00
-// 0x08 - - , - , - , - , - , - , - , -
-// 0x0A - B17,B16,B15, - , - , - , - , -
-// 0x0C - G17,G16,B14,B13,B12,B11,B10,B09
-// 0x0E - R17,G15,G14,G13,G12,G11,G10,G09
-// 0x10 - R16,R15,R14,R13,R12,R11,R10,R09
+uint8_t g_pwm_buffer[IS31FL3731_DRIVER_COUNT][144];
+bool g_pwm_buffer_update_required[IS31FL3731_DRIVER_COUNT] = {false};
+
+uint8_t g_led_control_registers[IS31FL3731_DRIVER_COUNT][18] = {0};
+bool g_led_control_registers_update_required[IS31FL3731_DRIVER_COUNT] = {false};
void is31fl3731_write_register(uint8_t addr, uint8_t reg, uint8_t data) {
g_twi_transfer_buffer[0] = reg;
g_twi_transfer_buffer[1] = data;
-#if ISSI_PERSISTENCE > 0
- for (uint8_t i = 0; i < ISSI_PERSISTENCE; i++) {
- if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, ISSI_TIMEOUT) == 0) {
+#if IS31FL3731_I2C_PERSISTENCE > 0
+ for (uint8_t i = 0; i < IS31FL3731_I2C_PERSISTENCE; i++) {
+ if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, IS31FL3731_I2C_TIMEOUT) == 0) {
break;
}
}
#else
- i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, ISSI_TIMEOUT);
+ i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, IS31FL3731_I2C_TIMEOUT);
#endif
}
@@ -125,12 +94,12 @@ void is31fl3731_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer) {
// thus this sets registers 0x24-0x33, 0x34-0x43, etc. in one transfer
memcpy(g_twi_transfer_buffer + 1, pwm_buffer + i, 16);
-#if ISSI_PERSISTENCE > 0
- for (uint8_t i = 0; i < ISSI_PERSISTENCE; i++) {
- if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, ISSI_TIMEOUT) == 0) break;
+#if IS31FL3731_I2C_PERSISTENCE > 0
+ for (uint8_t i = 0; i < IS31FL3731_I2C_PERSISTENCE; i++) {
+ if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, IS31FL3731_I2C_TIMEOUT) == 0) break;
}
#else
- i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, ISSI_TIMEOUT);
+ i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, IS31FL3731_I2C_TIMEOUT);
#endif
}
}
@@ -142,26 +111,26 @@ void is31fl3731_init(uint8_t addr) {
// then disable software shutdown.
// select "function register" bank
- is31fl3731_write_register(addr, ISSI_COMMANDREGISTER, ISSI_BANK_FUNCTIONREG);
+ is31fl3731_write_register(addr, IS31FL3731_COMMANDREGISTER, IS31FL3731_BANK_FUNCTIONREG);
// enable software shutdown
- is31fl3731_write_register(addr, ISSI_REG_SHUTDOWN, 0x00);
-#ifdef ISSI_3731_DEGHOST // set to enable de-ghosting of the array
- is31fl3731_write_register(addr, ISSI_REG_GHOST_IMAGE_PREVENTION, 0x10);
+ is31fl3731_write_register(addr, IS31FL3731_REG_SHUTDOWN, 0x00);
+#ifdef IS31FL3731_DEGHOST // set to enable de-ghosting of the array
+ is31fl3731_write_register(addr, IS31FL3731_REG_GHOST_IMAGE_PREVENTION, 0x10);
#endif
// this delay was copied from other drivers, might not be needed
wait_ms(10);
// picture mode
- is31fl3731_write_register(addr, ISSI_REG_CONFIG, ISSI_REG_CONFIG_PICTUREMODE);
+ is31fl3731_write_register(addr, IS31FL3731_REG_CONFIG, IS31FL3731_REG_CONFIG_PICTUREMODE);
// display frame 0
- is31fl3731_write_register(addr, ISSI_REG_PICTUREFRAME, 0x00);
+ is31fl3731_write_register(addr, IS31FL3731_REG_PICTUREFRAME, 0x00);
// audio sync off
- is31fl3731_write_register(addr, ISSI_REG_AUDIOSYNC, 0x00);
+ is31fl3731_write_register(addr, IS31FL3731_REG_AUDIOSYNC, 0x00);
// select bank 0
- is31fl3731_write_register(addr, ISSI_COMMANDREGISTER, 0);
+ is31fl3731_write_register(addr, IS31FL3731_COMMANDREGISTER, 0);
// turn off all LEDs in the LED control register
for (int i = 0x00; i <= 0x11; i++) {
@@ -179,21 +148,21 @@ void is31fl3731_init(uint8_t addr) {
}
// select "function register" bank
- is31fl3731_write_register(addr, ISSI_COMMANDREGISTER, ISSI_BANK_FUNCTIONREG);
+ is31fl3731_write_register(addr, IS31FL3731_COMMANDREGISTER, IS31FL3731_BANK_FUNCTIONREG);
// disable software shutdown
- is31fl3731_write_register(addr, ISSI_REG_SHUTDOWN, 0x01);
+ is31fl3731_write_register(addr, IS31FL3731_REG_SHUTDOWN, 0x01);
// select bank 0 and leave it selected.
// most usage after initialization is just writing PWM buffers in bank 0
// as there's not much point in double-buffering
- is31fl3731_write_register(addr, ISSI_COMMANDREGISTER, 0);
+ is31fl3731_write_register(addr, IS31FL3731_COMMANDREGISTER, 0);
}
void is31fl3731_set_value(int index, uint8_t value) {
- is31_led led;
+ is31fl3731_led_t led;
if (index >= 0 && index < LED_MATRIX_LED_COUNT) {
- memcpy_P(&led, (&g_is31_leds[index]), sizeof(led));
+ memcpy_P(&led, (&g_is31fl3731_leds[index]), sizeof(led));
// Subtract 0x24 to get the second index of g_pwm_buffer
@@ -212,8 +181,8 @@ void is31fl3731_set_value_all(uint8_t value) {
}
void is31fl3731_set_led_control_register(uint8_t index, bool value) {
- is31_led led;
- memcpy_P(&led, (&g_is31_leds[index]), sizeof(led));
+ is31fl3731_led_t led;
+ memcpy_P(&led, (&g_is31fl3731_leds[index]), sizeof(led));
uint8_t control_register = (led.v - 0x24) / 8;
uint8_t bit_value = (led.v - 0x24) % 8;
diff --git a/drivers/led/issi/is31fl3731-simple.h b/drivers/led/issi/is31fl3731-simple.h
index 69fba14a0b..940ad413d8 100644
--- a/drivers/led/issi/is31fl3731-simple.h
+++ b/drivers/led/issi/is31fl3731-simple.h
@@ -20,15 +20,37 @@
#include <stdint.h>
#include <stdbool.h>
-#include <string.h>
#include "progmem.h"
-typedef struct is31_led {
+// ======== DEPRECATED DEFINES - DO NOT USE ========
+#ifdef LED_DRIVER_COUNT
+# define IS31FL3731_DRIVER_COUNT LED_DRIVER_COUNT
+#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_I2C_ADDRESS_GND 0x74
+#define IS31FL3731_I2C_ADDRESS_SCL 0x75
+#define IS31FL3731_I2C_ADDRESS_SDA 0x76
+#define IS31FL3731_I2C_ADDRESS_VCC 0x77
+
+typedef struct is31fl3731_led_t {
uint8_t driver : 2;
uint8_t v;
-} __attribute__((packed)) is31_led;
+} __attribute__((packed)) is31fl3731_led_t;
-extern const is31_led PROGMEM g_is31_leds[LED_MATRIX_LED_COUNT];
+extern const is31fl3731_led_t PROGMEM g_is31fl3731_leds[LED_MATRIX_LED_COUNT];
void is31fl3731_init(uint8_t addr);
void is31fl3731_write_register(uint8_t addr, uint8_t reg, uint8_t data);
diff --git a/drivers/led/issi/is31fl3731.c b/drivers/led/issi/is31fl3731.c
index 15a01b6d75..a30e8fcbc2 100644
--- a/drivers/led/issi/is31fl3731.c
+++ b/drivers/led/issi/is31fl3731.c
@@ -17,44 +17,36 @@
*/
#include "is31fl3731.h"
+#include <string.h>
#include "i2c_master.h"
#include "wait.h"
-// This is a 7-bit address, that gets left-shifted and bit 0
-// set to 0 for write, 1 for read (as per I2C protocol)
-// The address will vary depending on your wiring:
-// 0b1110100 AD <-> GND
-// 0b1110111 AD <-> VCC
-// 0b1110101 AD <-> SCL
-// 0b1110110 AD <-> SDA
-#define ISSI_ADDR_DEFAULT 0x74
+#define IS31FL3731_REG_CONFIG 0x00
+#define IS31FL3731_REG_CONFIG_PICTUREMODE 0x00
+#define IS31FL3731_REG_CONFIG_AUTOPLAYMODE 0x08
+#define IS31FL3731_REG_CONFIG_AUDIOPLAYMODE 0x18
-#define ISSI_REG_CONFIG 0x00
-#define ISSI_REG_CONFIG_PICTUREMODE 0x00
-#define ISSI_REG_CONFIG_AUTOPLAYMODE 0x08
-#define ISSI_REG_CONFIG_AUDIOPLAYMODE 0x18
+#define IS31FL3731_CONF_PICTUREMODE 0x00
+#define IS31FL3731_CONF_AUTOFRAMEMODE 0x04
+#define IS31FL3731_CONF_AUDIOMODE 0x08
-#define ISSI_CONF_PICTUREMODE 0x00
-#define ISSI_CONF_AUTOFRAMEMODE 0x04
-#define ISSI_CONF_AUDIOMODE 0x08
-
-#define ISSI_REG_PICTUREFRAME 0x01
+#define IS31FL3731_REG_PICTUREFRAME 0x01
// Not defined in the datasheet -- See AN for IC
-#define ISSI_REG_GHOST_IMAGE_PREVENTION 0xC2 // Set bit 4 to enable de-ghosting
+#define IS31FL3731_REG_GHOST_IMAGE_PREVENTION 0xC2 // Set bit 4 to enable de-ghosting
-#define ISSI_REG_SHUTDOWN 0x0A
-#define ISSI_REG_AUDIOSYNC 0x06
+#define IS31FL3731_REG_SHUTDOWN 0x0A
+#define IS31FL3731_REG_AUDIOSYNC 0x06
-#define ISSI_COMMANDREGISTER 0xFD
-#define ISSI_BANK_FUNCTIONREG 0x0B // helpfully called 'page nine'
+#define IS31FL3731_COMMANDREGISTER 0xFD
+#define IS31FL3731_BANK_FUNCTIONREG 0x0B // helpfully called 'page nine'
-#ifndef ISSI_TIMEOUT
-# define ISSI_TIMEOUT 100
+#ifndef IS31FL3731_I2C_TIMEOUT
+# define IS31FL3731_I2C_TIMEOUT 100
#endif
-#ifndef ISSI_PERSISTENCE
-# define ISSI_PERSISTENCE 0
+#ifndef IS31FL3731_I2C_PERSISTENCE
+# define IS31FL3731_I2C_PERSISTENCE 0
#endif
// Transfer buffer for TWITransmitData()
@@ -65,36 +57,22 @@ uint8_t g_twi_transfer_buffer[20];
// We could optimize this and take out the unused registers from these
// buffers and the transfers in is31fl3731_write_pwm_buffer() but it's
// probably not worth the extra complexity.
-uint8_t g_pwm_buffer[DRIVER_COUNT][144];
-bool g_pwm_buffer_update_required[DRIVER_COUNT] = {false};
-
-uint8_t g_led_control_registers[DRIVER_COUNT][18] = {{0}};
-bool g_led_control_registers_update_required[DRIVER_COUNT] = {false};
-
-// This is the bit pattern in the LED control registers
-// (for matrix A, add one to register for matrix B)
-//
-// reg - b7 b6 b5 b4 b3 b2 b1 b0
-// 0x00 - R08,R07,R06,R05,R04,R03,R02,R01
-// 0x02 - G08,G07,G06,G05,G04,G03,G02,R00
-// 0x04 - B08,B07,B06,B05,B04,B03,G01,G00
-// 0x06 - - , - , - , - , - ,B02,B01,B00
-// 0x08 - - , - , - , - , - , - , - , -
-// 0x0A - B17,B16,B15, - , - , - , - , -
-// 0x0C - G17,G16,B14,B13,B12,B11,B10,B09
-// 0x0E - R17,G15,G14,G13,G12,G11,G10,G09
-// 0x10 - R16,R15,R14,R13,R12,R11,R10,R09
+uint8_t g_pwm_buffer[IS31FL3731_DRIVER_COUNT][144];
+bool g_pwm_buffer_update_required[IS31FL3731_DRIVER_COUNT] = {false};
+
+uint8_t g_led_control_registers[IS31FL3731_DRIVER_COUNT][18] = {0};
+bool g_led_control_registers_update_required[IS31FL3731_DRIVER_COUNT] = {false};
void is31fl3731_write_register(uint8_t addr, uint8_t reg, uint8_t data) {
g_twi_transfer_buffer[0] = reg;
g_twi_transfer_buffer[1] = data;
-#if ISSI_PERSISTENCE > 0
- for (uint8_t i = 0; i < ISSI_PERSISTENCE; i++) {
- if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, ISSI_TIMEOUT) == 0) break;
+#if IS31FL3731_I2C_PERSISTENCE > 0
+ for (uint8_t i = 0; i < IS31FL3731_I2C_PERSISTENCE; i++) {
+ if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, IS31FL3731_I2C_TIMEOUT) == 0) break;
}
#else
- i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, ISSI_TIMEOUT);
+ i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, IS31FL3731_I2C_TIMEOUT);
#endif
}
@@ -113,12 +91,12 @@ void is31fl3731_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer) {
// thus this sets registers 0x24-0x33, 0x34-0x43, etc. in one transfer
memcpy(g_twi_transfer_buffer + 1, pwm_buffer + i, 16);
-#if ISSI_PERSISTENCE > 0
- for (uint8_t i = 0; i < ISSI_PERSISTENCE; i++) {
- if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, ISSI_TIMEOUT) == 0) break;
+#if IS31FL3731_I2C_PERSISTENCE > 0
+ for (uint8_t i = 0; i < IS31FL3731_I2C_PERSISTENCE; i++) {
+ if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, IS31FL3731_I2C_TIMEOUT) == 0) break;
}
#else
- i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, ISSI_TIMEOUT);
+ i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, IS31FL3731_I2C_TIMEOUT);
#endif
}
}
@@ -130,26 +108,26 @@ void is31fl3731_init(uint8_t addr) {
// then disable software shutdown.
// select "function register" bank
- is31fl3731_write_register(addr, ISSI_COMMANDREGISTER, ISSI_BANK_FUNCTIONREG);
+ is31fl3731_write_register(addr, IS31FL3731_COMMANDREGISTER, IS31FL3731_BANK_FUNCTIONREG);
// enable software shutdown
- is31fl3731_write_register(addr, ISSI_REG_SHUTDOWN, 0x00);
-#ifdef ISSI_3731_DEGHOST // set to enable de-ghosting of the array
- is31fl3731_write_register(addr, ISSI_REG_GHOST_IMAGE_PREVENTION, 0x10);
+ is31fl3731_write_register(addr, IS31FL3731_REG_SHUTDOWN, 0x00);
+#ifdef IS31FL3731_DEGHOST // set to enable de-ghosting of the array
+ is31fl3731_write_register(addr, IS31FL3731_REG_GHOST_IMAGE_PREVENTION, 0x10);
#endif
// this delay was copied from other drivers, might not be needed
wait_ms(10);
// picture mode
- is31fl3731_write_register(addr, ISSI_REG_CONFIG, ISSI_REG_CONFIG_PICTUREMODE);
+ is31fl3731_write_register(addr, IS31FL3731_REG_CONFIG, IS31FL3731_REG_CONFIG_PICTUREMODE);
// display frame 0
- is31fl3731_write_register(addr, ISSI_REG_PICTUREFRAME, 0x00);
+ is31fl3731_write_register(addr, IS31FL3731_REG_PICTUREFRAME, 0x00);
// audio sync off
- is31fl3731_write_register(addr, ISSI_REG_AUDIOSYNC, 0x00);
+ is31fl3731_write_register(addr, IS31FL3731_REG_AUDIOSYNC, 0x00);
// select bank 0
- is31fl3731_write_register(addr, ISSI_COMMANDREGISTER, 0);
+ is31fl3731_write_register(addr, IS31FL3731_COMMANDREGISTER, 0);
// turn off all LEDs in the LED control register
for (int i = 0x00; i <= 0x11; i++) {
@@ -167,21 +145,21 @@ void is31fl3731_init(uint8_t addr) {
}
// select "function register" bank
- is31fl3731_write_register(addr, ISSI_COMMANDREGISTER, ISSI_BANK_FUNCTIONREG);
+ is31fl3731_write_register(addr, IS31FL3731_COMMANDREGISTER, IS31FL3731_BANK_FUNCTIONREG);
// disable software shutdown
- is31fl3731_write_register(addr, ISSI_REG_SHUTDOWN, 0x01);
+ is31fl3731_write_register(addr, IS31FL3731_REG_SHUTDOWN, 0x01);
// select bank 0 and leave it selected.
// most usage after initialization is just writing PWM buffers in bank 0
// as there's not much point in double-buffering
- is31fl3731_write_register(addr, ISSI_COMMANDREGISTER, 0);
+ is31fl3731_write_register(addr, IS31FL3731_COMMANDREGISTER, 0);
}
void is31fl3731_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) {
- is31_led led;
+ is31fl3731_led_t led;
if (index >= 0 && index < RGB_MATRIX_LED_COUNT) {
- memcpy_P(&led, (&g_is31_leds[index]), sizeof(led));
+ memcpy_P(&led, (&g_is31fl3731_leds[index]), sizeof(led));
// Subtract 0x24 to get the second index of g_pwm_buffer
if (g_pwm_buffer[led.driver][led.r - 0x24] == red && g_pwm_buffer[led.driver][led.g - 0x24] == green && g_pwm_buffer[led.driver][led.b - 0x24] == blue) {
@@ -201,8 +179,8 @@ void is31fl3731_set_color_all(uint8_t red, uint8_t green, uint8_t blue) {
}
void is31fl3731_set_led_control_register(uint8_t index, bool red, bool green, bool blue) {
- is31_led led;
- memcpy_P(&led, (&g_is31_leds[index]), sizeof(led));
+ is31fl3731_led_t led;
+ memcpy_P(&led, (&g_is31fl3731_leds[index]), sizeof(led));
uint8_t control_register_r = (led.r - 0x24) / 8;
uint8_t control_register_g = (led.g - 0x24) / 8;
diff --git a/drivers/led/issi/is31fl3731.h b/drivers/led/issi/is31fl3731.h
index bdf03de1ee..1e70eb276f 100644
--- a/drivers/led/issi/is31fl3731.h
+++ b/drivers/led/issi/is31fl3731.h
@@ -19,17 +19,39 @@
#include <stdint.h>
#include <stdbool.h>
-#include <string.h>
#include "progmem.h"
-typedef struct is31_led {
+// ======== DEPRECATED DEFINES - DO NOT USE ========
+#ifdef DRIVER_COUNT
+# define IS31FL3731_DRIVER_COUNT DRIVER_COUNT
+#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_I2C_ADDRESS_GND 0x74
+#define IS31FL3731_I2C_ADDRESS_SCL 0x75
+#define IS31FL3731_I2C_ADDRESS_SDA 0x76
+#define IS31FL3731_I2C_ADDRESS_VCC 0x77
+
+typedef struct is31fl3731_led_t {
uint8_t driver : 2;
uint8_t r;
uint8_t g;
uint8_t b;
-} __attribute__((packed)) is31_led;
+} __attribute__((packed)) is31fl3731_led_t;
-extern const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT];
+extern const is31fl3731_led_t PROGMEM g_is31fl3731_leds[RGB_MATRIX_LED_COUNT];
void is31fl3731_init(uint8_t addr);
void is31fl3731_write_register(uint8_t addr, uint8_t reg, uint8_t data);
diff --git a/drivers/led/issi/is31fl3733-simple.c b/drivers/led/issi/is31fl3733-simple.c
index f9a0a271a8..e94b4c7d78 100644
--- a/drivers/led/issi/is31fl3733-simple.c
+++ b/drivers/led/issi/is31fl3733-simple.c
@@ -19,59 +19,48 @@
*/
#include "is31fl3733-simple.h"
+#include <string.h>
#include "i2c_master.h"
#include "wait.h"
-// This is a 7-bit address, that gets left-shifted and bit 0
-// set to 0 for write, 1 for read (as per I2C protocol)
-// The address will vary depending on your wiring:
-// 00 <-> GND
-// 01 <-> SCL
-// 10 <-> SDA
-// 11 <-> VCC
-// ADDR1 represents A1:A0 of the 7-bit address.
-// ADDR2 represents A3:A2 of the 7-bit address.
-// The result is: 0b101(ADDR2)(ADDR1)
-#define ISSI_ADDR_DEFAULT 0x50
-
-#define ISSI_COMMANDREGISTER 0xFD
-#define ISSI_COMMANDREGISTER_WRITELOCK 0xFE
-#define ISSI_INTERRUPTMASKREGISTER 0xF0
-#define ISSI_INTERRUPTSTATUSREGISTER 0xF1
-
-#define ISSI_PAGE_LEDCONTROL 0x00 // PG0
-#define ISSI_PAGE_PWM 0x01 // PG1
-#define ISSI_PAGE_AUTOBREATH 0x02 // PG2
-#define ISSI_PAGE_FUNCTION 0x03 // PG3
-
-#define ISSI_REG_CONFIGURATION 0x00 // PG3
-#define ISSI_REG_GLOBALCURRENT 0x01 // PG3
-#define ISSI_REG_RESET 0x11 // PG3
-#define ISSI_REG_SWPULLUP 0x0F // PG3
-#define ISSI_REG_CSPULLUP 0x10 // PG3
-
-#ifndef ISSI_TIMEOUT
-# define ISSI_TIMEOUT 100
+#define IS31FL3733_COMMANDREGISTER 0xFD
+#define IS31FL3733_COMMANDREGISTER_WRITELOCK 0xFE
+#define IS31FL3733_INTERRUPTMASKREGISTER 0xF0
+#define IS31FL3733_INTERRUPTSTATUSREGISTER 0xF1
+
+#define IS31FL3733_PAGE_LEDCONTROL 0x00 // PG0
+#define IS31FL3733_PAGE_PWM 0x01 // PG1
+#define IS31FL3733_PAGE_AUTOBREATH 0x02 // PG2
+#define IS31FL3733_PAGE_FUNCTION 0x03 // PG3
+
+#define IS31FL3733_REG_CONFIGURATION 0x00 // PG3
+#define IS31FL3733_REG_GLOBALCURRENT 0x01 // PG3
+#define IS31FL3733_REG_RESET 0x11 // PG3
+#define IS31FL3733_REG_SWPULLUP 0x0F // PG3
+#define IS31FL3733_REG_CSPULLUP 0x10 // PG3
+
+#ifndef IS31FL3733_I2C_TIMEOUT
+# define IS31FL3733_I2C_TIMEOUT 100
#endif
-#ifndef ISSI_PERSISTENCE
-# define ISSI_PERSISTENCE 0
+#ifndef IS31FL3733_I2C_PERSISTENCE
+# define IS31FL3733_I2C_PERSISTENCE 0
#endif
-#ifndef ISSI_PWM_FREQUENCY
-# define ISSI_PWM_FREQUENCY 0b000 // PFS - IS31FL3733B only
+#ifndef IS31FL3733_PWM_FREQUENCY
+# define IS31FL3733_PWM_FREQUENCY IS31FL3733_PWM_FREQUENCY_8K4_HZ // PFS - IS31FL3733B only
#endif
-#ifndef ISSI_SWPULLUP
-# define ISSI_SWPULLUP PUR_0R
+#ifndef IS31FL3733_SWPULLUP
+# define IS31FL3733_SWPULLUP IS31FL3733_PUR_0R
#endif
-#ifndef ISSI_CSPULLUP
-# define ISSI_CSPULLUP PUR_0R
+#ifndef IS31FL3733_CSPULLUP
+# define IS31FL3733_CSPULLUP IS31FL3733_PUR_0R
#endif
-#ifndef ISSI_GLOBALCURRENT
-# define ISSI_GLOBALCURRENT 0xFF
+#ifndef IS31FL3733_GLOBALCURRENT
+# define IS31FL3733_GLOBALCURRENT 0xFF
#endif
// Transfer buffer for TWITransmitData()
@@ -83,34 +72,25 @@ uint8_t g_twi_transfer_buffer[20];
// We could optimize this and take out the unused registers from these
// buffers and the transfers in is31fl3733_write_pwm_buffer() but it's
// probably not worth the extra complexity.
-uint8_t g_pwm_buffer[LED_DRIVER_COUNT][192];
-bool g_pwm_buffer_update_required[LED_DRIVER_COUNT] = {false};
-
-/* There's probably a better way to init this... */
-#if LED_DRIVER_COUNT == 1
-uint8_t g_led_control_registers[LED_DRIVER_COUNT][24] = {{0}};
-#elif LED_DRIVER_COUNT == 2
-uint8_t g_led_control_registers[LED_DRIVER_COUNT][24] = {{0}, {0}};
-#elif LED_DRIVER_COUNT == 3
-uint8_t g_led_control_registers[LED_DRIVER_COUNT][24] = {{0}, {0}, {0}};
-#elif LED_DRIVER_COUNT == 4
-uint8_t g_led_control_registers[LED_DRIVER_COUNT][24] = {{0}, {0}, {0}, {0}};
-#endif
-bool g_led_control_registers_update_required[LED_DRIVER_COUNT] = {false};
+uint8_t g_pwm_buffer[IS31FL3733_DRIVER_COUNT][192];
+bool g_pwm_buffer_update_required[IS31FL3733_DRIVER_COUNT] = {false};
+
+uint8_t g_led_control_registers[IS31FL3733_DRIVER_COUNT][24] = {0};
+bool g_led_control_registers_update_required[IS31FL3733_DRIVER_COUNT] = {false};
bool is31fl3733_write_register(uint8_t addr, uint8_t reg, uint8_t data) {
// If the transaction fails function returns false.
g_twi_transfer_buffer[0] = reg;
g_twi_transfer_buffer[1] = data;
-#if ISSI_PERSISTENCE > 0
- for (uint8_t i = 0; i < ISSI_PERSISTENCE; i++) {
- if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, ISSI_TIMEOUT) != 0) {
+#if IS31FL3733_I2C_PERSISTENCE > 0
+ for (uint8_t i = 0; i < IS31FL3733_I2C_PERSISTENCE; i++) {
+ if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, IS31FL3733_I2C_TIMEOUT) != 0) {
return false;
}
}
#else
- if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, ISSI_TIMEOUT) != 0) {
+ if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, IS31FL3733_I2C_TIMEOUT) != 0) {
return false;
}
#endif
@@ -131,14 +111,14 @@ bool is31fl3733_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer) {
// Thus this sets registers 0x00-0x0F, 0x10-0x1F, etc. in one transfer.
memcpy(g_twi_transfer_buffer + 1, pwm_buffer + i, 16);
-#if ISSI_PERSISTENCE > 0
- for (uint8_t i = 0; i < ISSI_PERSISTENCE; i++) {
- if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, ISSI_TIMEOUT) != 0) {
+#if IS31FL3733_I2C_PERSISTENCE > 0
+ for (uint8_t i = 0; i < IS31FL3733_I2C_PERSISTENCE; i++) {
+ if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, IS31FL3733_I2C_TIMEOUT) != 0) {
return false;
}
}
#else
- if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, ISSI_TIMEOUT) != 0) {
+ if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, IS31FL3733_I2C_TIMEOUT) != 0) {
return false;
}
#endif
@@ -154,20 +134,20 @@ void is31fl3733_init(uint8_t addr, uint8_t sync) {
// Sync is passed so set it according to the datasheet.
// Unlock the command register.
- is31fl3733_write_register(addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5);
+ is31fl3733_write_register(addr, IS31FL3733_COMMANDREGISTER_WRITELOCK, 0xC5);
// Select PG0
- is31fl3733_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_LEDCONTROL);
+ is31fl3733_write_register(addr, IS31FL3733_COMMANDREGISTER, IS31FL3733_PAGE_LEDCONTROL);
// Turn off all LEDs.
for (int i = 0x00; i <= 0x17; i++) {
is31fl3733_write_register(addr, i, 0x00);
}
// Unlock the command register.
- is31fl3733_write_register(addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5);
+ is31fl3733_write_register(addr, IS31FL3733_COMMANDREGISTER_WRITELOCK, 0xC5);
// Select PG1
- is31fl3733_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_PWM);
+ is31fl3733_write_register(addr, IS31FL3733_COMMANDREGISTER, IS31FL3733_PAGE_PWM);
// Set PWM on all LEDs to 0
// No need to setup Breath registers to PWM as that is the default.
for (int i = 0x00; i <= 0xBF; i++) {
@@ -175,27 +155,27 @@ void is31fl3733_init(uint8_t addr, uint8_t sync) {
}
// Unlock the command register.
- is31fl3733_write_register(addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5);
+ is31fl3733_write_register(addr, IS31FL3733_COMMANDREGISTER_WRITELOCK, 0xC5);
// Select PG3
- is31fl3733_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_FUNCTION);
+ is31fl3733_write_register(addr, IS31FL3733_COMMANDREGISTER, IS31FL3733_PAGE_FUNCTION);
// Set de-ghost pull-up resistors (SWx)
- is31fl3733_write_register(addr, ISSI_REG_SWPULLUP, ISSI_SWPULLUP);
+ is31fl3733_write_register(addr, IS31FL3733_REG_SWPULLUP, IS31FL3733_SWPULLUP);
// Set de-ghost pull-down resistors (CSx)
- is31fl3733_write_register(addr, ISSI_REG_CSPULLUP, ISSI_CSPULLUP);
+ is31fl3733_write_register(addr, IS31FL3733_REG_CSPULLUP, IS31FL3733_CSPULLUP);
// Set global current to maximum.
- is31fl3733_write_register(addr, ISSI_REG_GLOBALCURRENT, ISSI_GLOBALCURRENT);
+ is31fl3733_write_register(addr, IS31FL3733_REG_GLOBALCURRENT, IS31FL3733_GLOBALCURRENT);
// Disable software shutdown.
- is31fl3733_write_register(addr, ISSI_REG_CONFIGURATION, ((sync & 0b11) << 6) | ((ISSI_PWM_FREQUENCY & 0b111) << 3) | 0x01);
+ is31fl3733_write_register(addr, IS31FL3733_REG_CONFIGURATION, ((sync & 0b11) << 6) | ((IS31FL3733_PWM_FREQUENCY & 0b111) << 3) | 0x01);
// Wait 10ms to ensure the device has woken up.
wait_ms(10);
}
void is31fl3733_set_value(int index, uint8_t value) {
- is31_led led;
+ is31fl3733_led_t led;
if (index >= 0 && index < LED_MATRIX_LED_COUNT) {
- memcpy_P(&led, (&g_is31_leds[index]), sizeof(led));
+ memcpy_P(&led, (&g_is31fl3733_leds[index]), sizeof(led));
if (g_pwm_buffer[led.driver][led.v] == value) {
return;
@@ -212,8 +192,8 @@ void is31fl3733_set_value_all(uint8_t value) {
}
void is31fl3733_set_led_control_register(uint8_t index, bool value) {
- is31_led led;
- memcpy_P(&led, (&g_is31_leds[index]), sizeof(led));
+ is31fl3733_led_t led;
+ memcpy_P(&led, (&g_is31fl3733_leds[index]), sizeof(led));
uint8_t control_register = led.v / 8;
uint8_t bit_value = led.v % 8;
@@ -230,8 +210,8 @@ void is31fl3733_set_led_control_register(uint8_t index, bool value) {
void is31fl3733_update_pwm_buffers(uint8_t addr, uint8_t index) {
if (g_pwm_buffer_update_required[index]) {
// Firstly we need to unlock the command register and select PG1.
- is31fl3733_write_register(addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5);
- is31fl3733_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_PWM);
+ is31fl3733_write_register(addr, IS31FL3733_COMMANDREGISTER_WRITELOCK, 0xC5);
+ is31fl3733_write_register(addr, IS31FL3733_COMMANDREGISTER, IS31FL3733_PAGE_PWM);
// If any of the transactions fail we risk writing dirty PG0,
// refresh page 0 just in case.
@@ -245,8 +225,8 @@ void is31fl3733_update_pwm_buffers(uint8_t addr, uint8_t index) {
void is31fl3733_update_led_control_registers(uint8_t addr, uint8_t index) {
if (g_led_control_registers_update_required[index]) {
// Firstly we need to unlock the command register and select PG0
- is31fl3733_write_register(addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5);
- is31fl3733_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_LEDCONTROL);
+ is31fl3733_write_register(addr, IS31FL3733_COMMANDREGISTER_WRITELOCK, 0xC5);
+ is31fl3733_write_register(addr, IS31FL3733_COMMANDREGISTER, IS31FL3733_PAGE_LEDCONTROL);
for (int i = 0; i < 24; i++) {
is31fl3733_write_register(addr, i, g_led_control_registers[index][i]);
}
diff --git a/drivers/led/issi/is31fl3733-simple.h b/drivers/led/issi/is31fl3733-simple.h
index 1458f7ac8d..8041a7f0f3 100644
--- a/drivers/led/issi/is31fl3733-simple.h
+++ b/drivers/led/issi/is31fl3733-simple.h
@@ -22,15 +22,66 @@
#include <stdint.h>
#include <stdbool.h>
-#include <string.h>
#include "progmem.h"
-typedef struct is31_led {
+// ======== DEPRECATED DEFINES - DO NOT USE ========
+#ifdef LED_DRIVER_COUNT
+# define IS31FL3733_DRIVER_COUNT LED_DRIVER_COUNT
+#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_SWPULLUP ISSI_SWPULLUP
+#endif
+#ifdef ISSI_CSPULLUP
+# define IS31FL3733_CSPULLUP ISSI_CSPULLUP
+#endif
+#ifdef ISSI_GLOBALCURRENT
+# define IS31FL3733_GLOBALCURRENT ISSI_GLOBALCURRENT
+#endif
+
+#define is31_led is31fl3733_led_t
+#define g_is31_leds g_is31fl3733_leds
+
+#define PUR_0R IS31FL3733_PUR_0R
+#define PUR_05KR IS31FL3733_PUR_05KR
+#define PUR_3KR IS31FL3733_PUR_3KR
+#define PUR_4KR IS31FL3733_PUR_4KR
+#define PUR_8KR IS31FL3733_PUR_8KR
+#define PUR_16KR IS31FL3733_PUR_16KR
+#define PUR_32KR IS31FL3733_PUR_32KR
+// ========
+
+#define IS31FL3733_I2C_ADDRESS_GND_GND 0x50
+#define IS31FL3733_I2C_ADDRESS_GND_SCL 0x51
+#define IS31FL3733_I2C_ADDRESS_GND_SDA 0x52
+#define IS31FL3733_I2C_ADDRESS_GND_VCC 0x53
+#define IS31FL3733_I2C_ADDRESS_SCL_GND 0x54
+#define IS31FL3733_I2C_ADDRESS_SCL_SCL 0x55
+#define IS31FL3733_I2C_ADDRESS_SCL_SDA 0x56
+#define IS31FL3733_I2C_ADDRESS_SCL_VCC 0x57
+#define IS31FL3733_I2C_ADDRESS_SDA_GND 0x58
+#define IS31FL3733_I2C_ADDRESS_SDA_SCL 0x59
+#define IS31FL3733_I2C_ADDRESS_SDA_SDA 0x5A
+#define IS31FL3733_I2C_ADDRESS_SDA_VCC 0x5B
+#define IS31FL3733_I2C_ADDRESS_VCC_GND 0x5C
+#define IS31FL3733_I2C_ADDRESS_VCC_SCL 0x5D
+#define IS31FL3733_I2C_ADDRESS_VCC_SDA 0x5E
+#define IS31FL3733_I2C_ADDRESS_VCC_VCC 0x5F
+
+typedef struct is31fl3733_led_t {
uint8_t driver : 2;
uint8_t v;
-} __attribute__((packed)) is31_led;
+} __attribute__((packed)) is31fl3733_led_t;
-extern const is31_led PROGMEM g_is31_leds[LED_MATRIX_LED_COUNT];
+extern const is31fl3733_led_t PROGMEM g_is31fl3733_leds[LED_MATRIX_LED_COUNT];
void is31fl3733_init(uint8_t addr, uint8_t sync);
bool is31fl3733_write_register(uint8_t addr, uint8_t reg, uint8_t data);
@@ -48,13 +99,19 @@ void is31fl3733_set_led_control_register(uint8_t index, bool value);
void is31fl3733_update_pwm_buffers(uint8_t addr, uint8_t index);
void is31fl3733_update_led_control_registers(uint8_t addr, uint8_t index);
-#define PUR_0R 0x00 // No PUR resistor
-#define PUR_05KR 0x02 // 0.5k Ohm resistor in t_NOL
-#define PUR_3KR 0x03 // 3.0k Ohm resistor on all the time
-#define PUR_4KR 0x04 // 4.0k Ohm resistor on all the time
-#define PUR_8KR 0x05 // 8.0k Ohm resistor on all the time
-#define PUR_16KR 0x06 // 16k Ohm resistor on all the time
-#define PUR_32KR 0x07 // 32k Ohm resistor in t_NOL
+#define IS31FL3733_PUR_0R 0x00 // No PUR resistor
+#define IS31FL3733_PUR_05KR 0x02 // 0.5k Ohm resistor in t_NOL
+#define IS31FL3733_PUR_3KR 0x03 // 3.0k Ohm resistor on all the time
+#define IS31FL3733_PUR_4KR 0x04 // 4.0k Ohm resistor on all the time
+#define IS31FL3733_PUR_8KR 0x05 // 8.0k Ohm resistor on all the time
+#define IS31FL3733_PUR_16KR 0x06 // 16k Ohm resistor on all the time
+#define IS31FL3733_PUR_32KR 0x07 // 32k Ohm resistor in t_NOL
+
+#define IS31FL3733_PWM_FREQUENCY_8K4_HZ 0b000
+#define IS31FL3733_PWM_FREQUENCY_4K2_HZ 0b001
+#define IS31FL3733_PWM_FREQUENCY_26K7_HZ 0b010
+#define IS31FL3733_PWM_FREQUENCY_2K1_HZ 0b011
+#define IS31FL3733_PWM_FREQUENCY_1K05_HZ 0b100
#define A_1 0x00
#define A_2 0x01
diff --git a/drivers/led/issi/is31fl3733.c b/drivers/led/issi/is31fl3733.c
index ca431838ef..efc5929587 100644
--- a/drivers/led/issi/is31fl3733.c
+++ b/drivers/led/issi/is31fl3733.c
@@ -18,59 +18,48 @@
*/
#include "is31fl3733.h"
+#include <string.h>
#include "i2c_master.h"
#include "wait.h"
-// This is a 7-bit address, that gets left-shifted and bit 0
-// set to 0 for write, 1 for read (as per I2C protocol)
-// The address will vary depending on your wiring:
-// 00 <-> GND
-// 01 <-> SCL
-// 10 <-> SDA
-// 11 <-> VCC
-// ADDR1 represents A1:A0 of the 7-bit address.
-// ADDR2 represents A3:A2 of the 7-bit address.
-// The result is: 0b101(ADDR2)(ADDR1)
-#define ISSI_ADDR_DEFAULT 0x50
-
-#define ISSI_COMMANDREGISTER 0xFD
-#define ISSI_COMMANDREGISTER_WRITELOCK 0xFE
-#define ISSI_INTERRUPTMASKREGISTER 0xF0
-#define ISSI_INTERRUPTSTATUSREGISTER 0xF1
-
-#define ISSI_PAGE_LEDCONTROL 0x00 // PG0
-#define ISSI_PAGE_PWM 0x01 // PG1
-#define ISSI_PAGE_AUTOBREATH 0x02 // PG2
-#define ISSI_PAGE_FUNCTION 0x03 // PG3
-
-#define ISSI_REG_CONFIGURATION 0x00 // PG3
-#define ISSI_REG_GLOBALCURRENT 0x01 // PG3
-#define ISSI_REG_RESET 0x11 // PG3
-#define ISSI_REG_SWPULLUP 0x0F // PG3
-#define ISSI_REG_CSPULLUP 0x10 // PG3
-
-#ifndef ISSI_TIMEOUT
-# define ISSI_TIMEOUT 100
+#define IS31FL3733_COMMANDREGISTER 0xFD
+#define IS31FL3733_COMMANDREGISTER_WRITELOCK 0xFE
+#define IS31FL3733_INTERRUPTMASKREGISTER 0xF0
+#define IS31FL3733_INTERRUPTSTATUSREGISTER 0xF1
+
+#define IS31FL3733_PAGE_LEDCONTROL 0x00 // PG0
+#define IS31FL3733_PAGE_PWM 0x01 // PG1
+#define IS31FL3733_PAGE_AUTOBREATH 0x02 // PG2
+#define IS31FL3733_PAGE_FUNCTION 0x03 // PG3
+
+#define IS31FL3733_REG_CONFIGURATION 0x00 // PG3
+#define IS31FL3733_REG_GLOBALCURRENT 0x01 // PG3
+#define IS31FL3733_REG_RESET 0x11 // PG3
+#define IS31FL3733_REG_SWPULLUP 0x0F // PG3
+#define IS31FL3733_REG_CSPULLUP 0x10 // PG3
+
+#ifndef IS31FL3733_I2C_TIMEOUT
+# define IS31FL3733_I2C_TIMEOUT 100
#endif
-#ifndef ISSI_PERSISTENCE
-# define ISSI_PERSISTENCE 0
+#ifndef IS31FL3733_I2C_PERSISTENCE
+# define IS31FL3733_I2C_PERSISTENCE 0
#endif
-#ifndef ISSI_PWM_FREQUENCY
-# define ISSI_PWM_FREQUENCY 0b000 // PFS - IS31FL3733B only
+#ifndef IS31FL3733_PWM_FREQUENCY
+# define IS31FL3733_PWM_FREQUENCY IS31FL3733_PWM_FREQUENCY_8K4_HZ // PFS - IS31FL3733B only
#endif
-#ifndef ISSI_SWPULLUP
-# define ISSI_SWPULLUP PUR_0R
+#ifndef IS31FL3733_SWPULLUP
+# define IS31FL3733_SWPULLUP IS31FL3733_PUR_0R
#endif
-#ifndef ISSI_CSPULLUP
-# define ISSI_CSPULLUP PUR_0R
+#ifndef IS31FL3733_CSPULLUP
+# define IS31FL3733_CSPULLUP IS31FL3733_PUR_0R
#endif
-#ifndef ISSI_GLOBALCURRENT
-# define ISSI_GLOBALCURRENT 0xFF
+#ifndef IS31FL3733_GLOBALCURRENT
+# define IS31FL3733_GLOBALCURRENT 0xFF
#endif
// Transfer buffer for TWITransmitData()
@@ -82,25 +71,25 @@ uint8_t g_twi_transfer_buffer[20];
// We could optimize this and take out the unused registers from these
// buffers and the transfers in is31fl3733_write_pwm_buffer() but it's
// probably not worth the extra complexity.
-uint8_t g_pwm_buffer[DRIVER_COUNT][192];
-bool g_pwm_buffer_update_required[DRIVER_COUNT] = {false};
+uint8_t g_pwm_buffer[IS31FL3733_DRIVER_COUNT][192];
+bool g_pwm_buffer_update_required[IS31FL3733_DRIVER_COUNT] = {false};
-uint8_t g_led_control_registers[DRIVER_COUNT][24] = {0};
-bool g_led_control_registers_update_required[DRIVER_COUNT] = {false};
+uint8_t g_led_control_registers[IS31FL3733_DRIVER_COUNT][24] = {0};
+bool g_led_control_registers_update_required[IS31FL3733_DRIVER_COUNT] = {false};
bool is31fl3733_write_register(uint8_t addr, uint8_t reg, uint8_t data) {
// If the transaction fails function returns false.
g_twi_transfer_buffer[0] = reg;
g_twi_transfer_buffer[1] = data;
-#if ISSI_PERSISTENCE > 0
- for (uint8_t i = 0; i < ISSI_PERSISTENCE; i++) {
- if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, ISSI_TIMEOUT) != 0) {
+#if IS31FL3733_I2C_PERSISTENCE > 0
+ for (uint8_t i = 0; i < IS31FL3733_I2C_PERSISTENCE; i++) {
+ if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, IS31FL3733_I2C_TIMEOUT) != 0) {
return false;
}
}
#else
- if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, ISSI_TIMEOUT) != 0) {
+ if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, IS31FL3733_I2C_TIMEOUT) != 0) {
return false;
}
#endif
@@ -119,18 +108,16 @@ bool is31fl3733_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer) {
// Copy the data from i to i+15.
// Device will auto-increment register for data after the first byte
// Thus this sets registers 0x00-0x0F, 0x10-0x1F, etc. in one transfer.
- for (int j = 0; j < 16; j++) {
- g_twi_transfer_buffer[1 + j] = pwm_buffer[i + j];
- }
+ memcpy(g_twi_transfer_buffer + 1, pwm_buffer + i, 16);
-#if ISSI_PERSISTENCE > 0
- for (uint8_t i = 0; i < ISSI_PERSISTENCE; i++) {
- if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, ISSI_TIMEOUT) != 0) {
+#if IS31FL3733_I2C_PERSISTENCE > 0
+ for (uint8_t i = 0; i < IS31FL3733_I2C_PERSISTENCE; i++) {
+ if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, IS31FL3733_I2C_TIMEOUT) != 0) {
return false;
}
}
#else
- if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, ISSI_TIMEOUT) != 0) {
+ if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, IS31FL3733_I2C_TIMEOUT) != 0) {
return false;
}
#endif
@@ -146,20 +133,20 @@ void is31fl3733_init(uint8_t addr, uint8_t sync) {
// Sync is passed so set it according to the datasheet.
// Unlock the command register.
- is31fl3733_write_register(addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5);
+ is31fl3733_write_register(addr, IS31FL3733_COMMANDREGISTER_WRITELOCK, 0xC5);
// Select PG0
- is31fl3733_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_LEDCONTROL);
+ is31fl3733_write_register(addr, IS31FL3733_COMMANDREGISTER, IS31FL3733_PAGE_LEDCONTROL);
// Turn off all LEDs.
for (int i = 0x00; i <= 0x17; i++) {
is31fl3733_write_register(addr, i, 0x00);
}
// Unlock the command register.
- is31fl3733_write_register(addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5);
+ is31fl3733_write_register(addr, IS31FL3733_COMMANDREGISTER_WRITELOCK, 0xC5);
// Select PG1
- is31fl3733_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_PWM);
+ is31fl3733_write_register(addr, IS31FL3733_COMMANDREGISTER, IS31FL3733_PAGE_PWM);
// Set PWM on all LEDs to 0
// No need to setup Breath registers to PWM as that is the default.
for (int i = 0x00; i <= 0xBF; i++) {
@@ -167,27 +154,27 @@ void is31fl3733_init(uint8_t addr, uint8_t sync) {
}
// Unlock the command register.
- is31fl3733_write_register(addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5);
+ is31fl3733_write_register(addr, IS31FL3733_COMMANDREGISTER_WRITELOCK, 0xC5);
// Select PG3
- is31fl3733_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_FUNCTION);
+ is31fl3733_write_register(addr, IS31FL3733_COMMANDREGISTER, IS31FL3733_PAGE_FUNCTION);
// Set de-ghost pull-up resistors (SWx)
- is31fl3733_write_register(addr, ISSI_REG_SWPULLUP, ISSI_SWPULLUP);
+ is31fl3733_write_register(addr, IS31FL3733_REG_SWPULLUP, IS31FL3733_SWPULLUP);
// Set de-ghost pull-down resistors (CSx)
- is31fl3733_write_register(addr, ISSI_REG_CSPULLUP, ISSI_CSPULLUP);
+ is31fl3733_write_register(addr, IS31FL3733_REG_CSPULLUP, IS31FL3733_CSPULLUP);
// Set global current to maximum.
- is31fl3733_write_register(addr, ISSI_REG_GLOBALCURRENT, ISSI_GLOBALCURRENT);
+ is31fl3733_write_register(addr, IS31FL3733_REG_GLOBALCURRENT, IS31FL3733_GLOBALCURRENT);
// Disable software shutdown.
- is31fl3733_write_register(addr, ISSI_REG_CONFIGURATION, ((sync & 0b11) << 6) | ((ISSI_PWM_FREQUENCY & 0b111) << 3) | 0x01);
+ is31fl3733_write_register(addr, IS31FL3733_REG_CONFIGURATION, ((sync & 0b11) << 6) | ((IS31FL3733_PWM_FREQUENCY & 0b111) << 3) | 0x01);
// Wait 10ms to ensure the device has woken up.
wait_ms(10);
}
void is31fl3733_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) {
- is31_led led;
+ is31fl3733_led_t led;
if (index >= 0 && index < RGB_MATRIX_LED_COUNT) {
- memcpy_P(&led, (&g_is31_leds[index]), sizeof(led));
+ memcpy_P(&led, (&g_is31fl3733_leds[index]), sizeof(led));
if (g_pwm_buffer[led.driver][led.r] == red && g_pwm_buffer[led.driver][led.g] == green && g_pwm_buffer[led.driver][led.b] == blue) {
return;
@@ -206,8 +193,8 @@ void is31fl3733_set_color_all(uint8_t red, uint8_t green, uint8_t blue) {
}
void is31fl3733_set_led_control_register(uint8_t index, bool red, bool green, bool blue) {
- is31_led led;
- memcpy_P(&led, (&g_is31_leds[index]), sizeof(led));
+ is31fl3733_led_t led;
+ memcpy_P(&led, (&g_is31fl3733_leds[index]), sizeof(led));
uint8_t control_register_r = led.r / 8;
uint8_t control_register_g = led.g / 8;
@@ -238,26 +225,26 @@ void is31fl3733_set_led_control_register(uint8_t index, bool red, bool green, bo
void is31fl3733_update_pwm_buffers(uint8_t addr, uint8_t index) {
if (g_pwm_buffer_update_required[index]) {
// Firstly we need to unlock the command register and select PG1.
- is31fl3733_write_register(addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5);
- is31fl3733_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_PWM);
+ is31fl3733_write_register(addr, IS31FL3733_COMMANDREGISTER_WRITELOCK, 0xC5);
+ is31fl3733_write_register(addr, IS31FL3733_COMMANDREGISTER, IS31FL3733_PAGE_PWM);
// If any of the transactions fail we risk writing dirty PG0,
// refresh page 0 just in case.
if (!is31fl3733_write_pwm_buffer(addr, g_pwm_buffer[index])) {
g_led_control_registers_update_required[index] = true;
}
+ g_pwm_buffer_update_required[index] = false;
}
- g_pwm_buffer_update_required[index] = false;
}
void is31fl3733_update_led_control_registers(uint8_t addr, uint8_t index) {
if (g_led_control_registers_update_required[index]) {
// Firstly we need to unlock the command register and select PG0
- is31fl3733_write_register(addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5);
- is31fl3733_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_LEDCONTROL);
+ is31fl3733_write_register(addr, IS31FL3733_COMMANDREGISTER_WRITELOCK, 0xC5);
+ is31fl3733_write_register(addr, IS31FL3733_COMMANDREGISTER, IS31FL3733_PAGE_LEDCONTROL);
for (int i = 0; i < 24; i++) {
is31fl3733_write_register(addr, i, g_led_control_registers[index][i]);
}
+ g_led_control_registers_update_required[index] = false;
}
- g_led_control_registers_update_required[index] = false;
}
diff --git a/drivers/led/issi/is31fl3733.h b/drivers/led/issi/is31fl3733.h
index f37a58de0f..be80e9e32c 100644
--- a/drivers/led/issi/is31fl3733.h
+++ b/drivers/led/issi/is31fl3733.h
@@ -23,14 +23,66 @@
#include <stdbool.h>
#include "progmem.h"
-typedef struct is31_led {
+// ======== DEPRECATED DEFINES - DO NOT USE ========
+#ifdef DRIVER_COUNT
+# define IS31FL3733_DRIVER_COUNT DRIVER_COUNT
+#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_SWPULLUP ISSI_SWPULLUP
+#endif
+#ifdef ISSI_CSPULLUP
+# define IS31FL3733_CSPULLUP ISSI_CSPULLUP
+#endif
+#ifdef ISSI_GLOBALCURRENT
+# define IS31FL3733_GLOBALCURRENT ISSI_GLOBALCURRENT
+#endif
+
+#define is31_led is31fl3733_led_t
+#define g_is31_leds g_is31fl3733_leds
+
+#define PUR_0R IS31FL3733_PUR_0R
+#define PUR_05KR IS31FL3733_PUR_05KR
+#define PUR_3KR IS31FL3733_PUR_3KR
+#define PUR_4KR IS31FL3733_PUR_4KR
+#define PUR_8KR IS31FL3733_PUR_8KR
+#define PUR_16KR IS31FL3733_PUR_16KR
+#define PUR_32KR IS31FL3733_PUR_32KR
+// ========
+
+#define IS31FL3733_I2C_ADDRESS_GND_GND 0x50
+#define IS31FL3733_I2C_ADDRESS_GND_SCL 0x51
+#define IS31FL3733_I2C_ADDRESS_GND_SDA 0x52
+#define IS31FL3733_I2C_ADDRESS_GND_VCC 0x53
+#define IS31FL3733_I2C_ADDRESS_SCL_GND 0x54
+#define IS31FL3733_I2C_ADDRESS_SCL_SCL 0x55
+#define IS31FL3733_I2C_ADDRESS_SCL_SDA 0x56
+#define IS31FL3733_I2C_ADDRESS_SCL_VCC 0x57
+#define IS31FL3733_I2C_ADDRESS_SDA_GND 0x58
+#define IS31FL3733_I2C_ADDRESS_SDA_SCL 0x59
+#define IS31FL3733_I2C_ADDRESS_SDA_SDA 0x5A
+#define IS31FL3733_I2C_ADDRESS_SDA_VCC 0x5B
+#define IS31FL3733_I2C_ADDRESS_VCC_GND 0x5C
+#define IS31FL3733_I2C_ADDRESS_VCC_SCL 0x5D
+#define IS31FL3733_I2C_ADDRESS_VCC_SDA 0x5E
+#define IS31FL3733_I2C_ADDRESS_VCC_VCC 0x5F
+
+typedef struct is31fl3733_led_t {
uint8_t driver : 2;
uint8_t r;
uint8_t g;
uint8_t b;
-} __attribute__((packed)) is31_led;
+} __attribute__((packed)) is31fl3733_led_t;
-extern const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT];
+extern const is31fl3733_led_t PROGMEM g_is31fl3733_leds[RGB_MATRIX_LED_COUNT];
void is31fl3733_init(uint8_t addr, uint8_t sync);
bool is31fl3733_write_register(uint8_t addr, uint8_t reg, uint8_t data);
@@ -48,13 +100,19 @@ void is31fl3733_set_led_control_register(uint8_t index, bool red, bool green, bo
void is31fl3733_update_pwm_buffers(uint8_t addr, uint8_t index);
void is31fl3733_update_led_control_registers(uint8_t addr, uint8_t index);
-#define PUR_0R 0x00 // No PUR resistor
-#define PUR_05KR 0x02 // 0.5k Ohm resistor in t_NOL
-#define PUR_3KR 0x03 // 3.0k Ohm resistor on all the time
-#define PUR_4KR 0x04 // 4.0k Ohm resistor on all the time
-#define PUR_8KR 0x05 // 8.0k Ohm resistor on all the time
-#define PUR_16KR 0x06 // 16k Ohm resistor on all the time
-#define PUR_32KR 0x07 // 32k Ohm resistor in t_NOL
+#define IS31FL3733_PUR_0R 0x00 // No PUR resistor
+#define IS31FL3733_PUR_05KR 0x02 // 0.5k Ohm resistor in t_NOL
+#define IS31FL3733_PUR_3KR 0x03 // 3.0k Ohm resistor on all the time
+#define IS31FL3733_PUR_4KR 0x04 // 4.0k Ohm resistor on all the time
+#define IS31FL3733_PUR_8KR 0x05 // 8.0k Ohm resistor on all the time
+#define IS31FL3733_PUR_16KR 0x06 // 16k Ohm resistor on all the time
+#define IS31FL3733_PUR_32KR 0x07 // 32k Ohm resistor in t_NOL
+
+#define IS31FL3733_PWM_FREQUENCY_8K4_HZ 0b000
+#define IS31FL3733_PWM_FREQUENCY_4K2_HZ 0b001
+#define IS31FL3733_PWM_FREQUENCY_26K7_HZ 0b010
+#define IS31FL3733_PWM_FREQUENCY_2K1_HZ 0b011
+#define IS31FL3733_PWM_FREQUENCY_1K05_HZ 0b100
#define A_1 0x00
#define A_2 0x01
diff --git a/drivers/led/issi/is31fl3736-simple.c b/drivers/led/issi/is31fl3736-simple.c
new file mode 100644
index 0000000000..f3f202efb2
--- /dev/null
+++ b/drivers/led/issi/is31fl3736-simple.c
@@ -0,0 +1,222 @@
+/* Copyright 2018 Jason Williams (Wilba)
+ * Copyright 2021 Doni Crosby
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General 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 "is31fl3736-simple.h"
+#include <string.h>
+#include "i2c_master.h"
+#include "wait.h"
+
+#define IS31FL3736_COMMANDREGISTER 0xFD
+#define IS31FL3736_COMMANDREGISTER_WRITELOCK 0xFE
+#define IS31FL3736_INTERRUPTMASKREGISTER 0xF0
+#define IS31FL3736_INTERRUPTSTATUSREGISTER 0xF1
+
+#define IS31FL3736_PAGE_LEDCONTROL 0x00 // PG0
+#define IS31FL3736_PAGE_PWM 0x01 // PG1
+#define IS31FL3736_PAGE_AUTOBREATH 0x02 // PG2
+#define IS31FL3736_PAGE_FUNCTION 0x03 // PG3
+
+#define IS31FL3736_REG_CONFIGURATION 0x00 // PG3
+#define IS31FL3736_REG_GLOBALCURRENT 0x01 // PG3
+#define IS31FL3736_REG_RESET 0x11 // PG3
+#define IS31FL3736_REG_SWPULLUP 0x0F // PG3
+#define IS31FL3736_REG_CSPULLUP 0x10 // PG3
+
+#ifndef IS31FL3736_I2C_TIMEOUT
+# define IS31FL3736_I2C_TIMEOUT 100
+#endif
+
+#ifndef IS31FL3736_I2C_PERSISTENCE
+# define IS31FL3736_I2C_PERSISTENCE 0
+#endif
+
+#ifndef IS31FL3736_PWM_FREQUENCY
+# define IS31FL3736_PWM_FREQUENCY IS31FL3736_PWM_FREQUENCY_8K4_HZ // PFS - IS31FL3736B only
+#endif
+
+#ifndef IS31FL3736_SWPULLUP
+# define IS31FL3736_SWPULLUP IS31FL3736_PUR_0R
+#endif
+
+#ifndef IS31FL3736_CSPULLUP
+# define IS31FL3736_CSPULLUP IS31FL3736_PUR_0R
+#endif
+
+#ifndef IS31FL3736_GLOBALCURRENT
+# define IS31FL3736_GLOBALCURRENT 0xFF
+#endif
+
+// Transfer buffer for TWITransmitData()
+uint8_t g_twi_transfer_buffer[20];
+
+// These buffers match the IS31FL3736 PWM registers.
+// The control buffers match the PG0 LED On/Off registers.
+// Storing them like this is optimal for I2C transfers to the registers.
+// We could optimize this and take out the unused registers from these
+// buffers and the transfers in is31fl3736_write_pwm_buffer() but it's
+// probably not worth the extra complexity.
+uint8_t g_pwm_buffer[IS31FL3736_DRIVER_COUNT][192];
+bool g_pwm_buffer_update_required[IS31FL3736_DRIVER_COUNT] = {false};
+
+uint8_t g_led_control_registers[IS31FL3736_DRIVER_COUNT][24] = {0};
+bool g_led_control_registers_update_required[IS31FL3736_DRIVER_COUNT] = {false};
+
+void is31fl3736_write_register(uint8_t addr, uint8_t reg, uint8_t data) {
+ g_twi_transfer_buffer[0] = reg;
+ g_twi_transfer_buffer[1] = data;
+
+#if IS31FL3736_I2C_PERSISTENCE > 0
+ for (uint8_t i = 0; i < IS31FL3736_I2C_PERSISTENCE; i++) {
+ if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, IS31FL3736_I2C_TIMEOUT) == 0) break;
+ }
+#else
+ i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, IS31FL3736_I2C_TIMEOUT);
+#endif
+}
+
+void is31fl3736_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer) {
+ // assumes PG1 is already selected
+
+ // transmit PWM registers in 12 transfers of 16 bytes
+ // g_twi_transfer_buffer[] is 20 bytes
+
+ // iterate over the pwm_buffer contents at 16 byte intervals
+ for (int i = 0; i < 192; i += 16) {
+ g_twi_transfer_buffer[0] = i;
+ // copy the data from i to i+15
+ // device will auto-increment register for data after the first byte
+ // thus this sets registers 0x00-0x0F, 0x10-0x1F, etc. in one transfer
+ memcpy(g_twi_transfer_buffer + 1, pwm_buffer + i, 16);
+
+#if IS31FL3736_I2C_PERSISTENCE > 0
+ for (uint8_t i = 0; i < IS31FL3736_I2C_PERSISTENCE; i++) {
+ if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, IS31FL3736_I2C_TIMEOUT) == 0) break;
+ }
+#else
+ i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, IS31FL3736_I2C_TIMEOUT);
+#endif
+ }
+}
+
+void is31fl3736_init(uint8_t addr) {
+ // In order to avoid the LEDs being driven with garbage data
+ // in the LED driver's PWM registers, shutdown is enabled last.
+ // Set up the mode and other settings, clear the PWM registers,
+ // then disable software shutdown.
+
+ // Unlock the command register.
+ is31fl3736_write_register(addr, IS31FL3736_COMMANDREGISTER_WRITELOCK, 0xC5);
+
+ // Select PG0
+ is31fl3736_write_register(addr, IS31FL3736_COMMANDREGISTER, IS31FL3736_PAGE_LEDCONTROL);
+ // Turn off all LEDs.
+ for (int i = 0x00; i <= 0x17; i++) {
+ is31fl3736_write_register(addr, i, 0x00);
+ }
+
+ // Unlock the command register.
+ is31fl3736_write_register(addr, IS31FL3736_COMMANDREGISTER_WRITELOCK, 0xC5);
+
+ // Select PG1
+ is31fl3736_write_register(addr, IS31FL3736_COMMANDREGISTER, IS31FL3736_PAGE_PWM);
+ // Set PWM on all LEDs to 0
+ // No need to setup Breath registers to PWM as that is the default.
+ for (int i = 0x00; i <= 0xBF; i++) {
+ is31fl3736_write_register(addr, i, 0x00);
+ }
+
+ // Unlock the command register.
+ is31fl3736_write_register(addr, IS31FL3736_COMMANDREGISTER_WRITELOCK, 0xC5);
+
+ // Select PG3
+ is31fl3736_write_register(addr, IS31FL3736_COMMANDREGISTER, IS31FL3736_PAGE_FUNCTION);
+ // Set de-ghost pull-up resistors (SWx)
+ is31fl3736_write_register(addr, IS31FL3736_REG_SWPULLUP, IS31FL3736_SWPULLUP);
+ // Set de-ghost pull-down resistors (CSx)
+ is31fl3736_write_register(addr, IS31FL3736_REG_CSPULLUP, IS31FL3736_CSPULLUP);
+ // Set global current to maximum.
+ is31fl3736_write_register(addr, IS31FL3736_REG_GLOBALCURRENT, IS31FL3736_GLOBALCURRENT);
+ // Disable software shutdown.
+ is31fl3736_write_register(addr, IS31FL3736_REG_CONFIGURATION, ((IS31FL3736_PWM_FREQUENCY & 0b111) << 3) | 0x01);
+
+ // Wait 10ms to ensure the device has woken up.
+ wait_ms(10);
+}
+
+void is31fl3736_set_value(int index, uint8_t value) {
+ is31fl3736_led_t led;
+ if (index >= 0 && index < LED_MATRIX_LED_COUNT) {
+ memcpy_P(&led, (&g_is31fl3736_leds[index]), sizeof(led));
+
+ if (g_pwm_buffer[led.driver][led.v] == value) {
+ return;
+ }
+ g_pwm_buffer[led.driver][led.v] = value;
+ g_pwm_buffer_update_required[led.driver] = true;
+ }
+}
+
+void is31fl3736_set_value_all(uint8_t value) {
+ for (int i = 0; i < LED_MATRIX_LED_COUNT; i++) {
+ is31fl3736_set_value(i, value);
+ }
+}
+
+void is31fl3736_set_led_control_register(uint8_t index, bool value) {
+ is31fl3736_led_t led;
+ memcpy_P(&led, (&g_is31fl3736_leds[index]), sizeof(led));
+
+ // The PWM register for a matrix position (0x00 to 0xBF) is interleaved, so:
+ // A1=0x00 A2=0x02 A3=0x04 A4=0x06 A5=0x08 A6=0x0A A7=0x0C A8=0x0E
+ // B1=0x10 B2=0x12 B3=0x14
+ // But also, the LED control registers (0x00 to 0x17) are also interleaved, so:
+ // A1-A4=0x00 A5-A8=0x01
+
+ uint8_t control_register = led.v / 8;
+ uint8_t bit_value = led.v % 8;
+
+ if (value) {
+ g_led_control_registers[led.driver][control_register] |= (1 << bit_value);
+ } else {
+ g_led_control_registers[led.driver][control_register] &= ~(1 << bit_value);
+ }
+
+ g_led_control_registers_update_required[led.driver] = true;
+}
+
+void is31fl3736_update_pwm_buffers(uint8_t addr, uint8_t index) {
+ if (g_pwm_buffer_update_required[index]) {
+ // Firstly we need to unlock the command register and select PG1
+ is31fl3736_write_register(addr, IS31FL3736_COMMANDREGISTER_WRITELOCK, 0xC5);
+ is31fl3736_write_register(addr, IS31FL3736_COMMANDREGISTER, IS31FL3736_PAGE_PWM);
+
+ is31fl3736_write_pwm_buffer(addr, g_pwm_buffer[index]);
+ g_pwm_buffer_update_required[index] = false;
+ }
+}
+
+void is31fl3736_update_led_control_registers(uint8_t addr, uint8_t index) {
+ if (g_led_control_registers_update_required[index]) {
+ // Firstly we need to unlock the command register and select PG0
+ is31fl3736_write_register(addr, IS31FL3736_COMMANDREGISTER_WRITELOCK, 0xC5);
+ is31fl3736_write_register(addr, IS31FL3736_COMMANDREGISTER, IS31FL3736_PAGE_LEDCONTROL);
+ for (int i = 0; i < 24; i++) {
+ is31fl3736_write_register(addr, i, g_led_control_registers[index][i]);
+ }
+ g_led_control_registers_update_required[index] = false;
+ }
+}
diff --git a/drivers/led/issi/is31fl3736-simple.h b/drivers/led/issi/is31fl3736-simple.h
new file mode 100644
index 0000000000..d5525e460d
--- /dev/null
+++ b/drivers/led/issi/is31fl3736-simple.h
@@ -0,0 +1,218 @@
+/* Copyright 2018 Jason Williams (Wilba)
+ * Copyright 2021 Doni Crosby
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General 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 <stdint.h>
+#include <stdbool.h>
+#include "progmem.h"
+
+// ======== DEPRECATED DEFINES - DO NOT USE ========
+#ifdef DRIVER_COUNT
+# define IS31FL3736_DRIVER_COUNT DRIVER_COUNT
+#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_SWPULLUP ISSI_SWPULLUP
+#endif
+#ifdef ISSI_CSPULLUP
+# define IS31FL3736_CSPULLUP ISSI_CSPULLUP
+#endif
+#ifdef ISSI_GLOBALCURRENT
+# define IS31FL3736_GLOBALCURRENT ISSI_GLOBALCURRENT
+#endif
+
+#define is31_led is31fl3736_led_t
+#define g_is31_leds g_is31fl3736_leds
+
+#define PUR_0R IS31FL3736_PUR_0R
+#define PUR_05KR IS31FL3736_PUR_05KR
+#define PUR_1KR IS31FL3736_PUR_1KR
+#define PUR_2KR IS31FL3736_PUR_2KR
+#define PUR_4KR IS31FL3736_PUR_4KR
+#define PUR_8KR IS31FL3736_PUR_8KR
+#define PUR_16KR IS31FL3736_PUR_16KR
+#define PUR_32KR IS31FL3736_PUR_32KR
+// ========
+
+#define IS31FL3736_I2C_ADDRESS_GND_GND 0x50
+#define IS31FL3736_I2C_ADDRESS_GND_SCL 0x51
+#define IS31FL3736_I2C_ADDRESS_GND_SDA 0x52
+#define IS31FL3736_I2C_ADDRESS_GND_VCC 0x53
+#define IS31FL3736_I2C_ADDRESS_SCL_GND 0x54
+#define IS31FL3736_I2C_ADDRESS_SCL_SCL 0x55
+#define IS31FL3736_I2C_ADDRESS_SCL_SDA 0x56
+#define IS31FL3736_I2C_ADDRESS_SCL_VCC 0x57
+#define IS31FL3736_I2C_ADDRESS_SDA_GND 0x58
+#define IS31FL3736_I2C_ADDRESS_SDA_SCL 0x59
+#define IS31FL3736_I2C_ADDRESS_SDA_SDA 0x5A
+#define IS31FL3736_I2C_ADDRESS_SDA_VCC 0x5B
+#define IS31FL3736_I2C_ADDRESS_VCC_GND 0x5C
+#define IS31FL3736_I2C_ADDRESS_VCC_SCL 0x5D
+#define IS31FL3736_I2C_ADDRESS_VCC_SDA 0x5E
+#define IS31FL3736_I2C_ADDRESS_VCC_VCC 0x5F
+
+typedef struct is31fl3736_led_t {
+ uint8_t driver : 2;
+ uint8_t v;
+} __attribute__((packed)) is31fl3736_led_t;
+
+extern const is31fl3736_led_t PROGMEM g_is31fl3736_leds[LED_MATRIX_LED_COUNT];
+
+void is31fl3736_init(uint8_t addr);
+void is31fl3736_write_register(uint8_t addr, uint8_t reg, uint8_t data);
+void is31fl3736_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer);
+
+void is31fl3736_set_value(int index, uint8_t value);
+void is31fl3736_set_value_all(uint8_t value);
+
+void is31fl3736_set_led_control_register(uint8_t index, bool value);
+
+// This should not be called from an interrupt
+// (eg. from a timer interrupt).
+// Call this while idle (in between matrix scans).
+// If the buffer is dirty, it will update the driver with the buffer.
+void is31fl3736_update_pwm_buffers(uint8_t addr, uint8_t index);
+void is31fl3736_update_led_control_registers(uint8_t addr, uint8_t index);
+
+#define IS31FL3736_PUR_0R 0x00 // No PUR resistor
+#define IS31FL3736_PUR_05KR 0x01 // 0.5k Ohm resistor
+#define IS31FL3736_PUR_1KR 0x02 // 1.0k Ohm resistor
+#define IS31FL3736_PUR_2KR 0x03 // 2.0k Ohm resistor
+#define IS31FL3736_PUR_4KR 0x04 // 4.0k Ohm resistor
+#define IS31FL3736_PUR_8KR 0x05 // 8.0k Ohm resistor
+#define IS31FL3736_PUR_16KR 0x06 // 16k Ohm resistor
+#define IS31FL3736_PUR_32KR 0x07 // 32k Ohm resistor
+
+#define IS31FL3736_PWM_FREQUENCY_8K4_HZ 0b000
+#define IS31FL3736_PWM_FREQUENCY_4K2_HZ 0b001
+#define IS31FL3736_PWM_FREQUENCY_26K7_HZ 0b010
+#define IS31FL3736_PWM_FREQUENCY_2K1_HZ 0b011
+#define IS31FL3736_PWM_FREQUENCY_1K05_HZ 0b100
+
+#define A_1 0x00
+#define A_2 0x02
+#define A_3 0x04
+#define A_4 0x06
+#define A_5 0x08
+#define A_6 0x0A
+#define A_7 0x0C
+#define A_8 0x0E
+
+#define B_1 0x10
+#define B_2 0x12
+#define B_3 0x14
+#define B_4 0x16
+#define B_5 0x18
+#define B_6 0x1A
+#define B_7 0x1C
+#define B_8 0x1E
+
+#define C_1 0x20
+#define C_2 0x22
+#define C_3 0x24
+#define C_4 0x26
+#define C_5 0x28
+#define C_6 0x2A
+#define C_7 0x2C
+#define C_8 0x2E
+
+#define D_1 0x30
+#define D_2 0x32
+#define D_3 0x34
+#define D_4 0x36
+#define D_5 0x38
+#define D_6 0x3A
+#define D_7 0x3C
+#define D_8 0x3E
+
+#define E_1 0x40
+#define E_2 0x42
+#define E_3 0x44
+#define E_4 0x46
+#define E_5 0x48
+#define E_6 0x4A
+#define E_7 0x4C
+#define E_8 0x4E
+
+#define F_1 0x50
+#define F_2 0x52
+#define F_3 0x54
+#define F_4 0x56
+#define F_5 0x58
+#define F_6 0x5A
+#define F_7 0x5C
+#define F_8 0x5E
+
+#define G_1 0x60
+#define G_2 0x62
+#define G_3 0x64
+#define G_4 0x66
+#define G_5 0x68
+#define G_6 0x6A
+#define G_7 0x6C
+#define G_8 0x6E
+
+#define H_1 0x70
+#define H_2 0x72
+#define H_3 0x74
+#define H_4 0x76
+#define H_5 0x78
+#define H_6 0x7A
+#define H_7 0x7C
+#define H_8 0x7E
+
+#define I_1 0x80
+#define I_2 0x82
+#define I_3 0x84
+#define I_4 0x86
+#define I_5 0x88
+#define I_6 0x8A
+#define I_7 0x8C
+#define I_8 0x8E
+
+#define J_1 0x90
+#define J_2 0x92
+#define J_3 0x94
+#define J_4 0x96
+#define J_5 0x98
+#define J_6 0x9A
+#define J_7 0x9C
+#define J_8 0x9E
+
+#define K_1 0xA0
+#define K_2 0xA2
+#define K_3 0xA4
+#define K_4 0xA6
+#define K_5 0xA8
+#define K_6 0xAA
+#define K_7 0xAC
+#define K_8 0xAE
+
+#define L_1 0xB0
+#define L_2 0xB2
+#define L_3 0xB4
+#define L_4 0xB6
+#define L_5 0xB8
+#define L_6 0xBA
+#define L_7 0xBC
+#define L_8 0xBE
diff --git a/drivers/led/issi/is31fl3736.c b/drivers/led/issi/is31fl3736.c
index 0de8b3bbae..03f50873df 100644
--- a/drivers/led/issi/is31fl3736.c
+++ b/drivers/led/issi/is31fl3736.c
@@ -16,55 +16,48 @@
*/
#include "is31fl3736.h"
+#include <string.h>
#include "i2c_master.h"
#include "wait.h"
-// This is a 7-bit address, that gets left-shifted and bit 0
-// set to 0 for write, 1 for read (as per I2C protocol)
-// The address will vary depending on your wiring:
-// 00 <-> GND
-// 01 <-> SCL
-// 10 <-> SDA
-// 11 <-> VCC
-// ADDR1 represents A1:A0 of the 7-bit address.
-// ADDR2 represents A3:A2 of the 7-bit address.
-// The result is: 0b101(ADDR2)(ADDR1)
-#define ISSI_ADDR_DEFAULT 0x50
-
-#define ISSI_COMMANDREGISTER 0xFD
-#define ISSI_COMMANDREGISTER_WRITELOCK 0xFE
-#define ISSI_INTERRUPTMASKREGISTER 0xF0
-#define ISSI_INTERRUPTSTATUSREGISTER 0xF1
-
-#define ISSI_PAGE_LEDCONTROL 0x00 // PG0
-#define ISSI_PAGE_PWM 0x01 // PG1
-#define ISSI_PAGE_AUTOBREATH 0x02 // PG2
-#define ISSI_PAGE_FUNCTION 0x03 // PG3
-
-#define ISSI_REG_CONFIGURATION 0x00 // PG3
-#define ISSI_REG_GLOBALCURRENT 0x01 // PG3
-#define ISSI_REG_RESET 0x11 // PG3
-#define ISSI_REG_SWPULLUP 0x0F // PG3
-#define ISSI_REG_CSPULLUP 0x10 // PG3
-
-#ifndef ISSI_TIMEOUT
-# define ISSI_TIMEOUT 100
+#define IS31FL3736_COMMANDREGISTER 0xFD
+#define IS31FL3736_COMMANDREGISTER_WRITELOCK 0xFE
+#define IS31FL3736_INTERRUPTMASKREGISTER 0xF0
+#define IS31FL3736_INTERRUPTSTATUSREGISTER 0xF1
+
+#define IS31FL3736_PAGE_LEDCONTROL 0x00 // PG0
+#define IS31FL3736_PAGE_PWM 0x01 // PG1
+#define IS31FL3736_PAGE_AUTOBREATH 0x02 // PG2
+#define IS31FL3736_PAGE_FUNCTION 0x03 // PG3
+
+#define IS31FL3736_REG_CONFIGURATION 0x00 // PG3
+#define IS31FL3736_REG_GLOBALCURRENT 0x01 // PG3
+#define IS31FL3736_REG_RESET 0x11 // PG3
+#define IS31FL3736_REG_SWPULLUP 0x0F // PG3
+#define IS31FL3736_REG_CSPULLUP 0x10 // PG3
+
+#ifndef IS31FL3736_I2C_TIMEOUT
+# define IS31FL3736_I2C_TIMEOUT 100
+#endif
+
+#ifndef IS31FL3736_I2C_PERSISTENCE
+# define IS31FL3736_I2C_PERSISTENCE 0
#endif
-#ifndef ISSI_PERSISTENCE
-# define ISSI_PERSISTENCE 0
+#ifndef IS31FL3736_PWM_FREQUENCY
+# define IS31FL3736_PWM_FREQUENCY IS31FL3736_PWM_FREQUENCY_8K4_HZ // PFS - IS31FL3736B only
#endif
-#ifndef ISSI_SWPULLUP
-# define ISSI_SWPULLUP PUR_0R
+#ifndef IS31FL3736_SWPULLUP
+# define IS31FL3736_SWPULLUP IS31FL3736_PUR_0R
#endif
-#ifndef ISSI_CSPULLUP
-# define ISSI_CSPULLUP PUR_0R
+#ifndef IS31FL3736_CSPULLUP
+# define IS31FL3736_CSPULLUP IS31FL3736_PUR_0R
#endif
-#ifndef ISSI_GLOBALCURRENT
-# define ISSI_GLOBALCURRENT 0xFF
+#ifndef IS31FL3736_GLOBALCURRENT
+# define IS31FL3736_GLOBALCURRENT 0xFF
#endif
// Transfer buffer for TWITransmitData()
@@ -76,22 +69,22 @@ uint8_t g_twi_transfer_buffer[20];
// We could optimize this and take out the unused registers from these
// buffers and the transfers in is31fl3736_write_pwm_buffer() but it's
// probably not worth the extra complexity.
-uint8_t g_pwm_buffer[DRIVER_COUNT][192];
-bool g_pwm_buffer_update_required[DRIVER_COUNT] = {false};
+uint8_t g_pwm_buffer[IS31FL3736_DRIVER_COUNT][192];
+bool g_pwm_buffer_update_required[IS31FL3736_DRIVER_COUNT] = {false};
-uint8_t g_led_control_registers[DRIVER_COUNT][24] = {{0}, {0}};
-bool g_led_control_registers_update_required = false;
+uint8_t g_led_control_registers[IS31FL3736_DRIVER_COUNT][24] = {0};
+bool g_led_control_registers_update_required[IS31FL3736_DRIVER_COUNT] = {false};
void is31fl3736_write_register(uint8_t addr, uint8_t reg, uint8_t data) {
g_twi_transfer_buffer[0] = reg;
g_twi_transfer_buffer[1] = data;
-#if ISSI_PERSISTENCE > 0
- for (uint8_t i = 0; i < ISSI_PERSISTENCE; i++) {
- if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, ISSI_TIMEOUT) == 0) break;
+#if IS31FL3736_I2C_PERSISTENCE > 0
+ for (uint8_t i = 0; i < IS31FL3736_I2C_PERSISTENCE; i++) {
+ if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, IS31FL3736_I2C_TIMEOUT) == 0) break;
}
#else
- i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, ISSI_TIMEOUT);
+ i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, IS31FL3736_I2C_TIMEOUT);
#endif
}
@@ -109,12 +102,12 @@ void is31fl3736_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer) {
// thus this sets registers 0x00-0x0F, 0x10-0x1F, etc. in one transfer
memcpy(g_twi_transfer_buffer + 1, pwm_buffer + i, 16);
-#if ISSI_PERSISTENCE > 0
- for (uint8_t i = 0; i < ISSI_PERSISTENCE; i++) {
- if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, ISSI_TIMEOUT) == 0) break;
+#if IS31FL3736_I2C_PERSISTENCE > 0
+ for (uint8_t i = 0; i < IS31FL3736_I2C_PERSISTENCE; i++) {
+ if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, IS31FL3736_I2C_TIMEOUT) == 0) break;
}
#else
- i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, ISSI_TIMEOUT);
+ i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, IS31FL3736_I2C_TIMEOUT);
#endif
}
}
@@ -126,20 +119,20 @@ void is31fl3736_init(uint8_t addr) {
// then disable software shutdown.
// Unlock the command register.
- is31fl3736_write_register(addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5);
+ is31fl3736_write_register(addr, IS31FL3736_COMMANDREGISTER_WRITELOCK, 0xC5);
// Select PG0
- is31fl3736_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_LEDCONTROL);
+ is31fl3736_write_register(addr, IS31FL3736_COMMANDREGISTER, IS31FL3736_PAGE_LEDCONTROL);
// Turn off all LEDs.
for (int i = 0x00; i <= 0x17; i++) {
is31fl3736_write_register(addr, i, 0x00);
}
// Unlock the command register.
- is31fl3736_write_register(addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5);
+ is31fl3736_write_register(addr, IS31FL3736_COMMANDREGISTER_WRITELOCK, 0xC5);
// Select PG1
- is31fl3736_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_PWM);
+ is31fl3736_write_register(addr, IS31FL3736_COMMANDREGISTER, IS31FL3736_PAGE_PWM);
// Set PWM on all LEDs to 0
// No need to setup Breath registers to PWM as that is the default.
for (int i = 0x00; i <= 0xBF; i++) {
@@ -147,27 +140,27 @@ void is31fl3736_init(uint8_t addr) {
}
// Unlock the command register.
- is31fl3736_write_register(addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5);
+ is31fl3736_write_register(addr, IS31FL3736_COMMANDREGISTER_WRITELOCK, 0xC5);
// Select PG3
- is31fl3736_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_FUNCTION);
+ is31fl3736_write_register(addr, IS31FL3736_COMMANDREGISTER, IS31FL3736_PAGE_FUNCTION);
// Set de-ghost pull-up resistors (SWx)
- is31fl3736_write_register(addr, ISSI_REG_SWPULLUP, ISSI_SWPULLUP);
+ is31fl3736_write_register(addr, IS31FL3736_REG_SWPULLUP, IS31FL3736_SWPULLUP);
// Set de-ghost pull-down resistors (CSx)
- is31fl3736_write_register(addr, ISSI_REG_CSPULLUP, ISSI_CSPULLUP);
+ is31fl3736_write_register(addr, IS31FL3736_REG_CSPULLUP, IS31FL3736_CSPULLUP);
// Set global current to maximum.
- is31fl3736_write_register(addr, ISSI_REG_GLOBALCURRENT, ISSI_GLOBALCURRENT);
+ is31fl3736_write_register(addr, IS31FL3736_REG_GLOBALCURRENT, IS31FL3736_GLOBALCURRENT);
// Disable software shutdown.
- is31fl3736_write_register(addr, ISSI_REG_CONFIGURATION, 0x01);
+ is31fl3736_write_register(addr, IS31FL3736_REG_CONFIGURATION, ((IS31FL3736_PWM_FREQUENCY & 0b111) << 3) | 0x01);
// Wait 10ms to ensure the device has woken up.
wait_ms(10);
}
void is31fl3736_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) {
- is31_led led;
+ is31fl3736_led_t led;
if (index >= 0 && index < RGB_MATRIX_LED_COUNT) {
- memcpy_P(&led, (&g_is31_leds[index]), sizeof(led));
+ memcpy_P(&led, (&g_is31fl3736_leds[index]), sizeof(led));
if (g_pwm_buffer[led.driver][led.r] == red && g_pwm_buffer[led.driver][led.g] == green && g_pwm_buffer[led.driver][led.b] == blue) {
return;
@@ -186,21 +179,14 @@ void is31fl3736_set_color_all(uint8_t red, uint8_t green, uint8_t blue) {
}
void is31fl3736_set_led_control_register(uint8_t index, bool red, bool green, bool blue) {
- is31_led led;
- memcpy_P(&led, (&g_is31_leds[index]), sizeof(led));
+ is31fl3736_led_t led;
+ memcpy_P(&led, (&g_is31fl3736_leds[index]), sizeof(led));
- // IS31FL3733
- // The PWM register for a matrix position (0x00 to 0xBF) can be
- // divided by 8 to get the LED control register (0x00 to 0x17),
- // then mod 8 to get the bit position within that register.
-
- // IS31FL3736
// The PWM register for a matrix position (0x00 to 0xBF) is interleaved, so:
// A1=0x00 A2=0x02 A3=0x04 A4=0x06 A5=0x08 A6=0x0A A7=0x0C A8=0x0E
// B1=0x10 B2=0x12 B3=0x14
// But also, the LED control registers (0x00 to 0x17) are also interleaved, so:
// A1-A4=0x00 A5-A8=0x01
- // So, the same math applies.
uint8_t control_register_r = led.r / 8;
uint8_t control_register_g = led.g / 8;
@@ -226,63 +212,28 @@ void is31fl3736_set_led_control_register(uint8_t index, bool red, bool green, bo
g_led_control_registers[led.driver][control_register_b] &= ~(1 << bit_b);
}
- g_led_control_registers_update_required = true;
-}
-
-void is31fl3736_mono_set_brightness(int index, uint8_t value) {
- if (index >= 0 && index < 96) {
- // Index in range 0..95 -> A1..A8, B1..B8, etc.
- // Map index 0..95 to registers 0x00..0xBE (interleaved)
- uint8_t pwm_register = index * 2;
- g_pwm_buffer[0][pwm_register] = value;
- g_pwm_buffer_update_required[0] = true;
- }
-}
-
-void is31fl3736_mono_set_brightness_all(uint8_t value) {
- for (int i = 0; i < 96; i++) {
- is31fl3736_mono_set_brightness(i, value);
- }
-}
-
-void is31fl3736_mono_set_led_control_register(uint8_t index, bool enabled) {
- // Index in range 0..95 -> A1..A8, B1..B8, etc.
-
- // Map index 0..95 to registers 0x00..0xBE (interleaved)
- uint8_t pwm_register = index * 2;
- // Map register 0x00..0xBE (interleaved) into control register and bit
- uint8_t control_register = pwm_register / 8;
- uint8_t bit = pwm_register % 8;
-
- if (enabled) {
- g_led_control_registers[0][control_register] |= (1 << bit);
- } else {
- g_led_control_registers[0][control_register] &= ~(1 << bit);
- }
-
- g_led_control_registers_update_required = true;
+ g_led_control_registers_update_required[led.driver] = true;
}
void is31fl3736_update_pwm_buffers(uint8_t addr, uint8_t index) {
if (g_pwm_buffer_update_required[index]) {
// Firstly we need to unlock the command register and select PG1
- is31fl3736_write_register(addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5);
- is31fl3736_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_PWM);
+ is31fl3736_write_register(addr, IS31FL3736_COMMANDREGISTER_WRITELOCK, 0xC5);
+ is31fl3736_write_register(addr, IS31FL3736_COMMANDREGISTER, IS31FL3736_PAGE_PWM);
is31fl3736_write_pwm_buffer(addr, g_pwm_buffer[index]);
+ g_pwm_buffer_update_required[index] = false;
}
- g_pwm_buffer_update_required[index] = false;
}
-void is31fl3736_update_led_control_registers(uint8_t addr1, uint8_t addr2) {
- if (g_led_control_registers_update_required) {
+void is31fl3736_update_led_control_registers(uint8_t addr, uint8_t index) {
+ if (g_led_control_registers_update_required[index]) {
// Firstly we need to unlock the command register and select PG0
- is31fl3736_write_register(addr1, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5);
- is31fl3736_write_register(addr1, ISSI_COMMANDREGISTER, ISSI_PAGE_LEDCONTROL);
+ is31fl3736_write_register(addr, IS31FL3736_COMMANDREGISTER_WRITELOCK, 0xC5);
+ is31fl3736_write_register(addr, IS31FL3736_COMMANDREGISTER, IS31FL3736_PAGE_LEDCONTROL);
for (int i = 0; i < 24; i++) {
- is31fl3736_write_register(addr1, i, g_led_control_registers[0][i]);
- // is31fl3736_write_register(addr2, i, g_led_control_registers[1][i]);
+ is31fl3736_write_register(addr, i, g_led_control_registers[index][i]);
}
- g_led_control_registers_update_required = false;
+ g_led_control_registers_update_required[index] = false;
}
}
diff --git a/drivers/led/issi/is31fl3736.h b/drivers/led/issi/is31fl3736.h
index 32bdef4a80..37031134e9 100644
--- a/drivers/led/issi/is31fl3736.h
+++ b/drivers/led/issi/is31fl3736.h
@@ -19,28 +19,66 @@
#include <stdint.h>
#include <stdbool.h>
-#include <string.h>
#include "progmem.h"
-// Simple interface option.
-// If these aren't defined, just define them to make it compile
-
-#ifndef DRIVER_COUNT
-# define DRIVER_COUNT 2
+// ======== DEPRECATED DEFINES - DO NOT USE ========
+#ifdef DRIVER_COUNT
+# define IS31FL3736_DRIVER_COUNT DRIVER_COUNT
#endif
-
-#ifndef RGB_MATRIX_LED_COUNT
-# define RGB_MATRIX_LED_COUNT 96
+#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_SWPULLUP ISSI_SWPULLUP
+#endif
+#ifdef ISSI_CSPULLUP
+# define IS31FL3736_CSPULLUP ISSI_CSPULLUP
+#endif
+#ifdef ISSI_GLOBALCURRENT
+# define IS31FL3736_GLOBALCURRENT ISSI_GLOBALCURRENT
#endif
-typedef struct is31_led {
+#define is31_led is31fl3736_led_t
+#define g_is31_leds g_is31fl3736_leds
+
+#define PUR_0R IS31FL3736_PUR_0R
+#define PUR_05KR IS31FL3736_PUR_05KR
+#define PUR_1KR IS31FL3736_PUR_1KR
+#define PUR_2KR IS31FL3736_PUR_2KR
+#define PUR_4KR IS31FL3736_PUR_4KR
+#define PUR_8KR IS31FL3736_PUR_8KR
+#define PUR_16KR IS31FL3736_PUR_16KR
+#define PUR_32KR IS31FL3736_PUR_32KR
+// ========
+
+#define IS31FL3736_I2C_ADDRESS_GND_GND 0x50
+#define IS31FL3736_I2C_ADDRESS_GND_SCL 0x51
+#define IS31FL3736_I2C_ADDRESS_GND_SDA 0x52
+#define IS31FL3736_I2C_ADDRESS_GND_VCC 0x53
+#define IS31FL3736_I2C_ADDRESS_SCL_GND 0x54
+#define IS31FL3736_I2C_ADDRESS_SCL_SCL 0x55
+#define IS31FL3736_I2C_ADDRESS_SCL_SDA 0x56
+#define IS31FL3736_I2C_ADDRESS_SCL_VCC 0x57
+#define IS31FL3736_I2C_ADDRESS_SDA_GND 0x58
+#define IS31FL3736_I2C_ADDRESS_SDA_SCL 0x59
+#define IS31FL3736_I2C_ADDRESS_SDA_SDA 0x5A
+#define IS31FL3736_I2C_ADDRESS_SDA_VCC 0x5B
+#define IS31FL3736_I2C_ADDRESS_VCC_GND 0x5C
+#define IS31FL3736_I2C_ADDRESS_VCC_SCL 0x5D
+#define IS31FL3736_I2C_ADDRESS_VCC_SDA 0x5E
+#define IS31FL3736_I2C_ADDRESS_VCC_VCC 0x5F
+
+typedef struct is31fl3736_led_t {
uint8_t driver : 2;
uint8_t r;
uint8_t g;
uint8_t b;
-} __attribute__((packed)) is31_led;
+} __attribute__((packed)) is31fl3736_led_t;
-extern const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT];
+extern const is31fl3736_led_t PROGMEM g_is31fl3736_leds[RGB_MATRIX_LED_COUNT];
void is31fl3736_init(uint8_t addr);
void is31fl3736_write_register(uint8_t addr, uint8_t reg, uint8_t data);
@@ -51,10 +89,6 @@ void is31fl3736_set_color_all(uint8_t red, uint8_t green, uint8_t blue);
void is31fl3736_set_led_control_register(uint8_t index, bool red, bool green, bool blue);
-void is31fl3736_mono_set_brightness(int index, uint8_t value);
-void is31fl3736_mono_set_brightness_all(uint8_t value);
-void is31fl3736_mono_set_led_control_register(uint8_t index, bool enabled);
-
// This should not be called from an interrupt
// (eg. from a timer interrupt).
// Call this while idle (in between matrix scans).
@@ -62,14 +96,20 @@ void is31fl3736_mono_set_led_control_register(uint8_t index, bool enabled);
void is31fl3736_update_pwm_buffers(uint8_t addr, uint8_t index);
void is31fl3736_update_led_control_registers(uint8_t addr, uint8_t index);
-#define PUR_0R 0x00 // No PUR resistor
-#define PUR_05KR 0x01 // 0.5k Ohm resistor
-#define PUR_1KR 0x02 // 1.0k Ohm resistor
-#define PUR_2KR 0x03 // 2.0k Ohm resistor
-#define PUR_4KR 0x04 // 4.0k Ohm resistor
-#define PUR_8KR 0x05 // 8.0k Ohm resistor
-#define PUR_16KR 0x06 // 16k Ohm resistor
-#define PUR_32KR 0x07 // 32k Ohm resistor
+#define IS31FL3736_PUR_0R 0x00 // No PUR resistor
+#define IS31FL3736_PUR_05KR 0x01 // 0.5k Ohm resistor
+#define IS31FL3736_PUR_1KR 0x02 // 1.0k Ohm resistor
+#define IS31FL3736_PUR_2KR 0x03 // 2.0k Ohm resistor
+#define IS31FL3736_PUR_4KR 0x04 // 4.0k Ohm resistor
+#define IS31FL3736_PUR_8KR 0x05 // 8.0k Ohm resistor
+#define IS31FL3736_PUR_16KR 0x06 // 16k Ohm resistor
+#define IS31FL3736_PUR_32KR 0x07 // 32k Ohm resistor
+
+#define IS31FL3736_PWM_FREQUENCY_8K4_HZ 0b000
+#define IS31FL3736_PWM_FREQUENCY_4K2_HZ 0b001
+#define IS31FL3736_PWM_FREQUENCY_26K7_HZ 0b010
+#define IS31FL3736_PWM_FREQUENCY_2K1_HZ 0b011
+#define IS31FL3736_PWM_FREQUENCY_1K05_HZ 0b100
#define A_1 0x00
#define A_2 0x02
diff --git a/drivers/led/issi/is31fl3737-simple.c b/drivers/led/issi/is31fl3737-simple.c
new file mode 100644
index 0000000000..3db7b7ed33
--- /dev/null
+++ b/drivers/led/issi/is31fl3737-simple.c
@@ -0,0 +1,219 @@
+/* Copyright 2017 Jason Williams
+ * Copyright 2018 Jack Humbert
+ * Copyright 2018 Yiancar
+ * Copyright 2021 Doni Crosby
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General 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 "is31fl3737-simple.h"
+#include <string.h>
+#include "i2c_master.h"
+#include "wait.h"
+
+#define IS31FL3737_COMMANDREGISTER 0xFD
+#define IS31FL3737_COMMANDREGISTER_WRITELOCK 0xFE
+#define IS31FL3737_INTERRUPTMASKREGISTER 0xF0
+#define IS31FL3737_INTERRUPTSTATUSREGISTER 0xF1
+
+#define IS31FL3737_PAGE_LEDCONTROL 0x00 // PG0
+#define IS31FL3737_PAGE_PWM 0x01 // PG1
+#define IS31FL3737_PAGE_AUTOBREATH 0x02 // PG2
+#define IS31FL3737_PAGE_FUNCTION 0x03 // PG3
+
+#define IS31FL3737_REG_CONFIGURATION 0x00 // PG3
+#define IS31FL3737_REG_GLOBALCURRENT 0x01 // PG3
+#define IS31FL3737_REG_RESET 0x11 // PG3
+#define IS31FL3737_REG_SWPULLUP 0x0F // PG3
+#define IS31FL3737_REG_CSPULLUP 0x10 // PG3
+
+#ifndef IS31FL3737_I2C_TIMEOUT
+# define IS31FL3737_I2C_TIMEOUT 100
+#endif
+
+#ifndef IS31FL3737_I2C_PERSISTENCE
+# define IS31FL3737_I2C_PERSISTENCE 0
+#endif
+
+#ifndef IS31FL3737_PWM_FREQUENCY
+# define IS31FL3737_PWM_FREQUENCY IS31FL3737_PWM_FREQUENCY_8K4_HZ // PFS - IS31FL3737B only
+#endif
+
+#ifndef IS31FL3737_SWPULLUP
+# define IS31FL3737_SWPULLUP IS31FL3737_PUR_0R
+#endif
+
+#ifndef IS31FL3737_CSPULLUP
+# define IS31FL3737_CSPULLUP IS31FL3737_PUR_0R
+#endif
+
+#ifndef IS31FL3737_GLOBALCURRENT
+# define IS31FL3737_GLOBALCURRENT 0xFF
+#endif
+
+// Transfer buffer for TWITransmitData()
+uint8_t g_twi_transfer_buffer[20];
+
+// These buffers match the IS31FL3737 PWM registers.
+// The control buffers match the PG0 LED On/Off registers.
+// Storing them like this is optimal for I2C transfers to the registers.
+// We could optimize this and take out the unused registers from these
+// buffers and the transfers in is31fl3737_write_pwm_buffer() but it's
+// probably not worth the extra complexity.
+
+uint8_t g_pwm_buffer[IS31FL3737_DRIVER_COUNT][192];
+bool g_pwm_buffer_update_required[IS31FL3737_DRIVER_COUNT] = {false};
+
+uint8_t g_led_control_registers[IS31FL3737_DRIVER_COUNT][24] = {0};
+bool g_led_control_registers_update_required[IS31FL3737_DRIVER_COUNT] = {false};
+
+void is31fl3737_write_register(uint8_t addr, uint8_t reg, uint8_t data) {
+ g_twi_transfer_buffer[0] = reg;
+ g_twi_transfer_buffer[1] = data;
+
+#if IS31FL3737_I2C_PERSISTENCE > 0
+ for (uint8_t i = 0; i < IS31FL3737_I2C_PERSISTENCE; i++) {
+ if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, IS31FL3737_I2C_TIMEOUT) == 0) break;
+ }
+#else
+ i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, IS31FL3737_I2C_TIMEOUT);
+#endif
+}
+
+void is31fl3737_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer) {
+ // assumes PG1 is already selected
+
+ // transmit PWM registers in 12 transfers of 16 bytes
+ // g_twi_transfer_buffer[] is 20 bytes
+
+ // iterate over the pwm_buffer contents at 16 byte intervals
+ for (int i = 0; i < 192; i += 16) {
+ g_twi_transfer_buffer[0] = i;
+ // copy the data from i to i+15
+ // device will auto-increment register for data after the first byte
+ // thus this sets registers 0x00-0x0F, 0x10-0x1F, etc. in one transfer
+ memcpy(g_twi_transfer_buffer + 1, pwm_buffer + i, 16);
+
+#if IS31FL3737_I2C_PERSISTENCE > 0
+ for (uint8_t i = 0; i < IS31FL3737_I2C_PERSISTENCE; i++) {
+ if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, IS31FL3737_I2C_TIMEOUT) == 0) break;
+ }
+#else
+ i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, IS31FL3737_I2C_TIMEOUT);
+#endif
+ }
+}
+
+void is31fl3737_init(uint8_t addr) {
+ // In order to avoid the LEDs being driven with garbage data
+ // in the LED driver's PWM registers, shutdown is enabled last.
+ // Set up the mode and other settings, clear the PWM registers,
+ // then disable software shutdown.
+
+ // Unlock the command register.
+ is31fl3737_write_register(addr, IS31FL3737_COMMANDREGISTER_WRITELOCK, 0xC5);
+
+ // Select PG0
+ is31fl3737_write_register(addr, IS31FL3737_COMMANDREGISTER, IS31FL3737_PAGE_LEDCONTROL);
+ // Turn off all LEDs.
+ for (int i = 0x00; i <= 0x17; i++) {
+ is31fl3737_write_register(addr, i, 0x00);
+ }
+
+ // Unlock the command register.
+ is31fl3737_write_register(addr, IS31FL3737_COMMANDREGISTER_WRITELOCK, 0xC5);
+
+ // Select PG1
+ is31fl3737_write_register(addr, IS31FL3737_COMMANDREGISTER, IS31FL3737_PAGE_PWM);
+ // Set PWM on all LEDs to 0
+ // No need to setup Breath registers to PWM as that is the default.
+ for (int i = 0x00; i <= 0xBF; i++) {
+ is31fl3737_write_register(addr, i, 0x00);
+ }
+
+ // Unlock the command register.
+ is31fl3737_write_register(addr, IS31FL3737_COMMANDREGISTER_WRITELOCK, 0xC5);
+
+ // Select PG3
+ is31fl3737_write_register(addr, IS31FL3737_COMMANDREGISTER, IS31FL3737_PAGE_FUNCTION);
+ // Set de-ghost pull-up resistors (SWx)
+ is31fl3737_write_register(addr, IS31FL3737_REG_SWPULLUP, IS31FL3737_SWPULLUP);
+ // Set de-ghost pull-down resistors (CSx)
+ is31fl3737_write_register(addr, IS31FL3737_REG_CSPULLUP, IS31FL3737_CSPULLUP);
+ // Set global current to maximum.
+ is31fl3737_write_register(addr, IS31FL3737_REG_GLOBALCURRENT, IS31FL3737_GLOBALCURRENT);
+ // Disable software shutdown.
+ is31fl3737_write_register(addr, IS31FL3737_REG_CONFIGURATION, ((IS31FL3737_PWM_FREQUENCY & 0b111) << 3) | 0x01);
+
+ // Wait 10ms to ensure the device has woken up.
+ wait_ms(10);
+}
+
+void is31fl3737_set_value(int index, uint8_t value) {
+ is31fl3737_led_t led;
+ if (index >= 0 && index < LED_MATRIX_LED_COUNT) {
+ memcpy_P(&led, (&g_is31fl3737_leds[index]), sizeof(led));
+
+ if (g_pwm_buffer[led.driver][led.v] == value) {
+ return;
+ }
+ g_pwm_buffer[led.driver][led.v] = value;
+ g_pwm_buffer_update_required[led.driver] = true;
+ }
+}
+
+void is31fl3737_set_value_all(uint8_t value) {
+ for (int i = 0; i < LED_MATRIX_LED_COUNT; i++) {
+ is31fl3737_set_value(i, value);
+ }
+}
+
+void is31fl3737_set_led_control_register(uint8_t index, bool value) {
+ is31fl3737_led_t led;
+ memcpy_P(&led, (&g_is31fl3737_leds[index]), sizeof(led));
+
+ uint8_t control_register = led.v / 8;
+ uint8_t bit_value = led.v % 8;
+
+ if (value) {
+ g_led_control_registers[led.driver][control_register] |= (1 << bit_value);
+ } else {
+ g_led_control_registers[led.driver][control_register] &= ~(1 << bit_value);
+ }
+
+ g_led_control_registers_update_required[led.driver] = true;
+}
+
+void is31fl3737_update_pwm_buffers(uint8_t addr, uint8_t index) {
+ if (g_pwm_buffer_update_required[index]) {
+ // Firstly we need to unlock the command register and select PG1
+ is31fl3737_write_register(addr, IS31FL3737_COMMANDREGISTER_WRITELOCK, 0xC5);
+ is31fl3737_write_register(addr, IS31FL3737_COMMANDREGISTER, IS31FL3737_PAGE_PWM);
+
+ is31fl3737_write_pwm_buffer(addr, g_pwm_buffer[index]);
+ g_pwm_buffer_update_required[index] = false;
+ }
+}
+
+void is31fl3737_update_led_control_registers(uint8_t addr, uint8_t index) {
+ if (g_led_control_registers_update_required[index]) {
+ // Firstly we need to unlock the command register and select PG0
+ is31fl3737_write_register(addr, IS31FL3737_COMMANDREGISTER_WRITELOCK, 0xC5);
+ is31fl3737_write_register(addr, IS31FL3737_COMMANDREGISTER, IS31FL3737_PAGE_LEDCONTROL);
+ for (int i = 0; i < 24; i++) {
+ is31fl3737_write_register(addr, i, g_led_control_registers[index][i]);
+ }
+ g_led_control_registers_update_required[index] = false;
+ }
+}
diff --git a/drivers/led/issi/is31fl3737-simple.h b/drivers/led/issi/is31fl3737-simple.h
new file mode 100644
index 0000000000..0f4e0d014b
--- /dev/null
+++ b/drivers/led/issi/is31fl3737-simple.h
@@ -0,0 +1,256 @@
+/* Copyright 2017 Jason Williams
+ * Copyright 2018 Jack Humbert
+ * Copyright 2018 Yiancar
+ * Copyright 2021 Doni Crosby
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General 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 <stdint.h>
+#include <stdbool.h>
+#include "progmem.h"
+
+// ======== DEPRECATED DEFINES - DO NOT USE ========
+#ifdef DRIVER_COUNT
+# define IS31FL3737_DRIVER_COUNT DRIVER_COUNT
+#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_SWPULLUP ISSI_SWPULLUP
+#endif
+#ifdef ISSI_CSPULLUP
+# define IS31FL3737_CSPULLUP ISSI_CSPULLUP
+#endif
+#ifdef ISSI_GLOBALCURRENT
+# define IS31FL3737_GLOBALCURRENT ISSI_GLOBALCURRENT
+#endif
+
+#define PUR_0R IS31FL3737_PUR_0R
+#define PUR_05KR IS31FL3737_PUR_05KR
+#define PUR_1KR IS31FL3737_PUR_1KR
+#define PUR_2KR IS31FL3737_PUR_2KR
+#define PUR_4KR IS31FL3737_PUR_4KR
+#define PUR_8KR IS31FL3737_PUR_8KR
+#define PUR_16KR IS31FL3737_PUR_16KR
+#define PUR_32KR IS31FL3737_PUR_32KR
+// ========
+
+#define IS31FL3737_I2C_ADDRESS_GND 0x50
+#define IS31FL3737_I2C_ADDRESS_SCL 0x55
+#define IS31FL3737_I2C_ADDRESS_SDA 0x5A
+#define IS31FL3737_I2C_ADDRESS_VCC 0x5F
+
+typedef struct is31fl3737_led_t {
+ uint8_t driver : 2;
+ uint8_t v;
+} __attribute__((packed)) is31fl3737_led_t;
+
+extern const is31fl3737_led_t PROGMEM g_is31fl3737_leds[LED_MATRIX_LED_COUNT];
+
+void is31fl3737_init(uint8_t addr);
+void is31fl3737_write_register(uint8_t addr, uint8_t reg, uint8_t data);
+void is31fl3737_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer);
+
+void is31fl3737_set_value(int index, uint8_t value);
+void is31fl3737_set_value_all(uint8_t value);
+
+void is31fl3737_set_led_control_register(uint8_t index, bool value);
+
+// This should not be called from an interrupt
+// (eg. from a timer interrupt).
+// Call this while idle (in between matrix scans).
+// If the buffer is dirty, it will update the driver with the buffer.
+void is31fl3737_update_pwm_buffers(uint8_t addr, uint8_t index);
+void is31fl3737_update_led_control_registers(uint8_t addr, uint8_t index);
+
+#define IS31FL3737_PUR_0R 0x00 // No PUR resistor
+#define IS31FL3737_PUR_05KR 0x01 // 0.5k Ohm resistor in t_NOL
+#define IS31FL3737_PUR_1KR 0x02 // 1.0k Ohm resistor in t_NOL
+#define IS31FL3737_PUR_2KR 0x03 // 2.0k Ohm resistor in t_NOL
+#define IS31FL3737_PUR_4KR 0x04 // 4.0k Ohm resistor in t_NOL
+#define IS31FL3737_PUR_8KR 0x05 // 8.0k Ohm resistor in t_NOL
+#define IS31FL3737_PUR_16KR 0x06 // 16k Ohm resistor in t_NOL
+#define IS31FL3737_PUR_32KR 0x07 // 32k Ohm resistor in t_NOL
+
+#define IS31FL3737_PWM_FREQUENCY_8K4_HZ 0b000
+#define IS31FL3737_PWM_FREQUENCY_4K2_HZ 0b001
+#define IS31FL3737_PWM_FREQUENCY_26K7_HZ 0b010
+#define IS31FL3737_PWM_FREQUENCY_2K1_HZ 0b011
+#define IS31FL3737_PWM_FREQUENCY_1K05_HZ 0b100
+
+#define A_1 0x00
+#define A_2 0x01
+#define A_3 0x02
+#define A_4 0x03
+#define A_5 0x04
+#define A_6 0x05
+#define A_7 0x08
+#define A_8 0x09
+#define A_9 0x0A
+#define A_10 0x0B
+#define A_11 0x0C
+#define A_12 0x0D
+
+#define B_1 0x10
+#define B_2 0x11
+#define B_3 0x12
+#define B_4 0x13
+#define B_5 0x14
+#define B_6 0x15
+#define B_7 0x18
+#define B_8 0x19
+#define B_9 0x1A
+#define B_10 0x1B
+#define B_11 0x1C
+#define B_12 0x1D
+
+#define C_1 0x20
+#define C_2 0x21
+#define C_3 0x22
+#define C_4 0x23
+#define C_5 0x24
+#define C_6 0x25
+#define C_7 0x28
+#define C_8 0x29
+#define C_9 0x2A
+#define C_10 0x2B
+#define C_11 0x2C
+#define C_12 0x2D
+
+#define D_1 0x30
+#define D_2 0x31
+#define D_3 0x32
+#define D_4 0x33
+#define D_5 0x34
+#define D_6 0x35
+#define D_7 0x38
+#define D_8 0x39
+#define D_9 0x3A
+#define D_10 0x3B
+#define D_11 0x3C
+#define D_12 0x3D
+
+#define E_1 0x40
+#define E_2 0x41
+#define E_3 0x42
+#define E_4 0x43
+#define E_5 0x44
+#define E_6 0x45
+#define E_7 0x48
+#define E_8 0x49
+#define E_9 0x4A
+#define E_10 0x4B
+#define E_11 0x4C
+#define E_12 0x4D
+
+#define F_1 0x50
+#define F_2 0x51
+#define F_3 0x52
+#define F_4 0x53
+#define F_5 0x54
+#define F_6 0x55
+#define F_7 0x58
+#define F_8 0x59
+#define F_9 0x5A
+#define F_10 0x5B
+#define F_11 0x5C
+#define F_12 0x5D
+
+#define G_1 0x60
+#define G_2 0x61
+#define G_3 0x62
+#define G_4 0x63
+#define G_5 0x64
+#define G_6 0x65
+#define G_7 0x68
+#define G_8 0x69
+#define G_9 0x6A
+#define G_10 0x6B
+#define G_11 0x6C
+#define G_12 0x6D
+
+#define H_1 0x70
+#define H_2 0x71
+#define H_3 0x72
+#define H_4 0x73
+#define H_5 0x74
+#define H_6 0x75
+#define H_7 0x78
+#define H_8 0x79
+#define H_9 0x7A
+#define H_10 0x7B
+#define H_11 0x7C
+#define H_12 0x7D
+
+#define I_1 0x80
+#define I_2 0x81
+#define I_3 0x82
+#define I_4 0x83
+#define I_5 0x84
+#define I_6 0x85
+#define I_7 0x88
+#define I_8 0x89
+#define I_9 0x8A
+#define I_10 0x8B
+#define I_11 0x8C
+#define I_12 0x8D
+
+#define J_1 0x90
+#define J_2 0x91
+#define J_3 0x92
+#define J_4 0x93
+#define J_5 0x94
+#define J_6 0x95
+#define J_7 0x98
+#define J_8 0x99
+#define J_9 0x9A
+#define J_10 0x9B
+#define J_11 0x9C
+#define J_12 0x9D
+
+#define K_1 0xA0
+#define K_2 0xA1
+#define K_3 0xA2
+#define K_4 0xA3
+#define K_5 0xA4
+#define K_6 0xA5
+#define K_7 0xA8
+#define K_8 0xA9
+#define K_9 0xAA
+#define K_10 0xAB
+#define K_11 0xAC
+#define K_12 0xAD
+
+#define L_1 0xB0
+#define L_2 0xB1
+#define L_3 0xB2
+#define L_4 0xB3
+#define L_5 0xB4
+#define L_6 0xB5
+#define L_7 0xB8
+#define L_8 0xB9
+#define L_9 0xBA
+#define L_10 0xBB
+#define L_11 0xBC
+#define L_12 0xBD
diff --git a/drivers/led/issi/is31fl3737.c b/drivers/led/issi/is31fl3737.c
index 947c0a1d1a..c2af75bbb8 100644
--- a/drivers/led/issi/is31fl3737.c
+++ b/drivers/led/issi/is31fl3737.c
@@ -18,59 +18,48 @@
*/
#include "is31fl3737.h"
+#include <string.h>
#include "i2c_master.h"
#include "wait.h"
-// This is a 7-bit address, that gets left-shifted and bit 0
-// set to 0 for write, 1 for read (as per I2C protocol)
-// The address will vary depending on your wiring:
-// 00 <-> GND
-// 01 <-> SCL
-// 10 <-> SDA
-// 11 <-> VCC
-// ADDR1 represents A1:A0 of the 7-bit address.
-// ADDR2 represents A3:A2 of the 7-bit address.
-// The result is: 0b101(ADDR2)(ADDR1)
-#define ISSI_ADDR_DEFAULT 0x50
-
-#define ISSI_COMMANDREGISTER 0xFD
-#define ISSI_COMMANDREGISTER_WRITELOCK 0xFE
-#define ISSI_INTERRUPTMASKREGISTER 0xF0
-#define ISSI_INTERRUPTSTATUSREGISTER 0xF1
-
-#define ISSI_PAGE_LEDCONTROL 0x00 // PG0
-#define ISSI_PAGE_PWM 0x01 // PG1
-#define ISSI_PAGE_AUTOBREATH 0x02 // PG2
-#define ISSI_PAGE_FUNCTION 0x03 // PG3
-
-#define ISSI_REG_CONFIGURATION 0x00 // PG3
-#define ISSI_REG_GLOBALCURRENT 0x01 // PG3
-#define ISSI_REG_RESET 0x11 // PG3
-#define ISSI_REG_SWPULLUP 0x0F // PG3
-#define ISSI_REG_CSPULLUP 0x10 // PG3
-
-#ifndef ISSI_TIMEOUT
-# define ISSI_TIMEOUT 100
+#define IS31FL3737_COMMANDREGISTER 0xFD
+#define IS31FL3737_COMMANDREGISTER_WRITELOCK 0xFE
+#define IS31FL3737_INTERRUPTMASKREGISTER 0xF0
+#define IS31FL3737_INTERRUPTSTATUSREGISTER 0xF1
+
+#define IS31FL3737_PAGE_LEDCONTROL 0x00 // PG0
+#define IS31FL3737_PAGE_PWM 0x01 // PG1
+#define IS31FL3737_PAGE_AUTOBREATH 0x02 // PG2
+#define IS31FL3737_PAGE_FUNCTION 0x03 // PG3
+
+#define IS31FL3737_REG_CONFIGURATION 0x00 // PG3
+#define IS31FL3737_REG_GLOBALCURRENT 0x01 // PG3
+#define IS31FL3737_REG_RESET 0x11 // PG3
+#define IS31FL3737_REG_SWPULLUP 0x0F // PG3
+#define IS31FL3737_REG_CSPULLUP 0x10 // PG3
+
+#ifndef IS31FL3737_I2C_TIMEOUT
+# define IS31FL3737_I2C_TIMEOUT 100
#endif
-#ifndef ISSI_PERSISTENCE
-# define ISSI_PERSISTENCE 0
+#ifndef IS31FL3737_I2C_PERSISTENCE
+# define IS31FL3737_I2C_PERSISTENCE 0
#endif
-#ifndef ISSI_PWM_FREQUENCY
-# define ISSI_PWM_FREQUENCY 0b000 // PFS - IS31FL3737B only
+#ifndef IS31FL3737_PWM_FREQUENCY
+# define IS31FL3737_PWM_FREQUENCY IS31FL3737_PWM_FREQUENCY_8K4_HZ // PFS - IS31FL3737B only
#endif
-#ifndef ISSI_SWPULLUP
-# define ISSI_SWPULLUP PUR_0R
+#ifndef IS31FL3737_SWPULLUP
+# define IS31FL3737_SWPULLUP IS31FL3737_PUR_0R
#endif
-#ifndef ISSI_CSPULLUP
-# define ISSI_CSPULLUP PUR_0R
+#ifndef IS31FL3737_CSPULLUP
+# define IS31FL3737_CSPULLUP IS31FL3737_PUR_0R
#endif
-#ifndef ISSI_GLOBALCURRENT
-# define ISSI_GLOBALCURRENT 0xFF
+#ifndef IS31FL3737_GLOBALCURRENT
+# define IS31FL3737_GLOBALCURRENT 0xFF
#endif
// Transfer buffer for TWITransmitData()
@@ -83,22 +72,22 @@ uint8_t g_twi_transfer_buffer[20];
// buffers and the transfers in is31fl3737_write_pwm_buffer() but it's
// probably not worth the extra complexity.
-uint8_t g_pwm_buffer[DRIVER_COUNT][192];
-bool g_pwm_buffer_update_required[DRIVER_COUNT] = {false};
+uint8_t g_pwm_buffer[IS31FL3737_DRIVER_COUNT][192];
+bool g_pwm_buffer_update_required[IS31FL3737_DRIVER_COUNT] = {false};
-uint8_t g_led_control_registers[DRIVER_COUNT][24] = {0};
-bool g_led_control_registers_update_required[DRIVER_COUNT] = {false};
+uint8_t g_led_control_registers[IS31FL3737_DRIVER_COUNT][24] = {0};
+bool g_led_control_registers_update_required[IS31FL3737_DRIVER_COUNT] = {false};
void is31fl3737_write_register(uint8_t addr, uint8_t reg, uint8_t data) {
g_twi_transfer_buffer[0] = reg;
g_twi_transfer_buffer[1] = data;
-#if ISSI_PERSISTENCE > 0
- for (uint8_t i = 0; i < ISSI_PERSISTENCE; i++) {
- if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, ISSI_TIMEOUT) == 0) break;
+#if IS31FL3737_I2C_PERSISTENCE > 0
+ for (uint8_t i = 0; i < IS31FL3737_I2C_PERSISTENCE; i++) {
+ if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, IS31FL3737_I2C_TIMEOUT) == 0) break;
}
#else
- i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, ISSI_TIMEOUT);
+ i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, IS31FL3737_I2C_TIMEOUT);
#endif
}
@@ -116,12 +105,12 @@ void is31fl3737_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer) {
// thus this sets registers 0x00-0x0F, 0x10-0x1F, etc. in one transfer
memcpy(g_twi_transfer_buffer + 1, pwm_buffer + i, 16);
-#if ISSI_PERSISTENCE > 0
- for (uint8_t i = 0; i < ISSI_PERSISTENCE; i++) {
- if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, ISSI_TIMEOUT) == 0) break;
+#if IS31FL3737_I2C_PERSISTENCE > 0
+ for (uint8_t i = 0; i < IS31FL3737_I2C_PERSISTENCE; i++) {
+ if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, IS31FL3737_I2C_TIMEOUT) == 0) break;
}
#else
- i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, ISSI_TIMEOUT);
+ i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, IS31FL3737_I2C_TIMEOUT);
#endif
}
}
@@ -133,20 +122,20 @@ void is31fl3737_init(uint8_t addr) {
// then disable software shutdown.
// Unlock the command register.
- is31fl3737_write_register(addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5);
+ is31fl3737_write_register(addr, IS31FL3737_COMMANDREGISTER_WRITELOCK, 0xC5);
// Select PG0
- is31fl3737_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_LEDCONTROL);
+ is31fl3737_write_register(addr, IS31FL3737_COMMANDREGISTER, IS31FL3737_PAGE_LEDCONTROL);
// Turn off all LEDs.
for (int i = 0x00; i <= 0x17; i++) {
is31fl3737_write_register(addr, i, 0x00);
}
// Unlock the command register.
- is31fl3737_write_register(addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5);
+ is31fl3737_write_register(addr, IS31FL3737_COMMANDREGISTER_WRITELOCK, 0xC5);
// Select PG1
- is31fl3737_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_PWM);
+ is31fl3737_write_register(addr, IS31FL3737_COMMANDREGISTER, IS31FL3737_PAGE_PWM);
// Set PWM on all LEDs to 0
// No need to setup Breath registers to PWM as that is the default.
for (int i = 0x00; i <= 0xBF; i++) {
@@ -154,27 +143,27 @@ void is31fl3737_init(uint8_t addr) {
}
// Unlock the command register.
- is31fl3737_write_register(addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5);
+ is31fl3737_write_register(addr, IS31FL3737_COMMANDREGISTER_WRITELOCK, 0xC5);
// Select PG3
- is31fl3737_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_FUNCTION);
+ is31fl3737_write_register(addr, IS31FL3737_COMMANDREGISTER, IS31FL3737_PAGE_FUNCTION);
// Set de-ghost pull-up resistors (SWx)
- is31fl3737_write_register(addr, ISSI_REG_SWPULLUP, ISSI_SWPULLUP);
+ is31fl3737_write_register(addr, IS31FL3737_REG_SWPULLUP, IS31FL3737_SWPULLUP);
// Set de-ghost pull-down resistors (CSx)
- is31fl3737_write_register(addr, ISSI_REG_CSPULLUP, ISSI_CSPULLUP);
+ is31fl3737_write_register(addr, IS31FL3737_REG_CSPULLUP, IS31FL3737_CSPULLUP);
// Set global current to maximum.
- is31fl3737_write_register(addr, ISSI_REG_GLOBALCURRENT, ISSI_GLOBALCURRENT);
+ is31fl3737_write_register(addr, IS31FL3737_REG_GLOBALCURRENT, IS31FL3737_GLOBALCURRENT);
// Disable software shutdown.
- is31fl3737_write_register(addr, ISSI_REG_CONFIGURATION, ((ISSI_PWM_FREQUENCY & 0b111) << 3) | 0x01);
+ is31fl3737_write_register(addr, IS31FL3737_REG_CONFIGURATION, ((IS31FL3737_PWM_FREQUENCY & 0b111) << 3) | 0x01);
// Wait 10ms to ensure the device has woken up.
wait_ms(10);
}
void is31fl3737_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) {
- is31_led led;
+ is31fl3737_led_t led;
if (index >= 0 && index < RGB_MATRIX_LED_COUNT) {
- memcpy_P(&led, (&g_is31_leds[index]), sizeof(led));
+ memcpy_P(&led, (&g_is31fl3737_leds[index]), sizeof(led));
if (g_pwm_buffer[led.driver][led.r] == red && g_pwm_buffer[led.driver][led.g] == green && g_pwm_buffer[led.driver][led.b] == blue) {
return;
@@ -193,8 +182,8 @@ void is31fl3737_set_color_all(uint8_t red, uint8_t green, uint8_t blue) {
}
void is31fl3737_set_led_control_register(uint8_t index, bool red, bool green, bool blue) {
- is31_led led;
- memcpy_P(&led, (&g_is31_leds[index]), sizeof(led));
+ is31fl3737_led_t led;
+ memcpy_P(&led, (&g_is31fl3737_leds[index]), sizeof(led));
uint8_t control_register_r = led.r / 8;
uint8_t control_register_g = led.g / 8;
@@ -225,22 +214,22 @@ void is31fl3737_set_led_control_register(uint8_t index, bool red, bool green, bo
void is31fl3737_update_pwm_buffers(uint8_t addr, uint8_t index) {
if (g_pwm_buffer_update_required[index]) {
// Firstly we need to unlock the command register and select PG1
- is31fl3737_write_register(addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5);
- is31fl3737_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_PWM);
+ is31fl3737_write_register(addr, IS31FL3737_COMMANDREGISTER_WRITELOCK, 0xC5);
+ is31fl3737_write_register(addr, IS31FL3737_COMMANDREGISTER, IS31FL3737_PAGE_PWM);
is31fl3737_write_pwm_buffer(addr, g_pwm_buffer[index]);
+ g_pwm_buffer_update_required[index] = false;
}
- g_pwm_buffer_update_required[index] = false;
}
void is31fl3737_update_led_control_registers(uint8_t addr, uint8_t index) {
if (g_led_control_registers_update_required[index]) {
// Firstly we need to unlock the command register and select PG0
- is31fl3737_write_register(addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5);
- is31fl3737_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_LEDCONTROL);
+ is31fl3737_write_register(addr, IS31FL3737_COMMANDREGISTER_WRITELOCK, 0xC5);
+ is31fl3737_write_register(addr, IS31FL3737_COMMANDREGISTER, IS31FL3737_PAGE_LEDCONTROL);
for (int i = 0; i < 24; i++) {
is31fl3737_write_register(addr, i, g_led_control_registers[index][i]);
}
+ g_led_control_registers_update_required[index] = false;
}
- g_led_control_registers_update_required[index] = false;
}
diff --git a/drivers/led/issi/is31fl3737.h b/drivers/led/issi/is31fl3737.h
index e7fc97872c..84ed95f793 100644
--- a/drivers/led/issi/is31fl3737.h
+++ b/drivers/led/issi/is31fl3737.h
@@ -21,17 +21,57 @@
#include <stdint.h>
#include <stdbool.h>
-#include <string.h>
#include "progmem.h"
-typedef struct is31_led {
+// ======== DEPRECATED DEFINES - DO NOT USE ========
+#ifdef DRIVER_COUNT
+# define IS31FL3737_DRIVER_COUNT DRIVER_COUNT
+#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_SWPULLUP ISSI_SWPULLUP
+#endif
+#ifdef ISSI_CSPULLUP
+# define IS31FL3737_CSPULLUP ISSI_CSPULLUP
+#endif
+#ifdef ISSI_GLOBALCURRENT
+# define IS31FL3737_GLOBALCURRENT ISSI_GLOBALCURRENT
+#endif
+
+#define is31_led is31fl3737_led_t
+#define g_is31_leds g_is31fl3737_leds
+
+#define PUR_0R IS31FL3737_PUR_0R
+#define PUR_05KR IS31FL3737_PUR_05KR
+#define PUR_1KR IS31FL3737_PUR_1KR
+#define PUR_2KR IS31FL3737_PUR_2KR
+#define PUR_4KR IS31FL3737_PUR_4KR
+#define PUR_8KR IS31FL3737_PUR_8KR
+#define PUR_16KR IS31FL3737_PUR_16KR
+#define PUR_32KR IS31FL3737_PUR_32KR
+// ========
+
+#define IS31FL3737_I2C_ADDRESS_GND 0x50
+#define IS31FL3737_I2C_ADDRESS_SCL 0x55
+#define IS31FL3737_I2C_ADDRESS_SDA 0x5A
+#define IS31FL3737_I2C_ADDRESS_VCC 0x5F
+
+typedef struct is31fl3737_led_t {
uint8_t driver : 2;
uint8_t r;
uint8_t g;
uint8_t b;
-} __attribute__((packed)) is31_led;
+} __attribute__((packed)) is31fl3737_led_t;
-extern const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT];
+extern const is31fl3737_led_t PROGMEM g_is31fl3737_leds[RGB_MATRIX_LED_COUNT];
void is31fl3737_init(uint8_t addr);
void is31fl3737_write_register(uint8_t addr, uint8_t reg, uint8_t data);
@@ -49,14 +89,20 @@ void is31fl3737_set_led_control_register(uint8_t index, bool red, bool green, bo
void is31fl3737_update_pwm_buffers(uint8_t addr, uint8_t index);
void is31fl3737_update_led_control_registers(uint8_t addr, uint8_t index);
-#define PUR_0R 0x00 // No PUR resistor
-#define PUR_05KR 0x01 // 0.5k Ohm resistor in t_NOL
-#define PUR_1KR 0x02 // 1.0k Ohm resistor in t_NOL
-#define PUR_2KR 0x03 // 2.0k Ohm resistor in t_NOL
-#define PUR_4KR 0x04 // 4.0k Ohm resistor in t_NOL
-#define PUR_8KR 0x05 // 8.0k Ohm resistor in t_NOL
-#define PUR_16KR 0x06 // 16k Ohm resistor in t_NOL
-#define PUR_32KR 0x07 // 32k Ohm resistor in t_NOL
+#define IS31FL3737_PUR_0R 0x00 // No PUR resistor
+#define IS31FL3737_PUR_05KR 0x01 // 0.5k Ohm resistor in t_NOL
+#define IS31FL3737_PUR_1KR 0x02 // 1.0k Ohm resistor in t_NOL
+#define IS31FL3737_PUR_2KR 0x03 // 2.0k Ohm resistor in t_NOL
+#define IS31FL3737_PUR_4KR 0x04 // 4.0k Ohm resistor in t_NOL
+#define IS31FL3737_PUR_8KR 0x05 // 8.0k Ohm resistor in t_NOL
+#define IS31FL3737_PUR_16KR 0x06 // 16k Ohm resistor in t_NOL
+#define IS31FL3737_PUR_32KR 0x07 // 32k Ohm resistor in t_NOL
+
+#define IS31FL3737_PWM_FREQUENCY_8K4_HZ 0b000
+#define IS31FL3737_PWM_FREQUENCY_4K2_HZ 0b001
+#define IS31FL3737_PWM_FREQUENCY_26K7_HZ 0b010
+#define IS31FL3737_PWM_FREQUENCY_2K1_HZ 0b011
+#define IS31FL3737_PWM_FREQUENCY_1K05_HZ 0b100
#define A_1 0x00
#define A_2 0x01
diff --git a/drivers/led/issi/is31fl3741-simple.c b/drivers/led/issi/is31fl3741-simple.c
new file mode 100644
index 0000000000..93c02fbc26
--- /dev/null
+++ b/drivers/led/issi/is31fl3741-simple.c
@@ -0,0 +1,253 @@
+/* Copyright 2017 Jason Williams
+ * Copyright 2018 Jack Humbert
+ * Copyright 2018 Yiancar
+ * Copyright 2020 MelGeek
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "is31fl3741-simple.h"
+#include <string.h>
+#include "i2c_master.h"
+#include "wait.h"
+
+#define IS31FL3741_COMMANDREGISTER 0xFD
+#define IS31FL3741_COMMANDREGISTER_WRITELOCK 0xFE
+#define IS31FL3741_INTERRUPTMASKREGISTER 0xF0
+#define IS31FL3741_INTERRUPTSTATUSREGISTER 0xF1
+#define IS31FL3741_IDREGISTER 0xFC
+
+#define IS31FL3741_PAGE_PWM0 0x00 // PG0
+#define IS31FL3741_PAGE_PWM1 0x01 // PG1
+#define IS31FL3741_PAGE_SCALING_0 0x02 // PG2
+#define IS31FL3741_PAGE_SCALING_1 0x03 // PG3
+#define IS31FL3741_PAGE_FUNCTION 0x04 // PG4
+
+#define IS31FL3741_REG_CONFIGURATION 0x00 // PG4
+#define IS31FL3741_REG_GLOBALCURRENT 0x01 // PG4
+#define IS31FL3741_REG_PULLDOWNUP 0x02 // PG4
+#define IS31FL3741_REG_PWM_FREQUENCY 0x36 // PG4
+#define IS31FL3741_REG_RESET 0x3F // PG4
+
+#ifndef IS31FL3741_I2C_TIMEOUT
+# define IS31FL3741_I2C_TIMEOUT 100
+#endif
+
+#ifndef IS31FL3741_I2C_PERSISTENCE
+# define IS31FL3741_I2C_PERSISTENCE 0
+#endif
+
+#ifndef IS31FL3741_CONFIGURATION
+# define IS31FL3741_CONFIGURATION 0x01
+#endif
+
+#ifndef IS31FL3741_PWM_FREQUENCY
+# define IS31FL3741_PWM_FREQUENCY IS31FL3741_PWM_FREQUENCY_29K_HZ
+#endif
+
+#ifndef IS31FL3741_SWPULLUP
+# define IS31FL3741_SWPULLUP IS31FL3741_PUR_32KR
+#endif
+
+#ifndef IS31FL3741_CSPULLUP
+# define IS31FL3741_CSPULLUP IS31FL3741_PUR_32KR
+#endif
+
+#ifndef IS31FL3741_GLOBALCURRENT
+# define IS31FL3741_GLOBALCURRENT 0xFF
+#endif
+
+#define IS31FL3741_MAX_LEDS 351
+
+// Transfer buffer for TWITransmitData()
+uint8_t g_twi_transfer_buffer[20] = {0xFF};
+
+// These buffers match the IS31FL3741 and IS31FL3741A PWM registers.
+// The scaling buffers match the PG2 and PG3 LED On/Off registers.
+// Storing them like this is optimal for I2C transfers to the registers.
+// We could optimize this and take out the unused registers from these
+// buffers and the transfers in is31fl3741_write_pwm_buffer() but it's
+// probably not worth the extra complexity.
+uint8_t g_pwm_buffer[IS31FL3741_DRIVER_COUNT][IS31FL3741_MAX_LEDS];
+bool g_pwm_buffer_update_required[IS31FL3741_DRIVER_COUNT] = {false};
+bool g_scaling_registers_update_required[IS31FL3741_DRIVER_COUNT] = {false};
+
+uint8_t g_scaling_registers[IS31FL3741_DRIVER_COUNT][IS31FL3741_MAX_LEDS];
+
+void is31fl3741_write_register(uint8_t addr, uint8_t reg, uint8_t data) {
+ g_twi_transfer_buffer[0] = reg;
+ g_twi_transfer_buffer[1] = data;
+
+#if IS31FL3741_I2C_PERSISTENCE > 0
+ for (uint8_t i = 0; i < IS31FL3741_I2C_PERSISTENCE; i++) {
+ if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, IS31FL3741_I2C_TIMEOUT) == 0) break;
+ }
+#else
+ i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, IS31FL3741_I2C_TIMEOUT);
+#endif
+}
+
+bool is31fl3741_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer) {
+ // Assume PG0 is already selected
+
+ for (int i = 0; i < 342; i += 18) {
+ if (i == 180) {
+ // unlock the command register and select PG1
+ is31fl3741_write_register(addr, IS31FL3741_COMMANDREGISTER_WRITELOCK, 0xC5);
+ is31fl3741_write_register(addr, IS31FL3741_COMMANDREGISTER, IS31FL3741_PAGE_PWM1);
+ }
+
+ g_twi_transfer_buffer[0] = i % 180;
+ memcpy(g_twi_transfer_buffer + 1, pwm_buffer + i, 18);
+
+#if IS31FL3741_I2C_PERSISTENCE > 0
+ for (uint8_t i = 0; i < IS31FL3741_I2C_PERSISTENCE; i++) {
+ if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 19, IS31FL3741_I2C_TIMEOUT) != 0) {
+ return false;
+ }
+ }
+#else
+ if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 19, IS31FL3741_I2C_TIMEOUT) != 0) {
+ return false;
+ }
+#endif
+ }
+
+ // transfer the left cause the total number is 351
+ g_twi_transfer_buffer[0] = 162;
+ memcpy(g_twi_transfer_buffer + 1, pwm_buffer + 342, 9);
+
+#if IS31FL3741_I2C_PERSISTENCE > 0
+ for (uint8_t i = 0; i < IS31FL3741_I2C_PERSISTENCE; i++) {
+ if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 10, IS31FL3741_I2C_TIMEOUT) != 0) {
+ return false;
+ }
+ }
+#else
+ if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 10, IS31FL3741_I2C_TIMEOUT) != 0) {
+ return false;
+ }
+#endif
+
+ return true;
+}
+
+void is31fl3741_init(uint8_t addr) {
+ // In order to avoid the LEDs being driven with garbage data
+ // in the LED driver's PWM registers, shutdown is enabled last.
+ // Set up the mode and other settings, clear the PWM registers,
+ // then disable software shutdown.
+ // Unlock the command register.
+
+ // Unlock the command register.
+ is31fl3741_write_register(addr, IS31FL3741_COMMANDREGISTER_WRITELOCK, 0xC5);
+
+ // Select PG4
+ is31fl3741_write_register(addr, IS31FL3741_COMMANDREGISTER, IS31FL3741_PAGE_FUNCTION);
+
+ // Set to Normal operation
+ is31fl3741_write_register(addr, IS31FL3741_REG_CONFIGURATION, IS31FL3741_CONFIGURATION);
+
+ // Set Golbal Current Control Register
+ is31fl3741_write_register(addr, IS31FL3741_REG_GLOBALCURRENT, IS31FL3741_GLOBALCURRENT);
+ // Set Pull up & Down for SWx CSy
+ is31fl3741_write_register(addr, IS31FL3741_REG_PULLDOWNUP, ((IS31FL3741_CSPULLUP << 4) | IS31FL3741_SWPULLUP));
+ // Set PWM frequency
+ is31fl3741_write_register(addr, IS31FL3741_REG_PWM_FREQUENCY, (IS31FL3741_PWM_FREQUENCY & 0b1111));
+
+ // is31fl3741_update_led_scaling_registers(addr, 0xFF, 0xFF, 0xFF);
+
+ // Wait 10ms to ensure the device has woken up.
+ wait_ms(10);
+}
+
+void is31fl3741_set_value(int index, uint8_t value) {
+ is31fl3741_led_t led;
+ if (index >= 0 && index < LED_MATRIX_LED_COUNT) {
+ memcpy_P(&led, (&g_is31fl3741_leds[index]), sizeof(led));
+
+ if (g_pwm_buffer[led.driver][led.v] == value) {
+ return;
+ }
+ g_pwm_buffer_update_required[led.driver] = true;
+ g_pwm_buffer[led.driver][led.v] = value;
+ }
+}
+
+void is31fl3741_set_value_all(uint8_t value) {
+ for (int i = 0; i < LED_MATRIX_LED_COUNT; i++) {
+ is31fl3741_set_value(i, value);
+ }
+}
+
+void is31fl3741_set_led_control_register(uint8_t index, bool value) {
+ is31fl3741_led_t led;
+ memcpy_P(&led, (&g_is31fl3741_leds[index]), sizeof(led));
+
+ if (value) {
+ g_scaling_registers[led.driver][led.v] = 0xFF;
+ } else {
+ g_scaling_registers[led.driver][led.v] = 0x00;
+ }
+
+ g_scaling_registers_update_required[led.driver] = true;
+}
+
+void is31fl3741_update_pwm_buffers(uint8_t addr, uint8_t index) {
+ if (g_pwm_buffer_update_required[index]) {
+ // unlock the command register and select PG2
+ is31fl3741_write_register(addr, IS31FL3741_COMMANDREGISTER_WRITELOCK, 0xC5);
+ is31fl3741_write_register(addr, IS31FL3741_COMMANDREGISTER, IS31FL3741_PAGE_PWM0);
+
+ is31fl3741_write_pwm_buffer(addr, g_pwm_buffer[index]);
+ }
+
+ g_pwm_buffer_update_required[index] = false;
+}
+
+void is31fl3741_set_pwm_buffer(const is31fl3741_led_t *pled, uint8_t value) {
+ g_pwm_buffer[pled->driver][pled->v] = value;
+
+ g_pwm_buffer_update_required[pled->driver] = true;
+}
+
+void is31fl3741_update_led_control_registers(uint8_t addr, uint8_t index) {
+ if (g_scaling_registers_update_required[index]) {
+ // unlock the command register and select PG2
+ is31fl3741_write_register(addr, IS31FL3741_COMMANDREGISTER_WRITELOCK, 0xC5);
+ is31fl3741_write_register(addr, IS31FL3741_COMMANDREGISTER, IS31FL3741_PAGE_SCALING_0);
+
+ // CS1_SW1 to CS30_SW6 are on PG2
+ for (int i = CS1_SW1; i <= CS30_SW6; ++i) {
+ is31fl3741_write_register(addr, i, g_scaling_registers[index][i]);
+ }
+
+ // unlock the command register and select PG3
+ is31fl3741_write_register(addr, IS31FL3741_COMMANDREGISTER_WRITELOCK, 0xC5);
+ is31fl3741_write_register(addr, IS31FL3741_COMMANDREGISTER, IS31FL3741_PAGE_SCALING_1);
+
+ // CS1_SW7 to CS39_SW9 are on PG3
+ for (int i = CS1_SW7; i <= CS39_SW9; ++i) {
+ is31fl3741_write_register(addr, i - CS1_SW7, g_scaling_registers[index][i]);
+ }
+
+ g_scaling_registers_update_required[index] = false;
+ }
+}
+
+void is31fl3741_set_scaling_registers(const is31fl3741_led_t *pled, uint8_t value) {
+ g_scaling_registers[pled->driver][pled->v] = value;
+
+ g_scaling_registers_update_required[pled->driver] = true;
+}
diff --git a/drivers/led/issi/is31fl3741-simple.h b/drivers/led/issi/is31fl3741-simple.h
new file mode 100644
index 0000000000..46c058c644
--- /dev/null
+++ b/drivers/led/issi/is31fl3741-simple.h
@@ -0,0 +1,471 @@
+/* Copyright 2017 Jason Williams
+ * Copyright 2018 Jack Humbert
+ * Copyright 2018 Yiancar
+ * Copyright 2020 MelGeek
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#pragma once
+
+#include <stdint.h>
+#include <stdbool.h>
+#include "progmem.h"
+
+// ======== DEPRECATED DEFINES - DO NOT USE ========
+#ifdef DRIVER_COUNT
+# define IS31FL3741_DRIVER_COUNT DRIVER_COUNT
+#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_SWPULLUP ISSI_SWPULLUP
+#endif
+#ifdef ISSI_CSPULLUP
+# define IS31FL3741_CSPULLUP ISSI_CSPULLUP
+#endif
+#ifdef ISSI_GLOBALCURRENT
+# define IS31FL3741_GLOBALCURRENT ISSI_GLOBALCURRENT
+#endif
+
+#define PUR_0R IS31FL3741_PUR_0R
+#define PUR_05KR IS31FL3741_PUR_05KR
+#define PUR_1KR IS31FL3741_PUR_1KR
+#define PUR_2KR IS31FL3741_PUR_2KR
+#define PUR_4KR IS31FL3741_PUR_4KR
+#define PUR_8KR IS31FL3741_PUR_8KR
+#define PUR_16KR IS31FL3741_PUR_16KR
+#define PUR_32KR IS31FL3741_PUR_32KR
+// ========
+
+#define IS31FL3741_I2C_ADDRESS_GND 0x30
+#define IS31FL3741_I2C_ADDRESS_SCL 0x31
+#define IS31FL3741_I2C_ADDRESS_SDA 0x32
+#define IS31FL3741_I2C_ADDRESS_VCC 0x33
+
+typedef struct is31fl3741_led_t {
+ uint32_t driver : 2;
+ uint32_t v : 10;
+} __attribute__((packed)) is31fl3741_led_t;
+
+extern const is31fl3741_led_t PROGMEM g_is31fl3741_leds[RGB_MATRIX_LED_COUNT];
+
+void is31fl3741_init(uint8_t addr);
+void is31fl3741_write_register(uint8_t addr, uint8_t reg, uint8_t data);
+bool is31fl3741_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer);
+
+void is31fl3741_set_value(int index, uint8_t value);
+void is31fl3741_set_value_all(uint8_t value);
+
+void is31fl3741_set_led_control_register(uint8_t index, bool value);
+
+// This should not be called from an interrupt
+// (eg. from a timer interrupt).
+// Call this while idle (in between matrix scans).
+// If the buffer is dirty, it will update the driver with the buffer.
+void is31fl3741_update_pwm_buffers(uint8_t addr, uint8_t index);
+void is31fl3741_update_led_control_registers(uint8_t addr, uint8_t index);
+void is31fl3741_set_scaling_registers(const is31fl3741_led_t *pled, uint8_t value);
+
+void is31fl3741_set_pwm_buffer(const is31fl3741_led *pled, uint8_t value);
+
+#define IS31FL3741_PUR_0R 0x00 // No PUR resistor
+#define IS31FL3741_PUR_05KR 0x01 // 0.5k Ohm resistor
+#define IS31FL3741_PUR_1KR 0x02 // 1.0k Ohm resistor
+#define IS31FL3741_PUR_2KR 0x03 // 2.0k Ohm resistor
+#define IS31FL3741_PUR_4KR 0x04 // 4.0k Ohm resistor
+#define IS31FL3741_PUR_8KR 0x05 // 8.0k Ohm resistor
+#define IS31FL3741_PUR_16KR 0x06 // 16k Ohm resistor
+#define IS31FL3741_PUR_32KR 0x07 // 32k Ohm resistor
+
+#define IS31FL3741_PWM_FREQUENCY_29K_HZ 0b0000
+#define IS31FL3741_PWM_FREQUENCY_3K6_HZ 0b0011
+#define IS31FL3741_PWM_FREQUENCY_1K8_HZ 0b0111
+#define IS31FL3741_PWM_FREQUENCY_900_HZ 0b1011
+
+#define CS1_SW1 0x00
+#define CS2_SW1 0x01
+#define CS3_SW1 0x02
+#define CS4_SW1 0x03
+#define CS5_SW1 0x04
+#define CS6_SW1 0x05
+#define CS7_SW1 0x06
+#define CS8_SW1 0x07
+#define CS9_SW1 0x08
+#define CS10_SW1 0x09
+#define CS11_SW1 0x0A
+#define CS12_SW1 0x0B
+#define CS13_SW1 0x0C
+#define CS14_SW1 0x0D
+#define CS15_SW1 0x0E
+#define CS16_SW1 0x0F
+#define CS17_SW1 0x10
+#define CS18_SW1 0x11
+#define CS19_SW1 0x12
+#define CS20_SW1 0x13
+#define CS21_SW1 0x14
+#define CS22_SW1 0x15
+#define CS23_SW1 0x16
+#define CS24_SW1 0x17
+#define CS25_SW1 0x18
+#define CS26_SW1 0x19
+#define CS27_SW1 0x1A
+#define CS28_SW1 0x1B
+#define CS29_SW1 0x1C
+#define CS30_SW1 0x1D
+
+#define CS1_SW2 0x1E
+#define CS2_SW2 0x1F
+#define CS3_SW2 0x20
+#define CS4_SW2 0x21
+#define CS5_SW2 0x22
+#define CS6_SW2 0x23
+#define CS7_SW2 0x24
+#define CS8_SW2 0x25
+#define CS9_SW2 0x26
+#define CS10_SW2 0x27
+#define CS11_SW2 0x28
+#define CS12_SW2 0x29
+#define CS13_SW2 0x2A
+#define CS14_SW2 0x2B
+#define CS15_SW2 0x2C
+#define CS16_SW2 0x2D
+#define CS17_SW2 0x2E
+#define CS18_SW2 0x2F
+#define CS19_SW2 0x30
+#define CS20_SW2 0x31
+#define CS21_SW2 0x32
+#define CS22_SW2 0x33
+#define CS23_SW2 0x34
+#define CS24_SW2 0x35
+#define CS25_SW2 0x36
+#define CS26_SW2 0x37
+#define CS27_SW2 0x38
+#define CS28_SW2 0x39
+#define CS29_SW2 0x3A
+#define CS30_SW2 0x3B
+
+#define CS1_SW3 0x3C
+#define CS2_SW3 0x3D
+#define CS3_SW3 0x3E
+#define CS4_SW3 0x3F
+#define CS5_SW3 0x40
+#define CS6_SW3 0x41
+#define CS7_SW3 0x42
+#define CS8_SW3 0x43
+#define CS9_SW3 0x44
+#define CS10_SW3 0x45
+#define CS11_SW3 0x46
+#define CS12_SW3 0x47
+#define CS13_SW3 0x48
+#define CS14_SW3 0x49
+#define CS15_SW3 0x4A
+#define CS16_SW3 0x4B
+#define CS17_SW3 0x4C
+#define CS18_SW3 0x4D
+#define CS19_SW3 0x4E
+#define CS20_SW3 0x4F
+#define CS21_SW3 0x50
+#define CS22_SW3 0x51
+#define CS23_SW3 0x52
+#define CS24_SW3 0x53
+#define CS25_SW3 0x54
+#define CS26_SW3 0x55
+#define CS27_SW3 0x56
+#define CS28_SW3 0x57
+#define CS29_SW3 0x58
+#define CS30_SW3 0x59
+
+#define CS1_SW4 0x5A
+#define CS2_SW4 0x5B
+#define CS3_SW4 0x5C
+#define CS4_SW4 0x5D
+#define CS5_SW4 0x5E
+#define CS6_SW4 0x5F
+#define CS7_SW4 0x60
+#define CS8_SW4 0x61
+#define CS9_SW4 0x62
+#define CS10_SW4 0x63
+#define CS11_SW4 0x64
+#define CS12_SW4 0x65
+#define CS13_SW4 0x66
+#define CS14_SW4 0x67
+#define CS15_SW4 0x68
+#define CS16_SW4 0x69
+#define CS17_SW4 0x6A
+#define CS18_SW4 0x6B
+#define CS19_SW4 0x6C
+#define CS20_SW4 0x6D
+#define CS21_SW4 0x6E
+#define CS22_SW4 0x6F
+#define CS23_SW4 0x70
+#define CS24_SW4 0x71
+#define CS25_SW4 0x72
+#define CS26_SW4 0x73
+#define CS27_SW4 0x74
+#define CS28_SW4 0x75
+#define CS29_SW4 0x76
+#define CS30_SW4 0x77
+
+#define CS1_SW5 0x78
+#define CS2_SW5 0x79
+#define CS3_SW5 0x7A
+#define CS4_SW5 0x7B
+#define CS5_SW5 0x7C
+#define CS6_SW5 0x7D
+#define CS7_SW5 0x7E
+#define CS8_SW5 0x7F
+#define CS9_SW5 0x80
+#define CS10_SW5 0x81
+#define CS11_SW5 0x82
+#define CS12_SW5 0x83
+#define CS13_SW5 0x84
+#define CS14_SW5 0x85
+#define CS15_SW5 0x86
+#define CS16_SW5 0x87
+#define CS17_SW5 0x88
+#define CS18_SW5 0x89
+#define CS19_SW5 0x8A
+#define CS20_SW5 0x8B
+#define CS21_SW5 0x8C
+#define CS22_SW5 0x8D
+#define CS23_SW5 0x8E
+#define CS24_SW5 0x8F
+#define CS25_SW5 0x90
+#define CS26_SW5 0x91
+#define CS27_SW5 0x92
+#define CS28_SW5 0x93
+#define CS29_SW5 0x94
+#define CS30_SW5 0x95
+
+#define CS1_SW6 0x96
+#define CS2_SW6 0x97
+#define CS3_SW6 0x98
+#define CS4_SW6 0x99
+#define CS5_SW6 0x9A
+#define CS6_SW6 0x9B
+#define CS7_SW6 0x9C
+#define CS8_SW6 0x9D
+#define CS9_SW6 0x9E
+#define CS10_SW6 0x9F
+#define CS11_SW6 0xA0
+#define CS12_SW6 0xA1
+#define CS13_SW6 0xA2
+#define CS14_SW6 0xA3
+#define CS15_SW6 0xA4
+#define CS16_SW6 0xA5
+#define CS17_SW6 0xA6
+#define CS18_SW6 0xA7
+#define CS19_SW6 0xA8
+#define CS20_SW6 0xA9
+#define CS21_SW6 0xAA
+#define CS22_SW6 0xAB
+#define CS23_SW6 0xAC
+#define CS24_SW6 0xAD
+#define CS25_SW6 0xAE
+#define CS26_SW6 0xAF
+#define CS27_SW6 0xB0
+#define CS28_SW6 0xB1
+#define CS29_SW6 0xB2
+#define CS30_SW6 0xB3
+
+#define CS1_SW7 0xB4
+#define CS2_SW7 0xB5
+#define CS3_SW7 0xB6
+#define CS4_SW7 0xB7
+#define CS5_SW7 0xB8
+#define CS6_SW7 0xB9
+#define CS7_SW7 0xBA
+#define CS8_SW7 0xBB
+#define CS9_SW7 0xBC
+#define CS10_SW7 0xBD
+#define CS11_SW7 0xBE
+#define CS12_SW7 0xBF
+#define CS13_SW7 0xC0
+#define CS14_SW7 0xC1
+#define CS15_SW7 0xC2
+#define CS16_SW7 0xC3
+#define CS17_SW7 0xC4
+#define CS18_SW7 0xC5
+#define CS19_SW7 0xC6
+#define CS20_SW7 0xC7
+#define CS21_SW7 0xC8
+#define CS22_SW7 0xC9
+#define CS23_SW7 0xCA
+#define CS24_SW7 0xCB
+#define CS25_SW7 0xCC
+#define CS26_SW7 0xCD
+#define CS27_SW7 0xCE
+#define CS28_SW7 0xCF
+#define CS29_SW7 0xD0
+#define CS30_SW7 0xD1
+
+#define CS1_SW8 0xD2
+#define CS2_SW8 0xD3
+#define CS3_SW8 0xD4
+#define CS4_SW8 0xD5
+#define CS5_SW8 0xD6
+#define CS6_SW8 0xD7
+#define CS7_SW8 0xD8
+#define CS8_SW8 0xD9
+#define CS9_SW8 0xDA
+#define CS10_SW8 0xDB
+#define CS11_SW8 0xDC
+#define CS12_SW8 0xDD
+#define CS13_SW8 0xDE
+#define CS14_SW8 0xDF
+#define CS15_SW8 0xE0
+#define CS16_SW8 0xE1
+#define CS17_SW8 0xE2
+#define CS18_SW8 0xE3
+#define CS19_SW8 0xE4
+#define CS20_SW8 0xE5
+#define CS21_SW8 0xE6
+#define CS22_SW8 0xE7
+#define CS23_SW8 0xE8
+#define CS24_SW8 0xE9
+#define CS25_SW8 0xEA
+#define CS26_SW8 0xEB
+#define CS27_SW8 0xEC
+#define CS28_SW8 0xED
+#define CS29_SW8 0xEE
+#define CS30_SW8 0xEF
+
+#define CS1_SW9 0xF0
+#define CS2_SW9 0xF1
+#define CS3_SW9 0xF2
+#define CS4_SW9 0xF3
+#define CS5_SW9 0xF4
+#define CS6_SW9 0xF5
+#define CS7_SW9 0xF6
+#define CS8_SW9 0xF7
+#define CS9_SW9 0xF8
+#define CS10_SW9 0xF9
+#define CS11_SW9 0xFA
+#define CS12_SW9 0xFB
+#define CS13_SW9 0xFC
+#define CS14_SW9 0xFD
+#define CS15_SW9 0xFE
+#define CS16_SW9 0xFF
+#define CS17_SW9 0x100
+#define CS18_SW9 0x101
+#define CS19_SW9 0x102
+#define CS20_SW9 0x103
+#define CS21_SW9 0x104
+#define CS22_SW9 0x105
+#define CS23_SW9 0x106
+#define CS24_SW9 0x107
+#define CS25_SW9 0x108
+#define CS26_SW9 0x109
+#define CS27_SW9 0x10A
+#define CS28_SW9 0x10B
+#define CS29_SW9 0x10C
+#define CS30_SW9 0x10D
+
+#define CS31_SW1 0x10E
+#define CS32_SW1 0x10F
+#define CS33_SW1 0x110
+#define CS34_SW1 0x111
+#define CS35_SW1 0x112
+#define CS36_SW1 0x113
+#define CS37_SW1 0x114
+#define CS38_SW1 0x115
+#define CS39_SW1 0x116
+
+#define CS31_SW2 0x117
+#define CS32_SW2 0x118
+#define CS33_SW2 0x119
+#define CS34_SW2 0x11A
+#define CS35_SW2 0x11B
+#define CS36_SW2 0x11C
+#define CS37_SW2 0x11D
+#define CS38_SW2 0x11E
+#define CS39_SW2 0x11F
+
+#define CS31_SW3 0x120
+#define CS32_SW3 0x121
+#define CS33_SW3 0x122
+#define CS34_SW3 0x123
+#define CS35_SW3 0x124
+#define CS36_SW3 0x125
+#define CS37_SW3 0x126
+#define CS38_SW3 0x127
+#define CS39_SW3 0x128
+
+#define CS31_SW4 0x129
+#define CS32_SW4 0x12A
+#define CS33_SW4 0x12B
+#define CS34_SW4 0x12C
+#define CS35_SW4 0x12D
+#define CS36_SW4 0x12E
+#define CS37_SW4 0x12F
+#define CS38_SW4 0x130
+#define CS39_SW4 0x131
+
+#define CS31_SW5 0x132
+#define CS32_SW5 0x133
+#define CS33_SW5 0x134
+#define CS34_SW5 0x135
+#define CS35_SW5 0x136
+#define CS36_SW5 0x137
+#define CS37_SW5 0x138
+#define CS38_SW5 0x139
+#define CS39_SW5 0x13A
+
+#define CS31_SW6 0x13B
+#define CS32_SW6 0x13C
+#define CS33_SW6 0x13D
+#define CS34_SW6 0x13E
+#define CS35_SW6 0x13F
+#define CS36_SW6 0x140
+#define CS37_SW6 0x141
+#define CS38_SW6 0x142
+#define CS39_SW6 0x143
+
+#define CS31_SW7 0x144
+#define CS32_SW7 0x145
+#define CS33_SW7 0x146
+#define CS34_SW7 0x147
+#define CS35_SW7 0x148
+#define CS36_SW7 0x149
+#define CS37_SW7 0x14A
+#define CS38_SW7 0x14B
+#define CS39_SW7 0x14C
+
+#define CS31_SW8 0x14D
+#define CS32_SW8 0x14E
+#define CS33_SW8 0x14F
+#define CS34_SW8 0x150
+#define CS35_SW8 0x151
+#define CS36_SW8 0x152
+#define CS37_SW8 0x153
+#define CS38_SW8 0x154
+#define CS39_SW8 0x155
+
+#define CS31_SW9 0x156
+#define CS32_SW9 0x157
+#define CS33_SW9 0x158
+#define CS34_SW9 0x159
+#define CS35_SW9 0x15A
+#define CS36_SW9 0x15B
+#define CS37_SW9 0x15C
+#define CS38_SW9 0x15D
+#define CS39_SW9 0x15E
diff --git a/drivers/led/issi/is31fl3741.c b/drivers/led/issi/is31fl3741.c
index 70671c2a40..47c15a11ca 100644
--- a/drivers/led/issi/is31fl3741.c
+++ b/drivers/led/issi/is31fl3741.c
@@ -17,63 +17,58 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "wait.h"
-
#include "is31fl3741.h"
#include <string.h>
#include "i2c_master.h"
-#include "progmem.h"
-
-// This is a 7-bit address, that gets left-shifted and bit 0
-// set to 0 for write, 1 for read (as per I2C protocol)
-// The address will vary depending on your wiring:
-// 00 <-> GND
-// 01 <-> SCL
-// 10 <-> SDA
-// 11 <-> VCC
-// ADDR1 represents A1:A0 of the 7-bit address.
-// ADDR2 represents A3:A2 of the 7-bit address.
-// The result is: 0b101(ADDR2)(ADDR1)
-#define ISSI_ADDR_DEFAULT 0x60
-
-#define ISSI_COMMANDREGISTER 0xFD
-#define ISSI_COMMANDREGISTER_WRITELOCK 0xFE
-#define ISSI_INTERRUPTMASKREGISTER 0xF0
-#define ISSI_INTERRUPTSTATUSREGISTER 0xF1
-#define ISSI_IDREGISTER 0xFC
-
-#define ISSI_PAGE_PWM0 0x00 // PG0
-#define ISSI_PAGE_PWM1 0x01 // PG1
-#define ISSI_PAGE_SCALING_0 0x02 // PG2
-#define ISSI_PAGE_SCALING_1 0x03 // PG3
-#define ISSI_PAGE_FUNCTION 0x04 // PG4
-
-#define ISSI_REG_CONFIGURATION 0x00 // PG4
-#define ISSI_REG_GLOBALCURRENT 0x01 // PG4
-#define ISSI_REG_PULLDOWNUP 0x02 // PG4
-#define ISSI_REG_RESET 0x3F // PG4
-
-#ifndef ISSI_TIMEOUT
-# define ISSI_TIMEOUT 100
+#include "wait.h"
+
+#define IS31FL3741_COMMANDREGISTER 0xFD
+#define IS31FL3741_COMMANDREGISTER_WRITELOCK 0xFE
+#define IS31FL3741_INTERRUPTMASKREGISTER 0xF0
+#define IS31FL3741_INTERRUPTSTATUSREGISTER 0xF1
+#define IS31FL3741_IDREGISTER 0xFC
+
+#define IS31FL3741_PAGE_PWM0 0x00 // PG0
+#define IS31FL3741_PAGE_PWM1 0x01 // PG1
+#define IS31FL3741_PAGE_SCALING_0 0x02 // PG2
+#define IS31FL3741_PAGE_SCALING_1 0x03 // PG3
+#define IS31FL3741_PAGE_FUNCTION 0x04 // PG4
+
+#define IS31FL3741_REG_CONFIGURATION 0x00 // PG4
+#define IS31FL3741_REG_GLOBALCURRENT 0x01 // PG4
+#define IS31FL3741_REG_PULLDOWNUP 0x02 // PG4
+#define IS31FL3741_REG_PWM_FREQUENCY 0x36 // PG4
+#define IS31FL3741_REG_RESET 0x3F // PG4
+
+#ifndef IS31FL3741_I2C_TIMEOUT
+# define IS31FL3741_I2C_TIMEOUT 100
+#endif
+
+#ifndef IS31FL3741_I2C_PERSISTENCE
+# define IS31FL3741_I2C_PERSISTENCE 0
+#endif
+
+#ifndef IS31FL3741_CONFIGURATION
+# define IS31FL3741_CONFIGURATION 0x01
#endif
-#ifndef ISSI_PERSISTENCE
-# define ISSI_PERSISTENCE 0
+#ifndef IS31FL3741_PWM_FREQUENCY
+# define IS31FL3741_PWM_FREQUENCY IS31FL3741_PWM_FREQUENCY_29K_HZ
#endif
-#ifndef ISSI_SWPULLUP
-# define ISSI_SWPULLUP PUR_32KR
+#ifndef IS31FL3741_SWPULLUP
+# define IS31FL3741_SWPULLUP IS31FL3741_PUR_32KR
#endif
-#ifndef ISSI_CSPULLUP
-# define ISSI_CSPULLUP PUR_32KR
+#ifndef IS31FL3741_CSPULLUP
+# define IS31FL3741_CSPULLUP IS31FL3741_PUR_32KR
#endif
-#ifndef ISSI_GLOBALCURRENT
-# define ISSI_GLOBALCURRENT 0xFF
+#ifndef IS31FL3741_GLOBALCURRENT
+# define IS31FL3741_GLOBALCURRENT 0xFF
#endif
-#define ISSI_MAX_LEDS 351
+#define IS31FL3741_MAX_LEDS 351
// Transfer buffer for TWITransmitData()
uint8_t g_twi_transfer_buffer[20] = {0xFF};
@@ -84,22 +79,22 @@ uint8_t g_twi_transfer_buffer[20] = {0xFF};
// We could optimize this and take out the unused registers from these
// buffers and the transfers in is31fl3741_write_pwm_buffer() but it's
// probably not worth the extra complexity.
-uint8_t g_pwm_buffer[DRIVER_COUNT][ISSI_MAX_LEDS];
-bool g_pwm_buffer_update_required[DRIVER_COUNT] = {false};
-bool g_scaling_registers_update_required[DRIVER_COUNT] = {false};
+uint8_t g_pwm_buffer[IS31FL3741_DRIVER_COUNT][IS31FL3741_MAX_LEDS];
+bool g_pwm_buffer_update_required[IS31FL3741_DRIVER_COUNT] = {false};
+bool g_scaling_registers_update_required[IS31FL3741_DRIVER_COUNT] = {false};
-uint8_t g_scaling_registers[DRIVER_COUNT][ISSI_MAX_LEDS];
+uint8_t g_scaling_registers[IS31FL3741_DRIVER_COUNT][IS31FL3741_MAX_LEDS];
void is31fl3741_write_register(uint8_t addr, uint8_t reg, uint8_t data) {
g_twi_transfer_buffer[0] = reg;
g_twi_transfer_buffer[1] = data;
-#if ISSI_PERSISTENCE > 0
- for (uint8_t i = 0; i < ISSI_PERSISTENCE; i++) {
- if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, ISSI_TIMEOUT) == 0) break;
+#if IS31FL3741_I2C_PERSISTENCE > 0
+ for (uint8_t i = 0; i < IS31FL3741_I2C_PERSISTENCE; i++) {
+ if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, IS31FL3741_I2C_TIMEOUT) == 0) break;
}
#else
- i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, ISSI_TIMEOUT);
+ i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, IS31FL3741_I2C_TIMEOUT);
#endif
}
@@ -109,21 +104,21 @@ bool is31fl3741_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer) {
for (int i = 0; i < 342; i += 18) {
if (i == 180) {
// unlock the command register and select PG1
- is31fl3741_write_register(addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5);
- is31fl3741_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_PWM1);
+ is31fl3741_write_register(addr, IS31FL3741_COMMANDREGISTER_WRITELOCK, 0xC5);
+ is31fl3741_write_register(addr, IS31FL3741_COMMANDREGISTER, IS31FL3741_PAGE_PWM1);
}
g_twi_transfer_buffer[0] = i % 180;
memcpy(g_twi_transfer_buffer + 1, pwm_buffer + i, 18);
-#if ISSI_PERSISTENCE > 0
- for (uint8_t i = 0; i < ISSI_PERSISTENCE; i++) {
- if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 19, ISSI_TIMEOUT) != 0) {
+#if IS31FL3741_I2C_PERSISTENCE > 0
+ for (uint8_t i = 0; i < IS31FL3741_I2C_PERSISTENCE; i++) {
+ if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 19, IS31FL3741_I2C_TIMEOUT) != 0) {
return false;
}
}
#else
- if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 19, ISSI_TIMEOUT) != 0) {
+ if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 19, IS31FL3741_I2C_TIMEOUT) != 0) {
return false;
}
#endif
@@ -133,14 +128,14 @@ bool is31fl3741_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer) {
g_twi_transfer_buffer[0] = 162;
memcpy(g_twi_transfer_buffer + 1, pwm_buffer + 342, 9);
-#if ISSI_PERSISTENCE > 0
- for (uint8_t i = 0; i < ISSI_PERSISTENCE; i++) {
- if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 10, ISSI_TIMEOUT) != 0) {
+#if IS31FL3741_I2C_PERSISTENCE > 0
+ for (uint8_t i = 0; i < IS31FL3741_I2C_PERSISTENCE; i++) {
+ if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 10, IS31FL3741_I2C_TIMEOUT) != 0) {
return false;
}
}
#else
- if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 10, ISSI_TIMEOUT) != 0) {
+ if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 10, IS31FL3741_I2C_TIMEOUT) != 0) {
return false;
}
#endif
@@ -156,18 +151,20 @@ void is31fl3741_init(uint8_t addr) {
// Unlock the command register.
// Unlock the command register.
- is31fl3741_write_register(addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5);
+ is31fl3741_write_register(addr, IS31FL3741_COMMANDREGISTER_WRITELOCK, 0xC5);
// Select PG4
- is31fl3741_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_FUNCTION);
+ is31fl3741_write_register(addr, IS31FL3741_COMMANDREGISTER, IS31FL3741_PAGE_FUNCTION);
// Set to Normal operation
- is31fl3741_write_register(addr, ISSI_REG_CONFIGURATION, 0x01);
+ is31fl3741_write_register(addr, IS31FL3741_REG_CONFIGURATION, IS31FL3741_CONFIGURATION);
// Set Golbal Current Control Register
- is31fl3741_write_register(addr, ISSI_REG_GLOBALCURRENT, ISSI_GLOBALCURRENT);
+ is31fl3741_write_register(addr, IS31FL3741_REG_GLOBALCURRENT, IS31FL3741_GLOBALCURRENT);
// Set Pull up & Down for SWx CSy
- is31fl3741_write_register(addr, ISSI_REG_PULLDOWNUP, ((ISSI_CSPULLUP << 4) | ISSI_SWPULLUP));
+ is31fl3741_write_register(addr, IS31FL3741_REG_PULLDOWNUP, ((IS31FL3741_CSPULLUP << 4) | IS31FL3741_SWPULLUP));
+ // Set PWM frequency
+ is31fl3741_write_register(addr, IS31FL3741_REG_PWM_FREQUENCY, (IS31FL3741_PWM_FREQUENCY & 0b1111));
// is31fl3741_update_led_scaling_registers(addr, 0xFF, 0xFF, 0xFF);
@@ -176,9 +173,9 @@ void is31fl3741_init(uint8_t addr) {
}
void is31fl3741_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) {
- is31_led led;
+ is31fl3741_led_t led;
if (index >= 0 && index < RGB_MATRIX_LED_COUNT) {
- memcpy_P(&led, (&g_is31_leds[index]), sizeof(led));
+ memcpy_P(&led, (&g_is31fl3741_leds[index]), sizeof(led));
if (g_pwm_buffer[led.driver][led.r] == red && g_pwm_buffer[led.driver][led.g] == green && g_pwm_buffer[led.driver][led.b] == blue) {
return;
@@ -197,8 +194,8 @@ void is31fl3741_set_color_all(uint8_t red, uint8_t green, uint8_t blue) {
}
void is31fl3741_set_led_control_register(uint8_t index, bool red, bool green, bool blue) {
- is31_led led;
- memcpy_P(&led, (&g_is31_leds[index]), sizeof(led));
+ is31fl3741_led_t led;
+ memcpy_P(&led, (&g_is31fl3741_leds[index]), sizeof(led));
if (red) {
g_scaling_registers[led.driver][led.r] = 0xFF;
@@ -224,8 +221,8 @@ void is31fl3741_set_led_control_register(uint8_t index, bool red, bool green, bo
void is31fl3741_update_pwm_buffers(uint8_t addr, uint8_t index) {
if (g_pwm_buffer_update_required[index]) {
// unlock the command register and select PG2
- is31fl3741_write_register(addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5);
- is31fl3741_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_PWM0);
+ is31fl3741_write_register(addr, IS31FL3741_COMMANDREGISTER_WRITELOCK, 0xC5);
+ is31fl3741_write_register(addr, IS31FL3741_COMMANDREGISTER, IS31FL3741_PAGE_PWM0);
is31fl3741_write_pwm_buffer(addr, g_pwm_buffer[index]);
}
@@ -233,7 +230,7 @@ void is31fl3741_update_pwm_buffers(uint8_t addr, uint8_t index) {
g_pwm_buffer_update_required[index] = false;
}
-void is31fl3741_set_pwm_buffer(const is31_led *pled, uint8_t red, uint8_t green, uint8_t blue) {
+void is31fl3741_set_pwm_buffer(const is31fl3741_led_t *pled, uint8_t red, uint8_t green, uint8_t blue) {
g_pwm_buffer[pled->driver][pled->r] = red;
g_pwm_buffer[pled->driver][pled->g] = green;
g_pwm_buffer[pled->driver][pled->b] = blue;
@@ -244,8 +241,8 @@ void is31fl3741_set_pwm_buffer(const is31_led *pled, uint8_t red, uint8_t green,
void is31fl3741_update_led_control_registers(uint8_t addr, uint8_t index) {
if (g_scaling_registers_update_required[index]) {
// unlock the command register and select PG2
- is31fl3741_write_register(addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5);
- is31fl3741_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_SCALING_0);
+ is31fl3741_write_register(addr, IS31FL3741_COMMANDREGISTER_WRITELOCK, 0xC5);
+ is31fl3741_write_register(addr, IS31FL3741_COMMANDREGISTER, IS31FL3741_PAGE_SCALING_0);
// CS1_SW1 to CS30_SW6 are on PG2
for (int i = CS1_SW1; i <= CS30_SW6; ++i) {
@@ -253,8 +250,8 @@ void is31fl3741_update_led_control_registers(uint8_t addr, uint8_t index) {
}
// unlock the command register and select PG3
- is31fl3741_write_register(addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5);
- is31fl3741_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_SCALING_1);
+ is31fl3741_write_register(addr, IS31FL3741_COMMANDREGISTER_WRITELOCK, 0xC5);
+ is31fl3741_write_register(addr, IS31FL3741_COMMANDREGISTER, IS31FL3741_PAGE_SCALING_1);
// CS1_SW7 to CS39_SW9 are on PG3
for (int i = CS1_SW7; i <= CS39_SW9; ++i) {
@@ -265,7 +262,7 @@ void is31fl3741_update_led_control_registers(uint8_t addr, uint8_t index) {
}
}
-void is31fl3741_set_scaling_registers(const is31_led *pled, uint8_t red, uint8_t green, uint8_t blue) {
+void is31fl3741_set_scaling_registers(const is31fl3741_led_t *pled, uint8_t red, uint8_t green, uint8_t blue) {
g_scaling_registers[pled->driver][pled->r] = red;
g_scaling_registers[pled->driver][pled->g] = green;
g_scaling_registers[pled->driver][pled->b] = blue;
diff --git a/drivers/led/issi/is31fl3741.h b/drivers/led/issi/is31fl3741.h
index 4ae84dc3c6..ff16624009 100644
--- a/drivers/led/issi/is31fl3741.h
+++ b/drivers/led/issi/is31fl3741.h
@@ -23,14 +23,55 @@
#include <stdbool.h>
#include "progmem.h"
-typedef struct is31_led {
+// ======== DEPRECATED DEFINES - DO NOT USE ========
+#ifdef DRIVER_COUNT
+# define IS31FL3741_DRIVER_COUNT DRIVER_COUNT
+#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_SWPULLUP ISSI_SWPULLUP
+#endif
+#ifdef ISSI_CSPULLUP
+# define IS31FL3741_CSPULLUP ISSI_CSPULLUP
+#endif
+#ifdef ISSI_GLOBALCURRENT
+# define IS31FL3741_GLOBALCURRENT ISSI_GLOBALCURRENT
+#endif
+
+#define is31_led is31fl3741_led_t
+#define g_is31_leds g_is31fl3741_leds
+
+#define PUR_0R IS31FL3741_PUR_0R
+#define PUR_05KR IS31FL3741_PUR_05KR
+#define PUR_1KR IS31FL3741_PUR_1KR
+#define PUR_2KR IS31FL3741_PUR_2KR
+#define PUR_4KR IS31FL3741_PUR_4KR
+#define PUR_8KR IS31FL3741_PUR_8KR
+#define PUR_16KR IS31FL3741_PUR_16KR
+#define PUR_32KR IS31FL3741_PUR_32KR
+// ========
+
+#define IS31FL3741_I2C_ADDRESS_GND 0x30
+#define IS31FL3741_I2C_ADDRESS_SCL 0x31
+#define IS31FL3741_I2C_ADDRESS_SDA 0x32
+#define IS31FL3741_I2C_ADDRESS_VCC 0x33
+
+typedef struct is31fl3741_led_t {
uint32_t driver : 2;
uint32_t r : 10;
uint32_t g : 10;
uint32_t b : 10;
-} __attribute__((packed)) is31_led;
+} __attribute__((packed)) is31fl3741_led_t;
-extern const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT];
+extern const is31fl3741_led_t PROGMEM g_is31fl3741_leds[RGB_MATRIX_LED_COUNT];
void is31fl3741_init(uint8_t addr);
void is31fl3741_write_register(uint8_t addr, uint8_t reg, uint8_t data);
@@ -47,18 +88,23 @@ void is31fl3741_set_led_control_register(uint8_t index, bool red, bool green, bo
// If the buffer is dirty, it will update the driver with the buffer.
void is31fl3741_update_pwm_buffers(uint8_t addr, uint8_t index);
void is31fl3741_update_led_control_registers(uint8_t addr, uint8_t index);
-void is31fl3741_set_scaling_registers(const is31_led *pled, uint8_t red, uint8_t green, uint8_t blue);
-
-void is31fl3741_set_pwm_buffer(const is31_led *pled, uint8_t red, uint8_t green, uint8_t blue);
-
-#define PUR_0R 0x00 // No PUR resistor
-#define PUR_05KR 0x01 // 0.5k Ohm resistor
-#define PUR_1KR 0x02 // 1.0k Ohm resistor
-#define PUR_2KR 0x03 // 2.0k Ohm resistor
-#define PUR_4KR 0x04 // 4.0k Ohm resistor
-#define PUR_8KR 0x05 // 8.0k Ohm resistor
-#define PUR_16KR 0x06 // 16k Ohm resistor
-#define PUR_32KR 0x07 // 32k Ohm resistor
+void is31fl3741_set_scaling_registers(const is31fl3741_led_t *pled, uint8_t red, uint8_t green, uint8_t blue);
+
+void is31fl3741_set_pwm_buffer(const is31fl3741_led_t *pled, uint8_t red, uint8_t green, uint8_t blue);
+
+#define IS31FL3741_PUR_0R 0x00 // No PUR resistor
+#define IS31FL3741_PUR_05KR 0x01 // 0.5k Ohm resistor
+#define IS31FL3741_PUR_1KR 0x02 // 1.0k Ohm resistor
+#define IS31FL3741_PUR_2KR 0x03 // 2.0k Ohm resistor
+#define IS31FL3741_PUR_4KR 0x04 // 4.0k Ohm resistor
+#define IS31FL3741_PUR_8KR 0x05 // 8.0k Ohm resistor
+#define IS31FL3741_PUR_16KR 0x06 // 16k Ohm resistor
+#define IS31FL3741_PUR_32KR 0x07 // 32k Ohm resistor
+
+#define IS31FL3741_PWM_FREQUENCY_29K_HZ 0b0000
+#define IS31FL3741_PWM_FREQUENCY_3K6_HZ 0b0011
+#define IS31FL3741_PWM_FREQUENCY_1K8_HZ 0b0111
+#define IS31FL3741_PWM_FREQUENCY_900_HZ 0b1011
#define CS1_SW1 0x00
#define CS2_SW1 0x01
diff --git a/drivers/led/issi/is31flcommon.h b/drivers/led/issi/is31flcommon.h
index 4b3add558b..93533e14de 100644
--- a/drivers/led/issi/is31flcommon.h
+++ b/drivers/led/issi/is31flcommon.h
@@ -25,13 +25,13 @@
#include "progmem.h"
// Which variant header file to use
-#ifdef IS31FL3742A
+#if defined(LED_MATRIX_IS31FL3742A) || defined(RGB_MATRIX_IS31FL3742A)
# include "is31fl3742.h"
-#elif defined(IS31FL3743A)
+#elif defined(LED_MATRIX_IS31FL3743A) || defined(RGB_MATRIX_IS31FL3743A)
# include "is31fl3743.h"
-#elif defined(IS31FL3745)
+#elif defined(LED_MATRIX_IS31FL3745) || defined(RGB_MATRIX_IS31FL3745)
# include "is31fl3745.h"
-#elif defined(IS31FL3746A)
+#elif defined(LED_MATRIX_IS31FL3746A) || defined(RGB_MATRIX_IS31FL3746A)
# include "is31fl3746.h"
#endif
diff --git a/drivers/led/snled27351-simple.c b/drivers/led/snled27351-simple.c
new file mode 100644
index 0000000000..499769555c
--- /dev/null
+++ b/drivers/led/snled27351-simple.c
@@ -0,0 +1,220 @@
+/* Copyright 2021 @ Keychron (https://www.keychron.com)
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "snled27351-simple.h"
+#include "i2c_master.h"
+
+#ifndef SNLED27351_I2C_TIMEOUT
+# define SNLED27351_I2C_TIMEOUT 100
+#endif
+
+#ifndef SNLED27351_I2C_PERSISTENCE
+# define SNLED27351_I2C_PERSISTENCE 0
+#endif
+
+#ifndef SNLED27351_PHASE_CHANNEL
+# define SNLED27351_PHASE_CHANNEL SNLED27351_MSKPHASE_12CHANNEL
+#endif
+
+#ifndef SNLED27351_CURRENT_TUNE
+# define SNLED27351_CURRENT_TUNE \
+ { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }
+#endif
+
+// Transfer buffer for TWITransmitData()
+uint8_t g_twi_transfer_buffer[20];
+
+// These buffers match the SNLED27351 PWM registers.
+// The control buffers match the PG0 LED On/Off registers.
+// Storing them like this is optimal for I2C transfers to the registers.
+// We could optimize this and take out the unused registers from these
+// buffers and the transfers in snled27351_write_pwm_buffer() but it's
+// probably not worth the extra complexity.
+uint8_t g_pwm_buffer[SNLED27351_DRIVER_COUNT][192];
+bool g_pwm_buffer_update_required[SNLED27351_DRIVER_COUNT] = {false};
+
+uint8_t g_led_control_registers[SNLED27351_DRIVER_COUNT][24] = {0};
+bool g_led_control_registers_update_required[SNLED27351_DRIVER_COUNT] = {false};
+
+bool snled27351_write_register(uint8_t addr, uint8_t reg, uint8_t data) {
+ // If the transaction fails function returns false.
+ g_twi_transfer_buffer[0] = reg;
+ g_twi_transfer_buffer[1] = data;
+
+#if SNLED27351_I2C_PERSISTENCE > 0
+ for (uint8_t i = 0; i < SNLED27351_I2C_PERSISTENCE; i++) {
+ if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, SNLED27351_I2C_TIMEOUT) != 0) {
+ return false;
+ }
+ }
+#else
+ if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, SNLED27351_I2C_TIMEOUT) != 0) {
+ return false;
+ }
+#endif
+ return true;
+}
+
+bool snled27351_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer) {
+ // Assumes PG1 is already selected.
+ // If any of the transactions fails function returns false.
+ // Transmit PWM registers in 12 transfers of 16 bytes.
+ // g_twi_transfer_buffer[] is 20 bytes
+
+ // Iterate over the pwm_buffer contents at 16 byte intervals.
+ for (int i = 0; i < 192; i += 16) {
+ g_twi_transfer_buffer[0] = i;
+ // Copy the data from i to i+15.
+ // Device will auto-increment register for data after the first byte
+ // Thus this sets registers 0x00-0x0F, 0x10-0x1F, etc. in one transfer.
+ for (int j = 0; j < 16; j++) {
+ g_twi_transfer_buffer[1 + j] = pwm_buffer[i + j];
+ }
+
+#if SNLED27351_I2C_PERSISTENCE > 0
+ for (uint8_t i = 0; i < SNLED27351_I2C_PERSISTENCE; i++) {
+ if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, SNLED27351_I2C_TIMEOUT) != 0) {
+ return false;
+ }
+ }
+#else
+ if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, SNLED27351_I2C_TIMEOUT) != 0) {
+ return false;
+ }
+#endif
+ }
+ return true;
+}
+
+void snled27351_init(uint8_t addr) {
+ // Select to function page
+ snled27351_write_register(addr, SNLED27351_REG_CONFIGURE_CMD_PAGE, SNLED27351_FUNCTION_PAGE);
+ // Setting LED driver to shutdown mode
+ snled27351_write_register(addr, SNLED27351_REG_CONFIGURATION, SNLED27351_MSKSW_SHUT_DOWN_MODE);
+ // Setting internal channel pulldown/pullup
+ snled27351_write_register(addr, SNLED27351_REG_PDU, SNLED27351_MSKSET_CA_CB_CHANNEL);
+ // Select number of scan phase
+ snled27351_write_register(addr, SNLED27351_REG_SCAN_PHASE, SNLED27351_PHASE_CHANNEL);
+ // Setting PWM Delay Phase
+ snled27351_write_register(addr, SNLED27351_REG_SLEW_RATE_CONTROL_MODE1, SNLED27351_MSKPWM_DELAY_PHASE_ENABLE);
+ // Setting Driving/Sinking Channel Slew Rate
+ snled27351_write_register(addr, SNLED27351_REG_SLEW_RATE_CONTROL_MODE2, SNLED27351_MSKDRIVING_SINKING_CHANNEL_SLEWRATE_ENABLE);
+ // Setting Iref
+ snled27351_write_register(addr, SNLED27351_REG_SOFTWARE_SLEEP, SNLED27351_MSKSLEEP_DISABLE);
+ // Set LED CONTROL PAGE (Page 0)
+ snled27351_write_register(addr, SNLED27351_REG_CONFIGURE_CMD_PAGE, SNLED27351_LED_CONTROL_PAGE);
+ for (int i = 0; i < SNLED27351_LED_CONTROL_ON_OFF_LENGTH; i++) {
+ snled27351_write_register(addr, i, 0x00);
+ }
+
+ // Set PWM PAGE (Page 1)
+ snled27351_write_register(addr, SNLED27351_REG_CONFIGURE_CMD_PAGE, SNLED27351_LED_PWM_PAGE);
+ for (int i = 0; i < SNLED27351_LED_CURRENT_TUNE_LENGTH; i++) {
+ snled27351_write_register(addr, i, 0x00);
+ }
+
+ // Set CURRENT PAGE (Page 4)
+ uint8_t current_tune_reg_list[SNLED27351_LED_CURRENT_TUNE_LENGTH] = SNLED27351_CURRENT_TUNE;
+ snled27351_write_register(addr, SNLED27351_REG_CONFIGURE_CMD_PAGE, SNLED27351_CURRENT_TUNE_PAGE);
+ for (int i = 0; i < SNLED27351_LED_CURRENT_TUNE_LENGTH; i++) {
+ snled27351_write_register(addr, i, current_tune_reg_list[i]);
+ }
+
+ // Enable LEDs ON/OFF
+ snled27351_write_register(addr, SNLED27351_REG_CONFIGURE_CMD_PAGE, SNLED27351_LED_CONTROL_PAGE);
+ for (int i = 0; i < SNLED27351_LED_CONTROL_ON_OFF_LENGTH; i++) {
+ snled27351_write_register(addr, i, 0xFF);
+ }
+
+ // Select to function page
+ snled27351_write_register(addr, SNLED27351_REG_CONFIGURE_CMD_PAGE, SNLED27351_FUNCTION_PAGE);
+ // Setting LED driver to normal mode
+ snled27351_write_register(addr, SNLED27351_REG_CONFIGURATION, SNLED27351_MSKSW_NORMAL_MODE);
+}
+
+void snled27351_set_value(int index, uint8_t value) {
+ snled27351_led_t led;
+ if (index >= 0 && index < LED_MATRIX_LED_COUNT) {
+ memcpy_P(&led, (&g_snled27351_leds[index]), sizeof(led));
+
+ if (g_pwm_buffer[led.driver][led.v] == value) {
+ return;
+ }
+ g_pwm_buffer[led.driver][led.v] = value;
+ g_pwm_buffer_update_required[led.driver] = true;
+ }
+}
+
+void snled27351_set_value_all(uint8_t value) {
+ for (int i = 0; i < LED_MATRIX_LED_COUNT; i++) {
+ snled27351_set_value(i, value);
+ }
+}
+
+void snled27351_set_led_control_register(uint8_t index, bool value) {
+ snled27351_led_t led;
+ memcpy_P(&led, (&g_snled27351_leds[index]), sizeof(led));
+
+ uint8_t control_register = led.v / 8;
+ uint8_t bit_value = led.v % 8;
+
+ if (value) {
+ g_led_control_registers[led.driver][control_register] |= (1 << bit_value);
+ } else {
+ g_led_control_registers[led.driver][control_register] &= ~(1 << bit_value);
+ }
+
+ g_led_control_registers_update_required[led.driver] = true;
+}
+
+void snled27351_update_pwm_buffers(uint8_t addr, uint8_t index) {
+ if (g_pwm_buffer_update_required[index]) {
+ snled27351_write_register(addr, SNLED27351_REG_CONFIGURE_CMD_PAGE, SNLED27351_LED_PWM_PAGE);
+
+ // If any of the transactions fail we risk writing dirty PG0,
+ // refresh page 0 just in case.
+ if (!snled27351_write_pwm_buffer(addr, g_pwm_buffer[index])) {
+ g_led_control_registers_update_required[index] = true;
+ }
+ }
+ g_pwm_buffer_update_required[index] = false;
+}
+
+void snled27351_update_led_control_registers(uint8_t addr, uint8_t index) {
+ if (g_led_control_registers_update_required[index]) {
+ snled27351_write_register(addr, SNLED27351_REG_CONFIGURE_CMD_PAGE, SNLED27351_LED_CONTROL_PAGE);
+ for (int i = 0; i < 24; i++) {
+ snled27351_write_register(addr, i, g_led_control_registers[index][i]);
+ }
+ }
+ g_led_control_registers_update_required[index] = false;
+}
+
+void snled27351_sw_return_normal(uint8_t addr) {
+ // Select to function page
+ snled27351_write_register(addr, SNLED27351_REG_CONFIGURE_CMD_PAGE, SNLED27351_FUNCTION_PAGE);
+ // Setting LED driver to normal mode
+ snled27351_write_register(addr, SNLED27351_REG_CONFIGURATION, SNLED27351_MSKSW_NORMAL_MODE);
+}
+
+void snled27351_sw_shutdown(uint8_t addr) {
+ // Select to function page
+ snled27351_write_register(addr, SNLED27351_REG_CONFIGURE_CMD_PAGE, SNLED27351_FUNCTION_PAGE);
+ // Setting LED driver to shutdown mode
+ snled27351_write_register(addr, SNLED27351_REG_CONFIGURATION, SNLED27351_MSKSW_SHUT_DOWN_MODE);
+ // Write SW Sleep Register
+ snled27351_write_register(addr, SNLED27351_REG_SOFTWARE_SLEEP, SNLED27351_MSKSLEEP_ENABLE);
+}
diff --git a/drivers/led/snled27351-simple.h b/drivers/led/snled27351-simple.h
new file mode 100644
index 0000000000..ff71b44b91
--- /dev/null
+++ b/drivers/led/snled27351-simple.h
@@ -0,0 +1,376 @@
+/* Copyright 2021 @ Keychron (https://www.keychron.com)
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#pragma once
+
+#include <stdint.h>
+#include <stdbool.h>
+#include "progmem.h"
+
+// ======== DEPRECATED DEFINES - DO NOT USE ========
+#ifdef DRIVER_COUNT
+# define SNLED27351_DRIVER_COUNT DRIVER_COUNT
+#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_MSKPHASE_12CHANNEL
+#define MSKPHASE_11CHANNEL SNLED27351_MSKPHASE_11CHANNEL
+#define MSKPHASE_10CHANNEL SNLED27351_MSKPHASE_10CHANNEL
+#define MSKPHASE_9CHANNEL SNLED27351_MSKPHASE_9CHANNEL
+#define MSKPHASE_8CHANNEL SNLED27351_MSKPHASE_8CHANNEL
+#define MSKPHASE_7CHANNEL SNLED27351_MSKPHASE_7CHANNEL
+#define MSKPHASE_6CHANNEL SNLED27351_MSKPHASE_6CHANNEL
+#define MSKPHASE_5CHANNEL SNLED27351_MSKPHASE_5CHANNEL
+#define MSKPHASE_4CHANNEL SNLED27351_MSKPHASE_4CHANNEL
+#define MSKPHASE_3CHANNEL SNLED27351_MSKPHASE_3CHANNEL
+#define MSKPHASE_2CHANNEL SNLED27351_MSKPHASE_2CHANNEL
+#define MSKPHASE_1CHANNEL SNLED27351_MSKPHASE_1CHANNEL
+
+#define ckled2001_led snled27351_led_t
+#define g_ckled2001_leds g_snled27351_leds
+// ========
+
+#define SNLED27351_I2C_ADDRESS_GND 0x74
+#define SNLED27351_I2C_ADDRESS_SCL 0x75
+#define SNLED27351_I2C_ADDRESS_SDA 0x76
+#define SNLED27351_I2C_ADDRESS_VDDIO 0x77
+
+typedef struct snled27351_led_t {
+ uint8_t driver : 2;
+ uint8_t v;
+} __attribute__((packed)) snled27351_led_t;
+
+extern const snled27351_led_t PROGMEM g_snled27351_leds[LED_MATRIX_LED_COUNT];
+
+void snled27351_init(uint8_t addr);
+bool snled27351_write_register(uint8_t addr, uint8_t reg, uint8_t data);
+bool snled27351_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer);
+
+void snled27351_set_value(int index, uint8_t value);
+void snled27351_set_value_all(uint8_t value);
+
+void snled27351_set_led_control_register(uint8_t index, bool value);
+
+// This should not be called from an interrupt
+// (eg. from a timer interrupt).
+// Call this while idle (in between matrix scans).
+// If the buffer is dirty, it will update the driver with the buffer.
+void snled27351_update_pwm_buffers(uint8_t addr, uint8_t index);
+void snled27351_update_led_control_registers(uint8_t addr, uint8_t index);
+
+void snled27351_sw_return_normal(uint8_t addr);
+void snled27351_sw_shutdown(uint8_t addr);
+
+// Registers Page Define
+#define SNLED27351_REG_CONFIGURE_CMD_PAGE 0xFD
+#define SNLED27351_LED_CONTROL_PAGE 0x00
+#define SNLED27351_LED_PWM_PAGE 0x01
+#define SNLED27351_FUNCTION_PAGE 0x03
+#define SNLED27351_CURRENT_TUNE_PAGE 0x04
+
+// Function Register: address 0x00
+#define SNLED27351_REG_CONFIGURATION 0x00
+#define SNLED27351_MSKSW_SHUT_DOWN_MODE (0x0 << 0)
+#define SNLED27351_MSKSW_NORMAL_MODE (0x1 << 0)
+
+#define SNLED27351_REG_DRIVER_ID 0x11
+#define SNLED27351_DRIVER_ID 0x8A
+
+#define SNLED27351_REG_PDU 0x13
+#define SNLED27351_MSKSET_CA_CB_CHANNEL 0xAA
+#define SNLED27351_MSKCLR_CA_CB_CHANNEL 0x00
+
+#define SNLED27351_REG_SCAN_PHASE 0x14
+#define SNLED27351_MSKPHASE_12CHANNEL 0x00
+#define SNLED27351_MSKPHASE_11CHANNEL 0x01
+#define SNLED27351_MSKPHASE_10CHANNEL 0x02
+#define SNLED27351_MSKPHASE_9CHANNEL 0x03
+#define SNLED27351_MSKPHASE_8CHANNEL 0x04
+#define SNLED27351_MSKPHASE_7CHANNEL 0x05
+#define SNLED27351_MSKPHASE_6CHANNEL 0x06
+#define SNLED27351_MSKPHASE_5CHANNEL 0x07
+#define SNLED27351_MSKPHASE_4CHANNEL 0x08
+#define SNLED27351_MSKPHASE_3CHANNEL 0x09
+#define SNLED27351_MSKPHASE_2CHANNEL 0x0A
+#define SNLED27351_MSKPHASE_1CHANNEL 0x0B
+
+#define SNLED27351_REG_SLEW_RATE_CONTROL_MODE1 0x15
+#define SNLED27351_MSKPWM_DELAY_PHASE_ENABLE 0x04
+#define SNLED27351_MSKPWM_DELAY_PHASE_DISABLE 0x00
+
+#define SNLED27351_REG_SLEW_RATE_CONTROL_MODE2 0x16
+#define SNLED27351_MSKDRIVING_SINKING_CHANNEL_SLEWRATE_ENABLE 0xC0
+#define SNLED27351_MSKDRIVING_SINKING_CHANNEL_SLEWRATE_DISABLE 0x00
+
+#define SNLED27351_REG_OPEN_SHORT_ENABLE 0x17
+#define SNLED27351_MSKOPEN_DETECTION_ENABLE (0x01 << 7)
+#define SNLED27351_MSKOPEN_DETECTION_DISABLE (0x00)
+
+#define SNLED27351_MSKSHORT_DETECTION_ENABLE (0x01 << 6)
+#define SNLED27351_MSKSHORT_DETECTION_DISABLE (0x00)
+
+#define SNLED27351_REG_OPEN_SHORT_DUTY 0x18
+#define SNLED27351_REG_OPEN_SHORT_FLAG 0x19
+
+#define SNLED27351_MSKOPEN_DETECTION_INTERRUPT_ENABLE (0x01 << 7)
+#define SNLED27351_MSKOPEN_DETECTION_INTERRUPT_DISABLE (0x00)
+
+#define SNLED27351_MSKSHORT_DETECTION_INTERRUPT_ENABLE (0x01 << 6)
+#define SNLED27351_MSKSHORT_DETECTION_INTERRUPT_DISABLE (0x00)
+
+#define SNLED27351_REG_SOFTWARE_SLEEP 0x1A
+#define SNLED27351_MSKSLEEP_ENABLE 0x02
+#define SNLED27351_MSKSLEEP_DISABLE 0x00
+
+// LED Control Registers
+#define SNLED27351_LED_CONTROL_ON_OFF_FIRST_ADDR 0x0
+#define SNLED27351_LED_CONTROL_ON_OFF_LAST_ADDR 0x17
+#define SNLED27351_LED_CONTROL_ON_OFF_LENGTH ((SNLED27351_LED_CONTROL_ON_OFF_LAST_ADDR - SNLED27351_LED_CONTROL_ON_OFF_FIRST_ADDR) + 1)
+
+#define SNLED27351_LED_CONTROL_OPEN_FIRST_ADDR 0x18
+#define SNLED27351_LED_CONTROL_OPEN_LAST_ADDR 0x2F
+#define SNLED27351_LED_CONTROL_OPEN_LENGTH ((SNLED27351_LED_CONTROL_OPEN_LAST_ADDR - SNLED27351_LED_CONTROL_OPEN_FIRST_ADDR) + 1)
+
+#define SNLED27351_LED_CONTROL_SHORT_FIRST_ADDR 0x30
+#define SNLED27351_LED_CONTROL_SHORT_LAST_ADDR 0x47
+#define SNLED27351_LED_CONTROL_SHORT_LENGTH ((SNLED27351_LED_CONTROL_SHORT_LAST_ADDR - SNLED27351_LED_CONTROL_SHORT_FIRST_ADDR) + 1)
+
+#define SNLED27351_LED_CONTROL_PAGE_LENGTH 0x48
+
+// LED Control Registers
+#define SNLED27351_LED_PWM_FIRST_ADDR 0x00
+#define SNLED27351_LED_PWM_LAST_ADDR 0xBF
+#define SNLED27351_LED_PWM_LENGTH 0xC0
+
+// Current Tune Registers
+#define SNLED27351_LED_CURRENT_TUNE_FIRST_ADDR 0x00
+#define SNLED27351_LED_CURRENT_TUNE_LAST_ADDR 0x0B
+#define SNLED27351_LED_CURRENT_TUNE_LENGTH 0x0C
+
+#define A_1 0x00
+#define A_2 0x01
+#define A_3 0x02
+#define A_4 0x03
+#define A_5 0x04
+#define A_6 0x05
+#define A_7 0x06
+#define A_8 0x07
+#define A_9 0x08
+#define A_10 0x09
+#define A_11 0x0A
+#define A_12 0x0B
+#define A_13 0x0C
+#define A_14 0x0D
+#define A_15 0x0E
+#define A_16 0x0F
+
+#define B_1 0x10
+#define B_2 0x11
+#define B_3 0x12
+#define B_4 0x13
+#define B_5 0x14
+#define B_6 0x15
+#define B_7 0x16
+#define B_8 0x17
+#define B_9 0x18
+#define B_10 0x19
+#define B_11 0x1A
+#define B_12 0x1B
+#define B_13 0x1C
+#define B_14 0x1D
+#define B_15 0x1E
+#define B_16 0x1F
+
+#define C_1 0x20
+#define C_2 0x21
+#define C_3 0x22
+#define C_4 0x23
+#define C_5 0x24
+#define C_6 0x25
+#define C_7 0x26
+#define C_8 0x27
+#define C_9 0x28
+#define C_10 0x29
+#define C_11 0x2A
+#define C_12 0x2B
+#define C_13 0x2C
+#define C_14 0x2D
+#define C_15 0x2E
+#define C_16 0x2F
+
+#define D_1 0x30
+#define D_2 0x31
+#define D_3 0x32
+#define D_4 0x33
+#define D_5 0x34
+#define D_6 0x35
+#define D_7 0x36
+#define D_8 0x37
+#define D_9 0x38
+#define D_10 0x39
+#define D_11 0x3A
+#define D_12 0x3B
+#define D_13 0x3C
+#define D_14 0x3D
+#define D_15 0x3E
+#define D_16 0x3F
+
+#define E_1 0x40
+#define E_2 0x41
+#define E_3 0x42
+#define E_4 0x43
+#define E_5 0x44
+#define E_6 0x45
+#define E_7 0x46
+#define E_8 0x47
+#define E_9 0x48
+#define E_10 0x49
+#define E_11 0x4A
+#define E_12 0x4B
+#define E_13 0x4C
+#define E_14 0x4D
+#define E_15 0x4E
+#define E_16 0x4F
+
+#define F_1 0x50
+#define F_2 0x51
+#define F_3 0x52
+#define F_4 0x53
+#define F_5 0x54
+#define F_6 0x55
+#define F_7 0x56
+#define F_8 0x57
+#define F_9 0x58
+#define F_10 0x59
+#define F_11 0x5A
+#define F_12 0x5B
+#define F_13 0x5C
+#define F_14 0x5D
+#define F_15 0x5E
+#define F_16 0x5F
+
+#define G_1 0x60
+#define G_2 0x61
+#define G_3 0x62
+#define G_4 0x63
+#define G_5 0x64
+#define G_6 0x65
+#define G_7 0x66
+#define G_8 0x67
+#define G_9 0x68
+#define G_10 0x69
+#define G_11 0x6A
+#define G_12 0x6B
+#define G_13 0x6C
+#define G_14 0x6D
+#define G_15 0x6E
+#define G_16 0x6F
+
+#define H_1 0x70
+#define H_2 0x71
+#define H_3 0x72
+#define H_4 0x73
+#define H_5 0x74
+#define H_6 0x75
+#define H_7 0x76
+#define H_8 0x77
+#define H_9 0x78
+#define H_10 0x79
+#define H_11 0x7A
+#define H_12 0x7B
+#define H_13 0x7C
+#define H_14 0x7D
+#define H_15 0x7E
+#define H_16 0x7F
+
+#define I_1 0x80
+#define I_2 0x81
+#define I_3 0x82
+#define I_4 0x83
+#define I_5 0x84
+#define I_6 0x85
+#define I_7 0x86
+#define I_8 0x87
+#define I_9 0x88
+#define I_10 0x89
+#define I_11 0x8A
+#define I_12 0x8B
+#define I_13 0x8C
+#define I_14 0x8D
+#define I_15 0x8E
+#define I_16 0x8F
+
+#define J_1 0x90
+#define J_2 0x91
+#define J_3 0x92
+#define J_4 0x93
+#define J_5 0x94
+#define J_6 0x95
+#define J_7 0x96
+#define J_8 0x97
+#define J_9 0x98
+#define J_10 0x99
+#define J_11 0x9A
+#define J_12 0x9B
+#define J_13 0x9C
+#define J_14 0x9D
+#define J_15 0x9E
+#define J_16 0x9F
+
+#define K_1 0xA0
+#define K_2 0xA1
+#define K_3 0xA2
+#define K_4 0xA3
+#define K_5 0xA4
+#define K_6 0xA5
+#define K_7 0xA6
+#define K_8 0xA7
+#define K_9 0xA8
+#define K_10 0xA9
+#define K_11 0xAA
+#define K_12 0xAB
+#define K_13 0xAC
+#define K_14 0xAD
+#define K_15 0xAE
+#define K_16 0xAF
+
+#define L_1 0xB0
+#define L_2 0xB1
+#define L_3 0xB2
+#define L_4 0xB3
+#define L_5 0xB4
+#define L_6 0xB5
+#define L_7 0xB6
+#define L_8 0xB7
+#define L_9 0xB8
+#define L_10 0xB9
+#define L_11 0xBA
+#define L_12 0xBB
+#define L_13 0xBC
+#define L_14 0xBD
+#define L_15 0xBE
+#define L_16 0xBF
diff --git a/drivers/led/snled27351.c b/drivers/led/snled27351.c
new file mode 100644
index 0000000000..1ca691b30f
--- /dev/null
+++ b/drivers/led/snled27351.c
@@ -0,0 +1,235 @@
+/* Copyright 2021 @ Keychron (https://www.keychron.com)
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "snled27351.h"
+#include "i2c_master.h"
+
+#ifndef SNLED27351_I2C_TIMEOUT
+# define SNLED27351_I2C_TIMEOUT 100
+#endif
+
+#ifndef SNLED27351_I2C_PERSISTENCE
+# define SNLED27351_I2C_PERSISTENCE 0
+#endif
+
+#ifndef SNLED27351_PHASE_CHANNEL
+# define SNLED27351_PHASE_CHANNEL SNLED27351_MSKPHASE_12CHANNEL
+#endif
+
+#ifndef SNLED27351_CURRENT_TUNE
+# define SNLED27351_CURRENT_TUNE \
+ { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }
+#endif
+
+// Transfer buffer for TWITransmitData()
+uint8_t g_twi_transfer_buffer[65];
+
+// These buffers match the SNLED27351 PWM registers.
+// The control buffers match the PG0 LED On/Off registers.
+// Storing them like this is optimal for I2C transfers to the registers.
+// We could optimize this and take out the unused registers from these
+// buffers and the transfers in snled27351_write_pwm_buffer() but it's
+// probably not worth the extra complexity.
+uint8_t g_pwm_buffer[SNLED27351_DRIVER_COUNT][192];
+bool g_pwm_buffer_update_required[SNLED27351_DRIVER_COUNT] = {false};
+
+uint8_t g_led_control_registers[SNLED27351_DRIVER_COUNT][24] = {0};
+bool g_led_control_registers_update_required[SNLED27351_DRIVER_COUNT] = {false};
+
+bool snled27351_write_register(uint8_t addr, uint8_t reg, uint8_t data) {
+ // If the transaction fails function returns false.
+ g_twi_transfer_buffer[0] = reg;
+ g_twi_transfer_buffer[1] = data;
+
+#if SNLED27351_I2C_PERSISTENCE > 0
+ for (uint8_t i = 0; i < SNLED27351_I2C_PERSISTENCE; i++) {
+ if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, SNLED27351_I2C_TIMEOUT) != 0) {
+ return false;
+ }
+ }
+#else
+ if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, SNLED27351_I2C_TIMEOUT) != 0) {
+ return false;
+ }
+#endif
+ return true;
+}
+
+bool snled27351_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer) {
+ // Assumes PG1 is already selected.
+ // If any of the transactions fails function returns false.
+ // Transmit PWM registers in 3 transfers of 64 bytes.
+
+ // Iterate over the pwm_buffer contents at 64 byte intervals.
+ for (uint8_t i = 0; i < 192; i += 64) {
+ g_twi_transfer_buffer[0] = i;
+ // Copy the data from i to i+63.
+ // Device will auto-increment register for data after the first byte
+ // Thus this sets registers 0x00-0x0F, 0x10-0x1F, etc. in one transfer.
+ for (uint8_t j = 0; j < 64; j++) {
+ g_twi_transfer_buffer[1 + j] = pwm_buffer[i + j];
+ }
+
+#if SNLED27351_I2C_PERSISTENCE > 0
+ for (uint8_t i = 0; i < SNLED27351_I2C_PERSISTENCE; i++) {
+ if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 65, SNLED27351_I2C_TIMEOUT) != 0) {
+ return false;
+ }
+ }
+#else
+ if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 65, SNLED27351_I2C_TIMEOUT) != 0) {
+ return false;
+ }
+#endif
+ }
+ return true;
+}
+
+void snled27351_init(uint8_t addr) {
+ // Select to function page
+ snled27351_write_register(addr, SNLED27351_REG_CONFIGURE_CMD_PAGE, SNLED27351_FUNCTION_PAGE);
+ // Setting LED driver to shutdown mode
+ snled27351_write_register(addr, SNLED27351_REG_CONFIGURATION, SNLED27351_MSKSW_SHUT_DOWN_MODE);
+ // Setting internal channel pulldown/pullup
+ snled27351_write_register(addr, SNLED27351_REG_PDU, SNLED27351_MSKSET_CA_CB_CHANNEL);
+ // Select number of scan phase
+ snled27351_write_register(addr, SNLED27351_REG_SCAN_PHASE, SNLED27351_PHASE_CHANNEL);
+ // Setting PWM Delay Phase
+ snled27351_write_register(addr, SNLED27351_REG_SLEW_RATE_CONTROL_MODE1, SNLED27351_MSKPWM_DELAY_PHASE_ENABLE);
+ // Setting Driving/Sinking Channel Slew Rate
+ snled27351_write_register(addr, SNLED27351_REG_SLEW_RATE_CONTROL_MODE2, SNLED27351_MSKDRIVING_SINKING_CHANNEL_SLEWRATE_ENABLE);
+ // Setting Iref
+ snled27351_write_register(addr, SNLED27351_REG_SOFTWARE_SLEEP, SNLED27351_MSKSLEEP_DISABLE);
+ // Set LED CONTROL PAGE (Page 0)
+ snled27351_write_register(addr, SNLED27351_REG_CONFIGURE_CMD_PAGE, SNLED27351_LED_CONTROL_PAGE);
+ for (int i = 0; i < SNLED27351_LED_CONTROL_ON_OFF_LENGTH; i++) {
+ snled27351_write_register(addr, i, 0x00);
+ }
+
+ // Set PWM PAGE (Page 1)
+ snled27351_write_register(addr, SNLED27351_REG_CONFIGURE_CMD_PAGE, SNLED27351_LED_PWM_PAGE);
+ for (int i = 0; i < SNLED27351_LED_CURRENT_TUNE_LENGTH; i++) {
+ snled27351_write_register(addr, i, 0x00);
+ }
+
+ // Set CURRENT PAGE (Page 4)
+ uint8_t current_tune_reg_list[SNLED27351_LED_CURRENT_TUNE_LENGTH] = SNLED27351_CURRENT_TUNE;
+ snled27351_write_register(addr, SNLED27351_REG_CONFIGURE_CMD_PAGE, SNLED27351_CURRENT_TUNE_PAGE);
+ for (int i = 0; i < SNLED27351_LED_CURRENT_TUNE_LENGTH; i++) {
+ snled27351_write_register(addr, i, current_tune_reg_list[i]);
+ }
+
+ // Enable LEDs ON/OFF
+ snled27351_write_register(addr, SNLED27351_REG_CONFIGURE_CMD_PAGE, SNLED27351_LED_CONTROL_PAGE);
+ for (int i = 0; i < SNLED27351_LED_CONTROL_ON_OFF_LENGTH; i++) {
+ snled27351_write_register(addr, i, 0xFF);
+ }
+
+ // Select to function page
+ snled27351_write_register(addr, SNLED27351_REG_CONFIGURE_CMD_PAGE, SNLED27351_FUNCTION_PAGE);
+ // Setting LED driver to normal mode
+ snled27351_write_register(addr, SNLED27351_REG_CONFIGURATION, SNLED27351_MSKSW_NORMAL_MODE);
+}
+
+void snled27351_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) {
+ snled27351_led_t led;
+ if (index >= 0 && index < RGB_MATRIX_LED_COUNT) {
+ memcpy_P(&led, (&g_snled27351_leds[index]), sizeof(led));
+
+ if (g_pwm_buffer[led.driver][led.r] == red && g_pwm_buffer[led.driver][led.g] == green && g_pwm_buffer[led.driver][led.b] == blue) {
+ return;
+ }
+ g_pwm_buffer[led.driver][led.r] = red;
+ g_pwm_buffer[led.driver][led.g] = green;
+ g_pwm_buffer[led.driver][led.b] = blue;
+ g_pwm_buffer_update_required[led.driver] = true;
+ }
+}
+
+void snled27351_set_color_all(uint8_t red, uint8_t green, uint8_t blue) {
+ for (int i = 0; i < RGB_MATRIX_LED_COUNT; i++) {
+ snled27351_set_color(i, red, green, blue);
+ }
+}
+
+void snled27351_set_led_control_register(uint8_t index, bool red, bool green, bool blue) {
+ snled27351_led_t led;
+ memcpy_P(&led, (&g_snled27351_leds[index]), sizeof(led));
+
+ uint8_t control_register_r = led.r / 8;
+ uint8_t control_register_g = led.g / 8;
+ uint8_t control_register_b = led.b / 8;
+ uint8_t bit_r = led.r % 8;
+ uint8_t bit_g = led.g % 8;
+ uint8_t bit_b = led.b % 8;
+
+ if (red) {
+ g_led_control_registers[led.driver][control_register_r] |= (1 << bit_r);
+ } else {
+ g_led_control_registers[led.driver][control_register_r] &= ~(1 << bit_r);
+ }
+ if (green) {
+ g_led_control_registers[led.driver][control_register_g] |= (1 << bit_g);
+ } else {
+ g_led_control_registers[led.driver][control_register_g] &= ~(1 << bit_g);
+ }
+ if (blue) {
+ g_led_control_registers[led.driver][control_register_b] |= (1 << bit_b);
+ } else {
+ g_led_control_registers[led.driver][control_register_b] &= ~(1 << bit_b);
+ }
+
+ g_led_control_registers_update_required[led.driver] = true;
+}
+
+void snled27351_update_pwm_buffers(uint8_t addr, uint8_t index) {
+ if (g_pwm_buffer_update_required[index]) {
+ snled27351_write_register(addr, SNLED27351_REG_CONFIGURE_CMD_PAGE, SNLED27351_LED_PWM_PAGE);
+
+ // If any of the transactions fail we risk writing dirty PG0,
+ // refresh page 0 just in case.
+ if (!snled27351_write_pwm_buffer(addr, g_pwm_buffer[index])) {
+ g_led_control_registers_update_required[index] = true;
+ }
+ }
+ g_pwm_buffer_update_required[index] = false;
+}
+
+void snled27351_update_led_control_registers(uint8_t addr, uint8_t index) {
+ if (g_led_control_registers_update_required[index]) {
+ snled27351_write_register(addr, SNLED27351_REG_CONFIGURE_CMD_PAGE, SNLED27351_LED_CONTROL_PAGE);
+ for (int i = 0; i < 24; i++) {
+ snled27351_write_register(addr, i, g_led_control_registers[index][i]);
+ }
+ }
+ g_led_control_registers_update_required[index] = false;
+}
+
+void snled27351_sw_return_normal(uint8_t addr) {
+ // Select to function page
+ snled27351_write_register(addr, SNLED27351_REG_CONFIGURE_CMD_PAGE, SNLED27351_FUNCTION_PAGE);
+ // Setting LED driver to normal mode
+ snled27351_write_register(addr, SNLED27351_REG_CONFIGURATION, SNLED27351_MSKSW_NORMAL_MODE);
+}
+
+void snled27351_sw_shutdown(uint8_t addr) {
+ // Select to function page
+ snled27351_write_register(addr, SNLED27351_REG_CONFIGURE_CMD_PAGE, SNLED27351_FUNCTION_PAGE);
+ // Setting LED driver to shutdown mode
+ snled27351_write_register(addr, SNLED27351_REG_CONFIGURATION, SNLED27351_MSKSW_SHUT_DOWN_MODE);
+ // Write SW Sleep Register
+ snled27351_write_register(addr, SNLED27351_REG_SOFTWARE_SLEEP, SNLED27351_MSKSLEEP_ENABLE);
+}
diff --git a/drivers/led/snled27351.h b/drivers/led/snled27351.h
new file mode 100644
index 0000000000..770becdba1
--- /dev/null
+++ b/drivers/led/snled27351.h
@@ -0,0 +1,378 @@
+/* Copyright 2021 @ Keychron (https://www.keychron.com)
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#pragma once
+
+#include <stdint.h>
+#include <stdbool.h>
+#include "progmem.h"
+
+// ======== DEPRECATED DEFINES - DO NOT USE ========
+#ifdef DRIVER_COUNT
+# define SNLED27351_DRIVER_COUNT DRIVER_COUNT
+#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_MSKPHASE_12CHANNEL
+#define MSKPHASE_11CHANNEL SNLED27351_MSKPHASE_11CHANNEL
+#define MSKPHASE_10CHANNEL SNLED27351_MSKPHASE_10CHANNEL
+#define MSKPHASE_9CHANNEL SNLED27351_MSKPHASE_9CHANNEL
+#define MSKPHASE_8CHANNEL SNLED27351_MSKPHASE_8CHANNEL
+#define MSKPHASE_7CHANNEL SNLED27351_MSKPHASE_7CHANNEL
+#define MSKPHASE_6CHANNEL SNLED27351_MSKPHASE_6CHANNEL
+#define MSKPHASE_5CHANNEL SNLED27351_MSKPHASE_5CHANNEL
+#define MSKPHASE_4CHANNEL SNLED27351_MSKPHASE_4CHANNEL
+#define MSKPHASE_3CHANNEL SNLED27351_MSKPHASE_3CHANNEL
+#define MSKPHASE_2CHANNEL SNLED27351_MSKPHASE_2CHANNEL
+#define MSKPHASE_1CHANNEL SNLED27351_MSKPHASE_1CHANNEL
+
+#define ckled2001_led snled27351_led_t
+#define g_ckled2001_leds g_snled27351_leds
+// ========
+
+#define SNLED27351_I2C_ADDRESS_GND 0x74
+#define SNLED27351_I2C_ADDRESS_SCL 0x75
+#define SNLED27351_I2C_ADDRESS_SDA 0x76
+#define SNLED27351_I2C_ADDRESS_VDDIO 0x77
+
+typedef struct snled27351_led_t {
+ uint8_t driver : 2;
+ uint8_t r;
+ uint8_t g;
+ uint8_t b;
+} __attribute__((packed)) snled27351_led_t;
+
+extern const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT];
+
+void snled27351_init(uint8_t addr);
+bool snled27351_write_register(uint8_t addr, uint8_t reg, uint8_t data);
+bool snled27351_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer);
+
+void snled27351_set_color(int index, uint8_t red, uint8_t green, uint8_t blue);
+void snled27351_set_color_all(uint8_t red, uint8_t green, uint8_t blue);
+
+void snled27351_set_led_control_register(uint8_t index, bool red, bool green, bool blue);
+
+// This should not be called from an interrupt
+// (eg. from a timer interrupt).
+// Call this while idle (in between matrix scans).
+// If the buffer is dirty, it will update the driver with the buffer.
+void snled27351_update_pwm_buffers(uint8_t addr, uint8_t index);
+void snled27351_update_led_control_registers(uint8_t addr, uint8_t index);
+
+void snled27351_sw_return_normal(uint8_t addr);
+void snled27351_sw_shutdown(uint8_t addr);
+
+// Registers Page Define
+#define SNLED27351_REG_CONFIGURE_CMD_PAGE 0xFD
+#define SNLED27351_LED_CONTROL_PAGE 0x00
+#define SNLED27351_LED_PWM_PAGE 0x01
+#define SNLED27351_FUNCTION_PAGE 0x03
+#define SNLED27351_CURRENT_TUNE_PAGE 0x04
+
+// Function Register: address 0x00
+#define SNLED27351_REG_CONFIGURATION 0x00
+#define SNLED27351_MSKSW_SHUT_DOWN_MODE (0x0 << 0)
+#define SNLED27351_MSKSW_NORMAL_MODE (0x1 << 0)
+
+#define SNLED27351_REG_DRIVER_ID 0x11
+#define SNLED27351_DRIVER_ID 0x8A
+
+#define SNLED27351_REG_PDU 0x13
+#define SNLED27351_MSKSET_CA_CB_CHANNEL 0xAA
+#define SNLED27351_MSKCLR_CA_CB_CHANNEL 0x00
+
+#define SNLED27351_REG_SCAN_PHASE 0x14
+#define SNLED27351_MSKPHASE_12CHANNEL 0x00
+#define SNLED27351_MSKPHASE_11CHANNEL 0x01
+#define SNLED27351_MSKPHASE_10CHANNEL 0x02
+#define SNLED27351_MSKPHASE_9CHANNEL 0x03
+#define SNLED27351_MSKPHASE_8CHANNEL 0x04
+#define SNLED27351_MSKPHASE_7CHANNEL 0x05
+#define SNLED27351_MSKPHASE_6CHANNEL 0x06
+#define SNLED27351_MSKPHASE_5CHANNEL 0x07
+#define SNLED27351_MSKPHASE_4CHANNEL 0x08
+#define SNLED27351_MSKPHASE_3CHANNEL 0x09
+#define SNLED27351_MSKPHASE_2CHANNEL 0x0A
+#define SNLED27351_MSKPHASE_1CHANNEL 0x0B
+
+#define SNLED27351_REG_SLEW_RATE_CONTROL_MODE1 0x15
+#define SNLED27351_MSKPWM_DELAY_PHASE_ENABLE 0x04
+#define SNLED27351_MSKPWM_DELAY_PHASE_DISABLE 0x00
+
+#define SNLED27351_REG_SLEW_RATE_CONTROL_MODE2 0x16
+#define SNLED27351_MSKDRIVING_SINKING_CHANNEL_SLEWRATE_ENABLE 0xC0
+#define SNLED27351_MSKDRIVING_SINKING_CHANNEL_SLEWRATE_DISABLE 0x00
+
+#define SNLED27351_REG_OPEN_SHORT_ENABLE 0x17
+#define SNLED27351_MSKOPEN_DETECTION_ENABLE (0x01 << 7)
+#define SNLED27351_MSKOPEN_DETECTION_DISABLE (0x00)
+
+#define SNLED27351_MSKSHORT_DETECTION_ENABLE (0x01 << 6)
+#define SNLED27351_MSKSHORT_DETECTION_DISABLE (0x00)
+
+#define SNLED27351_REG_OPEN_SHORT_DUTY 0x18
+#define SNLED27351_REG_OPEN_SHORT_FLAG 0x19
+
+#define SNLED27351_MSKOPEN_DETECTION_INTERRUPT_ENABLE (0x01 << 7)
+#define SNLED27351_MSKOPEN_DETECTION_INTERRUPT_DISABLE (0x00)
+
+#define SNLED27351_MSKSHORT_DETECTION_INTERRUPT_ENABLE (0x01 << 6)
+#define SNLED27351_MSKSHORT_DETECTION_INTERRUPT_DISABLE (0x00)
+
+#define SNLED27351_REG_SOFTWARE_SLEEP 0x1A
+#define SNLED27351_MSKSLEEP_ENABLE 0x02
+#define SNLED27351_MSKSLEEP_DISABLE 0x00
+
+// LED Control Registers
+#define SNLED27351_LED_CONTROL_ON_OFF_FIRST_ADDR 0x0
+#define SNLED27351_LED_CONTROL_ON_OFF_LAST_ADDR 0x17
+#define SNLED27351_LED_CONTROL_ON_OFF_LENGTH ((SNLED27351_LED_CONTROL_ON_OFF_LAST_ADDR - SNLED27351_LED_CONTROL_ON_OFF_FIRST_ADDR) + 1)
+
+#define SNLED27351_LED_CONTROL_OPEN_FIRST_ADDR 0x18
+#define SNLED27351_LED_CONTROL_OPEN_LAST_ADDR 0x2F
+#define SNLED27351_LED_CONTROL_OPEN_LENGTH ((SNLED27351_LED_CONTROL_OPEN_LAST_ADDR - SNLED27351_LED_CONTROL_OPEN_FIRST_ADDR) + 1)
+
+#define SNLED27351_LED_CONTROL_SHORT_FIRST_ADDR 0x30
+#define SNLED27351_LED_CONTROL_SHORT_LAST_ADDR 0x47
+#define SNLED27351_LED_CONTROL_SHORT_LENGTH ((SNLED27351_LED_CONTROL_SHORT_LAST_ADDR - SNLED27351_LED_CONTROL_SHORT_FIRST_ADDR) + 1)
+
+#define SNLED27351_LED_CONTROL_PAGE_LENGTH 0x48
+
+// LED Control Registers
+#define SNLED27351_LED_PWM_FIRST_ADDR 0x00
+#define SNLED27351_LED_PWM_LAST_ADDR 0xBF
+#define SNLED27351_LED_PWM_LENGTH 0xC0
+
+// Current Tune Registers
+#define SNLED27351_LED_CURRENT_TUNE_FIRST_ADDR 0x00
+#define SNLED27351_LED_CURRENT_TUNE_LAST_ADDR 0x0B
+#define SNLED27351_LED_CURRENT_TUNE_LENGTH 0x0C
+
+#define A_1 0x00
+#define A_2 0x01
+#define A_3 0x02
+#define A_4 0x03
+#define A_5 0x04
+#define A_6 0x05
+#define A_7 0x06
+#define A_8 0x07
+#define A_9 0x08
+#define A_10 0x09
+#define A_11 0x0A
+#define A_12 0x0B
+#define A_13 0x0C
+#define A_14 0x0D
+#define A_15 0x0E
+#define A_16 0x0F
+
+#define B_1 0x10
+#define B_2 0x11
+#define B_3 0x12
+#define B_4 0x13
+#define B_5 0x14
+#define B_6 0x15
+#define B_7 0x16
+#define B_8 0x17
+#define B_9 0x18
+#define B_10 0x19
+#define B_11 0x1A
+#define B_12 0x1B
+#define B_13 0x1C
+#define B_14 0x1D
+#define B_15 0x1E
+#define B_16 0x1F
+
+#define C_1 0x20
+#define C_2 0x21
+#define C_3 0x22
+#define C_4 0x23
+#define C_5 0x24
+#define C_6 0x25
+#define C_7 0x26
+#define C_8 0x27
+#define C_9 0x28
+#define C_10 0x29
+#define C_11 0x2A
+#define C_12 0x2B
+#define C_13 0x2C
+#define C_14 0x2D
+#define C_15 0x2E
+#define C_16 0x2F
+
+#define D_1 0x30
+#define D_2 0x31
+#define D_3 0x32
+#define D_4 0x33
+#define D_5 0x34
+#define D_6 0x35
+#define D_7 0x36
+#define D_8 0x37
+#define D_9 0x38
+#define D_10 0x39
+#define D_11 0x3A
+#define D_12 0x3B
+#define D_13 0x3C
+#define D_14 0x3D
+#define D_15 0x3E
+#define D_16 0x3F
+
+#define E_1 0x40
+#define E_2 0x41
+#define E_3 0x42
+#define E_4 0x43
+#define E_5 0x44
+#define E_6 0x45
+#define E_7 0x46
+#define E_8 0x47
+#define E_9 0x48
+#define E_10 0x49
+#define E_11 0x4A
+#define E_12 0x4B
+#define E_13 0x4C
+#define E_14 0x4D
+#define E_15 0x4E
+#define E_16 0x4F
+
+#define F_1 0x50
+#define F_2 0x51
+#define F_3 0x52
+#define F_4 0x53
+#define F_5 0x54
+#define F_6 0x55
+#define F_7 0x56
+#define F_8 0x57
+#define F_9 0x58
+#define F_10 0x59
+#define F_11 0x5A
+#define F_12 0x5B
+#define F_13 0x5C
+#define F_14 0x5D
+#define F_15 0x5E
+#define F_16 0x5F
+
+#define G_1 0x60
+#define G_2 0x61
+#define G_3 0x62
+#define G_4 0x63
+#define G_5 0x64
+#define G_6 0x65
+#define G_7 0x66
+#define G_8 0x67
+#define G_9 0x68
+#define G_10 0x69
+#define G_11 0x6A
+#define G_12 0x6B
+#define G_13 0x6C
+#define G_14 0x6D
+#define G_15 0x6E
+#define G_16 0x6F
+
+#define H_1 0x70
+#define H_2 0x71
+#define H_3 0x72
+#define H_4 0x73
+#define H_5 0x74
+#define H_6 0x75
+#define H_7 0x76
+#define H_8 0x77
+#define H_9 0x78
+#define H_10 0x79
+#define H_11 0x7A
+#define H_12 0x7B
+#define H_13 0x7C
+#define H_14 0x7D
+#define H_15 0x7E
+#define H_16 0x7F
+
+#define I_1 0x80
+#define I_2 0x81
+#define I_3 0x82
+#define I_4 0x83
+#define I_5 0x84
+#define I_6 0x85
+#define I_7 0x86
+#define I_8 0x87
+#define I_9 0x88
+#define I_10 0x89
+#define I_11 0x8A
+#define I_12 0x8B
+#define I_13 0x8C
+#define I_14 0x8D
+#define I_15 0x8E
+#define I_16 0x8F
+
+#define J_1 0x90
+#define J_2 0x91
+#define J_3 0x92
+#define J_4 0x93
+#define J_5 0x94
+#define J_6 0x95
+#define J_7 0x96
+#define J_8 0x97
+#define J_9 0x98
+#define J_10 0x99
+#define J_11 0x9A
+#define J_12 0x9B
+#define J_13 0x9C
+#define J_14 0x9D
+#define J_15 0x9E
+#define J_16 0x9F
+
+#define K_1 0xA0
+#define K_2 0xA1
+#define K_3 0xA2
+#define K_4 0xA3
+#define K_5 0xA4
+#define K_6 0xA5
+#define K_7 0xA6
+#define K_8 0xA7
+#define K_9 0xA8
+#define K_10 0xA9
+#define K_11 0xAA
+#define K_12 0xAB
+#define K_13 0xAC
+#define K_14 0xAD
+#define K_15 0xAE
+#define K_16 0xAF
+
+#define L_1 0xB0
+#define L_2 0xB1
+#define L_3 0xB2
+#define L_4 0xB3
+#define L_5 0xB4
+#define L_6 0xB5
+#define L_7 0xB6
+#define L_8 0xB7
+#define L_9 0xB8
+#define L_10 0xB9
+#define L_11 0xBA
+#define L_12 0xBB
+#define L_13 0xBC
+#define L_14 0xBD
+#define L_15 0xBE
+#define L_16 0xBF
diff --git a/drivers/oled/oled_driver.c b/drivers/oled/oled_driver.c
index b9f7207813..4a2121cd7c 100644
--- a/drivers/oled/oled_driver.c
+++ b/drivers/oled/oled_driver.c
@@ -451,7 +451,7 @@ static void rotate_90(const uint8_t *src, uint8_t *dest) {
}
}
-void oled_render(void) {
+void oled_render_dirty(bool all) {
// Do we have work to do?
oled_dirty &= OLED_ALL_BLOCKS_MASK;
if (!oled_dirty || !oled_initialized || oled_scrolling) {
@@ -463,7 +463,7 @@ void oled_render(void) {
uint8_t update_start = 0;
uint8_t num_processed = 0;
- while (oled_dirty && num_processed++ < OLED_UPDATE_PROCESS_LIMIT) { // render all dirty blocks (up to the configured limit)
+ while (oled_dirty && (num_processed++ < OLED_UPDATE_PROCESS_LIMIT || all)) { // render all dirty blocks (up to the configured limit)
// Find next dirty block
while (!(oled_dirty & ((OLED_BLOCK_TYPE)1 << update_start))) {
++update_start;
diff --git a/drivers/oled/oled_driver.h b/drivers/oled/oled_driver.h
index 91c376ec27..c3db7e6d97 100644
--- a/drivers/oled/oled_driver.h
+++ b/drivers/oled/oled_driver.h
@@ -353,20 +353,24 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation);
// Clears the display buffer, resets cursor position to 0, and sets the buffer to dirty for rendering
void oled_clear(void);
-// Renders the dirty chunks of the buffer to oled display
-void oled_render(void);
+// Alias to oled_render_dirty to avoid a change in api.
+#define oled_render() oled_render_dirty(false)
+
+// Renders all dirty blocks to the display at one time or a subset depending on the value of
+// all.
+void oled_render_dirty(bool all);
// Moves cursor to character position indicated by column and line, wraps if out of bounds
// Max column denoted by 'oled_max_chars()' and max lines by 'oled_max_lines()' functions
void oled_set_cursor(uint8_t col, uint8_t line);
// Advances the cursor to the next page, writing ' ' if true
-// Wraps to the begining when out of bounds
+// Wraps to the beginning when out of bounds
void oled_advance_page(bool clearPageRemainder);
// Moves the cursor forward 1 character length
// Advance page if there is not enough room for the next character
-// Wraps to the begining when out of bounds
+// Wraps to the beginning when out of bounds
void oled_advance_char(void);
// Writes a single character to the buffer at current cursor position
@@ -433,10 +437,10 @@ bool oled_off(void);
// not
bool is_oled_on(void);
-// Sets the brightness of the display
+// Sets the brightness level of the display
uint8_t oled_set_brightness(uint8_t level);
-// Gets the current brightness of the display
+// Gets the current brightness level of the display
uint8_t oled_get_brightness(void);
// Basically it's oled_render, but with timeout management and oled_task_user calling!
@@ -458,12 +462,12 @@ void oled_scroll_set_area(uint8_t start_line, uint8_t end_line);
// 0=2, 1=3, 2=4, 3=5, 4=25, 5=64, 6=128, 7=256
void oled_scroll_set_speed(uint8_t speed);
-// Scrolls the entire display right
+// Begin scrolling the entire display right
// Returns true if the screen was scrolling or starts scrolling
// NOTE: display contents cannot be changed while scrolling
bool oled_scroll_right(void);
-// Scrolls the entire display left
+// Begin scrolling the entire display left
// Returns true if the screen was scrolling or starts scrolling
// NOTE: display contents cannot be changed while scrolling
bool oled_scroll_left(void);
diff --git a/drivers/ps2/ps2_mouse.c b/drivers/ps2/ps2_mouse.c
index ae594c94bc..88c9bdcebe 100644
--- a/drivers/ps2/ps2_mouse.c
+++ b/drivers/ps2/ps2_mouse.c
@@ -265,6 +265,7 @@ static inline void ps2_mouse_scroll_button_task(report_mouse_t *mouse_report) {
SCROLL_SENT,
} scroll_state = SCROLL_NONE;
static uint16_t scroll_button_time = 0;
+ static int16_t scroll_x, scroll_y;
if (PS2_MOUSE_SCROLL_BTN_MASK == (mouse_report->buttons & (PS2_MOUSE_SCROLL_BTN_MASK))) {
// All scroll buttons are pressed
@@ -272,13 +273,19 @@ static inline void ps2_mouse_scroll_button_task(report_mouse_t *mouse_report) {
if (scroll_state == SCROLL_NONE) {
scroll_button_time = timer_read();
scroll_state = SCROLL_BTN;
+ scroll_x = 0;
+ scroll_y = 0;
}
// If the mouse has moved, update the report to scroll instead of move the mouse
if (mouse_report->x || mouse_report->y) {
- scroll_state = SCROLL_SENT;
- mouse_report->v = -mouse_report->y / (PS2_MOUSE_SCROLL_DIVISOR_V);
- mouse_report->h = mouse_report->x / (PS2_MOUSE_SCROLL_DIVISOR_H);
+ scroll_state = SCROLL_SENT;
+ scroll_y += mouse_report->y;
+ scroll_x += mouse_report->x;
+ mouse_report->v = -scroll_y / (PS2_MOUSE_SCROLL_DIVISOR_V);
+ mouse_report->h = scroll_x / (PS2_MOUSE_SCROLL_DIVISOR_H);
+ scroll_y += (mouse_report->v * (PS2_MOUSE_SCROLL_DIVISOR_V));
+ scroll_x -= (mouse_report->h * (PS2_MOUSE_SCROLL_DIVISOR_H));
mouse_report->x = 0;
mouse_report->y = 0;
#ifdef PS2_MOUSE_INVERT_H
diff --git a/drivers/sensors/pmw3320.c b/drivers/sensors/pmw3320.c
index a4648ef425..69a584f4e1 100644
--- a/drivers/sensors/pmw3320.c
+++ b/drivers/sensors/pmw3320.c
@@ -178,7 +178,7 @@ uint16_t pmw3320_get_cpi(void) {
}
void pmw3320_set_cpi(uint16_t cpi) {
- uint8_t cpival = constrain((cpi / PMW3320_CPI_STEP) - 1U, 0, (PMW3320_CPI_MAX / PMW3320_CPI_STEP) - 1U);
+ uint8_t cpival = constrain((cpi / PMW3320_CPI_STEP), (PMW3320_CPI_MIN / PMW3320_CPI_STEP), (PMW3320_CPI_MAX / PMW3320_CPI_STEP)) - 1U;
// Fifth bit is probably a control bit.
// PMW3320 datasheet don't have any info on this, so this is a pure guess.
pmw3320_write_reg(REG_Resolution, 0x20 | cpival);
diff --git a/drivers/sensors/pmw3360.c b/drivers/sensors/pmw3360.c
index 81dca002e2..a7dc687f50 100644
--- a/drivers/sensors/pmw3360.c
+++ b/drivers/sensors/pmw3360.c
@@ -23,7 +23,7 @@ void pmw33xx_set_cpi(uint8_t sensor, uint16_t cpi) {
return;
}
- uint8_t cpival = CONSTRAIN((cpi / PMW33XX_CPI_STEP) - 1, 0, (PMW33XX_CPI_MAX / PMW33XX_CPI_STEP) - 1U);
+ uint8_t cpival = CONSTRAIN((cpi / PMW33XX_CPI_STEP), (PMW33XX_CPI_MIN / PMW33XX_CPI_STEP), (PMW33XX_CPI_MAX / PMW33XX_CPI_STEP)) - 1U;
pmw33xx_write(sensor, REG_Config1, cpival);
}
diff --git a/drivers/sensors/pmw3389.c b/drivers/sensors/pmw3389.c
index c5781a5ffe..10e578edac 100644
--- a/drivers/sensors/pmw3389.c
+++ b/drivers/sensors/pmw3389.c
@@ -22,7 +22,7 @@ void pmw33xx_set_cpi(uint8_t sensor, uint16_t cpi) {
return;
}
- uint16_t cpival = CONSTRAIN((cpi / PMW33XX_CPI_STEP) - 1, 0, (PMW33XX_CPI_MAX / PMW33XX_CPI_STEP) - 1U);
+ uint16_t cpival = CONSTRAIN((cpi / PMW33XX_CPI_STEP), (PMW33XX_CPI_MIN / PMW33XX_CPI_STEP), (PMW33XX_CPI_MAX / PMW33XX_CPI_STEP)) - 1U;
// Sets upper byte first for more consistent setting of cpi
pmw33xx_write(sensor, REG_Resolution_H, (cpival >> 8) & 0xFF);
pmw33xx_write(sensor, REG_Resolution_L, cpival & 0xFF);
diff --git a/drivers/ws2812.h b/drivers/ws2812.h
index 8750b0110e..1527df23d3 100644
--- a/drivers/ws2812.h
+++ b/drivers/ws2812.h
@@ -73,4 +73,4 @@
* - Send out the LED data
* - Wait 50us to reset the LEDs
*/
-void ws2812_setleds(LED_TYPE *ledarray, uint16_t number_of_leds);
+void ws2812_setleds(rgb_led_t *ledarray, uint16_t number_of_leds);
diff --git a/keyboards/1k/keymaps/default/rgblite.h b/keyboards/1k/keymaps/default/rgblite.h
index e64f49ee0a..29d684ac08 100644
--- a/keyboards/1k/keymaps/default/rgblite.h
+++ b/keyboards/1k/keymaps/default/rgblite.h
@@ -7,7 +7,7 @@
#include "color.h"
static inline void rgblite_setrgb(RGB rgb) {
- LED_TYPE leds[RGBLED_NUM] = {{.r = rgb.r, .g = rgb.g, .b = rgb.b}};
+ rgb_led_t leds[RGBLED_NUM] = {{.r = rgb.r, .g = rgb.g, .b = rgb.b}};
ws2812_setleds(leds, RGBLED_NUM);
}
diff --git a/keyboards/1k/keymaps/media/rgblite.h b/keyboards/1k/keymaps/media/rgblite.h
index e64f49ee0a..29d684ac08 100644
--- a/keyboards/1k/keymaps/media/rgblite.h
+++ b/keyboards/1k/keymaps/media/rgblite.h
@@ -7,7 +7,7 @@
#include "color.h"
static inline void rgblite_setrgb(RGB rgb) {
- LED_TYPE leds[RGBLED_NUM] = {{.r = rgb.r, .g = rgb.g, .b = rgb.b}};
+ rgb_led_t leds[RGBLED_NUM] = {{.r = rgb.r, .g = rgb.g, .b = rgb.b}};
ws2812_setleds(leds, RGBLED_NUM);
}
diff --git a/keyboards/1upkeyboards/1upocarina/info.json b/keyboards/1upkeyboards/1upocarina/info.json
index fccf9d8899..c6a3718082 100644
--- a/keyboards/1upkeyboards/1upocarina/info.json
+++ b/keyboards/1upkeyboards/1upocarina/info.json
@@ -37,6 +37,7 @@
]
},
"ws2812": {
+ "driver": "vendor",
"pin": "GP24"
},
"rgb_matrix": {
diff --git a/keyboards/1upkeyboards/1upocarina/rules.mk b/keyboards/1upkeyboards/1upocarina/rules.mk
index 8e853e0af7..6e7633bfe0 100644
--- a/keyboards/1upkeyboards/1upocarina/rules.mk
+++ b/keyboards/1upkeyboards/1upocarina/rules.mk
@@ -1 +1 @@
-WS2812_DRIVER = vendor \ No newline at end of file
+# This file intentionally left blank
diff --git a/keyboards/1upkeyboards/pi60/config.h b/keyboards/1upkeyboards/pi60/config.h
index 8940acb004..6bbbb2293c 100644
--- a/keyboards/1upkeyboards/pi60/config.h
+++ b/keyboards/1upkeyboards/pi60/config.h
@@ -3,8 +3,6 @@
#pragma once
-#define DYNAMIC_KEYMAP_LAYER_COUNT 10
-
#define RGB_MATRIX_LED_COUNT 21
//#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
//#define RGB_MATRIX_KEYPRESSES
diff --git a/keyboards/1upkeyboards/pi60/info.json b/keyboards/1upkeyboards/pi60/info.json
index 1f8bdb4592..4d0d21ea25 100644
--- a/keyboards/1upkeyboards/pi60/info.json
+++ b/keyboards/1upkeyboards/pi60/info.json
@@ -11,6 +11,9 @@
"vid": "0x6F75"
},
"diode_direction": "COL2ROW",
+ "dynamic_keymap": {
+ "layer_count": 10
+ },
"features": {
"audio": false,
"backlight": false,
@@ -66,8 +69,19 @@
{"flags": 2, "x": 20, "y": 13}
]
},
+ "community_layouts": [
+ "60_ansi",
+ "60_ansi_split_bs_rshift",
+ "60_ansi_tsangan",
+ "60_tsangan_hhkb",
+ "60_hhkb",
+ "60_ansi_arrow",
+ "60_iso",
+ "60_iso_split_bs_rshift",
+ "60_iso_tsangan"
+ ],
"layouts": {
- "LAYOUT_60_ansi": {
+ "LAYOUT_all": {
"layout": [
{"label": "Esc", "matrix": [0, 0], "x": 0, "y": 0},
{"label": "1", "matrix": [0, 1], "x": 1, "y": 0},
@@ -138,6 +152,777 @@
{"label": "Menu", "matrix": [4, 13], "x": 13, "y": 4},
{"label": "RCtrl", "matrix": [4, 14], "x": 14, "y": 4}
]
+ },
+ "LAYOUT_60_ansi": {
+ "layout": [
+ {"label": "Esc", "matrix": [0, 0], "x": 0, "y": 0},
+ {"label": "1", "matrix": [0, 1], "x": 1, "y": 0},
+ {"label": "2", "matrix": [0, 2], "x": 2, "y": 0},
+ {"label": "3", "matrix": [0, 3], "x": 3, "y": 0},
+ {"label": "4", "matrix": [0, 4], "x": 4, "y": 0},
+ {"label": "5", "matrix": [0, 5], "x": 5, "y": 0},
+ {"label": "6", "matrix": [0, 6], "x": 6, "y": 0},
+ {"label": "7", "matrix": [0, 7], "x": 7, "y": 0},
+ {"label": "8", "matrix": [0, 8], "x": 8, "y": 0},
+ {"label": "9", "matrix": [0, 9], "x": 9, "y": 0},
+ {"label": "0", "matrix": [0, 10], "x": 10, "y": 0},
+ {"label": "-", "matrix": [0, 11], "x": 11, "y": 0},
+ {"label": "=", "matrix": [0, 12], "x": 12, "y": 0},
+ {"label": "Backspace", "matrix": [0, 13], "x": 13, "y": 0, "w": 2},
+
+ {"label": "Tab", "matrix": [1, 0], "x": 0, "y": 1, "w": 1.5},
+ {"label": "Q", "matrix": [1, 1], "x": 1.5, "y": 1},
+ {"label": "W", "matrix": [1, 2], "x": 2.5, "y": 1},
+ {"label": "E", "matrix": [1, 3], "x": 3.5, "y": 1},
+ {"label": "R", "matrix": [1, 4], "x": 4.5, "y": 1},
+ {"label": "T", "matrix": [1, 5], "x": 5.5, "y": 1},
+ {"label": "Y", "matrix": [1, 6], "x": 6.5, "y": 1},
+ {"label": "U", "matrix": [1, 7], "x": 7.5, "y": 1},
+ {"label": "I", "matrix": [1, 8], "x": 8.5, "y": 1},
+ {"label": "O", "matrix": [1, 9], "x": 9.5, "y": 1},
+ {"label": "P", "matrix": [1, 10], "x": 10.5, "y": 1},
+ {"label": "[", "matrix": [1, 11], "x": 11.5, "y": 1},
+ {"label": "]", "matrix": [1, 12], "x": 12.5, "y": 1},
+ {"label": "|", "matrix": [1, 13], "x": 13.5, "y": 1, "w": 1.5},
+
+ {"label": "Caps", "matrix": [2, 15], "x": 0, "y": 2, "w": 1.75},
+ {"label": "A", "matrix": [2, 1], "x": 1.75, "y": 2},
+ {"label": "S", "matrix": [2, 2], "x": 2.75, "y": 2},
+ {"label": "D", "matrix": [2, 3], "x": 3.75, "y": 2},
+ {"label": "F", "matrix": [2, 4], "x": 4.75, "y": 2},
+ {"label": "G", "matrix": [2, 5], "x": 5.75, "y": 2},
+ {"label": "H", "matrix": [2, 6], "x": 6.75, "y": 2},
+ {"label": "J", "matrix": [2, 7], "x": 7.75, "y": 2},
+ {"label": "K", "matrix": [2, 8], "x": 8.75, "y": 2},
+ {"label": "L", "matrix": [2, 9], "x": 9.75, "y": 2},
+ {"label": ";", "matrix": [2, 10], "x": 10.75, "y": 2},
+ {"label": "'", "matrix": [2, 11], "x": 11.75, "y": 2},
+ {"label": "Enter", "matrix": [2, 13], "x": 12.75, "y": 2, "w": 2.25},
+
+ {"label": "LShift", "matrix": [3, 15], "x": 0, "y": 3, "w": 2.25},
+ {"label": "Z", "matrix": [3, 2], "x": 2.25, "y": 3},
+ {"label": "X", "matrix": [3, 3], "x": 3.25, "y": 3},
+ {"label": "C", "matrix": [3, 4], "x": 4.25, "y": 3},
+ {"label": "V", "matrix": [3, 5], "x": 5.25, "y": 3},
+ {"label": "B", "matrix": [3, 6], "x": 6.25, "y": 3},
+ {"label": "N", "matrix": [3, 7], "x": 7.25, "y": 3},
+ {"label": "M", "matrix": [3, 8], "x": 8.25, "y": 3},
+ {"label": ",", "matrix": [3, 9], "x": 9.25, "y": 3},
+ {"label": ".", "matrix": [3, 10], "x": 10.25, "y": 3},
+ {"label": "/", "matrix": [3, 11], "x": 11.25, "y": 3},
+ {"label": "RShift", "matrix": [3, 12], "x": 12.25, "y": 3, "w": 2.75},
+
+ {"label": "LCtrl", "matrix": [4, 15], "x": 0, "y": 4, "w": 1.25},
+ {"label": "LGui", "matrix": [4, 1], "x": 1.25, "y": 4, "w": 1.25},
+ {"label": "LAlt", "matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.25},
+ {"label": "Space", "matrix": [4, 6], "x": 3.75, "y": 4, "w": 6.25},
+ {"label": "RAlt", "matrix": [4, 10], "x": 10, "y": 4, "w": 1.25},
+ {"label": "FN", "matrix": [4, 11], "x": 11.25, "y": 4, "w": 1.25},
+ {"label": "Menu", "matrix": [4, 13], "x": 12.5, "y": 4, "w": 1.25},
+ {"label": "RCtrl", "matrix": [4, 14], "x": 13.75, "y": 4, "w": 1.25}
+ ]
+ },
+ "LAYOUT_60_ansi_split_bs_rshift": {
+ "layout": [
+ {"label": "Esc", "matrix": [0, 0], "x": 0, "y": 0},
+ {"label": "1", "matrix": [0, 1], "x": 1, "y": 0},
+ {"label": "2", "matrix": [0, 2], "x": 2, "y": 0},
+ {"label": "3", "matrix": [0, 3], "x": 3, "y": 0},
+ {"label": "4", "matrix": [0, 4], "x": 4, "y": 0},
+ {"label": "5", "matrix": [0, 5], "x": 5, "y": 0},
+ {"label": "6", "matrix": [0, 6], "x": 6, "y": 0},
+ {"label": "7", "matrix": [0, 7], "x": 7, "y": 0},
+ {"label": "8", "matrix": [0, 8], "x": 8, "y": 0},
+ {"label": "9", "matrix": [0, 9], "x": 9, "y": 0},
+ {"label": "0", "matrix": [0, 10], "x": 10, "y": 0},
+ {"label": "-", "matrix": [0, 11], "x": 11, "y": 0},
+ {"label": "=", "matrix": [0, 12], "x": 12, "y": 0},
+ {"label": "BS", "matrix": [0, 13], "x": 13, "y": 0},
+ {"label": "~", "matrix": [0, 14], "x": 14, "y": 0},
+
+ {"label": "Tab", "matrix": [1, 0], "x": 0, "y": 1, "w": 1.5},
+ {"label": "Q", "matrix": [1, 1], "x": 1.5, "y": 1},
+ {"label": "W", "matrix": [1, 2], "x": 2.5, "y": 1},
+ {"label": "E", "matrix": [1, 3], "x": 3.5, "y": 1},
+ {"label": "R", "matrix": [1, 4], "x": 4.5, "y": 1},
+ {"label": "T", "matrix": [1, 5], "x": 5.5, "y": 1},
+ {"label": "Y", "matrix": [1, 6], "x": 6.5, "y": 1},
+ {"label": "U", "matrix": [1, 7], "x": 7.5, "y": 1},
+ {"label": "I", "matrix": [1, 8], "x": 8.5, "y": 1},
+ {"label": "O", "matrix": [1, 9], "x": 9.5, "y": 1},
+ {"label": "P", "matrix": [1, 10], "x": 10.5, "y": 1},
+ {"label": "[", "matrix": [1, 11], "x": 11.5, "y": 1},
+ {"label": "]", "matrix": [1, 12], "x": 12.5, "y": 1},
+ {"label": "|", "matrix": [1, 13], "x": 13.5, "y": 1, "w": 1.5},
+
+ {"label": "Caps", "matrix": [2, 15], "x": 0, "y": 2, "w": 1.75},
+ {"label": "A", "matrix": [2, 1], "x": 1.75, "y": 2},
+ {"label": "S", "matrix": [2, 2], "x": 2.75, "y": 2},
+ {"label": "D", "matrix": [2, 3], "x": 3.75, "y": 2},
+ {"label": "F", "matrix": [2, 4], "x": 4.75, "y": 2},
+ {"label": "G", "matrix": [2, 5], "x": 5.75, "y": 2},
+ {"label": "H", "matrix": [2, 6], "x": 6.75, "y": 2},
+ {"label": "J", "matrix": [2, 7], "x": 7.75, "y": 2},
+ {"label": "K", "matrix": [2, 8], "x": 8.75, "y": 2},
+ {"label": "L", "matrix": [2, 9], "x": 9.75, "y": 2},
+ {"label": ";", "matrix": [2, 10], "x": 10.75, "y": 2},
+ {"label": "'", "matrix": [2, 11], "x": 11.75, "y": 2},
+ {"label": "Enter", "matrix": [2, 13], "x": 12.75, "y": 2, "w": 2.25},
+
+ {"label": "LShift", "matrix": [3, 15], "x": 0, "y": 3, "w": 2.25},
+ {"label": "Z", "matrix": [3, 2], "x": 2.25, "y": 3},
+ {"label": "X", "matrix": [3, 3], "x": 3.25, "y": 3},
+ {"label": "C", "matrix": [3, 4], "x": 4.25, "y": 3},
+ {"label": "V", "matrix": [3, 5], "x": 5.25, "y": 3},
+ {"label": "B", "matrix": [3, 6], "x": 6.25, "y": 3},
+ {"label": "N", "matrix": [3, 7], "x": 7.25, "y": 3},
+ {"label": "M", "matrix": [3, 8], "x": 8.25, "y": 3},
+ {"label": ",", "matrix": [3, 9], "x": 9.25, "y": 3},
+ {"label": ".", "matrix": [3, 10], "x": 10.25, "y": 3},
+ {"label": "/", "matrix": [3, 11], "x": 11.25, "y": 3},
+ {"label": "RShift", "matrix": [3, 12], "x": 12.25, "y": 3, "w": 1.75},
+ {"label": "FN", "matrix": [3, 14], "x": 14, "y": 3},
+
+ {"label": "LCtrl", "matrix": [4, 15], "x": 0, "y": 4, "w": 1.25},
+ {"label": "LGui", "matrix": [4, 1], "x": 1.25, "y": 4, "w": 1.25},
+ {"label": "LAlt", "matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.25},
+ {"label": "Space", "matrix": [4, 6], "x": 3.75, "y": 4, "w": 6.25},
+ {"label": "RAlt", "matrix": [4, 10], "x": 10, "y": 4, "w": 1.25},
+ {"label": "FN", "matrix": [4, 11], "x": 11.25, "y": 4, "w": 1.25},
+ {"label": "Menu", "matrix": [4, 13], "x": 12.5, "y": 4, "w": 1.25},
+ {"label": "RCtrl", "matrix": [4, 14], "x": 13.75, "y": 4, "w": 1.25}
+ ]
+ },
+ "LAYOUT_60_ansi_tsangan": {
+ "layout": [
+ {"label": "Esc", "matrix": [0, 0], "x": 0, "y": 0},
+ {"label": "1", "matrix": [0, 1], "x": 1, "y": 0},
+ {"label": "2", "matrix": [0, 2], "x": 2, "y": 0},
+ {"label": "3", "matrix": [0, 3], "x": 3, "y": 0},
+ {"label": "4", "matrix": [0, 4], "x": 4, "y": 0},
+ {"label": "5", "matrix": [0, 5], "x": 5, "y": 0},
+ {"label": "6", "matrix": [0, 6], "x": 6, "y": 0},
+ {"label": "7", "matrix": [0, 7], "x": 7, "y": 0},
+ {"label": "8", "matrix": [0, 8], "x": 8, "y": 0},
+ {"label": "9", "matrix": [0, 9], "x": 9, "y": 0},
+ {"label": "0", "matrix": [0, 10], "x": 10, "y": 0},
+ {"label": "-", "matrix": [0, 11], "x": 11, "y": 0},
+ {"label": "=", "matrix": [0, 12], "x": 12, "y": 0},
+ {"label": "Backspace", "matrix": [0, 13], "x": 13, "y": 0, "w": 2},
+
+ {"label": "Tab", "matrix": [1, 0], "x": 0, "y": 1, "w": 1.5},
+ {"label": "Q", "matrix": [1, 1], "x": 1.5, "y": 1},
+ {"label": "W", "matrix": [1, 2], "x": 2.5, "y": 1},
+ {"label": "E", "matrix": [1, 3], "x": 3.5, "y": 1},
+ {"label": "R", "matrix": [1, 4], "x": 4.5, "y": 1},
+ {"label": "T", "matrix": [1, 5], "x": 5.5, "y": 1},
+ {"label": "Y", "matrix": [1, 6], "x": 6.5, "y": 1},
+ {"label": "U", "matrix": [1, 7], "x": 7.5, "y": 1},
+ {"label": "I", "matrix": [1, 8], "x": 8.5, "y": 1},
+ {"label": "O", "matrix": [1, 9], "x": 9.5, "y": 1},
+ {"label": "P", "matrix": [1, 10], "x": 10.5, "y": 1},
+ {"label": "[", "matrix": [1, 11], "x": 11.5, "y": 1},
+ {"label": "]", "matrix": [1, 12], "x": 12.5, "y": 1},
+ {"label": "|", "matrix": [1, 13], "x": 13.5, "y": 1, "w": 1.5},
+
+ {"label": "Caps", "matrix": [2, 15], "x": 0, "y": 2, "w": 1.75},
+ {"label": "A", "matrix": [2, 1], "x": 1.75, "y": 2},
+ {"label": "S", "matrix": [2, 2], "x": 2.75, "y": 2},
+ {"label": "D", "matrix": [2, 3], "x": 3.75, "y": 2},
+ {"label": "F", "matrix": [2, 4], "x": 4.75, "y": 2},
+ {"label": "G", "matrix": [2, 5], "x": 5.75, "y": 2},
+ {"label": "H", "matrix": [2, 6], "x": 6.75, "y": 2},
+ {"label": "J", "matrix": [2, 7], "x": 7.75, "y": 2},
+ {"label": "K", "matrix": [2, 8], "x": 8.75, "y": 2},
+ {"label": "L", "matrix": [2, 9], "x": 9.75, "y": 2},
+ {"label": ";", "matrix": [2, 10], "x": 10.75, "y": 2},
+ {"label": "'", "matrix": [2, 11], "x": 11.75, "y": 2},
+ {"label": "Enter", "matrix": [2, 13], "x": 12.75, "y": 2, "w": 2.25},
+
+ {"label": "LShift", "matrix": [3, 15], "x": 0, "y": 3, "w": 2.25},
+ {"label": "Z", "matrix": [3, 2], "x": 2.25, "y": 3},
+ {"label": "X", "matrix": [3, 3], "x": 3.25, "y": 3},
+ {"label": "C", "matrix": [3, 4], "x": 4.25, "y": 3},
+ {"label": "V", "matrix": [3, 5], "x": 5.25, "y": 3},
+ {"label": "B", "matrix": [3, 6], "x": 6.25, "y": 3},
+ {"label": "N", "matrix": [3, 7], "x": 7.25, "y": 3},
+ {"label": "M", "matrix": [3, 8], "x": 8.25, "y": 3},
+ {"label": ",", "matrix": [3, 9], "x": 9.25, "y": 3},
+ {"label": ".", "matrix": [3, 10], "x": 10.25, "y": 3},
+ {"label": "/", "matrix": [3, 11], "x": 11.25, "y": 3},
+ {"label": "RShift", "matrix": [3, 12], "x": 12.25, "y": 3, "w": 2.75},
+
+ {"label": "LCtrl", "matrix": [4, 15], "x": 0, "y": 4, "w": 1.5},
+ {"label": "LGui", "matrix": [4, 1], "x": 1.5, "y": 4},
+ {"label": "LAlt", "matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.5},
+ {"label": "Space", "matrix": [4, 6], "x": 4, "y": 4, "w": 7},
+ {"label": "FN", "matrix": [4, 11], "x": 11, "y": 4, "w": 1.5},
+ {"label": "Menu", "matrix": [4, 13], "x": 12.5, "y": 4},
+ {"label": "RCtrl", "matrix": [4, 14], "x": 13.5, "y": 4, "w": 1.5}
+ ]
+ },
+ "LAYOUT_60_tsangan_hhkb": {
+ "layout": [
+ {"label": "Esc", "matrix": [0, 0], "x": 0, "y": 0},
+ {"label": "1", "matrix": [0, 1], "x": 1, "y": 0},
+ {"label": "2", "matrix": [0, 2], "x": 2, "y": 0},
+ {"label": "3", "matrix": [0, 3], "x": 3, "y": 0},
+ {"label": "4", "matrix": [0, 4], "x": 4, "y": 0},
+ {"label": "5", "matrix": [0, 5], "x": 5, "y": 0},
+ {"label": "6", "matrix": [0, 6], "x": 6, "y": 0},
+ {"label": "7", "matrix": [0, 7], "x": 7, "y": 0},
+ {"label": "8", "matrix": [0, 8], "x": 8, "y": 0},
+ {"label": "9", "matrix": [0, 9], "x": 9, "y": 0},
+ {"label": "0", "matrix": [0, 10], "x": 10, "y": 0},
+ {"label": "-", "matrix": [0, 11], "x": 11, "y": 0},
+ {"label": "=", "matrix": [0, 12], "x": 12, "y": 0},
+ {"label": "BS", "matrix": [0, 13], "x": 13, "y": 0},
+ {"label": "~", "matrix": [0, 14], "x": 14, "y": 0},
+
+ {"label": "Tab", "matrix": [1, 0], "x": 0, "y": 1, "w": 1.5},
+ {"label": "Q", "matrix": [1, 1], "x": 1.5, "y": 1},
+ {"label": "W", "matrix": [1, 2], "x": 2.5, "y": 1},
+ {"label": "E", "matrix": [1, 3], "x": 3.5, "y": 1},
+ {"label": "R", "matrix": [1, 4], "x": 4.5, "y": 1},
+ {"label": "T", "matrix": [1, 5], "x": 5.5, "y": 1},
+ {"label": "Y", "matrix": [1, 6], "x": 6.5, "y": 1},
+ {"label": "U", "matrix": [1, 7], "x": 7.5, "y": 1},
+ {"label": "I", "matrix": [1, 8], "x": 8.5, "y": 1},
+ {"label": "O", "matrix": [1, 9], "x": 9.5, "y": 1},
+ {"label": "P", "matrix": [1, 10], "x": 10.5, "y": 1},
+ {"label": "[", "matrix": [1, 11], "x": 11.5, "y": 1},
+ {"label": "]", "matrix": [1, 12], "x": 12.5, "y": 1},
+ {"label": "|", "matrix": [1, 13], "x": 13.5, "y": 1, "w": 1.5},
+
+ {"label": "Caps", "matrix": [2, 15], "x": 0, "y": 2, "w": 1.75},
+ {"label": "A", "matrix": [2, 1], "x": 1.75, "y": 2},
+ {"label": "S", "matrix": [2, 2], "x": 2.75, "y": 2},
+ {"label": "D", "matrix": [2, 3], "x": 3.75, "y": 2},
+ {"label": "F", "matrix": [2, 4], "x": 4.75, "y": 2},
+ {"label": "G", "matrix": [2, 5], "x": 5.75, "y": 2},
+ {"label": "H", "matrix": [2, 6], "x": 6.75, "y": 2},
+ {"label": "J", "matrix": [2, 7], "x": 7.75, "y": 2},
+ {"label": "K", "matrix": [2, 8], "x": 8.75, "y": 2},
+ {"label": "L", "matrix": [2, 9], "x": 9.75, "y": 2},
+ {"label": ";", "matrix": [2, 10], "x": 10.75, "y": 2},
+ {"label": "'", "matrix": [2, 11], "x": 11.75, "y": 2},
+ {"label": "Enter", "matrix": [2, 13], "x": 12.75, "y": 2, "w": 2.25},
+
+ {"label": "LShift", "matrix": [3, 15], "x": 0, "y": 3, "w": 2.25},
+ {"label": "Z", "matrix": [3, 2], "x": 2.25, "y": 3},
+ {"label": "X", "matrix": [3, 3], "x": 3.25, "y": 3},
+ {"label": "C", "matrix": [3, 4], "x": 4.25, "y": 3},
+ {"label": "V", "matrix": [3, 5], "x": 5.25, "y": 3},
+ {"label": "B", "matrix": [3, 6], "x": 6.25, "y": 3},
+ {"label": "N", "matrix": [3, 7], "x": 7.25, "y": 3},
+ {"label": "M", "matrix": [3, 8], "x": 8.25, "y": 3},
+ {"label": ",", "matrix": [3, 9], "x": 9.25, "y": 3},
+ {"label": ".", "matrix": [3, 10], "x": 10.25, "y": 3},
+ {"label": "/", "matrix": [3, 11], "x": 11.25, "y": 3},
+ {"label": "RShift", "matrix": [3, 12], "x": 12.25, "y": 3, "w": 1.75},
+ {"label": "FN", "matrix": [3, 14], "x": 14, "y": 3},
+
+ {"label": "LCtrl", "matrix": [4, 15], "x": 0, "y": 4, "w": 1.5},
+ {"label": "LGui", "matrix": [4, 1], "x": 1.5, "y": 4},
+ {"label": "LAlt", "matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.5},
+ {"label": "Space", "matrix": [4, 6], "x": 4, "y": 4, "w": 7},
+ {"label": "FN", "matrix": [4, 11], "x": 11, "y": 4, "w": 1.5},
+ {"label": "Menu", "matrix": [4, 13], "x": 12.5, "y": 4},
+ {"label": "RCtrl", "matrix": [4, 14], "x": 13.5, "y": 4, "w": 1.5}
+ ]
+ },
+ "LAYOUT_60_hhkb": {
+ "layout": [
+ {"label": "Esc", "matrix": [0, 0], "x": 0, "y": 0},
+ {"label": "1", "matrix": [0, 1], "x": 1, "y": 0},
+ {"label": "2", "matrix": [0, 2], "x": 2, "y": 0},
+ {"label": "3", "matrix": [0, 3], "x": 3, "y": 0},
+ {"label": "4", "matrix": [0, 4], "x": 4, "y": 0},
+ {"label": "5", "matrix": [0, 5], "x": 5, "y": 0},
+ {"label": "6", "matrix": [0, 6], "x": 6, "y": 0},
+ {"label": "7", "matrix": [0, 7], "x": 7, "y": 0},
+ {"label": "8", "matrix": [0, 8], "x": 8, "y": 0},
+ {"label": "9", "matrix": [0, 9], "x": 9, "y": 0},
+ {"label": "0", "matrix": [0, 10], "x": 10, "y": 0},
+ {"label": "-", "matrix": [0, 11], "x": 11, "y": 0},
+ {"label": "=", "matrix": [0, 12], "x": 12, "y": 0},
+ {"label": "BS", "matrix": [0, 13], "x": 13, "y": 0},
+ {"label": "~", "matrix": [0, 14], "x": 14, "y": 0},
+
+ {"label": "Tab", "matrix": [1, 0], "x": 0, "y": 1, "w": 1.5},
+ {"label": "Q", "matrix": [1, 1], "x": 1.5, "y": 1},
+ {"label": "W", "matrix": [1, 2], "x": 2.5, "y": 1},
+ {"label": "E", "matrix": [1, 3], "x": 3.5, "y": 1},
+ {"label": "R", "matrix": [1, 4], "x": 4.5, "y": 1},
+ {"label": "T", "matrix": [1, 5], "x": 5.5, "y": 1},
+ {"label": "Y", "matrix": [1, 6], "x": 6.5, "y": 1},
+ {"label": "U", "matrix": [1, 7], "x": 7.5, "y": 1},
+ {"label": "I", "matrix": [1, 8], "x": 8.5, "y": 1},
+ {"label": "O", "matrix": [1, 9], "x": 9.5, "y": 1},
+ {"label": "P", "matrix": [1, 10], "x": 10.5, "y": 1},
+ {"label": "[", "matrix": [1, 11], "x": 11.5, "y": 1},
+ {"label": "]", "matrix": [1, 12], "x": 12.5, "y": 1},
+ {"label": "|", "matrix": [1, 13], "x": 13.5, "y": 1, "w": 1.5},
+
+ {"label": "Caps", "matrix": [2, 15], "x": 0, "y": 2, "w": 1.75},
+ {"label": "A", "matrix": [2, 1], "x": 1.75, "y": 2},
+ {"label": "S", "matrix": [2, 2], "x": 2.75, "y": 2},
+ {"label": "D", "matrix": [2, 3], "x": 3.75, "y": 2},
+ {"label": "F", "matrix": [2, 4], "x": 4.75, "y": 2},
+ {"label": "G", "matrix": [2, 5], "x": 5.75, "y": 2},
+ {"label": "H", "matrix": [2, 6], "x": 6.75, "y": 2},
+ {"label": "J", "matrix": [2, 7], "x": 7.75, "y": 2},
+ {"label": "K", "matrix": [2, 8], "x": 8.75, "y": 2},
+ {"label": "L", "matrix": [2, 9], "x": 9.75, "y": 2},
+ {"label": ";", "matrix": [2, 10], "x": 10.75, "y": 2},
+ {"label": "'", "matrix": [2, 11], "x": 11.75, "y": 2},
+ {"label": "Enter", "matrix": [2, 13], "x": 12.75, "y": 2, "w": 2.25},
+
+ {"label": "LShift", "matrix": [3, 15], "x": 0, "y": 3, "w": 2.25},
+ {"label": "Z", "matrix": [3, 2], "x": 2.25, "y": 3},
+ {"label": "X", "matrix": [3, 3], "x": 3.25, "y": 3},
+ {"label": "C", "matrix": [3, 4], "x": 4.25, "y": 3},
+ {"label": "V", "matrix": [3, 5], "x": 5.25, "y": 3},
+ {"label": "B", "matrix": [3, 6], "x": 6.25, "y": 3},
+ {"label": "N", "matrix": [3, 7], "x": 7.25, "y": 3},
+ {"label": "M", "matrix": [3, 8], "x": 8.25, "y": 3},
+ {"label": ",", "matrix": [3, 9], "x": 9.25, "y": 3},
+ {"label": ".", "matrix": [3, 10], "x": 10.25, "y": 3},
+ {"label": "/", "matrix": [3, 11], "x": 11.25, "y": 3},
+ {"label": "RShift", "matrix": [3, 12], "x": 12.25, "y": 3, "w": 1.75},
+ {"label": "FN", "matrix": [3, 14], "x": 14, "y": 3},
+
+ {"label": "LGui", "matrix": [4, 1], "x": 1.5, "y": 4},
+ {"label": "LAlt", "matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.5},
+ {"label": "Space", "matrix": [4, 6], "x": 4, "y": 4, "w": 7},
+ {"label": "FN", "matrix": [4, 11], "x": 11, "y": 4, "w": 1.5},
+ {"label": "Menu", "matrix": [4, 13], "x": 12.5, "y": 4}
+ ]
+ },
+ "LAYOUT_60_ansi_arrow": {
+ "layout": [
+ {"label": "Esc", "matrix": [0, 0], "x": 0, "y": 0},
+ {"label": "1", "matrix": [0, 1], "x": 1, "y": 0},
+ {"label": "2", "matrix": [0, 2], "x": 2, "y": 0},
+ {"label": "3", "matrix": [0, 3], "x": 3, "y": 0},
+ {"label": "4", "matrix": [0, 4], "x": 4, "y": 0},
+ {"label": "5", "matrix": [0, 5], "x": 5, "y": 0},
+ {"label": "6", "matrix": [0, 6], "x": 6, "y": 0},
+ {"label": "7", "matrix": [0, 7], "x": 7, "y": 0},
+ {"label": "8", "matrix": [0, 8], "x": 8, "y": 0},
+ {"label": "9", "matrix": [0, 9], "x": 9, "y": 0},
+ {"label": "0", "matrix": [0, 10], "x": 10, "y": 0},
+ {"label": "-", "matrix": [0, 11], "x": 11, "y": 0},
+ {"label": "=", "matrix": [0, 12], "x": 12, "y": 0},
+ {"label": "Backspace", "matrix": [0, 13], "x": 13, "y": 0, "w": 2},
+
+ {"label": "Tab", "matrix": [1, 0], "w": 1.5, "x": 0, "y": 1},
+ {"label": "Q", "matrix": [1, 1], "x": 1.5, "y": 1},
+ {"label": "W", "matrix": [1, 2], "x": 2.5, "y": 1},
+ {"label": "E", "matrix": [1, 3], "x": 3.5, "y": 1},
+ {"label": "R", "matrix": [1, 4], "x": 4.5, "y": 1},
+ {"label": "T", "matrix": [1, 5], "x": 5.5, "y": 1},
+ {"label": "Y", "matrix": [1, 6], "x": 6.5, "y": 1},
+ {"label": "U", "matrix": [1, 7], "x": 7.5, "y": 1},
+ {"label": "I", "matrix": [1, 8], "x": 8.5, "y": 1},
+ {"label": "O", "matrix": [1, 9], "x": 9.5, "y": 1},
+ {"label": "P", "matrix": [1, 10], "x": 10.5, "y": 1},
+ {"label": "[", "matrix": [1, 11], "x": 11.5, "y": 1},
+ {"label": "]", "matrix": [1, 12], "x": 12.5, "y": 1},
+ {"label": "|", "matrix": [1, 13], "w": 1.5, "x": 13.5, "y": 1},
+
+ {"label": "Caps", "matrix": [2, 15], "w": 1.75, "x": 0, "y": 2},
+ {"label": "A", "matrix": [2, 1], "x": 1.75, "y": 2},
+ {"label": "S", "matrix": [2, 2], "x": 2.75, "y": 2},
+ {"label": "D", "matrix": [2, 3], "x": 3.75, "y": 2},
+ {"label": "F", "matrix": [2, 4], "x": 4.75, "y": 2},
+ {"label": "G", "matrix": [2, 5], "x": 5.75, "y": 2},
+ {"label": "H", "matrix": [2, 6], "x": 6.75, "y": 2},
+ {"label": "J", "matrix": [2, 7], "x": 7.75, "y": 2},
+ {"label": "K", "matrix": [2, 8], "x": 8.75, "y": 2},
+ {"label": "L", "matrix": [2, 9], "x": 9.75, "y": 2},
+ {"label": ";", "matrix": [2, 10], "x": 10.75, "y": 2},
+ {"label": "'", "matrix": [2, 11], "x": 11.75, "y": 2},
+ {"label": "Enter", "matrix": [2, 13], "x": 12.75, "y": 2, "w": 2.25},
+
+ {"label": "LShift", "matrix": [3, 15], "x": 0, "y": 3, "w": 2.25},
+ {"label": "Z", "matrix": [3, 2], "x": 2.25, "y": 3},
+ {"label": "X", "matrix": [3, 3], "x": 3.25, "y": 3},
+ {"label": "C", "matrix": [3, 4], "x": 4.25, "y": 3},
+ {"label": "V", "matrix": [3, 5], "x": 5.25, "y": 3},
+ {"label": "B", "matrix": [3, 6], "x": 6.25, "y": 3},
+ {"label": "N", "matrix": [3, 7], "x": 7.25, "y": 3},
+ {"label": "M", "matrix": [3, 8], "x": 8.25, "y": 3},
+ {"label": ",", "matrix": [3, 9], "x": 9.25, "y": 3},
+ {"label": ".", "matrix": [3, 10], "x": 10.25, "y": 3},
+ {"label": "/", "matrix": [3, 11], "x": 11.25, "y": 3, "w": 1.75},
+ {"label": "RShift", "matrix": [3, 12], "x": 13, "y": 3},
+ {"label": "FN", "matrix": [3, 14], "x": 14, "y": 3},
+
+ {"label": "LCtrl", "matrix": [4, 15], "x": 0, "y": 4, "w": 1.25},
+ {"label": "LGui", "matrix": [4, 1], "x": 1.25, "y": 4, "w": 1.25},
+ {"label": "LAlt", "matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.25},
+ {"label": "Space", "matrix": [4, 6], "x": 3.75, "y": 4, "w": 6.25},
+ {"label": "RAlt", "matrix": [4, 10], "x": 10, "y": 4},
+ {"label": "FN", "matrix": [4, 11], "x": 11, "y": 4},
+ {"label": "Mid1U", "matrix": [4, 12], "x": 12, "y": 4},
+ {"label": "Menu", "matrix": [4, 13], "x": 13, "y": 4},
+ {"label": "RCtrl", "matrix": [4, 14], "x": 14, "y": 4}
+ ]
+ },
+ "LAYOUT_60_iso": {
+ "layout": [
+ {"label": "Esc", "matrix": [0, 0], "x": 0, "y": 0},
+ {"label": "1", "matrix": [0, 1], "x": 1, "y": 0},
+ {"label": "2", "matrix": [0, 2], "x": 2, "y": 0},
+ {"label": "3", "matrix": [0, 3], "x": 3, "y": 0},
+ {"label": "4", "matrix": [0, 4], "x": 4, "y": 0},
+ {"label": "5", "matrix": [0, 5], "x": 5, "y": 0},
+ {"label": "6", "matrix": [0, 6], "x": 6, "y": 0},
+ {"label": "7", "matrix": [0, 7], "x": 7, "y": 0},
+ {"label": "8", "matrix": [0, 8], "x": 8, "y": 0},
+ {"label": "9", "matrix": [0, 9], "x": 9, "y": 0},
+ {"label": "0", "matrix": [0, 10], "x": 10, "y": 0},
+ {"label": "-", "matrix": [0, 11], "x": 11, "y": 0},
+ {"label": "=", "matrix": [0, 12], "x": 12, "y": 0},
+ {"label": "Backspace", "matrix": [0, 13], "x": 13, "y": 0, "w": 2},
+
+ {"label": "Tab", "matrix": [1, 0], "x": 0, "y": 1, "w": 1.5},
+ {"label": "Q", "matrix": [1, 1], "x": 1.5, "y": 1},
+ {"label": "W", "matrix": [1, 2], "x": 2.5, "y": 1},
+ {"label": "E", "matrix": [1, 3], "x": 3.5, "y": 1},
+ {"label": "R", "matrix": [1, 4], "x": 4.5, "y": 1},
+ {"label": "T", "matrix": [1, 5], "x": 5.5, "y": 1},
+ {"label": "Y", "matrix": [1, 6], "x": 6.5, "y": 1},
+ {"label": "U", "matrix": [1, 7], "x": 7.5, "y": 1},
+ {"label": "I", "matrix": [1, 8], "x": 8.5, "y": 1},
+ {"label": "O", "matrix": [1, 9], "x": 9.5, "y": 1},
+ {"label": "P", "matrix": [1, 10], "x": 10.5, "y": 1},
+ {"label": "[", "matrix": [1, 11], "x": 11.5, "y": 1},
+ {"label": "]", "matrix": [1, 12], "x": 12.5, "y": 1},
+
+ {"label": "Caps", "matrix": [2, 15], "x": 0, "y": 2, "w": 1.75},
+ {"label": "A", "matrix": [2, 1], "x": 1.75, "y": 2},
+ {"label": "S", "matrix": [2, 2], "x": 2.75, "y": 2},
+ {"label": "D", "matrix": [2, 3], "x": 3.75, "y": 2},
+ {"label": "F", "matrix": [2, 4], "x": 4.75, "y": 2},
+ {"label": "G", "matrix": [2, 5], "x": 5.75, "y": 2},
+ {"label": "H", "matrix": [2, 6], "x": 6.75, "y": 2},
+ {"label": "J", "matrix": [2, 7], "x": 7.75, "y": 2},
+ {"label": "K", "matrix": [2, 8], "x": 8.75, "y": 2},
+ {"label": "L", "matrix": [2, 9], "x": 9.75, "y": 2},
+ {"label": ";", "matrix": [2, 10], "x": 10.75, "y": 2},
+ {"label": "'", "matrix": [2, 11], "x": 11.75, "y": 2},
+ {"label": "ISO'", "matrix": [2, 12], "x": 12.75, "y": 2},
+ {"label": "Enter", "matrix": [2, 13], "x": 13.75, "y": 1, "w": 1.25, "h": 2},
+
+ {"label": "LShift", "matrix": [3, 15], "x": 0, "y": 3, "w": 1.25},
+ {"label": "ISO<>", "matrix": [3, 1], "x": 1.25, "y": 3},
+ {"label": "Z", "matrix": [3, 2], "x": 2.25, "y": 3},
+ {"label": "X", "matrix": [3, 3], "x": 3.25, "y": 3},
+ {"label": "C", "matrix": [3, 4], "x": 4.25, "y": 3},
+ {"label": "V", "matrix": [3, 5], "x": 5.25, "y": 3},
+ {"label": "B", "matrix": [3, 6], "x": 6.25, "y": 3},
+ {"label": "N", "matrix": [3, 7], "x": 7.25, "y": 3},
+ {"label": "M", "matrix": [3, 8], "x": 8.25, "y": 3},
+ {"label": ",", "matrix": [3, 9], "x": 9.25, "y": 3},
+ {"label": ".", "matrix": [3, 10], "x": 10.25, "y": 3},
+ {"label": "/", "matrix": [3, 11], "x": 11.25, "y": 3},
+ {"label": "RShift", "matrix": [3, 12], "x": 12.25, "y": 3, "w": 2.75},
+
+ {"label": "LCtrl", "matrix": [4, 15], "x": 0, "y": 4, "w": 1.25},
+ {"label": "LGui", "matrix": [4, 1], "x": 1.25, "y": 4, "w": 1.25},
+ {"label": "LAlt", "matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.25},
+ {"label": "Space", "matrix": [4, 6], "x": 3.75, "y": 4, "w": 6.25},
+ {"label": "RAlt", "matrix": [4, 10], "x": 10, "y": 4, "w": 1.25},
+ {"label": "FN", "matrix": [4, 11], "x": 11.25, "y": 4, "w": 1.25},
+ {"label": "Menu", "matrix": [4, 13], "x": 12.5, "y": 4, "w": 1.25},
+ {"label": "RCtrl", "matrix": [4, 14], "x": 13.75, "y": 4, "w": 1.25}
+ ]
+ },
+ "LAYOUT_60_iso_split_bs_rshift": {
+ "layout": [
+ {"label": "Esc", "matrix": [0, 0], "x": 0, "y": 0},
+ {"label": "1", "matrix": [0, 1], "x": 1, "y": 0},
+ {"label": "2", "matrix": [0, 2], "x": 2, "y": 0},
+ {"label": "3", "matrix": [0, 3], "x": 3, "y": 0},
+ {"label": "4", "matrix": [0, 4], "x": 4, "y": 0},
+ {"label": "5", "matrix": [0, 5], "x": 5, "y": 0},
+ {"label": "6", "matrix": [0, 6], "x": 6, "y": 0},
+ {"label": "7", "matrix": [0, 7], "x": 7, "y": 0},
+ {"label": "8", "matrix": [0, 8], "x": 8, "y": 0},
+ {"label": "9", "matrix": [0, 9], "x": 9, "y": 0},
+ {"label": "0", "matrix": [0, 10], "x": 10, "y": 0},
+ {"label": "-", "matrix": [0, 11], "x": 11, "y": 0},
+ {"label": "=", "matrix": [0, 12], "x": 12, "y": 0},
+ {"label": "BS", "matrix": [0, 13], "x": 13, "y": 0},
+ {"label": "~", "matrix": [0, 14], "x": 14, "y": 0},
+
+ {"label": "Tab", "matrix": [1, 0], "x": 0, "y": 1, "w": 1.5},
+ {"label": "Q", "matrix": [1, 1], "x": 1.5, "y": 1},
+ {"label": "W", "matrix": [1, 2], "x": 2.5, "y": 1},
+ {"label": "E", "matrix": [1, 3], "x": 3.5, "y": 1},
+ {"label": "R", "matrix": [1, 4], "x": 4.5, "y": 1},
+ {"label": "T", "matrix": [1, 5], "x": 5.5, "y": 1},
+ {"label": "Y", "matrix": [1, 6], "x": 6.5, "y": 1},
+ {"label": "U", "matrix": [1, 7], "x": 7.5, "y": 1},
+ {"label": "I", "matrix": [1, 8], "x": 8.5, "y": 1},
+ {"label": "O", "matrix": [1, 9], "x": 9.5, "y": 1},
+ {"label": "P", "matrix": [1, 10], "x": 10.5, "y": 1},
+ {"label": "[", "matrix": [1, 11], "x": 11.5, "y": 1},
+ {"label": "]", "matrix": [1, 12], "x": 12.5, "y": 1},
+
+ {"label": "Caps", "matrix": [2, 15], "x": 0, "y": 2, "w": 1.75},
+ {"label": "A", "matrix": [2, 1], "x": 1.75, "y": 2},
+ {"label": "S", "matrix": [2, 2], "x": 2.75, "y": 2},
+ {"label": "D", "matrix": [2, 3], "x": 3.75, "y": 2},
+ {"label": "F", "matrix": [2, 4], "x": 4.75, "y": 2},
+ {"label": "G", "matrix": [2, 5], "x": 5.75, "y": 2},
+ {"label": "H", "matrix": [2, 6], "x": 6.75, "y": 2},
+ {"label": "J", "matrix": [2, 7], "x": 7.75, "y": 2},
+ {"label": "K", "matrix": [2, 8], "x": 8.75, "y": 2},
+ {"label": "L", "matrix": [2, 9], "x": 9.75, "y": 2},
+ {"label": ";", "matrix": [2, 10], "x": 10.75, "y": 2},
+ {"label": "'", "matrix": [2, 11], "x": 11.75, "y": 2},
+ {"label": "ISO'", "matrix": [2, 12], "x": 12.75, "y": 2},
+ {"label": "Enter", "matrix": [2, 13], "x": 13.75, "y": 1, "w": 1.25, "h": 2},
+
+ {"label": "LShift", "matrix": [3, 15], "x": 0, "y": 3, "w": 1.25},
+ {"label": "ISO<>", "matrix": [3, 1], "x": 1.25, "y": 3},
+ {"label": "Z", "matrix": [3, 2], "x": 2.25, "y": 3},
+ {"label": "X", "matrix": [3, 3], "x": 3.25, "y": 3},
+ {"label": "C", "matrix": [3, 4], "x": 4.25, "y": 3},
+ {"label": "V", "matrix": [3, 5], "x": 5.25, "y": 3},
+ {"label": "B", "matrix": [3, 6], "x": 6.25, "y": 3},
+ {"label": "N", "matrix": [3, 7], "x": 7.25, "y": 3},
+ {"label": "M", "matrix": [3, 8], "x": 8.25, "y": 3},
+ {"label": ",", "matrix": [3, 9], "x": 9.25, "y": 3},
+ {"label": ".", "matrix": [3, 10], "x": 10.25, "y": 3},
+ {"label": "/", "matrix": [3, 11], "x": 11.25, "y": 3},
+ {"label": "RShift", "matrix": [3, 12], "x": 12.25, "y": 3, "w": 1.75},
+ {"label": "FN", "matrix": [3, 14], "x": 14, "y": 3},
+
+ {"label": "LCtrl", "matrix": [4, 15], "x": 0, "y": 4, "w": 1.25},
+ {"label": "LGui", "matrix": [4, 1], "x": 1.25, "y": 4, "w": 1.25},
+ {"label": "LAlt", "matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.25},
+ {"label": "Space", "matrix": [4, 6], "x": 3.75, "y": 4, "w": 6.25},
+ {"label": "RAlt", "matrix": [4, 10], "x": 10, "y": 4, "w": 1.25},
+ {"label": "FN", "matrix": [4, 11], "x": 11.25, "y": 4, "w": 1.25},
+ {"label": "Menu", "matrix": [4, 13], "x": 12.5, "y": 4, "w": 1.25},
+ {"label": "RCtrl", "matrix": [4, 14], "x": 13.75, "y": 4, "w": 1.25}
+ ]
+ },
+ "LAYOUT_60_iso_tsangan": {
+ "layout": [
+ {"label": "Esc", "matrix": [0, 0], "x": 0, "y": 0},
+ {"label": "1", "matrix": [0, 1], "x": 1, "y": 0},
+ {"label": "2", "matrix": [0, 2], "x": 2, "y": 0},
+ {"label": "3", "matrix": [0, 3], "x": 3, "y": 0},
+ {"label": "4", "matrix": [0, 4], "x": 4, "y": 0},
+ {"label": "5", "matrix": [0, 5], "x": 5, "y": 0},
+ {"label": "6", "matrix": [0, 6], "x": 6, "y": 0},
+ {"label": "7", "matrix": [0, 7], "x": 7, "y": 0},
+ {"label": "8", "matrix": [0, 8], "x": 8, "y": 0},
+ {"label": "9", "matrix": [0, 9], "x": 9, "y": 0},
+ {"label": "0", "matrix": [0, 10], "x": 10, "y": 0},
+ {"label": "-", "matrix": [0, 11], "x": 11, "y": 0},
+ {"label": "=", "matrix": [0, 12], "x": 12, "y": 0},
+ {"label": "Backspace", "matrix": [0, 13], "x": 13, "y": 0, "w": 2},
+
+ {"label": "Tab", "matrix": [1, 0], "x": 0, "y": 1, "w": 1.5},
+ {"label": "Q", "matrix": [1, 1], "x": 1.5, "y": 1},
+ {"label": "W", "matrix": [1, 2], "x": 2.5, "y": 1},
+ {"label": "E", "matrix": [1, 3], "x": 3.5, "y": 1},
+ {"label": "R", "matrix": [1, 4], "x": 4.5, "y": 1},
+ {"label": "T", "matrix": [1, 5], "x": 5.5, "y": 1},
+ {"label": "Y", "matrix": [1, 6], "x": 6.5, "y": 1},
+ {"label": "U", "matrix": [1, 7], "x": 7.5, "y": 1},
+ {"label": "I", "matrix": [1, 8], "x": 8.5, "y": 1},
+ {"label": "O", "matrix": [1, 9], "x": 9.5, "y": 1},
+ {"label": "P", "matrix": [1, 10], "x": 10.5, "y": 1},
+ {"label": "[", "matrix": [1, 11], "x": 11.5, "y": 1},
+ {"label": "]", "matrix": [1, 12], "x": 12.5, "y": 1},
+
+ {"label": "Caps", "matrix": [2, 15], "x": 0, "y": 2, "w": 1.75},
+ {"label": "A", "matrix": [2, 1], "x": 1.75, "y": 2},
+ {"label": "S", "matrix": [2, 2], "x": 2.75, "y": 2},
+ {"label": "D", "matrix": [2, 3], "x": 3.75, "y": 2},
+ {"label": "F", "matrix": [2, 4], "x": 4.75, "y": 2},
+ {"label": "G", "matrix": [2, 5], "x": 5.75, "y": 2},
+ {"label": "H", "matrix": [2, 6], "x": 6.75, "y": 2},
+ {"label": "J", "matrix": [2, 7], "x": 7.75, "y": 2},
+ {"label": "K", "matrix": [2, 8], "x": 8.75, "y": 2},
+ {"label": "L", "matrix": [2, 9], "x": 9.75, "y": 2},
+ {"label": ";", "matrix": [2, 10], "x": 10.75, "y": 2},
+ {"label": "'", "matrix": [2, 11], "x": 11.75, "y": 2},
+ {"label": "ISO'", "matrix": [2, 12], "x": 12.75, "y": 2},
+ {"label": "Enter", "matrix": [2, 13], "x": 13.75, "y": 1, "w": 1.25, "h": 2},
+
+ {"label": "LShift", "matrix": [3, 15], "x": 0, "y": 3, "w": 1.25},
+ {"label": "ISO<>", "matrix": [3, 1], "x": 1.25, "y": 3},
+ {"label": "Z", "matrix": [3, 2], "x": 2.25, "y": 3},
+ {"label": "X", "matrix": [3, 3], "x": 3.25, "y": 3},
+ {"label": "C", "matrix": [3, 4], "x": 4.25, "y": 3},
+ {"label": "V", "matrix": [3, 5], "x": 5.25, "y": 3},
+ {"label": "B", "matrix": [3, 6], "x": 6.25, "y": 3},
+ {"label": "N", "matrix": [3, 7], "x": 7.25, "y": 3},
+ {"label": "M", "matrix": [3, 8], "x": 8.25, "y": 3},
+ {"label": ",", "matrix": [3, 9], "x": 9.25, "y": 3},
+ {"label": ".", "matrix": [3, 10], "x": 10.25, "y": 3},
+ {"label": "/", "matrix": [3, 11], "x": 11.25, "y": 3},
+ {"label": "RShift", "matrix": [3, 12], "x": 12.25, "y": 3, "w": 2.75},
+
+ {"label": "LCtrl", "matrix": [4, 15], "x": 0, "y": 4, "w": 1.5},
+ {"label": "LGui", "matrix": [4, 1], "x": 1.5, "y": 4},
+ {"label": "LAlt", "matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.5},
+ {"label": "Space", "matrix": [4, 6], "x": 4, "y": 4, "w": 7},
+ {"label": "FN", "matrix": [4, 11], "x": 11, "y": 4, "w": 1.5},
+ {"label": "Menu", "matrix": [4, 13], "x": 12.5, "y": 4},
+ {"label": "RCtrl", "matrix": [4, 14], "x": 13.5, "y": 4, "w": 1.5}
+ ]
+ },
+ "LAYOUT_60_iso_tsangan_split_bs_rshift": {
+ "layout": [
+ {"label": "Esc", "matrix": [0, 0], "x": 0, "y": 0},
+ {"label": "1", "matrix": [0, 1], "x": 1, "y": 0},
+ {"label": "2", "matrix": [0, 2], "x": 2, "y": 0},
+ {"label": "3", "matrix": [0, 3], "x": 3, "y": 0},
+ {"label": "4", "matrix": [0, 4], "x": 4, "y": 0},
+ {"label": "5", "matrix": [0, 5], "x": 5, "y": 0},
+ {"label": "6", "matrix": [0, 6], "x": 6, "y": 0},
+ {"label": "7", "matrix": [0, 7], "x": 7, "y": 0},
+ {"label": "8", "matrix": [0, 8], "x": 8, "y": 0},
+ {"label": "9", "matrix": [0, 9], "x": 9, "y": 0},
+ {"label": "0", "matrix": [0, 10], "x": 10, "y": 0},
+ {"label": "-", "matrix": [0, 11], "x": 11, "y": 0},
+ {"label": "=", "matrix": [0, 12], "x": 12, "y": 0},
+ {"label": "BS", "matrix": [0, 13], "x": 13, "y": 0},
+ {"label": "~", "matrix": [0, 14], "x": 14, "y": 0},
+
+ {"label": "Tab", "matrix": [1, 0], "x": 0, "y": 1, "w": 1.5},
+ {"label": "Q", "matrix": [1, 1], "x": 1.5, "y": 1},
+ {"label": "W", "matrix": [1, 2], "x": 2.5, "y": 1},
+ {"label": "E", "matrix": [1, 3], "x": 3.5, "y": 1},
+ {"label": "R", "matrix": [1, 4], "x": 4.5, "y": 1},
+ {"label": "T", "matrix": [1, 5], "x": 5.5, "y": 1},
+ {"label": "Y", "matrix": [1, 6], "x": 6.5, "y": 1},
+ {"label": "U", "matrix": [1, 7], "x": 7.5, "y": 1},
+ {"label": "I", "matrix": [1, 8], "x": 8.5, "y": 1},
+ {"label": "O", "matrix": [1, 9], "x": 9.5, "y": 1},
+ {"label": "P", "matrix": [1, 10], "x": 10.5, "y": 1},
+ {"label": "[", "matrix": [1, 11], "x": 11.5, "y": 1},
+ {"label": "]", "matrix": [1, 12], "x": 12.5, "y": 1},
+
+ {"label": "Caps", "matrix": [2, 15], "x": 0, "y": 2, "w": 1.75},
+ {"label": "A", "matrix": [2, 1], "x": 1.75, "y": 2},
+ {"label": "S", "matrix": [2, 2], "x": 2.75, "y": 2},
+ {"label": "D", "matrix": [2, 3], "x": 3.75, "y": 2},
+ {"label": "F", "matrix": [2, 4], "x": 4.75, "y": 2},
+ {"label": "G", "matrix": [2, 5], "x": 5.75, "y": 2},
+ {"label": "H", "matrix": [2, 6], "x": 6.75, "y": 2},
+ {"label": "J", "matrix": [2, 7], "x": 7.75, "y": 2},
+ {"label": "K", "matrix": [2, 8], "x": 8.75, "y": 2},
+ {"label": "L", "matrix": [2, 9], "x": 9.75, "y": 2},
+ {"label": ";", "matrix": [2, 10], "x": 10.75, "y": 2},
+ {"label": "'", "matrix": [2, 11], "x": 11.75, "y": 2},
+ {"label": "ISO'", "matrix": [2, 12], "x": 12.75, "y": 2},
+ {"label": "Enter", "matrix": [2, 13], "x": 13.75, "y": 1, "w": 1.25, "h": 2},
+
+ {"label": "LShift", "matrix": [3, 15], "x": 0, "y": 3, "w": 1.25},
+ {"label": "ISO<>", "matrix": [3, 1], "x": 1.25, "y": 3},
+ {"label": "Z", "matrix": [3, 2], "x": 2.25, "y": 3},
+ {"label": "X", "matrix": [3, 3], "x": 3.25, "y": 3},
+ {"label": "C", "matrix": [3, 4], "x": 4.25, "y": 3},
+ {"label": "V", "matrix": [3, 5], "x": 5.25, "y": 3},
+ {"label": "B", "matrix": [3, 6], "x": 6.25, "y": 3},
+ {"label": "N", "matrix": [3, 7], "x": 7.25, "y": 3},
+ {"label": "M", "matrix": [3, 8], "x": 8.25, "y": 3},
+ {"label": ",", "matrix": [3, 9], "x": 9.25, "y": 3},
+ {"label": ".", "matrix": [3, 10], "x": 10.25, "y": 3},
+ {"label": "/", "matrix": [3, 11], "x": 11.25, "y": 3},
+ {"label": "RShift", "matrix": [3, 12], "x": 12.25, "y": 3, "w": 1.75},
+ {"label": "FN", "matrix": [3, 14], "x": 14, "y": 3},
+
+ {"label": "LCtrl", "matrix": [4, 15], "x": 0, "y": 4, "w": 1.5},
+ {"label": "LGui", "matrix": [4, 1], "x": 1.5, "y": 4},
+ {"label": "LAlt", "matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.5},
+ {"label": "Space", "matrix": [4, 6], "x": 4, "y": 4, "w": 7},
+ {"label": "FN", "matrix": [4, 11], "x": 11, "y": 4, "w": 1.5},
+ {"label": "Menu", "matrix": [4, 13], "x": 12.5, "y": 4},
+ {"label": "RCtrl", "matrix": [4, 14], "x": 13.5, "y": 4, "w": 1.5}
+ ]
+ },
+ "LAYOUT_60_iso_arrow": {
+ "layout": [
+ {"label": "Esc", "matrix": [0, 0], "x": 0, "y": 0},
+ {"label": "1", "matrix": [0, 1], "x": 1, "y": 0},
+ {"label": "2", "matrix": [0, 2], "x": 2, "y": 0},
+ {"label": "3", "matrix": [0, 3], "x": 3, "y": 0},
+ {"label": "4", "matrix": [0, 4], "x": 4, "y": 0},
+ {"label": "5", "matrix": [0, 5], "x": 5, "y": 0},
+ {"label": "6", "matrix": [0, 6], "x": 6, "y": 0},
+ {"label": "7", "matrix": [0, 7], "x": 7, "y": 0},
+ {"label": "8", "matrix": [0, 8], "x": 8, "y": 0},
+ {"label": "9", "matrix": [0, 9], "x": 9, "y": 0},
+ {"label": "0", "matrix": [0, 10], "x": 10, "y": 0},
+ {"label": "-", "matrix": [0, 11], "x": 11, "y": 0},
+ {"label": "=", "matrix": [0, 12], "x": 12, "y": 0},
+ {"label": "Backspace", "matrix": [0, 13], "x": 13, "y": 0, "w": 2},
+
+ {"label": "Tab", "matrix": [1, 0], "w": 1.5, "x": 0, "y": 1},
+ {"label": "Q", "matrix": [1, 1], "x": 1.5, "y": 1},
+ {"label": "W", "matrix": [1, 2], "x": 2.5, "y": 1},
+ {"label": "E", "matrix": [1, 3], "x": 3.5, "y": 1},
+ {"label": "R", "matrix": [1, 4], "x": 4.5, "y": 1},
+ {"label": "T", "matrix": [1, 5], "x": 5.5, "y": 1},
+ {"label": "Y", "matrix": [1, 6], "x": 6.5, "y": 1},
+ {"label": "U", "matrix": [1, 7], "x": 7.5, "y": 1},
+ {"label": "I", "matrix": [1, 8], "x": 8.5, "y": 1},
+ {"label": "O", "matrix": [1, 9], "x": 9.5, "y": 1},
+ {"label": "P", "matrix": [1, 10], "x": 10.5, "y": 1},
+ {"label": "[", "matrix": [1, 11], "x": 11.5, "y": 1},
+ {"label": "]", "matrix": [1, 12], "x": 12.5, "y": 1},
+
+ {"label": "Caps", "matrix": [2, 15], "w": 1.75, "x": 0, "y": 2},
+ {"label": "A", "matrix": [2, 1], "x": 1.75, "y": 2},
+ {"label": "S", "matrix": [2, 2], "x": 2.75, "y": 2},
+ {"label": "D", "matrix": [2, 3], "x": 3.75, "y": 2},
+ {"label": "F", "matrix": [2, 4], "x": 4.75, "y": 2},
+ {"label": "G", "matrix": [2, 5], "x": 5.75, "y": 2},
+ {"label": "H", "matrix": [2, 6], "x": 6.75, "y": 2},
+ {"label": "J", "matrix": [2, 7], "x": 7.75, "y": 2},
+ {"label": "K", "matrix": [2, 8], "x": 8.75, "y": 2},
+ {"label": "L", "matrix": [2, 9], "x": 9.75, "y": 2},
+ {"label": ";", "matrix": [2, 10], "x": 10.75, "y": 2},
+ {"label": "'", "matrix": [2, 11], "x": 11.75, "y": 2},
+ {"label": "ISO'", "matrix": [2, 12], "x": 12.75, "y": 2},
+ {"label": "Enter", "matrix": [2, 13], "x": 13.75, "y": 1, "w": 1.25, "h": 2},
+
+ {"label": "LShift", "matrix": [3, 15], "x": 0, "y": 3, "w": 1.25},
+ {"label": "ISO<>", "matrix": [3, 1], "x": 1.25, "y": 3},
+ {"label": "Z", "matrix": [3, 2], "x": 2.25, "y": 3},
+ {"label": "X", "matrix": [3, 3], "x": 3.25, "y": 3},
+ {"label": "C", "matrix": [3, 4], "x": 4.25, "y": 3},
+ {"label": "V", "matrix": [3, 5], "x": 5.25, "y": 3},
+ {"label": "B", "matrix": [3, 6], "x": 6.25, "y": 3},
+ {"label": "N", "matrix": [3, 7], "x": 7.25, "y": 3},
+ {"label": "M", "matrix": [3, 8], "x": 8.25, "y": 3},
+ {"label": ",", "matrix": [3, 9], "x": 9.25, "y": 3},
+ {"label": ".", "matrix": [3, 10], "x": 10.25, "y": 3},
+ {"label": "/", "matrix": [3, 11], "x": 11.25, "y": 3, "w": 1.75},
+ {"label": "RShift", "matrix": [3, 12], "x": 13, "y": 3},
+ {"label": "FN", "matrix": [3, 14], "x": 14, "y": 3},
+
+ {"label": "LCtrl", "matrix": [4, 15], "x": 0, "y": 4, "w": 1.25},
+ {"label": "LGui", "matrix": [4, 1], "x": 1.25, "y": 4, "w": 1.25},
+ {"label": "LAlt", "matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.25},
+ {"label": "Space", "matrix": [4, 6], "x": 3.75, "y": 4, "w": 6.25},
+ {"label": "RAlt", "matrix": [4, 10], "x": 10, "y": 4},
+ {"label": "FN", "matrix": [4, 11], "x": 11, "y": 4},
+ {"label": "Mid1U", "matrix": [4, 12], "x": 12, "y": 4},
+ {"label": "Menu", "matrix": [4, 13], "x": 13, "y": 4},
+ {"label": "RCtrl", "matrix": [4, 14], "x": 14, "y": 4}
+ ]
}
}
}
diff --git a/keyboards/1upkeyboards/pi60/keymaps/default/keymap.c b/keyboards/1upkeyboards/pi60/keymaps/default/keymap.c
index acf9ce1adb..8a83e83b52 100644
--- a/keyboards/1upkeyboards/pi60/keymaps/default/keymap.c
+++ b/keyboards/1upkeyboards/pi60/keymaps/default/keymap.c
@@ -18,7 +18,7 @@
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [0] = LAYOUT_60_ansi(
+ [0] = LAYOUT_all(
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_GRV,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_TRNS, KC_ENT,
@@ -26,7 +26,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(1), KC_TRNS, KC_APP, KC_RCTL
),
- [1] = LAYOUT_60_ansi(
+ [1] = LAYOUT_all(
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_TRNS,
KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SCRL, KC_PAUS, KC_TRNS,
KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_HOME, KC_PGUP, KC_TRNS, KC_TRNS,
@@ -34,7 +34,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
),
- [2] = LAYOUT_60_ansi(
+ [2] = LAYOUT_all(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_SPI, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
@@ -42,7 +42,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
),
- [3] = LAYOUT_60_ansi(
+ [3] = LAYOUT_all(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
diff --git a/keyboards/1upkeyboards/pi60/keymaps/via/keymap.c b/keyboards/1upkeyboards/pi60/keymaps/via/keymap.c
index 80f9d3a9f6..e9af7a7138 100644
--- a/keyboards/1upkeyboards/pi60/keymaps/via/keymap.c
+++ b/keyboards/1upkeyboards/pi60/keymaps/via/keymap.c
@@ -18,7 +18,7 @@
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [0] = LAYOUT_60_ansi(
+ [0] = LAYOUT_all(
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_GRV,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_TRNS, KC_ENT,
@@ -26,7 +26,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(1), KC_TRNS, KC_APP, KC_RCTL
),
- [1] = LAYOUT_60_ansi(
+ [1] = LAYOUT_all(
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_TRNS,
KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SCRL, KC_PAUS, KC_TRNS,
KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_HOME, KC_PGUP, KC_TRNS, KC_TRNS,
@@ -34,7 +34,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
),
- [2] = LAYOUT_60_ansi(
+ [2] = LAYOUT_all(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_SPI, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
@@ -42,7 +42,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
),
- [3] = LAYOUT_60_ansi(
+ [3] = LAYOUT_all(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
@@ -50,7 +50,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
),
- [4] = LAYOUT_60_ansi(
+ [4] = LAYOUT_all(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
@@ -58,7 +58,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
),
- [5] = LAYOUT_60_ansi(
+ [5] = LAYOUT_all(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
@@ -66,7 +66,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
),
- [6] = LAYOUT_60_ansi(
+ [6] = LAYOUT_all(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
@@ -74,7 +74,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
),
- [7] = LAYOUT_60_ansi(
+ [7] = LAYOUT_all(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
@@ -82,7 +82,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
),
- [8] = LAYOUT_60_ansi(
+ [8] = LAYOUT_all(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
@@ -90,7 +90,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
),
- [9] = LAYOUT_60_ansi(
+ [9] = LAYOUT_all(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
diff --git a/keyboards/1upkeyboards/pi60/matrix_diagram.md b/keyboards/1upkeyboards/pi60/matrix_diagram.md
new file mode 100644
index 0000000000..2300245bdb
--- /dev/null
+++ b/keyboards/1upkeyboards/pi60/matrix_diagram.md
@@ -0,0 +1,60 @@
+# Matrix Diagram for 1upkeyboards pi60
+
+```
+ ┌───────┐
+ 2u Backspace │0D │
+ └───────┘
+┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
+│00 │01 │02 │03 │04 │05 │06 │07 │08 │09 │0A │0B │0C │0D │0E │ ─ Switch or Encoder
+├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ ┌─────┐ ┌─────┐ ┌─────┐
+│10 │11 │12 │13 │14 │15 │16 │17 │18 │19 │1A │1B │1C │1D │ │ │ │1D │ │1D │
+├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ ┌──┴┐2D │ ISO Enter ┌──┴┬────┤ 1u/1.25u Split Enter ┌──┴─┬───┤ 1.25u/1u Split Enter
+│2F │21 │22 │23 │24 │25 │26 │27 │28 │29 │2A │2B │2D │ │2C │ │ │2C │2D │ │2C │2D │
+├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┬───┤ └───┴────┘ └───┴────┘ └────┴───┘
+│3F │31 │32 │33 │34 │35 │36 │37 │38 │39 │3A │3B │3C │3E │─┐
+└────┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴──────┴───┴───┘ │
+┌────────┐ ┌───┬──────┬───┐ │
+│3F │ 2.25u LShift 1u/1.75u/1u RShift │3B │3C │3E │─┼─ Switch or Encoder
+└────────┘ └───┴──────┴───┘ │
+ ┌───┐ ┌───┬───┐ │
+ 1u/0.75u Gap/1u/1u RShift │3B │ │3C │3E │─┘
+ └───┘ └───┴───┘
+
+[Bottom Rows]────────────────────────────────────────────────
+────────────────────[6u & 6.25u Spacebar]────────────────────
+┌────┬────┬────┬────────────────────────┬────┬────┬────┬────┐
+│4F │41 │42 │46 │4A │4B │4D │4E │
+└────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
+┌─────┬───┬────┬──────────┬────┬────────┬────┬────┬───┬─────┐
+│4F │41 │42 │44 │46 │48 │4A │4B │4D │4E │
+└─────┴───┴────┴──────────┴────┴────────┴────┴────┴───┴─────┘
+ ┌────────┬────┬──────────┬───┬───┬───┬───┬───┐
+ │44 │46 │48 │4A │4B │4C │4D │4E │
+ └────────┴────┴──────────┴───┴───┴───┴───┴───┘
+ ┌───────────────────────┬───┬─────┬────┬────┐
+ │46 │4A │4B │4D │4E │
+ └───────────────────────┴───┴─────┴────┴────┘
+ ┌───┬─────┬───┬─────┐
+ │4A │4B │4D │4E │
+ └───┴─────┴───┴─────┘
+
+────────────────────────[7u Spacebar]────────────────────────
+┌────┬────┬─────┬───────────────────────────┬───┬───┬───┬───┐
+│4F │41 │42 │46 │4B │4C │4D │4E │
+└────┴────┴─────┴───────────────────────────┴───┴───┴───┴───┘
+┌─────┬───┬─────┬──────────┬─────┬──────────┬─────┬────┬────┐
+│4F │41 │42 │44 │46 │48 │4B │4D │4E │
+└─────┴───┴─────┴──────────┴─────┴──────────┴─────┴────┴────┘
+ ┌───────────┬───┬───────────┬─────┬───┬─────┐
+ │44 │46 │48 │4B │4D │4E │
+ └───────────┴───┴───────────┴─────┴───┴─────┘
+ └─ Switch or Encoder
+
+───────────────────────[10u Spacebar]────────────────────────
+┌────┬────┬───────────────────────────────────────┬────┬────┐
+│4F │41 │46 │4D │4E │
+└────┴────┴───────────────────────────────────────┴────┴────┘
+┌─────┬───┬───────────────────────────────────────┬───┬─────┐
+│4F │41 │46 │4D │4E │
+└─────┴───┴───────────────────────────────────────┴───┴─────┘
+```
diff --git a/keyboards/1upkeyboards/pi60_hse/config.h b/keyboards/1upkeyboards/pi60_hse/config.h
index a47120f7d3..b7c4d5e8bc 100644
--- a/keyboards/1upkeyboards/pi60_hse/config.h
+++ b/keyboards/1upkeyboards/pi60_hse/config.h
@@ -3,8 +3,6 @@
#pragma once
-
-#define DYNAMIC_KEYMAP_LAYER_COUNT 10
#define RGB_MATRIX_LED_COUNT 16
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
#define RGB_MATRIX_KEYPRESSES
diff --git a/keyboards/1upkeyboards/pi60_hse/info.json b/keyboards/1upkeyboards/pi60_hse/info.json
index 310ad3d94b..5b3e6b35e5 100644
--- a/keyboards/1upkeyboards/pi60_hse/info.json
+++ b/keyboards/1upkeyboards/pi60_hse/info.json
@@ -11,6 +11,9 @@
"vid": "0x6F75"
},
"diode_direction": "COL2ROW",
+ "dynamic_keymap": {
+ "layer_count": 10
+ },
"features": {
"audio": false,
"backlight": false,
diff --git a/keyboards/1upkeyboards/super16/keymaps/15game/keymap.c b/keyboards/1upkeyboards/super16/keymaps/15game/keymap.c
index 5988a7cf0e..e92a9fc10d 100644
--- a/keyboards/1upkeyboards/super16/keymaps/15game/keymap.c
+++ b/keyboards/1upkeyboards/super16/keymaps/15game/keymap.c
@@ -85,7 +85,7 @@ uint8_t remap[16] = {
void refresh_leds(void) {
for (uint8_t index = 0; index < 16; ++index) {
uint8_t tile = tiles[index];
- setrgb(r[tile], g[tile], b[tile], (LED_TYPE *)&led[remap[index]]);
+ setrgb(r[tile], g[tile], b[tile], (rgb_led_t *)&led[remap[index]]);
}
rgblight_set();
}
diff --git a/keyboards/1upkeyboards/sweet16v2/kb2040/config.h b/keyboards/1upkeyboards/sweet16v2/kb2040/config.h
index 37a85b4711..e4609962f1 100644
--- a/keyboards/1upkeyboards/sweet16v2/kb2040/config.h
+++ b/keyboards/1upkeyboards/sweet16v2/kb2040/config.h
@@ -16,8 +16,6 @@
#pragma once
-
-#define DYNAMIC_KEYMAP_LAYER_COUNT 10
#define RGB_MATRIX_LED_COUNT 20
#define RGB_MATRIX_KEYPRESSES
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
diff --git a/keyboards/1upkeyboards/sweet16v2/kb2040/info.json b/keyboards/1upkeyboards/sweet16v2/kb2040/info.json
index f1ac861c8c..928c8106bf 100644
--- a/keyboards/1upkeyboards/sweet16v2/kb2040/info.json
+++ b/keyboards/1upkeyboards/sweet16v2/kb2040/info.json
@@ -33,6 +33,9 @@
"rows": ["GP26", "GP1", "GP18", "GP5"]
},
"diode_direction": "COL2ROW",
+ "dynamic_keymap": {
+ "layer_count": 10
+ },
"encoder": {
"enabled": true,
"rotary": [
diff --git a/keyboards/1upkeyboards/sweet16v2/pro_micro/config.h b/keyboards/1upkeyboards/sweet16v2/pro_micro/config.h
index f773468d8f..e4609962f1 100644
--- a/keyboards/1upkeyboards/sweet16v2/pro_micro/config.h
+++ b/keyboards/1upkeyboards/sweet16v2/pro_micro/config.h
@@ -16,9 +16,6 @@
#pragma once
-
-#define DYNAMIC_KEYMAP_LAYER_COUNT 10
-
#define RGB_MATRIX_LED_COUNT 20
#define RGB_MATRIX_KEYPRESSES
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
diff --git a/keyboards/1upkeyboards/sweet16v2/pro_micro/info.json b/keyboards/1upkeyboards/sweet16v2/pro_micro/info.json
index a8696ab64c..87f2f3574c 100644
--- a/keyboards/1upkeyboards/sweet16v2/pro_micro/info.json
+++ b/keyboards/1upkeyboards/sweet16v2/pro_micro/info.json
@@ -31,6 +31,9 @@
"rows": ["D1", "B5", "B4", "E6"]
},
"diode_direction": "COL2ROW",
+ "dynamic_keymap": {
+ "layer_count": 10
+ },
"encoder": {
"enabled": true,
"rotary": [
diff --git a/keyboards/25keys/zinc/keymaps/ginjake/keymap.c b/keyboards/25keys/zinc/keymaps/ginjake/keymap.c
index b7d0e5c93a..5cadafb4be 100644
--- a/keyboards/25keys/zinc/keymaps/ginjake/keymap.c
+++ b/keyboards/25keys/zinc/keymaps/ginjake/keymap.c
@@ -341,10 +341,10 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
//キー毎に時間差で色が変化していく
if (aqours_next_color_timer_count % NEXT_CHANGE_TARGET_TIME == 0) {
if (target_col < MATRIX_COLS) {
- sethsv(aqours_h[aqours_num], aqours_s[aqours_num], aqours_v[aqours_num], (LED_TYPE *)&led[target_col]);
- sethsv(aqours_h[aqours_num], aqours_s[aqours_num], aqours_v[aqours_num], (LED_TYPE *)&led[11 - target_col]);
- sethsv(aqours_h[aqours_num], aqours_s[aqours_num], aqours_v[aqours_num], (LED_TYPE *)&led[12 + target_col]);
- sethsv(aqours_h[aqours_num], aqours_s[aqours_num], aqours_v[aqours_num], (LED_TYPE *)&led[23 - target_col]);
+ sethsv(aqours_h[aqours_num], aqours_s[aqours_num], aqours_v[aqours_num], (rgb_led_t *)&led[target_col]);
+ sethsv(aqours_h[aqours_num], aqours_s[aqours_num], aqours_v[aqours_num], (rgb_led_t *)&led[11 - target_col]);
+ sethsv(aqours_h[aqours_num], aqours_s[aqours_num], aqours_v[aqours_num], (rgb_led_t *)&led[12 + target_col]);
+ sethsv(aqours_h[aqours_num], aqours_s[aqours_num], aqours_v[aqours_num], (rgb_led_t *)&led[23 - target_col]);
target_col++;
rgblight_set();
}
diff --git a/keyboards/3w6/rev1/rules.mk b/keyboards/3w6/rev1/rules.mk
index 2194870d6b..b7988ce4f5 100644
--- a/keyboards/3w6/rev1/rules.mk
+++ b/keyboards/3w6/rev1/rules.mk
@@ -16,4 +16,4 @@ NO_USB_STARTUP_CHECK = yes
LTO_ENABLE = no
SRC += matrix.c
-QUANTUM_LIB_SRC += i2c_master.c
+I2C_DRIVER_REQUIRED = yes
diff --git a/keyboards/3w6/rev2/rules.mk b/keyboards/3w6/rev2/rules.mk
index 2194870d6b..b7988ce4f5 100644
--- a/keyboards/3w6/rev2/rules.mk
+++ b/keyboards/3w6/rev2/rules.mk
@@ -16,4 +16,4 @@ NO_USB_STARTUP_CHECK = yes
LTO_ENABLE = no
SRC += matrix.c
-QUANTUM_LIB_SRC += i2c_master.c
+I2C_DRIVER_REQUIRED = yes
diff --git a/keyboards/40percentclub/ut47/rules.mk b/keyboards/40percentclub/ut47/rules.mk
index 3b1b719e14..6ba6aa5f6f 100644
--- a/keyboards/40percentclub/ut47/rules.mk
+++ b/keyboards/40percentclub/ut47/rules.mk
@@ -13,4 +13,4 @@ AUDIO_ENABLE = no # Audio output
# custom matrix setup
CUSTOM_MATRIX = yes
SRC += matrix.c
-QUANTUM_LIB_SRC += uart.c
+UART_DRIVER_REQUIRED = yes
diff --git a/keyboards/4pplet/eagle_viper_rep/rev_a/config.h b/keyboards/4pplet/eagle_viper_rep/rev_a/config.h
index 9bec945f24..350b9abad7 100644
--- a/keyboards/4pplet/eagle_viper_rep/rev_a/config.h
+++ b/keyboards/4pplet/eagle_viper_rep/rev_a/config.h
@@ -20,7 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define BACKLIGHT_PWM_CHANNEL 4
/* Underglow */
-#define WS2812_SPI SPID1
+#define WS2812_SPI_DRIVER SPID1
#define WS2812_SPI_MOSI_PAL_MODE 0
#define WS2812_SPI_SCK_PIN A5
#define WS2812_SPI_SCK_PAL_MODE 0
@@ -41,6 +41,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define LAYER_3 A8
#define LAYER_4 A9
#define LAYER_5 B9
-
-/* Added extra layer for use of layer leds */
-#define DYNAMIC_KEYMAP_LAYER_COUNT 5
diff --git a/keyboards/4pplet/eagle_viper_rep/rev_a/info.json b/keyboards/4pplet/eagle_viper_rep/rev_a/info.json
index c08f53f7b7..baafb58153 100644
--- a/keyboards/4pplet/eagle_viper_rep/rev_a/info.json
+++ b/keyboards/4pplet/eagle_viper_rep/rev_a/info.json
@@ -13,6 +13,9 @@
"rows": ["A2", "A1", "B8", "A10", "C15", "A15", "B7", "B6", "C14", "C13"]
},
"diode_direction": "COL2ROW",
+ "dynamic_keymap": {
+ "layer_count": 5
+ },
"backlight": {
"pin": "A3",
"levels": 10,
diff --git a/keyboards/4pplet/eagle_viper_rep/rev_b/config.h b/keyboards/4pplet/eagle_viper_rep/rev_b/config.h
index 5d5eefda21..b5957e6f30 100644
--- a/keyboards/4pplet/eagle_viper_rep/rev_b/config.h
+++ b/keyboards/4pplet/eagle_viper_rep/rev_b/config.h
@@ -34,6 +34,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define LAYER_3 B0
#define LAYER_4 B9
#define LAYER_5 A9
-
-/* Added extra layer for use of layer leds */
-#define DYNAMIC_KEYMAP_LAYER_COUNT 5
diff --git a/keyboards/4pplet/eagle_viper_rep/rev_b/info.json b/keyboards/4pplet/eagle_viper_rep/rev_b/info.json
index ad7513c13d..2ebb260686 100644
--- a/keyboards/4pplet/eagle_viper_rep/rev_b/info.json
+++ b/keyboards/4pplet/eagle_viper_rep/rev_b/info.json
@@ -13,6 +13,9 @@
"rows": ["A2", "A1", "B8", "A10", "C15", "A15", "B7", "B6", "C14", "C13"]
},
"diode_direction": "COL2ROW",
+ "dynamic_keymap": {
+ "layer_count": 5
+ },
"backlight": {
"pin": "A6",
"levels": 6,
diff --git a/keyboards/4pplet/perk60_iso/rev_a/config.h b/keyboards/4pplet/perk60_iso/rev_a/config.h
index e033b16259..53919dd7ab 100644
--- a/keyboards/4pplet/perk60_iso/rev_a/config.h
+++ b/keyboards/4pplet/perk60_iso/rev_a/config.h
@@ -21,10 +21,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE
-#define DRIVER_ADDR_1 0b1010000
-#define DRIVER_COUNT 1
+#define DRIVER_ADDR_1 IS31FL3733_I2C_ADDRESS_GND_GND
+#define IS31FL3733_DRIVER_COUNT 1
#define RGB_MATRIX_LED_COUNT 62
-#define ISSI_PWM_FREQUENCY 0b010
+#define IS31FL3733_PWM_FREQUENCY IS31FL3733_PWM_FREQUENCY_26K7_HZ
#define RGB_MATRIX_DEFAULT_VAL 80
#define RGB_MATRIX_KEYPRESSES
diff --git a/keyboards/4pplet/perk60_iso/rev_a/rev_a.c b/keyboards/4pplet/perk60_iso/rev_a/rev_a.c
index 814a8f95d4..e3b8d71a90 100644
--- a/keyboards/4pplet/perk60_iso/rev_a/rev_a.c
+++ b/keyboards/4pplet/perk60_iso/rev_a/rev_a.c
@@ -17,7 +17,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "rev_a.h"
#ifdef RGB_MATRIX_ENABLE
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3733_led_t PROGMEM g_is31fl3733_leds[RGB_MATRIX_LED_COUNT] = {
{ 0, K_2, J_2, L_2 }, //D402
{ 0, K_3, J_3, L_3 }, //D403
{ 0, K_4, J_4, L_4 }, //D404
diff --git a/keyboards/abko/ak84bt/ak84bt.c b/keyboards/abko/ak84bt/ak84bt.c
index 0ecd06b177..a51f1f458f 100644
--- a/keyboards/abko/ak84bt/ak84bt.c
+++ b/keyboards/abko/ak84bt/ak84bt.c
@@ -16,7 +16,7 @@
#include QMK_KEYBOARD_H
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3733_led_t PROGMEM g_is31fl3733_leds[RGB_MATRIX_LED_COUNT] = {
{0, G_1, I_1, H_1},
{0, G_3, I_3, H_3},
{0, G_4, I_4, H_4},
diff --git a/keyboards/abko/ak84bt/config.h b/keyboards/abko/ak84bt/config.h
index f6a3b55851..24c16eccf0 100644
--- a/keyboards/abko/ak84bt/config.h
+++ b/keyboards/abko/ak84bt/config.h
@@ -17,10 +17,10 @@
#pragma once
-#define DRIVER_ADDR_1 0b1010000
-#define DRIVER_ADDR_2 0b1010011
+#define DRIVER_ADDR_1 IS31FL3733_I2C_ADDRESS_GND_GND
+#define DRIVER_ADDR_2 IS31FL3733_I2C_ADDRESS_GND_VCC
-#define DRIVER_COUNT 2
+#define IS31FL3733_DRIVER_COUNT 2
#define DRIVER_1_LED_TOTAL 45
#define DRIVER_2_LED_TOTAL 45
diff --git a/keyboards/acheron/apollo/87h/gamma/config.h b/keyboards/acheron/apollo/87h/gamma/config.h
index 6209fa21f7..f7cad264d2 100644
--- a/keyboards/acheron/apollo/87h/gamma/config.h
+++ b/keyboards/acheron/apollo/87h/gamma/config.h
@@ -25,9 +25,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define EARLY_INIT_PERFORM_BOOTLOADER_JUMP TRUE
// RGB Matrix defines
-#define DRIVER_ADDR_1 0b0110000
+#define DRIVER_ADDR_1 IS31FL3741_I2C_ADDRESS_GND
-#define DRIVER_COUNT 1
+#define IS31FL3741_DRIVER_COUNT 1
#define DRIVER_1_LED_TOTAL 87
#define RGB_MATRIX_LED_COUNT DRIVER_1_LED_TOTAL
#define ISSI_DRIVER_TOTAL RGB_MATRIX_LED_COUNT
diff --git a/keyboards/acheron/apollo/87h/gamma/gamma.c b/keyboards/acheron/apollo/87h/gamma/gamma.c
index fb381f52ce..19e9106287 100644
--- a/keyboards/acheron/apollo/87h/gamma/gamma.c
+++ b/keyboards/acheron/apollo/87h/gamma/gamma.c
@@ -18,7 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3741_led_t PROGMEM g_is31fl3741_leds[RGB_MATRIX_LED_COUNT] = {
/* Refer to IS31 manual for these locations
* driver
* | R location
diff --git a/keyboards/acheron/shark/beta/info.json b/keyboards/acheron/shark/beta/info.json
index 5ec2403638..7daab0a2c0 100644
--- a/keyboards/acheron/shark/beta/info.json
+++ b/keyboards/acheron/shark/beta/info.json
@@ -9,6 +9,9 @@
"rows": ["A8", "B14", "A4", "A3"]
},
"diode_direction": "COL2ROW",
+ "eeprom": {
+ "driver": "i2c"
+ },
"encoder": {
"rotary": [
{"pin_a": "C15", "pin_b": "C14"}
diff --git a/keyboards/acheron/shark/beta/rules.mk b/keyboards/acheron/shark/beta/rules.mk
index a398475a3e..94335efa29 100644
--- a/keyboards/acheron/shark/beta/rules.mk
+++ b/keyboards/acheron/shark/beta/rules.mk
@@ -12,6 +12,3 @@ RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
AUDIO_ENABLE = no # Audio output
LTO_ENABLE = no
ENCODER_ENABLE = yes
-
-EEPROM_DRIVER = i2c
-
diff --git a/keyboards/adm42/config.h b/keyboards/adm42/config.h
deleted file mode 100644
index b5ba2eb94e..0000000000
--- a/keyboards/adm42/config.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/* Copyright 2020-2022 Lorenzo Leonini
- * SPDX-License-Identifier: GPL-2.0-only
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General 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
-
-#if defined(CONSOLE_ENABLE)
- #define DEBUG_MATRIX_SCAN_RATE
-#endif
diff --git a/keyboards/adm42/info.json b/keyboards/adm42/info.json
deleted file mode 100644
index b2bdbc4dad..0000000000
--- a/keyboards/adm42/info.json
+++ /dev/null
@@ -1,90 +0,0 @@
-{
- "keyboard_name": "ADM42",
- "manufacturer": "Lorenzo Leonini",
- "url": "https://adm42.dev/",
- "maintainer": "lleonini",
- "debounce": 10,
- "usb": {
- "vid": "0x04D8",
- "pid": "0xE873",
- "device_version": "0.0.1"
- },
- "ws2812": {
- "pin": "B7"
- },
- "rgb_matrix": {
- "driver": "ws2812",
- "sat_steps": 24
- },
- "qmk": {
- "tap_keycode_delay": 1
- },
- "build": {
- "debounce_type": "sym_eager_pk"
- },
- "matrix_pins": {
- "cols": ["C6", "B6", "B5", "B4", "D7", "D6", "F0", "F1", "F4", "F5", "F6", "F7"],
- "rows": ["C7", "D5", "D3", "D2"]
- },
- "diode_direction": "ROW2COL",
- "processor": "atmega32u4",
- "bootloader": "atmel-dfu",
- "layout_aliases": {
- "LAYOUT_adm42_3x12_6": "LAYOUT"
- },
- "layouts": {
- "LAYOUT": {
- "layout": [
- {"matrix": [0, 0], "x": 0, "y": 0.8},
- {"matrix": [0, 1], "x": 1, "y": 0.8},
- {"matrix": [0, 2], "x": 2, "y": 0},
- {"matrix": [0, 3], "x": 3, "y": 0},
- {"matrix": [0, 4], "x": 4, "y": 0.5},
- {"matrix": [0, 5], "x": 5, "y": 0.5},
-
- {"matrix": [0, 6], "x": 7.5, "y": 0.5},
- {"matrix": [0, 7], "x": 8.5, "y": 0.5},
- {"matrix": [0, 8], "x": 9.5, "y": 0},
- {"matrix": [0, 9], "x": 10.5, "y": 0},
- {"matrix": [0, 10], "x": 11.5, "y": 0.8},
- {"matrix": [0, 11], "x": 12.5, "y": 0.8},
-
- {"matrix": [1, 0], "x": 0, "y": 1.8},
- {"matrix": [1, 1], "x": 1, "y": 1.8},
- {"matrix": [1, 2], "x": 2, "y": 1},
- {"matrix": [1, 3], "x": 3, "y": 1},
- {"matrix": [1, 4], "x": 4, "y": 1.5},
- {"matrix": [1, 5], "x": 5, "y": 1.5},
-
- {"matrix": [1, 6], "x": 7.5, "y": 1.5},
- {"matrix": [1, 7], "x": 8.5, "y": 1.5},
- {"matrix": [1, 8], "x": 9.5, "y": 1},
- {"matrix": [1, 9], "x": 10.5, "y": 1},
- {"matrix": [1, 10], "x": 11.5, "y": 1.8},
- {"matrix": [1, 11], "x": 12.5, "y": 1.8},
-
- {"matrix": [2, 0], "x": 0, "y": 2.8},
- {"matrix": [2, 1], "x": 1, "y": 2.8},
- {"matrix": [2, 2], "x": 2, "y": 2},
- {"matrix": [2, 3], "x": 3, "y": 2},
- {"matrix": [2, 4], "x": 4, "y": 2.5},
- {"matrix": [2, 5], "x": 5, "y": 2.5},
-
- {"matrix": [2, 6], "x": 7.5, "y": 2.5},
- {"matrix": [2, 7], "x": 8.5, "y": 2.5},
- {"matrix": [2, 8], "x": 9.5, "y": 2},
- {"matrix": [2, 9], "x": 10.5, "y": 2},
- {"matrix": [2, 10], "x": 11.5, "y": 2.8},
- {"matrix": [2, 11], "x": 12.5, "y": 2.8},
-
- {"matrix": [3, 3], "x": 4.25, "y": 3.55},
- {"matrix": [3, 4], "x": 5.25, "y": 3.65},
- {"matrix": [3, 6], "x": 6.25, "y": 1.875, "h": 1.25},
-
- {"matrix": [3, 5], "x": 6.25, "y": 4.05},
- {"matrix": [3, 7], "x": 7.25, "y": 3.65},
- {"matrix": [3, 8], "x": 8.25, "y": 3.55}
- ]
- }
- }
-}
diff --git a/keyboards/adm42/rev4/config.h b/keyboards/adm42/rev4/config.h
deleted file mode 100644
index 5553b18751..0000000000
--- a/keyboards/adm42/rev4/config.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/* Copyright 2020-2022 Lorenzo Leonini
- * SPDX-License-Identifier: GPL-2.0-only
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General 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 ADM42_LED E6
-
-#define RGB_MATRIX_LED_COUNT 42
-#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 170
-#define RGB_DISABLE_WHEN_USB_SUSPENDED
-#define RGB_MATRIX_LED_PROCESS_LIMIT 21
-#define RGB_MATRIX_LED_FLUSH_LIMIT 16
-#define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_CYCLE_LEFT_RIGHT
-#define RGB_MATRIX_TYPING_HEATMAP_DECREASE_DELAY_MS 20
-#define RGB_MATRIX_KEYPRESSES
-#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
-
-#define ENABLE_RGB_MATRIX_BREATHING
-#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
-#define ENABLE_RGBLIGHT_MODE_STATIC_LIGHT
-#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN
-#define ENABLE_RGB_MATRIX_PIXEL_FRACTAL
-#define ENABLE_RGB_MATRIX_TYPING_HEATMAP
-#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
-#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
-#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN
-#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL
-#define ENABLE_RGB_MATRIX_PIXEL_RAIN
-#define ENABLE_RGB_MATRIX_DIGITAL_RAIN
-#define ENABLE_RGB_MATRIX_BAND_VAL
-#define ENABLE_RGB_MATRIX_SPLASH
diff --git a/keyboards/adm42/rev4/info.json b/keyboards/adm42/rev4/info.json
new file mode 100644
index 0000000000..efb0eea029
--- /dev/null
+++ b/keyboards/adm42/rev4/info.json
@@ -0,0 +1,163 @@
+{
+ "keyboard_name": "ADM42",
+ "manufacturer": "Lorenzo Leonini",
+ "url": "https://adm42.dev/",
+ "maintainer": "lleonini",
+ "debounce": 10,
+ "usb": {
+ "vid": "0x04D8",
+ "pid": "0xE873",
+ "device_version": "0.0.1"
+ },
+ "features": {
+ "bootmagic": true,
+ "command": false,
+ "console": false,
+ "extrakey": true,
+ "mousekey": true,
+ "nkro": true,
+ "rgb_matrix": true
+ },
+ "ws2812": {
+ "pin": "B7"
+ },
+ "rgb_matrix": {
+ "driver": "ws2812",
+ "animations": {
+ "breathing": true,
+ "band_val": true,
+ "cycle_left_right": true,
+ "cycle_up_down": true,
+ "cycle_out_in": true,
+ "cycle_pinwheel": true,
+ "jellybean_raindrops": true,
+ "pixel_fractal": true,
+ "pixel_rain": true,
+ "typing_heatmap": true,
+ "digital_rain": true,
+ "solid_reactive_simple": true,
+ "splash": true
+ },
+ "layout": [
+ {"matrix": [3, 6], "x": 112, "y": 32, "flags": 4},
+ {"matrix": [2, 5], "x": 92, "y": 36, "flags": 4},
+ {"matrix": [1, 5], "x": 94, "y": 25, "flags": 4},
+ {"matrix": [0, 5], "x": 97, "y": 14, "flags": 4},
+ {"matrix": [0, 4], "x": 80, "y": 13, "flags": 4},
+ {"matrix": [1, 4], "x": 77, "y": 24, "flags": 4},
+ {"matrix": [1, 3], "x": 62, "y": 18, "flags": 4},
+ {"matrix": [0, 3], "x": 64, "y": 8, "flags": 4},
+ {"matrix": [0, 2], "x": 49, "y": 6, "flags": 4},
+ {"matrix": [1, 2], "x": 46, "y": 17, "flags": 4},
+ {"matrix": [1, 1], "x": 28, "y": 23, "flags": 4},
+ {"matrix": [0, 1], "x": 30, "y": 13, "flags": 4},
+ {"matrix": [0, 0], "x": 14, "y": 11, "flags": 4},
+ {"matrix": [1, 0], "x": 11, "y": 22, "flags": 4},
+ {"matrix": [2, 0], "x": 8, "y": 32, "flags": 4},
+ {"matrix": [2, 1], "x": 26, "y": 34, "flags": 4},
+ {"matrix": [2, 2], "x": 43, "y": 28, "flags": 4},
+ {"matrix": [2, 3], "x": 61, "y": 29, "flags": 4},
+ {"matrix": [2, 4], "x": 76, "y": 34, "flags": 4},
+ {"matrix": [3, 3], "x": 78, "y": 46, "flags": 4},
+ {"matrix": [3, 4], "x": 97, "y": 49, "flags": 4},
+ {"matrix": [3, 5], "x": 112, "y": 56, "flags": 4},
+ {"matrix": [3, 7], "x": 127, "y": 49, "flags": 4},
+ {"matrix": [3, 8], "x": 146, "y": 46, "flags": 4},
+ {"matrix": [2, 6], "x": 132, "y": 36, "flags": 4},
+ {"matrix": [2, 7], "x": 148, "y": 34, "flags": 4},
+ {"matrix": [2, 8], "x": 164, "y": 29, "flags": 4},
+ {"matrix": [2, 9], "x": 180, "y": 28, "flags": 4},
+ {"matrix": [2, 10], "x": 198, "y": 34, "flags": 4},
+ {"matrix": [2, 11], "x": 215, "y": 32, "flags": 4},
+ {"matrix": [1, 11], "x": 212, "y": 22, "flags": 4},
+ {"matrix": [1, 10], "x": 196, "y": 23, "flags": 4},
+ {"matrix": [1, 9], "x": 178, "y": 17, "flags": 4},
+ {"matrix": [1, 8], "x": 161, "y": 18, "flags": 4},
+ {"matrix": [1, 7], "x": 146, "y": 24, "flags": 4},
+ {"matrix": [1, 6], "x": 130, "y": 25, "flags": 4},
+ {"matrix": [0, 6], "x": 126, "y": 14, "flags": 4},
+ {"matrix": [0, 7], "x": 143, "y": 13, "flags": 4},
+ {"matrix": [0, 8], "x": 159, "y": 8, "flags": 4},
+ {"matrix": [0, 9], "x": 175, "y": 6, "flags": 4},
+ {"matrix": [0, 10], "x": 194, "y": 13, "flags": 4},
+ {"matrix": [0, 11], "x": 210, "y": 11, "flags": 4}
+ ],
+ "led_flush_limit": 16,
+ "led_process_limit": 21,
+ "max_brightness": 170,
+ "sat_steps": 24,
+ "sleep": true
+ },
+ "qmk": {
+ "tap_keycode_delay": 1
+ },
+ "build": {
+ "debounce_type": "sym_eager_pk",
+ "lto": true
+ },
+ "matrix_pins": {
+ "cols": ["C6", "B6", "B5", "B4", "D7", "D6", "F0", "F1", "F4", "F5", "F6", "F7"],
+ "rows": ["C7", "D5", "D3", "D2"]
+ },
+ "diode_direction": "ROW2COL",
+ "processor": "atmega32u4",
+ "bootloader": "atmel-dfu",
+ "layout_aliases": {
+ "LAYOUT_adm42_3x12_6": "LAYOUT"
+ },
+ "layouts": {
+ "LAYOUT": {
+ "layout": [
+ {"matrix": [0, 0], "x": 0, "y": 0.8},
+ {"matrix": [0, 1], "x": 1, "y": 0.8},
+ {"matrix": [0, 2], "x": 2, "y": 0},
+ {"matrix": [0, 3], "x": 3, "y": 0},
+ {"matrix": [0, 4], "x": 4, "y": 0.5},
+ {"matrix": [0, 5], "x": 5, "y": 0.5},
+
+ {"matrix": [0, 6], "x": 7.5, "y": 0.5},
+ {"matrix": [0, 7], "x": 8.5, "y": 0.5},
+ {"matrix": [0, 8], "x": 9.5, "y": 0},
+ {"matrix": [0, 9], "x": 10.5, "y": 0},
+ {"matrix": [0, 10], "x": 11.5, "y": 0.8},
+ {"matrix": [0, 11], "x": 12.5, "y": 0.8},
+
+ {"matrix": [1, 0], "x": 0, "y": 1.8},
+ {"matrix": [1, 1], "x": 1, "y": 1.8},
+ {"matrix": [1, 2], "x": 2, "y": 1},
+ {"matrix": [1, 3], "x": 3, "y": 1},
+ {"matrix": [1, 4], "x": 4, "y": 1.5},
+ {"matrix": [1, 5], "x": 5, "y": 1.5},
+
+ {"matrix": [1, 6], "x": 7.5, "y": 1.5},
+ {"matrix": [1, 7], "x": 8.5, "y": 1.5},
+ {"matrix": [1, 8], "x": 9.5, "y": 1},
+ {"matrix": [1, 9], "x": 10.5, "y": 1},
+ {"matrix": [1, 10], "x": 11.5, "y": 1.8},
+ {"matrix": [1, 11], "x": 12.5, "y": 1.8},
+
+ {"matrix": [2, 0], "x": 0, "y": 2.8},
+ {"matrix": [2, 1], "x": 1, "y": 2.8},
+ {"matrix": [2, 2], "x": 2, "y": 2},
+ {"matrix": [2, 3], "x": 3, "y": 2},
+ {"matrix": [2, 4], "x": 4, "y": 2.5},
+ {"matrix": [2, 5], "x": 5, "y": 2.5},
+
+ {"matrix": [2, 6], "x": 7.5, "y": 2.5},
+ {"matrix": [2, 7], "x": 8.5, "y": 2.5},
+ {"matrix": [2, 8], "x": 9.5, "y": 2},
+ {"matrix": [2, 9], "x": 10.5, "y": 2},
+ {"matrix": [2, 10], "x": 11.5, "y": 2.8},
+ {"matrix": [2, 11], "x": 12.5, "y": 2.8},
+
+ {"matrix": [3, 3], "x": 4.25, "y": 3.55},
+ {"matrix": [3, 4], "x": 5.25, "y": 3.65},
+ {"matrix": [3, 6], "x": 6.25, "y": 1.875, "h": 1.25},
+
+ {"matrix": [3, 5], "x": 6.25, "y": 4.05},
+ {"matrix": [3, 7], "x": 7.25, "y": 3.65},
+ {"matrix": [3, 8], "x": 8.25, "y": 3.55}
+ ]
+ }
+ }
+}
diff --git a/keyboards/adm42/rev4/keymaps/default/config.h b/keyboards/adm42/rev4/keymaps/default/config.h
deleted file mode 100644
index abfaf9af78..0000000000
--- a/keyboards/adm42/rev4/keymaps/default/config.h
+++ /dev/null
@@ -1,2 +0,0 @@
-#define HOLD_ON_OTHER_KEY_PRESS_PER_KEY
-#define QUICK_TAP_TERM_PER_KEY
diff --git a/keyboards/adm42/rev4/keymaps/default/keymap.c b/keyboards/adm42/rev4/keymaps/default/keymap.c
deleted file mode 100644
index 12e4e85a4a..0000000000
--- a/keyboards/adm42/rev4/keymaps/default/keymap.c
+++ /dev/null
@@ -1,204 +0,0 @@
-/* Copyright 2020-2022 Lorenzo Leonini
- * SPDX-License-Identifier: GPL-2.0-only
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include QMK_KEYBOARD_H
-
-enum custom_layers {
- _QWERTY,
- _COLEMAKDH,
- _SPECIAL,
- _EXTRA,
- _ADM,
- _SETUP,
-};
-
-#define LW_GRV LWIN_T(KC_GRV)
-#define RW_EQU RWIN_T(KC_EQUAL)
-#define RW_BS RWIN_T(KC_BSLS)
-#define LC_TAB LCTL_T(KC_TAB)
-#define RC_QUT RCTL_T(KC_QUOT)
-#define LS_BPC LSFT_T(KC_BSPC)
-#define RS_SPC RSFT_T(KC_SPC)
-#define LA_BS LALT_T(KC_BSLS)
-#define LW_F11 LWIN_T(KC_F11)
-#define LC_APP LCTL_T(KC_APP)
-#define LA_TOG LALT_T(RGB_TOG)
-#define RW_F12 RWIN_T(KC_F12)
-
-#define LLS_ESC LT(_SPECIAL, KC_ESC)
-#define LLS_RALT LT(_SPECIAL, KC_RALT)
-#define LLE_ENT LT(_EXTRA, KC_ENT)
-#define LLA_DEL LT(_ADM, KC_DEL)
-#define SETUP MO(_SETUP)
-
-enum custom_keycodes {
- REFLASH = SAFE_RANGE,
- LC_CIRC,
- RC_DLR,
- DF_QWER,
- DF_COLE,
-};
-
-// Not a mistake to have KC_LALT (also) on the right, RALT is kept for compose (LLS_RALT)
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [_QWERTY] = LAYOUT(
- LW_GRV, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, RW_EQU,
- LC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, RC_QUT,
- KC_LALT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LALT,
- LLS_ESC, LS_BPC, LLA_DEL, LLE_ENT, RS_SPC, LLS_RALT
- ),
- [_COLEMAKDH] = LAYOUT(
- LW_GRV, KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, RW_EQU,
- LC_TAB, KC_A, KC_R, KC_S, KC_T, KC_G, KC_M, KC_N, KC_E, KC_I, KC_O, RC_QUT,
- KC_LALT, KC_Z, KC_X, KC_C, KC_D, KC_V, KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH, KC_LALT,
- LLS_ESC, LS_BPC, LLA_DEL, LLE_ENT, RS_SPC, LLS_RALT
- ),
-
- [_SPECIAL] = LAYOUT(
- _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, RW_BS,
- LC_CIRC, KC_LBRC, KC_RBRC, KC_LPRN, KC_RPRN, KC_EXLM, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_MINS, RC_DLR,
- _______, KC_AMPR, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, KC_UNDS, KC_ASTR, KC_HASH, KC_PERC, KC_TILD, _______,
- KC_ESC, _______, KC_DEL, KC_ENT, _______, KC_RALT
- ),
- [_EXTRA] = LAYOUT(
- LW_F11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, RW_F12,
- KC_LCTL, KC_PAUS, KC_INS, KC_VOLD, KC_VOLU, KC_MUTE, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_APP, KC_RCTL,
- _______, KC_SLEP, KC_PWR, KC_MSTP, KC_MNXT, KC_MPLY, _______, KC_BRID, KC_BRIU, KC_PSCR, KC_WAKE, _______,
- KC_CAPS, _______, _______, _______, _______, KC_CAPS
- ),
- [_ADM] = LAYOUT(
- XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_M_B, RGB_VAD, RGB_VAI, RGB_SAD, RGB_SAI, XXXXXXX,
- XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_TOG, RGB_MOD, RGB_RMOD,RGB_HUD, RGB_HUI, XXXXXXX,
- XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_M_P, RGB_SPD, RGB_SPI, XXXXXXX, XXXXXXX, XXXXXXX,
- XXXXXXX, XXXXXXX, XXXXXXX, SETUP, XXXXXXX, XXXXXXX
- ),
- [_SETUP] = LAYOUT(
- REFLASH, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
- XXXXXXX, DF_QWER, DF_COLE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
- XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, EE_CLR,
- XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
- ),
-};
-
-bool get_hold_on_other_key_press(uint16_t keycode, keyrecord_t *record) {
- // Special if-condition outside the switch because `RC_QUT` overlaps with
- // the `QK_MOD_TAP ... QK_MOD_TAP_MAX` range.
- if (keycode == RC_QUT) {
- return false;
- }
- switch (keycode) {
- case QK_MOD_TAP ... QK_MOD_TAP_MAX:
- case QK_LAYER_TAP ... QK_LAYER_TAP_MAX:
- return true;
- default:
- return false;
- }
-}
-
-uint16_t get_quick_tap_term(uint16_t keycode, keyrecord_t *record) {
- switch (keycode) {
- case LLS_ESC:
- case LLS_RALT:
- return 0;
- default:
- return QUICK_TAP_TERM;
- }
-}
-
-static uint16_t last_timer = 0;
-static int last_key = 0;
-bool cleanup_return(uint16_t keycode, keyrecord_t *record, bool value) {
- if (record->event.pressed) {
- last_key = keycode;
- last_timer = timer_read();
- }
- return value;
-}
-
-bool process_record_user(uint16_t keycode, keyrecord_t *record) {
-
-#ifdef CONSOLE_ENABLE
- uprintf("KL: kc: 0x%04X, col: %u, row: %u, pressed: %b, time: %u, interrupt: %b, count: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed, record->event.time, record->tap.interrupted, record->tap.count);
-#endif
-
- switch (keycode) {
-
- case RC_DLR:
- if (record->event.pressed) {
- register_code(KC_RCTL);
- } else {
- unregister_code(KC_RCTL);
- if (last_key == keycode && timer_elapsed(last_timer) <= TAPPING_TERM) {
- send_string("$");
- }
- }
- return cleanup_return(keycode, record, false);
-
- case LC_CIRC:
- if (record->event.pressed) {
- register_code(KC_LCTL);
- } else {
- unregister_code(KC_LCTL);
- if (last_key == keycode && timer_elapsed(last_timer) <= TAPPING_TERM) {
- send_string("^");
- }
- }
- return cleanup_return(keycode, record, false);
-
- case DF_QWER:
- if (record->event.pressed) {
- set_single_persistent_default_layer(_QWERTY);
- send_string("QWERTY layout");
- }
- return false;
- case DF_COLE:
- if (record->event.pressed) {
- set_single_persistent_default_layer(_COLEMAKDH);
- send_string("COLEMAKDH layout");
- }
- return false;
-
- case REFLASH:
- eeconfig_init();
- eeconfig_update_rgb_matrix_default();
- writePinLow(ADM42_LED);
- reset_keyboard();
- return false;
-
- default:
- return cleanup_return(keycode, record, true);
- }
-}
-
-void keyboard_pre_init_kb(void) {
- setPinOutput(ADM42_LED);
- writePinHigh(ADM42_LED);
-}
-
-void keyboard_post_init_kb(void) {
- debug_enable = true;
- debug_matrix = false;
- debug_keyboard = false;
- writePinHigh(ADM42_LED);
-}
-
-void suspend_power_down_kb(void) {
- writePinLow(ADM42_LED);
-}
-
-void suspend_wakeup_init_kb(void) {
- writePinHigh(ADM42_LED);
-}
diff --git a/keyboards/adm42/rev4/keymaps/default/keymap.json b/keyboards/adm42/rev4/keymaps/default/keymap.json
new file mode 100644
index 0000000000..72eb7d50de
--- /dev/null
+++ b/keyboards/adm42/rev4/keymaps/default/keymap.json
@@ -0,0 +1,44 @@
+{
+ "keyboard": "adm42/rev4",
+ "keymap": "default",
+ "commit": "3bf01bb9ed202b14f78105db2aa2a75d01fc4323",
+ "layout": "LAYOUT",
+ "layers": [
+ [
+ "LWIN_T(KC_GRV)", "KC_Q", "KC_W", "KC_E", "KC_R", "KC_T", "KC_Y", "KC_U", "KC_I", "KC_O", "KC_P", "RWIN_T(KC_EQL)",
+ "LCTL_T(KC_TAB)", "KC_A", "KC_S", "KC_D", "KC_F", "KC_G", "KC_H", "KC_J", "KC_K", "KC_L", "KC_SCLN", "RCTL_T(KC_QUOT)",
+ "KC_LALT", "KC_Z", "KC_X", "KC_C", "KC_V", "KC_B", "KC_N", "KC_M", "KC_COMM", "KC_DOT", "KC_SLSH", "KC_LALT",
+ "LT(2,KC_ESC)", "LSFT_T(KC_BSPC)", "LT(4,KC_DEL)", "LT(3,KC_ENT)", "RSFT_T(KC_SPC)", "LT(2,KC_RALT)"
+ ],
+ [
+ "LWIN_T(KC_GRV)", "KC_Q", "KC_W", "KC_F", "KC_P", "KC_B", "KC_J", "KC_L", "KC_U", "KC_Y", "KC_SCLN", "RWIN_T(KC_EQL)",
+ "LCTL_T(KC_TAB)", "KC_A", "KC_R", "KC_S", "KC_T", "KC_G", "KC_M", "KC_N", "KC_E", "KC_I", "KC_O", "RCTL_T(KC_QUOT)",
+ "KC_LALT", "KC_Z", "KC_X", "KC_C", "KC_D", "KC_V", "KC_K", "KC_H", "KC_COMM", "KC_DOT", "KC_SLSH", "KC_LALT",
+ "LT(2,KC_ESC)", "LSFT_T(KC_BSPC)", "LT(4,KC_DEL)", "LT(3,KC_ENT)", "RSFT_T(KC_SPC)", "LT(2,KC_RALT)"
+ ],
+ [
+ "_______", "KC_1", "KC_2", "KC_3", "KC_4", "KC_5", "KC_6", "KC_7", "KC_8", "KC_9", "KC_0", "RWIN_T(KC_BSLS)",
+ "KC_LCTL", "KC_LBRC", "KC_RBRC", "KC_LPRN", "KC_RPRN", "KC_EXLM", "KC_LEFT", "KC_DOWN", "KC_UP", "KC_RGHT", "KC_MINS", "KC_RCTL",
+ "_______", "KC_AMPR", "KC_AT", "KC_LCBR", "KC_RCBR", "KC_PIPE", "KC_UNDS", "KC_ASTR", "KC_HASH", "KC_PERC", "KC_TILD", "_______",
+ "KC_ESC", "_______", "KC_DEL", "KC_ENT", "_______", "KC_RALT"
+ ],
+ [
+ "LWIN_T(KC_F11)", "KC_F1", "KC_F2", "KC_F3", "KC_F4", "KC_F5", "KC_F6", "KC_F7", "KC_F8", "KC_F9", "KC_F10", "RWIN_T(KC_F12)",
+ "KC_LCTL", "KC_PAUS", "KC_INS", "KC_VOLD", "KC_VOLU", "KC_MUTE", "KC_HOME", "KC_PGDN", "KC_PGUP", "KC_END", "KC_APP", "KC_RCTL",
+ "_______", "KC_SLEP", "KC_PWR", "KC_MSTP", "KC_MNXT", "KC_MPLY", "_______", "KC_BRID", "KC_BRIU", "KC_PSCR", "KC_WAKE", "_______",
+ "KC_CAPS", "_______", "_______", "_______", "_______", "KC_CAPS"
+ ],
+ [
+ "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "RGB_M_B", "RGB_VAD", "RGB_VAI", "RGB_SAD", "RGB_SAI", "XXXXXXX",
+ "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "RGB_TOG", "RGB_MOD", "RGB_RMOD", "RGB_HUD", "RGB_HUI", "XXXXXXX",
+ "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "RGB_M_P", "RGB_SPD", "RGB_SPI", "XXXXXXX", "XXXXXXX", "XXXXXXX",
+ "XXXXXXX", "XXXXXXX", "XXXXXXX", "MO(5)", "XXXXXXX", "XXXXXXX"
+ ],
+ [
+ "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX",
+ "XXXXXXX", "DF(0)", "DF(1)", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX",
+ "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "EE_CLR",
+ "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX"
+ ]
+ ]
+} \ No newline at end of file
diff --git a/keyboards/adm42/rev4/rev4.c b/keyboards/adm42/rev4/rev4.c
deleted file mode 100644
index 623b5cb5a3..0000000000
--- a/keyboards/adm42/rev4/rev4.c
+++ /dev/null
@@ -1,39 +0,0 @@
-/* Copyright 2020-2022 Lorenzo Leonini
- * SPDX-License-Identifier: GPL-2.0-only
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "quantum.h"
-
-led_config_t g_led_config = {
- {
- {12, 11, 8, 7, 4, 3, 36, 37, 38, 39, 40, 41},
- {13, 10, 9, 6, 5, 2, 35, 34, 33, 32, 31, 30},
- {14, 15, 16, 17, 18, 1, 24, 25, 26, 27, 28, 29},
- {NO_LED, NO_LED, NO_LED, 19, 20, 21, 0, 22, 23, NO_LED, NO_LED, NO_LED}
- }, {
- {112, 32}, {92, 36}, {94, 25}, {97, 14}, {80, 13}, {77, 24},
- {62, 18}, {64, 8}, {49, 6}, {46, 17}, {28, 23}, {30, 13},
- {14, 11}, {11, 22}, {8, 32}, {26, 34}, {43, 28}, {61, 29},
- {76, 34}, {78, 46}, {97, 49}, {112, 56}, {127, 49}, {146, 46},
- {132, 36}, {148, 34}, {164, 29}, {180, 28}, {198, 34}, {215, 32},
- {212, 22}, {196, 23}, {178, 17}, {161, 18}, {146, 24}, {130, 25},
- {126, 14}, {143, 13}, {159, 8}, {175, 6}, {194, 13}, {210, 11}
- }, {
- 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
- 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
- 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
- 4, 4, 4, 4, 4, 4
- }
-};
diff --git a/keyboards/adm42/rev4/rules.mk b/keyboards/adm42/rev4/rules.mk
index aad92997d0..6e7633bfe0 100644
--- a/keyboards/adm42/rev4/rules.mk
+++ b/keyboards/adm42/rev4/rules.mk
@@ -1 +1 @@
-RGB_MATRIX_ENABLE = yes
+# This file intentionally left blank
diff --git a/keyboards/adm42/rules.mk b/keyboards/adm42/rules.mk
index a2402f19a9..06fc88e9f6 100644
--- a/keyboards/adm42/rules.mk
+++ b/keyboards/adm42/rules.mk
@@ -1,15 +1 @@
-# Build Options
-# change yes to no to disable
-#
-BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
-MOUSEKEY_ENABLE = no # Mouse keys
-EXTRAKEY_ENABLE = yes # Audio control and System control
-CONSOLE_ENABLE = no # Console for debug
-COMMAND_ENABLE = no # Commands for debug and configuration
-NKRO_ENABLE = no # Enable N-Key Rollover
-BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
-RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
-AUDIO_ENABLE = no # Audio output
-LTO_ENABLE = yes
-
-DEFAULT_FOLDER = adm42/rev4
+DEFAULT_FOLDER = adm42/rev4 \ No newline at end of file
diff --git a/keyboards/aeboards/constellation/rev2/info.json b/keyboards/aeboards/constellation/rev2/info.json
index 87cb103d4a..b8dae5f20c 100644
--- a/keyboards/aeboards/constellation/rev2/info.json
+++ b/keyboards/aeboards/constellation/rev2/info.json
@@ -13,6 +13,9 @@
"rows": ["B15", "A14", "A2", "B13", "B14"]
},
"diode_direction": "COL2ROW",
+ "eeprom": {
+ "driver": "i2c"
+ },
"processor": "STM32L422",
"bootloader": "stm32-dfu",
"layout_aliases": {
diff --git a/keyboards/aeboards/constellation/rev2/rules.mk b/keyboards/aeboards/constellation/rev2/rules.mk
index 0fa89d45d2..c12086843f 100755
--- a/keyboards/aeboards/constellation/rev2/rules.mk
+++ b/keyboards/aeboards/constellation/rev2/rules.mk
@@ -9,5 +9,3 @@ COMMAND_ENABLE = no # Commands for debug and configuration
NKRO_ENABLE = yes # Enable N-Key Rollover
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
AUDIO_ENABLE = no # Audio output
-
-EEPROM_DRIVER = i2c
diff --git a/keyboards/aeboards/ext65/rev1/info.json b/keyboards/aeboards/ext65/rev1/info.json
index ffe8d2443e..0e110e9235 100644
--- a/keyboards/aeboards/ext65/rev1/info.json
+++ b/keyboards/aeboards/ext65/rev1/info.json
@@ -14,8 +14,11 @@
"cols": ["B2", "B3", "B1", "B0", "F7", "F0", "F1", "F4", "F5", "F6"],
"rows": ["C6", "C7", "B5", "B6", "D7", "B4", "D4", "D6", "B7", "E6"]
},
+ "layout_aliases": {
+ "LAYOUT_ext65": "LAYOUT"
+ },
"layouts": {
- "LAYOUT_ext65": {
+ "LAYOUT": {
"layout": [
{"matrix": [0, 0], "x": 0, "y": 0},
{"matrix": [1, 0], "x": 1, "y": 0},
diff --git a/keyboards/aeboards/ext65/rev1/keymaps/default/keymap.c b/keyboards/aeboards/ext65/rev1/keymaps/default/keymap.c
index c931729258..e246b5c471 100644
--- a/keyboards/aeboards/ext65/rev1/keymaps/default/keymap.c
+++ b/keyboards/aeboards/ext65/rev1/keymaps/default/keymap.c
@@ -29,7 +29,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | . | 0 | | Ctrl | Win | Alt | Space | FN | Ctrl | |Left| Dn | Rght|
* `------------------------------------------------------------------------------------------'
*/
- [0] = LAYOUT_ext65(
+ [0] = LAYOUT(
KC_PMNS, KC_PAST, KC_PSLS, KC_NUM, KC_ESC , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_MINS, KC_EQL , KC_BSLS, KC_GRV , KC_PSCR,
KC_PPLS, KC_P9 , KC_P8 , KC_P7 , KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_LBRC, KC_RBRC, KC_BSPC, KC_DEL ,
KC_PPLS, KC_P6 , KC_P5 , KC_P4 , KC_CAPS, KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN, KC_QUOT, KC_ENT , KC_PGUP,
@@ -37,27 +37,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_PENT, KC_PDOT, KC_P0 , KC_P0 , KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , MO(1) , KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
),
- [1] = LAYOUT_ext65(
+ [1] = LAYOUT(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, QK_BOOT,
KC_TRNS, RGB_TOG, RGB_MOD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, EE_CLR,
KC_TRNS, RGB_HUI, RGB_SAI, RGB_VAI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, DB_TOGG,
KC_TRNS, RGB_HUD, RGB_SAD, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
- ),
-
- [2] = LAYOUT_ext65(
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
- ),
-
- [3] = LAYOUT_ext65(
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
)
};
diff --git a/keyboards/aeboards/ext65/rev1/keymaps/via/keymap.c b/keyboards/aeboards/ext65/rev1/keymaps/via/keymap.c
index c931729258..e246b5c471 100644
--- a/keyboards/aeboards/ext65/rev1/keymaps/via/keymap.c
+++ b/keyboards/aeboards/ext65/rev1/keymaps/via/keymap.c
@@ -29,7 +29,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | . | 0 | | Ctrl | Win | Alt | Space | FN | Ctrl | |Left| Dn | Rght|
* `------------------------------------------------------------------------------------------'
*/
- [0] = LAYOUT_ext65(
+ [0] = LAYOUT(
KC_PMNS, KC_PAST, KC_PSLS, KC_NUM, KC_ESC , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_MINS, KC_EQL , KC_BSLS, KC_GRV , KC_PSCR,
KC_PPLS, KC_P9 , KC_P8 , KC_P7 , KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_LBRC, KC_RBRC, KC_BSPC, KC_DEL ,
KC_PPLS, KC_P6 , KC_P5 , KC_P4 , KC_CAPS, KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN, KC_QUOT, KC_ENT , KC_PGUP,
@@ -37,27 +37,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_PENT, KC_PDOT, KC_P0 , KC_P0 , KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , MO(1) , KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
),
- [1] = LAYOUT_ext65(
+ [1] = LAYOUT(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, QK_BOOT,
KC_TRNS, RGB_TOG, RGB_MOD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, EE_CLR,
KC_TRNS, RGB_HUI, RGB_SAI, RGB_VAI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, DB_TOGG,
KC_TRNS, RGB_HUD, RGB_SAD, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
- ),
-
- [2] = LAYOUT_ext65(
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
- ),
-
- [3] = LAYOUT_ext65(
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
)
};
diff --git a/keyboards/aeboards/ext65/rev2/config.h b/keyboards/aeboards/ext65/rev2/config.h
index 78d20f300f..c5149f5741 100644
--- a/keyboards/aeboards/ext65/rev2/config.h
+++ b/keyboards/aeboards/ext65/rev2/config.h
@@ -17,7 +17,7 @@
#pragma once
//SPI
-#define WS2812_SPI SPID2
+#define WS2812_SPI_DRIVER SPID2
#define WS2812_SPI_MOSI_PAL_MODE 0
#define WS2812_SPI_SCK_PAL_MODE 0
#define WS2812_SPI_SCK_PIN B13
diff --git a/keyboards/aeboards/ext65/rev2/info.json b/keyboards/aeboards/ext65/rev2/info.json
index d9d0ee62ee..ab229e19ec 100644
--- a/keyboards/aeboards/ext65/rev2/info.json
+++ b/keyboards/aeboards/ext65/rev2/info.json
@@ -38,8 +38,11 @@
"cols": ["B14", "B6", "A0", "B1", "B0", "A7", "A6", "A5", "A4", "A3"],
"rows": ["A10", "A9", "A8", "B7", "A2", "A1", "B12", "B11", "B10", "B2"]
},
+ "layout_aliases": {
+ "LAYOUT_ext65": "LAYOUT"
+ },
"layouts": {
- "LAYOUT_ext65": {
+ "LAYOUT": {
"layout": [
{"matrix": [0, 0], "x": 0, "y": 0},
{"matrix": [1, 0], "x": 1, "y": 0},
diff --git a/keyboards/aeboards/ext65/rev2/keymaps/default/keymap.c b/keyboards/aeboards/ext65/rev2/keymaps/default/keymap.c
index c931729258..e246b5c471 100644
--- a/keyboards/aeboards/ext65/rev2/keymaps/default/keymap.c
+++ b/keyboards/aeboards/ext65/rev2/keymaps/default/keymap.c
@@ -29,7 +29,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | . | 0 | | Ctrl | Win | Alt | Space | FN | Ctrl | |Left| Dn | Rght|
* `------------------------------------------------------------------------------------------'
*/
- [0] = LAYOUT_ext65(
+ [0] = LAYOUT(
KC_PMNS, KC_PAST, KC_PSLS, KC_NUM, KC_ESC , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_MINS, KC_EQL , KC_BSLS, KC_GRV , KC_PSCR,
KC_PPLS, KC_P9 , KC_P8 , KC_P7 , KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_LBRC, KC_RBRC, KC_BSPC, KC_DEL ,
KC_PPLS, KC_P6 , KC_P5 , KC_P4 , KC_CAPS, KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN, KC_QUOT, KC_ENT , KC_PGUP,
@@ -37,27 +37,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_PENT, KC_PDOT, KC_P0 , KC_P0 , KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , MO(1) , KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
),
- [1] = LAYOUT_ext65(
+ [1] = LAYOUT(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, QK_BOOT,
KC_TRNS, RGB_TOG, RGB_MOD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, EE_CLR,
KC_TRNS, RGB_HUI, RGB_SAI, RGB_VAI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, DB_TOGG,
KC_TRNS, RGB_HUD, RGB_SAD, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
- ),
-
- [2] = LAYOUT_ext65(
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
- ),
-
- [3] = LAYOUT_ext65(
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
)
};
diff --git a/keyboards/aeboards/ext65/rev2/keymaps/via/keymap.c b/keyboards/aeboards/ext65/rev2/keymaps/via/keymap.c
index c931729258..e246b5c471 100644
--- a/keyboards/aeboards/ext65/rev2/keymaps/via/keymap.c
+++ b/keyboards/aeboards/ext65/rev2/keymaps/via/keymap.c
@@ -29,7 +29,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | . | 0 | | Ctrl | Win | Alt | Space | FN | Ctrl | |Left| Dn | Rght|
* `------------------------------------------------------------------------------------------'
*/
- [0] = LAYOUT_ext65(
+ [0] = LAYOUT(
KC_PMNS, KC_PAST, KC_PSLS, KC_NUM, KC_ESC , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_MINS, KC_EQL , KC_BSLS, KC_GRV , KC_PSCR,
KC_PPLS, KC_P9 , KC_P8 , KC_P7 , KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_LBRC, KC_RBRC, KC_BSPC, KC_DEL ,
KC_PPLS, KC_P6 , KC_P5 , KC_P4 , KC_CAPS, KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN, KC_QUOT, KC_ENT , KC_PGUP,
@@ -37,27 +37,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_PENT, KC_PDOT, KC_P0 , KC_P0 , KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , MO(1) , KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
),
- [1] = LAYOUT_ext65(
+ [1] = LAYOUT(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, QK_BOOT,
KC_TRNS, RGB_TOG, RGB_MOD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, EE_CLR,
KC_TRNS, RGB_HUI, RGB_SAI, RGB_VAI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, DB_TOGG,
KC_TRNS, RGB_HUD, RGB_SAD, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
- ),
-
- [2] = LAYOUT_ext65(
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
- ),
-
- [3] = LAYOUT_ext65(
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
)
};
diff --git a/keyboards/aeboards/ext65/rev3/info.json b/keyboards/aeboards/ext65/rev3/info.json
index bb507545a0..0faf6fa135 100644
--- a/keyboards/aeboards/ext65/rev3/info.json
+++ b/keyboards/aeboards/ext65/rev3/info.json
@@ -19,8 +19,11 @@
"cols": ["F6", "F7", "B1", "B3", "B2", "D5", "D3", "D2", "D1", "D0"],
"rows": ["B5", "B6", "C6", "C7", "E6", "B0", "B4", "D7", "D4", "D6"]
},
+ "layout_aliases": {
+ "LAYOUT_ext65_hotswap": "LAYOUT"
+ },
"layouts": {
- "LAYOUT_ext65_hotswap": {
+ "LAYOUT": {
"layout": [
{"matrix": [0, 0], "x": 0, "y": 0},
{"matrix": [1, 0], "x": 1, "y": 0},
diff --git a/keyboards/aeboards/ext65/rev3/keymaps/default/keymap.c b/keyboards/aeboards/ext65/rev3/keymaps/default/keymap.c
index 72a10cae1b..ac6dd4dfed 100644
--- a/keyboards/aeboards/ext65/rev3/keymaps/default/keymap.c
+++ b/keyboards/aeboards/ext65/rev3/keymaps/default/keymap.c
@@ -29,7 +29,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | . | 0 | | Ctrl | Win | Alt | Space | FN | Ctrl | |Left| Dn | Rght|
* `------------------------------------------------------------------------------------------'
*/
- [0] = LAYOUT_ext65_hotswap(
+ [0] = LAYOUT(
KC_PMNS, KC_PAST, KC_PSLS, KC_NUM, 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_PSCR,
KC_PPLS, KC_P9 , KC_P8 , KC_P7 , KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL ,
KC_P6 , KC_P5 , KC_P4 , KC_CAPS, KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN, KC_QUOT, KC_ENT , KC_PGUP,
@@ -37,27 +37,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_PDOT, KC_P0 , KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , MO(1) , KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
),
- [1] = LAYOUT_ext65_hotswap(
+ [1] = LAYOUT(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, QK_BOOT,
KC_TRNS, RGB_TOG, RGB_MOD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, EE_CLR,
RGB_HUI, RGB_SAI, RGB_VAI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, DB_TOGG,
KC_TRNS, RGB_HUD, RGB_SAD, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
- ),
-
- [2] = LAYOUT_ext65_hotswap(
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
- ),
-
- [3] = LAYOUT_ext65_hotswap(
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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/aeboards/ext65/rev3/keymaps/via/keymap.c b/keyboards/aeboards/ext65/rev3/keymaps/via/keymap.c
index 72a10cae1b..ac6dd4dfed 100644
--- a/keyboards/aeboards/ext65/rev3/keymaps/via/keymap.c
+++ b/keyboards/aeboards/ext65/rev3/keymaps/via/keymap.c
@@ -29,7 +29,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | . | 0 | | Ctrl | Win | Alt | Space | FN | Ctrl | |Left| Dn | Rght|
* `------------------------------------------------------------------------------------------'
*/
- [0] = LAYOUT_ext65_hotswap(
+ [0] = LAYOUT(
KC_PMNS, KC_PAST, KC_PSLS, KC_NUM, 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_PSCR,
KC_PPLS, KC_P9 , KC_P8 , KC_P7 , KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL ,
KC_P6 , KC_P5 , KC_P4 , KC_CAPS, KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN, KC_QUOT, KC_ENT , KC_PGUP,
@@ -37,27 +37,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_PDOT, KC_P0 , KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , MO(1) , KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
),
- [1] = LAYOUT_ext65_hotswap(
+ [1] = LAYOUT(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, QK_BOOT,
KC_TRNS, RGB_TOG, RGB_MOD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, EE_CLR,
RGB_HUI, RGB_SAI, RGB_VAI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, DB_TOGG,
KC_TRNS, RGB_HUD, RGB_SAD, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
- ),
-
- [2] = LAYOUT_ext65_hotswap(
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
- ),
-
- [3] = LAYOUT_ext65_hotswap(
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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/aeboards/satellite/rev1/config.h b/keyboards/aeboards/satellite/rev1/config.h
index 508689faf5..5eb44a5f53 100644
--- a/keyboards/aeboards/satellite/rev1/config.h
+++ b/keyboards/aeboards/satellite/rev1/config.h
@@ -17,10 +17,10 @@
#pragma once
//RGB Matrix defines
-#define DRIVER_ADDR_1 0x74
-#define DRIVER_ADDR_2 0x76
+#define DRIVER_ADDR_1 IS31FL3731_I2C_ADDRESS_GND
+#define DRIVER_ADDR_2 IS31FL3731_I2C_ADDRESS_SDA
-#define DRIVER_COUNT 2
+#define IS31FL3731_DRIVER_COUNT 2
#define DRIVER_1_LED_TOTAL 36
#define DRIVER_2_LED_TOTAL 36
#define ISSI_DRIVER_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
diff --git a/keyboards/aeboards/satellite/rev1/rev1.c b/keyboards/aeboards/satellite/rev1/rev1.c
index 785fa8af9f..7260bdc67b 100644
--- a/keyboards/aeboards/satellite/rev1/rev1.c
+++ b/keyboards/aeboards/satellite/rev1/rev1.c
@@ -18,7 +18,7 @@
#include "drivers/led/issi/is31fl3731.h"
#ifdef RGB_MATRIX_ENABLE
-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/keyboards/aeboards/satellite/rev1/rules.mk b/keyboards/aeboards/satellite/rev1/rules.mk
index 1a4657b08c..f95b0f015d 100644
--- a/keyboards/aeboards/satellite/rev1/rules.mk
+++ b/keyboards/aeboards/satellite/rev1/rules.mk
@@ -18,4 +18,4 @@ COMMON_VPATH += $(DRIVER_PATH)/issi
# project specific files
SRC += drivers/led/issi/is31fl3731.c
-QUANTUM_LIB_SRC += i2c_master.c
+I2C_DRIVER_REQUIRED = yes
diff --git a/keyboards/akko/5108/5108.c b/keyboards/akko/5108/5108.c
index a14f02bc76..91f53e1e55 100644
--- a/keyboards/akko/5108/5108.c
+++ b/keyboards/akko/5108/5108.c
@@ -17,8 +17,8 @@
#include "quantum.h"
// clang-format off
#ifdef RGB_MATRIX_ENABLE
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to IS31 manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | R location
* | | G location
diff --git a/keyboards/akko/5108/config.h b/keyboards/akko/5108/config.h
index f56e825e05..73c7c27939 100644
--- a/keyboards/akko/5108/config.h
+++ b/keyboards/akko/5108/config.h
@@ -16,9 +16,6 @@
#pragma once
-/* Use 5 dynamic keymap layers */
-#define DYNAMIC_KEYMAP_LAYER_COUNT 6
-
/* LED Indicators */
#define LED_WIN_LOCK_PIN C11
@@ -35,12 +32,11 @@
#define SPI_MOSI_PAL_MODE 5
#define EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN C12
-#define WEAR_LEVELING_BACKING_SIZE (8 * 1024)
/* I2C Config for LED Driver */
-#define DRIVER_COUNT 2
-#define DRIVER_ADDR_1 0b1110100
-#define DRIVER_ADDR_2 0b1110111
+#define SNLED27351_DRIVER_COUNT 2
+#define DRIVER_ADDR_1 SNLED27351_I2C_ADDRESS_GND
+#define DRIVER_ADDR_2 SNLED27351_I2C_ADDRESS_VDDIO
#define I2C1_SCL_PAL_MODE 4
#define I2C1_OPMODE OPMODE_I2C
#define I2C1_CLOCK_SPEED 400000 /* 400000 */
diff --git a/keyboards/akko/5108/info.json b/keyboards/akko/5108/info.json
index 7049b20a64..662a949a53 100644
--- a/keyboards/akko/5108/info.json
+++ b/keyboards/akko/5108/info.json
@@ -26,12 +26,22 @@
"rows": ["B15", "C6", "C7", "C8", "C9", "A8"]
},
"diode_direction": "ROW2COL",
+ "dynamic_keymap": {
+ "layer_count": 6
+ },
+ "eeprom": {
+ "driver": "wear_leveling",
+ "wear_leveling": {
+ "driver": "spi_flash",
+ "backing_size": 8192
+ }
+ },
"indicators": {
"num_lock": "A15",
"caps_lock": "C10"
},
"rgb_matrix": {
- "driver": "is31fl3733",
+ "driver": "snled27351",
"max_brightness": 180,
"animations": {
"breathing": true,
diff --git a/keyboards/akko/5108/rules.mk b/keyboards/akko/5108/rules.mk
index 24d5f6f52e..6e7633bfe0 100644
--- a/keyboards/akko/5108/rules.mk
+++ b/keyboards/akko/5108/rules.mk
@@ -1,2 +1 @@
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = spi_flash
+# This file intentionally left blank
diff --git a/keyboards/akko/acr87/acr87.c b/keyboards/akko/acr87/acr87.c
index e175e21368..7ee9ec6470 100644
--- a/keyboards/akko/acr87/acr87.c
+++ b/keyboards/akko/acr87/acr87.c
@@ -17,8 +17,8 @@
#include "quantum.h"
// clang-format off
#ifdef RGB_MATRIX_ENABLE
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to IS31 manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | R location
* | | G location
diff --git a/keyboards/akko/acr87/config.h b/keyboards/akko/acr87/config.h
index 221cad86ad..1ff3380d6a 100644
--- a/keyboards/akko/acr87/config.h
+++ b/keyboards/akko/acr87/config.h
@@ -16,9 +16,6 @@
#pragma once
-/* Use 5 dynamic keymap layers */
-#define DYNAMIC_KEYMAP_LAYER_COUNT 6
-
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE
/* Locking resynchronize hack */
@@ -32,13 +29,12 @@
#define SPI_MOSI_PAL_MODE 5
#define EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN C12
-#define WEAR_LEVELING_BACKING_SIZE (8 * 1024)
/* I2C Config for LED Driver */
-#define DRIVER_COUNT 3
-#define DRIVER_ADDR_1 0b1110100
-#define DRIVER_ADDR_2 0b1110111
-#define DRIVER_ADDR_3 0b1110110
+#define SNLED27351_DRIVER_COUNT 3
+#define DRIVER_ADDR_1 SNLED27351_I2C_ADDRESS_GND
+#define DRIVER_ADDR_2 SNLED27351_I2C_ADDRESS_VDDIO
+#define DRIVER_ADDR_3 SNLED27351_I2C_ADDRESS_SDA
#define I2C1_SCL_PAL_MODE 4
#define I2C1_OPMODE OPMODE_I2C
diff --git a/keyboards/akko/acr87/info.json b/keyboards/akko/acr87/info.json
index 5ff1926d0c..5ccb0c3f73 100644
--- a/keyboards/akko/acr87/info.json
+++ b/keyboards/akko/acr87/info.json
@@ -26,8 +26,18 @@
"rows": [ "B15", "C6", "C7", "C8", "C9", "A8"]
},
"diode_direction": "ROW2COL",
+ "dynamic_keymap": {
+ "layer_count": 6
+ },
+ "eeprom": {
+ "driver": "wear_leveling",
+ "wear_leveling": {
+ "driver": "spi_flash",
+ "backing_size": 8192
+ }
+ },
"rgb_matrix": {
- "driver": "is31fl3733",
+ "driver": "snled27351",
"max_brightness": 180,
"animations": {
"breathing": true,
diff --git a/keyboards/akko/acr87/rules.mk b/keyboards/akko/acr87/rules.mk
index 0dc7a33142..6e7633bfe0 100644
--- a/keyboards/akko/acr87/rules.mk
+++ b/keyboards/akko/acr87/rules.mk
@@ -1,3 +1 @@
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = spi_flash
-
+# This file intentionally left blank
diff --git a/keyboards/akko/top40/config.h b/keyboards/akko/top40/config.h
index bd849292e6..fd10534ce7 100644
--- a/keyboards/akko/top40/config.h
+++ b/keyboards/akko/top40/config.h
@@ -16,9 +16,6 @@
#pragma once
-/* Use 5 dynamic keymap layers */
-#define DYNAMIC_KEYMAP_LAYER_COUNT 6
-
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE
/* Locking resynchronize hack */
@@ -32,12 +29,11 @@
#define SPI_MOSI_PAL_MODE 5
#define EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN C12
-#define WEAR_LEVELING_BACKING_SIZE (8 * 1024)
/* I2C Config for LED Driver */
-#define DRIVER_COUNT 2
-#define DRIVER_ADDR_1 0b1110100
-#define DRIVER_ADDR_2 0b1110111
+#define SNLED27351_DRIVER_COUNT 2
+#define DRIVER_ADDR_1 SNLED27351_I2C_ADDRESS_GND
+#define DRIVER_ADDR_2 SNLED27351_I2C_ADDRESS_VDDIO
#define I2C1_SCL_PAL_MODE 4
#define I2C1_OPMODE OPMODE_I2C
#define I2C1_CLOCK_SPEED 400000 /* 400000 */
diff --git a/keyboards/akko/top40/info.json b/keyboards/akko/top40/info.json
index 48252e6c77..243952ccc8 100644
--- a/keyboards/akko/top40/info.json
+++ b/keyboards/akko/top40/info.json
@@ -26,8 +26,18 @@
"rows": ["C7", "C8", "C9", "A8"]
},
"diode_direction": "ROW2COL",
+ "dynamic_keymap": {
+ "layer_count": 6
+ },
+ "eeprom": {
+ "driver": "wear_leveling",
+ "wear_leveling": {
+ "driver": "spi_flash",
+ "backing_size": 8192
+ }
+ },
"rgb_matrix": {
- "driver": "is31fl3733",
+ "driver": "snled27351",
"max_brightness": 180,
"animations": {
"breathing": true,
diff --git a/keyboards/akko/top40/rules.mk b/keyboards/akko/top40/rules.mk
index b753f0682e..6e7633bfe0 100644
--- a/keyboards/akko/top40/rules.mk
+++ b/keyboards/akko/top40/rules.mk
@@ -1,6 +1 @@
-# Build Options
-# change yes to no to disable
-#
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = spi_flash
-
+# This file intentionally left blank
diff --git a/keyboards/akko/top40/top40.c b/keyboards/akko/top40/top40.c
index 7fe193447d..028e4bdd05 100644
--- a/keyboards/akko/top40/top40.c
+++ b/keyboards/akko/top40/top40.c
@@ -17,8 +17,8 @@
#include "quantum.h"
// clang-format off
#ifdef RGB_MATRIX_ENABLE
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to IS31 manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | R location
* | | G location
diff --git a/keyboards/anavi/knob1/rules.mk b/keyboards/anavi/knob1/rules.mk
index 0e5631b02b..dd68e9d3b0 100644
--- a/keyboards/anavi/knob1/rules.mk
+++ b/keyboards/anavi/knob1/rules.mk
@@ -1,3 +1 @@
OLED_ENABLE = yes
-
-OPT_DEFS += -DHAL_USE_I2C=TRUE
diff --git a/keyboards/anavi/knobs3/rules.mk b/keyboards/anavi/knobs3/rules.mk
index 0e5631b02b..dd68e9d3b0 100644
--- a/keyboards/anavi/knobs3/rules.mk
+++ b/keyboards/anavi/knobs3/rules.mk
@@ -1,3 +1 @@
OLED_ENABLE = yes
-
-OPT_DEFS += -DHAL_USE_I2C=TRUE
diff --git a/keyboards/annepro2/annepro2_ble.c b/keyboards/annepro2/annepro2_ble.c
index 375f551cc2..b04929e958 100644
--- a/keyboards/annepro2/annepro2_ble.c
+++ b/keyboards/annepro2/annepro2_ble.c
@@ -167,5 +167,5 @@ static void ap2_ble_extra(report_extra_t *report) {
static void ap2_ble_keyboard(report_keyboard_t *report) {
sdPut(&SD1, 0x0);
sdWrite(&SD1, ble_mcu_send_report, sizeof(ble_mcu_send_report));
- sdWrite(&SD1, &report->raw[0], KEYBOARD_REPORT_SIZE);
+ sdWrite(&SD1, (uint8_t *)report, KEYBOARD_REPORT_SIZE);
}
diff --git a/keyboards/annepro2/c15/config.h b/keyboards/annepro2/c15/config.h
index ea38f4dce3..f488b9d8f3 100644
--- a/keyboards/annepro2/c15/config.h
+++ b/keyboards/annepro2/c15/config.h
@@ -57,7 +57,3 @@
#define EXTERNAL_FLASH_SECTOR_SIZE 4096
#define EXTERNAL_FLASH_BLOCK_SIZE 4096
#define EXTERNAL_FLASH_SIZE (256 * 1024) // 2M-bit flash size
-
-// Wear-leveling driver configuration
-#define WEAR_LEVELING_LOGICAL_SIZE 1024
-#define WEAR_LEVELING_BACKING_SIZE (WEAR_LEVELING_LOGICAL_SIZE * 2)
diff --git a/keyboards/annepro2/c15/info.json b/keyboards/annepro2/c15/info.json
index 15c3ca8ba1..b7624dd6c5 100644
--- a/keyboards/annepro2/c15/info.json
+++ b/keyboards/annepro2/c15/info.json
@@ -3,6 +3,13 @@
"usb": {
"pid": "0xAC15"
},
+ "eeprom": {
+ "driver": "wear_leveling",
+ "wear_leveling": {
+ "driver": "spi_flash",
+ "backing_size": 2048
+ }
+ },
"rgb_matrix": {
"driver": "custom"
},
diff --git a/keyboards/annepro2/c15/rules.mk b/keyboards/annepro2/c15/rules.mk
index 05b715e034..8694893ac2 100644
--- a/keyboards/annepro2/c15/rules.mk
+++ b/keyboards/annepro2/c15/rules.mk
@@ -26,10 +26,6 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
AUDIO_ENABLE = no # Audio output
-# Wear-levelling driver
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = spi_flash
-
# Custom RGB matrix handling
RGB_MATRIX_ENABLE = yes
diff --git a/keyboards/annepro2/c18/config.h b/keyboards/annepro2/c18/config.h
index 6b6307c3d0..36f4a25c8d 100644
--- a/keyboards/annepro2/c18/config.h
+++ b/keyboards/annepro2/c18/config.h
@@ -55,7 +55,3 @@
#define EXTERNAL_FLASH_SECTOR_SIZE 4096
#define EXTERNAL_FLASH_BLOCK_SIZE 4096
#define EXTERNAL_FLASH_SIZE (256 * 1024) // 2M-bit flash size
-
-// Wear-leveling driver configuration
-#define WEAR_LEVELING_LOGICAL_SIZE 1024
-#define WEAR_LEVELING_BACKING_SIZE (WEAR_LEVELING_LOGICAL_SIZE * 2)
diff --git a/keyboards/annepro2/c18/info.json b/keyboards/annepro2/c18/info.json
index f7acff808c..c8f524e3cf 100644
--- a/keyboards/annepro2/c18/info.json
+++ b/keyboards/annepro2/c18/info.json
@@ -3,6 +3,13 @@
"usb": {
"pid": "0xAC18"
},
+ "eeprom": {
+ "driver": "wear_leveling",
+ "wear_leveling": {
+ "driver": "spi_flash",
+ "backing_size": 2048
+ }
+ },
"rgb_matrix": {
"driver": "custom"
},
diff --git a/keyboards/annepro2/c18/rules.mk b/keyboards/annepro2/c18/rules.mk
index 1d53851df6..dab7269570 100644
--- a/keyboards/annepro2/c18/rules.mk
+++ b/keyboards/annepro2/c18/rules.mk
@@ -26,10 +26,6 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
AUDIO_ENABLE = no # Audio output
-# Wear-levelling driver
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = spi_flash
-
# Custom RGB matrix handling
RGB_MATRIX_ENABLE = yes
diff --git a/keyboards/axolstudio/yeti/hotswap/config.h b/keyboards/axolstudio/yeti/hotswap/config.h
index 694a6449f0..66599c89f0 100644
--- a/keyboards/axolstudio/yeti/hotswap/config.h
+++ b/keyboards/axolstudio/yeti/hotswap/config.h
@@ -61,7 +61,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
# define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
# define RGB_MATRIX_LED_FLUSH_LIMIT 16 // 16 is equivalent to limiting to 60fps
# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
-# define DRIVER_ADDR_1 0b1010000
-# define DRIVER_COUNT 1
+# define DRIVER_ADDR_1 IS31FL3733_I2C_ADDRESS_GND_GND
+# define IS31FL3733_DRIVER_COUNT 1
# define RGB_MATRIX_LED_COUNT 64
#endif
diff --git a/keyboards/axolstudio/yeti/hotswap/hotswap.c b/keyboards/axolstudio/yeti/hotswap/hotswap.c
index 98d37290e6..527bec17ee 100644
--- a/keyboards/axolstudio/yeti/hotswap/hotswap.c
+++ b/keyboards/axolstudio/yeti/hotswap/hotswap.c
@@ -17,7 +17,7 @@
#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
-const is31_led g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3733_led_t g_is31fl3733_leds[RGB_MATRIX_LED_COUNT] = {
{ 0, B_1, A_1, C_1 },
{ 0, B_2, A_2, C_2 },
{ 0, B_3, A_3, C_3 },
diff --git a/keyboards/bajjak/rules.mk b/keyboards/bajjak/rules.mk
index 13148ecb04..21db4112e0 100644
--- a/keyboards/bajjak/rules.mk
+++ b/keyboards/bajjak/rules.mk
@@ -26,4 +26,4 @@ AUDIO_SUPPORTED = no
# project specific files
SRC += matrix.c
-QUANTUM_LIB_SRC += i2c_master.c
+I2C_DRIVER_REQUIRED = yes
diff --git a/keyboards/barleycorn_smd/rules.mk b/keyboards/barleycorn_smd/rules.mk
index 173368a047..69ecebae2a 100644
--- a/keyboards/barleycorn_smd/rules.mk
+++ b/keyboards/barleycorn_smd/rules.mk
@@ -14,4 +14,4 @@ AUDIO_ENABLE = no # Audio output
CUSTOM_MATRIX = lite
SRC += matrix.c
-QUANTUM_LIB_SRC += i2c_master.c
+I2C_DRIVER_REQUIRED = yes
diff --git a/keyboards/bastardkb/charybdis/3x5/blackpill/info.json b/keyboards/bastardkb/charybdis/3x5/blackpill/info.json
index 89e181b8f9..a20b2ce636 100644
--- a/keyboards/bastardkb/charybdis/3x5/blackpill/info.json
+++ b/keyboards/bastardkb/charybdis/3x5/blackpill/info.json
@@ -3,6 +3,9 @@
"usb": {
"device_version": "1.0.0"
},
+ "eeprom": {
+ "driver": "spi"
+ },
"rgb_matrix": {
"driver": "ws2812"
},
diff --git a/keyboards/bastardkb/charybdis/3x5/blackpill/rules.mk b/keyboards/bastardkb/charybdis/3x5/blackpill/rules.mk
index 9cc216bb71..4bd570ddd8 100644
--- a/keyboards/bastardkb/charybdis/3x5/blackpill/rules.mk
+++ b/keyboards/bastardkb/charybdis/3x5/blackpill/rules.mk
@@ -23,5 +23,4 @@ POINTING_DEVICE_DRIVER = pmw3360
MOUSE_SHARED_EP = no # Unify multiple HID interfaces into a single Endpoint
KEYBOARD_SHARED_EP = yes
-EEPROM_DRIVER = spi
SERIAL_DRIVER = usart
diff --git a/keyboards/bastardkb/charybdis/3x5/v2/splinky_2/rules.mk b/keyboards/bastardkb/charybdis/3x5/v2/splinky_2/rules.mk
index 80098fbbf6..87a2d912b8 100644
--- a/keyboards/bastardkb/charybdis/3x5/v2/splinky_2/rules.mk
+++ b/keyboards/bastardkb/charybdis/3x5/v2/splinky_2/rules.mk
@@ -1,7 +1,3 @@
-# RP2040-specific options
-ALLOW_WARNINGS = yes
-PICO_INTRINSICS_ENABLED = no # ATM Unsupported by ChibiOS.
-
# Build Options
# change yes to no to disable
#
diff --git a/keyboards/bastardkb/charybdis/3x5/v2/splinky_3/rules.mk b/keyboards/bastardkb/charybdis/3x5/v2/splinky_3/rules.mk
index 80098fbbf6..87a2d912b8 100644
--- a/keyboards/bastardkb/charybdis/3x5/v2/splinky_3/rules.mk
+++ b/keyboards/bastardkb/charybdis/3x5/v2/splinky_3/rules.mk
@@ -1,7 +1,3 @@
-# RP2040-specific options
-ALLOW_WARNINGS = yes
-PICO_INTRINSICS_ENABLED = no # ATM Unsupported by ChibiOS.
-
# Build Options
# change yes to no to disable
#
diff --git a/keyboards/bastardkb/charybdis/3x6/blackpill/info.json b/keyboards/bastardkb/charybdis/3x6/blackpill/info.json
index 5ac7a1cdca..bda53275f8 100644
--- a/keyboards/bastardkb/charybdis/3x6/blackpill/info.json
+++ b/keyboards/bastardkb/charybdis/3x6/blackpill/info.json
@@ -3,6 +3,9 @@
"usb": {
"device_version": "1.0.0"
},
+ "eeprom": {
+ "driver": "spi"
+ },
"rgb_matrix": {
"driver": "ws2812"
},
diff --git a/keyboards/bastardkb/charybdis/3x6/blackpill/rules.mk b/keyboards/bastardkb/charybdis/3x6/blackpill/rules.mk
index 9cc216bb71..4bd570ddd8 100644
--- a/keyboards/bastardkb/charybdis/3x6/blackpill/rules.mk
+++ b/keyboards/bastardkb/charybdis/3x6/blackpill/rules.mk
@@ -23,5 +23,4 @@ POINTING_DEVICE_DRIVER = pmw3360
MOUSE_SHARED_EP = no # Unify multiple HID interfaces into a single Endpoint
KEYBOARD_SHARED_EP = yes
-EEPROM_DRIVER = spi
SERIAL_DRIVER = usart
diff --git a/keyboards/bastardkb/charybdis/3x6/v2/splinky_2/rules.mk b/keyboards/bastardkb/charybdis/3x6/v2/splinky_2/rules.mk
index 80098fbbf6..87a2d912b8 100644
--- a/keyboards/bastardkb/charybdis/3x6/v2/splinky_2/rules.mk
+++ b/keyboards/bastardkb/charybdis/3x6/v2/splinky_2/rules.mk
@@ -1,7 +1,3 @@
-# RP2040-specific options
-ALLOW_WARNINGS = yes
-PICO_INTRINSICS_ENABLED = no # ATM Unsupported by ChibiOS.
-
# Build Options
# change yes to no to disable
#
diff --git a/keyboards/bastardkb/charybdis/3x6/v2/splinky_3/rules.mk b/keyboards/bastardkb/charybdis/3x6/v2/splinky_3/rules.mk
index 80098fbbf6..87a2d912b8 100644
--- a/keyboards/bastardkb/charybdis/3x6/v2/splinky_3/rules.mk
+++ b/keyboards/bastardkb/charybdis/3x6/v2/splinky_3/rules.mk
@@ -1,7 +1,3 @@
-# RP2040-specific options
-ALLOW_WARNINGS = yes
-PICO_INTRINSICS_ENABLED = no # ATM Unsupported by ChibiOS.
-
# Build Options
# change yes to no to disable
#
diff --git a/keyboards/bastardkb/charybdis/4x6/blackpill/info.json b/keyboards/bastardkb/charybdis/4x6/blackpill/info.json
index b9fb103496..b4040e84a5 100644
--- a/keyboards/bastardkb/charybdis/4x6/blackpill/info.json
+++ b/keyboards/bastardkb/charybdis/4x6/blackpill/info.json
@@ -3,6 +3,9 @@
"usb": {
"device_version": "1.0.0"
},
+ "eeprom": {
+ "driver": "spi"
+ },
"rgb_matrix": {
"driver": "ws2812"
},
diff --git a/keyboards/bastardkb/charybdis/4x6/blackpill/rules.mk b/keyboards/bastardkb/charybdis/4x6/blackpill/rules.mk
index 1cfe4724b4..f8de9a3fb1 100644
--- a/keyboards/bastardkb/charybdis/4x6/blackpill/rules.mk
+++ b/keyboards/bastardkb/charybdis/4x6/blackpill/rules.mk
@@ -23,5 +23,4 @@ POINTING_DEVICE_DRIVER = pmw3360
MOUSE_SHARED_EP = no # Unify multiple HID interfaces into a single Endpoint
KEYBOARD_SHARED_EP = yes
-EEPROM_DRIVER = spi
SERIAL_DRIVER = usart
diff --git a/keyboards/bastardkb/charybdis/4x6/v2/splinky_2/rules.mk b/keyboards/bastardkb/charybdis/4x6/v2/splinky_2/rules.mk
index 80098fbbf6..87a2d912b8 100644
--- a/keyboards/bastardkb/charybdis/4x6/v2/splinky_2/rules.mk
+++ b/keyboards/bastardkb/charybdis/4x6/v2/splinky_2/rules.mk
@@ -1,7 +1,3 @@
-# RP2040-specific options
-ALLOW_WARNINGS = yes
-PICO_INTRINSICS_ENABLED = no # ATM Unsupported by ChibiOS.
-
# Build Options
# change yes to no to disable
#
diff --git a/keyboards/bastardkb/charybdis/4x6/v2/splinky_3/rules.mk b/keyboards/bastardkb/charybdis/4x6/v2/splinky_3/rules.mk
index 80098fbbf6..87a2d912b8 100644
--- a/keyboards/bastardkb/charybdis/4x6/v2/splinky_3/rules.mk
+++ b/keyboards/bastardkb/charybdis/4x6/v2/splinky_3/rules.mk
@@ -1,7 +1,3 @@
-# RP2040-specific options
-ALLOW_WARNINGS = yes
-PICO_INTRINSICS_ENABLED = no # ATM Unsupported by ChibiOS.
-
# Build Options
# change yes to no to disable
#
diff --git a/keyboards/bastardkb/dilemma/3x5_2/assembled/rules.mk b/keyboards/bastardkb/dilemma/3x5_2/assembled/rules.mk
index 5db74a9d84..b4722fc8e6 100644
--- a/keyboards/bastardkb/dilemma/3x5_2/assembled/rules.mk
+++ b/keyboards/bastardkb/dilemma/3x5_2/assembled/rules.mk
@@ -22,6 +22,3 @@ POINTING_DEVICE_ENABLE = yes
POINTING_DEVICE_DRIVER = cirque_pinnacle_spi # Assembled version uses SPI.
SPLIT_KEYBOARD = yes
-
-# RP2040-specific options
-PICO_INTRINSICS_ENABLED = no # ATM Unsupported by ChibiOS.
diff --git a/keyboards/bastardkb/dilemma/3x5_2/splinky/rules.mk b/keyboards/bastardkb/dilemma/3x5_2/splinky/rules.mk
index 1e33cc1086..227d42fa24 100644
--- a/keyboards/bastardkb/dilemma/3x5_2/splinky/rules.mk
+++ b/keyboards/bastardkb/dilemma/3x5_2/splinky/rules.mk
@@ -22,6 +22,3 @@ POINTING_DEVICE_ENABLE = yes
POINTING_DEVICE_DRIVER = cirque_pinnacle_i2c # DIY version uses I2C.
SPLIT_KEYBOARD = yes
-
-# RP2040-specific options
-PICO_INTRINSICS_ENABLED = no # ATM Unsupported by ChibiOS.
diff --git a/keyboards/bastardkb/dilemma/3x5_3/rules.mk b/keyboards/bastardkb/dilemma/3x5_3/rules.mk
index 2b52cffbf7..3cdb41160c 100644
--- a/keyboards/bastardkb/dilemma/3x5_3/rules.mk
+++ b/keyboards/bastardkb/dilemma/3x5_3/rules.mk
@@ -22,6 +22,3 @@ POINTING_DEVICE_ENABLE = yes
POINTING_DEVICE_DRIVER = cirque_pinnacle_spi
SPLIT_KEYBOARD = yes
-
-# RP2040-specific options
-PICO_INTRINSICS_ENABLED = no # ATM Unsupported by ChibiOS.
diff --git a/keyboards/bastardkb/scylla/blackpill/info.json b/keyboards/bastardkb/scylla/blackpill/info.json
index 24fb8bc701..8d7cb4c823 100644
--- a/keyboards/bastardkb/scylla/blackpill/info.json
+++ b/keyboards/bastardkb/scylla/blackpill/info.json
@@ -3,6 +3,9 @@
"usb": {
"device_version": "1.0.0"
},
+ "eeprom": {
+ "driver": "spi"
+ },
"rgb_matrix": {
"driver": "ws2812"
},
diff --git a/keyboards/bastardkb/scylla/blackpill/rules.mk b/keyboards/bastardkb/scylla/blackpill/rules.mk
index 8c0e9b5891..b5612ce38a 100644
--- a/keyboards/bastardkb/scylla/blackpill/rules.mk
+++ b/keyboards/bastardkb/scylla/blackpill/rules.mk
@@ -21,5 +21,4 @@ SPLIT_KEYBOARD = yes
MOUSE_SHARED_EP = no # Unify multiple HID interfaces into a single Endpoint
KEYBOARD_SHARED_EP = yes
-EEPROM_DRIVER = spi
SERIAL_DRIVER = usart
diff --git a/keyboards/bastardkb/scylla/v2/splinky_2/rules.mk b/keyboards/bastardkb/scylla/v2/splinky_2/rules.mk
index 274e95c039..53f4c0baa8 100644
--- a/keyboards/bastardkb/scylla/v2/splinky_2/rules.mk
+++ b/keyboards/bastardkb/scylla/v2/splinky_2/rules.mk
@@ -1,7 +1,3 @@
-# RP2040-specific options
-ALLOW_WARNINGS = yes
-PICO_INTRINSICS_ENABLED = no # ATM Unsupported by ChibiOS.
-
# Build Options
# change yes to no to disable
#
diff --git a/keyboards/bastardkb/scylla/v2/splinky_3/rules.mk b/keyboards/bastardkb/scylla/v2/splinky_3/rules.mk
index 274e95c039..53f4c0baa8 100644
--- a/keyboards/bastardkb/scylla/v2/splinky_3/rules.mk
+++ b/keyboards/bastardkb/scylla/v2/splinky_3/rules.mk
@@ -1,7 +1,3 @@
-# RP2040-specific options
-ALLOW_WARNINGS = yes
-PICO_INTRINSICS_ENABLED = no # ATM Unsupported by ChibiOS.
-
# Build Options
# change yes to no to disable
#
diff --git a/keyboards/bastardkb/skeletyl/blackpill/info.json b/keyboards/bastardkb/skeletyl/blackpill/info.json
index 1d25639281..c0f0d6a3b1 100644
--- a/keyboards/bastardkb/skeletyl/blackpill/info.json
+++ b/keyboards/bastardkb/skeletyl/blackpill/info.json
@@ -3,6 +3,9 @@
"usb": {
"device_version": "1.0.0"
},
+ "eeprom": {
+ "driver": "spi"
+ },
"rgb_matrix": {
"driver": "ws2812"
},
diff --git a/keyboards/bastardkb/skeletyl/blackpill/rules.mk b/keyboards/bastardkb/skeletyl/blackpill/rules.mk
index 8c0e9b5891..b5612ce38a 100644
--- a/keyboards/bastardkb/skeletyl/blackpill/rules.mk
+++ b/keyboards/bastardkb/skeletyl/blackpill/rules.mk
@@ -21,5 +21,4 @@ SPLIT_KEYBOARD = yes
MOUSE_SHARED_EP = no # Unify multiple HID interfaces into a single Endpoint
KEYBOARD_SHARED_EP = yes
-EEPROM_DRIVER = spi
SERIAL_DRIVER = usart
diff --git a/keyboards/bastardkb/skeletyl/v2/splinky_2/rules.mk b/keyboards/bastardkb/skeletyl/v2/splinky_2/rules.mk
index 274e95c039..53f4c0baa8 100644
--- a/keyboards/bastardkb/skeletyl/v2/splinky_2/rules.mk
+++ b/keyboards/bastardkb/skeletyl/v2/splinky_2/rules.mk
@@ -1,7 +1,3 @@
-# RP2040-specific options
-ALLOW_WARNINGS = yes
-PICO_INTRINSICS_ENABLED = no # ATM Unsupported by ChibiOS.
-
# Build Options
# change yes to no to disable
#
diff --git a/keyboards/bastardkb/skeletyl/v2/splinky_3/rules.mk b/keyboards/bastardkb/skeletyl/v2/splinky_3/rules.mk
index 274e95c039..53f4c0baa8 100644
--- a/keyboards/bastardkb/skeletyl/v2/splinky_3/rules.mk
+++ b/keyboards/bastardkb/skeletyl/v2/splinky_3/rules.mk
@@ -1,7 +1,3 @@
-# RP2040-specific options
-ALLOW_WARNINGS = yes
-PICO_INTRINSICS_ENABLED = no # ATM Unsupported by ChibiOS.
-
# Build Options
# change yes to no to disable
#
diff --git a/keyboards/bastardkb/tbkmini/blackpill/info.json b/keyboards/bastardkb/tbkmini/blackpill/info.json
index dcdce8f63b..c410460857 100644
--- a/keyboards/bastardkb/tbkmini/blackpill/info.json
+++ b/keyboards/bastardkb/tbkmini/blackpill/info.json
@@ -3,6 +3,9 @@
"usb": {
"device_version": "1.0.0"
},
+ "eeprom": {
+ "driver": "spi"
+ },
"rgb_matrix": {
"driver": "ws2812"
},
diff --git a/keyboards/bastardkb/tbkmini/blackpill/rules.mk b/keyboards/bastardkb/tbkmini/blackpill/rules.mk
index 8c0e9b5891..b5612ce38a 100644
--- a/keyboards/bastardkb/tbkmini/blackpill/rules.mk
+++ b/keyboards/bastardkb/tbkmini/blackpill/rules.mk
@@ -21,5 +21,4 @@ SPLIT_KEYBOARD = yes
MOUSE_SHARED_EP = no # Unify multiple HID interfaces into a single Endpoint
KEYBOARD_SHARED_EP = yes
-EEPROM_DRIVER = spi
SERIAL_DRIVER = usart
diff --git a/keyboards/bastardkb/tbkmini/v2/splinky_2/rules.mk b/keyboards/bastardkb/tbkmini/v2/splinky_2/rules.mk
index 274e95c039..53f4c0baa8 100644
--- a/keyboards/bastardkb/tbkmini/v2/splinky_2/rules.mk
+++ b/keyboards/bastardkb/tbkmini/v2/splinky_2/rules.mk
@@ -1,7 +1,3 @@
-# RP2040-specific options
-ALLOW_WARNINGS = yes
-PICO_INTRINSICS_ENABLED = no # ATM Unsupported by ChibiOS.
-
# Build Options
# change yes to no to disable
#
diff --git a/keyboards/bastardkb/tbkmini/v2/splinky_3/rules.mk b/keyboards/bastardkb/tbkmini/v2/splinky_3/rules.mk
index 274e95c039..53f4c0baa8 100644
--- a/keyboards/bastardkb/tbkmini/v2/splinky_3/rules.mk
+++ b/keyboards/bastardkb/tbkmini/v2/splinky_3/rules.mk
@@ -1,7 +1,3 @@
-# RP2040-specific options
-ALLOW_WARNINGS = yes
-PICO_INTRINSICS_ENABLED = no # ATM Unsupported by ChibiOS.
-
# Build Options
# change yes to no to disable
#
diff --git a/keyboards/bemeier/bmek/config.h b/keyboards/bemeier/bmek/config.h
index 4553454096..1deca961a0 100755
--- a/keyboards/bemeier/bmek/config.h
+++ b/keyboards/bemeier/bmek/config.h
@@ -15,6 +15,4 @@
*/
#pragma once
-
-#define DYNAMIC_KEYMAP_LAYER_COUNT 5
#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 20
diff --git a/keyboards/bemeier/bmek/info.json b/keyboards/bemeier/bmek/info.json
index 0959f9f3a6..31d2b5f9bd 100755
--- a/keyboards/bemeier/bmek/info.json
+++ b/keyboards/bemeier/bmek/info.json
@@ -7,6 +7,9 @@
"vid": "0x626D",
"pid": "0x656B"
},
+ "dynamic_keymap": {
+ "layer_count": 5
+ },
"layouts": {
"LAYOUT_all": {
"layout": [
diff --git a/keyboards/binepad/bn006/config.h b/keyboards/binepad/bn006/config.h
index 41c3822655..0569ccff03 100755
--- a/keyboards/binepad/bn006/config.h
+++ b/keyboards/binepad/bn006/config.h
@@ -4,14 +4,6 @@
#pragma once
/*
- * Wear Leveling EEPROM Emulation
- */
-
-#define WEAR_LEVELING_LOGICAL_SIZE 2048 // Number of bytes "exposed" to the rest of QMK and denotes the size of the usable EEPROM.
-#define WEAR_LEVELING_BACKING_SIZE (WEAR_LEVELING_LOGICAL_SIZE * 2) // Number of bytes used by the wear-leveling algorithm for its underlying storage, and needs to be a multiple of the logical size.
-
-
-/*
* RGB Matrix
*/
diff --git a/keyboards/binepad/bn006/info.json b/keyboards/binepad/bn006/info.json
index 756b82e330..81e68d2e0c 100755
--- a/keyboards/binepad/bn006/info.json
+++ b/keyboards/binepad/bn006/info.json
@@ -24,6 +24,11 @@
"pid": "0x426E",
"device_version": "1.0.0"
},
+ "eeprom": {
+ "wear_leveling": {
+ "backing_size": 4096
+ }
+ },
"ws2812": {
"pin": "B15"
},
diff --git a/keyboards/binepad/bn006/rules.mk b/keyboards/binepad/bn006/rules.mk
index 58561c984b..7ff128fa69 100755
--- a/keyboards/binepad/bn006/rules.mk
+++ b/keyboards/binepad/bn006/rules.mk
@@ -1,5 +1 @@
-# Copyright 2022 Binepad (@binpad)
-# SPDX-License-Identifier: GPL-2.0-or-later
-
-EPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = embedded_flash
+# This file intentionally left blank \ No newline at end of file
diff --git a/keyboards/binepad/bn009/r2/config.h b/keyboards/binepad/bn009/r2/config.h
deleted file mode 100644
index 45b63ec105..0000000000
--- a/keyboards/binepad/bn009/r2/config.h
+++ /dev/null
@@ -1,12 +0,0 @@
-// Copyright 2023 Binepad (@binepad)
-// SPDX-License-Identifier: GPL-2.0-or-later
-
-#pragma once
-
-
-/*
- * Wear Leveling EEPROM Emulation
- */
-
-#define WEAR_LEVELING_LOGICAL_SIZE 2048 // Number of bytes "exposed" to the rest of QMK and denotes the size of the usable EEPROM.
-#define WEAR_LEVELING_BACKING_SIZE (WEAR_LEVELING_LOGICAL_SIZE * 2) // Number of bytes used by the wear-leveling algorithm for its underlying storage, and needs to be a multiple of the logical size.
diff --git a/keyboards/binepad/bn009/r2/info.json b/keyboards/binepad/bn009/r2/info.json
index c011fe0e32..870608b5c8 100644
--- a/keyboards/binepad/bn009/r2/info.json
+++ b/keyboards/binepad/bn009/r2/info.json
@@ -6,6 +6,11 @@
"cols": ["A1", "A2", "A6"],
"rows": ["B6", "B7", "B2"]
},
+ "eeprom": {
+ "wear_leveling": {
+ "backing_size": 4096
+ }
+ },
"processor": "STM32F103",
"usb": {
"device_version": "2.0.0"
diff --git a/keyboards/binepad/bnr1/v2/config.h b/keyboards/binepad/bnr1/v2/config.h
deleted file mode 100644
index c408f95d38..0000000000
--- a/keyboards/binepad/bnr1/v2/config.h
+++ /dev/null
@@ -1,7 +0,0 @@
-// Copyright 2022 BINEPAD (@binepad)
-// SPDX-License-Identifier: GPL-2.0-or-later
-
-#pragma once
-
-#define WEAR_LEVELING_LOGICAL_SIZE 1024
-#define WEAR_LEVELING_BACKING_SIZE (WEAR_LEVELING_LOGICAL_SIZE * 2)
diff --git a/keyboards/binepad/bnr1/v2/rules.mk b/keyboards/binepad/bnr1/v2/rules.mk
index 77b90d035d..6e7633bfe0 100644
--- a/keyboards/binepad/bnr1/v2/rules.mk
+++ b/keyboards/binepad/bnr1/v2/rules.mk
@@ -1,5 +1 @@
-# This file only contains EFL/WL settings and enables F103 low-power mode
-
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = embedded_flash
-
+# This file intentionally left blank
diff --git a/keyboards/bioi/ble.h b/keyboards/bioi/ble.h
deleted file mode 100644
index 529ebf5241..0000000000
--- a/keyboards/bioi/ble.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
-Copyright 2019 Basic I/O Instruments(Scott Wei) <scot.wei@gmail.com>
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 2 of the License, or
-(at your option) any later version.
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#pragma once
-
-#include <stdbool.h>
-
-typedef union {
- uint32_t raw;
- struct {
- bool init : 1;
- };
-} keyboard_config_t;
-
-extern keyboard_config_t ble_config;
-
-void send_str(const char *str);
-void usart_init(void);
-void module_reset(void);
diff --git a/keyboards/bioi/ble.c b/keyboards/bioi/bluetooth_custom.c
index 12c180966a..4ea277f731 100644
--- a/keyboards/bioi/ble.c
+++ b/keyboards/bioi/bluetooth_custom.c
@@ -13,23 +13,18 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "bluetooth.h"
-#include "ble.h"
-#include "usart.h"
+#include "uart.h"
#include "progmem.h"
#include "wait.h"
#include "debug.h"
#include "usb_descriptor.h"
#include "report.h"
-keyboard_config_t ble_config;
-
-static void bluefruit_serial_send(uint8_t);
-
void send_str(const char *str)
{
uint8_t c;
while ((c = pgm_read_byte(str++)))
- uart1_putc(c);
+ uart_write(c);
}
void serial_send(uint8_t data)
@@ -43,7 +38,7 @@ void send_bytes(uint8_t data)
sprintf(hexStr, "%02X", data);
for (int j = 0; j < sizeof(hexStr) - 1; j++)
{
- uart1_putc(hexStr[j]);
+ uart_write(hexStr[j]);
}
}
@@ -72,7 +67,12 @@ static void bluefruit_serial_send(uint8_t data)
}
void bluetooth_init(void) {
- usart_init();
+ uart_init(76800);
+ wait_ms(250);
+
+ send_str(PSTR("\r\n"));
+ send_str(PSTR("\r\n"));
+ send_str(PSTR("\r\n"));
}
void bluetooth_task(void) {}
@@ -86,13 +86,12 @@ void bluetooth_send_keyboard(report_keyboard_t *report)
send_str(PSTR("AT+BLEKEYBOARDCODE="));
- for (uint8_t i = 0; i < KEYBOARD_EPSIZE; i++)
- {
- send_bytes(report->raw[i]);
- if (i < (KEYBOARD_EPSIZE - 1))
- {
- send_str(PSTR("-"));
- }
+ send_bytes(report->mods);
+ send_str(PSTR("-"));
+ send_bytes(0);
+ for (uint8_t i = 0; i < KEYBOARD_REPORT_KEYS; i++) {
+ send_str(PSTR("-"));
+ send_bytes(report->keys[i]);
}
send_str(PSTR("\r\n"));
@@ -162,13 +161,3 @@ void bluetooth_send_consumer(uint16_t usage)
bluefruit_trace_footer();
#endif
}
-
-void usart_init(void)
-{
- uart1_init(UART_BAUD_SELECT_DOUBLE_SPEED(76800, 8000000L));
- wait_ms(250);
-
- send_str(PSTR("\r\n"));
- send_str(PSTR("\r\n"));
- send_str(PSTR("\r\n"));
-}
diff --git a/keyboards/bioi/g60/rules.mk b/keyboards/bioi/g60/rules.mk
index 2b955ce793..375cb52732 100644
--- a/keyboards/bioi/g60/rules.mk
+++ b/keyboards/bioi/g60/rules.mk
@@ -18,7 +18,5 @@ BLUETOOTH_ENABLE = yes
VIA_ENABLE = yes # VIA support should be enabled here due to the main() loop will be compiled first.
-SRC += usart.c ble.c
-
-OPT_DEFS += -DUART_RX1_BUFFER_SIZE=16 -DUART_TX1_BUFFER_SIZE=16
-OPT_DEFS += -DUSART1_ENABLED
+UART_DRIVER_REQUIRED = yes
+SRC += bluetooth_custom.c
diff --git a/keyboards/bioi/g60ble/rules.mk b/keyboards/bioi/g60ble/rules.mk
index 31cc2c22b6..6bfcc62d7e 100644
--- a/keyboards/bioi/g60ble/rules.mk
+++ b/keyboards/bioi/g60ble/rules.mk
@@ -13,8 +13,7 @@ BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = yes
LTO_ENABLE = yes
-# these lines are all for bluetooth
BLUETOOTH_ENABLE = yes
-SRC += usart.c ble.c
-OPT_DEFS += -DUART_RX1_BUFFER_SIZE=16 -DUART_TX1_BUFFER_SIZE=16
-OPT_DEFS += -DUSART1_ENABLED
+
+UART_DRIVER_REQUIRED = yes
+SRC += bluetooth_custom.c
diff --git a/keyboards/bioi/morgan65/rules.mk b/keyboards/bioi/morgan65/rules.mk
index 2b955ce793..375cb52732 100644
--- a/keyboards/bioi/morgan65/rules.mk
+++ b/keyboards/bioi/morgan65/rules.mk
@@ -18,7 +18,5 @@ BLUETOOTH_ENABLE = yes
VIA_ENABLE = yes # VIA support should be enabled here due to the main() loop will be compiled first.
-SRC += usart.c ble.c
-
-OPT_DEFS += -DUART_RX1_BUFFER_SIZE=16 -DUART_TX1_BUFFER_SIZE=16
-OPT_DEFS += -DUSART1_ENABLED
+UART_DRIVER_REQUIRED = yes
+SRC += bluetooth_custom.c
diff --git a/keyboards/bioi/usart.c b/keyboards/bioi/usart.c
deleted file mode 100644
index f37845e5c6..0000000000
--- a/keyboards/bioi/usart.c
+++ /dev/null
@@ -1,1522 +0,0 @@
-/*************************************************************************
-
- Title: Interrupt UART library with receive/transmit circular buffers
- Author: Andy Gock
- Software: AVR-GCC 4.1, AVR Libc 1.4
- Hardware: any AVR with built-in UART, tested on AT90S8515 & ATmega8 at 4 Mhz
- License: GNU General Public License
- Usage: see README.md and Doxygen manual
-
- Based on original library by Peter Fluery, Tim Sharpe, Nicholas Zambetti.
-
- https://github.com/andygock/avr-uart
-
- Updated UART library (this one) by Andy Gock
- https://github.com/andygock/avr-uart
-
- Based on updated UART library (this one) by Tim Sharpe
- http://beaststwo.org/avr-uart/index.shtml
-
- Based on original library by Peter Fluery
- http://homepage.hispeed.ch/peterfleury/avr-software.html
-
-*************************************************************************/
-
-/*************************************************************************
-
-LICENSE:
- Copyright (C) 2012 Andy Gock
- Copyright (C) 2006 Peter Fleury
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
-*************************************************************************/
-
-/************************************************************************
-uart_available, uart_flush, uart1_available, and uart1_flush functions
-were adapted from the Arduino HardwareSerial.h library by Tim Sharpe on
-11 Jan 2009. The license info for HardwareSerial.h is as follows:
-
- HardwareSerial.cpp - Hardware serial library for Wiring
- Copyright (c) 2006 Nicholas Zambetti. All right reserved.
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
- Modified 23 November 2006 by David A. Mellis
-************************************************************************/
-
-/************************************************************************
-Changelog for modifications made by Tim Sharpe, starting with the current
- library version on his Web site as of 05/01/2009.
-
-Date Description
-=========================================================================
-05/11/2009 Changed all existing UARTx_RECEIVE_INTERRUPT and UARTx_TRANSMIT_INTERRUPT
- macros to use the "_vect" format introduced in AVR-Libc
- v1.4.0. Had to split the 3290 and 6490 out of their existing
- macro due to an inconsistency in the UART0_RECEIVE_INTERRUPT
- vector name (seems like a typo: USART_RX_vect for the 3290/6490
- vice USART0_RX_vect for the others in the macro).
- Verified all existing macro register names against the device
- header files in AVR-Libc v1.6.6 to catch any inconsistencies.
-05/12/2009 Added support for 48P, 88P, 168P, and 328P by adding them to the
- existing 48/88/168 macro.
- Added Arduino-style available() and flush() functions for both
- supported UARTs. Really wanted to keep them out of the library, so
- that it would be as close as possible to Peter Fleury's original
- library, but has scoping issues accessing internal variables from
- another program. Go C!
-05/13/2009 Changed Interrupt Service Routine label from the old "SIGNAL" to
- the "ISR" format introduced in AVR-Libc v1.4.0.
-
-************************************************************************/
-
-#include <avr/io.h>
-#include <avr/interrupt.h>
-#include <avr/pgmspace.h>
-#include <util/atomic.h>
-#include "usart.h"
-
-/*
- * constants and macros
- */
-
-/* size of RX/TX buffers */
-#define UART_RX0_BUFFER_MASK (UART_RX0_BUFFER_SIZE - 1)
-#define UART_RX1_BUFFER_MASK (UART_RX1_BUFFER_SIZE - 1)
-#define UART_RX2_BUFFER_MASK (UART_RX2_BUFFER_SIZE - 1)
-#define UART_RX3_BUFFER_MASK (UART_RX3_BUFFER_SIZE - 1)
-
-#define UART_TX0_BUFFER_MASK (UART_TX0_BUFFER_SIZE - 1)
-#define UART_TX1_BUFFER_MASK (UART_TX1_BUFFER_SIZE - 1)
-#define UART_TX2_BUFFER_MASK (UART_TX2_BUFFER_SIZE - 1)
-#define UART_TX3_BUFFER_MASK (UART_TX3_BUFFER_SIZE - 1)
-
-#if (UART_RX0_BUFFER_SIZE & UART_RX0_BUFFER_MASK)
- #error RX0 buffer size is not a power of 2
-#endif
-#if (UART_TX0_BUFFER_SIZE & UART_TX0_BUFFER_MASK)
- #error TX0 buffer size is not a power of 2
-#endif
-
-#if (UART_RX1_BUFFER_SIZE & UART_RX1_BUFFER_MASK)
- #error RX1 buffer size is not a power of 2
-#endif
-#if (UART_TX1_BUFFER_SIZE & UART_TX1_BUFFER_MASK)
- #error TX1 buffer size is not a power of 2
-#endif
-
-#if (UART_RX2_BUFFER_SIZE & UART_RX2_BUFFER_MASK)
- #error RX2 buffer size is not a power of 2
-#endif
-#if (UART_TX2_BUFFER_SIZE & UART_TX2_BUFFER_MASK)
- #error TX2 buffer size is not a power of 2
-#endif
-
-#if (UART_RX3_BUFFER_SIZE & UART_RX3_BUFFER_MASK)
- #error RX3 buffer size is not a power of 2
-#endif
-#if (UART_TX3_BUFFER_SIZE & UART_TX3_BUFFER_MASK)
- #error TX3 buffer size is not a power of 2
-#endif
-
-#if defined(__AVR_AT90S2313__) \
- || defined(__AVR_AT90S4414__) || defined(__AVR_AT90S4434__) \
- || defined(__AVR_AT90S8515__) || defined(__AVR_AT90S8535__) \
- || defined(__AVR_ATmega103__)
- /* old AVR classic or ATmega103 with one UART */
- #define AT90_UART
- #define UART0_RECEIVE_INTERRUPT UART_RX_vect
- #define UART0_TRANSMIT_INTERRUPT UART_UDRE_vect
- #define UART0_STATUS USR
- #define UART0_CONTROL UCR
- #define UART0_DATA UDR
- #define UART0_UDRIE UDRIE
-#elif defined(__AVR_AT90S2333__) || defined(__AVR_AT90S4433__)
- /* old AVR classic with one UART */
- #define AT90_UART
- #define UART0_RECEIVE_INTERRUPT UART_RX_vect
- #define UART0_TRANSMIT_INTERRUPT UART_UDRE_vect
- #define UART0_STATUS UCSRA
- #define UART0_CONTROL UCSRB
- #define UART0_DATA UDR
- #define UART0_UDRIE UDRIE
-#elif defined(__AVR_ATmega8__) || defined(__AVR_ATmega16__) || defined(__AVR_ATmega32__) \
- || defined(__AVR_ATmega323__)
- /* ATmega with one USART */
- #define ATMEGA_USART
- #define UART0_RECEIVE_INTERRUPT USART_RXC_vect
- #define UART0_TRANSMIT_INTERRUPT USART_UDRE_vect
- #define UART0_STATUS UCSRA
- #define UART0_CONTROL UCSRB
- #define UART0_DATA UDR
- #define UART0_UDRIE UDRIE
-#elif defined(__AVR_ATmega8U2__) || defined(__AVR_ATmega16U2__) || defined(__AVR_ATmega16U4__) || \
- defined(__AVR_ATmega32U2__) || defined(__AVR_ATmega32U4__) || defined(__AVR_ATmega32U6__)
- /* ATmega with one USART, but is called USART1 (untested) */
- #define ATMEGA_USART1
- #define UART1_RECEIVE_INTERRUPT USART1_RX_vect
- #define UART1_TRANSMIT_INTERRUPT USART1_UDRE_vect
- #define UART1_STATUS UCSR1A
- #define UART1_CONTROL UCSR1B
- #define UART1_DATA UDR1
- #define UART1_UDRIE UDRIE1
-#elif defined(__AVR_ATmega8515__) || defined(__AVR_ATmega8535__)
- /* ATmega with one USART */
- #define ATMEGA_USART
- #define UART0_RECEIVE_INTERRUPT USART_RX_vect
- #define UART0_TRANSMIT_INTERRUPT USART_UDRE_vect
- #define UART0_STATUS UCSRA
- #define UART0_CONTROL UCSRB
- #define UART0_DATA UDR
- #define UART0_UDRIE UDRIE
-#elif defined(__AVR_ATmega163__)
- /* ATmega163 with one UART */
- #define ATMEGA_UART
- #define UART0_RECEIVE_INTERRUPT UART_RX_vect
- #define UART0_TRANSMIT_INTERRUPT UART_UDRE_vect
- #define UART0_STATUS UCSRA
- #define UART0_CONTROL UCSRB
- #define UART0_DATA UDR
- #define UART0_UDRIE UDRIE
-#elif defined(__AVR_ATmega162__)
- /* ATmega with two USART */
- #define ATMEGA_USART0
- #define ATMEGA_USART1
- #define UART0_RECEIVE_INTERRUPT USART0_RXC_vect
- #define UART1_RECEIVE_INTERRUPT USART1_RXC_vect
- #define UART0_TRANSMIT_INTERRUPT USART0_UDRE_vect
- #define UART1_TRANSMIT_INTERRUPT USART1_UDRE_vect
- #define UART0_STATUS UCSR0A
- #define UART0_CONTROL UCSR0B
- #define UART0_DATA UDR0
- #define UART0_UDRIE UDRIE0
- #define UART1_STATUS UCSR1A
- #define UART1_CONTROL UCSR1B
- #define UART1_DATA UDR1
- #define UART1_UDRIE UDRIE1
-#elif defined(__AVR_ATmega64__) || defined(__AVR_ATmega128__)
- /* ATmega with two USART */
- #define ATMEGA_USART0
- #define ATMEGA_USART1
- #define UART0_RECEIVE_INTERRUPT USART0_RX_vect
- #define UART1_RECEIVE_INTERRUPT USART1_RX_vect
- #define UART0_TRANSMIT_INTERRUPT USART0_UDRE_vect
- #define UART1_TRANSMIT_INTERRUPT USART1_UDRE_vect
- #define UART0_STATUS UCSR0A
- #define UART0_CONTROL UCSR0B
- #define UART0_DATA UDR0
- #define UART0_UDRIE UDRIE0
- #define UART1_STATUS UCSR1A
- #define UART1_CONTROL UCSR1B
- #define UART1_DATA UDR1
- #define UART1_UDRIE UDRIE1
-#elif defined(__AVR_ATmega161__)
- /* ATmega with UART */
- #error "AVR ATmega161 currently not supported by this libaray !"
-#elif defined(__AVR_ATmega169__)
- /* ATmega with one USART */
- #define ATMEGA_USART
- #define UART0_RECEIVE_INTERRUPT USART0_RX_vect
- #define UART0_TRANSMIT_INTERRUPT USART0_UDRE_vect
- #define UART0_STATUS UCSRA
- #define UART0_CONTROL UCSRB
- #define UART0_DATA UDR
- #define UART0_UDRIE UDRIE
-#elif defined(__AVR_ATmega48__) ||defined(__AVR_ATmega88__) || defined(__AVR_ATmega168__) || \
- defined(__AVR_ATmega48P__) ||defined(__AVR_ATmega88P__) || defined(__AVR_ATmega168P__) || \
- defined(__AVR_ATmega328P__)
- /* TLS-Added 48P/88P/168P/328P */
- /* ATmega with one USART */
- #define ATMEGA_USART0
- #define UART0_RECEIVE_INTERRUPT USART_RX_vect
- #define UART0_TRANSMIT_INTERRUPT USART_UDRE_vect
- #define UART0_STATUS UCSR0A
- #define UART0_CONTROL UCSR0B
- #define UART0_DATA UDR0
- #define UART0_UDRIE UDRIE0
-#elif defined(__AVR_ATtiny2313__) || defined(__AVR_ATtiny2313A__) || defined(__AVR_ATtiny4313__)
- #define ATMEGA_USART
- #define UART0_RECEIVE_INTERRUPT USART_RX_vect
- #define UART0_TRANSMIT_INTERRUPT USART_UDRE_vect
- #define UART0_STATUS UCSRA
- #define UART0_CONTROL UCSRB
- #define UART0_DATA UDR
- #define UART0_UDRIE UDRIE
-#elif defined(__AVR_ATmega329__) ||\
- defined(__AVR_ATmega649__) ||\
- defined(__AVR_ATmega325__) ||defined(__AVR_ATmega3250__) ||\
- defined(__AVR_ATmega645__) ||defined(__AVR_ATmega6450__)
- /* ATmega with one USART */
- #define ATMEGA_USART0
- #define UART0_RECEIVE_INTERRUPT USART0_RX_vect
- #define UART0_TRANSMIT_INTERRUPT USART0_UDRE_vect
- #define UART0_STATUS UCSR0A
- #define UART0_CONTROL UCSR0B
- #define UART0_DATA UDR0
- #define UART0_UDRIE UDRIE0
-#elif defined(__AVR_ATmega3290__) ||\
- defined(__AVR_ATmega6490__)
- /* TLS-Separated these two from the previous group because of inconsistency in the USART_RX */
- /* ATmega with one USART */
- #define ATMEGA_USART0
- #define UART0_RECEIVE_INTERRUPT USART_RX_vect
- #define UART0_TRANSMIT_INTERRUPT USART0_UDRE_vect
- #define UART0_STATUS UCSR0A
- #define UART0_CONTROL UCSR0B
- #define UART0_DATA UDR0
- #define UART0_UDRIE UDRIE0
-#elif defined(__AVR_ATmega2560__) || defined(__AVR_ATmega1280__) || defined(__AVR_ATmega640__)
- /* ATmega with four USART */
- #define ATMEGA_USART0
- #define ATMEGA_USART1
- #define ATMEGA_USART2
- #define ATMEGA_USART3
- #define UART0_RECEIVE_INTERRUPT USART0_RX_vect
- #define UART1_RECEIVE_INTERRUPT USART1_RX_vect
- #define UART2_RECEIVE_INTERRUPT USART2_RX_vect
- #define UART3_RECEIVE_INTERRUPT USART3_RX_vect
- #define UART0_TRANSMIT_INTERRUPT USART0_UDRE_vect
- #define UART1_TRANSMIT_INTERRUPT USART1_UDRE_vect
- #define UART2_TRANSMIT_INTERRUPT USART2_UDRE_vect
- #define UART3_TRANSMIT_INTERRUPT USART3_UDRE_vect
- #define UART0_STATUS UCSR0A
- #define UART0_CONTROL UCSR0B
- #define UART0_DATA UDR0
- #define UART0_UDRIE UDRIE0
- #define UART1_STATUS UCSR1A
- #define UART1_CONTROL UCSR1B
- #define UART1_DATA UDR1
- #define UART1_UDRIE UDRIE1
- #define UART2_STATUS UCSR2A
- #define UART2_CONTROL UCSR2B
- #define UART2_DATA UDR2
- #define UART2_UDRIE UDRIE2
- #define UART3_STATUS UCSR3A
- #define UART3_CONTROL UCSR3B
- #define UART3_DATA UDR3
- #define UART3_UDRIE UDRIE3
-#elif defined(__AVR_ATmega644__)
- /* ATmega with one USART */
- #define ATMEGA_USART0
- #define UART0_RECEIVE_INTERRUPT USART0_RX_vect
- #define UART0_TRANSMIT_INTERRUPT USART0_UDRE_vect
- #define UART0_STATUS UCSR0A
- #define UART0_CONTROL UCSR0B
- #define UART0_DATA UDR0
- #define UART0_UDRIE UDRIE0
-#elif defined(__AVR_ATmega164P__) || defined(__AVR_ATmega324P__) || defined(__AVR_ATmega644P__) || \
- defined(__AVR_ATmega1284P__)
- /* ATmega with two USART */
- #define ATMEGA_USART0
- #define ATMEGA_USART1
- #define UART0_RECEIVE_INTERRUPT USART0_RX_vect
- #define UART1_RECEIVE_INTERRUPT USART1_RX_vect
- #define UART0_TRANSMIT_INTERRUPT USART0_UDRE_vect
- #define UART1_TRANSMIT_INTERRUPT USART1_UDRE_vect
- #define UART0_STATUS UCSR0A
- #define UART0_CONTROL UCSR0B
- #define UART0_DATA UDR0
- #define UART0_UDRIE UDRIE0
- #define UART1_STATUS UCSR1A
- #define UART1_CONTROL UCSR1B
- #define UART1_DATA UDR1
- #define UART1_UDRIE UDRIE1
-#else
- #error "no UART definition for MCU available"
-#endif
-
-/*
- * Module global variables
- */
-
-#if defined(USART0_ENABLED)
- #if defined(ATMEGA_USART) || defined(ATMEGA_USART0)
- static volatile uint8_t UART_TxBuf[UART_TX0_BUFFER_SIZE];
- static volatile uint8_t UART_RxBuf[UART_RX0_BUFFER_SIZE];
-
- #if defined(USART0_LARGE_BUFFER)
- static volatile uint16_t UART_TxHead;
- static volatile uint16_t UART_TxTail;
- static volatile uint16_t UART_RxHead;
- static volatile uint16_t UART_RxTail;
- static volatile uint8_t UART_LastRxError;
- #else
- static volatile uint8_t UART_TxHead;
- static volatile uint8_t UART_TxTail;
- static volatile uint8_t UART_RxHead;
- static volatile uint8_t UART_RxTail;
- static volatile uint8_t UART_LastRxError;
- #endif
-
- #endif
-#endif
-
-#if defined(USART1_ENABLED)
- #if defined(ATMEGA_USART1)
- static volatile uint8_t UART1_TxBuf[UART_TX1_BUFFER_SIZE];
- static volatile uint8_t UART1_RxBuf[UART_RX1_BUFFER_SIZE];
-
- #if defined(USART1_LARGE_BUFFER)
- static volatile uint16_t UART1_TxHead;
- static volatile uint16_t UART1_TxTail;
- static volatile uint16_t UART1_RxHead;
- static volatile uint16_t UART1_RxTail;
- static volatile uint8_t UART1_LastRxError;
- #else
- static volatile uint8_t UART1_TxHead;
- static volatile uint8_t UART1_TxTail;
- static volatile uint8_t UART1_RxHead;
- static volatile uint8_t UART1_RxTail;
- static volatile uint8_t UART1_LastRxError;
- #endif
- #endif
-#endif
-
-#if defined(USART2_ENABLED)
- #if defined(ATMEGA_USART2)
- static volatile uint8_t UART2_TxBuf[UART_TX2_BUFFER_SIZE];
- static volatile uint8_t UART2_RxBuf[UART_RX2_BUFFER_SIZE];
-
- #if defined(USART2_LARGE_BUFFER)
- static volatile uint16_t UART2_TxHead;
- static volatile uint16_t UART2_TxTail;
- static volatile uint16_t UART2_RxHead;
- static volatile uint16_t UART2_RxTail;
- static volatile uint8_t UART2_LastRxError;
- #else
- static volatile uint8_t UART2_TxHead;
- static volatile uint8_t UART2_TxTail;
- static volatile uint8_t UART2_RxHead;
- static volatile uint8_t UART2_RxTail;
- static volatile uint8_t UART2_LastRxError;
- #endif
- #endif
-#endif
-
-#if defined(USART3_ENABLED)
- #if defined(ATMEGA_USART3)
- static volatile uint8_t UART3_TxBuf[UART_TX3_BUFFER_SIZE];
- static volatile uint8_t UART3_RxBuf[UART_RX3_BUFFER_SIZE];
-
- #if defined(USART3_LARGE_BUFFER)
- static volatile uint16_t UART3_TxHead;
- static volatile uint16_t UART3_TxTail;
- static volatile uint16_t UART3_RxHead;
- static volatile uint16_t UART3_RxTail;
- static volatile uint8_t UART3_LastRxError;
- #else
- static volatile uint8_t UART3_TxHead;
- static volatile uint8_t UART3_TxTail;
- static volatile uint8_t UART3_RxHead;
- static volatile uint8_t UART3_RxTail;
- static volatile uint8_t UART3_LastRxError;
- #endif
-
- #endif
-#endif
-
-#if defined(USART0_ENABLED)
-
-#if defined(AT90_UART) || defined(ATMEGA_USART) || defined(ATMEGA_USART0)
-
-ISR(UART0_RECEIVE_INTERRUPT)
-/*************************************************************************
-Function: UART Receive Complete interrupt
-Purpose: called when the UART has received a character
-**************************************************************************/
-{
- uint16_t tmphead;
- uint8_t data;
- uint8_t usr;
- uint8_t lastRxError;
-
- /* read UART status register and UART data register */
- usr = UART0_STATUS;
- data = UART0_DATA;
-
- /* */
-#if defined(AT90_UART)
- lastRxError = (usr & (_BV(FE)|_BV(DOR)));
-#elif defined(ATMEGA_USART)
- lastRxError = (usr & (_BV(FE)|_BV(DOR)));
-#elif defined(ATMEGA_USART0)
- lastRxError = (usr & (_BV(FE0)|_BV(DOR0)));
-#elif defined (ATMEGA_UART)
- lastRxError = (usr & (_BV(FE)|_BV(DOR)));
-#endif
-
- /* calculate buffer index */
- tmphead = (UART_RxHead + 1) & UART_RX0_BUFFER_MASK;
-
- if (tmphead == UART_RxTail) {
- /* error: receive buffer overflow */
- lastRxError = UART_BUFFER_OVERFLOW >> 8;
- } else {
- /* store new index */
- UART_RxHead = tmphead;
- /* store received data in buffer */
- UART_RxBuf[tmphead] = data;
- }
- UART_LastRxError = lastRxError;
-}
-
-
-ISR(UART0_TRANSMIT_INTERRUPT)
-/*************************************************************************
-Function: UART Data Register Empty interrupt
-Purpose: called when the UART is ready to transmit the next byte
-**************************************************************************/
-{
- uint16_t tmptail;
-
- if (UART_TxHead != UART_TxTail) {
- /* calculate and store new buffer index */
- tmptail = (UART_TxTail + 1) & UART_TX0_BUFFER_MASK;
- UART_TxTail = tmptail;
- /* get one byte from buffer and write it to UART */
- UART0_DATA = UART_TxBuf[tmptail]; /* start transmission */
- } else {
- /* tx buffer empty, disable UDRE interrupt */
- UART0_CONTROL &= ~_BV(UART0_UDRIE);
- }
-}
-
-
-/*************************************************************************
-Function: uart0_init()
-Purpose: initialize UART and set baudrate
-Input: baudrate using macro UART_BAUD_SELECT()
-Returns: none
-**************************************************************************/
-void uart0_init(uint16_t baudrate)
-{
- ATOMIC_BLOCK(ATOMIC_FORCEON) {
- UART_TxHead = 0;
- UART_TxTail = 0;
- UART_RxHead = 0;
- UART_RxTail = 0;
- }
-
-#if defined(AT90_UART)
- /* set baud rate */
- UBRR = (uint8_t) baudrate;
-
- /* enable UART receiver and transmitter and receive complete interrupt */
- UART0_CONTROL = _BV(RXCIE)|_BV(RXEN)|_BV(TXEN);
-
-#elif defined (ATMEGA_USART)
- /* Set baud rate */
- if (baudrate & 0x8000) {
- UART0_STATUS = (1<<U2X); //Enable 2x speed
- baudrate &= ~0x8000;
- }
- UBRRH = (uint8_t) (baudrate>>8);
- UBRRL = (uint8_t) baudrate;
-
- /* Enable USART receiver and transmitter and receive complete interrupt */
- UART0_CONTROL = _BV(RXCIE)|(1<<RXEN)|(1<<TXEN);
-
- /* Set frame format: asynchronous, 8data, no parity, 1stop bit */
-#ifdef URSEL
- UCSRC = (1<<URSEL)|(3<<UCSZ0);
-#else
- UCSRC = (3<<UCSZ0);
-#endif
-
-#elif defined (ATMEGA_USART0)
- /* Set baud rate */
- if (baudrate & 0x8000) {
- UART0_STATUS = (1<<U2X0); //Enable 2x speed
- baudrate &= ~0x8000;
- }
- UBRR0H = (uint8_t)(baudrate>>8);
- UBRR0L = (uint8_t) baudrate;
-
- /* Enable USART receiver and transmitter and receive complete interrupt */
- UART0_CONTROL = _BV(RXCIE0)|(1<<RXEN0)|(1<<TXEN0);
-
- /* Set frame format: asynchronous, 8data, no parity, 1stop bit */
-#ifdef URSEL0
- UCSR0C = (1<<URSEL0)|(3<<UCSZ00);
-#else
- UCSR0C = (3<<UCSZ00);
-#endif
-
-#elif defined (ATMEGA_UART)
- /* set baud rate */
- if (baudrate & 0x8000) {
- UART0_STATUS = (1<<U2X); //Enable 2x speed
- baudrate &= ~0x8000;
- }
- UBRRHI = (uint8_t) (baudrate>>8);
- UBRR = (uint8_t) baudrate;
-
- /* Enable UART receiver and transmitter and receive complete interrupt */
- UART0_CONTROL = _BV(RXCIE)|(1<<RXEN)|(1<<TXEN);
-
-#endif
-
-} /* uart0_init */
-
-
-/*************************************************************************
-Function: uart0_getc()
-Purpose: return byte from ringbuffer
-Returns: lower byte: received byte from ringbuffer
- higher byte: last receive error
-**************************************************************************/
-uint16_t uart0_getc(void)
-{
- uint16_t tmptail;
- uint8_t data;
-
- ATOMIC_BLOCK(ATOMIC_FORCEON) {
- if (UART_RxHead == UART_RxTail) {
- return UART_NO_DATA; /* no data available */
- }
- }
-
- /* calculate / store buffer index */
- tmptail = (UART_RxTail + 1) & UART_RX0_BUFFER_MASK;
-
- UART_RxTail = tmptail;
-
- /* get data from receive buffer */
- data = UART_RxBuf[tmptail];
-
- return (UART_LastRxError << 8) + data;
-
-} /* uart0_getc */
-
-/*************************************************************************
-Function: uart0_peek()
-Purpose: Returns the next byte (character) of incoming UART data without
- removing it from the ring buffer. That is, successive calls to
- uartN_peek() will return the same character, as will the next
- call to uartN_getc()
-Returns: lower byte: next byte in ring buffer
- higher byte: last receive error
-**************************************************************************/
-uint16_t uart0_peek(void)
-{
- uint16_t tmptail;
- uint8_t data;
-
- ATOMIC_BLOCK(ATOMIC_FORCEON) {
- if (UART_RxHead == UART_RxTail) {
- return UART_NO_DATA; /* no data available */
- }
- }
-
- tmptail = (UART_RxTail + 1) & UART_RX0_BUFFER_MASK;
-
- /* get data from receive buffer */
- data = UART_RxBuf[tmptail];
-
- return (UART_LastRxError << 8) + data;
-
-} /* uart0_peek */
-
-/*************************************************************************
-Function: uart0_putc()
-Purpose: write byte to ringbuffer for transmitting via UART
-Input: byte to be transmitted
-Returns: none
-**************************************************************************/
-void uart0_putc(uint8_t data)
-{
-
-#ifdef USART0_LARGE_BUFFER
- uint16_t tmphead;
- uint16_t txtail_tmp;
-
- tmphead = (UART_TxHead + 1) & UART_TX0_BUFFER_MASK;
-
- do {
- ATOMIC_BLOCK(ATOMIC_FORCEON) {
- txtail_tmp = UART_TxTail;
- }
- } while (tmphead == txtail_tmp); /* wait for free space in buffer */
-#else
- uint16_t tmphead;
-
- tmphead = (UART_TxHead + 1) & UART_TX0_BUFFER_MASK;
-
- while (tmphead == UART_TxTail); /* wait for free space in buffer */
-#endif
-
- UART_TxBuf[tmphead] = data;
- UART_TxHead = tmphead;
-
- /* enable UDRE interrupt */
- UART0_CONTROL |= _BV(UART0_UDRIE);
-
-} /* uart0_putc */
-
-
-/*************************************************************************
-Function: uart0_puts()
-Purpose: transmit string to UART
-Input: string to be transmitted
-Returns: none
-**************************************************************************/
-void uart0_puts(const char *s)
-{
- while (*s) {
- uart0_putc(*s++);
- }
-
-} /* uart0_puts */
-
-
-/*************************************************************************
-Function: uart0_puts_p()
-Purpose: transmit string from program memory to UART
-Input: program memory string to be transmitted
-Returns: none
-**************************************************************************/
-void uart0_puts_p(const char *progmem_s)
-{
- register char c;
-
- while ((c = pgm_read_byte(progmem_s++))) {
- uart0_putc(c);
- }
-
-} /* uart0_puts_p */
-
-
-
-/*************************************************************************
-Function: uart0_available()
-Purpose: Determine the number of bytes waiting in the receive buffer
-Input: None
-Returns: Integer number of bytes in the receive buffer
-**************************************************************************/
-uint16_t uart0_available(void)
-{
- uint16_t ret;
-
- ATOMIC_BLOCK(ATOMIC_FORCEON) {
- ret = (UART_RX0_BUFFER_SIZE + UART_RxHead - UART_RxTail) & UART_RX0_BUFFER_MASK;
- }
- return ret;
-} /* uart0_available */
-
-/*************************************************************************
-Function: uart0_flush()
-Purpose: Flush bytes waiting the receive buffer. Actually ignores them.
-Input: None
-Returns: None
-**************************************************************************/
-void uart0_flush(void)
-{
- ATOMIC_BLOCK(ATOMIC_FORCEON) {
- UART_RxHead = UART_RxTail;
- }
-} /* uart0_flush */
-
-#endif
-
-#endif /* defined(USART0_ENABLED) */
-
-#if defined(USART1_ENABLED)
-
-/*
- * these functions are only for ATmegas with two USART
- */
-#if defined(ATMEGA_USART1)
-
-ISR(UART1_RECEIVE_INTERRUPT)
-/*************************************************************************
-Function: UART1 Receive Complete interrupt
-Purpose: called when the UART1 has received a character
-**************************************************************************/
-{
- uint16_t tmphead;
- uint8_t data;
- uint8_t usr;
- uint8_t lastRxError;
-
- /* read UART status register and UART data register */
- usr = UART1_STATUS;
- data = UART1_DATA;
-
- /* */
- lastRxError = (usr & (_BV(FE1)|_BV(DOR1)));
-
- /* calculate buffer index */
- tmphead = (UART1_RxHead + 1) & UART_RX1_BUFFER_MASK;
-
- if (tmphead == UART1_RxTail) {
- /* error: receive buffer overflow */
- lastRxError = UART_BUFFER_OVERFLOW >> 8;
- } else {
- /* store new index */
- UART1_RxHead = tmphead;
- /* store received data in buffer */
- UART1_RxBuf[tmphead] = data;
- }
- UART1_LastRxError = lastRxError;
-}
-
-
-ISR(UART1_TRANSMIT_INTERRUPT)
-/*************************************************************************
-Function: UART1 Data Register Empty interrupt
-Purpose: called when the UART1 is ready to transmit the next byte
-**************************************************************************/
-{
- uint16_t tmptail;
-
- if (UART1_TxHead != UART1_TxTail) {
- /* calculate and store new buffer index */
- tmptail = (UART1_TxTail + 1) & UART_TX1_BUFFER_MASK;
- UART1_TxTail = tmptail;
- /* get one byte from buffer and write it to UART */
- UART1_DATA = UART1_TxBuf[tmptail]; /* start transmission */
- } else {
- /* tx buffer empty, disable UDRE interrupt */
- UART1_CONTROL &= ~_BV(UART1_UDRIE);
- }
-}
-
-
-/*************************************************************************
-Function: uart1_init()
-Purpose: initialize UART1 and set baudrate
-Input: baudrate using macro UART_BAUD_SELECT()
-Returns: none
-**************************************************************************/
-void uart1_init(uint16_t baudrate)
-{
- ATOMIC_BLOCK(ATOMIC_FORCEON) {
- UART1_TxHead = 0;
- UART1_TxTail = 0;
- UART1_RxHead = 0;
- UART1_RxTail = 0;
- }
-
- /* Set baud rate */
- if (baudrate & 0x8000) {
- UART1_STATUS = (1<<U2X1); //Enable 2x speed
- baudrate &= ~0x8000;
- }
- UBRR1H = (uint8_t) (baudrate>>8);
- UBRR1L = (uint8_t) baudrate;
-
- /* Enable USART receiver and transmitter and receive complete interrupt */
- UART1_CONTROL = _BV(RXCIE1)|(1<<RXEN1)|(1<<TXEN1);
-
- /* Set frame format: asynchronous, 8data, no parity, 1stop bit */
-#ifdef URSEL1
- UCSR1C = (1<<URSEL1)|(3<<UCSZ10);
-#else
- UCSR1C = (3<<UCSZ10);
-#endif
-} /* uart_init */
-
-
-/*************************************************************************
-Function: uart1_getc()
-Purpose: return byte from ringbuffer
-Returns: lower byte: received byte from ringbuffer
- higher byte: last receive error
-**************************************************************************/
-uint16_t uart1_getc(void)
-{
- uint16_t tmptail;
- uint8_t data;
-
- ATOMIC_BLOCK(ATOMIC_FORCEON) {
- if (UART1_RxHead == UART1_RxTail) {
- return UART_NO_DATA; /* no data available */
- }
-
- /* calculate / store buffer index */
- tmptail = (UART1_RxTail + 1) & UART_RX1_BUFFER_MASK;
- UART1_RxTail = tmptail;
- }
-
- /* get data from receive buffer */
- data = UART1_RxBuf[tmptail];
-
- return (UART1_LastRxError << 8) + data;
-
-} /* uart1_getc */
-
-/*************************************************************************
-Function: uart1_peek()
-Purpose: Returns the next byte (character) of incoming UART data without
- removing it from the ring buffer. That is, successive calls to
- uartN_peek() will return the same character, as will the next
- call to uartN_getc()
-Returns: lower byte: next byte in ring buffer
- higher byte: last receive error
-**************************************************************************/
-uint16_t uart1_peek(void)
-{
- uint16_t tmptail;
- uint8_t data;
-
- ATOMIC_BLOCK(ATOMIC_FORCEON) {
- if (UART1_RxHead == UART1_RxTail) {
- return UART_NO_DATA; /* no data available */
- }
- }
-
- tmptail = (UART1_RxTail + 1) & UART_RX1_BUFFER_MASK;
-
- /* get data from receive buffer */
- data = UART1_RxBuf[tmptail];
-
- return (UART1_LastRxError << 8) + data;
-
-} /* uart1_peek */
-
-/*************************************************************************
-Function: uart1_putc()
-Purpose: write byte to ringbuffer for transmitting via UART
-Input: byte to be transmitted
-Returns: none
-**************************************************************************/
-void uart1_putc(uint8_t data)
-{
-
-#ifdef USART1_LARGE_BUFFER
- uint16_t tmphead;
- uint16_t txtail_tmp;
-
- tmphead = (UART1_TxHead + 1) & UART_TX1_BUFFER_MASK;
-
- do {
- ATOMIC_BLOCK(ATOMIC_FORCEON) {
- txtail_tmp = UART1_TxTail;
- }
- } while (tmphead == txtail_tmp); /* wait for free space in buffer */
-#else
- uint16_t tmphead;
-
- tmphead = (UART1_TxHead + 1) & UART_TX1_BUFFER_MASK;
-
- while (tmphead == UART1_TxTail); /* wait for free space in buffer */
-#endif
-
- UART1_TxBuf[tmphead] = data;
- UART1_TxHead = tmphead;
-
- /* enable UDRE interrupt */
- UART1_CONTROL |= _BV(UART1_UDRIE);
-
-} /* uart1_putc */
-
-
-/*************************************************************************
-Function: uart1_puts()
-Purpose: transmit string to UART1
-Input: string to be transmitted
-Returns: none
-**************************************************************************/
-void uart1_puts(const char *s)
-{
- while (*s) {
- uart1_putc(*s++);
- }
-
-} /* uart1_puts */
-
-
-/*************************************************************************
-Function: uart1_puts_p()
-Purpose: transmit string from program memory to UART1
-Input: program memory string to be transmitted
-Returns: none
-**************************************************************************/
-void uart1_puts_p(const char *progmem_s)
-{
- register char c;
-
- while ((c = pgm_read_byte(progmem_s++))) {
- uart1_putc(c);
- }
-
-} /* uart1_puts_p */
-
-
-
-/*************************************************************************
-Function: uart1_available()
-Purpose: Determine the number of bytes waiting in the receive buffer
-Input: None
-Returns: Integer number of bytes in the receive buffer
-**************************************************************************/
-uint16_t uart1_available(void)
-{
- uint16_t ret;
-
- ATOMIC_BLOCK(ATOMIC_FORCEON) {
- ret = (UART_RX1_BUFFER_SIZE + UART1_RxHead - UART1_RxTail) & UART_RX1_BUFFER_MASK;
- }
- return ret;
-} /* uart1_available */
-
-
-
-/*************************************************************************
-Function: uart1_flush()
-Purpose: Flush bytes waiting the receive buffer. Actually ignores them.
-Input: None
-Returns: None
-**************************************************************************/
-void uart1_flush(void)
-{
- ATOMIC_BLOCK(ATOMIC_FORCEON) {
- UART1_RxHead = UART1_RxTail;
- }
-} /* uart1_flush */
-
-#endif
-
-#endif /* defined(USART1_ENABLED) */
-
-#if defined(USART2_ENABLED)
-
-/*
- * these functions are only for ATmegas with four USART
- */
-#if defined(ATMEGA_USART2)
-
-ISR(UART2_RECEIVE_INTERRUPT)
-/*************************************************************************
-Function: UART2 Receive Complete interrupt
-Purpose: called when the UART2 has received a character
-**************************************************************************/
-{
- uint16_t tmphead;
- uint8_t data;
- uint8_t usr;
- uint8_t lastRxError;
-
-
- /* read UART status register and UART data register */
- usr = UART2_STATUS;
- data = UART2_DATA;
-
- /* */
- lastRxError = (usr & (_BV(FE2)|_BV(DOR2)));
-
- /* calculate buffer index */
- tmphead = (UART2_RxHead + 1) & UART_RX2_BUFFER_MASK;
-
- if (tmphead == UART2_RxTail) {
- /* error: receive buffer overflow */
- lastRxError = UART_BUFFER_OVERFLOW >> 8;
- } else {
- /* store new index */
- UART2_RxHead = tmphead;
- /* store received data in buffer */
- UART2_RxBuf[tmphead] = data;
- }
- UART2_LastRxError = lastRxError;
-}
-
-
-ISR(UART2_TRANSMIT_INTERRUPT)
-/*************************************************************************
-Function: UART2 Data Register Empty interrupt
-Purpose: called when the UART2 is ready to transmit the next byte
-**************************************************************************/
-{
- uint16_t tmptail;
-
-
- if (UART2_TxHead != UART2_TxTail) {
- /* calculate and store new buffer index */
- tmptail = (UART2_TxTail + 1) & UART_TX2_BUFFER_MASK;
- UART2_TxTail = tmptail;
- /* get one byte from buffer and write it to UART */
- UART2_DATA = UART2_TxBuf[tmptail]; /* start transmission */
- } else {
- /* tx buffer empty, disable UDRE interrupt */
- UART2_CONTROL &= ~_BV(UART2_UDRIE);
- }
-}
-
-
-/*************************************************************************
-Function: uart2_init()
-Purpose: initialize UART2 and set baudrate
-Input: baudrate using macro UART_BAUD_SELECT()
-Returns: none
-**************************************************************************/
-void uart2_init(uint16_t baudrate)
-{
- ATOMIC_BLOCK(ATOMIC_FORCEON) {
- UART2_TxHead = 0;
- UART2_TxTail = 0;
- UART2_RxHead = 0;
- UART2_RxTail = 0;
- }
-
- /* Set baud rate */
- if (baudrate & 0x8000) {
- UART2_STATUS = (1<<U2X2); //Enable 2x speed
- baudrate &= ~0x8000;
- }
- UBRR2H = (uint8_t) (baudrate>>8);
- UBRR2L = (uint8_t) baudrate;
-
- /* Enable USART receiver and transmitter and receive complete interrupt */
- UART2_CONTROL = _BV(RXCIE2)|(1<<RXEN2)|(1<<TXEN2);
-
- /* Set frame format: asynchronous, 8data, no parity, 1stop bit */
-#ifdef URSEL2
- UCSR2C = (1<<URSEL2)|(3<<UCSZ20);
-#else
- UCSR2C = (3<<UCSZ20);
-#endif
-} /* uart_init */
-
-
-/*************************************************************************
-Function: uart2_getc()
-Purpose: return byte from ringbuffer
-Returns: lower byte: received byte from ringbuffer
- higher byte: last receive error
-**************************************************************************/
-uint16_t uart2_getc(void)
-{
- uint16_t tmptail;
- uint8_t data;
-
- ATOMIC_BLOCK(ATOMIC_FORCEON) {
- if (UART2_RxHead == UART2_RxTail) {
- return UART_NO_DATA; /* no data available */
- }
- }
-
- /* calculate / store buffer index */
-
- tmptail = (UART2_RxTail + 1) & UART_RX2_BUFFER_MASK;
- UART2_RxTail = tmptail;
-
- /* get data from receive buffer */
- data = UART2_RxBuf[tmptail];
-
- return (UART2_LastRxError << 8) + data;
-
-} /* uart2_getc */
-
-/*************************************************************************
-Function: uart2_peek()
-Purpose: Returns the next byte (character) of incoming UART data without
- removing it from the ring buffer. That is, successive calls to
- uartN_peek() will return the same character, as will the next
- call to uartN_getc()
-Returns: lower byte: next byte in ring buffer
- higher byte: last receive error
-**************************************************************************/
-uint16_t uart2_peek(void)
-{
- uint16_t tmptail;
- uint8_t data;
-
- ATOMIC_BLOCK(ATOMIC_FORCEON) {
- if (UART2_RxHead == UART2_RxTail) {
- return UART_NO_DATA; /* no data available */
- }
- }
-
- tmptail = (UART2_RxTail + 1) & UART_RX2_BUFFER_MASK;
-
- /* get data from receive buffer */
- data = UART2_RxBuf[tmptail];
-
- return (UART2_LastRxError << 8) + data;
-
-} /* uart2_peek */
-
-/*************************************************************************
-Function: uart2_putc()
-Purpose: write byte to ringbuffer for transmitting via UART
-Input: byte to be transmitted
-Returns: none
-**************************************************************************/
-void uart2_putc(uint8_t data)
-{
-
-#ifdef USART2_LARGE_BUFFER
- uint16_t tmphead;
- uint16_t txtail_tmp;
-
- tmphead = (UART2_TxHead + 1) & UART_TX2_BUFFER_MASK;
-
- do {
- ATOMIC_BLOCK(ATOMIC_FORCEON) {
- txtail_tmp = UART2_TxTail;
- }
- } while (tmphead == txtail_tmp); /* wait for free space in buffer */
-#else
- uint16_t tmphead;
-
- tmphead = (UART2_TxHead + 1) & UART_TX2_BUFFER_MASK;
-
- while (tmphead == UART2_TxTail); /* wait for free space in buffer */
-#endif
-
- UART2_TxBuf[tmphead] = data;
- UART2_TxHead = tmphead;
-
- /* enable UDRE interrupt */
- UART2_CONTROL |= _BV(UART2_UDRIE);
-
-} /* uart2_putc */
-
-
-/*************************************************************************
-Function: uart2_puts()
-Purpose: transmit string to UART2
-Input: string to be transmitted
-Returns: none
-**************************************************************************/
-void uart2_puts(const char *s)
-{
- while (*s)
- uart2_putc(*s++);
-
-} /* uart2_puts */
-
-
-/*************************************************************************
-Function: uart2_puts_p()
-Purpose: transmit string from program memory to UART2
-Input: program memory string to be transmitted
-Returns: none
-**************************************************************************/
-void uart2_puts_p(const char *progmem_s)
-{
- register char c;
-
- while ((c = pgm_read_byte(progmem_s++))) {
- uart2_putc(c);
- }
-
-} /* uart2_puts_p */
-
-
-
-/*************************************************************************
-Function: uart2_available()
-Purpose: Determine the number of bytes waiting in the receive buffer
-Input: None
-Returns: Integer number of bytes in the receive buffer
-**************************************************************************/
-uint16_t uart2_available(void)
-{
- uint16_t ret;
-
- ATOMIC_BLOCK(ATOMIC_FORCEON) {
- ret = (UART_RX2_BUFFER_SIZE + UART2_RxHead - UART2_RxTail) & UART_RX2_BUFFER_MASK;
- }
- return ret;
-} /* uart2_available */
-
-
-
-/*************************************************************************
-Function: uart2_flush()
-Purpose: Flush bytes waiting the receive buffer. Actually ignores them.
-Input: None
-Returns: None
-**************************************************************************/
-void uart2_flush(void)
-{
- ATOMIC_BLOCK(ATOMIC_FORCEON) {
- UART2_RxHead = UART2_RxTail;
- }
-} /* uart2_flush */
-
-#endif
-
-#endif /* defined(USART2_ENABLED) */
-
-#if defined(USART3_ENABLED)
-
-/*
- * these functions are only for ATmegas with four USART
- */
-#if defined(ATMEGA_USART3)
-
-ISR(UART3_RECEIVE_INTERRUPT)
-/*************************************************************************
-Function: UART3 Receive Complete interrupt
-Purpose: called when the UART3 has received a character
-**************************************************************************/
-{
- uint16_t tmphead;
- uint8_t data;
- uint8_t usr;
- uint8_t lastRxError;
-
- /* read UART status register and UART data register */
- usr = UART3_STATUS;
- data = UART3_DATA;
-
- /* */
- lastRxError = (usr & (_BV(FE3)|_BV(DOR3)));
-
- /* calculate buffer index */
- tmphead = (UART3_RxHead + 1) & UART_RX3_BUFFER_MASK;
-
- if (tmphead == UART3_RxTail) {
- /* error: receive buffer overflow */
- lastRxError = UART_BUFFER_OVERFLOW >> 8;
- } else {
- /* store new index */
- UART3_RxHead = tmphead;
- /* store received data in buffer */
- UART3_RxBuf[tmphead] = data;
- }
- UART3_LastRxError = lastRxError;
-}
-
-
-ISR(UART3_TRANSMIT_INTERRUPT)
-/*************************************************************************
-Function: UART3 Data Register Empty interrupt
-Purpose: called when the UART3 is ready to transmit the next byte
-**************************************************************************/
-{
- uint16_t tmptail;
-
-
- if (UART3_TxHead != UART3_TxTail) {
- /* calculate and store new buffer index */
- tmptail = (UART3_TxTail + 1) & UART_TX3_BUFFER_MASK;
- UART3_TxTail = tmptail;
- /* get one byte from buffer and write it to UART */
- UART3_DATA = UART3_TxBuf[tmptail]; /* start transmission */
- } else {
- /* tx buffer empty, disable UDRE interrupt */
- UART3_CONTROL &= ~_BV(UART3_UDRIE);
- }
-}
-
-
-/*************************************************************************
-Function: uart3_init()
-Purpose: initialize UART3 and set baudrate
-Input: baudrate using macro UART_BAUD_SELECT()
-Returns: none
-**************************************************************************/
-void uart3_init(uint16_t baudrate)
-{
- ATOMIC_BLOCK(ATOMIC_FORCEON) {
- UART3_TxHead = 0;
- UART3_TxTail = 0;
- UART3_RxHead = 0;
- UART3_RxTail = 0;
- }
-
- /* Set baud rate */
- if (baudrate & 0x8000) {
- UART3_STATUS = (1<<U2X3); //Enable 2x speed
- baudrate &= ~0x8000;
- }
- UBRR3H = (uint8_t)(baudrate>>8);
- UBRR3L = (uint8_t) baudrate;
-
- /* Enable USART receiver and transmitter and receive complete interrupt */
- UART3_CONTROL = _BV(RXCIE3)|(1<<RXEN3)|(1<<TXEN3);
-
- /* Set frame format: asynchronous, 8data, no parity, 1stop bit */
-#ifdef URSEL3
- UCSR3C = (1<<URSEL3)|(3<<UCSZ30);
-#else
- UCSR3C = (3<<UCSZ30);
-#endif
-} /* uart_init */
-
-
-/*************************************************************************
-Function: uart3_getc()
-Purpose: return byte from ringbuffer
-Returns: lower byte: received byte from ringbuffer
- higher byte: last receive error
-**************************************************************************/
-uint16_t uart3_getc(void)
-{
- uint16_t tmptail;
- uint8_t data;
-
- ATOMIC_BLOCK(ATOMIC_FORCEON) {
- if (UART3_RxHead == UART3_RxTail) {
- return UART_NO_DATA; /* no data available */
- }
- }
-
- /* calculate / store buffer index */
- tmptail = (UART3_RxTail + 1) & UART_RX3_BUFFER_MASK;
- UART3_RxTail = tmptail;
-
- /* get data from receive buffer */
- data = UART3_RxBuf[tmptail];
-
- return (UART3_LastRxError << 8) + data;
-
-} /* uart3_getc */
-
-/*************************************************************************
-Function: uart3_peek()
-Purpose: Returns the next byte (character) of incoming UART data without
- removing it from the ring buffer. That is, successive calls to
- uartN_peek() will return the same character, as will the next
- call to uartN_getc()
-Returns: lower byte: next byte in ring buffer
- higher byte: last receive error
-**************************************************************************/
-uint16_t uart3_peek(void)
-{
- uint16_t tmptail;
- uint8_t data;
-
- ATOMIC_BLOCK(ATOMIC_FORCEON) {
- if (UART3_RxHead == UART3_RxTail) {
- return UART_NO_DATA; /* no data available */
- }
- }
-
- tmptail = (UART3_RxTail + 1) & UART_RX3_BUFFER_MASK;
-
- /* get data from receive buffer */
- data = UART3_RxBuf[tmptail];
-
- return (UART3_LastRxError << 8) + data;
-
-} /* uart3_peek */
-
-/*************************************************************************
-Function: uart3_putc()
-Purpose: write byte to ringbuffer for transmitting via UART
-Input: byte to be transmitted
-Returns: none
-**************************************************************************/
-void uart3_putc(uint8_t data)
-{
-
-#ifdef USART3_LARGE_BUFFER
- uint16_t tmphead;
- uint16_t txtail_tmp;
-
- tmphead = (UART3_TxHead + 1) & UART_TX3_BUFFER_MASK;
-
- do {
- ATOMIC_BLOCK(ATOMIC_FORCEON) {
- txtail_tmp = UART3_TxTail;
- }
- } while (tmphead == txtail_tmp); /* wait for free space in buffer */
-#else
- uint16_t tmphead;
-
- tmphead = (UART3_TxHead + 1) & UART_TX3_BUFFER_MASK;
-
- while (tmphead == UART3_TxTail); /* wait for free space in buffer */
-#endif
-
- UART3_TxBuf[tmphead] = data;
- UART3_TxHead = tmphead;
-
- /* enable UDRE interrupt */
- UART3_CONTROL |= _BV(UART3_UDRIE);
-
-} /* uart3_putc */
-
-
-/*************************************************************************
-Function: uart3_puts()
-Purpose: transmit string to UART3
-Input: string to be transmitted
-Returns: none
-**************************************************************************/
-void uart3_puts(const char *s)
-{
- while (*s) {
- uart3_putc(*s++);
- }
-
-} /* uart3_puts */
-
-
-/*************************************************************************
-Function: uart3_puts_p()
-Purpose: transmit string from program memory to UART3
-Input: program memory string to be transmitted
-Returns: none
-**************************************************************************/
-void uart3_puts_p(const char *progmem_s)
-{
- register char c;
-
- while ((c = pgm_read_byte(progmem_s++))) {
- uart3_putc(c);
- }
-
-} /* uart3_puts_p */
-
-
-
-/*************************************************************************
-Function: uart3_available()
-Purpose: Determine the number of bytes waiting in the receive buffer
-Input: None
-Returns: Integer number of bytes in the receive buffer
-**************************************************************************/
-uint16_t uart3_available(void)
-{
- uint16_t ret;
-
- ATOMIC_BLOCK(ATOMIC_FORCEON) {
- ret = (UART_RX3_BUFFER_SIZE + UART3_RxHead - UART3_RxTail) & UART_RX3_BUFFER_MASK;
- }
- return ret;
-} /* uart3_available */
-
-
-
-/*************************************************************************
-Function: uart3_flush()
-Purpose: Flush bytes waiting the receive buffer. Actually ignores them.
-Input: None
-Returns: None
-**************************************************************************/
-void uart3_flush(void)
-{
- ATOMIC_BLOCK(ATOMIC_FORCEON) {
- UART3_RxHead = UART3_RxTail;
- }
-} /* uart3_flush */
-
-#endif
-
-#endif /* defined(USART3_ENABLED) */
diff --git a/keyboards/bioi/usart.h b/keyboards/bioi/usart.h
deleted file mode 100644
index cc59c7236b..0000000000
--- a/keyboards/bioi/usart.h
+++ /dev/null
@@ -1,436 +0,0 @@
-#ifndef USART_H
-#define USART_H
-
-/************************************************************************
-Title: Interrupt UART library with receive/transmit circular buffers
-Author: Andy Gock
-Software: AVR-GCC 4.1, AVR Libc 1.4
-Hardware: any AVR with built-in UART, tested on AT90S8515 & ATmega8 at 4 Mhz
-License: GNU General Public License
-Usage: see README.md and Doxygen manual
-
-Based on original library by Peter Fluery, Tim Sharpe, Nicholas Zambetti.
-
-https://github.com/andygock/avr-uart
-
-LICENSE:
-
- Copyright (C) 2012 Andy Gock
- Copyright (C) 2006 Peter Fleury
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
-************************************************************************/
-
-/************************************************************************
-uart_available, uart_flush, uart1_available, and uart1_flush functions
-were adapted from the Arduino HardwareSerial.h library by Tim Sharpe on
-11 Jan 2009. The license info for HardwareSerial.h is as follows:
-
- HardwareSerial.h - Hardware serial library for Wiring
- Copyright (c) 2006 Nicholas Zambetti. All right reserved.
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-************************************************************************/
-
-/**
- * @defgroup avr-uart UART Library
- * @code #include <uart.h> @endcode
- *
- * @brief Interrupt UART library using the built-in UART with transmit and receive circular buffers.
- * @see README.md
- *
- * This library can be used to transmit and receive data through the built in UART.
- *
- * An interrupt is generated when the UART has finished transmitting or
- * receiving a byte. The interrupt handling routines use circular buffers
- * for buffering received and transmitted data.
- *
- * The UART_RXn_BUFFER_SIZE and UART_TXn_BUFFER_SIZE constants define
- * the size of the circular buffers in bytes. Note that these constants must be a power of 2.
- *
- * You need to define these buffer sizes as a symbol in your compiler settings or in uart.h
- *
- * See README.md for more detailed information. Especially that relating to symbols: USARTn_ENABLED and USARTn_LARGE_BUFFER
- *
- * @author Andy Gock <andy@gock.net>
- * @note Based on Atmel Application Note AVR306 and original library by Peter Fleury and Tim Sharpe.
- */
-
-/**@{*/
-#include <stdint.h>
-#include <avr/io.h>
-
-#if (__GNUC__ * 100 + __GNUC_MINOR__) < 304
-#error "This library requires AVR-GCC 3.4 or later, update to newer AVR-GCC compiler !"
-#endif
-
-/*
- * constants and macros
- */
-
-/* Enable USART 1, 2, 3 as required */
-/* Can be defined in compiler symbol setup with -D option (preferred) */
-#ifndef USART0_ENABLED
- #define USART0_ENABLED /**< Enable USART0 */
-#endif
-//#define USART1_ENABLED
-//#define USART2_ENABLED
-//#define USART3_ENABLED
-
-/* Set size of receive and transmit buffers */
-
-#ifndef UART_RX0_BUFFER_SIZE
- #define UART_RX0_BUFFER_SIZE 128 /**< Size of the circular receive buffer, must be power of 2 */
-#endif
-#ifndef UART_RX1_BUFFER_SIZE
- #define UART_RX1_BUFFER_SIZE 128 /**< Size of the circular receive buffer, must be power of 2 */
-#endif
-#ifndef UART_RX2_BUFFER_SIZE
- #define UART_RX2_BUFFER_SIZE 128 /**< Size of the circular receive buffer, must be power of 2 */
-#endif
-#ifndef UART_RX3_BUFFER_SIZE
- #define UART_RX3_BUFFER_SIZE 128 /**< Size of the circular receive buffer, must be power of 2 */
-#endif
-
-#ifndef UART_TX0_BUFFER_SIZE
- #define UART_TX0_BUFFER_SIZE 128 /**< Size of the circular transmit buffer, must be power of 2 */
-#endif
-#ifndef UART_TX1_BUFFER_SIZE
- #define UART_TX1_BUFFER_SIZE 128 /**< Size of the circular transmit buffer, must be power of 2 */
-#endif
-#ifndef UART_TX2_BUFFER_SIZE
- #define UART_TX2_BUFFER_SIZE 128 /**< Size of the circular transmit buffer, must be power of 2 */
-#endif
-#ifndef UART_TX3_BUFFER_SIZE
- #define UART_TX3_BUFFER_SIZE 128 /**< Size of the circular transmit buffer, must be power of 2 */
-#endif
-
-/* Check buffer sizes are not too large for 8-bit positioning */
-
-#if (UART_RX0_BUFFER_SIZE > 256 & !defined(USART0_LARGE_BUFFER))
- #error "Buffer too large, please use -DUSART0_LARGE_BUFFER switch in compiler options"
-#endif
-
-#if (UART_RX1_BUFFER_SIZE > 256 & !defined(USART1_LARGE_BUFFER))
- #error "Buffer too large, please use -DUSART1_LARGE_BUFFER switch in compiler options"
-#endif
-
-#if (UART_RX2_BUFFER_SIZE > 256 & !defined(USART2_LARGE_BUFFER))
- #error "Buffer too large, please use -DUSART2_LARGE_BUFFER switch in compiler options"
-#endif
-
-#if (UART_RX3_BUFFER_SIZE > 256 & !defined(USART3_LARGE_BUFFER))
- #error "Buffer too large, please use -DUSART3_LARGE_BUFFER switch in compiler options"
-#endif
-
-/* Check buffer sizes are not too large for *_LARGE_BUFFER operation (16-bit positioning) */
-
-#if (UART_RX0_BUFFER_SIZE > 32768)
- #error "Buffer too large, maximum allowed is 32768 bytes"
-#endif
-
-#if (UART_RX1_BUFFER_SIZE > 32768)
- #error "Buffer too large, maximum allowed is 32768 bytes"
-#endif
-
-#if (UART_RX2_BUFFER_SIZE > 32768)
- #error "Buffer too large, maximum allowed is 32768 bytes"
-#endif
-
-#if (UART_RX3_BUFFER_SIZE > 32768)
- #error "Buffer too large, maximum allowed is 32768 bytes"
-#endif
-
-/** @brief UART Baudrate Expression
- * @param xtalCpu system clock in Mhz, e.g. 4000000L for 4Mhz
- * @param baudRate baudrate in bps, e.g. 1200, 2400, 9600
- */
-#define UART_BAUD_SELECT(baudRate,xtalCpu) (((xtalCpu)+8UL*(baudRate))/(16UL*(baudRate))-1UL)
-
-/** @brief UART Baudrate Expression for ATmega double speed mode
- * @param xtalCpu system clock in Mhz, e.g. 4000000L for 4Mhz
- * @param baudRate baudrate in bps, e.g. 1200, 2400, 9600
- */
-#define UART_BAUD_SELECT_DOUBLE_SPEED(baudRate,xtalCpu) ((((xtalCpu)+4UL*(baudRate))/(8UL*(baudRate))-1)|0x8000)
-
-/* test if the size of the circular buffers fits into SRAM */
-
-#if defined(USART0_ENABLED) && ( (UART_RX0_BUFFER_SIZE+UART_TX0_BUFFER_SIZE) >= (RAMEND-0x60))
- #error "size of UART_RX0_BUFFER_SIZE + UART_TX0_BUFFER_SIZE larger than size of SRAM"
-#endif
-
-#if defined(USART1_ENABLED) && ( (UART_RX1_BUFFER_SIZE+UART_TX1_BUFFER_SIZE) >= (RAMEND-0x60))
- #error "size of UART_RX1_BUFFER_SIZE + UART_TX1_BUFFER_SIZE larger than size of SRAM"
-#endif
-
-#if defined(USART2_ENABLED) && ( (UART_RX2_BUFFER_SIZE+UART_RX2_BUFFER_SIZE) >= (RAMEND-0x60))
- #error "size of UART_RX2_BUFFER_SIZE + UART_TX2_BUFFER_SIZE larger than size of SRAM"
-#endif
-
-#if defined(USART3_ENABLED) && ( (UART_RX3_BUFFER_SIZE+UART_RX3_BUFFER_SIZE) >= (RAMEND-0x60))
- #error "size of UART_RX3_BUFFER_SIZE + UART_TX3_BUFFER_SIZE larger than size of SRAM"
-#endif
-
-/*
-** high byte error return code of uart_getc()
-*/
-#define UART_FRAME_ERROR 0x0800 /**< Framing Error by UART */
-#define UART_OVERRUN_ERROR 0x0400 /**< Overrun condition by UART */
-#define UART_BUFFER_OVERFLOW 0x0200 /**< receive ringbuffer overflow */
-#define UART_NO_DATA 0x0100 /**< no receive data available */
-
-/* Macros, to allow use of legacy names */
-
-/** @brief Macro to initialize USART0 (only available on selected ATmegas) @see uart0_init */
-#define uart_init(b) uart0_init(b)
-
-/** @brief Macro to get received byte of USART0 from ringbuffer. (only available on selected ATmega) @see uart0_getc */
-#define uart_getc() uart0_getc()
-
-/** @brief Macro to peek at next byte in USART0 ringbuffer */
-#define uart_peek() uart0_peek()
-
-/** @brief Macro to put byte to ringbuffer for transmitting via USART0 (only available on selected ATmega) @see uart0_putc */
-#define uart_putc(d) uart0_putc(d)
-
-/** @brief Macro to put string to ringbuffer for transmitting via USART0 (only available on selected ATmega) @see uart0_puts */
-#define uart_puts(s) uart0_puts(s)
-
-/** @brief Macro to put string from program memory to ringbuffer for transmitting via USART0 (only available on selected ATmega) @see uart0_puts_p */
-#define uart_puts_p(s) uart0_puts_p(s)
-
-/** @brief Macro to return number of bytes waiting in the receive buffer of USART0 @see uart0_available */
-#define uart_available() uart0_available()
-
-/** @brief Macro to flush bytes waiting in receive buffer of USART0 @see uart0_flush */
-#define uart_flush() uart0_flush()
-
-/*
-** function prototypes
-*/
-
-/**
- @brief Initialize UART and set baudrate
- @param baudrate Specify baudrate using macro UART_BAUD_SELECT()
- @return none
-*/
-/*extern*/void uart0_init(uint16_t baudrate);
-
-
-/**
- * @brief Get received byte from ringbuffer
- *
- * Returns in the lower byte the received character and in the
- * higher byte the last receive error.
- * UART_NO_DATA is returned when no data is available.
- *
- * @return lower byte: received byte from ringbuffer
- * @return higher byte: last receive status
- * - \b 0 successfully received data from UART
- * - \b UART_NO_DATA
- * <br>no receive data available
- * - \b UART_BUFFER_OVERFLOW
- * <br>Receive ringbuffer overflow.
- * We are not reading the receive buffer fast enough,
- * one or more received character have been dropped
- * - \b UART_OVERRUN_ERROR
- * <br>Overrun condition by UART.
- * A character already present in the UART UDR register was
- * not read by the interrupt handler before the next character arrived,
- * one or more received characters have been dropped.
- * - \b UART_FRAME_ERROR
- * <br>Framing Error by UART
- */
-/*extern*/uint16_t uart0_getc(void);
-
-/**
- * @brief Peek at next byte in ringbuffer
- *
- * Returns the next byte (character) of incoming UART data without removing it from the
- * internal ring buffer. That is, successive calls to uartN_peek() will return the same
- * character, as will the next call to uartN_getc().
- *
- * UART_NO_DATA is returned when no data is available.
- *
- * @return lower byte: next byte in ringbuffer
- * @return higher byte: last receive status
- * - \b 0 successfully received data from UART
- * - \b UART_NO_DATA
- * <br>no receive data available
- * - \b UART_BUFFER_OVERFLOW
- * <br>Receive ringbuffer overflow.
- * We are not reading the receive buffer fast enough,
- * one or more received character have been dropped
- * - \b UART_OVERRUN_ERROR
- * <br>Overrun condition by UART.
- * A character already present in the UART UDR register was
- * not read by the interrupt handler before the next character arrived,
- * one or more received characters have been dropped.
- * - \b UART_FRAME_ERROR
- * <br>Framing Error by UART
- */
-/*extern*/uint16_t uart0_peek(void);
-
-/**
- * @brief Put byte to ringbuffer for transmitting via UART
- * @param data byte to be transmitted
- * @return none
- */
-/*extern*/void uart0_putc(uint8_t data);
-
-
-/**
- * @brief Put string to ringbuffer for transmitting via UART
- *
- * The string is buffered by the uart library in a circular buffer
- * and one character at a time is transmitted to the UART using interrupts.
- * Blocks if it can not write the whole string into the circular buffer.
- *
- * @param s string to be transmitted
- * @return none
- */
-/*extern*/void uart0_puts(const char *s);
-
-
-/**
- * @brief Put string from program memory to ringbuffer for transmitting via UART.
- *
- * The string is buffered by the uart library in a circular buffer
- * and one character at a time is transmitted to the UART using interrupts.
- * Blocks if it can not write the whole string into the circular buffer.
- *
- * @param s program memory string to be transmitted
- * @return none
- * @see uart0_puts_P
- */
-/*extern*/void uart0_puts_p(const char *s);
-
-/**
- * @brief Macro to automatically put a string constant into program memory
- * \param __s string in program memory
- */
-#define uart_puts_P(__s) uart0_puts_p(PSTR(__s))
-
-/** @brief Macro to automatically put a string constant into program memory */
-#define uart0_puts_P(__s) uart0_puts_p(PSTR(__s))
-
-/**
- * @brief Return number of bytes waiting in the receive buffer
- * @return bytes waiting in the receive buffer
- */
-/*extern*/uint16_t uart0_available(void);
-
-/**
- * @brief Flush bytes waiting in receive buffer
- */
-/*extern*/void uart0_flush(void);
-
-
-/** @brief Initialize USART1 (only available on selected ATmegas) @see uart_init */
-/*extern*/void uart1_init(uint16_t baudrate);
-
-/** @brief Get received byte of USART1 from ringbuffer. (only available on selected ATmega) @see uart_getc */
-/*extern*/uint16_t uart1_getc(void);
-
-/** @brief Peek at next byte in USART1 ringbuffer */
-/*extern*/uint16_t uart1_peek(void);
-
-/** @brief Put byte to ringbuffer for transmitting via USART1 (only available on selected ATmega) @see uart_putc */
-/*extern*/void uart1_putc(uint8_t data);
-
-/** @brief Put string to ringbuffer for transmitting via USART1 (only available on selected ATmega) @see uart_puts */
-/*extern*/void uart1_puts(const char *s);
-
-/** @brief Put string from program memory to ringbuffer for transmitting via USART1 (only available on selected ATmega) @see uart_puts_p */
-/*extern*/void uart1_puts_p(const char *s);
-
-/** @brief Macro to automatically put a string constant into program memory of USART1 @see uart1_puts_p */
-#define uart1_puts_P(__s) uart1_puts_p(PSTR(__s))
-
-/** @brief Return number of bytes waiting in the receive buffer of USART1 */
-/*extern*/uint16_t uart1_available(void);
-
-/** @brief Flush bytes waiting in receive buffer of USART1 */
-/*extern*/void uart1_flush(void);
-
-
-/** @brief Initialize USART2 (only available on selected ATmegas) @see uart_init */
-/*extern*/void uart2_init(uint16_t baudrate);
-
-/** @brief Get received byte of USART2 from ringbuffer. (only available on selected ATmega) @see uart_getc */
-/*extern*/uint16_t uart2_getc(void);
-
-/** @brief Peek at next byte in USART2 ringbuffer */
-/*extern*/uint16_t uart2_peek(void);
-
-/** @brief Put byte to ringbuffer for transmitting via USART2 (only available on selected ATmega) @see uart_putc */
-/*extern*/void uart2_putc(uint8_t data);
-
-/** @brief Put string to ringbuffer for transmitting via USART2 (only available on selected ATmega) @see uart_puts */
-/*extern*/void uart2_puts(const char *s);
-
-/** @brief Put string from program memory to ringbuffer for transmitting via USART2 (only available on selected ATmega) @see uart_puts_p */
-/*extern*/void uart2_puts_p(const char *s);
-
-/** @brief Macro to automatically put a string constant into program memory of USART2 @see uart2_puts_p */
-#define uart2_puts_P(__s) uart2_puts_p(PSTR(__s))
-
-/** @brief Return number of bytes waiting in the receive buffer of USART2 */
-/*extern*/uint16_t uart2_available(void);
-
-/** @brief Flush bytes waiting in receive buffer of USART2 */
-/*extern*/void uart2_flush(void);
-
-
-/** @brief Initialize USART3 (only available on selected ATmegas) @see uart_init */
-/*extern*/void uart3_init(uint16_t baudrate);
-
-/** @brief Get received byte of USART3 from ringbuffer. (only available on selected ATmega) @see uart_getc */
-/*extern*/uint16_t uart3_getc(void);
-
-/** @brief Peek at next byte in USART3 ringbuffer */
-/*extern*/uint16_t uart3_peek(void);
-
-/** @brief Put byte to ringbuffer for transmitting via USART3 (only available on selected ATmega) @see uart_putc */
-/*extern*/void uart3_putc(uint8_t data);
-
-/** @brief Put string to ringbuffer for transmitting via USART3 (only available on selected ATmega) @see uart_puts */
-/*extern*/void uart3_puts(const char *s);
-
-/** @brief Put string from program memory to ringbuffer for transmitting via USART3 (only available on selected ATmega) @see uart_puts_p */
-/*extern*/void uart3_puts_p(const char *s);
-
-/** @brief Macro to automatically put a string constant into program memory of USART3 @see uart3_puts_p */
-#define uart3_puts_P(__s) uart3_puts_p(PSTR(__s))
-
-/** @brief Return number of bytes waiting in the receive buffer of USART3 */
-/*extern*/uint16_t uart3_available(void);
-
-/** @brief Flush bytes waiting in receive buffer of USART3 */
-/*extern*/void uart3_flush(void);
-
-/**@}*/
-
-#endif // UART_H
-
diff --git a/keyboards/bpiphany/kitten_paw/keymaps/ickerwx/keymap.c b/keyboards/bpiphany/kitten_paw/keymaps/ickerwx/keymap.c
index f0c75284f7..a2f36a303a 100644
--- a/keyboards/bpiphany/kitten_paw/keymaps/ickerwx/keymap.c
+++ b/keyboards/bpiphany/kitten_paw/keymaps/ickerwx/keymap.c
@@ -1,5 +1,4 @@
#include QMK_KEYBOARD_H
-#include "mousekey.h"
#define MEDAPP LT(MEDIA, KC_APP)
diff --git a/keyboards/bt66tech/bt66tech60/config.h b/keyboards/bt66tech/bt66tech60/config.h
index 45693628a6..b49e0a11cd 100644
--- a/keyboards/bt66tech/bt66tech60/config.h
+++ b/keyboards/bt66tech/bt66tech60/config.h
@@ -25,7 +25,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE
-#define WS2812_SPI SPID2
+#define WS2812_SPI_DRIVER SPID2
#define WS2812_SPI_MOSI_PAL_MODE 5
/*
* Feature disable options
diff --git a/keyboards/canary/canary60rgb/canary60rgb.c b/keyboards/canary/canary60rgb/canary60rgb.c
index c47abf57fd..065268c531 100644
--- a/keyboards/canary/canary60rgb/canary60rgb.c
+++ b/keyboards/canary/canary60rgb/canary60rgb.c
@@ -16,7 +16,7 @@
#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3733_led_t PROGMEM g_is31fl3733_leds[RGB_MATRIX_LED_COUNT] = {
{ 0, J_14, K_14, L_14 },
{ 0, J_13, K_13, L_13 },
{ 0, J_12, K_12, L_12 },
diff --git a/keyboards/canary/canary60rgb/v1/config.h b/keyboards/canary/canary60rgb/v1/config.h
index e8d0808384..ca20d9c0f2 100644
--- a/keyboards/canary/canary60rgb/v1/config.h
+++ b/keyboards/canary/canary60rgb/v1/config.h
@@ -33,7 +33,7 @@
# define DISABLE_RGB_MATRIX_MULTISPLASH
# define DISABLE_RGB_MATRIX_SOLID_SPLASH
# define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH
-# define DRIVER_ADDR_1 0b1010000
-# define DRIVER_COUNT 1
+# define DRIVER_ADDR_1 IS31FL3733_I2C_ADDRESS_GND_GND
+# define IS31FL3733_DRIVER_COUNT 1
# define RGB_MATRIX_LED_COUNT 63
#endif
diff --git a/keyboards/cannonkeys/an_c/config.h b/keyboards/cannonkeys/an_c/config.h
index bea77ceac2..f3d6237a78 100644
--- a/keyboards/cannonkeys/an_c/config.h
+++ b/keyboards/cannonkeys/an_c/config.h
@@ -26,7 +26,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE
-#define WS2812_SPI SPID2
+#define WS2812_SPI_DRIVER SPID2
#define WS2812_SPI_MOSI_PAL_MODE 0
#define WS2812_SPI_SCK_PAL_MODE 0
#define WS2812_SPI_SCK_PIN B13
diff --git a/keyboards/cannonkeys/atlas/config.h b/keyboards/cannonkeys/atlas/config.h
index e8d571f7a9..38f684a861 100644
--- a/keyboards/cannonkeys/atlas/config.h
+++ b/keyboards/cannonkeys/atlas/config.h
@@ -22,7 +22,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE
-#define WS2812_SPI SPID2
+#define WS2812_SPI_DRIVER SPID2
#define WS2812_SPI_MOSI_PAL_MODE 0
#define WS2812_SPI_SCK_PAL_MODE 0
#define WS2812_SPI_SCK_PIN B13
diff --git a/keyboards/cannonkeys/brutalv2_1800/rules.mk b/keyboards/cannonkeys/brutalv2_1800/rules.mk
index 59f8593f18..6e7633bfe0 100644
--- a/keyboards/cannonkeys/brutalv2_1800/rules.mk
+++ b/keyboards/cannonkeys/brutalv2_1800/rules.mk
@@ -1,2 +1 @@
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = rp2040_flash
+# This file intentionally left blank
diff --git a/keyboards/cannonkeys/caerdroia/rules.mk b/keyboards/cannonkeys/caerdroia/rules.mk
index 59f8593f18..6e7633bfe0 100644
--- a/keyboards/cannonkeys/caerdroia/rules.mk
+++ b/keyboards/cannonkeys/caerdroia/rules.mk
@@ -1,2 +1 @@
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = rp2040_flash
+# This file intentionally left blank
diff --git a/keyboards/cannonkeys/cloudline/config.h b/keyboards/cannonkeys/cloudline/config.h
index cff0a03945..41e58784b4 100644
--- a/keyboards/cannonkeys/cloudline/config.h
+++ b/keyboards/cannonkeys/cloudline/config.h
@@ -12,7 +12,7 @@
/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE
-#define WS2812_SPI SPID2
+#define WS2812_SPI_DRIVER SPID2
#define WS2812_SPI_MOSI_PAL_MODE 0
#define WS2812_SPI_SCK_PAL_MODE 0
#define WS2812_SPI_SCK_PIN B13
diff --git a/keyboards/cannonkeys/db60/config.h b/keyboards/cannonkeys/db60/config.h
index bea77ceac2..f3d6237a78 100644
--- a/keyboards/cannonkeys/db60/config.h
+++ b/keyboards/cannonkeys/db60/config.h
@@ -26,7 +26,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE
-#define WS2812_SPI SPID2
+#define WS2812_SPI_DRIVER SPID2
#define WS2812_SPI_MOSI_PAL_MODE 0
#define WS2812_SPI_SCK_PAL_MODE 0
#define WS2812_SPI_SCK_PIN B13
diff --git a/keyboards/cannonkeys/devastatingtkl/config.h b/keyboards/cannonkeys/devastatingtkl/config.h
index bea77ceac2..f3d6237a78 100644
--- a/keyboards/cannonkeys/devastatingtkl/config.h
+++ b/keyboards/cannonkeys/devastatingtkl/config.h
@@ -26,7 +26,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE
-#define WS2812_SPI SPID2
+#define WS2812_SPI_DRIVER SPID2
#define WS2812_SPI_MOSI_PAL_MODE 0
#define WS2812_SPI_SCK_PAL_MODE 0
#define WS2812_SPI_SCK_PIN B13
diff --git a/keyboards/cannonkeys/instant60/config.h b/keyboards/cannonkeys/instant60/config.h
index bea77ceac2..f3d6237a78 100644
--- a/keyboards/cannonkeys/instant60/config.h
+++ b/keyboards/cannonkeys/instant60/config.h
@@ -26,7 +26,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE
-#define WS2812_SPI SPID2
+#define WS2812_SPI_DRIVER SPID2
#define WS2812_SPI_MOSI_PAL_MODE 0
#define WS2812_SPI_SCK_PAL_MODE 0
#define WS2812_SPI_SCK_PIN B13
diff --git a/keyboards/cannonkeys/instant65/config.h b/keyboards/cannonkeys/instant65/config.h
index 0adcfdfa92..0b1e0948b3 100644
--- a/keyboards/cannonkeys/instant65/config.h
+++ b/keyboards/cannonkeys/instant65/config.h
@@ -26,7 +26,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE
-#define WS2812_SPI SPID2
+#define WS2812_SPI_DRIVER SPID2
#define WS2812_SPI_MOSI_PAL_MODE 0
#define WS2812_SPI_SCK_PAL_MODE 0
#define WS2812_SPI_SCK_PIN B13
diff --git a/keyboards/cannonkeys/malicious_ergo/config.h b/keyboards/cannonkeys/malicious_ergo/config.h
index 70d39892fd..f2314b6077 100644
--- a/keyboards/cannonkeys/malicious_ergo/config.h
+++ b/keyboards/cannonkeys/malicious_ergo/config.h
@@ -28,7 +28,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE
-#define WS2812_SPI SPID2
+#define WS2812_SPI_DRIVER SPID2
#define WS2812_SPI_MOSI_PAL_MODE 0
#define WS2812_SPI_SCK_PAL_MODE 0
#define WS2812_SPI_SCK_PIN B13
diff --git a/keyboards/cannonkeys/obliterated75/config.h b/keyboards/cannonkeys/obliterated75/config.h
index 0adcfdfa92..0b1e0948b3 100644
--- a/keyboards/cannonkeys/obliterated75/config.h
+++ b/keyboards/cannonkeys/obliterated75/config.h
@@ -26,7 +26,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE
-#define WS2812_SPI SPID2
+#define WS2812_SPI_DRIVER SPID2
#define WS2812_SPI_MOSI_PAL_MODE 0
#define WS2812_SPI_SCK_PAL_MODE 0
#define WS2812_SPI_SCK_PIN B13
diff --git a/keyboards/cannonkeys/ortho48/config.h b/keyboards/cannonkeys/ortho48/config.h
index 703975ab86..32412b1d54 100644
--- a/keyboards/cannonkeys/ortho48/config.h
+++ b/keyboards/cannonkeys/ortho48/config.h
@@ -25,7 +25,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE
-#define WS2812_SPI SPID2
+#define WS2812_SPI_DRIVER SPID2
/*
* Feature disable options
diff --git a/keyboards/cannonkeys/ortho48v2/rules.mk b/keyboards/cannonkeys/ortho48v2/rules.mk
index 59f8593f18..6e7633bfe0 100644
--- a/keyboards/cannonkeys/ortho48v2/rules.mk
+++ b/keyboards/cannonkeys/ortho48v2/rules.mk
@@ -1,2 +1 @@
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = rp2040_flash
+# This file intentionally left blank
diff --git a/keyboards/cannonkeys/ortho60/config.h b/keyboards/cannonkeys/ortho60/config.h
index 703975ab86..32412b1d54 100644
--- a/keyboards/cannonkeys/ortho60/config.h
+++ b/keyboards/cannonkeys/ortho60/config.h
@@ -25,7 +25,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE
-#define WS2812_SPI SPID2
+#define WS2812_SPI_DRIVER SPID2
/*
* Feature disable options
diff --git a/keyboards/cannonkeys/ortho60v2/rules.mk b/keyboards/cannonkeys/ortho60v2/rules.mk
index 59f8593f18..6e7633bfe0 100644
--- a/keyboards/cannonkeys/ortho60v2/rules.mk
+++ b/keyboards/cannonkeys/ortho60v2/rules.mk
@@ -1,2 +1 @@
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = rp2040_flash
+# This file intentionally left blank
diff --git a/keyboards/cannonkeys/ortho75/config.h b/keyboards/cannonkeys/ortho75/config.h
index 703975ab86..32412b1d54 100644
--- a/keyboards/cannonkeys/ortho75/config.h
+++ b/keyboards/cannonkeys/ortho75/config.h
@@ -25,7 +25,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE
-#define WS2812_SPI SPID2
+#define WS2812_SPI_DRIVER SPID2
/*
* Feature disable options
diff --git a/keyboards/cannonkeys/practice60/config.h b/keyboards/cannonkeys/practice60/config.h
index 703975ab86..32412b1d54 100644
--- a/keyboards/cannonkeys/practice60/config.h
+++ b/keyboards/cannonkeys/practice60/config.h
@@ -25,7 +25,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE
-#define WS2812_SPI SPID2
+#define WS2812_SPI_DRIVER SPID2
/*
* Feature disable options
diff --git a/keyboards/cannonkeys/practice65/config.h b/keyboards/cannonkeys/practice65/config.h
index 703975ab86..32412b1d54 100644
--- a/keyboards/cannonkeys/practice65/config.h
+++ b/keyboards/cannonkeys/practice65/config.h
@@ -25,7 +25,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE
-#define WS2812_SPI SPID2
+#define WS2812_SPI_DRIVER SPID2
/*
* Feature disable options
diff --git a/keyboards/cannonkeys/ripple/config.h b/keyboards/cannonkeys/ripple/config.h
index 68745474c9..d95e23cfaa 100644
--- a/keyboards/cannonkeys/ripple/config.h
+++ b/keyboards/cannonkeys/ripple/config.h
@@ -12,7 +12,7 @@
/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE
-#define WS2812_SPI SPID2
+#define WS2812_SPI_DRIVER SPID2
#define WS2812_SPI_MOSI_PAL_MODE 0
#define WS2812_SPI_SCK_PAL_MODE 0
#define WS2812_SPI_SCK_PIN B13
diff --git a/keyboards/cannonkeys/sagittarius/config.h b/keyboards/cannonkeys/sagittarius/config.h
index b48d66fd78..b8cdc797d0 100644
--- a/keyboards/cannonkeys/sagittarius/config.h
+++ b/keyboards/cannonkeys/sagittarius/config.h
@@ -26,7 +26,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE
-#define WS2812_SPI SPID2
+#define WS2812_SPI_DRIVER SPID2
#define WS2812_SPI_MOSI_PAL_MODE 0
#define WS2812_SPI_SCK_PAL_MODE 0
#define WS2812_SPI_SCK_PIN B13
diff --git a/keyboards/cannonkeys/savage65/config.h b/keyboards/cannonkeys/savage65/config.h
index 0adcfdfa92..0b1e0948b3 100644
--- a/keyboards/cannonkeys/savage65/config.h
+++ b/keyboards/cannonkeys/savage65/config.h
@@ -26,7 +26,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE
-#define WS2812_SPI SPID2
+#define WS2812_SPI_DRIVER SPID2
#define WS2812_SPI_MOSI_PAL_MODE 0
#define WS2812_SPI_SCK_PAL_MODE 0
#define WS2812_SPI_SCK_PIN B13
diff --git a/keyboards/cannonkeys/serenity/config.h b/keyboards/cannonkeys/serenity/config.h
index 4b06e24a1c..5f31f2374d 100644
--- a/keyboards/cannonkeys/serenity/config.h
+++ b/keyboards/cannonkeys/serenity/config.h
@@ -21,7 +21,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define BACKLIGHT_PWM_CHANNEL 1
#define BACKLIGHT_PAL_MODE 1
-#define WS2812_SPI SPID2
+#define WS2812_SPI_DRIVER SPID2
#define WS2812_SPI_MOSI_PAL_MODE 0
#define WS2812_SPI_SCK_PAL_MODE 0
#define WS2812_SPI_SCK_PIN B13
diff --git a/keyboards/cannonkeys/tmov2/config.h b/keyboards/cannonkeys/tmov2/config.h
index bea77ceac2..f3d6237a78 100644
--- a/keyboards/cannonkeys/tmov2/config.h
+++ b/keyboards/cannonkeys/tmov2/config.h
@@ -26,7 +26,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE
-#define WS2812_SPI SPID2
+#define WS2812_SPI_DRIVER SPID2
#define WS2812_SPI_MOSI_PAL_MODE 0
#define WS2812_SPI_SCK_PAL_MODE 0
#define WS2812_SPI_SCK_PIN B13
diff --git a/keyboards/cannonkeys/tsukuyomi/config.h b/keyboards/cannonkeys/tsukuyomi/config.h
index 0adcfdfa92..0b1e0948b3 100644
--- a/keyboards/cannonkeys/tsukuyomi/config.h
+++ b/keyboards/cannonkeys/tsukuyomi/config.h
@@ -26,7 +26,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE
-#define WS2812_SPI SPID2
+#define WS2812_SPI_DRIVER SPID2
#define WS2812_SPI_MOSI_PAL_MODE 0
#define WS2812_SPI_SCK_PAL_MODE 0
#define WS2812_SPI_SCK_PIN B13
diff --git a/keyboards/cannonkeys/typeb/rules.mk b/keyboards/cannonkeys/typeb/rules.mk
index 59f8593f18..6e7633bfe0 100644
--- a/keyboards/cannonkeys/typeb/rules.mk
+++ b/keyboards/cannonkeys/typeb/rules.mk
@@ -1,2 +1 @@
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = rp2040_flash
+# This file intentionally left blank
diff --git a/keyboards/capsunlocked/cu75/config.h b/keyboards/capsunlocked/cu75/config.h
index b8cd9eeebb..b9449c4714 100644
--- a/keyboards/capsunlocked/cu75/config.h
+++ b/keyboards/capsunlocked/cu75/config.h
@@ -17,8 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once
-#define BACKLIGHT_PWM_MAP {8, 16, 40, 55, 70, 128, 200, 255}
-
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE
/* Locking resynchronize hack */
diff --git a/keyboards/capsunlocked/cu75/cu75.c b/keyboards/capsunlocked/cu75/cu75.c
index c894d18602..f980b0d9e1 100644
--- a/keyboards/capsunlocked/cu75/cu75.c
+++ b/keyboards/capsunlocked/cu75/cu75.c
@@ -1,15 +1,8 @@
-#include <avr/sfr_defs.h>
-#include <avr/timer_avr.h>
-#include <avr/wdt.h>
#include "cu75.h"
-#include "debug.h"
-#include "../lfkeyboards/issi.h"
-#include "../lfkeyboards/TWIlib.h"
-#include "../lfkeyboards/lighting.h"
+#include <avr/wdt.h>
#ifdef AUDIO_ENABLE
float test_sound[][2] = SONG(STARTUP_SOUND);
-#include "audio.h"
#endif
uint16_t click_hz = CLICK_HZ;
@@ -34,9 +27,6 @@ void matrix_init_kb(void)
setPinOutput(C6);
writePinLow(C6);
#endif
-#ifdef ISSI_ENABLE
- issi_init();
-#endif
}
void matrix_scan_kb(void)
@@ -44,30 +34,6 @@ void matrix_scan_kb(void)
#ifdef WATCHDOG_ENABLE
wdt_reset();
#endif
-#ifdef ISSI_ENABLE
- // switch/underglow lighting update
- static uint32_t issi_device = 0;
- static uint32_t twi_last_ready = 0;
- if(twi_last_ready > 1000){
- // Its been way too long since the last ISSI update, reset the I2C bus and start again
- dprintf("TWI failed to recover, TWI re-init\n");
- twi_last_ready = 0;
- TWIInit();
- force_issi_refresh();
- }
- if(isTWIReady()){
- twi_last_ready = 0;
- // If the i2c bus is available, kick off the issi update, alternate between devices
- update_issi(issi_device, issi_device);
- if(issi_device){
- issi_device = 0;
- }else{
- issi_device = 3;
- }
- }else{
- twi_last_ready++;
- }
-#endif
matrix_scan_user();
}
@@ -92,7 +58,6 @@ bool process_record_kb(uint16_t keycode, keyrecord_t* record)
}
if (keycode == QK_BOOT) {
reset_keyboard_kb();
- } else {
}
return process_record_user(keycode, record);
}
@@ -105,11 +70,3 @@ void reset_keyboard_kb(void){
#endif
reset_keyboard();
}
-
-// LFK lighting info
-const uint8_t switch_matrices[] = {0, 1};
-const uint8_t rgb_matrices[] = {6, 7};
-const uint8_t rgb_sequence[] = {
- 24, 23, 22, 21, 20, 19, 18, 17, 1, 2, 3, 4, 5,
- 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 9
-};
diff --git a/keyboards/capsunlocked/cu75/cu75.h b/keyboards/capsunlocked/cu75/cu75.h
index d17c1da26f..36797efd8f 100644
--- a/keyboards/capsunlocked/cu75/cu75.h
+++ b/keyboards/capsunlocked/cu75/cu75.h
@@ -1,23 +1,6 @@
#pragma once
#include "quantum.h"
-#include "matrix.h"
-#include <avr/sfr_defs.h>
-
-typedef struct RGB_Color {
- uint16_t red;
- uint16_t green;
- uint16_t blue;
-} RGB_Color;
-
-typedef struct Layer_Info {
- uint32_t layer;
- uint32_t mask;
- RGB_Color color;
-} Layer_Info;
-
-extern const uint32_t layer_count;
-extern const Layer_Info layer_info[];
#define CLICK_HZ 500
#define CLICK_MS 2
diff --git a/keyboards/capsunlocked/cu75/info.json b/keyboards/capsunlocked/cu75/info.json
index 24aed787ef..25e3ca049f 100644
--- a/keyboards/capsunlocked/cu75/info.json
+++ b/keyboards/capsunlocked/cu75/info.json
@@ -13,30 +13,6 @@
"rows": ["F1", "B7", "B3", "D2", "D3", "B2"]
},
"diode_direction": "COL2ROW",
- "backlight": {
- "driver": "custom",
- "levels": 8
- },
- "rgblight": {
- "driver": "custom",
- "hue_steps": 10,
- "led_count": 24,
- "animations": {
- "breathing": true,
- "rainbow_mood": true,
- "rainbow_swirl": true,
- "snake": true,
- "knight": true,
- "christmas": true,
- "static_gradient": true,
- "rgb_test": true,
- "alternating": true,
- "twinkle": true
- }
- },
- "ws2812": {
- "pin": "C7"
- },
"processor": "atmega32u4",
"bootloader": "atmel-dfu",
"layouts": {
diff --git a/keyboards/capsunlocked/cu75/keymaps/default/rules.mk b/keyboards/capsunlocked/cu75/keymaps/default/rules.mk
index 483baa7993..b4a28dd964 100644
--- a/keyboards/capsunlocked/cu75/keymaps/default/rules.mk
+++ b/keyboards/capsunlocked/cu75/keymaps/default/rules.mk
@@ -4,10 +4,5 @@ EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE = no # Console for debug
COMMAND_ENABLE = no # Commands for debug and configuration
NKRO_ENABLE = yes
-BACKLIGHT_ENABLE = yes # Disable keyboard backlight functionality
AUDIO_ENABLE = no # Audio output
-RGBLIGHT_ENABLE = yes # Disable RGB underlight
-SLEEP_LED_ENABLE = yes
-
-ISSI_ENABLE = yes # If the I2C pullup resistors aren't install this must be disabled
WATCHDOG_ENABLE = no # Resets keyboard if matrix_scan isn't run every 250ms
diff --git a/keyboards/capsunlocked/cu75/keymaps/iso/rules.mk b/keyboards/capsunlocked/cu75/keymaps/iso/rules.mk
index 0058113605..c692135bf3 100644
--- a/keyboards/capsunlocked/cu75/keymaps/iso/rules.mk
+++ b/keyboards/capsunlocked/cu75/keymaps/iso/rules.mk
@@ -4,10 +4,5 @@ EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
CONSOLE_ENABLE = yes # Console for debug(+400)
COMMAND_ENABLE = yes # Commands for debug and configuration
NKRO_ENABLE = yes
-# BACKLIGHT_ENABLE = no # Disable keyboard backlight functionality
AUDIO_ENABLE = no # Audio output
-RGBLIGHT_ENABLE = no # Disable RGB underlight
-SLEEP_LED_ENABLE = yes
-
-ISSI_ENABLE = no # If the I2C pullup resistors aren't install this must be disabled
WATCHDOG_ENABLE = yes # Resets keyboard if matrix_scan isn't run every 250ms
diff --git a/keyboards/capsunlocked/cu75/post_rules.mk b/keyboards/capsunlocked/cu75/post_rules.mk
index a5d9746664..1a3c10d3a1 100644
--- a/keyboards/capsunlocked/cu75/post_rules.mk
+++ b/keyboards/capsunlocked/cu75/post_rules.mk
@@ -1,7 +1,3 @@
-ifeq ($(strip $(ISSI_ENABLE)), yes)
- OPT_DEFS += -DISSI_ENABLE
-endif
-
ifeq ($(strip $(WATCHDOG_ENABLE)), yes)
OPT_DEFS += -DWATCHDOG_ENABLE
endif
diff --git a/keyboards/capsunlocked/cu75/rules.mk b/keyboards/capsunlocked/cu75/rules.mk
index cf757fc166..e69de29bb2 100644
--- a/keyboards/capsunlocked/cu75/rules.mk
+++ b/keyboards/capsunlocked/cu75/rules.mk
@@ -1,3 +0,0 @@
-# TODO: These boards need to be converted to RGB Matrix
-VPATH += keyboards/lfkeyboards
-SRC = TWIlib.c issi.c lighting.c
diff --git a/keyboards/centromere/rules.mk b/keyboards/centromere/rules.mk
index 2171d801e5..26081e4132 100644
--- a/keyboards/centromere/rules.mk
+++ b/keyboards/centromere/rules.mk
@@ -18,4 +18,4 @@ CUSTOM_MATRIX = lite
# project specific files
SRC += matrix.c
-QUANTUM_LIB_SRC += uart.c
+UART_DRIVER_REQUIRED = yes
diff --git a/keyboards/chosfox/cf81/cf81.c b/keyboards/chosfox/cf81/cf81.c
index ab8afd0c63..ad7ec9bc55 100644
--- a/keyboards/chosfox/cf81/cf81.c
+++ b/keyboards/chosfox/cf81/cf81.c
@@ -18,8 +18,8 @@
// clang-format off
#ifdef RGB_MATRIX_ENABLE
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to IS31 manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | R location
* | | G location
diff --git a/keyboards/chosfox/cf81/config.h b/keyboards/chosfox/cf81/config.h
index b1ea8bba20..5895d60903 100644
--- a/keyboards/chosfox/cf81/config.h
+++ b/keyboards/chosfox/cf81/config.h
@@ -16,9 +16,6 @@
#pragma once
-/* Use 4 dynamic keymap layers */
-#define DYNAMIC_KEYMAP_LAYER_COUNT 4
-
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE
/* Locking resynchronize hack */
@@ -32,12 +29,11 @@
#define SPI_MOSI_PAL_MODE 5
#define EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN C12
-#define WEAR_LEVELING_BACKING_SIZE (8 * 1024)
/* I2C Config for LED Driver */
-#define DRIVER_COUNT 2
-#define DRIVER_ADDR_1 0b1110100
-#define DRIVER_ADDR_2 0b1110111
+#define SNLED27351_DRIVER_COUNT 2
+#define DRIVER_ADDR_1 SNLED27351_I2C_ADDRESS_GND
+#define DRIVER_ADDR_2 SNLED27351_I2C_ADDRESS_VDDIO
#define I2C1_OPMODE OPMODE_I2C
#define I2C1_CLOCK_SPEED 400000 /* 400000 */
diff --git a/keyboards/chosfox/cf81/info.json b/keyboards/chosfox/cf81/info.json
index 827347f41e..5dff610071 100644
--- a/keyboards/chosfox/cf81/info.json
+++ b/keyboards/chosfox/cf81/info.json
@@ -10,7 +10,11 @@
"suspend_wakeup_delay": 400
},
"eeprom": {
- "driver": "wear_leveling"
+ "driver": "wear_leveling",
+ "wear_leveling": {
+ "driver": "spi_flash",
+ "backing_size": 8192
+ }
},
"processor": "WB32FQ95",
"bootloader": "wb32-dfu",
@@ -35,7 +39,7 @@
]
},
"rgb_matrix": {
- "driver": "is31fl3733",
+ "driver": "snled27351",
"animations": {
"breathing": true,
"cycle_all": true,
diff --git a/keyboards/chosfox/cf81/rules.mk b/keyboards/chosfox/cf81/rules.mk
index 002458405e..6e7633bfe0 100644
--- a/keyboards/chosfox/cf81/rules.mk
+++ b/keyboards/chosfox/cf81/rules.mk
@@ -1 +1 @@
-WEAR_LEVELING_DRIVER = spi_flash
+# This file intentionally left blank
diff --git a/keyboards/chromatonemini/chromatonemini.c b/keyboards/chromatonemini/chromatonemini.c
index d7dc33a0e0..200ed31d36 100644
--- a/keyboards/chromatonemini/chromatonemini.c
+++ b/keyboards/chromatonemini/chromatonemini.c
@@ -19,66 +19,6 @@
#ifdef RGB_MATRIX_ENABLE
# define NO_LED 255
-led_config_t g_led_config = {
- {
-#if 0
- // register bottom two rows
- { 0, 4, 3, 2, 1, 41, 5, NO_LED },
- { 40, 6, 39, 7, 38, 8, 37, NO_LED },
- { 9, 36, 10, 35, 11, 34, 12, NO_LED },
- { 33, 13, 32, 14, 31, 15, 30, NO_LED },
- { 16, 29, 17, 28, 18, 27, 19, NO_LED },
- { 26, 20, 25, 21, 24, 22, 23, NO_LED }
-
- // register middle two rows
- { 0, 4, 3, 2, 1, 78, 42, NO_LED },
- { 77, 43, 76, 44, 75, 45, 74, NO_LED },
- { 46, 73, 47, 72, 48, 71, 49, NO_LED },
- { 70, 50, 69, 51, 68, 52, 67, NO_LED },
- { 53, 66, 54, 65, 55, 64, 56, NO_LED },
- { 63, 57, 62, 58, 61, 59, 60, NO_LED }
-
- // register top and bottom rows
- { 0, 4, 3, 2, 1, 115, 5, NO_LED },
- { 114, 6, 113, 7, 112, 8, 111, NO_LED },
- { 9, 110, 10, 109, 11, 108, 12, NO_LED },
- { 107, 13, 106, 14, 105, 15, 104, NO_LED },
- { 16, 103, 17, 102, 18, 101, 19, NO_LED },
- { 100, 20, 99, 21, 98, 22, 97, NO_LED }
-#else
- // register top two rows
- { 0, 4, 3, 2, 1, 115, 79, NO_LED },
- { 114, 80, 113, 81, 112, 82, 111, NO_LED },
- { 83, 110, 84, 109, 85, 108, 86, NO_LED },
- { 107, 87, 106, 88, 105, 89, 104, NO_LED },
- { 90, 103, 91, 102, 92, 101, 93, NO_LED },
- { 100, 94, 99, 95, 98, 96, 97, NO_LED }
-#endif
- }, {
- { 14, 12 },
- { 14, 36 },
- { 19, 48 }, { 9, 48 },
- { 14, 60 },
- { 39, 60 }, { 49, 60 }, { 59, 60 }, { 69, 60 }, { 79, 60 }, { 89, 60 }, { 99, 60 }, { 109, 60 }, { 119, 60 }, { 129, 60 }, { 139, 60 }, { 149, 60 }, { 159, 60 }, { 169, 60 }, { 179, 60 }, { 189, 60 }, { 199, 60 }, { 209, 60 },
- { 214, 48 }, { 204, 48 }, { 194, 48 }, { 184, 48 }, { 174, 48 }, { 164, 48 }, { 154, 48 }, { 144, 48 }, { 134, 48 }, { 124, 48 }, { 114, 48 }, { 104, 48 }, { 94, 48 }, { 84, 48 }, { 74, 48 }, { 64, 48 }, { 54, 48 }, { 44, 48 }, { 34, 48 },
- { 39, 36 }, { 49, 36 }, { 59, 36 }, { 69, 36 }, { 79, 36 }, { 89, 36 }, { 99, 36 }, { 109, 36 }, { 119, 36 }, { 129, 36 }, { 139, 36 }, { 149, 36 }, { 159, 36 }, { 169, 36 }, { 179, 36 }, { 189, 36 }, { 199, 36 }, { 209, 36 },
- { 214, 24 }, { 204, 24 }, { 194, 24 }, { 184, 24 }, { 174, 24 }, { 164, 24 }, { 154, 24 }, { 144, 24 }, { 134, 24 }, { 124, 24 }, { 114, 24 }, { 104, 24 }, { 94, 24 }, { 84, 24 }, { 74, 24 }, { 64, 24 }, { 54, 24 }, { 44, 24 }, { 34, 24 },
- { 39, 12 }, { 49, 12 }, { 59, 12 }, { 69, 12 }, { 79, 12 }, { 89, 12 }, { 99, 12 }, { 109, 12 }, { 119, 12 }, { 129, 12 }, { 139, 12 }, { 149, 12 }, { 159, 12 }, { 169, 12 }, { 179, 12 }, { 189, 12 }, { 199, 12 }, { 209, 12 },
- { 214, 0 }, { 204, 0 }, { 194, 0 }, { 184, 0 }, { 174, 0 }, { 164, 0 }, { 154, 0 }, { 144, 0 }, { 134, 0 }, { 124, 0 }, { 114, 0 }, { 104, 0 }, { 94, 0 }, { 84, 0 }, { 74, 0 }, { 64, 0} , { 54, 0 }, { 44, 0 }, { 34, 0 }
- }, {
- 1,
- 4,
- 4, 4,
- 4,
- 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
- 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
- 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
- 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
- 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
- 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4
- }
-};
-
// indicator
const uint8_t led_scale_indicator[12][12] = {
{23, 29, 35, 41, 60, 66, 72, 78, 97, 103, 109, 115}, // C
diff --git a/keyboards/chromatonemini/config.h b/keyboards/chromatonemini/config.h
index b5d7155516..83e6ccfe0e 100644
--- a/keyboards/chromatonemini/config.h
+++ b/keyboards/chromatonemini/config.h
@@ -21,16 +21,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* ws2812 RGB MATRIX */
# define RGB_MATRIX_LED_COUNT 116
-
// reacts to keypresses
# define RGB_MATRIX_KEYPRESSES
// for all fingers used at once.
# define LED_HITS_TO_REMEMBER 10
-# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 50
# define RGB_MATRIX_DEFAULT_SPD 127
-# define RGB_MATRIX_CENTER { 124, 32 }
+
// the above brighness setting has no effect on rgb_matrix_set_color().
// Use darker colors instead.
/* RGB darker COLORS */
@@ -56,51 +54,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// https://docs.qmk.fm/#/feature_rgb_matrix
// Enable suspend mode.
# define RGB_DISABLE_WHEN_USB_SUSPENDED
-
-# ifdef CONSOLE_ENABLE
-# define ENABLE_RGB_MATRIX_SOLID_COLOR
-# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
-# else
-# define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN
-# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT
-# define ENABLE_RGB_MATRIX_BREATHING
-# define ENABLE_RGB_MATRIX_BAND_SAT
-# define ENABLE_RGB_MATRIX_BAND_VAL
-# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
-# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL
-# define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT
-# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL
-# define ENABLE_RGB_MATRIX_CYCLE_ALL
-# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
-# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN
-# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
-# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN
-# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
-# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL
-# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL
-# define ENABLE_RGB_MATRIX_DUAL_BEACON
-# define ENABLE_RGB_MATRIX_RAINBOW_BEACON
-# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS
-# define ENABLE_RGB_MATRIX_RAINDROPS
-# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
-# define ENABLE_RGB_MATRIX_HUE_BREATHING
-# define ENABLE_RGB_MATRIX_HUE_PENDULUM
-# define ENABLE_RGB_MATRIX_HUE_WAVE
-# define ENABLE_RGB_MATRIX_TYPING_HEATMAP
-# define ENABLE_RGB_MATRIX_DIGITAL_RAIN
-# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
-# define ENABLE_RGB_MATRIX_SOLID_REACTIVE
-# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
-# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
-# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
-# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
-# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
-# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
-# define ENABLE_RGB_MATRIX_SPLASH
-# define ENABLE_RGB_MATRIX_MULTISPLASH
-# define ENABLE_RGB_MATRIX_SOLID_SPLASH
-# define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
-# endif // CONSOLE_ENABLE
#endif // RGB_MATRIX_ENABLE
/* Audio */
diff --git a/keyboards/chromatonemini/info.json b/keyboards/chromatonemini/info.json
index 3dd10d7381..fb4f0c737f 100644
--- a/keyboards/chromatonemini/info.json
+++ b/keyboards/chromatonemini/info.json
@@ -3,8 +3,10 @@
"manufacturer": "3araht",
"url": "https://github.com/3araht/chromatonemini",
"maintainer": "3araht",
- "bootloader": "caterina",
- "processor": "atmega32u4",
+ "development_board": "promicro",
+ "build": {
+ "lto": true
+ },
"features": {
"midi": true,
"extrakey": true,
@@ -13,15 +15,179 @@
"bootmagic": false,
"console": false,
"mousekey": false,
- "nkro": false,
- "rgblight": false,
- "audio": false
+ "nkro": false
},
"ws2812": {
"pin": "D3"
},
"rgb_matrix": {
- "driver": "ws2812"
+ "driver": "ws2812",
+ "layout": [
+ {"matrix": [0, 0], "x": 14, "y": 12, "flags": 1},
+ {"matrix": [0, 4], "x": 14, "y": 36, "flags": 4},
+ {"matrix": [0, 3], "x": 19, "y": 48, "flags": 4},
+ {"matrix": [0, 2], "x": 9, "y": 48, "flags": 4},
+ {"matrix": [0, 1], "x": 14, "y": 60, "flags": 4},
+ {"x": 39, "y": 60, "flags": 4},
+ {"x": 49, "y": 60, "flags": 4},
+ {"x": 59, "y": 60, "flags": 4},
+ {"x": 69, "y": 60, "flags": 4},
+ {"x": 79, "y": 60, "flags": 4},
+ {"x": 89, "y": 60, "flags": 4},
+ {"x": 99, "y": 60, "flags": 4},
+ {"x": 109, "y": 60, "flags": 4},
+ {"x": 119, "y": 60, "flags": 4},
+ {"x": 129, "y": 60, "flags": 4},
+ {"x": 139, "y": 60, "flags": 4},
+ {"x": 149, "y": 60, "flags": 4},
+ {"x": 159, "y": 60, "flags": 4},
+ {"x": 169, "y": 60, "flags": 4},
+ {"x": 179, "y": 60, "flags": 4},
+ {"x": 189, "y": 60, "flags": 4},
+ {"x": 199, "y": 60, "flags": 4},
+ {"x": 209, "y": 60, "flags": 4},
+ {"x": 214, "y": 48, "flags": 4},
+ {"x": 204, "y": 48, "flags": 4},
+ {"x": 194, "y": 48, "flags": 4},
+ {"x": 184, "y": 48, "flags": 4},
+ {"x": 174, "y": 48, "flags": 4},
+ {"x": 164, "y": 48, "flags": 4},
+ {"x": 154, "y": 48, "flags": 4},
+ {"x": 144, "y": 48, "flags": 4},
+ {"x": 134, "y": 48, "flags": 4},
+ {"x": 124, "y": 48, "flags": 4},
+ {"x": 114, "y": 48, "flags": 4},
+ {"x": 104, "y": 48, "flags": 4},
+ {"x": 94, "y": 48, "flags": 4},
+ {"x": 84, "y": 48, "flags": 4},
+ {"x": 74, "y": 48, "flags": 4},
+ {"x": 64, "y": 48, "flags": 4},
+ {"x": 54, "y": 48, "flags": 4},
+ {"x": 44, "y": 48, "flags": 4},
+ {"x": 34, "y": 48, "flags": 4},
+ {"x": 39, "y": 36, "flags": 4},
+ {"x": 49, "y": 36, "flags": 4},
+ {"x": 59, "y": 36, "flags": 4},
+ {"x": 69, "y": 36, "flags": 4},
+ {"x": 79, "y": 36, "flags": 4},
+ {"x": 89, "y": 36, "flags": 4},
+ {"x": 99, "y": 36, "flags": 4},
+ {"x": 109, "y": 36, "flags": 4},
+ {"x": 119, "y": 36, "flags": 4},
+ {"x": 129, "y": 36, "flags": 4},
+ {"x": 139, "y": 36, "flags": 4},
+ {"x": 149, "y": 36, "flags": 4},
+ {"x": 159, "y": 36, "flags": 4},
+ {"x": 169, "y": 36, "flags": 4},
+ {"x": 179, "y": 36, "flags": 4},
+ {"x": 189, "y": 36, "flags": 4},
+ {"x": 199, "y": 36, "flags": 4},
+ {"x": 209, "y": 36, "flags": 4},
+ {"x": 214, "y": 24, "flags": 4},
+ {"x": 204, "y": 24, "flags": 4},
+ {"x": 194, "y": 24, "flags": 4},
+ {"x": 184, "y": 24, "flags": 4},
+ {"x": 174, "y": 24, "flags": 4},
+ {"x": 164, "y": 24, "flags": 4},
+ {"x": 154, "y": 24, "flags": 4},
+ {"x": 144, "y": 24, "flags": 4},
+ {"x": 134, "y": 24, "flags": 4},
+ {"x": 124, "y": 24, "flags": 4},
+ {"x": 114, "y": 24, "flags": 4},
+ {"x": 104, "y": 24, "flags": 4},
+ {"x": 94, "y": 24, "flags": 4},
+ {"x": 84, "y": 24, "flags": 4},
+ {"x": 74, "y": 24, "flags": 4},
+ {"x": 64, "y": 24, "flags": 4},
+ {"x": 54, "y": 24, "flags": 4},
+ {"x": 44, "y": 24, "flags": 4},
+ {"x": 34, "y": 24, "flags": 4},
+ {"matrix": [0, 6], "x": 39, "y": 12, "flags": 4},
+ {"matrix": [1, 1], "x": 49, "y": 12, "flags": 4},
+ {"matrix": [1, 3], "x": 59, "y": 12, "flags": 4},
+ {"matrix": [1, 5], "x": 69, "y": 12, "flags": 4},
+ {"matrix": [2, 0], "x": 79, "y": 12, "flags": 4},
+ {"matrix": [2, 2], "x": 89, "y": 12, "flags": 4},
+ {"matrix": [2, 4], "x": 99, "y": 12, "flags": 4},
+ {"matrix": [2, 6], "x": 109, "y": 12, "flags": 4},
+ {"matrix": [3, 1], "x": 119, "y": 12, "flags": 4},
+ {"matrix": [3, 3], "x": 129, "y": 12, "flags": 4},
+ {"matrix": [3, 5], "x": 139, "y": 12, "flags": 4},
+ {"matrix": [4, 0], "x": 149, "y": 12, "flags": 4},
+ {"matrix": [4, 2], "x": 159, "y": 12, "flags": 4},
+ {"matrix": [4, 4], "x": 169, "y": 12, "flags": 4},
+ {"matrix": [4, 6], "x": 179, "y": 12, "flags": 4},
+ {"matrix": [5, 1], "x": 189, "y": 12, "flags": 4},
+ {"matrix": [5, 3], "x": 199, "y": 12, "flags": 4},
+ {"matrix": [5, 5], "x": 209, "y": 12, "flags": 4},
+ {"matrix": [5, 6], "x": 214, "y": 0, "flags": 4},
+ {"matrix": [5, 4], "x": 204, "y": 0, "flags": 4},
+ {"matrix": [5, 2], "x": 194, "y": 0, "flags": 4},
+ {"matrix": [5, 0], "x": 184, "y": 0, "flags": 4},
+ {"matrix": [4, 5], "x": 174, "y": 0, "flags": 4},
+ {"matrix": [4, 3], "x": 164, "y": 0, "flags": 4},
+ {"matrix": [4, 1], "x": 154, "y": 0, "flags": 4},
+ {"matrix": [3, 6], "x": 144, "y": 0, "flags": 4},
+ {"matrix": [3, 4], "x": 134, "y": 0, "flags": 4},
+ {"matrix": [3, 2], "x": 124, "y": 0, "flags": 4},
+ {"matrix": [3, 0], "x": 114, "y": 0, "flags": 4},
+ {"matrix": [2, 5], "x": 104, "y": 0, "flags": 4},
+ {"matrix": [2, 3], "x": 94, "y": 0, "flags": 4},
+ {"matrix": [2, 1], "x": 84, "y": 0, "flags": 4},
+ {"matrix": [1, 6], "x": 74, "y": 0, "flags": 4},
+ {"matrix": [1, 4], "x": 64, "y": 0, "flags": 4},
+ {"matrix": [1, 2], "x": 54, "y": 0, "flags": 4},
+ {"matrix": [1, 0], "x": 44, "y": 0, "flags": 4},
+ {"matrix": [0, 5], "x": 34, "y": 0, "flags": 4}
+ ],
+ "max_brightness": 50,
+ "sat_steps": 8,
+ "speed_steps": 10,
+ "val_steps": 8,
+ "center_point": [124, 32],
+ "animations": {
+ "solid_color": true,
+ "alphas_mods": true,
+ "gradient_up_down": true,
+ "gradient_left_right": true,
+ "breathing": true,
+ "band_sat": true,
+ "band_val": true,
+ "band_pinwheel_sat": true,
+ "band_pinwheel_val": true,
+ "band_spiral_sat": true,
+ "band_spiral_val": true,
+ "cycle_all": true,
+ "cycle_left_right": true,
+ "cycle_up_down": true,
+ "cycle_out_in": true,
+ "cycle_out_in_dual": true,
+ "rainbow_moving_chevron": true,
+ "dual_beacon": true,
+ "cycle_pinwheel": true,
+ "cycle_spiral": true,
+ "rainbow_beacon": true,
+ "rainbow_pinwheels": true,
+ "raindrops": true,
+ "jellybean_raindrops": true,
+ "hue_breathing": true,
+ "hue_pendulum": true,
+ "hue_wave": true,
+ "typing_heatmap": true,
+ "digital_rain": true,
+ "solid_reactive": true,
+ "solid_reactive_simple": 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
+ }
},
"diode_direction": "COL2ROW",
"matrix_pins": {
@@ -33,7 +199,7 @@
"pid": "0xF4B4",
"device_version": "0.0.1"
},
- "layouts": {
+ "layouts": {
"LAYOUT": {
"layout": [
{"matrix": [0, 0], "x": 0.5, "y": 0},
diff --git a/keyboards/chromatonemini/rules.mk b/keyboards/chromatonemini/rules.mk
index 4da205a168..e69de29bb2 100644
--- a/keyboards/chromatonemini/rules.mk
+++ b/keyboards/chromatonemini/rules.mk
@@ -1 +0,0 @@
-LTO_ENABLE = yes
diff --git a/keyboards/citrus/erdnuss65/info.json b/keyboards/citrus/erdnuss65/info.json
index 44d597ffb4..4faaa05431 100644
--- a/keyboards/citrus/erdnuss65/info.json
+++ b/keyboards/citrus/erdnuss65/info.json
@@ -1,43 +1,39 @@
{
- "keyboard_name": "Erdnuss65",
"manufacturer": "Citrus Lab",
- "processor": "STM32F103",
- "bootloader": "stm32duino",
+ "keyboard_name": "Erdnuss65",
"maintainer": "ctt",
- "usb": {
- "vid": "0x636C",
- "pid": "0x6374",
- "device_version": "0.0.1"
- },
- "matrix_pins": {
- "rows": ["B10", "B1", "B0", "A7", "A6"],
- "cols": ["B12", "B14", "B15", "A8", "B13", "B3", "B4", "B5", "A1", "A2", "A0", "A3", "A4", "A5", "B11"]
- },
+ "bootloader": "stm32duino",
"diode_direction": "COL2ROW",
"features": {
"bootmagic": true,
- "mousekey": true,
"extrakey": true,
- "console": false,
- "command": false,
+ "mousekey": true,
"nkro": true,
- "backlight": false,
- "rgblight": true,
- "audio": false
+ "rgblight": true
},
- "ws2812": {
- "pin": "A15"
+ "matrix_pins": {
+ "cols": ["B12", "B14", "B15", "B5", "B13", "B3", "B4", "B6", "A0", "A1", "A2", "A3", "A4", "A5", "B11"],
+ "rows": ["B10", "B1", "B0", "A7", "A6"]
},
+ "processor": "STM32F103",
"rgblight": {
"led_count": 1
},
+ "usb": {
+ "device_version": "1.0.0",
+ "pid": "0x6374",
+ "vid": "0x636C"
+ },
+ "ws2812": {
+ "pin": "A15"
+ },
"layouts": {
"LAYOUT": {
"layout": [
{"label": "ESC K00 (B10,B12)", "matrix": [0, 0], "x": 0, "y": 0},
{"label": "1 K01 (B10,B14)", "matrix": [0, 1], "x": 1, "y": 0},
{"label": "2 K02 (B10,B15)", "matrix": [0, 2], "x": 2, "y": 0},
- {"label": "3 K03 (B10,A8)", "matrix": [0, 3], "x": 3, "y": 0},
+ {"label": "3 K03 (B10,B5)", "matrix": [0, 3], "x": 3, "y": 0},
{"label": "4 K04 (B10,B13)", "matrix": [0, 4], "x": 4, "y": 0},
{"label": "5 K05 (B10,B3)", "matrix": [0, 5], "x": 5, "y": 0},
{"label": "6 K06 (B10,B4)", "matrix": [0, 6], "x": 6, "y": 0},
@@ -52,7 +48,7 @@
{"label": "TAB (B1,B12)", "matrix": [1, 0], "x": 0, "y": 1, "w": 1.5},
{"label": "Q (B1,B14)", "matrix": [1, 1], "x": 1.5, "y": 1},
{"label": "W (B1,B15)", "matrix": [1, 2], "x": 2.5, "y": 1},
- {"label": "E (B1,A8)", "matrix": [1, 3], "x": 3.5, "y": 1},
+ {"label": "E (B1,B5)", "matrix": [1, 3], "x": 3.5, "y": 1},
{"label": "R (B1,B13)", "matrix": [1, 4], "x": 4.5, "y": 1},
{"label": "T (B1,B3)", "matrix": [1, 5], "x": 5.5, "y": 1},
{"label": "Y (B1,B4)", "matrix": [1, 6], "x": 6.5, "y": 1},
@@ -64,10 +60,10 @@
{"label": "] (B1,A4)", "matrix": [1, 12], "x": 12.5, "y": 1},
{"label": "\" (B1,A5)", "matrix": [1, 13], "x": 13.5, "y": 1, "w": 1.5},
{"label": "DEL (B1,B11)", "matrix": [1, 14], "x": 15, "y": 1},
- {"label": "CAPSLOCK (B0,B12)", "matrix": [2, 0], "x": 0, "y": 2, "w": 1.25},
+ {"label": "CAPSLOCK (B0,B12)", "matrix": [2, 0], "x": 0, "y": 2, "w": 1.75},
{"label": "A (B0,B14)", "matrix": [2, 1], "x": 1.75, "y": 2},
{"label": "S (B0,B15)", "matrix": [2, 2], "x": 2.75, "y": 2},
- {"label": "D (B0,A8)", "matrix": [2, 3], "x": 3.75, "y": 2},
+ {"label": "D (B0,B5)", "matrix": [2, 3], "x": 3.75, "y": 2},
{"label": "F (B0,B13)", "matrix": [2, 4], "x": 4.75, "y": 2},
{"label": "G (B0,B3)", "matrix": [2, 5], "x": 5.75, "y": 2},
{"label": "H (B0,B4)", "matrix": [2, 6], "x": 6.75, "y": 2},
@@ -81,7 +77,7 @@
{"label": "LSHIFT (A7,B12)", "matrix": [3, 0], "x": 0, "y": 3, "w": 2.25},
{"label": "Z (A7,B14)", "matrix": [3, 1], "x": 2.25, "y": 3},
{"label": "X (A7,B15)", "matrix": [3, 2], "x": 3.25, "y": 3},
- {"label": "C (A7,A8)", "matrix": [3, 3], "x": 4.25, "y": 3},
+ {"label": "C (A7,B5)", "matrix": [3, 3], "x": 4.25, "y": 3},
{"label": "V (A7,B13)", "matrix": [3, 4], "x": 5.25, "y": 3},
{"label": "B (A7,B3)", "matrix": [3, 5], "x": 6.25, "y": 3},
{"label": "N (A7,B4)", "matrix": [3, 6], "x": 7.25, "y": 3},
@@ -95,12 +91,12 @@
{"label": "LCTRL (A6,B12)", "matrix": [4, 0], "x": 0, "y": 4, "w": 1.5},
{"label": "WIN (A6,B14)", "matrix": [4, 1], "x": 1.5, "y": 4},
{"label": "ALT (A6,B15)", "matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.5},
- {"label": "SPACE (A6,A8)", "matrix": [4, 3], "x": 4, "y": 4, "w": 7},
+ {"label": "SPACE (A6,B5)", "matrix": [4, 3], "x": 4, "y": 4, "w": 7},
{"label": "FN (A6,A0)", "matrix": [4, 10], "x": 11, "y": 4, "w": 1.5},
{"label": "LEFT (A6,A4)", "matrix": [4, 12], "x": 13, "y": 4},
{"label": "DOWN (A6,A5)", "matrix": [4, 13], "x": 14, "y": 4},
{"label": "RIGHT (A6,B11)", "matrix": [4, 14], "x": 15, "y": 4}
- ]
+ ]
}
}
}
diff --git a/keyboards/citrus/erdnuss65/keymaps/default/keymap.c b/keyboards/citrus/erdnuss65/keymaps/default/keymap.c
index 0daef5af64..fdc36ae65e 100644
--- a/keyboards/citrus/erdnuss65/keymaps/default/keymap.c
+++ b/keyboards/citrus/erdnuss65/keymaps/default/keymap.c
@@ -5,19 +5,18 @@
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT(
- KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS,
+ QK_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP,
- KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, KC_UP, KC_PGDN,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_LEFT, KC_DOWN, KC_RGHT
),
[1] = LAYOUT(
- KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_MPRV,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, _______, _______, RESET, KC_MNXT,
+ KC_TILD, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_MPRV,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, _______, _______, QK_BOOT, KC_MNXT,
_______, _______, _______, _______, _______, _______, _______, KC_CALC, _______, _______, _______, _______, _______, KC_HOME,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MYCM, KC_VOLU, KC_END,
- _______, _______, _______, _______, _______, KC_MUTE, KC_VOLU, KC_MPLY
+ _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_MPLY
)
};
-
diff --git a/keyboards/citrus/erdnuss65/keymaps/via/keymap.c b/keyboards/citrus/erdnuss65/keymaps/via/keymap.c
index 0f1bf9525e..3014b72cfe 100644
--- a/keyboards/citrus/erdnuss65/keymaps/via/keymap.c
+++ b/keyboards/citrus/erdnuss65/keymaps/via/keymap.c
@@ -5,19 +5,19 @@
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT(
- KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS,
+ QK_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP,
- KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, KC_UP, KC_PGDN,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_LEFT, KC_DOWN, KC_RGHT
),
[1] = LAYOUT(
- KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_MPRV,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, _______, _______, RESET, KC_MNXT,
+ KC_TILD, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_MPRV,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, _______, _______, QK_BOOT, KC_MNXT,
_______, _______, _______, _______, _______, _______, _______, KC_CALC, _______, _______, _______, _______, _______, KC_HOME,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MYCM, KC_VOLU, KC_END,
- _______, _______, _______, _______, _______, KC_MUTE, KC_VOLU, KC_MPLY
+ _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_MPLY
),
[2] = LAYOUT(
@@ -34,6 +34,5 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______
- ),
-
+ )
};
diff --git a/keyboards/clickety_split/leeloo/info.json b/keyboards/clickety_split/leeloo/info.json
index a2510f9f7f..c83fedeb28 100644
--- a/keyboards/clickety_split/leeloo/info.json
+++ b/keyboards/clickety_split/leeloo/info.json
@@ -1,24 +1,31 @@
{
- "keyboard_name": "Leeloo",
"manufacturer": "Clickety Split Ltd",
"url": "https://clicketysplit.ca/pages/leeloo",
"maintainer": "ClicketySplit",
"usb": {
"vid": "0x4013",
- "pid": "0x2022",
- "device_version": "0.1.3"
+ "pid": "0x2022"
},
+ "diode_direction": "COL2ROW",
"matrix_pins": {
- "cols": ["F6", "F7", "B1", "B3", "B2", "B6"],
- "rows": ["C6", "D7", "E6", "B4", "B5"]
+ "cols": ["F6", "F7", "B1", "B3", "B2", "B6"],
+ "rows": ["C6", "D7", "E6", "B4", "B5"]
+ },
+ "build": {
+ "lto": true
+ },
+ "features": {
+ "extrakey": true,
+ "oled": true
},
- "diode_direction": "COL2ROW",
"encoder": {
+ "enabled": true,
"rotary": [
{"pin_a": "F5", "pin_b": "F4"}
]
},
"split": {
+ "enabled": true,
"soft_serial_pin": "D2",
"encoder": {
"right": {
@@ -28,81 +35,77 @@
}
}
},
- "tapping": {
- "term": 100
- },
- "processor": "atmega32u4",
- "bootloader": "caterina",
+ "development_board": "promicro",
"layouts": {
"LAYOUT": {
"layout": [
- {"matrix": [0, 0], "x": 0, "y": 0.5},
- {"matrix": [0, 1], "x": 1, "y": 0.4},
- {"matrix": [0, 2], "x": 2, "y": 0.2},
- {"matrix": [0, 3], "x": 3, "y": 0},
- {"matrix": [0, 4], "x": 4, "y": 0.2},
- {"matrix": [0, 5], "x": 5, "y": 0.4},
+ {"label":"Esc", "matrix": [0, 0], "x": 0.0, "y":0.5},
+ {"label":"1", "matrix": [0, 1], "x": 1.0, "y":0.4},
+ {"label":"2", "matrix": [0, 2], "x": 2.0, "y":0.2},
+ {"label":"3", "matrix": [0, 3], "x": 3.0, "y":0.0},
+ {"label":"4", "matrix": [0, 4], "x": 4.0, "y":0.2},
+ {"label":"5", "matrix": [0, 5], "x": 5.0, "y":0.4},
- {"matrix": [5, 5], "x": 9, "y": 0.4},
- {"matrix": [5, 4], "x": 10, "y": 0.2},
- {"matrix": [5, 3], "x": 11, "y": 0},
- {"matrix": [5, 2], "x": 12, "y": 0.2},
- {"matrix": [5, 1], "x": 13, "y": 0.4},
- {"matrix": [5, 0], "x": 14, "y": 0.5},
+ {"label":"6", "matrix": [5, 5], "x": 9.0, "y":0.4},
+ {"label":"7", "matrix": [5, 4], "x": 10.0, "y":0.2},
+ {"label":"8", "matrix": [5, 3], "x": 11.0, "y":0.0},
+ {"label":"9", "matrix": [5, 2], "x": 12.0, "y":0.2},
+ {"label":"0", "matrix": [5, 1], "x": 13.0, "y":0.4},
+ {"label":"BSL", "matrix": [5, 0], "x": 14.0, "y":0.5},
- {"matrix": [1, 0], "x": 0, "y": 1.5},
- {"matrix": [1, 1], "x": 1, "y": 1.4},
- {"matrix": [1, 2], "x": 2, "y": 1.2},
- {"matrix": [1, 3], "x": 3, "y": 1},
- {"matrix": [1, 4], "x": 4, "y": 1.2},
- {"matrix": [1, 5], "x": 5, "y": 1.4},
+ {"label":"TAB", "matrix": [1, 0], "x": 0.0, "y":1.5},
+ {"label":"Q", "matrix": [1, 1], "x": 1.0, "y":1.4},
+ {"label":"W", "matrix": [1, 2], "x": 2.0, "y":1.2},
+ {"label":"E", "matrix": [1, 3], "x": 3.0, "y":1.0},
+ {"label":"R", "matrix": [1, 4], "x": 4.0, "y":1.2},
+ {"label":"T", "matrix": [1, 5], "x": 5.0, "y":1.4},
- {"matrix": [6, 5], "x": 9, "y": 1.4},
- {"matrix": [6, 4], "x": 10, "y": 1.2},
- {"matrix": [6, 3], "x": 11, "y": 1},
- {"matrix": [6, 2], "x": 12, "y": 1.2},
- {"matrix": [6, 1], "x": 13, "y": 1.4},
- {"matrix": [6, 0], "x": 14, "y": 1.5},
+ {"label":"Y", "matrix": [6, 5], "x": 9.0, "y":1.4},
+ {"label":"U", "matrix": [6, 4], "x": 10.0, "y":1.2},
+ {"label":"I", "matrix": [6, 3], "x": 11.0, "y":1.0},
+ {"label":"O", "matrix": [6, 2], "x": 12.0, "y":1.2},
+ {"label":"P", "matrix": [6, 1], "x": 13.0, "y":1.4},
+ {"label":"GRV", "matrix": [6, 0], "x": 14.0, "y":1.5},
- {"matrix": [2, 0], "x": 0, "y": 2.5},
- {"matrix": [2, 1], "x": 1, "y": 2.4},
- {"matrix": [2, 2], "x": 2, "y": 2.2},
- {"matrix": [2, 3], "x": 3, "y": 2},
- {"matrix": [2, 4], "x": 4, "y": 2.2},
- {"matrix": [2, 5], "x": 5, "y": 2.4},
+ {"label":"CAPS", "matrix": [2, 0], "x": 0.0, "y":2.5},
+ {"label":"A", "matrix": [2, 1], "x": 1.0, "y":2.4},
+ {"label":"S", "matrix": [2, 2], "x": 2.0, "y":2.2},
+ {"label":"D", "matrix": [2, 3], "x": 3.0, "y":2.0},
+ {"label":"F", "matrix": [2, 4], "x": 4.0, "y":2.2},
+ {"label":"G", "matrix": [2, 5], "x": 5.0, "y":2.4},
- {"matrix": [7, 5], "x": 9, "y": 2.4},
- {"matrix": [7, 4], "x": 10, "y": 2.2},
- {"matrix": [7, 3], "x": 11, "y": 2},
- {"matrix": [7, 2], "x": 12, "y": 2.2},
- {"matrix": [7, 1], "x": 13, "y": 2.4},
- {"matrix": [7, 0], "x": 14, "y": 2.5},
+ {"label":"H", "matrix": [7, 5], "x": 9.0, "y":2.4},
+ {"label":"J", "matrix": [7, 4], "x": 10.0, "y":2.2},
+ {"label":"K", "matrix": [7, 3], "x": 11.0, "y":2.0},
+ {"label":"L", "matrix": [7, 2], "x": 12.0, "y":2.2},
+ {"label":";", "matrix": [7, 1], "x": 13.0, "y":2.4},
+ {"label":"'", "matrix": [7, 0], "x": 14.0, "y":2.5},
- {"matrix": [3, 0], "x": 0, "y": 3.5},
- {"matrix": [3, 1], "x": 1, "y": 3.4},
- {"matrix": [3, 2], "x": 2, "y": 3.2},
- {"matrix": [3, 3], "x": 3, "y": 3},
- {"matrix": [3, 4], "x": 4, "y": 3.2},
- {"matrix": [3, 5], "x": 5, "y": 3.4},
- {"matrix": [4, 5], "x": 6.25, "y": 3.4},
+ {"label":"SFT", "matrix": [3, 0], "x": 0.0, "y":3.5},
+ {"label":"Z", "matrix": [3, 1], "x": 1.0, "y":3.4},
+ {"label":"X", "matrix": [3, 2], "x": 2.0, "y":3.2},
+ {"label":"C", "matrix": [3, 3], "x": 3.0, "y":3.0},
+ {"label":"V", "matrix": [3, 4], "x": 4.0, "y":3.2},
+ {"label":"B", "matrix": [3, 5], "x": 5.0, "y":3.4},
+ {"label":"GUI", "matrix": [4, 5], "x": 6.25, "y":3.4},
- {"matrix": [9, 5], "x": 7.75, "y": 3.4},
- {"matrix": [8, 5], "x": 9, "y": 3.4},
- {"matrix": [8, 4], "x": 10, "y": 3.2},
- {"matrix": [8, 3], "x": 11, "y": 3},
- {"matrix": [8, 2], "x": 12, "y": 3.2},
- {"matrix": [8, 1], "x": 13, "y": 3.4},
- {"matrix": [8, 0], "x": 14, "y": 3.5},
+ {"label":"GUI", "matrix": [9, 5], "x": 7.75, "y":3.4},
+ {"label":"N", "matrix": [8, 5], "x": 9.0, "y":3.4},
+ {"label":"M", "matrix": [8, 4], "x": 10.0, "y":3.2},
+ {"label":",", "matrix": [8, 3], "x": 11.0, "y":3.0},
+ {"label":".", "matrix": [8, 2], "x": 12.0, "y":3.2},
+ {"label":"/", "matrix": [8, 1], "x": 13.0, "y":3.4},
+ {"label":"SFT", "matrix": [8, 0], "x": 14.0, "y":3.5},
- {"matrix": [4, 1], "x": 2.7, "y": 4.6},
- {"matrix": [4, 2], "x": 3.8, "y": 4.5},
- {"matrix": [4, 3], "x": 4.9, "y": 4.55},
- {"matrix": [4, 4], "x": 6.1, "y": 4.65},
+ {"label":"ALT", "matrix": [4, 1], "x": 2.7, "y":4.6},
+ {"label":"CTL", "matrix": [4, 2], "x": 3.8, "y":4.5},
+ {"label":"ENT", "matrix": [4, 3], "x": 4.9, "y":4.55},
+ {"label":"MINS", "matrix": [4, 4], "x": 6.1, "y":4.65},
- {"matrix": [9, 4], "x": 7.9, "y": 4.65},
- {"matrix": [9, 3], "x": 9.1, "y": 4.55},
- {"matrix": [9, 2], "x": 10.2, "y": 4.5},
- {"matrix": [9, 1], "x": 11.3, "y": 4.6}
+ {"label":"EQL", "matrix": [9, 4], "x": 7.9, "y":4.65},
+ {"label":"SPC", "matrix": [9, 3], "x": 9.1, "y":4.55},
+ {"label":"BSP", "matrix": [9, 2], "x": 10.2, "y":4.5},
+ {"label":"DEL", "matrix": [9, 1], "x": 11.3, "y":4.6}
]
}
}
diff --git a/keyboards/clickety_split/leeloo/keymaps/default/config.h b/keyboards/clickety_split/leeloo/keymaps/default/config.h
index d0348d06ef..e41b3d34aa 100644
--- a/keyboards/clickety_split/leeloo/keymaps/default/config.h
+++ b/keyboards/clickety_split/leeloo/keymaps/default/config.h
@@ -1,5 +1,4 @@
-/* Copyright 2022 Clickety Split Ltd.
- * https://clicketysplit.ca
+/* Copyright 2023 Clickety Split Ltd.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -17,17 +16,30 @@
#pragma once
-// Select hand configuration
-// #define MASTER_LEFT
-// #define MASTER_RIGHT
-// #define EE_HANDS
-
-#ifdef TAPPING_TERM
- #undef TAPPING_TERM
- #define QUICK_TAP_TERM 0
- #define TAPPING_TERM 150
-#endif
-
// If rotary encoders are used, and they require more or less resolution/sensitivity
// you may try increasing or decreasing the value.
// #define ENCODER_RESOLUTION 2
+
+ #define RGB_MATRIX_KEYPRESSES // reacts to keypresses
+// #define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses)
+// #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
+ #define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
+ #define RGB_MATRIX_FRAMEBUFFER_EFFECTS
+
+ #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 115 // limits maximum brightness of LEDs to 150 out of 255.
+ // Higher may cause the controller to crash.
+ #define RGB_MATRIX_HUE_STEP 10
+ #define RGB_MATRIX_SAT_STEP 10
+ #define RGB_MATRIX_VAL_STEP 10
+ #define RGB_MATRIX_SPD_STEP 10
+
+
+/* By default, the RGB_MATRIX effects are disabled.
+ *
+ * For a complete list, visit: https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects.
+ * Some of the effects take up a lot of memory, so you may need to manage the number of
+ * effects that are loaded at any given time.
+*/
+ #define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN
+ #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
+ #define ENABLE_RGB_MATRIX_SPLASH
diff --git a/keyboards/clickety_split/leeloo/keymaps/default/keymap.c b/keyboards/clickety_split/leeloo/keymaps/default/keymap.c
index bac722a7c3..6bf9824472 100644
--- a/keyboards/clickety_split/leeloo/keymaps/default/keymap.c
+++ b/keyboards/clickety_split/leeloo/keymaps/default/keymap.c
@@ -1,5 +1,4 @@
-/* Copyright 2022 Clickety Split Ltd.
- * https://clicketysplit.ca
+/* Copyright 2023 Clickety Split Ltd.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -92,23 +91,34 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* ,-----------------------------------------. ,-----------------------------------------.
* | | | | | | | | | | | | | |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
- * | | | | | | | | | | | | | |
+ * | | | | | | | | | | +VOL | | | |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
- * | | | | | | |--------. ,-------| | | | | | |
+ * | | | | | | |--------. ,-------| | | -VOL | | | |
* |------+------+------+------+------+------| | | |------+------+------+------+------+------|
- * | | | | | | |--------| |-------| | | | | | |
+ * | | | | | | |--------| |-------| | MUTE | | | | |
* `-----------------------------------------/ / \ \-----------------------------------------'
* | LALT | LCTL | ENT | / MINS / \ EQL \ | SPC | BSPC | DEL |
* | | | LOWR |/ RAISE / \RAISE \ | LOWR | | |
* `-------------------------------' '------''-----------------------'
+ *
+ * NOTE: For Leeloo v1 the RGB Keycodes will not have any effect.
+ *
*/
[_ADJUST] = LAYOUT(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, _______, _______, _______,
+ _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, KC_VOLD, _______, _______, _______,
+ _______, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, KC_MUTE, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______
)
};
+/* Tri Layer
+ * When Lower and Raise are pressed at the same time, and wrapped with LT(),
+ * Adjust is activated with the following method.
+ */
+layer_state_t layer_state_set_user(layer_state_t state) {
+ state = update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
+ return state;
+}
diff --git a/keyboards/clickety_split/leeloo/leeloo.c b/keyboards/clickety_split/leeloo/leeloo.c
index 864f31cbb7..3922556f5c 100644
--- a/keyboards/clickety_split/leeloo/leeloo.c
+++ b/keyboards/clickety_split/leeloo/leeloo.c
@@ -1,5 +1,4 @@
-/* Copyright 2022 Clickety Split Ltd.
- * https://clicketysplit.ca
+/* Copyright 2023 Clickety Split Ltd.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -48,9 +47,24 @@ static void render_mod_status(uint8_t modifiers) {
static void render_secondary_oled(void) {
// Version Information
- oled_write_P(PSTR("Leeloo\n\n"), false);
+#if defined(KEYBOARD_clickety_split_leeloo_rev1)
+ oled_write_P(PSTR("Leeloo v1\n\n"), false);
+#elif defined(KEYBOARD_clickety_split_leeloo_rev2)
+ oled_write_P(PSTR("Leeloo v2\n\n"), false);
+#else
+ oled_write_P(PSTR("Leeloo v2.1\n\n"), false);
+#endif
+
oled_write_P(PSTR("Firmware: "), false);
- oled_write_P(PSTR("v1.0"), false);
+
+#if defined(KEYBOARD_clickety_split_leeloo_rev1)
+ oled_write_P(PSTR("v1.13"), false);
+#elif defined(KEYBOARD_clickety_split_leeloo_rev2)
+ oled_write_P(PSTR("v2.13"), false);
+#else
+ oled_write_P(PSTR("v2.14"), false);
+#endif
+
oled_write_P(PSTR("\n"), false);
oled_write_P(PSTR("Clickety Split Ltd."), false);
}
@@ -58,7 +72,7 @@ static void render_secondary_oled(void) {
static void render_status(void) {
// Host Keyboard Layer Status
switch (get_highest_layer(default_layer_state)) {
- case _BASE:
+ case 0:
oled_write_P(PSTR("QWERTY | "), false);
break;
}
@@ -69,15 +83,15 @@ static void render_status(void) {
oled_write_P(PSTR("Base \n"), false);
break;
- case _LOWER:
+ case 1:
oled_write_P(PSTR("Lower \n"), false);
break;
- case _RAISE:
+ case 2:
oled_write_P(PSTR("Raise \n"), false);
break;
- case _ADJUST:
+ case 3:
oled_write_P(PSTR("Adjust \n"), false);
break;
@@ -128,4 +142,4 @@ bool encoder_update_kb(uint8_t index, bool clockwise) {
}
return true;
}
-#endif
+#endif // ENCODER_ENABLE
diff --git a/keyboards/clickety_split/leeloo/readme.md b/keyboards/clickety_split/leeloo/readme.md
index f672294e14..65f1069cdb 100644
--- a/keyboards/clickety_split/leeloo/readme.md
+++ b/keyboards/clickety_split/leeloo/readme.md
@@ -1,16 +1,33 @@
-# Leeloo
+# Clickety Split | Leeloo v2.1
-![Leeloo](https://cdn.shopify.com/s/files/1/0599/3460/5491/files/Leeloo-rev1.0-w.jpg?v=1646798726)
+![Leeloo v2.1](https://i.imgur.com/swPHS0Bh.jpg)
-Leeloo is a 4x6x5m ortholinear split keyboard kit made and sold by Clickety Split Ltd.
+Leeloo v2.1 is a small evolution of Leeloo v2.0, which is a 4x6x5m ortholinear split keyboard designed, created, and sold by Clickety Split Ltd.
* Keyboard Maintainer: [Clickety Split](https://github.com/ClicketySplit)
-* Hardware Supported: Leeloo PCB rev1, Pro Micro, Elite-C
-* Hardware Availability: [clicketysplit.ca](https://clicketysplit.ca/pages/leeloo)
+* Hardware Supported: Leeloo PCB rev1/rev2/rev3, Pro Micro, Elite-C
+* Hardware Availability: [clicketysplit.ca/pages/leeloo](https://clicketysplit.ca/pages/leeloo)
+
+
+## Differences between v2.1 and v2.0
+* Removed 8 RGB LEDs on each side, which served as backlighting.
+* Added a solderable jumper to bypass circuitry used for wireless configurations with nice!nanos.
+* Simplified socketing of nice!view and OLED Displays.
+
+
+# Leeloo
+
+![Leeloo](https://i.imgur.com/x1ew17Dh.jpg)
+
+The original design and release of Leeloo.
+
+# Sample Build Commands for Leeloo v1, v2, and v2.1
-Make example, after setting up build environment:
+Make example for this keyboard (after setting up your build environment):
make clickety_split/leeloo/rev1:default
+ make clickety_split/leeloo/rev2:default
+ make clickety_split/leeloo/rev3:default
-See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). \ No newline at end of file
diff --git a/keyboards/clickety_split/leeloo/rev1/info.json b/keyboards/clickety_split/leeloo/rev1/info.json
new file mode 100644
index 0000000000..e9396f3f81
--- /dev/null
+++ b/keyboards/clickety_split/leeloo/rev1/info.json
@@ -0,0 +1,6 @@
+{
+ "keyboard_name": "Leeloo v1",
+ "usb": {
+ "device_version": "0.1.3"
+ }
+}
diff --git a/keyboards/clickety_split/leeloo/rev2/config.h b/keyboards/clickety_split/leeloo/rev2/config.h
new file mode 100644
index 0000000000..2aa1acd972
--- /dev/null
+++ b/keyboards/clickety_split/leeloo/rev2/config.h
@@ -0,0 +1,22 @@
+/* Copyright 2023 Clickety Split Ltd.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#pragma once
+
+# define RGB_MATRIX_LED_COUNT 74
+# define RGB_MATRIX_SPLIT {37, 37}
+# define RGB_DISABLE_WHEN_USB_SUSPENDED
+# define SPLIT_TRANSPORT_MIRROR
diff --git a/keyboards/clickety_split/leeloo/rev2/info.json b/keyboards/clickety_split/leeloo/rev2/info.json
new file mode 100644
index 0000000000..7fc4792f21
--- /dev/null
+++ b/keyboards/clickety_split/leeloo/rev2/info.json
@@ -0,0 +1,102 @@
+{
+ "keyboard_name": "Leeloo v2",
+ "usb": {
+ "device_version": "0.2.0"
+ },
+ "features": {
+ "rgb_matrix": true
+ },
+ "split": {
+ "transport": {
+ "sync_matrix_state": true
+ }
+ },
+ "rgblight": {
+ "led_count": 74,
+ "split": true,
+ "split_count": [37, 37],
+ "max_brightness": 115
+ },
+ "ws2812": {
+ "pin": "D3"
+ },
+ "rgb_matrix": {
+ "driver": "ws2812",
+ "layout": [
+ {"flags": 2, "x": 86, "y": 8}, // L LU01
+ {"flags": 2, "x": 52, "y": 8}, // L LU02
+ {"flags": 2, "x": 17, "y": 8}, // L LU03
+ {"flags": 2, "x": 0, "y": 24}, // L LU04
+ {"flags": 2, "x": 0, "y": 40}, // L LU05
+ {"flags": 2, "x": 17, "y": 56}, // L LU06
+ {"flags": 2, "x": 52, "y": 56}, // L LU07
+ {"flags": 2, "x": 86, "y": 56}, // L LU08
+ {"flags": 4, "matrix": [4, 5], "x": 103, "y": 48}, // L LB09 | SW29
+ {"flags": 4, "matrix": [4, 4], "x": 103, "y": 64}, // L LB10 | SW28
+ {"flags": 4, "matrix": [4, 3], "x": 86, "y": 64}, // L LB11 | SW27
+ {"flags": 4, "matrix": [3, 5], "x": 86, "y": 48}, // L LB12 | SW24
+ {"flags": 4, "matrix": [2, 5], "x": 86, "y": 32}, // L LB13 | SW18
+ {"flags": 4, "matrix": [1, 5], "x": 86, "y": 15}, // L LB14 | SW12
+ {"flags": 4, "matrix": [0, 5], "x": 86, "y": 0}, // L LB15 | SW6
+ {"flags": 4, "matrix": [0, 4], "x": 69, "y": 0}, // L LB16 | SW5
+ {"flags": 4, "matrix": [1, 4], "x": 69, "y": 16}, // L LB17 | SW11
+ {"flags": 4, "matrix": [2, 4], "x": 69, "y": 32}, // L LB18 | SW17
+ {"flags": 4, "matrix": [3, 4], "x": 69, "y": 48}, // L LB19 | SW23
+ {"flags": 4, "matrix": [4, 2], "x": 69, "y": 64}, // L LB20 | SW26
+ {"flags": 4, "matrix": [4, 1], "x": 52, "y": 64}, // L LB21 | SW25
+ {"flags": 4, "matrix": [3, 3], "x": 52, "y": 48}, // L LB22 | SW22
+ {"flags": 4, "matrix": [2, 3], "x": 52, "y": 32}, // L LB23 | SW16
+ {"flags": 4, "matrix": [1, 3], "x": 52, "y": 16}, // L LB24 | SW10
+ {"flags": 4, "matrix": [0, 3], "x": 52, "y": 0}, // L LB25 | SW4
+ {"flags": 4, "matrix": [0, 2], "x": 34, "y": 0}, // L LB26 | SW3
+ {"flags": 4, "matrix": [1, 2], "x": 34, "y": 16}, // L LB27 | SW9
+ {"flags": 4, "matrix": [2, 2], "x": 34, "y": 32}, // L LB28 | SW15
+ {"flags": 4, "matrix": [3, 2], "x": 34, "y": 48}, // L LB29 | SW21
+ {"flags": 4, "matrix": [3, 1], "x": 17, "y": 48}, // L LB30 | SW20
+ {"flags": 4, "matrix": [2, 1], "x": 17, "y": 32}, // L LB31 | SW14
+ {"flags": 4, "matrix": [1, 1], "x": 17, "y": 16}, // L LB32 | SW8
+ {"flags": 4, "matrix": [0, 1], "x": 17, "y": 0}, // L LB33 | SW2
+ {"flags": 4, "matrix": [0, 0], "x": 0, "y": 0}, // L LB34 | SW1
+ {"flags": 4, "matrix": [1, 0], "x": 0, "y": 16}, // L LB35 | SW7
+ {"flags": 4, "matrix": [2, 0], "x": 0, "y": 32}, // L LB36 | SW13
+ {"flags": 4, "matrix": [3, 0], "x": 0, "y": 48}, // L LB37 | SW19
+ {"flags": 2, "x": 137, "y": 8}, // R LU38
+ {"flags": 2, "x": 172, "y": 8}, // R LU39
+ {"flags": 2, "x": 206, "y": 8}, // R LU40
+ {"flags": 2, "x": 224, "y": 24}, // R LU41
+ {"flags": 2, "x": 224, "y": 40}, // R LU42
+ {"flags": 2, "x": 206, "y": 56}, // R LU43
+ {"flags": 2, "x": 172, "y": 56}, // R LU44
+ {"flags": 2, "x": 137, "y": 56}, // R LU45
+ {"flags": 4, "matrix": [9, 5], "x": 120, "y": 48}, // R LB46 | SW58
+ {"flags": 4, "matrix": [9, 4], "x": 120, "y": 64}, // R LB47 | SW57
+ {"flags": 4, "matrix": [9, 3], "x": 137, "y": 64}, // R LB48 | SW56
+ {"flags": 4, "matrix": [8, 5], "x": 137, "y": 48}, // R LB49 | SW53
+ {"flags": 4, "matrix": [7, 5], "x": 137, "y": 32}, // R LB50 | SW47
+ {"flags": 4, "matrix": [6, 5], "x": 137, "y": 15}, // R LB51 | SW41
+ {"flags": 4, "matrix": [5, 5], "x": 137, "y": 0}, // R LB52 | SW35
+ {"flags": 4, "matrix": [5, 4], "x": 155, "y": 0}, // R LB53 | SW34
+ {"flags": 4, "matrix": [6, 4], "x": 155, "y": 16}, // R LB54 | SW40
+ {"flags": 4, "matrix": [7, 4], "x": 155, "y": 32}, // R LB55 | SW46
+ {"flags": 4, "matrix": [8, 4], "x": 155, "y": 48}, // R LB56 | SW52
+ {"flags": 4, "matrix": [9, 2], "x": 155, "y": 64}, // R LB57 | SW55
+ {"flags": 4, "matrix": [9, 1], "x": 172, "y": 64}, // R LB58 | SW54
+ {"flags": 4, "matrix": [8, 3], "x": 172, "y": 48}, // R LB59 | SW51
+ {"flags": 4, "matrix": [7, 3], "x": 172, "y": 32}, // R LB60 | SW45
+ {"flags": 4, "matrix": [6, 3], "x": 172, "y": 16}, // R LB61 | SW39
+ {"flags": 4, "matrix": [5, 3], "x": 172, "y": 0}, // R LB62 | SW33
+ {"flags": 4, "matrix": [5, 2], "x": 189, "y": 0}, // R LB63 | SW32
+ {"flags": 4, "matrix": [6, 2], "x": 189, "y": 16}, // R LB64 | SW38
+ {"flags": 4, "matrix": [7, 2], "x": 189, "y": 32}, // R LB65 | SW44
+ {"flags": 4, "matrix": [8, 2], "x": 189, "y": 48}, // R LB66 | SW50
+ {"flags": 4, "matrix": [8, 1], "x": 206, "y": 48}, // R LB67 | SW49
+ {"flags": 4, "matrix": [7, 1], "x": 206, "y": 32}, // R LB68 | SW43
+ {"flags": 4, "matrix": [6, 1], "x": 206, "y": 16}, // R LB69 | SW37
+ {"flags": 4, "matrix": [5, 1], "x": 206, "y": 0}, // R LB70 | SW31
+ {"flags": 4, "matrix": [5, 0], "x": 224, "y": 0}, // R LB71 | SW30
+ {"flags": 4, "matrix": [6, 0], "x": 224, "y": 16}, // R LB72 | SW36
+ {"flags": 4, "matrix": [7, 0], "x": 224, "y": 32}, // R LB73 | SW42
+ {"flags": 4, "matrix": [8, 0], "x": 224, "y": 48} // R LB74 | SW48
+ ]
+ }
+ }
diff --git a/keyboards/clickety_split/leeloo/rev2/rules.mk b/keyboards/clickety_split/leeloo/rev2/rules.mk
new file mode 100644
index 0000000000..80a6663b9c
--- /dev/null
+++ b/keyboards/clickety_split/leeloo/rev2/rules.mk
@@ -0,0 +1 @@
+# Intentionally left blank.
diff --git a/keyboards/clickety_split/leeloo/rev3/config.h b/keyboards/clickety_split/leeloo/rev3/config.h
new file mode 100644
index 0000000000..ac93150221
--- /dev/null
+++ b/keyboards/clickety_split/leeloo/rev3/config.h
@@ -0,0 +1,22 @@
+/* Copyright 2023 Clickety Split Ltd.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#pragma once
+
+# define RGB_MATRIX_LED_COUNT 58
+# define RGB_MATRIX_SPLIT {29, 29}
+# define RGB_DISABLE_WHEN_USB_SUSPENDED
+# define SPLIT_TRANSPORT_MIRROR
diff --git a/keyboards/clickety_split/leeloo/rev3/info.json b/keyboards/clickety_split/leeloo/rev3/info.json
new file mode 100644
index 0000000000..9e6727a9e6
--- /dev/null
+++ b/keyboards/clickety_split/leeloo/rev3/info.json
@@ -0,0 +1,86 @@
+{
+ "keyboard_name": "Leeloo v2.1",
+ "usb": {
+ "device_version": "0.2.1"
+ },
+ "features": {
+ "rgb_matrix": true
+ },
+ "split": {
+ "transport": {
+ "sync_matrix_state": true
+ }
+ },
+ "rgblight": {
+ "led_count": 58,
+ "split": true,
+ "split_count": [29, 29],
+ "max_brightness": 115
+ },
+ "ws2812": {
+ "pin": "D3"
+ },
+ "rgb_matrix": {
+ "driver": "ws2812",
+ "layout": [
+ {"flags": 4, "matrix": [4, 5], "x": 103, "y": 48}, // L LB01 | SW29
+ {"flags": 4, "matrix": [4, 4], "x": 103, "y": 64}, // L LB02 | SW28
+ {"flags": 4, "matrix": [4, 3], "x": 86, "y": 64}, // L LB03 | SW27
+ {"flags": 4, "matrix": [3, 5], "x": 86, "y": 48}, // L LB04 | SW24
+ {"flags": 4, "matrix": [2, 5], "x": 86, "y": 32}, // L LB05 | SW18
+ {"flags": 4, "matrix": [1, 5], "x": 86, "y": 15}, // L LB06 | SW12
+ {"flags": 4, "matrix": [0, 5], "x": 86, "y": 0}, // L LB07 | SW6
+ {"flags": 4, "matrix": [0, 4], "x": 69, "y": 0}, // L LB08 | SW5
+ {"flags": 4, "matrix": [1, 4], "x": 69, "y": 16}, // L LB09 | SW11
+ {"flags": 4, "matrix": [2, 4], "x": 69, "y": 32}, // L LB10 | SW17
+ {"flags": 4, "matrix": [3, 4], "x": 69, "y": 48}, // L LB11 | SW23
+ {"flags": 4, "matrix": [4, 2], "x": 69, "y": 64}, // L LB12 | SW26
+ {"flags": 4, "matrix": [4, 1], "x": 52, "y": 64}, // L LB13 | SW25
+ {"flags": 4, "matrix": [3, 3], "x": 52, "y": 48}, // L LB14 | SW22
+ {"flags": 4, "matrix": [2, 3], "x": 52, "y": 32}, // L LB15 | SW16
+ {"flags": 4, "matrix": [1, 3], "x": 52, "y": 16}, // L LB16 | SW10
+ {"flags": 4, "matrix": [0, 3], "x": 52, "y": 0}, // L LB17 | SW4
+ {"flags": 4, "matrix": [0, 2], "x": 34, "y": 0}, // L LB18 | SW3
+ {"flags": 4, "matrix": [1, 2], "x": 34, "y": 16}, // L LB19 | SW9
+ {"flags": 4, "matrix": [2, 2], "x": 34, "y": 32}, // L LB20 | SW15
+ {"flags": 4, "matrix": [3, 2], "x": 34, "y": 48}, // L LB21 | SW21
+ {"flags": 4, "matrix": [3, 1], "x": 17, "y": 48}, // L LB22 | SW20
+ {"flags": 4, "matrix": [2, 1], "x": 17, "y": 32}, // L LB23 | SW14
+ {"flags": 4, "matrix": [1, 1], "x": 17, "y": 16}, // L LB24 | SW8
+ {"flags": 4, "matrix": [0, 1], "x": 17, "y": 0}, // L LB25 | SW2
+ {"flags": 4, "matrix": [0, 0], "x": 0, "y": 0}, // L LB26 | SW1
+ {"flags": 4, "matrix": [1, 0], "x": 0, "y": 16}, // L LB27 | SW7
+ {"flags": 4, "matrix": [2, 0], "x": 0, "y": 32}, // L LB28 | SW13
+ {"flags": 4, "matrix": [3, 0], "x": 0, "y": 48}, // L LB29 | SW19
+ {"flags": 4, "matrix": [9, 5], "x": 120, "y": 48}, // R LB30 | SW58
+ {"flags": 4, "matrix": [9, 4], "x": 120, "y": 64}, // R LB31 | SW57
+ {"flags": 4, "matrix": [9, 3], "x": 137, "y": 64}, // R LB32 | SW56
+ {"flags": 4, "matrix": [8, 5], "x": 137, "y": 48}, // R LB33 | SW53
+ {"flags": 4, "matrix": [7, 5], "x": 137, "y": 32}, // R LB34 | SW47
+ {"flags": 4, "matrix": [6, 5], "x": 137, "y": 15}, // R LB35 | SW41
+ {"flags": 4, "matrix": [5, 5], "x": 137, "y": 0}, // R LB36 | SW35
+ {"flags": 4, "matrix": [5, 4], "x": 155, "y": 0}, // R LB37 | SW34
+ {"flags": 4, "matrix": [6, 4], "x": 155, "y": 16}, // R LB38 | SW40
+ {"flags": 4, "matrix": [7, 4], "x": 155, "y": 32}, // R LB39 | SW46
+ {"flags": 4, "matrix": [8, 4], "x": 155, "y": 48}, // R LB40 | SW52
+ {"flags": 4, "matrix": [9, 2], "x": 155, "y": 64}, // R LB41 | SW55
+ {"flags": 4, "matrix": [9, 1], "x": 172, "y": 64}, // R LB42 | SW54
+ {"flags": 4, "matrix": [8, 3], "x": 172, "y": 48}, // R LB43 | SW51
+ {"flags": 4, "matrix": [7, 3], "x": 172, "y": 32}, // R LB44 | SW45
+ {"flags": 4, "matrix": [6, 3], "x": 172, "y": 16}, // R LB45 | SW39
+ {"flags": 4, "matrix": [5, 3], "x": 172, "y": 0}, // R LB46 | SW33
+ {"flags": 4, "matrix": [5, 2], "x": 189, "y": 0}, // R LB47 | SW32
+ {"flags": 4, "matrix": [6, 2], "x": 189, "y": 16}, // R LB48 | SW38
+ {"flags": 4, "matrix": [7, 2], "x": 189, "y": 32}, // R LB49 | SW44
+ {"flags": 4, "matrix": [8, 2], "x": 189, "y": 48}, // R LB50 | SW50
+ {"flags": 4, "matrix": [8, 1], "x": 206, "y": 48}, // R LB51 | SW49
+ {"flags": 4, "matrix": [7, 1], "x": 206, "y": 32}, // R LB52 | SW43
+ {"flags": 4, "matrix": [6, 1], "x": 206, "y": 16}, // R LB53 | SW37
+ {"flags": 4, "matrix": [5, 1], "x": 206, "y": 0}, // R LB54 | SW31
+ {"flags": 4, "matrix": [5, 0], "x": 224, "y": 0}, // R LB55 | SW30
+ {"flags": 4, "matrix": [6, 0], "x": 224, "y": 16}, // R LB56 | SW36
+ {"flags": 4, "matrix": [7, 0], "x": 224, "y": 32}, // R LB57 | SW42
+ {"flags": 4, "matrix": [8, 0], "x": 224, "y": 48} // R LB58 | SW48
+ ]
+ }
+ }
diff --git a/keyboards/clickety_split/leeloo/rev3/rules.mk b/keyboards/clickety_split/leeloo/rev3/rules.mk
new file mode 100644
index 0000000000..80a6663b9c
--- /dev/null
+++ b/keyboards/clickety_split/leeloo/rev3/rules.mk
@@ -0,0 +1 @@
+# Intentionally left blank.
diff --git a/keyboards/clickety_split/leeloo/rules.mk b/keyboards/clickety_split/leeloo/rules.mk
index e99b3e15ed..9d35960f7c 100644
--- a/keyboards/clickety_split/leeloo/rules.mk
+++ b/keyboards/clickety_split/leeloo/rules.mk
@@ -1,15 +1,2 @@
-# Build Options
-# change yes to no to disable
-#
-BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite
-MOUSEKEY_ENABLE = no # Mouse keys
-EXTRAKEY_ENABLE = no # Audio control and System control
-CONSOLE_ENABLE = no # Console for debug
-COMMAND_ENABLE = no # Commands for debug and configuration
-NKRO_ENABLE = no # Enable N-Key rollover
-BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
-RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
-AUDIO_ENABLE = no # Audio output
-SPLIT_KEYBOARD = yes
-
-DEFAULT_FOLDER = clickety_split/leeloo/rev1
+# Default Folder
+DEFAULT_FOLDER = clickety_split/leeloo/rev3
diff --git a/keyboards/clueboard/2x1800/2021/rules.mk b/keyboards/clueboard/2x1800/2021/rules.mk
index e9f44d7bd2..19c7eb2946 100644
--- a/keyboards/clueboard/2x1800/2021/rules.mk
+++ b/keyboards/clueboard/2x1800/2021/rules.mk
@@ -1 +1,2 @@
-QUANTUM_LIB_SRC += max7219.c spi_master.c
+SPI_DRIVER_REQUIRED = yes
+QUANTUM_LIB_SRC += max7219.c
diff --git a/keyboards/clueboard/66/keymaps/magicmonty/keymap.c b/keyboards/clueboard/66/keymaps/magicmonty/keymap.c
index 238147537d..2a0cf1509f 100644
--- a/keyboards/clueboard/66/keymaps/magicmonty/keymap.c
+++ b/keyboards/clueboard/66/keymaps/magicmonty/keymap.c
@@ -172,7 +172,7 @@ void clueboard_set_midi_led(uint8_t base_oct, uint8_t val)
uint8_t sat = 255;
for (uint8_t i = 0; i < RGBLED_NUM; i++) {
- sethsv(oct_hues[base_oct], sat, val, (LED_TYPE *)&led[i]);
+ sethsv(oct_hues[base_oct], sat, val, (rgb_led_t *)&led[i]);
}
uint8_t next_oct = base_oct < MAX_OCT ? base_oct + 1 : base_oct;
@@ -183,11 +183,11 @@ void clueboard_set_midi_led(uint8_t base_oct, uint8_t val)
for (uint8_t i = 0; i < 3; i++) {
- sethsv(next_hue, next_sat, next_val, (LED_TYPE *)&led[i]);
+ sethsv(next_hue, next_sat, next_val, (rgb_led_t *)&led[i]);
}
for (uint8_t i = 11; i < 14; i++) {
- sethsv(next_hue, next_sat, next_val, (LED_TYPE *)&led[i]);
+ sethsv(next_hue, next_sat, next_val, (rgb_led_t *)&led[i]);
}
rgblight_set();
diff --git a/keyboards/clueboard/66_hotswap/gen1/config.h b/keyboards/clueboard/66_hotswap/gen1/config.h
index b50b676713..ff4863266a 100644
--- a/keyboards/clueboard/66_hotswap/gen1/config.h
+++ b/keyboards/clueboard/66_hotswap/gen1/config.h
@@ -33,18 +33,11 @@
//#define NO_ACTION_TAPPING
//#define NO_ACTION_ONESHOT
-// This is a 7-bit address, that gets left-shifted and bit 0
-// set to 0 for write, 1 for read (as per I2C protocol)
-// The address will vary depending on your wiring:
-// 0b1110100 AD <-> GND
-// 0b1110111 AD <-> VCC
-// 0b1110101 AD <-> SCL
-// 0b1110110 AD <-> SDA
-#define LED_DRIVER_ADDR_1 0b1110100
+#define LED_DRIVER_ADDR_1 IS31FL3731_I2C_ADDRESS_GND
#define I2C1_SCL_PIN B8
#define I2C1_SDA_PIN B9
-#define LED_DRIVER_COUNT 1
+#define IS31FL3731_DRIVER_COUNT 1
#define LED_MATRIX_LED_COUNT 71
// LED Matrix Animation modes. Explicitly enabled
diff --git a/keyboards/clueboard/66_hotswap/gen1/gen1.c b/keyboards/clueboard/66_hotswap/gen1/gen1.c
index a935884a0b..7af0b964da 100644
--- a/keyboards/clueboard/66_hotswap/gen1/gen1.c
+++ b/keyboards/clueboard/66_hotswap/gen1/gen1.c
@@ -16,7 +16,7 @@
#include "quantum.h"
#ifdef LED_MATRIX_ENABLE
-const is31_led PROGMEM g_is31_leds[LED_MATRIX_LED_COUNT] = {
+const is31fl3731_led_t PROGMEM g_is31fl3731_leds[LED_MATRIX_LED_COUNT] = {
/* Refer to IS31 manual for these locations
* driver
* | LED address
diff --git a/keyboards/converter/palm_usb/rules.mk b/keyboards/converter/palm_usb/rules.mk
index e02b683d3b..72d9daf6d9 100644
--- a/keyboards/converter/palm_usb/rules.mk
+++ b/keyboards/converter/palm_usb/rules.mk
@@ -14,6 +14,6 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
CUSTOM_MATRIX = yes
SRC += matrix.c
-QUANTUM_LIB_SRC += uart.c
+UART_DRIVER_REQUIRED = yes
DEFAULT_FOLDER = converter/palm_usb/stowaway
diff --git a/keyboards/converter/sun_usb/rules.mk b/keyboards/converter/sun_usb/rules.mk
index ee54c6cf11..ae20f51b37 100644
--- a/keyboards/converter/sun_usb/rules.mk
+++ b/keyboards/converter/sun_usb/rules.mk
@@ -14,6 +14,6 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
CUSTOM_MATRIX = yes
SRC += matrix.c led.c
-QUANTUM_LIB_SRC += uart.c
+UART_DRIVER_REQUIRED = yes
DEFAULT_FOLDER = converter/sun_usb/type5
diff --git a/keyboards/crimsonkeyboards/resume1800/info.json b/keyboards/crimsonkeyboards/resume1800/info.json
index 0a967d11d6..23257be46e 100644
--- a/keyboards/crimsonkeyboards/resume1800/info.json
+++ b/keyboards/crimsonkeyboards/resume1800/info.json
@@ -20,8 +20,12 @@
},
"processor": "atmega32a",
"bootloader": "usbasploader",
+ "layout_aliases": {
+ "LAYOUT_resume1800_ansi_all": "LAYOUT_ansi_all",
+ "LAYOUT_resume1800_iso_all": "LAYOUT_iso_all"
+ },
"layouts": {
- "LAYOUT_resume1800_ansi_all": {
+ "LAYOUT_ansi_all": {
"layout": [
{"matrix": [0, 0], "x": 0, "y": 0},
{"matrix": [0, 1], "x": 1, "y": 0},
@@ -138,7 +142,7 @@
{"matrix": [5, 19], "x": 19, "y": 5}
]
},
- "LAYOUT_resume1800_iso_all": {
+ "LAYOUT_iso_all": {
"layout": [
{"matrix": [0, 0], "x": 0, "y": 0},
{"matrix": [0, 1], "x": 1, "y": 0},
diff --git a/keyboards/crimsonkeyboards/resume1800/keymaps/dee/keymap.c b/keyboards/crimsonkeyboards/resume1800/keymaps/dee/keymap.c
index c7f471a113..27e1e2bc50 100644
--- a/keyboards/crimsonkeyboards/resume1800/keymaps/dee/keymap.c
+++ b/keyboards/crimsonkeyboards/resume1800/keymaps/dee/keymap.c
@@ -34,7 +34,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [0] = LAYOUT_resume1800_iso_all(
+ [0] = LAYOUT_iso_all(
/* Esc F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 F13 F14 Print Scroll Lock Pause Insert End */
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_F13, KC_F14, KC_PRINT_SCREEN, KC_SCRL, KC_PAUS, KC_INS, KC_END,
/* ~ 1 2 3 4 5 6 7 8 9 0 - = Backspace Delete Num Lock Num / Num * Num - */
diff --git a/keyboards/crimsonkeyboards/resume1800/keymaps/default/keymap.c b/keyboards/crimsonkeyboards/resume1800/keymaps/default/keymap.c
index b8adef49b0..a8bb2c13d5 100644
--- a/keyboards/crimsonkeyboards/resume1800/keymaps/default/keymap.c
+++ b/keyboards/crimsonkeyboards/resume1800/keymaps/default/keymap.c
@@ -34,7 +34,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [0] = LAYOUT_resume1800_ansi_all(
+ [0] = LAYOUT_ansi_all(
/* Esc F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 F13 F14 Print Scroll Lock Pause Insert End */
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_F13, KC_F14, KC_PSCR, KC_SCRL, KC_PAUS, KC_INS, KC_END,
/* ~ 1 2 3 4 5 6 7 8 9 0 - = Backspace Delete Num Lock Num / Num * Num - */
diff --git a/keyboards/crimsonkeyboards/resume1800/keymaps/iso/keymap.c b/keyboards/crimsonkeyboards/resume1800/keymaps/iso/keymap.c
index ea08c07b19..2f5f351f13 100644
--- a/keyboards/crimsonkeyboards/resume1800/keymaps/iso/keymap.c
+++ b/keyboards/crimsonkeyboards/resume1800/keymaps/iso/keymap.c
@@ -34,7 +34,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [0] = LAYOUT_resume1800_iso_all(
+ [0] = LAYOUT_iso_all(
/* Esc F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 F13 F14 Print Scroll Lock Pause Insert End */
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_F13, KC_F14, KC_PSCR, KC_SCRL, KC_PAUS, KC_INS, KC_END,
/* ~ 1 2 3 4 5 6 7 8 9 0 - = Backspace Delete Num Lock Num / Num * Num - */
diff --git a/keyboards/crimsonkeyboards/resume1800/keymaps/via/keymap.c b/keyboards/crimsonkeyboards/resume1800/keymaps/via/keymap.c
index b8adef49b0..a8bb2c13d5 100644
--- a/keyboards/crimsonkeyboards/resume1800/keymaps/via/keymap.c
+++ b/keyboards/crimsonkeyboards/resume1800/keymaps/via/keymap.c
@@ -34,7 +34,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [0] = LAYOUT_resume1800_ansi_all(
+ [0] = LAYOUT_ansi_all(
/* Esc F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 F13 F14 Print Scroll Lock Pause Insert End */
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_F13, KC_F14, KC_PSCR, KC_SCRL, KC_PAUS, KC_INS, KC_END,
/* ~ 1 2 3 4 5 6 7 8 9 0 - = Backspace Delete Num Lock Num / Num * Num - */
diff --git a/keyboards/crkbd/keymaps/vlukash_trackpad_right/keymap.c b/keyboards/crkbd/keymaps/vlukash_trackpad_right/keymap.c
index 2d2535cda9..5f95ad497f 100644
--- a/keyboards/crkbd/keymaps/vlukash_trackpad_right/keymap.c
+++ b/keyboards/crkbd/keymaps/vlukash_trackpad_right/keymap.c
@@ -1,13 +1,4 @@
#include QMK_KEYBOARD_H
-#include "bootloader.h"
-#include "mousekey.h"
-#include "pointing_device.h"
-#include "report.h"
-
-#ifdef PROTOCOL_LUFA
- #include "lufa.h"
- #include "split_util.h"
-#endif
extern bool isScrollMode;
diff --git a/keyboards/crowboard/rules.mk b/keyboards/crowboard/rules.mk
index 37ad1d4c60..6e7633bfe0 100644
--- a/keyboards/crowboard/rules.mk
+++ b/keyboards/crowboard/rules.mk
@@ -1 +1 @@
-PICO_INTRINSICS_ENABLED = no # ATM Unsupported by ChibiOS!
+# This file intentionally left blank
diff --git a/keyboards/custommk/ergostrafer/info.json b/keyboards/custommk/ergostrafer/info.json
index 590925065e..92d1fe99e8 100644
--- a/keyboards/custommk/ergostrafer/info.json
+++ b/keyboards/custommk/ergostrafer/info.json
@@ -4,6 +4,9 @@
"maintainer": "customMK",
"bootloader": "stm32-dfu",
"diode_direction": "ROW2COL",
+ "eeprom": {
+ "driver": "spi"
+ },
"features": {
"bootmagic": true,
"command": false,
diff --git a/keyboards/custommk/ergostrafer/rules.mk b/keyboards/custommk/ergostrafer/rules.mk
index ee519ea8b5..72f75f4367 100644
--- a/keyboards/custommk/ergostrafer/rules.mk
+++ b/keyboards/custommk/ergostrafer/rules.mk
@@ -1,3 +1 @@
-EEPROM_DRIVER = spi
-
AUDIO_DRIVER = pwm_hardware
diff --git a/keyboards/custommk/evo70_r2/info.json b/keyboards/custommk/evo70_r2/info.json
index 18c618abc6..a11daef092 100644
--- a/keyboards/custommk/evo70_r2/info.json
+++ b/keyboards/custommk/evo70_r2/info.json
@@ -24,6 +24,9 @@
"device_version": "1.0.0"
},
"diode_direction": "ROW2COL",
+ "eeprom": {
+ "driver": "spi"
+ },
"processor": "STM32F411",
"bootloader": "stm32-dfu",
"rgblight": {
diff --git a/keyboards/custommk/evo70_r2/rules.mk b/keyboards/custommk/evo70_r2/rules.mk
index b79d08c6b7..193fe4f1a4 100644
--- a/keyboards/custommk/evo70_r2/rules.mk
+++ b/keyboards/custommk/evo70_r2/rules.mk
@@ -3,8 +3,6 @@ AUDIO_DRIVER = pwm_hardware
# project specific files
SRC += matrix.c
-EEPROM_DRIVER = spi
-
QUANTUM_PAINTER_DRIVERS = st7735_spi
CUSTOM_MATRIX = lite
diff --git a/keyboards/dc01/left/rules.mk b/keyboards/dc01/left/rules.mk
index 72485a3dd6..3a9422733c 100644
--- a/keyboards/dc01/left/rules.mk
+++ b/keyboards/dc01/left/rules.mk
@@ -11,5 +11,5 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
AUDIO_ENABLE = no # Audio output
CUSTOM_MATRIX = yes # Use custom matrix
-SRC += matrix.c \
- i2c_master.c
+SRC += matrix.c
+I2C_DRIVER_REQUIRED = yes
diff --git a/keyboards/deng/thirty/config.h b/keyboards/deng/thirty/config.h
index 20e6673dd2..8ec8f6b0d3 100644
--- a/keyboards/deng/thirty/config.h
+++ b/keyboards/deng/thirty/config.h
@@ -78,8 +78,3 @@
#define ENABLE_RGB_MATRIX_SOLID_SPLASH
#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
#endif
-
-/* VIA */
-#ifdef VIA_ENABLE
-#define DYNAMIC_KEYMAP_LAYER_COUNT 8
-#endif
diff --git a/keyboards/deng/thirty/info.json b/keyboards/deng/thirty/info.json
index 8836273865..b93881c086 100644
--- a/keyboards/deng/thirty/info.json
+++ b/keyboards/deng/thirty/info.json
@@ -16,6 +16,9 @@
"rows": ["B15", "A5", "A3", "A15", "B7", "B8"]
},
"diode_direction": "COL2ROW",
+ "dynamic_keymap": {
+ "layer_count": 8
+ },
"backlight": {
"pin": "B11",
"levels": 5,
diff --git a/keyboards/dichotomy/rules.mk b/keyboards/dichotomy/rules.mk
index 040710a460..bfa5252a03 100755
--- a/keyboards/dichotomy/rules.mk
+++ b/keyboards/dichotomy/rules.mk
@@ -14,4 +14,4 @@ NKRO_ENABLE = yes # Enable N-Key Rollover
# # project specific files
SRC += matrix.c
-QUANTUM_LIB_SRC += uart.c
+UART_DRIVER_REQUIRED = yes
diff --git a/keyboards/dm9records/lain/config.h b/keyboards/dm9records/lain/config.h
index e34b4d34ab..ddb4b6702f 100644
--- a/keyboards/dm9records/lain/config.h
+++ b/keyboards/dm9records/lain/config.h
@@ -12,5 +12,3 @@
#define LOCKING_SUPPORT_ENABLE
/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE
-
-#define DYNAMIC_KEYMAP_LAYER_COUNT 6
diff --git a/keyboards/dm9records/lain/info.json b/keyboards/dm9records/lain/info.json
index 8ae8a33b44..250eb2ddaf 100644
--- a/keyboards/dm9records/lain/info.json
+++ b/keyboards/dm9records/lain/info.json
@@ -13,6 +13,9 @@
"rows": ["C6", "D7", "D6", "D4"]
},
"diode_direction": "COL2ROW",
+ "dynamic_keymap": {
+ "layer_count": 6
+ },
"processor": "atmega32u4",
"bootloader": "atmel-dfu",
"layouts": {
diff --git a/keyboards/dm9records/plaid/keymaps/gipsy-king/keymap.c b/keyboards/dm9records/plaid/keymaps/gipsy-king/keymap.c
index 0d1ec2b762..a91664f0c9 100644
--- a/keyboards/dm9records/plaid/keymaps/gipsy-king/keymap.c
+++ b/keyboards/dm9records/plaid/keymaps/gipsy-king/keymap.c
@@ -15,8 +15,6 @@
*/
#include QMK_KEYBOARD_H
-#include "mousekey.h"
-
enum plaid_layers {
_QWERTY,
diff --git a/keyboards/doio/kb16/rev2/rules.mk b/keyboards/doio/kb16/rev2/rules.mk
index 88879a4ffa..2145c9fbe1 100644
--- a/keyboards/doio/kb16/rev2/rules.mk
+++ b/keyboards/doio/kb16/rev2/rules.mk
@@ -25,7 +25,3 @@ RGB_MATRIX_ENABLE = yes
# Encoder enabled
ENCODER_ENABLE = yes
-
-# Wear-levelling driver
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = embedded_flash
diff --git a/keyboards/doio/kb30/config.h b/keyboards/doio/kb30/config.h
index a87532c459..2a1a827375 100644
--- a/keyboards/doio/kb30/config.h
+++ b/keyboards/doio/kb30/config.h
@@ -89,9 +89,6 @@
#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
#endif
-
-
-// #define DYNAMIC_KEYMAP_LAYER_COUNT 4
/*
* Feature disable options
* These options are also useful to firmware size reduction.
diff --git a/keyboards/dp3000/info.json b/keyboards/dp3000/info.json
index cdb9fe4547..442d6d6a66 100644
--- a/keyboards/dp3000/info.json
+++ b/keyboards/dp3000/info.json
@@ -1,6 +1,5 @@
{
"manufacturer": "depermana12",
- "keyboard_name": "dp3000",
"maintainer": "depermana12",
"diode_direction": "COL2ROW",
"development_board": "promicro",
@@ -10,7 +9,6 @@
"console": false,
"extrakey": true,
"encoder": true,
- "rgb_matrix": true,
"oled": true,
"mousekey": false,
"nkro": false
@@ -20,64 +18,17 @@
},
"url": "https://github.com/depermana12",
"usb": {
- "device_version": "1.0.1",
- "vid": "0x4450",
- "pid": "0x6470"
+ "vid": "0x4450"
},
"encoder": {
"rotary": [
- { "pin_a": "B2", "pin_b": "B1"},
- { "pin_a": "F4", "pin_b": "F5"}
+ { "pin_a": "B2", "pin_b": "B1" },
+ { "pin_a": "F4", "pin_b": "F5" }
]
},
- "ws2812": {
- "pin": "B5"
- },
- "rgb_matrix":{
- "driver":"ws2812",
- "max_brightness": 180,
- "animations": {
- "alphas_mods": true,
- "gradient_up_down": true,
- "gradient_left_right": true,
- "breathing": true,
- "band_sat": true,
- "band_val": true,
- "band_pinwheel_sat": true,
- "band_pinwheel_val": true,
- "band_spiral_sat": true,
- "band_spiral_val": true,
- "cycle_all": true,
- "cycle_left_right": true,
- "cycle_up_down": true,
- "rainbow_moving_chevron":true,
- "cycle_pinwheel": true,
- "cycle_spiral": true,
- "raindrops": true,
- "hue_breathing": true,
- "hue_pendulum": true,
- "hue_wave": true,
- "typing_heatmap": true,
- "solid_reactive_simple": true,
- "solid_reactive": true,
- "solid_reactive_multinexus": true,
- "splash": true,
- "solid_splash": true
- },
- "layout":[
- { "matrix": [1, 0], "x": 0, "y": 32, "flags":4 },
- { "matrix": [1, 1], "x": 25, "y": 32, "flags":4 },
- { "matrix": [1, 2], "x": 37, "y": 32, "flags":4 },
- { "matrix": [1, 3], "x": 75, "y": 32, "flags":4 },
- { "matrix": [2, 0], "x": 75, "y": 16, "flags":4 },
- { "matrix": [2, 1], "x": 37, "y": 16, "flags":4 },
- { "matrix": [2, 2], "x": 25, "y": 16, "flags":4 },
- { "matrix": [2, 3], "x": 0, "y": 16, "flags":4 }
- ]
- },
"matrix_pins": {
- "cols": ["D4", "D7", "B4", "C6"],
- "rows": ["F6", "F7", "B3"]
+ "cols": [ "D4", "D7", "B4", "C6" ],
+ "rows": [ "F6", "F7", "B3" ]
},
"layouts": {
"LAYOUT": {
diff --git a/keyboards/dp3000/readme.md b/keyboards/dp3000/readme.md
index 3844a66757..8e2c8871d9 100644
--- a/keyboards/dp3000/readme.md
+++ b/keyboards/dp3000/readme.md
@@ -3,18 +3,21 @@
![dp3000 macropad](https://i.imgur.com/uBHS8EYh.jpg)
dp3000 is a simple yet elegant macropad, 2x4 (8 keys), dual encoder, embedded with an Atmel 32u4 chip, powered by QMK.
-
+* Rev. 1 Support RGB matrix
+* Rev. 2 Support RGB light (underglow)
* Keyboard Maintainer: [Deddia Permana](https://github.com/depermana12)
-* Hardware Supported: DP3000 PCB, ATmega32u4
+* Hardware Supported: DP3000 PCB rev1 and rev2, ATmega32u4
* Hardware Availability: [tokopedia.com/gundamtricks](https://www.tokopedia.com/gundamtricks)
Make example for this keyboard (after setting up your build environment):
- make dp3000:default
+ make dp3000/rev1:default
+ make dp3000/rev2:default
Flashing example for this keyboard:
- make dp3000:default:flash
+ make dp3000/rev1:default:flash
+ make dp3000/rev2:default:flash
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
@@ -22,6 +25,6 @@ See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_to
Enter the bootloader in 3 ways:
-* Bootmagic reset: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard
+* Bootmagic reset: Hold down the key at (0,0) in the matrix (left rotary encoder push switch) and plug in the keyboard
* Physical reset button: Briefly press reset button twice, located in front of the first rotary encoder (left rotary encoder)
* Keycode in layout: Press the key mapped to QK_BOOT if it is available
diff --git a/keyboards/dp3000/rev1/info.json b/keyboards/dp3000/rev1/info.json
new file mode 100644
index 0000000000..7ea2d101c4
--- /dev/null
+++ b/keyboards/dp3000/rev1/info.json
@@ -0,0 +1,59 @@
+{
+ "keyboard_name": "dp3000",
+ "features": {
+ "rgb_matrix": true
+ },
+ "usb": {
+ "device_version": "1.0.1",
+ "pid": "0x6470"
+ },
+ "rgb_matrix": {
+ "animations": {
+ "alphas_mods": 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_pinwheel": true,
+ "cycle_spiral": true,
+ "cycle_up_down": true,
+ "gradient_left_right": true,
+ "gradient_up_down": true,
+ "hue_breathing": true,
+ "hue_pendulum": true,
+ "hue_wave": true,
+ "rainbow_moving_chevron": true,
+ "raindrops": true,
+ "solid_color": true,
+ "solid_reactive": true,
+ "solid_reactive_multinexus": true,
+ "solid_reactive_simple": true,
+ "solid_splash": true,
+ "splash": true,
+ "typing_heatmap": true
+ },
+ "driver": "ws2812",
+ "layout": [
+ {"matrix": [1, 0], "x": 0, "y": 32, "flags": 4},
+ {"matrix": [1, 1], "x": 25, "y": 32, "flags": 4},
+ {"matrix": [1, 2], "x": 37, "y": 32, "flags": 4},
+ {"matrix": [1, 3], "x": 75, "y": 32, "flags": 4},
+ {"matrix": [2, 0], "x": 75, "y": 16, "flags": 4},
+ {"matrix": [2, 1], "x": 37, "y": 16, "flags": 4},
+ {"matrix": [2, 2], "x": 25, "y": 16, "flags": 4},
+ {"matrix": [2, 3], "x": 0, "y": 16, "flags": 4}
+ ],
+ "max_brightness": 180,
+ "sat_steps": 8,
+ "speed_steps": 10,
+ "val_steps": 8
+ },
+ "ws2812": {
+ "pin": "B5"
+ }
+}
diff --git a/keyboards/dp3000/rev1/rules.mk b/keyboards/dp3000/rev1/rules.mk
new file mode 100644
index 0000000000..6e7633bfe0
--- /dev/null
+++ b/keyboards/dp3000/rev1/rules.mk
@@ -0,0 +1 @@
+# This file intentionally left blank
diff --git a/keyboards/dp3000/rev2/info.json b/keyboards/dp3000/rev2/info.json
new file mode 100644
index 0000000000..f6f03eeb63
--- /dev/null
+++ b/keyboards/dp3000/rev2/info.json
@@ -0,0 +1,31 @@
+{
+ "keyboard_name": "dp3000 rev2",
+ "features": {
+ "rgblight": true
+ },
+ "usb": {
+ "device_version": "2.0.0",
+ "pid": "0x3132"
+ },
+ "rgblight": {
+ "animations": {
+ "alternating": true,
+ "breathing": true,
+ "christmas": true,
+ "knight": true,
+ "rainbow_mood": true,
+ "rainbow_swirl": true,
+ "rgb_test": true,
+ "snake": true,
+ "static_gradient": true,
+ "twinkle": true
+ },
+ "led_count": 4,
+ "max_brightness": 180,
+ "saturation_steps": 8,
+ "sleep": true
+ },
+ "ws2812": {
+ "pin": "B6"
+ }
+}
diff --git a/keyboards/dp3000/rev2/rules.mk b/keyboards/dp3000/rev2/rules.mk
new file mode 100644
index 0000000000..6e7633bfe0
--- /dev/null
+++ b/keyboards/dp3000/rev2/rules.mk
@@ -0,0 +1 @@
+# This file intentionally left blank
diff --git a/keyboards/dp3000/rules.mk b/keyboards/dp3000/rules.mk
index 6e7633bfe0..0f44aefd44 100644
--- a/keyboards/dp3000/rules.mk
+++ b/keyboards/dp3000/rules.mk
@@ -1 +1 @@
-# This file intentionally left blank
+DEFAULT_FOLDER = dp3000/rev1
diff --git a/keyboards/dp60/config.h b/keyboards/dp60/config.h
index fd83fe2d68..48c232b8e7 100644
--- a/keyboards/dp60/config.h
+++ b/keyboards/dp60/config.h
@@ -33,9 +33,9 @@
//#define NO_PRINT
//rgb matrix setting
-#define DRIVER_ADDR_1 0b1110100
-#define DRIVER_ADDR_2 0b1110111
-#define DRIVER_COUNT 2
+#define DRIVER_ADDR_1 IS31FL3731_I2C_ADDRESS_GND
+#define DRIVER_ADDR_2 IS31FL3731_I2C_ADDRESS_VCC
+#define IS31FL3731_DRIVER_COUNT 2
#define DRIVER_1_LED_TOTAL 36
#define DRIVER_2_LED_TOTAL 36
#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
diff --git a/keyboards/dp60/dp60.c b/keyboards/dp60/dp60.c
index 75e6649ad5..588acd591d 100644
--- a/keyboards/dp60/dp60.c
+++ b/keyboards/dp60/dp60.c
@@ -17,7 +17,7 @@
#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
-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/keyboards/dp60/keymaps/indicator/indicator.c b/keyboards/dp60/keymaps/indicator/indicator.c
index 683ae3625a..02450ce68d 100644
--- a/keyboards/dp60/keymaps/indicator/indicator.c
+++ b/keyboards/dp60/keymaps/indicator/indicator.c
@@ -70,9 +70,9 @@ void keyboard_post_init_user(void) {
extern rgblight_config_t rgblight_config;
extern void rgblight_layers_write(void);
-extern void indicator_write(LED_TYPE *start_led, uint8_t num_leds);
+extern void indicator_write(rgb_led_t *start_led, uint8_t num_leds);
-void rgblight_call_driver(LED_TYPE *start_led, uint8_t num_leds)
+void rgblight_call_driver(rgb_led_t *start_led, uint8_t num_leds)
{
ws2812_setleds(start_led, RGBLED_NUM-RGB_INDICATOR_NUM);
diff --git a/keyboards/dp60/keymaps/indicator/led_driver.c b/keyboards/dp60/keymaps/indicator/led_driver.c
index 677eb8af57..b31e2daacd 100644
--- a/keyboards/dp60/keymaps/indicator/led_driver.c
+++ b/keyboards/dp60/keymaps/indicator/led_driver.c
@@ -20,7 +20,7 @@
#define ws2812_setleds_pin indicator_setleds_pin
#include "ws2812_bitbang.c"
-void indicator_write(LED_TYPE *start_led, uint8_t num_leds)
+void indicator_write(rgb_led_t *start_led, uint8_t num_leds)
{
indicator_setleds(start_led, num_leds);
}
diff --git a/keyboards/drop/alt/v2/config.h b/keyboards/drop/alt/v2/config.h
index 5de22f7bcf..2d8fa2b36f 100644
--- a/keyboards/drop/alt/v2/config.h
+++ b/keyboards/drop/alt/v2/config.h
@@ -14,15 +14,10 @@
#define EXTERNAL_EEPROM_WP_PIN B5
#define EEPROM_I2C_24LC256
-#define DRIVER_ADDR_1 0b1010011
-#define DRIVER_ADDR_2 0b1011111
-#define DRIVER_COUNT 2
-#define RGB_MATRIX_LED_COUNT 111
-#define ISSI_PWM_FREQUENCY 0b010 // 26k
-
-#define RGB_DISABLE_WHEN_USB_SUSPENDED
-#define RGB_MATRIX_KEYPRESSES
-#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
+#define DRIVER_ADDR_1 IS31FL3733_I2C_ADDRESS_GND_VCC
+#define DRIVER_ADDR_2 IS31FL3733_I2C_ADDRESS_VCC_VCC
+#define IS31FL3733_DRIVER_COUNT 2
+#define IS31FL3733_PWM_FREQUENCY IS31FL3733_PWM_FREQUENCY_26K7_HZ
#define RGB_MATRIX_CYCLE_ZONES_ENABLE
#define RGB_MATRIX_CAPS_LOCK_INDEX 30
diff --git a/keyboards/drop/alt/v2/info.json b/keyboards/drop/alt/v2/info.json
index c234f03090..d0fc31f624 100644
--- a/keyboards/drop/alt/v2/info.json
+++ b/keyboards/drop/alt/v2/info.json
@@ -106,6 +106,7 @@
"rgb_matrix": {
"driver": "is31fl3733",
"max_brightness": 191,
+ "sleep": true,
"animations": {
"alphas_mods": true,
"gradient_up_down": true,
diff --git a/keyboards/drop/alt/v2/v2.c b/keyboards/drop/alt/v2/v2.c
index 2e183fe4d8..fcdad7f2df 100644
--- a/keyboards/drop/alt/v2/v2.c
+++ b/keyboards/drop/alt/v2/v2.c
@@ -3,7 +3,7 @@
#ifdef RGB_MATRIX_ENABLE
# include "rgb_matrix.h"
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3733_led_t PROGMEM g_is31fl3733_leds[RGB_MATRIX_LED_COUNT] = {
{ 1, B_2, A_2, C_2 },
{ 1, E_3, D_3, F_3 },
{ 1, E_4, D_4, F_4 },
diff --git a/keyboards/drop/cstm80/config.h b/keyboards/drop/cstm80/config.h
index 2aefadfe30..73f5287f09 100644
--- a/keyboards/drop/cstm80/config.h
+++ b/keyboards/drop/cstm80/config.h
@@ -9,14 +9,9 @@
#define EXTERNAL_EEPROM_WP_PIN B7
#define EEPROM_I2C_24LC256
-#define DRIVER_ADDR_1 0b1010000
-#define DRIVER_ADDR_2 0b1011111
-#define DRIVER_COUNT 2
-#define RGB_MATRIX_LED_COUNT 88
-#define ISSI_PWM_FREQUENCY 0b010 // 26k
-
-#define RGB_DISABLE_WHEN_USB_SUSPENDED
-#define RGB_MATRIX_KEYPRESSES
-#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
+#define DRIVER_ADDR_1 IS31FL3733_I2C_ADDRESS_GND_GND
+#define DRIVER_ADDR_2 IS31FL3733_I2C_ADDRESS_VCC_VCC
+#define IS31FL3733_DRIVER_COUNT 2
+#define IS31FL3733_PWM_FREQUENCY IS31FL3733_PWM_FREQUENCY_26K7_HZ
#define RGB_MATRIX_CAPS_LOCK_INDEX 48
diff --git a/keyboards/drop/cstm80/cstm80.c b/keyboards/drop/cstm80/cstm80.c
index c60f347cb9..75e7049c20 100644
--- a/keyboards/drop/cstm80/cstm80.c
+++ b/keyboards/drop/cstm80/cstm80.c
@@ -3,7 +3,7 @@
#ifdef RGB_MATRIX_ENABLE
# include "rgb_matrix.h"
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3733_led_t PROGMEM g_is31fl3733_leds[RGB_MATRIX_LED_COUNT] = {
{ 0, E_1, D_1, F_1 },
{ 0, E_2, D_2, F_2 },
{ 0, E_3, D_3, F_3 },
diff --git a/keyboards/drop/cstm80/info.json b/keyboards/drop/cstm80/info.json
index 170538027e..12331eb097 100644
--- a/keyboards/drop/cstm80/info.json
+++ b/keyboards/drop/cstm80/info.json
@@ -128,6 +128,7 @@
},
"rgb_matrix": {
"driver": "is31fl3733",
+ "sleep": true,
"animations": {
"alphas_mods": true,
"gradient_up_down": true,
diff --git a/keyboards/drop/ctrl/v2/config.h b/keyboards/drop/ctrl/v2/config.h
index 2cff42074a..b1b2f5b396 100644
--- a/keyboards/drop/ctrl/v2/config.h
+++ b/keyboards/drop/ctrl/v2/config.h
@@ -14,15 +14,10 @@
#define EXTERNAL_EEPROM_WP_PIN B5
#define EEPROM_I2C_24LC256
-#define DRIVER_ADDR_1 0b1010011
-#define DRIVER_ADDR_2 0b1011111
-#define DRIVER_COUNT 2
-#define RGB_MATRIX_LED_COUNT 119
-#define ISSI_PWM_FREQUENCY 0b010 // 26k
-
-#define RGB_DISABLE_WHEN_USB_SUSPENDED
-#define RGB_MATRIX_KEYPRESSES
-#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
+#define DRIVER_ADDR_1 IS31FL3733_I2C_ADDRESS_GND_VCC
+#define DRIVER_ADDR_2 IS31FL3733_I2C_ADDRESS_VCC_VCC
+#define IS31FL3733_DRIVER_COUNT 2
+#define IS31FL3733_PWM_FREQUENCY IS31FL3733_PWM_FREQUENCY_26K7_HZ
#define RGB_MATRIX_CYCLE_ZONES_ENABLE
#define RGB_MATRIX_CAPS_LOCK_INDEX 50
diff --git a/keyboards/drop/ctrl/v2/info.json b/keyboards/drop/ctrl/v2/info.json
index 11af6a553c..f461800dde 100644
--- a/keyboards/drop/ctrl/v2/info.json
+++ b/keyboards/drop/ctrl/v2/info.json
@@ -126,6 +126,7 @@
"rgb_matrix": {
"driver": "is31fl3733",
"max_brightness": 191,
+ "sleep": true,
"animations": {
"alphas_mods": true,
"gradient_up_down": true,
diff --git a/keyboards/drop/ctrl/v2/v2.c b/keyboards/drop/ctrl/v2/v2.c
index 6f3091035b..6b565efbe1 100644
--- a/keyboards/drop/ctrl/v2/v2.c
+++ b/keyboards/drop/ctrl/v2/v2.c
@@ -3,7 +3,7 @@
#ifdef RGB_MATRIX_ENABLE
# include "rgb_matrix.h"
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3733_led_t PROGMEM g_is31fl3733_leds[RGB_MATRIX_LED_COUNT] = {
{ 1, B_2, A_2, C_2 },
{ 1, E_3, D_3, F_3 },
{ 1, E_4, D_4, F_4 },
diff --git a/keyboards/drop/sense75/config.h b/keyboards/drop/sense75/config.h
index b8d47c311c..a9c604f2ac 100644
--- a/keyboards/drop/sense75/config.h
+++ b/keyboards/drop/sense75/config.h
@@ -9,15 +9,10 @@
#define EXTERNAL_EEPROM_WP_PIN B7
#define EEPROM_I2C_24LC256
-#define DRIVER_ADDR_1 0b1010000
-#define DRIVER_ADDR_2 0b1011111
-#define DRIVER_COUNT 2
-#define RGB_MATRIX_LED_COUNT 111
-#define ISSI_PWM_FREQUENCY 0b010 // 26k
-
-#define RGB_DISABLE_WHEN_USB_SUSPENDED
-#define RGB_MATRIX_KEYPRESSES
-#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
+#define DRIVER_ADDR_1 IS31FL3733_I2C_ADDRESS_GND_GND
+#define DRIVER_ADDR_2 IS31FL3733_I2C_ADDRESS_VCC_VCC
+#define IS31FL3733_DRIVER_COUNT 2
+#define IS31FL3733_PWM_FREQUENCY IS31FL3733_PWM_FREQUENCY_26K7_HZ
#define RGB_MATRIX_CYCLE_ZONES_ENABLE
#define RGB_MATRIX_CAPS_LOCK_INDEX 62
diff --git a/keyboards/drop/sense75/info.json b/keyboards/drop/sense75/info.json
index 2df7b0ae5a..dbefc108f2 100644
--- a/keyboards/drop/sense75/info.json
+++ b/keyboards/drop/sense75/info.json
@@ -117,6 +117,7 @@
},
"rgb_matrix": {
"driver": "is31fl3733",
+ "sleep": true,
"animations": {
"alphas_mods": true,
"gradient_up_down": true,
diff --git a/keyboards/drop/sense75/sense75.c b/keyboards/drop/sense75/sense75.c
index 40577054cc..057e310748 100644
--- a/keyboards/drop/sense75/sense75.c
+++ b/keyboards/drop/sense75/sense75.c
@@ -3,7 +3,7 @@
#ifdef RGB_MATRIX_ENABLE
# include "rgb_matrix.h"
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3733_led_t PROGMEM g_is31fl3733_leds[RGB_MATRIX_LED_COUNT] = {
// top underglow sd2-sd17
{ 0, B_2, A_2, C_2 },
{ 0, B_3, A_3, C_3 },
diff --git a/keyboards/drop/shift/v2/config.h b/keyboards/drop/shift/v2/config.h
index a4faafe394..088ccada62 100644
--- a/keyboards/drop/shift/v2/config.h
+++ b/keyboards/drop/shift/v2/config.h
@@ -14,15 +14,10 @@
#define EXTERNAL_EEPROM_WP_PIN B5
#define EEPROM_I2C_24LC256
-#define DRIVER_ADDR_1 0b1010011
-#define DRIVER_ADDR_2 0b1011111
-#define DRIVER_ADDR_3 0b1010000
-#define DRIVER_COUNT 3
-#define RGB_MATRIX_LED_COUNT 166
-#define ISSI_PWM_FREQUENCY 0b010 // 26k
-
-#define RGB_DISABLE_WHEN_USB_SUSPENDED
-#define RGB_MATRIX_KEYPRESSES
-#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
+#define DRIVER_ADDR_1 IS31FL3733_I2C_ADDRESS_GND_VCC
+#define DRIVER_ADDR_2 IS31FL3733_I2C_ADDRESS_VCC_VCC
+#define DRIVER_ADDR_3 IS31FL3733_I2C_ADDRESS_GND_GND
+#define IS31FL3733_DRIVER_COUNT 3
+#define IS31FL3733_PWM_FREQUENCY IS31FL3733_PWM_FREQUENCY_26K7_HZ
#define RGB_MATRIX_CYCLE_ZONES_ENABLE
diff --git a/keyboards/drop/shift/v2/info.json b/keyboards/drop/shift/v2/info.json
index 3615fdef4f..212263d71c 100644
--- a/keyboards/drop/shift/v2/info.json
+++ b/keyboards/drop/shift/v2/info.json
@@ -134,6 +134,7 @@
"rgb_matrix": {
"driver": "is31fl3733",
"max_brightness": 191,
+ "sleep": true,
"animations": {
"alphas_mods": true,
"gradient_up_down": true,
diff --git a/keyboards/drop/shift/v2/v2.c b/keyboards/drop/shift/v2/v2.c
index 326c418279..8565a0cb26 100644
--- a/keyboards/drop/shift/v2/v2.c
+++ b/keyboards/drop/shift/v2/v2.c
@@ -4,7 +4,7 @@
# include "host.h"
# include "rgb_matrix.h"
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3733_led_t PROGMEM g_is31fl3733_leds[RGB_MATRIX_LED_COUNT] = {
{ 0, K_1, J_1, L_1 },// LED1
{ 0, K_2, J_2, L_2 },
{ 0, K_3, J_3, L_3 },
diff --git a/keyboards/durgod/dgk6x/config.h b/keyboards/durgod/dgk6x/config.h
index beb580a588..542c6a231c 100644
--- a/keyboards/durgod/dgk6x/config.h
+++ b/keyboards/durgod/dgk6x/config.h
@@ -34,21 +34,10 @@
#define LED_MR_LOCK_PIN LED_SCROLL_LOCK_PIN
#ifdef RGB_MATRIX_ENABLE
-// This is a 7-bit address, that gets left-shifted and bit 0
-// set to 0 for write, 1 for read (as per I2C protocol)
-// The address will vary depending on your wiring:
-// 00 <-> GND
-// 01 <-> SCL
-// 10 <-> SDA
-// 11 <-> VCC
-// ADDR1 represents A1:A0 of the 7-bit address.
-// ADDR2 represents A3:A2 of the 7-bit address.
-// The result is: 0b101(ADDR2)(ADDR1)
+#define DRIVER_ADDR_1 IS31FL3733_I2C_ADDRESS_GND_GND
+#define DRIVER_ADDR_2 IS31FL3733_I2C_ADDRESS_GND_VCC
-#define DRIVER_ADDR_1 0b1010000
-#define DRIVER_ADDR_2 0b1010011
-
-#define DRIVER_COUNT 2
+#define IS31FL3733_DRIVER_COUNT 2
#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
/* I2C Alternate function settings */
diff --git a/keyboards/durgod/dgk6x/galaxy/galaxy.c b/keyboards/durgod/dgk6x/galaxy/galaxy.c
index 9d0d25f823..aa903c3a0a 100644
--- a/keyboards/durgod/dgk6x/galaxy/galaxy.c
+++ b/keyboards/durgod/dgk6x/galaxy/galaxy.c
@@ -18,7 +18,7 @@
#ifdef RGB_MATRIX_ENABLE
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3733_led_t PROGMEM g_is31fl3733_leds[RGB_MATRIX_LED_COUNT] = {
/* Refer to IS31 manual for these locations
* driver
* | R location
diff --git a/keyboards/durgod/dgk6x/hades_ansi/hades_ansi.c b/keyboards/durgod/dgk6x/hades_ansi/hades_ansi.c
index fb54c95667..2d1907f4db 100644
--- a/keyboards/durgod/dgk6x/hades_ansi/hades_ansi.c
+++ b/keyboards/durgod/dgk6x/hades_ansi/hades_ansi.c
@@ -19,7 +19,7 @@
#ifdef RGB_MATRIX_ENABLE
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3733_led_t PROGMEM g_is31fl3733_leds[RGB_MATRIX_LED_COUNT] = {
/* Refer to IS31 manual for these locations
* driver
* | R location
diff --git a/keyboards/durgod/dgk6x/hades_iso/hades_iso.c b/keyboards/durgod/dgk6x/hades_iso/hades_iso.c
index 5f7a724aea..42f43645f5 100644
--- a/keyboards/durgod/dgk6x/hades_iso/hades_iso.c
+++ b/keyboards/durgod/dgk6x/hades_iso/hades_iso.c
@@ -19,7 +19,7 @@
#ifdef RGB_MATRIX_ENABLE
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3733_led_t PROGMEM g_is31fl3733_leds[RGB_MATRIX_LED_COUNT] = {
/* Refer to IS31 manual for these locations
* driver
* | R location
diff --git a/keyboards/durgod/dgk6x/venus/venus.c b/keyboards/durgod/dgk6x/venus/venus.c
index 8c5ba712b1..d48e95fb21 100644
--- a/keyboards/durgod/dgk6x/venus/venus.c
+++ b/keyboards/durgod/dgk6x/venus/venus.c
@@ -18,7 +18,7 @@
#ifdef RGB_MATRIX_ENABLE
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3733_led_t PROGMEM g_is31fl3733_leds[RGB_MATRIX_LED_COUNT] = {
/* Refer to IS31 manual for these locations
* driver
* | R location
diff --git a/keyboards/dyz/dyz60/config.h b/keyboards/dyz/dyz60/config.h
deleted file mode 100644
index 7e7ca8b694..0000000000
--- a/keyboards/dyz/dyz60/config.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
-Copyright 2021 dayatz
-
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General 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 DYNAMIC_KEYMAP_LAYER_COUNT 3
diff --git a/keyboards/dyz/dyz60_hs/config.h b/keyboards/dyz/dyz60_hs/config.h
deleted file mode 100644
index 7e7ca8b694..0000000000
--- a/keyboards/dyz/dyz60_hs/config.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
-Copyright 2021 dayatz
-
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General 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 DYNAMIC_KEYMAP_LAYER_COUNT 3
diff --git a/keyboards/dyz/selka40/config.h b/keyboards/dyz/selka40/config.h
deleted file mode 100644
index 7e7ca8b694..0000000000
--- a/keyboards/dyz/selka40/config.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
-Copyright 2021 dayatz
-
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General 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 DYNAMIC_KEYMAP_LAYER_COUNT 3
diff --git a/keyboards/dyz/synthesis60/config.h b/keyboards/dyz/synthesis60/config.h
deleted file mode 100644
index d70ad316b6..0000000000
--- a/keyboards/dyz/synthesis60/config.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
-Copyright 2022 dayatz
-
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General 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 DYNAMIC_KEYMAP_LAYER_COUNT 3
diff --git a/keyboards/dztech/dz60rgb/dz60rgb.c b/keyboards/dztech/dz60rgb/dz60rgb.c
index 811dd0cd91..826e3502eb 100644
--- a/keyboards/dztech/dz60rgb/dz60rgb.c
+++ b/keyboards/dztech/dz60rgb/dz60rgb.c
@@ -1,7 +1,7 @@
#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3733_led_t PROGMEM g_is31fl3733_leds[RGB_MATRIX_LED_COUNT] = {
{ 0, K_14, J_14, L_14 },
{ 0, K_13, J_13, L_13 },
{ 0, K_12, J_12, L_12 },
diff --git a/keyboards/dztech/dz60rgb/v1/config.h b/keyboards/dztech/dz60rgb/v1/config.h
index 82d7b6d1e1..52ae406b98 100644
--- a/keyboards/dztech/dz60rgb/v1/config.h
+++ b/keyboards/dztech/dz60rgb/v1/config.h
@@ -55,7 +55,7 @@
// # define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
# define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_CYCLE_ALL
-# define DRIVER_ADDR_1 0b1010000
-# define DRIVER_COUNT 1
+# define DRIVER_ADDR_1 IS31FL3733_I2C_ADDRESS_GND_GND
+# define IS31FL3733_DRIVER_COUNT 1
# define RGB_MATRIX_LED_COUNT 63
#endif
diff --git a/keyboards/dztech/dz60rgb/v2/config.h b/keyboards/dztech/dz60rgb/v2/config.h
index 094478f34d..733e8f4966 100644
--- a/keyboards/dztech/dz60rgb/v2/config.h
+++ b/keyboards/dztech/dz60rgb/v2/config.h
@@ -53,7 +53,7 @@
// # define ENABLE_RGB_MATRIX_SOLID_SPLASH
// # define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
-# define DRIVER_ADDR_1 0b1010000
-# define DRIVER_COUNT 1
+# define DRIVER_ADDR_1 IS31FL3733_I2C_ADDRESS_GND_GND
+# define IS31FL3733_DRIVER_COUNT 1
# define RGB_MATRIX_LED_COUNT 63
#endif
diff --git a/keyboards/dztech/dz60rgb/v2_1/config.h b/keyboards/dztech/dz60rgb/v2_1/config.h
index a753832ed1..406b1141af 100644
--- a/keyboards/dztech/dz60rgb/v2_1/config.h
+++ b/keyboards/dztech/dz60rgb/v2_1/config.h
@@ -69,7 +69,7 @@
// # define ENABLE_RGB_MATRIX_SOLID_SPLASH
// # define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
-# define DRIVER_ADDR_1 0b1010000
-# define DRIVER_COUNT 1
+# define DRIVER_ADDR_1 IS31FL3733_I2C_ADDRESS_GND_GND
+# define IS31FL3733_DRIVER_COUNT 1
# define RGB_MATRIX_LED_COUNT 63
#endif
diff --git a/keyboards/dztech/dz60rgb_ansi/dz60rgb_ansi.c b/keyboards/dztech/dz60rgb_ansi/dz60rgb_ansi.c
index b607a58a4e..5c06922028 100644
--- a/keyboards/dztech/dz60rgb_ansi/dz60rgb_ansi.c
+++ b/keyboards/dztech/dz60rgb_ansi/dz60rgb_ansi.c
@@ -1,7 +1,7 @@
#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3733_led_t PROGMEM g_is31fl3733_leds[RGB_MATRIX_LED_COUNT] = {
{ 0, K_14, J_14, L_14 },
{ 0, K_13, J_13, L_13 },
{ 0, K_12, J_12, L_12 },
diff --git a/keyboards/dztech/dz60rgb_ansi/v1/config.h b/keyboards/dztech/dz60rgb_ansi/v1/config.h
index 5405d671a5..59a680615f 100644
--- a/keyboards/dztech/dz60rgb_ansi/v1/config.h
+++ b/keyboards/dztech/dz60rgb_ansi/v1/config.h
@@ -55,7 +55,7 @@
// # define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
# define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_CYCLE_ALL
-# define DRIVER_ADDR_1 0b1010000
-# define DRIVER_COUNT 1
+# define DRIVER_ADDR_1 IS31FL3733_I2C_ADDRESS_GND_GND
+# define IS31FL3733_DRIVER_COUNT 1
# define RGB_MATRIX_LED_COUNT 61
#endif
diff --git a/keyboards/dztech/dz60rgb_ansi/v2/config.h b/keyboards/dztech/dz60rgb_ansi/v2/config.h
index 545aa64eea..819b98e36a 100644
--- a/keyboards/dztech/dz60rgb_ansi/v2/config.h
+++ b/keyboards/dztech/dz60rgb_ansi/v2/config.h
@@ -53,7 +53,7 @@
# define ENABLE_RGB_MATRIX_SOLID_SPLASH
// # define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
-# define DRIVER_ADDR_1 0b1010000
-# define DRIVER_COUNT 1
+# define DRIVER_ADDR_1 IS31FL3733_I2C_ADDRESS_GND_GND
+# define IS31FL3733_DRIVER_COUNT 1
# define RGB_MATRIX_LED_COUNT 61
#endif
diff --git a/keyboards/dztech/dz60rgb_ansi/v2_1/config.h b/keyboards/dztech/dz60rgb_ansi/v2_1/config.h
index 90b6c71e67..a186cd82c3 100644
--- a/keyboards/dztech/dz60rgb_ansi/v2_1/config.h
+++ b/keyboards/dztech/dz60rgb_ansi/v2_1/config.h
@@ -69,7 +69,7 @@
// # define ENABLE_RGB_MATRIX_SOLID_SPLASH
// # define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
-# define DRIVER_ADDR_1 0b1010000
-# define DRIVER_COUNT 1
+# define DRIVER_ADDR_1 IS31FL3733_I2C_ADDRESS_GND_GND
+# define IS31FL3733_DRIVER_COUNT 1
# define RGB_MATRIX_LED_COUNT 61
#endif
diff --git a/keyboards/dztech/dz60rgb_wkl/dz60rgb_wkl.c b/keyboards/dztech/dz60rgb_wkl/dz60rgb_wkl.c
index 5a55bacefc..d6506389a6 100644
--- a/keyboards/dztech/dz60rgb_wkl/dz60rgb_wkl.c
+++ b/keyboards/dztech/dz60rgb_wkl/dz60rgb_wkl.c
@@ -1,7 +1,7 @@
#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3733_led_t PROGMEM g_is31fl3733_leds[RGB_MATRIX_LED_COUNT] = {
{ 0, H_15, G_15, I_15 },
{ 0, K_14, J_14, L_14 },
{ 0, K_13, J_13, L_13 },
diff --git a/keyboards/dztech/dz60rgb_wkl/v1/config.h b/keyboards/dztech/dz60rgb_wkl/v1/config.h
index cfe82a7323..850ecae481 100644
--- a/keyboards/dztech/dz60rgb_wkl/v1/config.h
+++ b/keyboards/dztech/dz60rgb_wkl/v1/config.h
@@ -55,7 +55,7 @@
// # define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
# define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_CYCLE_ALL
-# define DRIVER_ADDR_1 0b1010000
-# define DRIVER_COUNT 1
+# define DRIVER_ADDR_1 IS31FL3733_I2C_ADDRESS_GND_GND
+# define IS31FL3733_DRIVER_COUNT 1
# define RGB_MATRIX_LED_COUNT 62
#endif
diff --git a/keyboards/dztech/dz60rgb_wkl/v2/config.h b/keyboards/dztech/dz60rgb_wkl/v2/config.h
index 38a1aa2c76..1496a0cbe8 100644
--- a/keyboards/dztech/dz60rgb_wkl/v2/config.h
+++ b/keyboards/dztech/dz60rgb_wkl/v2/config.h
@@ -50,7 +50,7 @@
# define ENABLE_RGB_MATRIX_SOLID_SPLASH
// # define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
-# define DRIVER_ADDR_1 0b1010000
-# define DRIVER_COUNT 1
+# define DRIVER_ADDR_1 IS31FL3733_I2C_ADDRESS_GND_GND
+# define IS31FL3733_DRIVER_COUNT 1
# define RGB_MATRIX_LED_COUNT 62
#endif
diff --git a/keyboards/dztech/dz60rgb_wkl/v2_1/config.h b/keyboards/dztech/dz60rgb_wkl/v2_1/config.h
index 5bcfb21cf7..1c036310dc 100644
--- a/keyboards/dztech/dz60rgb_wkl/v2_1/config.h
+++ b/keyboards/dztech/dz60rgb_wkl/v2_1/config.h
@@ -69,7 +69,7 @@
# define ENABLE_RGB_MATRIX_SOLID_SPLASH
// # define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
-# define DRIVER_ADDR_1 0b1010000
-# define DRIVER_COUNT 1
+# define DRIVER_ADDR_1 IS31FL3733_I2C_ADDRESS_GND_GND
+# define IS31FL3733_DRIVER_COUNT 1
# define RGB_MATRIX_LED_COUNT 62
#endif
diff --git a/keyboards/dztech/dz64rgb/config.h b/keyboards/dztech/dz64rgb/config.h
index 43e1b1c609..f7dd035eb8 100644
--- a/keyboards/dztech/dz64rgb/config.h
+++ b/keyboards/dztech/dz64rgb/config.h
@@ -48,8 +48,8 @@
#define ENABLE_RGB_MATRIX_PIXEL_FRACTAL
#define ENABLE_RGB_MATRIX_TYPING_HEATMAP
#define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_CYCLE_ALL
-#define DRIVER_ADDR_1 0b1010000
-#define DRIVER_COUNT 1
+#define DRIVER_ADDR_1 IS31FL3733_I2C_ADDRESS_GND_GND
+#define IS31FL3733_DRIVER_COUNT 1
#define RGB_MATRIX_LED_COUNT 64
#endif
#define VIA_EEPROM_LAYOUT_OPTIONS_SIZE 2
diff --git a/keyboards/dztech/dz64rgb/dz64rgb.c b/keyboards/dztech/dz64rgb/dz64rgb.c
index 5fa08a3ee8..561a9727e5 100644
--- a/keyboards/dztech/dz64rgb/dz64rgb.c
+++ b/keyboards/dztech/dz64rgb/dz64rgb.c
@@ -17,7 +17,7 @@
#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3733_led_t PROGMEM g_is31fl3733_leds[RGB_MATRIX_LED_COUNT] = {
{ 0, K_14, J_14, L_14 },
{ 0, K_13, J_13, L_13 },
{ 0, K_12, J_12, L_12 },
diff --git a/keyboards/dztech/dz65rgb/v1/config.h b/keyboards/dztech/dz65rgb/v1/config.h
index 4a84498975..ac462043ac 100644
--- a/keyboards/dztech/dz65rgb/v1/config.h
+++ b/keyboards/dztech/dz65rgb/v1/config.h
@@ -70,9 +70,9 @@
// # define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200
# define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_CYCLE_ALL
-# define DRIVER_ADDR_1 0b1110100
-# define DRIVER_ADDR_2 0b1110111
-# define DRIVER_COUNT 2
+# define DRIVER_ADDR_1 IS31FL3731_I2C_ADDRESS_GND
+# define DRIVER_ADDR_2 IS31FL3731_I2C_ADDRESS_VCC
+# define IS31FL3731_DRIVER_COUNT 2
# define DRIVER_1_LED_TOTAL 35
# define DRIVER_2_LED_TOTAL 33
# define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
diff --git a/keyboards/dztech/dz65rgb/v1/v1.c b/keyboards/dztech/dz65rgb/v1/v1.c
index a3b7bdfb5b..a0a355e120 100644
--- a/keyboards/dztech/dz65rgb/v1/v1.c
+++ b/keyboards/dztech/dz65rgb/v1/v1.c
@@ -16,7 +16,7 @@
#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3731_led_t PROGMEM g_is31fl3731_leds[RGB_MATRIX_LED_COUNT] = {
{ 0, C8_8, C7_8, C6_8 },
{ 0, C9_8, C7_7, C6_7 },
{ 0, C9_7, C8_7, C6_6 },
diff --git a/keyboards/dztech/dz65rgb/v2/config.h b/keyboards/dztech/dz65rgb/v2/config.h
index 04700c84ed..2c849c9691 100644
--- a/keyboards/dztech/dz65rgb/v2/config.h
+++ b/keyboards/dztech/dz65rgb/v2/config.h
@@ -70,9 +70,9 @@
// # define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200
# define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_CYCLE_ALL
-# define DRIVER_ADDR_1 0b1110100
-# define DRIVER_ADDR_2 0b1110111
-# define DRIVER_COUNT 2
+# define DRIVER_ADDR_1 IS31FL3731_I2C_ADDRESS_GND
+# define DRIVER_ADDR_2 IS31FL3731_I2C_ADDRESS_VCC
+# define IS31FL3731_DRIVER_COUNT 2
# define DRIVER_1_LED_TOTAL 35
# define DRIVER_2_LED_TOTAL 33
# define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
diff --git a/keyboards/dztech/dz65rgb/v2/v2.c b/keyboards/dztech/dz65rgb/v2/v2.c
index 31599ad4b8..7754bc4ee5 100644
--- a/keyboards/dztech/dz65rgb/v2/v2.c
+++ b/keyboards/dztech/dz65rgb/v2/v2.c
@@ -16,7 +16,7 @@
#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3731_led_t PROGMEM g_is31fl3731_leds[RGB_MATRIX_LED_COUNT] = {
{ 0, C8_8, C7_8, C6_8 },
{ 0, C9_8, C7_7, C6_7 },
{ 0, C9_7, C8_7, C6_6 },
diff --git a/keyboards/dztech/dz65rgb/v3/config.h b/keyboards/dztech/dz65rgb/v3/config.h
index 421ae8277c..f99315e0ed 100755
--- a/keyboards/dztech/dz65rgb/v3/config.h
+++ b/keyboards/dztech/dz65rgb/v3/config.h
@@ -72,8 +72,8 @@
# define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
# define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_CYCLE_ALL
-# define DRIVER_ADDR_1 0b0110000
-# define DRIVER_COUNT 1
+# define DRIVER_ADDR_1 IS31FL3741_I2C_ADDRESS_GND
+# define IS31FL3741_DRIVER_COUNT 1
# define RGB_MATRIX_LED_COUNT 68
# define DRIVER_INDICATOR_LED_TOTAL 0
#endif
diff --git a/keyboards/dztech/dz65rgb/v3/v3.c b/keyboards/dztech/dz65rgb/v3/v3.c
index ceb5c30f3e..0fb8ba49de 100755
--- a/keyboards/dztech/dz65rgb/v3/v3.c
+++ b/keyboards/dztech/dz65rgb/v3/v3.c
@@ -18,7 +18,7 @@
#ifdef RGB_MATRIX_ENABLE
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3741_led_t PROGMEM g_is31fl3741_leds[RGB_MATRIX_LED_COUNT] = {
{0, CS21_SW1, CS20_SW1, CS19_SW1},
{0, CS21_SW2, CS20_SW2, CS19_SW2},
{0, CS21_SW3, CS20_SW3, CS19_SW3},
diff --git a/keyboards/dztech/og60/info.json b/keyboards/dztech/og60/info.json
deleted file mode 100644
index 52c4e0b189..0000000000
--- a/keyboards/dztech/og60/info.json
+++ /dev/null
@@ -1,448 +0,0 @@
-{
- "manufacturer": "KBDFans",
- "keyboard_name": "Og60",
- "maintainer": "moyi4681",
- "bootloader": "rp2040",
- "diode_direction": "COL2ROW",
- "features": {
- "bootmagic": true,
- "command": false,
- "console": false,
- "extrakey": true,
- "mousekey": true,
- "nkro": true
- },
- "indicators": {
- "caps_lock": "GP28"
- },
- "matrix_pins": {
- "cols": ["GP2", "GP9", "GP10", "GP11", "GP12", "GP13", "GP14", "GP15", "GP18", "GP19", "GP20", "GP21", "GP22", "GP23"],
- "rows": ["GP4", "GP3", "GP17", "GP24", "GP25"]
- },
- "processor": "RP2040",
- "usb": {
- "device_version": "0.0.1",
- "pid": "0x6071",
- "vid": "0x4B42"
- },
- "community_layouts": ["60_ansi", "60_hhkb", "60_iso", "60_ansi_tsangan", "60_tsangan_hhkb"],
- "layouts": {
- "LAYOUT_60_ansi": {
- "layout": [
- {"label": "~", "matrix": [0, 0], "x": 0, "y": 0},
- {"label": "!", "matrix": [0, 1], "x": 1, "y": 0},
- {"label": "@", "matrix": [0, 2], "x": 2, "y": 0},
- {"label": "#", "matrix": [0, 3], "x": 3, "y": 0},
- {"label": "$", "matrix": [0, 4], "x": 4, "y": 0},
- {"label": "%", "matrix": [0, 5], "x": 5, "y": 0},
- {"label": "^", "matrix": [0, 6], "x": 6, "y": 0},
- {"label": "&", "matrix": [0, 7], "x": 7, "y": 0},
- {"label": "*", "matrix": [0, 8], "x": 8, "y": 0},
- {"label": "(", "matrix": [0, 9], "x": 9, "y": 0},
- {"label": ")", "matrix": [0, 10], "x": 10, "y": 0},
- {"label": "_", "matrix": [0, 11], "x": 11, "y": 0},
- {"label": "+", "matrix": [0, 12], "x": 12, "y": 0},
- {"label": "Backspace", "matrix": [0, 13], "x": 13, "y": 0, "w": 2},
-
- {"label": "Tab", "matrix": [1, 0], "x": 0, "y": 1, "w": 1.5},
- {"label": "Q", "matrix": [1, 1], "x": 1.5, "y": 1},
- {"label": "W", "matrix": [1, 2], "x": 2.5, "y": 1},
- {"label": "E", "matrix": [1, 3], "x": 3.5, "y": 1},
- {"label": "R", "matrix": [1, 4], "x": 4.5, "y": 1},
- {"label": "T", "matrix": [1, 5], "x": 5.5, "y": 1},
- {"label": "Y", "matrix": [1, 6], "x": 6.5, "y": 1},
- {"label": "U", "matrix": [1, 7], "x": 7.5, "y": 1},
- {"label": "I", "matrix": [1, 8], "x": 8.5, "y": 1},
- {"label": "O", "matrix": [1, 9], "x": 9.5, "y": 1},
- {"label": "P", "matrix": [1, 10], "x": 10.5, "y": 1},
- {"label": "{", "matrix": [1, 11], "x": 11.5, "y": 1},
- {"label": "}", "matrix": [1, 12], "x": 12.5, "y": 1},
- {"label": "|", "matrix": [1, 13], "x": 13.5, "y": 1, "w": 1.5},
-
- {"label": "Caps Lock", "matrix": [2, 0], "x": 0, "y": 2, "w": 1.75},
- {"label": "A", "matrix": [2, 1], "x": 1.75, "y": 2},
- {"label": "S", "matrix": [2, 2], "x": 2.75, "y": 2},
- {"label": "D", "matrix": [2, 3], "x": 3.75, "y": 2},
- {"label": "F", "matrix": [2, 4], "x": 4.75, "y": 2},
- {"label": "G", "matrix": [2, 5], "x": 5.75, "y": 2},
- {"label": "H", "matrix": [2, 6], "x": 6.75, "y": 2},
- {"label": "J", "matrix": [2, 7], "x": 7.75, "y": 2},
- {"label": "K", "matrix": [2, 8], "x": 8.75, "y": 2},
- {"label": "L", "matrix": [2, 9], "x": 9.75, "y": 2},
- {"label": ":", "matrix": [2, 10], "x": 10.75, "y": 2},
- {"label": "\"", "matrix": [2, 11], "x": 11.75, "y": 2},
- {"label": "Enter", "matrix": [2, 13], "x": 12.75, "y": 2, "w": 2.25},
-
- {"label": "Shift", "matrix": [3, 0], "x": 0, "y": 3, "w": 2.25},
- {"label": "Z", "matrix": [3, 2], "x": 2.25, "y": 3},
- {"label": "X", "matrix": [3, 3], "x": 3.25, "y": 3},
- {"label": "C", "matrix": [3, 4], "x": 4.25, "y": 3},
- {"label": "V", "matrix": [3, 5], "x": 5.25, "y": 3},
- {"label": "B", "matrix": [3, 6], "x": 6.25, "y": 3},
- {"label": "N", "matrix": [3, 7], "x": 7.25, "y": 3},
- {"label": "M", "matrix": [3, 8], "x": 8.25, "y": 3},
- {"label": "<", "matrix": [3, 9], "x": 9.25, "y": 3},
- {"label": ">", "matrix": [3, 10], "x": 10.25, "y": 3},
- {"label": "?", "matrix": [3, 11], "x": 11.25, "y": 3},
- {"label": "Shift", "matrix": [3, 12], "x": 12.25, "y": 3, "w": 2.75},
-
- {"label": "Ctrl", "matrix": [4, 0], "x": 0, "y": 4, "w": 1.25},
- {"label": "Win", "matrix": [4, 1], "x": 1.25, "y": 4, "w": 1.25},
- {"label": "Alt", "matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.25},
- {"label": "K47", "matrix": [4, 7], "x": 3.75, "y": 4, "w": 6.25},
- {"label": "Alt", "matrix": [4, 10], "x": 10, "y": 4, "w": 1.25},
- {"label": "Win", "matrix": [4, 11], "x": 11.25, "y": 4, "w": 1.25},
- {"label": "Menu", "matrix": [4, 12], "x": 12.5, "y": 4, "w": 1.25},
- {"label": "Ctrl", "matrix": [4, 13], "x": 13.75, "y": 4, "w": 1.25}
- ]
- },
- "LAYOUT_60_hhkb": {
- "layout": [
- {"label": "~", "matrix": [0, 0], "x": 0, "y": 0},
- {"label": "!", "matrix": [0, 1], "x": 1, "y": 0},
- {"label": "@", "matrix": [0, 2], "x": 2, "y": 0},
- {"label": "#", "matrix": [0, 3], "x": 3, "y": 0},
- {"label": "$", "matrix": [0, 4], "x": 4, "y": 0},
- {"label": "%", "matrix": [0, 5], "x": 5, "y": 0},
- {"label": "^", "matrix": [0, 6], "x": 6, "y": 0},
- {"label": "&", "matrix": [0, 7], "x": 7, "y": 0},
- {"label": "*", "matrix": [0, 8], "x": 8, "y": 0},
- {"label": "(", "matrix": [0, 9], "x": 9, "y": 0},
- {"label": ")", "matrix": [0, 10], "x": 10, "y": 0},
- {"label": "_", "matrix": [0, 11], "x": 11, "y": 0},
- {"label": "+", "matrix": [0, 12], "x": 12, "y": 0},
- {"label": "Del", "matrix": [0, 13], "x": 13, "y": 0},
- {"label": "Backspace", "matrix": [2, 12], "x": 14, "y": 0},
-
- {"label": "Tab", "matrix": [1, 0], "x": 0, "y": 1, "w": 1.5},
- {"label": "Q", "matrix": [1, 1], "x": 1.5, "y": 1},
- {"label": "W", "matrix": [1, 2], "x": 2.5, "y": 1},
- {"label": "E", "matrix": [1, 3], "x": 3.5, "y": 1},
- {"label": "R", "matrix": [1, 4], "x": 4.5, "y": 1},
- {"label": "T", "matrix": [1, 5], "x": 5.5, "y": 1},
- {"label": "Y", "matrix": [1, 6], "x": 6.5, "y": 1},
- {"label": "U", "matrix": [1, 7], "x": 7.5, "y": 1},
- {"label": "I", "matrix": [1, 8], "x": 8.5, "y": 1},
- {"label": "O", "matrix": [1, 9], "x": 9.5, "y": 1},
- {"label": "P", "matrix": [1, 10], "x": 10.5, "y": 1},
- {"label": "{", "matrix": [1, 11], "x": 11.5, "y": 1},
- {"label": "}", "matrix": [1, 12], "x": 12.5, "y": 1},
- {"label": "|", "matrix": [1, 13], "x": 13.5, "y": 1, "w": 1.5},
-
- {"label": "Caps Lock", "matrix": [2, 0], "x": 0, "y": 2, "w": 1.75},
- {"label": "A", "matrix": [2, 1], "x": 1.75, "y": 2},
- {"label": "S", "matrix": [2, 2], "x": 2.75, "y": 2},
- {"label": "D", "matrix": [2, 3], "x": 3.75, "y": 2},
- {"label": "F", "matrix": [2, 4], "x": 4.75, "y": 2},
- {"label": "G", "matrix": [2, 5], "x": 5.75, "y": 2},
- {"label": "H", "matrix": [2, 6], "x": 6.75, "y": 2},
- {"label": "J", "matrix": [2, 7], "x": 7.75, "y": 2},
- {"label": "K", "matrix": [2, 8], "x": 8.75, "y": 2},
- {"label": "L", "matrix": [2, 9], "x": 9.75, "y": 2},
- {"label": ":", "matrix": [2, 10], "x": 10.75, "y": 2},
- {"label": "\"", "matrix": [2, 11], "x": 11.75, "y": 2},
- {"label": "Enter", "matrix": [2, 13], "x": 12.75, "y": 2, "w": 2.25},
-
- {"label": "Shift", "matrix": [3, 0], "x": 0, "y": 3, "w": 2.25},
- {"label": "Z", "matrix": [3, 2], "x": 2.25, "y": 3},
- {"label": "X", "matrix": [3, 3], "x": 3.25, "y": 3},
- {"label": "C", "matrix": [3, 4], "x": 4.25, "y": 3},
- {"label": "V", "matrix": [3, 5], "x": 5.25, "y": 3},
- {"label": "B", "matrix": [3, 6], "x": 6.25, "y": 3},
- {"label": "N", "matrix": [3, 7], "x": 7.25, "y": 3},
- {"label": "M", "matrix": [3, 8], "x": 8.25, "y": 3},
- {"label": "<", "matrix": [3, 9], "x": 9.25, "y": 3},
- {"label": ">", "matrix": [3, 10], "x": 10.25, "y": 3},
- {"label": "?", "matrix": [3, 11], "x": 11.25, "y": 3},
- {"label": "Shift", "matrix": [3, 12], "x": 12.25, "y": 3, "w": 1.75},
- {"label": "Fn", "matrix": [3, 13], "x": 14, "y": 3},
- {"label": "Ctrl", "matrix": [4, 1], "x": 1.5, "y": 4},
- {"label": "Alt", "matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.5},
- {"label": "K47", "matrix": [4, 7], "x": 4, "y": 4, "w": 7},
- {"label": "Alt", "matrix": [4, 11], "x": 11, "y": 4, "w": 1.5},
- {"label": "Ctrl", "matrix": [4, 12], "x": 12.5, "y": 4}
- ]
- },
- "LAYOUT_60_iso": {
- "layout": [
- {"label": "~", "matrix": [0, 0], "x": 0, "y": 0},
- {"label": "!", "matrix": [0, 1], "x": 1, "y": 0},
- {"label": "@", "matrix": [0, 2], "x": 2, "y": 0},
- {"label": "#", "matrix": [0, 3], "x": 3, "y": 0},
- {"label": "$", "matrix": [0, 4], "x": 4, "y": 0},
- {"label": "%", "matrix": [0, 5], "x": 5, "y": 0},
- {"label": "^", "matrix": [0, 6], "x": 6, "y": 0},
- {"label": "&", "matrix": [0, 7], "x": 7, "y": 0},
- {"label": "*", "matrix": [0, 8], "x": 8, "y": 0},
- {"label": "(", "matrix": [0, 9], "x": 9, "y": 0},
- {"label": ")", "matrix": [0, 10], "x": 10, "y": 0},
- {"label": "_", "matrix": [0, 11], "x": 11, "y": 0},
- {"label": "+", "matrix": [0, 12], "x": 12, "y": 0},
- {"label": "Backspace", "matrix": [0, 13], "x": 13, "y": 0, "w": 2},
-
- {"label": "Tab", "matrix": [1, 0], "x": 0, "y": 1, "w": 1.5},
- {"label": "Q", "matrix": [1, 1], "x": 1.5, "y": 1},
- {"label": "W", "matrix": [1, 2], "x": 2.5, "y": 1},
- {"label": "E", "matrix": [1, 3], "x": 3.5, "y": 1},
- {"label": "R", "matrix": [1, 4], "x": 4.5, "y": 1},
- {"label": "T", "matrix": [1, 5], "x": 5.5, "y": 1},
- {"label": "Y", "matrix": [1, 6], "x": 6.5, "y": 1},
- {"label": "U", "matrix": [1, 7], "x": 7.5, "y": 1},
- {"label": "I", "matrix": [1, 8], "x": 8.5, "y": 1},
- {"label": "O", "matrix": [1, 9], "x": 9.5, "y": 1},
- {"label": "P", "matrix": [1, 10], "x": 10.5, "y": 1},
- {"label": "{", "matrix": [1, 11], "x": 11.5, "y": 1},
- {"label": "}", "matrix": [1, 12], "x": 12.5, "y": 1},
-
- {"label": "Caps Lock", "matrix": [2, 0], "x": 0, "y": 2, "w": 1.75},
- {"label": "A", "matrix": [2, 1], "x": 1.75, "y": 2},
- {"label": "S", "matrix": [2, 2], "x": 2.75, "y": 2},
- {"label": "D", "matrix": [2, 3], "x": 3.75, "y": 2},
- {"label": "F", "matrix": [2, 4], "x": 4.75, "y": 2},
- {"label": "G", "matrix": [2, 5], "x": 5.75, "y": 2},
- {"label": "H", "matrix": [2, 6], "x": 6.75, "y": 2},
- {"label": "J", "matrix": [2, 7], "x": 7.75, "y": 2},
- {"label": "K", "matrix": [2, 8], "x": 8.75, "y": 2},
- {"label": "L", "matrix": [2, 9], "x": 9.75, "y": 2},
- {"label": ":", "matrix": [2, 10], "x": 10.75, "y": 2},
- {"label": "@", "matrix": [2, 11], "x": 11.75, "y": 2},
- {"label": "~", "matrix": [1, 13], "x": 12.75, "y": 2},
- {"label": "Enter", "matrix": [2, 13], "x": 13.75, "y": 1, "w": 1.25, "h": 2},
-
- {"label": "Shift", "matrix": [3, 0], "x": 0, "y": 3, "w": 1.25},
- {"label": "|", "matrix": [3, 1], "x": 1.25, "y": 3},
- {"label": "Z", "matrix": [3, 2], "x": 2.25, "y": 3},
- {"label": "X", "matrix": [3, 3], "x": 3.25, "y": 3},
- {"label": "C", "matrix": [3, 4], "x": 4.25, "y": 3},
- {"label": "V", "matrix": [3, 5], "x": 5.25, "y": 3},
- {"label": "B", "matrix": [3, 6], "x": 6.25, "y": 3},
- {"label": "N", "matrix": [3, 7], "x": 7.25, "y": 3},
- {"label": "M", "matrix": [3, 8], "x": 8.25, "y": 3},
- {"label": "<", "matrix": [3, 9], "x": 9.25, "y": 3},
- {"label": ">", "matrix": [3, 10], "x": 10.25, "y": 3},
- {"label": "?", "matrix": [3, 11], "x": 11.25, "y": 3},
- {"label": "Shift", "matrix": [3, 12], "x": 12.25, "y": 3, "w": 2.75},
-
- {"label": "Ctrl", "matrix": [4, 0], "x": 0, "y": 4, "w": 1.25},
- {"label": "Win", "matrix": [4, 1], "x": 1.25, "y": 4, "w": 1.25},
- {"label": "Alt", "matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.25},
- {"label": "K47", "matrix": [4, 7], "x": 3.75, "y": 4, "w": 6.25},
- {"label": "AltGr", "matrix": [4, 10], "x": 10, "y": 4, "w": 1.25},
- {"label": "Win", "matrix": [4, 11], "x": 11.25, "y": 4, "w": 1.25},
- {"label": "Menu", "matrix": [4, 12], "x": 12.5, "y": 4, "w": 1.25},
- {"label": "Ctrl", "matrix": [4, 13], "x": 13.75, "y": 4, "w": 1.25}
- ]
- },
- "LAYOUT_60_ansi_tsangan": {
- "layout": [
- {"label": "~", "matrix": [0, 0], "x": 0, "y": 0},
- {"label": "!", "matrix": [0, 1], "x": 1, "y": 0},
- {"label": "@", "matrix": [0, 2], "x": 2, "y": 0},
- {"label": "#", "matrix": [0, 3], "x": 3, "y": 0},
- {"label": "$", "matrix": [0, 4], "x": 4, "y": 0},
- {"label": "%", "matrix": [0, 5], "x": 5, "y": 0},
- {"label": "^", "matrix": [0, 6], "x": 6, "y": 0},
- {"label": "&", "matrix": [0, 7], "x": 7, "y": 0},
- {"label": "*", "matrix": [0, 8], "x": 8, "y": 0},
- {"label": "(", "matrix": [0, 9], "x": 9, "y": 0},
- {"label": ")", "matrix": [0, 10], "x": 10, "y": 0},
- {"label": "_", "matrix": [0, 11], "x": 11, "y": 0},
- {"label": "+", "matrix": [0, 12], "x": 12, "y": 0},
- {"label": "Backspace", "matrix": [0, 13], "x": 13, "y": 0, "w": 2},
-
- {"label": "Tab", "matrix": [1, 0], "x": 0, "y": 1, "w": 1.5},
- {"label": "Q", "matrix": [1, 1], "x": 1.5, "y": 1},
- {"label": "W", "matrix": [1, 2], "x": 2.5, "y": 1},
- {"label": "E", "matrix": [1, 3], "x": 3.5, "y": 1},
- {"label": "R", "matrix": [1, 4], "x": 4.5, "y": 1},
- {"label": "T", "matrix": [1, 5], "x": 5.5, "y": 1},
- {"label": "Y", "matrix": [1, 6], "x": 6.5, "y": 1},
- {"label": "U", "matrix": [1, 7], "x": 7.5, "y": 1},
- {"label": "I", "matrix": [1, 8], "x": 8.5, "y": 1},
- {"label": "O", "matrix": [1, 9], "x": 9.5, "y": 1},
- {"label": "P", "matrix": [1, 10], "x": 10.5, "y": 1},
- {"label": "{", "matrix": [1, 11], "x": 11.5, "y": 1},
- {"label": "}", "matrix": [1, 12], "x": 12.5, "y": 1},
- {"label": "|", "matrix": [1, 13], "x": 13.5, "y": 1, "w": 1.5},
-
- {"label": "Caps Lock", "matrix": [2, 0], "x": 0, "y": 2, "w": 1.75},
- {"label": "A", "matrix": [2, 1], "x": 1.75, "y": 2},
- {"label": "S", "matrix": [2, 2], "x": 2.75, "y": 2},
- {"label": "D", "matrix": [2, 3], "x": 3.75, "y": 2},
- {"label": "F", "matrix": [2, 4], "x": 4.75, "y": 2},
- {"label": "G", "matrix": [2, 5], "x": 5.75, "y": 2},
- {"label": "H", "matrix": [2, 6], "x": 6.75, "y": 2},
- {"label": "J", "matrix": [2, 7], "x": 7.75, "y": 2},
- {"label": "K", "matrix": [2, 8], "x": 8.75, "y": 2},
- {"label": "L", "matrix": [2, 9], "x": 9.75, "y": 2},
- {"label": ":", "matrix": [2, 10], "x": 10.75, "y": 2},
- {"label": "\"", "matrix": [2, 11], "x": 11.75, "y": 2},
- {"label": "Enter", "matrix": [2, 13], "x": 12.75, "y": 2, "w": 2.25},
-
- {"label": "Shift", "matrix": [3, 0], "x": 0, "y": 3, "w": 2.25},
- {"label": "Z", "matrix": [3, 2], "x": 2.25, "y": 3},
- {"label": "X", "matrix": [3, 3], "x": 3.25, "y": 3},
- {"label": "C", "matrix": [3, 4], "x": 4.25, "y": 3},
- {"label": "V", "matrix": [3, 5], "x": 5.25, "y": 3},
- {"label": "B", "matrix": [3, 6], "x": 6.25, "y": 3},
- {"label": "N", "matrix": [3, 7], "x": 7.25, "y": 3},
- {"label": "M", "matrix": [3, 8], "x": 8.25, "y": 3},
- {"label": "<", "matrix": [3, 9], "x": 9.25, "y": 3},
- {"label": ">", "matrix": [3, 10], "x": 10.25, "y": 3},
- {"label": "?", "matrix": [3, 11], "x": 11.25, "y": 3},
- {"label": "Shift", "matrix": [3, 12], "x": 12.25, "y": 3, "w": 2.75},
-
- {"label": "Ctrl", "matrix": [4, 0], "x": 0, "y": 4, "w": 1.5},
- {"label": "Win", "matrix": [4, 1], "x": 1.5, "y": 4},
- {"label": "Alt", "matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.5},
- {"label": "K47", "matrix": [4, 7], "x": 4, "y": 4, "w": 7},
- {"label": "Alt", "matrix": [4, 11], "x": 11, "y": 4, "w": 1.5},
- {"label": "Win", "matrix": [4, 12], "x": 12.5, "y": 4},
- {"label": "Ctrl", "matrix": [4, 13], "x": 13.5, "y": 4, "w": 1.5}
- ]
- },
- "LAYOUT_60_tsangan_hhkb": {
- "layout": [
- {"label": "~", "matrix": [0, 0], "x": 0, "y": 0},
- {"label": "!", "matrix": [0, 1], "x": 1, "y": 0},
- {"label": "@", "matrix": [0, 2], "x": 2, "y": 0},
- {"label": "#", "matrix": [0, 3], "x": 3, "y": 0},
- {"label": "$", "matrix": [0, 4], "x": 4, "y": 0},
- {"label": "%", "matrix": [0, 5], "x": 5, "y": 0},
- {"label": "^", "matrix": [0, 6], "x": 6, "y": 0},
- {"label": "&", "matrix": [0, 7], "x": 7, "y": 0},
- {"label": "*", "matrix": [0, 8], "x": 8, "y": 0},
- {"label": "(", "matrix": [0, 9], "x": 9, "y": 0},
- {"label": ")", "matrix": [0, 10], "x": 10, "y": 0},
- {"label": "_", "matrix": [0, 11], "x": 11, "y": 0},
- {"label": "+", "matrix": [0, 12], "x": 12, "y": 0},
- {"label": "Del", "matrix": [0, 13], "x": 13, "y": 0},
- {"label": "Backspace", "matrix": [2, 12], "x": 14, "y": 0},
-
- {"label": "Tab", "matrix": [1, 0], "x": 0, "y": 1, "w": 1.5},
- {"label": "Q", "matrix": [1, 1], "x": 1.5, "y": 1},
- {"label": "W", "matrix": [1, 2], "x": 2.5, "y": 1},
- {"label": "E", "matrix": [1, 3], "x": 3.5, "y": 1},
- {"label": "R", "matrix": [1, 4], "x": 4.5, "y": 1},
- {"label": "T", "matrix": [1, 5], "x": 5.5, "y": 1},
- {"label": "Y", "matrix": [1, 6], "x": 6.5, "y": 1},
- {"label": "U", "matrix": [1, 7], "x": 7.5, "y": 1},
- {"label": "I", "matrix": [1, 8], "x": 8.5, "y": 1},
- {"label": "O", "matrix": [1, 9], "x": 9.5, "y": 1},
- {"label": "P", "matrix": [1, 10], "x": 10.5, "y": 1},
- {"label": "{", "matrix": [1, 11], "x": 11.5, "y": 1},
- {"label": "}", "matrix": [1, 12], "x": 12.5, "y": 1},
- {"label": "|", "matrix": [1, 13], "x": 13.5, "y": 1, "w": 1.5},
-
- {"label": "Caps Lock", "matrix": [2, 0], "x": 0, "y": 2, "w": 1.75},
- {"label": "A", "matrix": [2, 1], "x": 1.75, "y": 2},
- {"label": "S", "matrix": [2, 2], "x": 2.75, "y": 2},
- {"label": "D", "matrix": [2, 3], "x": 3.75, "y": 2},
- {"label": "F", "matrix": [2, 4], "x": 4.75, "y": 2},
- {"label": "G", "matrix": [2, 5], "x": 5.75, "y": 2},
- {"label": "H", "matrix": [2, 6], "x": 6.75, "y": 2},
- {"label": "J", "matrix": [2, 7], "x": 7.75, "y": 2},
- {"label": "K", "matrix": [2, 8], "x": 8.75, "y": 2},
- {"label": "L", "matrix": [2, 9], "x": 9.75, "y": 2},
- {"label": ":", "matrix": [2, 10], "x": 10.75, "y": 2},
- {"label": "\"", "matrix": [2, 11], "x": 11.75, "y": 2},
- {"label": "Enter", "matrix": [2, 13], "x": 12.75, "y": 2, "w": 2.25},
-
- {"label": "Shift", "matrix": [3, 0], "x": 0, "y": 3, "w": 2.25},
- {"label": "Z", "matrix": [3, 2], "x": 2.25, "y": 3},
- {"label": "X", "matrix": [3, 3], "x": 3.25, "y": 3},
- {"label": "C", "matrix": [3, 4], "x": 4.25, "y": 3},
- {"label": "V", "matrix": [3, 5], "x": 5.25, "y": 3},
- {"label": "B", "matrix": [3, 6], "x": 6.25, "y": 3},
- {"label": "N", "matrix": [3, 7], "x": 7.25, "y": 3},
- {"label": "M", "matrix": [3, 8], "x": 8.25, "y": 3},
- {"label": "<", "matrix": [3, 9], "x": 9.25, "y": 3},
- {"label": ">", "matrix": [3, 10], "x": 10.25, "y": 3},
- {"label": "?", "matrix": [3, 11], "x": 11.25, "y": 3},
- {"label": "Shift", "matrix": [3, 12], "x": 12.25, "y": 3, "w": 1.75},
- {"label": "Fn", "matrix": [3, 13], "x": 14, "y": 3},
-
- {"label": "Ctrl", "matrix": [4, 0], "x": 0, "y": 4, "w": 1.5},
- {"label": "Win", "matrix": [4, 1], "x": 1.5, "y": 4},
- {"label": "Alt", "matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.5},
- {"label": "K47", "matrix": [4, 7], "x": 4, "y": 4, "w": 7},
- {"label": "Alt", "matrix": [4, 11], "x": 11, "y": 4, "w": 1.5},
- {"label": "Win", "matrix": [4, 12], "x": 12.5, "y": 4},
- {"label": "Ctrl", "matrix": [4, 13], "x": 13.5, "y": 4, "w": 1.5}
- ]
- },
- "LAYOUT_all": {
- "layout": [
- {"label": "~", "matrix": [0, 0], "x": 0, "y": 0},
- {"label": "!", "matrix": [0, 1], "x": 1, "y": 0},
- {"label": "@", "matrix": [0, 2], "x": 2, "y": 0},
- {"label": "#", "matrix": [0, 3], "x": 3, "y": 0},
- {"label": "$", "matrix": [0, 4], "x": 4, "y": 0},
- {"label": "%", "matrix": [0, 5], "x": 5, "y": 0},
- {"label": "^", "matrix": [0, 6], "x": 6, "y": 0},
- {"label": "&", "matrix": [0, 7], "x": 7, "y": 0},
- {"label": "*", "matrix": [0, 8], "x": 8, "y": 0},
- {"label": "(", "matrix": [0, 9], "x": 9, "y": 0},
- {"label": ")", "matrix": [0, 10], "x": 10, "y": 0},
- {"label": "_", "matrix": [0, 11], "x": 11, "y": 0},
- {"label": "+", "matrix": [0, 12], "x": 12, "y": 0},
- {"label": "Del", "matrix": [2, 12], "x": 13, "y": 0},
- {"label": "Backspace", "matrix": [0, 13], "x": 14, "y": 0},
-
- {"label": "Tab", "matrix": [1, 0], "x": 0, "y": 1, "w": 1.5},
- {"label": "Q", "matrix": [1, 1], "x": 1.5, "y": 1},
- {"label": "W", "matrix": [1, 2], "x": 2.5, "y": 1},
- {"label": "E", "matrix": [1, 3], "x": 3.5, "y": 1},
- {"label": "R", "matrix": [1, 4], "x": 4.5, "y": 1},
- {"label": "T", "matrix": [1, 5], "x": 5.5, "y": 1},
- {"label": "Y", "matrix": [1, 6], "x": 6.5, "y": 1},
- {"label": "U", "matrix": [1, 7], "x": 7.5, "y": 1},
- {"label": "I", "matrix": [1, 8], "x": 8.5, "y": 1},
- {"label": "O", "matrix": [1, 9], "x": 9.5, "y": 1},
- {"label": "P", "matrix": [1, 10], "x": 10.5, "y": 1},
- {"label": "{", "matrix": [1, 11], "x": 11.5, "y": 1},
- {"label": "}", "matrix": [1, 12], "x": 12.5, "y": 1},
- {"label": "|", "matrix": [1, 13], "x": 13.5, "y": 1, "w": 1.5},
-
- {"label": "Caps Lock", "matrix": [2, 0], "x": 0, "y": 2, "w": 1.75},
- {"label": "A", "matrix": [2, 1], "x": 1.75, "y": 2},
- {"label": "S", "matrix": [2, 2], "x": 2.75, "y": 2},
- {"label": "D", "matrix": [2, 3], "x": 3.75, "y": 2},
- {"label": "F", "matrix": [2, 4], "x": 4.75, "y": 2},
- {"label": "G", "matrix": [2, 5], "x": 5.75, "y": 2},
- {"label": "H", "matrix": [2, 6], "x": 6.75, "y": 2},
- {"label": "J", "matrix": [2, 7], "x": 7.75, "y": 2},
- {"label": "K", "matrix": [2, 8], "x": 8.75, "y": 2},
- {"label": "L", "matrix": [2, 9], "x": 9.75, "y": 2},
- {"label": ":", "matrix": [2, 10], "x": 10.75, "y": 2},
- {"label": "\"", "matrix": [2, 11], "x": 11.75, "y": 2},
- {"label": "Enter", "matrix": [2, 13], "x": 12.75, "y": 2, "w": 2.25},
-
- {"label": "Shift", "matrix": [3, 0], "x": 0, "y": 3, "w": 1.25},
- {"label": "|", "matrix": [3, 1], "x": 1.25, "y": 3},
- {"label": "Z", "matrix": [3, 2], "x": 2.25, "y": 3},
- {"label": "X", "matrix": [3, 3], "x": 3.25, "y": 3},
- {"label": "C", "matrix": [3, 4], "x": 4.25, "y": 3},
- {"label": "V", "matrix": [3, 5], "x": 5.25, "y": 3},
- {"label": "B", "matrix": [3, 6], "x": 6.25, "y": 3},
- {"label": "N", "matrix": [3, 7], "x": 7.25, "y": 3},
- {"label": "M", "matrix": [3, 8], "x": 8.25, "y": 3},
- {"label": "<", "matrix": [3, 9], "x": 9.25, "y": 3},
- {"label": ">", "matrix": [3, 10], "x": 10.25, "y": 3},
- {"label": "?", "matrix": [3, 11], "x": 11.25, "y": 3},
- {"label": "Shift", "matrix": [3, 12], "x": 12.25, "y": 3, "w": 1.75},
- {"label": "Fn", "matrix": [3, 13], "x": 14, "y": 3},
-
- {"label": "Ctrl", "matrix": [4, 0], "x": 0, "y": 4, "w": 1.25},
- {"label": "Win", "matrix": [4, 1], "x": 1.25, "y": 4, "w": 1.25},
- {"label": "Alt", "matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.25},
- {"label": "K47", "matrix": [4, 7], "x": 3.75, "y": 4, "w": 6.25},
- {"label": "Alt", "matrix": [4, 10], "x": 10, "y": 4, "w": 1.25},
- {"label": "Win", "matrix": [4, 11], "x": 11.25, "y": 4, "w": 1.25},
- {"label": "Menu", "matrix": [4, 12], "x": 12.5, "y": 4, "w": 1.25},
- {"label": "Ctrl", "matrix": [4, 13], "x": 13.75, "y": 4, "w": 1.25}
- ]
- }
- }
-}
-
diff --git a/keyboards/dztech/tofu/ii/v1/config.h b/keyboards/dztech/tofu/ii/v1/config.h
index 67a4c757af..e416297239 100644
--- a/keyboards/dztech/tofu/ii/v1/config.h
+++ b/keyboards/dztech/tofu/ii/v1/config.h
@@ -79,9 +79,9 @@
# define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 180 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255
# define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_CYCLE_ALL
-# define DRIVER_ADDR_1 0b1010000
-# define DRIVER_ADDR_2 0b1011111
-# define DRIVER_COUNT 2
+# define DRIVER_ADDR_1 IS31FL3737_I2C_ADDRESS_GND
+# define DRIVER_ADDR_2 IS31FL3737_I2C_ADDRESS_VCC
+# define IS31FL3737_DRIVER_COUNT 2
# define DRIVER_1_LED_TOTAL 46
# define DRIVER_2_LED_TOTAL 20
# define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
diff --git a/keyboards/dztech/tofu/ii/v1/v1.c b/keyboards/dztech/tofu/ii/v1/v1.c
index bb15f3d4a1..8baf0235bd 100644
--- a/keyboards/dztech/tofu/ii/v1/v1.c
+++ b/keyboards/dztech/tofu/ii/v1/v1.c
@@ -17,7 +17,7 @@
#ifdef RGB_MATRIX_ENABLE
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3737_led_t PROGMEM g_is31fl3737_leds[RGB_MATRIX_LED_COUNT] = {
{ 1, K_12, J_12, L_12 },
{ 1, K_11, J_11, L_11 },
{ 1, K_10, J_10, L_10 },
diff --git a/keyboards/dztech/tofu/jr/v1/config.h b/keyboards/dztech/tofu/jr/v1/config.h
index a05cdacf79..21de51ccfc 100644
--- a/keyboards/dztech/tofu/jr/v1/config.h
+++ b/keyboards/dztech/tofu/jr/v1/config.h
@@ -79,9 +79,9 @@
# define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 180 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255
# define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_CYCLE_ALL
-# define DRIVER_ADDR_1 0b1010000
-# define DRIVER_ADDR_2 0b1011111
-# define DRIVER_COUNT 2
+# define DRIVER_ADDR_1 IS31FL3737_I2C_ADDRESS_GND
+# define DRIVER_ADDR_2 IS31FL3737_I2C_ADDRESS_VCC
+# define IS31FL3737_DRIVER_COUNT 2
# define DRIVER_1_LED_TOTAL 48
# define DRIVER_2_LED_TOTAL 20
# define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
diff --git a/keyboards/dztech/tofu/jr/readme.md b/keyboards/dztech/tofu/jr/v1/readme.md
index 579929c5d7..f17b9aea90 100644
--- a/keyboards/dztech/tofu/jr/readme.md
+++ b/keyboards/dztech/tofu/jr/v1/readme.md
@@ -1,8 +1,8 @@
-# TOFU_JR
+# TOFU_JR_V1
A customizable 65% RGB keyboard.
* Keyboard Maintainer: [moyi4681](https://github.com/moyi4681)
-* Hardware Supported: TOFU_JR
+* Hardware Supported: TOFU_JR_V1
* Hardware Availability: [KBDfans](https://kbdfans.com/)
## Bootloader mode
diff --git a/keyboards/dztech/tofu/jr/v1/v1.c b/keyboards/dztech/tofu/jr/v1/v1.c
index 4b7d7c957e..474134cb5e 100644
--- a/keyboards/dztech/tofu/jr/v1/v1.c
+++ b/keyboards/dztech/tofu/jr/v1/v1.c
@@ -18,7 +18,7 @@
#ifdef RGB_MATRIX_ENABLE
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3737_led_t PROGMEM g_is31fl3737_leds[RGB_MATRIX_LED_COUNT] = {
{ 1, K_12, J_12, L_12 },
{ 1, K_11, J_11, L_11 },
{ 1, K_10, J_10, L_10 },
diff --git a/keyboards/dztech/tofu/jr/v2/config.h b/keyboards/dztech/tofu/jr/v2/config.h
new file mode 100644
index 0000000000..935a2ab437
--- /dev/null
+++ b/keyboards/dztech/tofu/jr/v2/config.h
@@ -0,0 +1,24 @@
+/* Copyright 2023 DZTECH <moyi4681@live.cn>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#pragma once
+
+#define RGBLIGHT_DEFAULT_MODE (RGBLIGHT_EFFECT_RAINBOW_MOOD + 8)
+
+#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET
+#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 500U
+
+
diff --git a/keyboards/dztech/tofu/jr/v2/info.json b/keyboards/dztech/tofu/jr/v2/info.json
new file mode 100644
index 0000000000..6a60565b22
--- /dev/null
+++ b/keyboards/dztech/tofu/jr/v2/info.json
@@ -0,0 +1,124 @@
+{
+ "bootloader": "rp2040",
+ "processor": "RP2040",
+ "diode_direction": "COL2ROW",
+ "features": {
+ "bootmagic": true,
+ "command": false,
+ "console": false,
+ "extrakey": true,
+ "mousekey": true,
+ "nkro": true,
+ "rgblight": true
+ },
+ "matrix_pins": {
+ "cols": ["GP25", "GP24", "GP23", "GP1", "GP7", "GP21", "GP20", "GP19", "GP18", "GP17", "GP16", "GP15", "GP14", "GP13", "GP12"],
+ "rows": ["GP29", "GP28", "GP27", "GP26", "GP22"]
+ },
+ "indicators": {
+ "caps_lock": "GP11"
+ },
+ "usb": {
+ "device_version": "1.0.0",
+ "pid": "0x1425",
+ "vid": "0x445A"
+ },
+ "rgblight": {
+ "brightness_steps": 10,
+ "hue_steps": 10,
+ "led_count": 16,
+ "saturation_steps": 10,
+ "sleep": true,
+ "animations": {
+ "alternating": true,
+ "breathing": true,
+ "christmas": true,
+ "knight": true,
+ "rainbow_mood": true,
+ "rainbow_swirl": true,
+ "rgb_test": true,
+ "snake": true,
+ "static_gradient": true,
+ "twinkle": true
+ }
+ },
+ "ws2812": {
+ "pin": "GP2",
+ "driver": "vendor"
+ },
+ "community_layouts": ["65_ansi"],
+ "layouts": {
+ "LAYOUT_65_ansi": {
+ "layout": [
+ {"matrix": [0, 0], "x": 0, "y": 0},
+ {"matrix": [0, 1], "x": 1, "y": 0},
+ {"matrix": [0, 2], "x": 2, "y": 0},
+ {"matrix": [0, 3], "x": 3, "y": 0},
+ {"matrix": [0, 4], "x": 4, "y": 0},
+ {"matrix": [0, 5], "x": 5, "y": 0},
+ {"matrix": [0, 6], "x": 6, "y": 0},
+ {"matrix": [0, 7], "x": 7, "y": 0},
+ {"matrix": [0, 8], "x": 8, "y": 0},
+ {"matrix": [0, 9], "x": 9, "y": 0},
+ {"matrix": [0, 10], "x": 10, "y": 0},
+ {"matrix": [0, 11], "x": 11, "y": 0},
+ {"matrix": [0, 12], "x": 12, "y": 0},
+ {"matrix": [0, 13], "w": 2, "x": 13, "y": 0},
+ {"matrix": [0, 14], "x": 15, "y": 0},
+ {"matrix": [1, 0], "w": 1.5, "x": 0, "y": 1},
+ {"matrix": [1, 1], "x": 1.5, "y": 1},
+ {"matrix": [1, 2], "x": 2.5, "y": 1},
+ {"matrix": [1, 3], "x": 3.5, "y": 1},
+ {"matrix": [1, 4], "x": 4.5, "y": 1},
+ {"matrix": [1, 5], "x": 5.5, "y": 1},
+ {"matrix": [1, 6], "x": 6.5, "y": 1},
+ {"matrix": [1, 7], "x": 7.5, "y": 1},
+ {"matrix": [1, 8], "x": 8.5, "y": 1},
+ {"matrix": [1, 9], "x": 9.5, "y": 1},
+ {"matrix": [1, 10], "x": 10.5, "y": 1},
+ {"matrix": [1, 11], "x": 11.5, "y": 1},
+ {"matrix": [1, 12], "x": 12.5, "y": 1},
+ {"matrix": [1, 13], "w": 1.5, "x": 13.5, "y": 1},
+ {"matrix": [1, 14], "x": 15, "y": 1},
+ {"matrix": [2, 0], "w": 1.75, "x": 0, "y": 2},
+ {"matrix": [2, 1], "x": 1.75, "y": 2},
+ {"matrix": [2, 2], "x": 2.75, "y": 2},
+ {"matrix": [2, 3], "x": 3.75, "y": 2},
+ {"matrix": [2, 4], "x": 4.75, "y": 2},
+ {"matrix": [2, 5], "x": 5.75, "y": 2},
+ {"matrix": [2, 6], "x": 6.75, "y": 2},
+ {"matrix": [2, 7], "x": 7.75, "y": 2},
+ {"matrix": [2, 8], "x": 8.75, "y": 2},
+ {"matrix": [2, 9], "x": 9.75, "y": 2},
+ {"matrix": [2, 10], "x": 10.75, "y": 2},
+ {"matrix": [2, 11], "x": 11.75, "y": 2},
+ {"matrix": [2, 12], "w": 2.25, "x": 12.75, "y": 2},
+ {"matrix": [2, 14], "x": 15, "y": 2},
+ {"matrix": [3, 0], "w": 2.25, "x": 0, "y": 3},
+ {"matrix": [3, 1], "x": 2.25, "y": 3},
+ {"matrix": [3, 2], "x": 3.25, "y": 3},
+ {"matrix": [3, 3], "x": 4.25, "y": 3},
+ {"matrix": [3, 4], "x": 5.25, "y": 3},
+ {"matrix": [3, 5], "x": 6.25, "y": 3},
+ {"matrix": [3, 6], "x": 7.25, "y": 3},
+ {"matrix": [3, 7], "x": 8.25, "y": 3},
+ {"matrix": [3, 8], "x": 9.25, "y": 3},
+ {"matrix": [3, 9], "x": 10.25, "y": 3},
+ {"matrix": [3, 10], "x": 11.25, "y": 3},
+ {"matrix": [3, 11], "w": 1.75, "x": 12.25, "y": 3},
+ {"matrix": [3, 13], "x": 14, "y": 3},
+ {"matrix": [3, 14], "x": 15, "y": 3},
+ {"matrix": [4, 0], "w": 1.25, "x": 0, "y": 4},
+ {"matrix": [4, 1], "w": 1.25, "x": 1.25, "y": 4},
+ {"matrix": [4, 2], "w": 1.25, "x": 2.5, "y": 4},
+ {"matrix": [4, 6], "w": 6.25, "x": 3.75, "y": 4},
+ {"matrix": [4, 8], "x": 10, "y": 4},
+ {"matrix": [4, 9], "x": 11, "y": 4},
+ {"matrix": [4, 10], "x": 12, "y": 4},
+ {"matrix": [4, 12], "x": 13, "y": 4},
+ {"matrix": [4, 13], "x": 14, "y": 4},
+ {"matrix": [4, 14], "x": 15, "y": 4}
+ ]
+ }
+ }
+}
diff --git a/keyboards/dztech/tofu/jr/v2/readme.md b/keyboards/dztech/tofu/jr/v2/readme.md
new file mode 100644
index 0000000000..8523a3f32a
--- /dev/null
+++ b/keyboards/dztech/tofu/jr/v2/readme.md
@@ -0,0 +1,22 @@
+# TOFU_JR_V2
+A customizable 65% hotswap with RGB backlight keyboard.
+
+* Keyboard Maintainer: [moyi4681](https://github.com/moyi4681)
+* Hardware Supported: TOFU_JR_V2
+* Hardware Availability: [KBDfans](https://kbdfans.com/)
+
+## Bootloader mode
+
+Enter the bootloader in 3 ways:
+
+* Bootmagic reset: Hold down the left top key then plug in the USB cable.
+* Physical reset button: Double tap the reset button.
+* Keycode in layout: Press the key mapped to QK_BOOT if it is available.
+
+## Making firmware
+
+Make example for this keyboard (after setting up your build environment):
+
+ make dztech/tofu/jr/v2:default
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/dztech/tofu/jr/v2/rules.mk b/keyboards/dztech/tofu/jr/v2/rules.mk
new file mode 100644
index 0000000000..6e7633bfe0
--- /dev/null
+++ b/keyboards/dztech/tofu/jr/v2/rules.mk
@@ -0,0 +1 @@
+# This file intentionally left blank
diff --git a/keyboards/dztech/tofu60/info.json b/keyboards/dztech/tofu60/info.json
new file mode 100644
index 0000000000..57c57604d1
--- /dev/null
+++ b/keyboards/dztech/tofu60/info.json
@@ -0,0 +1,740 @@
+{
+ "manufacturer": "KBDFans",
+ "keyboard_name": "TOFU60",
+ "maintainer": "moyi4681",
+ "bootloader": "rp2040",
+ "diode_direction": "COL2ROW",
+ "features": {
+ "bootmagic": true,
+ "command": false,
+ "console": false,
+ "extrakey": true,
+ "mousekey": true,
+ "nkro": true
+ },
+ "indicators": {
+ "caps_lock": "GP28"
+ },
+ "matrix_pins": {
+ "cols": ["GP2", "GP9", "GP10", "GP11", "GP12", "GP13", "GP14", "GP15", "GP18", "GP19", "GP20", "GP21", "GP22", "GP23"],
+ "rows": ["GP4", "GP3", "GP17", "GP24", "GP25"]
+ },
+ "processor": "RP2040",
+ "usb": {
+ "device_version": "0.0.1",
+ "pid": "0x6071",
+ "vid": "0x4B42"
+ },
+ "community_layouts": [
+ "60_ansi",
+ "60_ansi_split_bs_rshift",
+ "60_ansi_tsangan",
+ "60_hhkb",
+ "60_iso",
+ "60_iso_split_bs_rshift",
+ "60_iso_tsangan",
+ "60_tsangan_hhkb"
+ ],
+ "layouts": {
+ "LAYOUT_60_ansi": {
+ "layout": [
+ { "label": "~", "matrix": [0, 0], "x": 0, "y": 0 },
+ { "label": "!", "matrix": [0, 1], "x": 1, "y": 0 },
+ { "label": "@", "matrix": [0, 2], "x": 2, "y": 0 },
+ { "label": "#", "matrix": [0, 3], "x": 3, "y": 0 },
+ { "label": "$", "matrix": [0, 4], "x": 4, "y": 0 },
+ { "label": "%", "matrix": [0, 5], "x": 5, "y": 0 },
+ { "label": "^", "matrix": [0, 6], "x": 6, "y": 0 },
+ { "label": "&", "matrix": [0, 7], "x": 7, "y": 0 },
+ { "label": "*", "matrix": [0, 8], "x": 8, "y": 0 },
+ { "label": "(", "matrix": [0, 9], "x": 9, "y": 0 },
+ { "label": ")", "matrix": [0, 10], "x": 10, "y": 0 },
+ { "label": "_", "matrix": [0, 11], "x": 11, "y": 0 },
+ { "label": "+", "matrix": [0, 12], "x": 12, "y": 0 },
+ { "label": "Backspace", "matrix": [0, 13], "x": 13, "y": 0, "w": 2 },
+
+ { "label": "Tab", "matrix": [1, 0], "x": 0, "y": 1, "w": 1.5 },
+ { "label": "Q", "matrix": [1, 1], "x": 1.5, "y": 1 },
+ { "label": "W", "matrix": [1, 2], "x": 2.5, "y": 1 },
+ { "label": "E", "matrix": [1, 3], "x": 3.5, "y": 1 },
+ { "label": "R", "matrix": [1, 4], "x": 4.5, "y": 1 },
+ { "label": "T", "matrix": [1, 5], "x": 5.5, "y": 1 },
+ { "label": "Y", "matrix": [1, 6], "x": 6.5, "y": 1 },
+ { "label": "U", "matrix": [1, 7], "x": 7.5, "y": 1 },
+ { "label": "I", "matrix": [1, 8], "x": 8.5, "y": 1 },
+ { "label": "O", "matrix": [1, 9], "x": 9.5, "y": 1 },
+ { "label": "P", "matrix": [1, 10], "x": 10.5, "y": 1 },
+ { "label": "{", "matrix": [1, 11], "x": 11.5, "y": 1 },
+ { "label": "}", "matrix": [1, 12], "x": 12.5, "y": 1 },
+ { "label": "|", "matrix": [1, 13], "x": 13.5, "y": 1, "w": 1.5 },
+
+ { "label": "Caps Lock", "matrix": [2, 0], "x": 0, "y": 2, "w": 1.75 },
+ { "label": "A", "matrix": [2, 1], "x": 1.75, "y": 2 },
+ { "label": "S", "matrix": [2, 2], "x": 2.75, "y": 2 },
+ { "label": "D", "matrix": [2, 3], "x": 3.75, "y": 2 },
+ { "label": "F", "matrix": [2, 4], "x": 4.75, "y": 2 },
+ { "label": "G", "matrix": [2, 5], "x": 5.75, "y": 2 },
+ { "label": "H", "matrix": [2, 6], "x": 6.75, "y": 2 },
+ { "label": "J", "matrix": [2, 7], "x": 7.75, "y": 2 },
+ { "label": "K", "matrix": [2, 8], "x": 8.75, "y": 2 },
+ { "label": "L", "matrix": [2, 9], "x": 9.75, "y": 2 },
+ { "label": ":", "matrix": [2, 10], "x": 10.75, "y": 2 },
+ { "label": "\"", "matrix": [2, 11], "x": 11.75, "y": 2 },
+ { "label": "Enter", "matrix": [2, 13], "x": 12.75, "y": 2, "w": 2.25 },
+
+ { "label": "Shift", "matrix": [3, 0], "x": 0, "y": 3, "w": 2.25 },
+ { "label": "Z", "matrix": [3, 2], "x": 2.25, "y": 3 },
+ { "label": "X", "matrix": [3, 3], "x": 3.25, "y": 3 },
+ { "label": "C", "matrix": [3, 4], "x": 4.25, "y": 3 },
+ { "label": "V", "matrix": [3, 5], "x": 5.25, "y": 3 },
+ { "label": "B", "matrix": [3, 6], "x": 6.25, "y": 3 },
+ { "label": "N", "matrix": [3, 7], "x": 7.25, "y": 3 },
+ { "label": "M", "matrix": [3, 8], "x": 8.25, "y": 3 },
+ { "label": "<", "matrix": [3, 9], "x": 9.25, "y": 3 },
+ { "label": ">", "matrix": [3, 10], "x": 10.25, "y": 3 },
+ { "label": "?", "matrix": [3, 11], "x": 11.25, "y": 3 },
+ { "label": "Shift", "matrix": [3, 12], "x": 12.25, "y": 3, "w": 2.75 },
+
+ { "label": "Ctrl", "matrix": [4, 0], "x": 0, "y": 4, "w": 1.25 },
+ { "label": "Win", "matrix": [4, 1], "x": 1.25, "y": 4, "w": 1.25 },
+ { "label": "Alt", "matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.25 },
+ { "label": "K47", "matrix": [4, 7], "x": 3.75, "y": 4, "w": 6.25 },
+ { "label": "Alt", "matrix": [4, 10], "x": 10, "y": 4, "w": 1.25 },
+ { "label": "Win", "matrix": [4, 11], "x": 11.25, "y": 4, "w": 1.25 },
+ { "label": "Menu", "matrix": [4, 12], "x": 12.5, "y": 4, "w": 1.25 },
+ { "label": "Ctrl", "matrix": [4, 13], "x": 13.75, "y": 4, "w": 1.25 }
+ ]
+ },
+ "LAYOUT_60_ansi_split_bs_rshift": {
+ "layout": [
+ {"label": "~", "matrix": [0, 0], "x": 0, "y": 0},
+ {"label": "!", "matrix": [0, 1], "x": 1, "y": 0},
+ {"label": "@", "matrix": [0, 2], "x": 2, "y": 0},
+ {"label": "#", "matrix": [0, 3], "x": 3, "y": 0},
+ {"label": "$", "matrix": [0, 4], "x": 4, "y": 0},
+ {"label": "%", "matrix": [0, 5], "x": 5, "y": 0},
+ {"label": "^", "matrix": [0, 6], "x": 6, "y": 0},
+ {"label": "&", "matrix": [0, 7], "x": 7, "y": 0},
+ {"label": "*", "matrix": [0, 8], "x": 8, "y": 0},
+ {"label": "(", "matrix": [0, 9], "x": 9, "y": 0},
+ {"label": ")", "matrix": [0, 10], "x": 10, "y": 0},
+ {"label": "_", "matrix": [0, 11], "x": 11, "y": 0},
+ {"label": "+", "matrix": [0, 12], "x": 12, "y": 0},
+ {"label": "Del", "matrix": [0, 13], "x": 13, "y": 0},
+ {"label": "Backspace", "matrix": [2, 12], "x": 14, "y": 0},
+
+ {"label": "Tab", "matrix": [1, 0], "x": 0, "y": 1, "w": 1.5},
+ {"label": "Q", "matrix": [1, 1], "x": 1.5, "y": 1},
+ {"label": "W", "matrix": [1, 2], "x": 2.5, "y": 1},
+ {"label": "E", "matrix": [1, 3], "x": 3.5, "y": 1},
+ {"label": "R", "matrix": [1, 4], "x": 4.5, "y": 1},
+ {"label": "T", "matrix": [1, 5], "x": 5.5, "y": 1},
+ {"label": "Y", "matrix": [1, 6], "x": 6.5, "y": 1},
+ {"label": "U", "matrix": [1, 7], "x": 7.5, "y": 1},
+ {"label": "I", "matrix": [1, 8], "x": 8.5, "y": 1},
+ {"label": "O", "matrix": [1, 9], "x": 9.5, "y": 1},
+ {"label": "P", "matrix": [1, 10], "x": 10.5, "y": 1},
+ {"label": "{", "matrix": [1, 11], "x": 11.5, "y": 1},
+ {"label": "}", "matrix": [1, 12], "x": 12.5, "y": 1},
+ {"label": "|", "matrix": [1, 13], "x": 13.5, "y": 1, "w": 1.5},
+
+ {"label": "Caps Lock", "matrix": [2, 0], "x": 0, "y": 2, "w": 1.75},
+ {"label": "A", "matrix": [2, 1], "x": 1.75, "y": 2},
+ {"label": "S", "matrix": [2, 2], "x": 2.75, "y": 2},
+ {"label": "D", "matrix": [2, 3], "x": 3.75, "y": 2},
+ {"label": "F", "matrix": [2, 4], "x": 4.75, "y": 2},
+ {"label": "G", "matrix": [2, 5], "x": 5.75, "y": 2},
+ {"label": "H", "matrix": [2, 6], "x": 6.75, "y": 2},
+ {"label": "J", "matrix": [2, 7], "x": 7.75, "y": 2},
+ {"label": "K", "matrix": [2, 8], "x": 8.75, "y": 2},
+ {"label": "L", "matrix": [2, 9], "x": 9.75, "y": 2},
+ {"label": ":", "matrix": [2, 10], "x": 10.75, "y": 2},
+ {"label": "\"", "matrix": [2, 11], "x": 11.75, "y": 2},
+ {"label": "Enter", "matrix": [2, 13], "x": 12.75, "y": 2, "w": 2.25},
+
+ {"label": "Shift", "matrix": [3, 0], "x": 0, "y": 3, "w": 2.25},
+ {"label": "Z", "matrix": [3, 2], "x": 2.25, "y": 3},
+ {"label": "X", "matrix": [3, 3], "x": 3.25, "y": 3},
+ {"label": "C", "matrix": [3, 4], "x": 4.25, "y": 3},
+ {"label": "V", "matrix": [3, 5], "x": 5.25, "y": 3},
+ {"label": "B", "matrix": [3, 6], "x": 6.25, "y": 3},
+ {"label": "N", "matrix": [3, 7], "x": 7.25, "y": 3},
+ {"label": "M", "matrix": [3, 8], "x": 8.25, "y": 3},
+ {"label": "<", "matrix": [3, 9], "x": 9.25, "y": 3},
+ {"label": ">", "matrix": [3, 10], "x": 10.25, "y": 3},
+ {"label": "?", "matrix": [3, 11], "x": 11.25, "y": 3},
+ {"label": "Shift", "matrix": [3, 12], "x": 12.25, "y": 3, "w": 1.75},
+ {"label": "Fn", "matrix": [3, 13], "x": 14, "y": 3},
+
+ {"label": "Ctrl", "matrix": [4, 0], "x": 0, "y": 4, "w": 1.25},
+ {"label": "Win", "matrix": [4, 1], "x": 1.25, "y": 4, "w": 1.25},
+ {"label": "Alt", "matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.25},
+ {"label": "K47", "matrix": [4, 7], "x": 3.75, "y": 4, "w": 6.25},
+ {"label": "Alt", "matrix": [4, 10], "x": 10, "y": 4, "w": 1.25},
+ {"label": "Win", "matrix": [4, 11], "x": 11.25, "y": 4, "w": 1.25},
+ {"label": "Menu", "matrix": [4, 12], "x": 12.5, "y": 4, "w": 1.25},
+ {"label": "Ctrl", "matrix": [4, 13], "x": 13.75, "y": 4, "w": 1.25}
+ ]
+ },
+ "LAYOUT_60_hhkb": {
+ "layout": [
+ { "label": "~", "matrix": [0, 0], "x": 0, "y": 0 },
+ { "label": "!", "matrix": [0, 1], "x": 1, "y": 0 },
+ { "label": "@", "matrix": [0, 2], "x": 2, "y": 0 },
+ { "label": "#", "matrix": [0, 3], "x": 3, "y": 0 },
+ { "label": "$", "matrix": [0, 4], "x": 4, "y": 0 },
+ { "label": "%", "matrix": [0, 5], "x": 5, "y": 0 },
+ { "label": "^", "matrix": [0, 6], "x": 6, "y": 0 },
+ { "label": "&", "matrix": [0, 7], "x": 7, "y": 0 },
+ { "label": "*", "matrix": [0, 8], "x": 8, "y": 0 },
+ { "label": "(", "matrix": [0, 9], "x": 9, "y": 0 },
+ { "label": ")", "matrix": [0, 10], "x": 10, "y": 0 },
+ { "label": "_", "matrix": [0, 11], "x": 11, "y": 0 },
+ { "label": "+", "matrix": [0, 12], "x": 12, "y": 0 },
+ { "label": "Del", "matrix": [0, 13], "x": 13, "y": 0 },
+ { "label": "Backspace", "matrix": [2, 12], "x": 14, "y": 0 },
+
+ { "label": "Tab", "matrix": [1, 0], "x": 0, "y": 1, "w": 1.5 },
+ { "label": "Q", "matrix": [1, 1], "x": 1.5, "y": 1 },
+ { "label": "W", "matrix": [1, 2], "x": 2.5, "y": 1 },
+ { "label": "E", "matrix": [1, 3], "x": 3.5, "y": 1 },
+ { "label": "R", "matrix": [1, 4], "x": 4.5, "y": 1 },
+ { "label": "T", "matrix": [1, 5], "x": 5.5, "y": 1 },
+ { "label": "Y", "matrix": [1, 6], "x": 6.5, "y": 1 },
+ { "label": "U", "matrix": [1, 7], "x": 7.5, "y": 1 },
+ { "label": "I", "matrix": [1, 8], "x": 8.5, "y": 1 },
+ { "label": "O", "matrix": [1, 9], "x": 9.5, "y": 1 },
+ { "label": "P", "matrix": [1, 10], "x": 10.5, "y": 1 },
+ { "label": "{", "matrix": [1, 11], "x": 11.5, "y": 1 },
+ { "label": "}", "matrix": [1, 12], "x": 12.5, "y": 1 },
+ { "label": "|", "matrix": [1, 13], "x": 13.5, "y": 1, "w": 1.5 },
+
+ { "label": "Caps Lock", "matrix": [2, 0], "x": 0, "y": 2, "w": 1.75 },
+ { "label": "A", "matrix": [2, 1], "x": 1.75, "y": 2 },
+ { "label": "S", "matrix": [2, 2], "x": 2.75, "y": 2 },
+ { "label": "D", "matrix": [2, 3], "x": 3.75, "y": 2 },
+ { "label": "F", "matrix": [2, 4], "x": 4.75, "y": 2 },
+ { "label": "G", "matrix": [2, 5], "x": 5.75, "y": 2 },
+ { "label": "H", "matrix": [2, 6], "x": 6.75, "y": 2 },
+ { "label": "J", "matrix": [2, 7], "x": 7.75, "y": 2 },
+ { "label": "K", "matrix": [2, 8], "x": 8.75, "y": 2 },
+ { "label": "L", "matrix": [2, 9], "x": 9.75, "y": 2 },
+ { "label": ":", "matrix": [2, 10], "x": 10.75, "y": 2 },
+ { "label": "\"", "matrix": [2, 11], "x": 11.75, "y": 2 },
+ { "label": "Enter", "matrix": [2, 13], "x": 12.75, "y": 2, "w": 2.25 },
+
+ { "label": "Shift", "matrix": [3, 0], "x": 0, "y": 3, "w": 2.25 },
+ { "label": "Z", "matrix": [3, 2], "x": 2.25, "y": 3 },
+ { "label": "X", "matrix": [3, 3], "x": 3.25, "y": 3 },
+ { "label": "C", "matrix": [3, 4], "x": 4.25, "y": 3 },
+ { "label": "V", "matrix": [3, 5], "x": 5.25, "y": 3 },
+ { "label": "B", "matrix": [3, 6], "x": 6.25, "y": 3 },
+ { "label": "N", "matrix": [3, 7], "x": 7.25, "y": 3 },
+ { "label": "M", "matrix": [3, 8], "x": 8.25, "y": 3 },
+ { "label": "<", "matrix": [3, 9], "x": 9.25, "y": 3 },
+ { "label": ">", "matrix": [3, 10], "x": 10.25, "y": 3 },
+ { "label": "?", "matrix": [3, 11], "x": 11.25, "y": 3 },
+ { "label": "Shift", "matrix": [3, 12], "x": 12.25, "y": 3, "w": 1.75 },
+ { "label": "Fn", "matrix": [3, 13], "x": 14, "y": 3 },
+ { "label": "Ctrl", "matrix": [4, 1], "x": 1.5, "y": 4 },
+ { "label": "Alt", "matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.5 },
+ { "label": "K47", "matrix": [4, 7], "x": 4, "y": 4, "w": 7 },
+ { "label": "Alt", "matrix": [4, 11], "x": 11, "y": 4, "w": 1.5 },
+ { "label": "Ctrl", "matrix": [4, 12], "x": 12.5, "y": 4 }
+ ]
+ },
+ "LAYOUT_60_iso": {
+ "layout": [
+ { "label": "~", "matrix": [0, 0], "x": 0, "y": 0 },
+ { "label": "!", "matrix": [0, 1], "x": 1, "y": 0 },
+ { "label": "@", "matrix": [0, 2], "x": 2, "y": 0 },
+ { "label": "#", "matrix": [0, 3], "x": 3, "y": 0 },
+ { "label": "$", "matrix": [0, 4], "x": 4, "y": 0 },
+ { "label": "%", "matrix": [0, 5], "x": 5, "y": 0 },
+ { "label": "^", "matrix": [0, 6], "x": 6, "y": 0 },
+ { "label": "&", "matrix": [0, 7], "x": 7, "y": 0 },
+ { "label": "*", "matrix": [0, 8], "x": 8, "y": 0 },
+ { "label": "(", "matrix": [0, 9], "x": 9, "y": 0 },
+ { "label": ")", "matrix": [0, 10], "x": 10, "y": 0 },
+ { "label": "_", "matrix": [0, 11], "x": 11, "y": 0 },
+ { "label": "+", "matrix": [0, 12], "x": 12, "y": 0 },
+ { "label": "Backspace", "matrix": [0, 13], "x": 13, "y": 0, "w": 2 },
+
+ { "label": "Tab", "matrix": [1, 0], "x": 0, "y": 1, "w": 1.5 },
+ { "label": "Q", "matrix": [1, 1], "x": 1.5, "y": 1 },
+ { "label": "W", "matrix": [1, 2], "x": 2.5, "y": 1 },
+ { "label": "E", "matrix": [1, 3], "x": 3.5, "y": 1 },
+ { "label": "R", "matrix": [1, 4], "x": 4.5, "y": 1 },
+ { "label": "T", "matrix": [1, 5], "x": 5.5, "y": 1 },
+ { "label": "Y", "matrix": [1, 6], "x": 6.5, "y": 1 },
+ { "label": "U", "matrix": [1, 7], "x": 7.5, "y": 1 },
+ { "label": "I", "matrix": [1, 8], "x": 8.5, "y": 1 },
+ { "label": "O", "matrix": [1, 9], "x": 9.5, "y": 1 },
+ { "label": "P", "matrix": [1, 10], "x": 10.5, "y": 1 },
+ { "label": "{", "matrix": [1, 11], "x": 11.5, "y": 1 },
+ { "label": "}", "matrix": [1, 12], "x": 12.5, "y": 1 },
+
+ { "label": "Caps Lock", "matrix": [2, 0], "x": 0, "y": 2, "w": 1.75 },
+ { "label": "A", "matrix": [2, 1], "x": 1.75, "y": 2 },
+ { "label": "S", "matrix": [2, 2], "x": 2.75, "y": 2 },
+ { "label": "D", "matrix": [2, 3], "x": 3.75, "y": 2 },
+ { "label": "F", "matrix": [2, 4], "x": 4.75, "y": 2 },
+ { "label": "G", "matrix": [2, 5], "x": 5.75, "y": 2 },
+ { "label": "H", "matrix": [2, 6], "x": 6.75, "y": 2 },
+ { "label": "J", "matrix": [2, 7], "x": 7.75, "y": 2 },
+ { "label": "K", "matrix": [2, 8], "x": 8.75, "y": 2 },
+ { "label": "L", "matrix": [2, 9], "x": 9.75, "y": 2 },
+ { "label": ":", "matrix": [2, 10], "x": 10.75, "y": 2 },
+ { "label": "@", "matrix": [2, 11], "x": 11.75, "y": 2 },
+ { "label": "~", "matrix": [1, 13], "x": 12.75, "y": 2 },
+ { "label": "Enter", "matrix": [2, 13], "x": 13.75, "y": 1, "w": 1.25, "h": 2 },
+
+ { "label": "Shift", "matrix": [3, 0], "x": 0, "y": 3, "w": 1.25 },
+ { "label": "|", "matrix": [3, 1], "x": 1.25, "y": 3 },
+ { "label": "Z", "matrix": [3, 2], "x": 2.25, "y": 3 },
+ { "label": "X", "matrix": [3, 3], "x": 3.25, "y": 3 },
+ { "label": "C", "matrix": [3, 4], "x": 4.25, "y": 3 },
+ { "label": "V", "matrix": [3, 5], "x": 5.25, "y": 3 },
+ { "label": "B", "matrix": [3, 6], "x": 6.25, "y": 3 },
+ { "label": "N", "matrix": [3, 7], "x": 7.25, "y": 3 },
+ { "label": "M", "matrix": [3, 8], "x": 8.25, "y": 3 },
+ { "label": "<", "matrix": [3, 9], "x": 9.25, "y": 3 },
+ { "label": ">", "matrix": [3, 10], "x": 10.25, "y": 3 },
+ { "label": "?", "matrix": [3, 11], "x": 11.25, "y": 3 },
+ { "label": "Shift", "matrix": [3, 12], "x": 12.25, "y": 3, "w": 2.75 },
+
+ { "label": "Ctrl", "matrix": [4, 0], "x": 0, "y": 4, "w": 1.25 },
+ { "label": "Win", "matrix": [4, 1], "x": 1.25, "y": 4, "w": 1.25 },
+ { "label": "Alt", "matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.25 },
+ { "label": "K47", "matrix": [4, 7], "x": 3.75, "y": 4, "w": 6.25 },
+ { "label": "AltGr", "matrix": [4, 10], "x": 10, "y": 4, "w": 1.25 },
+ { "label": "Win", "matrix": [4, 11], "x": 11.25, "y": 4, "w": 1.25 },
+ { "label": "Menu", "matrix": [4, 12], "x": 12.5, "y": 4, "w": 1.25 },
+ { "label": "Ctrl", "matrix": [4, 13], "x": 13.75, "y": 4, "w": 1.25 }
+ ]
+ },
+ "LAYOUT_60_ansi_tsangan": {
+ "layout": [
+ { "label": "~", "matrix": [0, 0], "x": 0, "y": 0 },
+ { "label": "!", "matrix": [0, 1], "x": 1, "y": 0 },
+ { "label": "@", "matrix": [0, 2], "x": 2, "y": 0 },
+ { "label": "#", "matrix": [0, 3], "x": 3, "y": 0 },
+ { "label": "$", "matrix": [0, 4], "x": 4, "y": 0 },
+ { "label": "%", "matrix": [0, 5], "x": 5, "y": 0 },
+ { "label": "^", "matrix": [0, 6], "x": 6, "y": 0 },
+ { "label": "&", "matrix": [0, 7], "x": 7, "y": 0 },
+ { "label": "*", "matrix": [0, 8], "x": 8, "y": 0 },
+ { "label": "(", "matrix": [0, 9], "x": 9, "y": 0 },
+ { "label": ")", "matrix": [0, 10], "x": 10, "y": 0 },
+ { "label": "_", "matrix": [0, 11], "x": 11, "y": 0 },
+ { "label": "+", "matrix": [0, 12], "x": 12, "y": 0 },
+ { "label": "Backspace", "matrix": [0, 13], "x": 13, "y": 0, "w": 2 },
+
+ { "label": "Tab", "matrix": [1, 0], "x": 0, "y": 1, "w": 1.5 },
+ { "label": "Q", "matrix": [1, 1], "x": 1.5, "y": 1 },
+ { "label": "W", "matrix": [1, 2], "x": 2.5, "y": 1 },
+ { "label": "E", "matrix": [1, 3], "x": 3.5, "y": 1 },
+ { "label": "R", "matrix": [1, 4], "x": 4.5, "y": 1 },
+ { "label": "T", "matrix": [1, 5], "x": 5.5, "y": 1 },
+ { "label": "Y", "matrix": [1, 6], "x": 6.5, "y": 1 },
+ { "label": "U", "matrix": [1, 7], "x": 7.5, "y": 1 },
+ { "label": "I", "matrix": [1, 8], "x": 8.5, "y": 1 },
+ { "label": "O", "matrix": [1, 9], "x": 9.5, "y": 1 },
+ { "label": "P", "matrix": [1, 10], "x": 10.5, "y": 1 },
+ { "label": "{", "matrix": [1, 11], "x": 11.5, "y": 1 },
+ { "label": "}", "matrix": [1, 12], "x": 12.5, "y": 1 },
+ { "label": "|", "matrix": [1, 13], "x": 13.5, "y": 1, "w": 1.5 },
+
+ { "label": "Caps Lock", "matrix": [2, 0], "x": 0, "y": 2, "w": 1.75 },
+ { "label": "A", "matrix": [2, 1], "x": 1.75, "y": 2 },
+ { "label": "S", "matrix": [2, 2], "x": 2.75, "y": 2 },
+ { "label": "D", "matrix": [2, 3], "x": 3.75, "y": 2 },
+ { "label": "F", "matrix": [2, 4], "x": 4.75, "y": 2 },
+ { "label": "G", "matrix": [2, 5], "x": 5.75, "y": 2 },
+ { "label": "H", "matrix": [2, 6], "x": 6.75, "y": 2 },
+ { "label": "J", "matrix": [2, 7], "x": 7.75, "y": 2 },
+ { "label": "K", "matrix": [2, 8], "x": 8.75, "y": 2 },
+ { "label": "L", "matrix": [2, 9], "x": 9.75, "y": 2 },
+ { "label": ":", "matrix": [2, 10], "x": 10.75, "y": 2 },
+ { "label": "\"", "matrix": [2, 11], "x": 11.75, "y": 2 },
+ { "label": "Enter", "matrix": [2, 13], "x": 12.75, "y": 2, "w": 2.25 },
+
+ { "label": "Shift", "matrix": [3, 0], "x": 0, "y": 3, "w": 2.25 },
+ { "label": "Z", "matrix": [3, 2], "x": 2.25, "y": 3 },
+ { "label": "X", "matrix": [3, 3], "x": 3.25, "y": 3 },
+ { "label": "C", "matrix": [3, 4], "x": 4.25, "y": 3 },
+ { "label": "V", "matrix": [3, 5], "x": 5.25, "y": 3 },
+ { "label": "B", "matrix": [3, 6], "x": 6.25, "y": 3 },
+ { "label": "N", "matrix": [3, 7], "x": 7.25, "y": 3 },
+ { "label": "M", "matrix": [3, 8], "x": 8.25, "y": 3 },
+ { "label": "<", "matrix": [3, 9], "x": 9.25, "y": 3 },
+ { "label": ">", "matrix": [3, 10], "x": 10.25, "y": 3 },
+ { "label": "?", "matrix": [3, 11], "x": 11.25, "y": 3 },
+ { "label": "Shift", "matrix": [3, 12], "x": 12.25, "y": 3, "w": 2.75 },
+
+ { "label": "Ctrl", "matrix": [4, 0], "x": 0, "y": 4, "w": 1.5 },
+ { "label": "Win", "matrix": [4, 1], "x": 1.5, "y": 4 },
+ { "label": "Alt", "matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.5 },
+ { "label": "K47", "matrix": [4, 7], "x": 4, "y": 4, "w": 7 },
+ { "label": "Alt", "matrix": [4, 11], "x": 11, "y": 4, "w": 1.5 },
+ { "label": "Win", "matrix": [4, 12], "x": 12.5, "y": 4 },
+ { "label": "Ctrl", "matrix": [4, 13], "x": 13.5, "y": 4, "w": 1.5 }
+ ]
+ },
+ "LAYOUT_60_tsangan_hhkb": {
+ "layout": [
+ { "label": "~", "matrix": [0, 0], "x": 0, "y": 0 },
+ { "label": "!", "matrix": [0, 1], "x": 1, "y": 0 },
+ { "label": "@", "matrix": [0, 2], "x": 2, "y": 0 },
+ { "label": "#", "matrix": [0, 3], "x": 3, "y": 0 },
+ { "label": "$", "matrix": [0, 4], "x": 4, "y": 0 },
+ { "label": "%", "matrix": [0, 5], "x": 5, "y": 0 },
+ { "label": "^", "matrix": [0, 6], "x": 6, "y": 0 },
+ { "label": "&", "matrix": [0, 7], "x": 7, "y": 0 },
+ { "label": "*", "matrix": [0, 8], "x": 8, "y": 0 },
+ { "label": "(", "matrix": [0, 9], "x": 9, "y": 0 },
+ { "label": ")", "matrix": [0, 10], "x": 10, "y": 0 },
+ { "label": "_", "matrix": [0, 11], "x": 11, "y": 0 },
+ { "label": "+", "matrix": [0, 12], "x": 12, "y": 0 },
+ { "label": "Del", "matrix": [0, 13], "x": 13, "y": 0 },
+ { "label": "Backspace", "matrix": [2, 12], "x": 14, "y": 0 },
+
+ { "label": "Tab", "matrix": [1, 0], "x": 0, "y": 1, "w": 1.5 },
+ { "label": "Q", "matrix": [1, 1], "x": 1.5, "y": 1 },
+ { "label": "W", "matrix": [1, 2], "x": 2.5, "y": 1 },
+ { "label": "E", "matrix": [1, 3], "x": 3.5, "y": 1 },
+ { "label": "R", "matrix": [1, 4], "x": 4.5, "y": 1 },
+ { "label": "T", "matrix": [1, 5], "x": 5.5, "y": 1 },
+ { "label": "Y", "matrix": [1, 6], "x": 6.5, "y": 1 },
+ { "label": "U", "matrix": [1, 7], "x": 7.5, "y": 1 },
+ { "label": "I", "matrix": [1, 8], "x": 8.5, "y": 1 },
+ { "label": "O", "matrix": [1, 9], "x": 9.5, "y": 1 },
+ { "label": "P", "matrix": [1, 10], "x": 10.5, "y": 1 },
+ { "label": "{", "matrix": [1, 11], "x": 11.5, "y": 1 },
+ { "label": "}", "matrix": [1, 12], "x": 12.5, "y": 1 },
+ { "label": "|", "matrix": [1, 13], "x": 13.5, "y": 1, "w": 1.5 },
+
+ { "label": "Caps Lock", "matrix": [2, 0], "x": 0, "y": 2, "w": 1.75 },
+ { "label": "A", "matrix": [2, 1], "x": 1.75, "y": 2 },
+ { "label": "S", "matrix": [2, 2], "x": 2.75, "y": 2 },
+ { "label": "D", "matrix": [2, 3], "x": 3.75, "y": 2 },
+ { "label": "F", "matrix": [2, 4], "x": 4.75, "y": 2 },
+ { "label": "G", "matrix": [2, 5], "x": 5.75, "y": 2 },
+ { "label": "H", "matrix": [2, 6], "x": 6.75, "y": 2 },
+ { "label": "J", "matrix": [2, 7], "x": 7.75, "y": 2 },
+ { "label": "K", "matrix": [2, 8], "x": 8.75, "y": 2 },
+ { "label": "L", "matrix": [2, 9], "x": 9.75, "y": 2 },
+ { "label": ":", "matrix": [2, 10], "x": 10.75, "y": 2 },
+ { "label": "\"", "matrix": [2, 11], "x": 11.75, "y": 2 },
+ { "label": "Enter", "matrix": [2, 13], "x": 12.75, "y": 2, "w": 2.25 },
+
+ { "label": "Shift", "matrix": [3, 0], "x": 0, "y": 3, "w": 2.25 },
+ { "label": "Z", "matrix": [3, 2], "x": 2.25, "y": 3 },
+ { "label": "X", "matrix": [3, 3], "x": 3.25, "y": 3 },
+ { "label": "C", "matrix": [3, 4], "x": 4.25, "y": 3 },
+ { "label": "V", "matrix": [3, 5], "x": 5.25, "y": 3 },
+ { "label": "B", "matrix": [3, 6], "x": 6.25, "y": 3 },
+ { "label": "N", "matrix": [3, 7], "x": 7.25, "y": 3 },
+ { "label": "M", "matrix": [3, 8], "x": 8.25, "y": 3 },
+ { "label": "<", "matrix": [3, 9], "x": 9.25, "y": 3 },
+ { "label": ">", "matrix": [3, 10], "x": 10.25, "y": 3 },
+ { "label": "?", "matrix": [3, 11], "x": 11.25, "y": 3 },
+ { "label": "Shift", "matrix": [3, 12], "x": 12.25, "y": 3, "w": 1.75 },
+ { "label": "Fn", "matrix": [3, 13], "x": 14, "y": 3 },
+
+ { "label": "Ctrl", "matrix": [4, 0], "x": 0, "y": 4, "w": 1.5 },
+ { "label": "Win", "matrix": [4, 1], "x": 1.5, "y": 4 },
+ { "label": "Alt", "matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.5 },
+ { "label": "K47", "matrix": [4, 7], "x": 4, "y": 4, "w": 7 },
+ { "label": "Alt", "matrix": [4, 11], "x": 11, "y": 4, "w": 1.5 },
+ { "label": "Win", "matrix": [4, 12], "x": 12.5, "y": 4 },
+ { "label": "Ctrl", "matrix": [4, 13], "x": 13.5, "y": 4, "w": 1.5 }
+ ]
+ },
+ "LAYOUT_60_iso_split_bs_rshift": {
+ "layout": [
+ {"label": "~", "matrix": [0, 0], "x": 0, "y": 0},
+ {"label": "!", "matrix": [0, 1], "x": 1, "y": 0},
+ {"label": "@", "matrix": [0, 2], "x": 2, "y": 0},
+ {"label": "#", "matrix": [0, 3], "x": 3, "y": 0},
+ {"label": "$", "matrix": [0, 4], "x": 4, "y": 0},
+ {"label": "%", "matrix": [0, 5], "x": 5, "y": 0},
+ {"label": "^", "matrix": [0, 6], "x": 6, "y": 0},
+ {"label": "&", "matrix": [0, 7], "x": 7, "y": 0},
+ {"label": "*", "matrix": [0, 8], "x": 8, "y": 0},
+ {"label": "(", "matrix": [0, 9], "x": 9, "y": 0},
+ {"label": ")", "matrix": [0, 10], "x": 10, "y": 0},
+ {"label": "_", "matrix": [0, 11], "x": 11, "y": 0},
+ {"label": "+", "matrix": [0, 12], "x": 12, "y": 0},
+ {"label": "Del", "matrix": [0, 13], "x": 13, "y": 0},
+ {"label": "Backspace", "matrix": [2, 12], "x": 14, "y": 0},
+
+ {"label": "Tab", "matrix": [1, 0], "x": 0, "y": 1, "w": 1.5},
+ {"label": "Q", "matrix": [1, 1], "x": 1.5, "y": 1},
+ {"label": "W", "matrix": [1, 2], "x": 2.5, "y": 1},
+ {"label": "E", "matrix": [1, 3], "x": 3.5, "y": 1},
+ {"label": "R", "matrix": [1, 4], "x": 4.5, "y": 1},
+ {"label": "T", "matrix": [1, 5], "x": 5.5, "y": 1},
+ {"label": "Y", "matrix": [1, 6], "x": 6.5, "y": 1},
+ {"label": "U", "matrix": [1, 7], "x": 7.5, "y": 1},
+ {"label": "I", "matrix": [1, 8], "x": 8.5, "y": 1},
+ {"label": "O", "matrix": [1, 9], "x": 9.5, "y": 1},
+ {"label": "P", "matrix": [1, 10], "x": 10.5, "y": 1},
+ {"label": "{", "matrix": [1, 11], "x": 11.5, "y": 1},
+ {"label": "}", "matrix": [1, 12], "x": 12.5, "y": 1},
+
+ {"label": "Caps Lock", "matrix": [2, 0], "x": 0, "y": 2, "w": 1.75},
+ {"label": "A", "matrix": [2, 1], "x": 1.75, "y": 2},
+ {"label": "S", "matrix": [2, 2], "x": 2.75, "y": 2},
+ {"label": "D", "matrix": [2, 3], "x": 3.75, "y": 2},
+ {"label": "F", "matrix": [2, 4], "x": 4.75, "y": 2},
+ {"label": "G", "matrix": [2, 5], "x": 5.75, "y": 2},
+ {"label": "H", "matrix": [2, 6], "x": 6.75, "y": 2},
+ {"label": "J", "matrix": [2, 7], "x": 7.75, "y": 2},
+ {"label": "K", "matrix": [2, 8], "x": 8.75, "y": 2},
+ {"label": "L", "matrix": [2, 9], "x": 9.75, "y": 2},
+ {"label": ":", "matrix": [2, 10], "x": 10.75, "y": 2},
+ {"label": "@", "matrix": [2, 11], "x": 11.75, "y": 2},
+ {"label": "~", "matrix": [1, 13], "x": 12.75, "y": 2},
+ {"label": "Enter", "matrix": [2, 13], "x": 13.75, "y": 1, "w": 1.25, "h": 2},
+
+ {"label": "Shift", "matrix": [3, 0], "x": 0, "y": 3, "w": 1.25},
+ {"label": "|", "matrix": [3, 1], "x": 1.25, "y": 3},
+ {"label": "Z", "matrix": [3, 2], "x": 2.25, "y": 3},
+ {"label": "X", "matrix": [3, 3], "x": 3.25, "y": 3},
+ {"label": "C", "matrix": [3, 4], "x": 4.25, "y": 3},
+ {"label": "V", "matrix": [3, 5], "x": 5.25, "y": 3},
+ {"label": "B", "matrix": [3, 6], "x": 6.25, "y": 3},
+ {"label": "N", "matrix": [3, 7], "x": 7.25, "y": 3},
+ {"label": "M", "matrix": [3, 8], "x": 8.25, "y": 3},
+ {"label": "<", "matrix": [3, 9], "x": 9.25, "y": 3},
+ {"label": ">", "matrix": [3, 10], "x": 10.25, "y": 3},
+ {"label": "?", "matrix": [3, 11], "x": 11.25, "y": 3},
+ {"label": "Shift", "matrix": [3, 12], "x": 12.25, "y": 3, "w": 1.75},
+ {"label": "Fn", "matrix": [3, 13], "x": 14, "y": 3},
+
+ {"label": "Ctrl", "matrix": [4, 0], "x": 0, "y": 4, "w": 1.25},
+ {"label": "Win", "matrix": [4, 1], "x": 1.25, "y": 4, "w": 1.25},
+ {"label": "Alt", "matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.25},
+ {"label": "K47", "matrix": [4, 7], "x": 3.75, "y": 4, "w": 6.25},
+ {"label": "AltGr", "matrix": [4, 10], "x": 10, "y": 4, "w": 1.25},
+ {"label": "Win", "matrix": [4, 11], "x": 11.25, "y": 4, "w": 1.25},
+ {"label": "Menu", "matrix": [4, 12], "x": 12.5, "y": 4, "w": 1.25},
+ {"label": "Ctrl", "matrix": [4, 13], "x": 13.75, "y": 4, "w": 1.25}
+ ]
+ },
+ "LAYOUT_60_iso_tsangan": {
+ "layout": [
+ {"label": "~", "matrix": [0, 0], "x": 0, "y": 0},
+ {"label": "!", "matrix": [0, 1], "x": 1, "y": 0},
+ {"label": "@", "matrix": [0, 2], "x": 2, "y": 0},
+ {"label": "#", "matrix": [0, 3], "x": 3, "y": 0},
+ {"label": "$", "matrix": [0, 4], "x": 4, "y": 0},
+ {"label": "%", "matrix": [0, 5], "x": 5, "y": 0},
+ {"label": "^", "matrix": [0, 6], "x": 6, "y": 0},
+ {"label": "&", "matrix": [0, 7], "x": 7, "y": 0},
+ {"label": "*", "matrix": [0, 8], "x": 8, "y": 0},
+ {"label": "(", "matrix": [0, 9], "x": 9, "y": 0},
+ {"label": ")", "matrix": [0, 10], "x": 10, "y": 0},
+ {"label": "_", "matrix": [0, 11], "x": 11, "y": 0},
+ {"label": "+", "matrix": [0, 12], "x": 12, "y": 0},
+ {"label": "Backspace", "matrix": [0, 13], "x": 13, "y": 0, "w": 2},
+
+ {"label": "Tab", "matrix": [1, 0], "x": 0, "y": 1, "w": 1.5},
+ {"label": "Q", "matrix": [1, 1], "x": 1.5, "y": 1},
+ {"label": "W", "matrix": [1, 2], "x": 2.5, "y": 1},
+ {"label": "E", "matrix": [1, 3], "x": 3.5, "y": 1},
+ {"label": "R", "matrix": [1, 4], "x": 4.5, "y": 1},
+ {"label": "T", "matrix": [1, 5], "x": 5.5, "y": 1},
+ {"label": "Y", "matrix": [1, 6], "x": 6.5, "y": 1},
+ {"label": "U", "matrix": [1, 7], "x": 7.5, "y": 1},
+ {"label": "I", "matrix": [1, 8], "x": 8.5, "y": 1},
+ {"label": "O", "matrix": [1, 9], "x": 9.5, "y": 1},
+ {"label": "P", "matrix": [1, 10], "x": 10.5, "y": 1},
+ {"label": "{", "matrix": [1, 11], "x": 11.5, "y": 1},
+ {"label": "}", "matrix": [1, 12], "x": 12.5, "y": 1},
+
+ {"label": "Caps Lock", "matrix": [2, 0], "x": 0, "y": 2, "w": 1.75},
+ {"label": "A", "matrix": [2, 1], "x": 1.75, "y": 2},
+ {"label": "S", "matrix": [2, 2], "x": 2.75, "y": 2},
+ {"label": "D", "matrix": [2, 3], "x": 3.75, "y": 2},
+ {"label": "F", "matrix": [2, 4], "x": 4.75, "y": 2},
+ {"label": "G", "matrix": [2, 5], "x": 5.75, "y": 2},
+ {"label": "H", "matrix": [2, 6], "x": 6.75, "y": 2},
+ {"label": "J", "matrix": [2, 7], "x": 7.75, "y": 2},
+ {"label": "K", "matrix": [2, 8], "x": 8.75, "y": 2},
+ {"label": "L", "matrix": [2, 9], "x": 9.75, "y": 2},
+ {"label": ":", "matrix": [2, 10], "x": 10.75, "y": 2},
+ {"label": "@", "matrix": [2, 11], "x": 11.75, "y": 2},
+ {"label": "~", "matrix": [1, 13], "x": 12.75, "y": 2},
+ {"label": "Enter", "matrix": [2, 13], "x": 13.75, "y": 1, "w": 1.25, "h": 2},
+
+ {"label": "Shift", "matrix": [3, 0], "x": 0, "y": 3, "w": 1.25},
+ {"label": "|", "matrix": [3, 1], "x": 1.25, "y": 3},
+ {"label": "Z", "matrix": [3, 2], "x": 2.25, "y": 3},
+ {"label": "X", "matrix": [3, 3], "x": 3.25, "y": 3},
+ {"label": "C", "matrix": [3, 4], "x": 4.25, "y": 3},
+ {"label": "V", "matrix": [3, 5], "x": 5.25, "y": 3},
+ {"label": "B", "matrix": [3, 6], "x": 6.25, "y": 3},
+ {"label": "N", "matrix": [3, 7], "x": 7.25, "y": 3},
+ {"label": "M", "matrix": [3, 8], "x": 8.25, "y": 3},
+ {"label": "<", "matrix": [3, 9], "x": 9.25, "y": 3},
+ {"label": ">", "matrix": [3, 10], "x": 10.25, "y": 3},
+ {"label": "?", "matrix": [3, 11], "x": 11.25, "y": 3},
+ {"label": "Shift", "matrix": [3, 12], "x": 12.25, "y": 3, "w": 2.75},
+
+ {"label": "Ctrl", "matrix": [4, 0], "x": 0, "y": 4, "w": 1.5},
+ {"label": "Win", "matrix": [4, 1], "x": 1.5, "y": 4},
+ {"label": "Alt", "matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.5},
+ {"label": "K47", "matrix": [4, 7], "x": 4, "y": 4, "w": 7},
+ {"label": "Alt", "matrix": [4, 11], "x": 11, "y": 4, "w": 1.5},
+ {"label": "Win", "matrix": [4, 12], "x": 12.5, "y": 4},
+ {"label": "Ctrl", "matrix": [4, 13], "x": 13.5, "y": 4, "w": 1.5}
+ ]
+ },
+ "LAYOUT_60_iso_tsangan_split_bs_rshift": {
+ "layout": [
+ {"label": "~", "matrix": [0, 0], "x": 0, "y": 0},
+ {"label": "!", "matrix": [0, 1], "x": 1, "y": 0},
+ {"label": "@", "matrix": [0, 2], "x": 2, "y": 0},
+ {"label": "#", "matrix": [0, 3], "x": 3, "y": 0},
+ {"label": "$", "matrix": [0, 4], "x": 4, "y": 0},
+ {"label": "%", "matrix": [0, 5], "x": 5, "y": 0},
+ {"label": "^", "matrix": [0, 6], "x": 6, "y": 0},
+ {"label": "&", "matrix": [0, 7], "x": 7, "y": 0},
+ {"label": "*", "matrix": [0, 8], "x": 8, "y": 0},
+ {"label": "(", "matrix": [0, 9], "x": 9, "y": 0},
+ {"label": ")", "matrix": [0, 10], "x": 10, "y": 0},
+ {"label": "_", "matrix": [0, 11], "x": 11, "y": 0},
+ {"label": "+", "matrix": [0, 12], "x": 12, "y": 0},
+ {"label": "Del", "matrix": [0, 13], "x": 13, "y": 0},
+ {"label": "Backspace", "matrix": [2, 12], "x": 14, "y": 0},
+
+ {"label": "Tab", "matrix": [1, 0], "x": 0, "y": 1, "w": 1.5},
+ {"label": "Q", "matrix": [1, 1], "x": 1.5, "y": 1},
+ {"label": "W", "matrix": [1, 2], "x": 2.5, "y": 1},
+ {"label": "E", "matrix": [1, 3], "x": 3.5, "y": 1},
+ {"label": "R", "matrix": [1, 4], "x": 4.5, "y": 1},
+ {"label": "T", "matrix": [1, 5], "x": 5.5, "y": 1},
+ {"label": "Y", "matrix": [1, 6], "x": 6.5, "y": 1},
+ {"label": "U", "matrix": [1, 7], "x": 7.5, "y": 1},
+ {"label": "I", "matrix": [1, 8], "x": 8.5, "y": 1},
+ {"label": "O", "matrix": [1, 9], "x": 9.5, "y": 1},
+ {"label": "P", "matrix": [1, 10], "x": 10.5, "y": 1},
+ {"label": "{", "matrix": [1, 11], "x": 11.5, "y": 1},
+ {"label": "}", "matrix": [1, 12], "x": 12.5, "y": 1},
+
+ {"label": "Caps Lock", "matrix": [2, 0], "x": 0, "y": 2, "w": 1.75},
+ {"label": "A", "matrix": [2, 1], "x": 1.75, "y": 2},
+ {"label": "S", "matrix": [2, 2], "x": 2.75, "y": 2},
+ {"label": "D", "matrix": [2, 3], "x": 3.75, "y": 2},
+ {"label": "F", "matrix": [2, 4], "x": 4.75, "y": 2},
+ {"label": "G", "matrix": [2, 5], "x": 5.75, "y": 2},
+ {"label": "H", "matrix": [2, 6], "x": 6.75, "y": 2},
+ {"label": "J", "matrix": [2, 7], "x": 7.75, "y": 2},
+ {"label": "K", "matrix": [2, 8], "x": 8.75, "y": 2},
+ {"label": "L", "matrix": [2, 9], "x": 9.75, "y": 2},
+ {"label": ":", "matrix": [2, 10], "x": 10.75, "y": 2},
+ {"label": "@", "matrix": [2, 11], "x": 11.75, "y": 2},
+ {"label": "~", "matrix": [1, 13], "x": 12.75, "y": 2},
+ {"label": "Enter", "matrix": [2, 13], "x": 13.75, "y": 1, "w": 1.25, "h": 2},
+
+ {"label": "Shift", "matrix": [3, 0], "x": 0, "y": 3, "w": 1.25},
+ {"label": "|", "matrix": [3, 1], "x": 1.25, "y": 3},
+ {"label": "Z", "matrix": [3, 2], "x": 2.25, "y": 3},
+ {"label": "X", "matrix": [3, 3], "x": 3.25, "y": 3},
+ {"label": "C", "matrix": [3, 4], "x": 4.25, "y": 3},
+ {"label": "V", "matrix": [3, 5], "x": 5.25, "y": 3},
+ {"label": "B", "matrix": [3, 6], "x": 6.25, "y": 3},
+ {"label": "N", "matrix": [3, 7], "x": 7.25, "y": 3},
+ {"label": "M", "matrix": [3, 8], "x": 8.25, "y": 3},
+ {"label": "<", "matrix": [3, 9], "x": 9.25, "y": 3},
+ {"label": ">", "matrix": [3, 10], "x": 10.25, "y": 3},
+ {"label": "?", "matrix": [3, 11], "x": 11.25, "y": 3},
+ {"label": "Shift", "matrix": [3, 12], "x": 12.25, "y": 3, "w": 1.75},
+ {"label": "Fn", "matrix": [3, 13], "x": 14, "y": 3},
+
+ {"label": "Ctrl", "matrix": [4, 0], "x": 0, "y": 4, "w": 1.5},
+ {"label": "Win", "matrix": [4, 1], "x": 1.5, "y": 4},
+ {"label": "Alt", "matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.5},
+ {"label": "K47", "matrix": [4, 7], "x": 4, "y": 4, "w": 7},
+ {"label": "Alt", "matrix": [4, 11], "x": 11, "y": 4, "w": 1.5},
+ {"label": "Win", "matrix": [4, 12], "x": 12.5, "y": 4},
+ {"label": "Ctrl", "matrix": [4, 13], "x": 13.5, "y": 4, "w": 1.5}
+ ]
+ },
+ "LAYOUT_all": {
+ "layout": [
+ { "label": "~", "matrix": [0, 0], "x": 0, "y": 0 },
+ { "label": "!", "matrix": [0, 1], "x": 1, "y": 0 },
+ { "label": "@", "matrix": [0, 2], "x": 2, "y": 0 },
+ { "label": "#", "matrix": [0, 3], "x": 3, "y": 0 },
+ { "label": "$", "matrix": [0, 4], "x": 4, "y": 0 },
+ { "label": "%", "matrix": [0, 5], "x": 5, "y": 0 },
+ { "label": "^", "matrix": [0, 6], "x": 6, "y": 0 },
+ { "label": "&", "matrix": [0, 7], "x": 7, "y": 0 },
+ { "label": "*", "matrix": [0, 8], "x": 8, "y": 0 },
+ { "label": "(", "matrix": [0, 9], "x": 9, "y": 0 },
+ { "label": ")", "matrix": [0, 10], "x": 10, "y": 0 },
+ { "label": "_", "matrix": [0, 11], "x": 11, "y": 0 },
+ { "label": "+", "matrix": [0, 12], "x": 12, "y": 0 },
+ { "label": "Del", "matrix": [2, 12], "x": 13, "y": 0 },
+ { "label": "Backspace", "matrix": [0, 13], "x": 14, "y": 0 },
+
+ { "label": "Tab", "matrix": [1, 0], "x": 0, "y": 1, "w": 1.5 },
+ { "label": "Q", "matrix": [1, 1], "x": 1.5, "y": 1 },
+ { "label": "W", "matrix": [1, 2], "x": 2.5, "y": 1 },
+ { "label": "E", "matrix": [1, 3], "x": 3.5, "y": 1 },
+ { "label": "R", "matrix": [1, 4], "x": 4.5, "y": 1 },
+ { "label": "T", "matrix": [1, 5], "x": 5.5, "y": 1 },
+ { "label": "Y", "matrix": [1, 6], "x": 6.5, "y": 1 },
+ { "label": "U", "matrix": [1, 7], "x": 7.5, "y": 1 },
+ { "label": "I", "matrix": [1, 8], "x": 8.5, "y": 1 },
+ { "label": "O", "matrix": [1, 9], "x": 9.5, "y": 1 },
+ { "label": "P", "matrix": [1, 10], "x": 10.5, "y": 1 },
+ { "label": "{", "matrix": [1, 11], "x": 11.5, "y": 1 },
+ { "label": "}", "matrix": [1, 12], "x": 12.5, "y": 1 },
+ { "label": "|", "matrix": [1, 13], "x": 13.5, "y": 1, "w": 1.5 },
+
+ { "label": "Caps Lock", "matrix": [2, 0], "x": 0, "y": 2, "w": 1.75 },
+ { "label": "A", "matrix": [2, 1], "x": 1.75, "y": 2 },
+ { "label": "S", "matrix": [2, 2], "x": 2.75, "y": 2 },
+ { "label": "D", "matrix": [2, 3], "x": 3.75, "y": 2 },
+ { "label": "F", "matrix": [2, 4], "x": 4.75, "y": 2 },
+ { "label": "G", "matrix": [2, 5], "x": 5.75, "y": 2 },
+ { "label": "H", "matrix": [2, 6], "x": 6.75, "y": 2 },
+ { "label": "J", "matrix": [2, 7], "x": 7.75, "y": 2 },
+ { "label": "K", "matrix": [2, 8], "x": 8.75, "y": 2 },
+ { "label": "L", "matrix": [2, 9], "x": 9.75, "y": 2 },
+ { "label": ":", "matrix": [2, 10], "x": 10.75, "y": 2 },
+ { "label": "\"", "matrix": [2, 11], "x": 11.75, "y": 2 },
+ { "label": "Enter", "matrix": [2, 13], "x": 12.75, "y": 2, "w": 2.25 },
+
+ { "label": "Shift", "matrix": [3, 0], "x": 0, "y": 3, "w": 1.25 },
+ { "label": "|", "matrix": [3, 1], "x": 1.25, "y": 3 },
+ { "label": "Z", "matrix": [3, 2], "x": 2.25, "y": 3 },
+ { "label": "X", "matrix": [3, 3], "x": 3.25, "y": 3 },
+ { "label": "C", "matrix": [3, 4], "x": 4.25, "y": 3 },
+ { "label": "V", "matrix": [3, 5], "x": 5.25, "y": 3 },
+ { "label": "B", "matrix": [3, 6], "x": 6.25, "y": 3 },
+ { "label": "N", "matrix": [3, 7], "x": 7.25, "y": 3 },
+ { "label": "M", "matrix": [3, 8], "x": 8.25, "y": 3 },
+ { "label": "<", "matrix": [3, 9], "x": 9.25, "y": 3 },
+ { "label": ">", "matrix": [3, 10], "x": 10.25, "y": 3 },
+ { "label": "?", "matrix": [3, 11], "x": 11.25, "y": 3 },
+ { "label": "Shift", "matrix": [3, 12], "x": 12.25, "y": 3, "w": 1.75 },
+ { "label": "Fn", "matrix": [3, 13], "x": 14, "y": 3 },
+
+ { "label": "Ctrl", "matrix": [4, 0], "x": 0, "y": 4, "w": 1.25 },
+ { "label": "Win", "matrix": [4, 1], "x": 1.25, "y": 4, "w": 1.25 },
+ { "label": "Alt", "matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.25 },
+ { "label": "K47", "matrix": [4, 7], "x": 3.75, "y": 4, "w": 6.25 },
+ { "label": "Alt", "matrix": [4, 10], "x": 10, "y": 4, "w": 1.25 },
+ { "label": "Win", "matrix": [4, 11], "x": 11.25, "y": 4, "w": 1.25 },
+ { "label": "Menu", "matrix": [4, 12], "x": 12.5, "y": 4, "w": 1.25 },
+ { "label": "Ctrl", "matrix": [4, 13], "x": 13.75, "y": 4, "w": 1.25 }
+ ]
+ }
+ }
+}
+
diff --git a/keyboards/dztech/og60/keymaps/default/keymap.c b/keyboards/dztech/tofu60/keymaps/default/keymap.c
index 0bf690aab0..0bf690aab0 100644
--- a/keyboards/dztech/og60/keymaps/default/keymap.c
+++ b/keyboards/dztech/tofu60/keymaps/default/keymap.c
diff --git a/keyboards/dztech/og60/keymaps/via/keymap.c b/keyboards/dztech/tofu60/keymaps/via/keymap.c
index 0bf690aab0..0bf690aab0 100644
--- a/keyboards/dztech/og60/keymaps/via/keymap.c
+++ b/keyboards/dztech/tofu60/keymaps/via/keymap.c
diff --git a/keyboards/dztech/og60/keymaps/via/rules.mk b/keyboards/dztech/tofu60/keymaps/via/rules.mk
index 1e5b99807c..1e5b99807c 100644
--- a/keyboards/dztech/og60/keymaps/via/rules.mk
+++ b/keyboards/dztech/tofu60/keymaps/via/rules.mk
diff --git a/keyboards/dztech/tofu60/matrix_diagram.md b/keyboards/dztech/tofu60/matrix_diagram.md
new file mode 100644
index 0000000000..0bbd201945
--- /dev/null
+++ b/keyboards/dztech/tofu60/matrix_diagram.md
@@ -0,0 +1,24 @@
+# Matrix Diagram for Dztech Tofu60
+
+```
+ ┌───────┐
+ 2u Backspace │0D │
+ └───────┘
+┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
+│00 │01 │02 │03 │04 │05 │06 │07 │08 │09 │0A │0B │0C │0D │2C │
+├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ ┌─────┐
+│10 │11 │12 │13 │14 │15 │16 │17 │18 │19 │1A │1B │1C │1D │ │ │
+├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ ┌──┴┐2D │ ISO Enter
+│20 │21 │22 │23 │24 │25 │26 │27 │28 │29 │2A │2B │2D │ │1D │ │
+├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ └───┴────┘
+│30 │31 │32 │33 │34 │35 │36 │37 │38 │39 │3A │3B │3C │3D │
+├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬┴───┤
+│40 │41 │42 │47 │4A │4B │4C │4D │
+└────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
+┌────────┐ ┌──────────┐
+│31 │ 2.25u LShift 2.75u RShift │3C │
+└────────┘ └──────────┘
+┌─────┬───┬─────┬───────────────────────────┬─────┬───┬─────┐
+│40 │41 │42 │47 │4B │4C │4D │ Tsangan/WKL/HHKB
+└─────┴───┴─────┴───────────────────────────┴─────┴───┴─────┘
+```
diff --git a/keyboards/dztech/og60/readme.md b/keyboards/dztech/tofu60/readme.md
index 07d6e6a658..2cd4de58bf 100644
--- a/keyboards/dztech/og60/readme.md
+++ b/keyboards/dztech/tofu60/readme.md
@@ -1,8 +1,8 @@
-# OG60
+# TOFU60
A customizable 60% HotSwap keyboard.
* Keyboard Maintainer: [moyi4681](https://github.com/moyi4681)
-* Hardware Supported: OG60
+* Hardware Supported: TOFU60
* Hardware Availability: [KBDfans](https://kbdfans.com/)
## Bootloader mode
@@ -17,6 +17,6 @@ Enter the bootloader in 3 ways:
Make example for this keyboard (after setting up your build environment):
- make dztech/og60:default
+ make dztech/tofu60:default
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/dztech/og60/rules.mk b/keyboards/dztech/tofu60/rules.mk
index e69de29bb2..e69de29bb2 100644
--- a/keyboards/dztech/og60/rules.mk
+++ b/keyboards/dztech/tofu60/rules.mk
diff --git a/keyboards/eason/aeroboard/config.h b/keyboards/eason/aeroboard/config.h
index ff00df878f..2c7d4687b4 100644
--- a/keyboards/eason/aeroboard/config.h
+++ b/keyboards/eason/aeroboard/config.h
@@ -3,7 +3,7 @@
#pragma once
-#define WS2812_SPI SPID2
+#define WS2812_SPI_DRIVER SPID2
#define WS2812_SPI_MOSI_PAL_MODE 5
/* disable debug print */
diff --git a/keyboards/era/divine/config.h b/keyboards/era/divine/config.h
new file mode 100644
index 0000000000..e1083fe5e2
--- /dev/null
+++ b/keyboards/era/divine/config.h
@@ -0,0 +1,20 @@
+/* Copyright 2023 eerraa
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General 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 BACKLIGHT_PWM_DRIVER PWMD0
+#define BACKLIGHT_PWM_CHANNEL RP2040_PWM_CHANNEL_A \ No newline at end of file
diff --git a/keyboards/era/divine/halconf.h b/keyboards/era/divine/halconf.h
new file mode 100644
index 0000000000..5a527da781
--- /dev/null
+++ b/keyboards/era/divine/halconf.h
@@ -0,0 +1,21 @@
+/* Copyright 2023 eerraa
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General 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 HAL_USE_PWM TRUE
+
+#include_next <halconf.h> \ No newline at end of file
diff --git a/keyboards/era/divine/info.json b/keyboards/era/divine/info.json
index de87fd83e2..d02241da78 100644
--- a/keyboards/era/divine/info.json
+++ b/keyboards/era/divine/info.json
@@ -2,12 +2,17 @@
"manufacturer": "ERA",
"keyboard_name": "DIVINE 1.0.0",
"maintainer": "eerraa",
+ "backlight": {
+ "pin": "GP0",
+ "levels": 5
+ },
"bootloader": "rp2040",
"build": {
"debounce_type": "sym_defer_pk"
},
"diode_direction": "COL2ROW",
"features": {
+ "backlight": true,
"bootmagic": true,
"command": false,
"console": false,
@@ -18,8 +23,8 @@
"indicators": {
"caps_lock": "GP1",
"num_lock": "GP2",
- "scroll_lock": "GP3",
- "on_state": 0
+ "on_state": 0,
+ "scroll_lock": "GP3"
},
"matrix_pins": {
"cols": ["GP13", "GP12", "GP19", "GP20", "GP21", "GP22", "GP23", "GP24", "GP25", "GP26", "GP27", "GP28", "GP29", "GP18", "GP5", "GP6", "GP7"],
diff --git a/keyboards/era/divine/mcuconf.h b/keyboards/era/divine/mcuconf.h
new file mode 100644
index 0000000000..7698b5d139
--- /dev/null
+++ b/keyboards/era/divine/mcuconf.h
@@ -0,0 +1,22 @@
+/* Copyright 2023 eerraa
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General 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_next <mcuconf.h>
+
+#undef RP_PWM_USE_PWM0
+#define RP_PWM_USE_PWM0 TRUE \ No newline at end of file
diff --git a/keyboards/era/divine/readme.md b/keyboards/era/divine/readme.md
index decc7e3d31..3049e3b840 100644
--- a/keyboards/era/divine/readme.md
+++ b/keyboards/era/divine/readme.md
@@ -3,7 +3,7 @@
DIVINE Keyboard
* Keyboard Maintainer: [ERA](https://github.com/eerraa)
-* Hardware Supported: RP2040
+* Hardware Supported: DIVINE 1.0.0 PCB
* Hardware Availability: [ERA](https://github.com/eerraa)
Make example for this keyboard (after setting up your build environment):
@@ -21,5 +21,5 @@ See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_to
Enter the bootloader in 3 ways:
* **Bootmagic reset**: Hold down the key at ESC(0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard
-* **Physical reset button**: Short the reset hole of the PCB twice within 1 second.
+* **Physical reset button**: Briefly short the `RESET` and `GND` pads on the SWD header twice, or short the `BOOT` header and plug in keyboard
* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available \ No newline at end of file
diff --git a/keyboards/ergodox_ez/config.h b/keyboards/ergodox_ez/config.h
index de850a0548..b4385af15d 100644
--- a/keyboards/ergodox_ez/config.h
+++ b/keyboards/ergodox_ez/config.h
@@ -91,9 +91,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// RGB backlight
-#define DRIVER_ADDR_1 0b1110100
-#define DRIVER_ADDR_2 0b1110111
-#define DRIVER_COUNT 2
+#define DRIVER_ADDR_1 IS31FL3731_I2C_ADDRESS_GND
+#define DRIVER_ADDR_2 IS31FL3731_I2C_ADDRESS_VCC
+#define IS31FL3731_DRIVER_COUNT 2
#define DRIVER_1_LED_TOTAL 24
#define DRIVER_2_LED_TOTAL 24
#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
diff --git a/keyboards/ergodox_ez/ergodox_ez.c b/keyboards/ergodox_ez/ergodox_ez.c
index 3683128234..455d294ef5 100644
--- a/keyboards/ergodox_ez/ergodox_ez.c
+++ b/keyboards/ergodox_ez/ergodox_ez.c
@@ -243,7 +243,7 @@ const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
#ifdef RGB_MATRIX_ENABLE
// clang-format off
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3731_led_t PROGMEM g_is31fl3731_leds[RGB_MATRIX_LED_COUNT] = {
/* driver
* | R location
* | | G location
diff --git a/keyboards/ergodox_ez/keymaps/pvinis/keymap.c b/keyboards/ergodox_ez/keymaps/pvinis/keymap.c
index dcdaa7098b..b99b2c7ffc 100644
--- a/keyboards/ergodox_ez/keymaps/pvinis/keymap.c
+++ b/keyboards/ergodox_ez/keymaps/pvinis/keymap.c
@@ -20,7 +20,6 @@
#include QMK_KEYBOARD_H
#include "pvinis.h"
-#include "mousekey.h"
// layers
enum {
diff --git a/keyboards/ergodox_ez/led_i2c.c b/keyboards/ergodox_ez/led_i2c.c
index fe40ab797e..23ef91b74f 100644
--- a/keyboards/ergodox_ez/led_i2c.c
+++ b/keyboards/ergodox_ez/led_i2c.c
@@ -22,7 +22,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
# include "ergodox_ez.h"
-void rgblight_call_driver(LED_TYPE *led, uint8_t led_num) {
+void rgblight_call_driver(rgb_led_t *led, uint8_t led_num) {
i2c_init();
i2c_start(0x84, ERGODOX_EZ_I2C_TIMEOUT);
int i = 0;
diff --git a/keyboards/ergodox_ez/rules.mk b/keyboards/ergodox_ez/rules.mk
index dc72f6385c..bba3bd86ae 100644
--- a/keyboards/ergodox_ez/rules.mk
+++ b/keyboards/ergodox_ez/rules.mk
@@ -21,7 +21,7 @@ RGB_MATRIX_ENABLE = no # enable later
# project specific files
SRC += matrix.c \
led_i2c.c
-QUANTUM_LIB_SRC += i2c_master.c
+I2C_DRIVER_REQUIRED = yes
# Disable unsupported hardware
AUDIO_SUPPORTED = no
diff --git a/keyboards/ergodox_stm32/rules.mk b/keyboards/ergodox_stm32/rules.mk
index 5b86324f9a..5481eef1a2 100644
--- a/keyboards/ergodox_stm32/rules.mk
+++ b/keyboards/ergodox_stm32/rules.mk
@@ -16,4 +16,4 @@ CUSTOM_MATRIX = yes # Custom matrix file
UNICODE_ENABLE = yes # Unicode
SRC += matrix.c
-QUANTUM_LIB_SRC += i2c_master.c
+I2C_DRIVER_REQUIRED = yes
diff --git a/keyboards/ergoslab/keymaps/default/keymap.c b/keyboards/ergoslab/keymaps/default/keymap.c
index 093d586eba..e2a9f0b322 100644
--- a/keyboards/ergoslab/keymaps/default/keymap.c
+++ b/keyboards/ergoslab/keymaps/default/keymap.c
@@ -16,7 +16,7 @@ enum layer_names {
#endif
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [BASE] = LAYOUT_ergoslab(
+ [BASE] = LAYOUT(
KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,
KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,
KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH,
@@ -24,7 +24,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_LBRC, KC_LPRN, KC_ESC, MO(MDIA),KC_RGUI, KC_TAB, TG(MOUS), KC_BSPC, KC_RPRN, KC_RBRC
),
- [MDIA] = LAYOUT_ergoslab(
+ [MDIA] = LAYOUT(
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10,
_______, _______, _______, _______, KC_F11, KC_F12, KC_HOME, KC_PGDN, KC_PGUP, KC_END,
_______, _______, _______, _______, _______, RGB_TOG, _______, _______, _______, KC_MUTE,
@@ -32,7 +32,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
- [NUMB] = LAYOUT_ergoslab(
+ [NUMB] = LAYOUT(
KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_BSLS, KC_PIPE,
KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,
KC_UNDS, KC_MINS, KC_PLUS, KC_EQL, KC_GRV, KC_COLN, KC_TILD, _______, _______, _______,
@@ -40,7 +40,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
- [MOUS] = LAYOUT_ergoslab(
+ [MOUS] = LAYOUT(
_______, _______, KC_MS_U, _______, _______, _______, _______, KC_WH_U, _______, _______,
_______, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, KC_BTN3, KC_WH_D, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
diff --git a/keyboards/ergoslab/rev1/info.json b/keyboards/ergoslab/rev1/info.json
index e92dd4dccc..51c522043b 100644
--- a/keyboards/ergoslab/rev1/info.json
+++ b/keyboards/ergoslab/rev1/info.json
@@ -24,8 +24,11 @@
},
"processor": "atmega32u4",
"bootloader": "caterina",
+ "layout_aliases": {
+ "LAYOUT_ergoslab": "LAYOUT"
+ },
"layouts": {
- "LAYOUT_ergoslab": {
+ "LAYOUT": {
"layout": [
{"matrix": [0, 0], "x": 0, "y": 0.625},
{"matrix": [0, 1], "x": 1, "y": 0.125},
diff --git a/keyboards/evolv/info.json b/keyboards/evolv/info.json
index dc00260cf3..4274e9e437 100644
--- a/keyboards/evolv/info.json
+++ b/keyboards/evolv/info.json
@@ -40,8 +40,12 @@
},
"processor": "STM32F072",
"bootloader": "stm32-dfu",
+ "layout_aliases": {
+ "LAYOUT_evolv_ansi": "LAYOUT_ansi",
+ "LAYOUT_iso_ansi": "LAYOUT_iso"
+ },
"layouts": {
- "LAYOUT_evolv_ansi": {
+ "LAYOUT_ansi": {
"layout": [
{"matrix": [0, 0], "x": 0, "y": 0},
@@ -150,7 +154,7 @@
{"matrix": [5, 14], "x": 15, "y": 5.5}
]
},
- "LAYOUT_evolv_iso": {
+ "LAYOUT_iso": {
"layout": [
{"matrix": [0, 0], "x": 0, "y": 0},
diff --git a/keyboards/evolv/keymaps/default/keymap.c b/keyboards/evolv/keymaps/default/keymap.c
index 2286627041..d049c356b9 100755
--- a/keyboards/evolv/keymaps/default/keymap.c
+++ b/keyboards/evolv/keymaps/default/keymap.c
@@ -17,35 +17,19 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include QMK_KEYBOARD_H
-#define MEDIA_KEY_DELAY 100
-
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [0] = LAYOUT_evolv_ansi(
+ [0] = LAYOUT_ansi(
KC_ESC , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 , KC_INS ,
- KC_GRV , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_MINS, KC_EQL , KC_BSPC, KC_BSPC, KC_DEL , KC_VOLU,
+ KC_GRV , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_MINS, KC_EQL , KC_BSPC, KC_BSPC, KC_DEL , KC_VOLU,
KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, KC_MPRV, KC_MPLY, KC_MNXT,
KC_CAPS, KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN, KC_QUOT, KC_ENT , KC_PGDN, KC_VOLD,
KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSFT, KC_UP , MO(1) ,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
- [1] = LAYOUT_evolv_ansi(
+ [1] = LAYOUT_ansi(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_MOD, RGB_TOG, RGB_MOD,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAD,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_TRNS,
- _______, _______, _______, _______, _______, _______, _______, _______, _______),
- [2] = LAYOUT_evolv_ansi(
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______),
- [3] = LAYOUT_evolv_ansi(
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______)
};
diff --git a/keyboards/evolv/keymaps/gondolindrim/keymap.c b/keyboards/evolv/keymaps/gondolindrim/keymap.c
index bf0944fbd1..992901a86d 100755
--- a/keyboards/evolv/keymaps/gondolindrim/keymap.c
+++ b/keyboards/evolv/keymaps/gondolindrim/keymap.c
@@ -145,28 +145,28 @@ Due to the way rgblight.c stores to and re-stores RGB configurations from EEPROM
Adapt this at will with the caveat that you should not have more nor less than four layers. And let's be honest, if you find yourself needing more than four layers on a 75% keyboard you are probably doing something wrong.
*/
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [0] = LAYOUT_evolv_iso(
+ [0] = LAYOUT_iso(
KC_ESC , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 , KC_INS ,
KC_GRV , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_MINS, KC_EQL , KC_BSPC, KC_BSPC, KC_DEL , ENCNTH,
KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_LBRC, KC_RBRC, KC_ENT , KC_PGUP, ENCWST , ENCCLK, ENCEST,
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_PGDN, ENCSTH,
KC_LSFT, KC_BSLS, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSFT, KC_UP , MO(1) ,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
- [1] = LAYOUT_evolv_iso(
+ [1] = LAYOUT_iso(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, ENCNTH,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, ENCWST , ENCCLK, ENCEST,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, ENCSTH,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_TRNS,
_______, _______, _______, _______, _______, _______, _______, _______, _______),
- [2] = LAYOUT_evolv_iso(
+ [2] = LAYOUT_iso(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, ENCNTH,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, ENCWST , ENCCLK, ENCEST,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, ENCSTH,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______),
- [3] = LAYOUT_evolv_iso(
+ [3] = LAYOUT_iso(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, ENCNTH,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, ENCWST , ENCCLK, ENCEST,
diff --git a/keyboards/evolv/keymaps/iso/keymap.c b/keyboards/evolv/keymaps/iso/keymap.c
index 391bcdf5bb..379b9a51ca 100755
--- a/keyboards/evolv/keymaps/iso/keymap.c
+++ b/keyboards/evolv/keymaps/iso/keymap.c
@@ -17,35 +17,19 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include QMK_KEYBOARD_H
-#define MEDIA_KEY_DELAY 100
-
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [0] = LAYOUT_evolv_iso(
+ [0] = LAYOUT_iso(
KC_ESC , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 , KC_INS ,
- KC_GRV , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_MINS, KC_EQL , KC_BSPC, KC_BSPC, KC_DEL , KC_VOLU,
+ KC_GRV , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_MINS, KC_EQL , KC_BSPC, KC_BSPC, KC_DEL , KC_VOLU,
KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_LBRC, KC_RBRC, KC_ENT , KC_PGUP, KC_MPRV, KC_MPLY, KC_MNXT,
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_PGDN, KC_VOLD,
KC_LSFT, KC_BSLS, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSFT, KC_UP , MO(1) ,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
- [1] = LAYOUT_evolv_iso(
+ [1] = LAYOUT_iso(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_MOD, RGB_TOG, RGB_MOD,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAD,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_TRNS,
- _______, _______, _______, _______, _______, _______, _______, _______, _______),
- [2] = LAYOUT_evolv_iso(
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______),
- [3] = LAYOUT_evolv_iso(
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______)
};
diff --git a/keyboards/evolv/keymaps/via/keymap.c b/keyboards/evolv/keymaps/via/keymap.c
index 391bcdf5bb..379b9a51ca 100755
--- a/keyboards/evolv/keymaps/via/keymap.c
+++ b/keyboards/evolv/keymaps/via/keymap.c
@@ -17,35 +17,19 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include QMK_KEYBOARD_H
-#define MEDIA_KEY_DELAY 100
-
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [0] = LAYOUT_evolv_iso(
+ [0] = LAYOUT_iso(
KC_ESC , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 , KC_INS ,
- KC_GRV , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_MINS, KC_EQL , KC_BSPC, KC_BSPC, KC_DEL , KC_VOLU,
+ KC_GRV , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_MINS, KC_EQL , KC_BSPC, KC_BSPC, KC_DEL , KC_VOLU,
KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_LBRC, KC_RBRC, KC_ENT , KC_PGUP, KC_MPRV, KC_MPLY, KC_MNXT,
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_PGDN, KC_VOLD,
KC_LSFT, KC_BSLS, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSFT, KC_UP , MO(1) ,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
- [1] = LAYOUT_evolv_iso(
+ [1] = LAYOUT_iso(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_MOD, RGB_TOG, RGB_MOD,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAD,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_TRNS,
- _______, _______, _______, _______, _______, _______, _______, _______, _______),
- [2] = LAYOUT_evolv_iso(
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______),
- [3] = LAYOUT_evolv_iso(
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______)
};
diff --git a/keyboards/evyd13/atom47/rev5/config.h b/keyboards/evyd13/atom47/rev5/config.h
index f50975beb3..5f9fda9bbf 100644
--- a/keyboards/evyd13/atom47/rev5/config.h
+++ b/keyboards/evyd13/atom47/rev5/config.h
@@ -38,18 +38,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
//#define NO_ACTION_TAPPING
//#define NO_ACTION_ONESHOT
-// This is a 7-bit address, that gets left-shifted and bit 0
-// set to 0 for write, 1 for read (as per I2C protocol)
-// The address will vary depending on your wiring:
-// 00 <-> GND
-// 01 <-> SCL
-// 10 <-> SDA
-// 11 <-> VCC
-// ADDR1 represents A1:A0 of the 7-bit address.
-// ADDR2 represents A3:A2 of the 7-bit address.
-// The result is: 0b101(ADDR2)(ADDR1)
-#define DRIVER_ADDR_1 0b1010000
-#define DRIVER_COUNT 1
+#define DRIVER_ADDR_1 IS31FL3733_I2C_ADDRESS_GND_GND
+#define IS31FL3733_DRIVER_COUNT 1
#define RGB_MATRIX_LED_COUNT 64
// RGB Matrix Animation modes. Explicitly enabled
diff --git a/keyboards/evyd13/atom47/rev5/rev5.c b/keyboards/evyd13/atom47/rev5/rev5.c
index adec48e6bb..7bf2a961ff 100644
--- a/keyboards/evyd13/atom47/rev5/rev5.c
+++ b/keyboards/evyd13/atom47/rev5/rev5.c
@@ -17,7 +17,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "quantum.h"
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3733_led_t PROGMEM g_is31fl3733_leds[RGB_MATRIX_LED_COUNT] = {
/* Refer to IS31 manual for these locations
* driver
* | R location
diff --git a/keyboards/exclusive/e6_rgb/config.h b/keyboards/exclusive/e6_rgb/config.h
index 7f820b2cad..37a251b3f0 100644
--- a/keyboards/exclusive/e6_rgb/config.h
+++ b/keyboards/exclusive/e6_rgb/config.h
@@ -4,7 +4,7 @@
*/
#pragma once
-#define DRIVER_ADDR_1 0b1010000
+#define DRIVER_ADDR_1 IS31FL3733_I2C_ADDRESS_GND_GND
-#define DRIVER_COUNT 1
+#define IS31FL3733_DRIVER_COUNT 1
#define RGB_MATRIX_LED_COUNT 63
diff --git a/keyboards/exclusive/e6_rgb/e6_rgb.c b/keyboards/exclusive/e6_rgb/e6_rgb.c
index 2da1fbce68..f34f40cc1f 100644
--- a/keyboards/exclusive/e6_rgb/e6_rgb.c
+++ b/keyboards/exclusive/e6_rgb/e6_rgb.c
@@ -7,7 +7,7 @@ void matrix_init_kb(void) {
matrix_init_user();
}
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3733_led_t PROGMEM g_is31fl3733_leds[RGB_MATRIX_LED_COUNT] = {
/* Refer to IS31 manual for these locations
* driver
* | R location
diff --git a/keyboards/eyeohdesigns/babyv/info.json b/keyboards/eyeohdesigns/babyv/info.json
index 453cdf2c81..14f52889ba 100644
--- a/keyboards/eyeohdesigns/babyv/info.json
+++ b/keyboards/eyeohdesigns/babyv/info.json
@@ -34,6 +34,48 @@
"twinkle": true
}
},
+ "rgb_matrix": {
+ "driver": "ws2812",
+ "animations": {
+ "gradient_up_down": true,
+ "gradient_left_right": true,
+ "breathing": true,
+ "band_sat": true,
+ "band_val": true,
+ "band_spiral_sat": true,
+ "band_spiral_val": true,
+ "cycle_all": true,
+ "cycle_left_right": true,
+ "cycle_up_down": true,
+ "cycle_out_in": true,
+ "cycle_pinwheel": true,
+ "raindrops": true,
+ "jellybean_raindrops": true,
+ "hue_breathing": true,
+ "hue_pendulum": true,
+ "hue_wave": true,
+ "pixel_rain": true,
+ "pixel_flow": true
+ },
+ "layout": [
+ {"x": 123, "y": 74, "flags": 2},
+ {"x": 188, "y": 67, "flags": 2},
+ {"x": 206, "y": 62, "flags": 2},
+ {"x": 206, "y": 0, "flags": 2},
+ {"x": 175, "y": 0, "flags": 2},
+ {"x": 141, "y": 0, "flags": 2},
+ {"x": 83, "y": 0, "flags": 2},
+ {"x": 65, "y": 0, "flags": 2},
+ {"x": 18, "y": 0, "flags": 2},
+ {"x": 18, "y": 62, "flags": 2},
+ {"x": 40, "y": 67, "flags": 2},
+ {"x": 99, "y": 74, "flags": 2}
+ ],
+ "sat_steps": 8,
+ "val_steps": 8,
+ "led_count": 12,
+ "center_point": [112, 38]
+ },
"ws2812": {
"pin": "B7"
},
diff --git a/keyboards/fallacy/config.h b/keyboards/fallacy/config.h
index 21231c7c57..eff0cc4f50 100755
--- a/keyboards/fallacy/config.h
+++ b/keyboards/fallacy/config.h
@@ -18,8 +18,8 @@
/* IS31FL3731 driver address (for status LEDs)
* Using the default defines here, but using a custom implementation
*/
-#define LED_DRIVER_ADDR_1 0b1110100
-#define LED_DRIVER_COUNT 1
+#define LED_DRIVER_ADDR_1 IS31FL3731_I2C_ADDRESS_GND
+#define IS31FL3731_DRIVER_COUNT 1
#define LED_MATRIX_LED_COUNT 3
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap
diff --git a/keyboards/fallacy/indicators.c b/keyboards/fallacy/indicators.c
index b9a4a87056..607be8cd85 100755
--- a/keyboards/fallacy/indicators.c
+++ b/keyboards/fallacy/indicators.c
@@ -54,7 +54,7 @@ void set_fallacy_led(int index, bool state) {
/* define LED matrix
*/
-const is31_led PROGMEM g_is31_leds[LED_MATRIX_LED_COUNT] = {
+const is31fl3731_led_t PROGMEM g_is31fl3731_leds[LED_MATRIX_LED_COUNT] = {
{0, C1_1},
{0, C2_1},
{0, C3_1},
diff --git a/keyboards/fallacy/rules.mk b/keyboards/fallacy/rules.mk
index 704204983c..7fa230bae2 100755
--- a/keyboards/fallacy/rules.mk
+++ b/keyboards/fallacy/rules.mk
@@ -14,4 +14,4 @@ AUDIO_ENABLE = no # Audio output
# project specific files
SRC += indicators.c \
drivers/led/issi/is31fl3731-simple.c
-QUANTUM_LIB_SRC += i2c_master.c
+I2C_DRIVER_REQUIRED = yes
diff --git a/keyboards/fc660c/actuation_point.c b/keyboards/fc660c/actuation_point.c
deleted file mode 100644
index 5f4cb16f40..0000000000
--- a/keyboards/fc660c/actuation_point.c
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
-Copyright 2017 Balz Guenat
-based on work by Jun Wako <wakojun@gmail.com>
-
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "actuation_point.h"
-#include "i2c.h"
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// AD5258 I2C digital potentiometer
-// http://www.analog.com/media/en/technical-documentation/data-sheets/AD5258.pdf
-//
-#define AD5258_ADDR 0b0011000
-#define AD5258_INST_RDAC 0x00
-#define AD5258_INST_EEPROM 0x20
-
-uint8_t read_rdac(void) {
- // read RDAC register
- i2c_start_write(AD5258_ADDR);
- i2c_master_write(AD5258_INST_RDAC);
- i2c_start_read(AD5258_ADDR);
- uint8_t ret = i2c_master_read(I2C_NACK);
- i2c_master_stop();
- return ret;
-};
-
-uint8_t read_eeprom(void) {
- i2c_start_write(AD5258_ADDR);
- i2c_master_write(AD5258_INST_EEPROM);
- i2c_start_read(AD5258_ADDR);
- uint8_t ret = i2c_master_read(I2C_NACK);
- i2c_master_stop();
- return ret;
-};
-
-void write_rdac(uint8_t rdac) {
- // write RDAC register:
- i2c_start_write(AD5258_ADDR);
- i2c_master_write(AD5258_INST_RDAC);
- i2c_master_write(rdac & 0x3F);
- i2c_master_stop();
-};
-
-void actuation_point_up(void) {
- // write RDAC register: lower value makes actuation point shallow
- uint8_t rdac = read_rdac();
- if (rdac == 0)
- write_rdac(0);
- else
- write_rdac(rdac-1);
-};
-
-void actuation_point_down(void) {
- // write RDAC register: higher value makes actuation point deep
- uint8_t rdac = read_rdac();
- if (rdac == 63)
- write_rdac(63);
- else
- write_rdac(rdac+1);
-};
-
-void adjust_actuation_point(int offset) {
- i2c_master_init();
- uint8_t rdac = read_eeprom() + offset;
- if (rdac > 63) { // protects from under and overflows
- if (offset > 0)
- write_rdac(63);
- else
- write_rdac(0);
- } else {
- write_rdac(rdac);
- }
-}
diff --git a/keyboards/fc660c/ad5258.c b/keyboards/fc660c/ad5258.c
new file mode 100644
index 0000000000..b1df75789b
--- /dev/null
+++ b/keyboards/fc660c/ad5258.c
@@ -0,0 +1,52 @@
+/*
+Copyright 2017 Balz Guenat
+based on work by Jun Wako <wakojun@gmail.com>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "ad5258.h"
+#include "i2c_master.h"
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// AD5258 I2C digital potentiometer
+// http://www.analog.com/media/en/technical-documentation/data-sheets/AD5258.pdf
+//
+#define AD5258_I2C_ADDRESS 0x18
+#define AD5258_INST_RDAC 0x00
+#define AD5258_INST_EEPROM 0x20
+
+void ad5258_init(void) {
+ i2c_init();
+}
+
+uint8_t ad5258_read_rdac(void) {
+ // read RDAC register
+ uint8_t ret = 0;
+ i2c_readReg(AD5258_I2C_ADDRESS, AD5258_INST_RDAC, &ret, 1, 100);
+ return ret;
+}
+
+uint8_t ad5258_read_eeprom(void) {
+ uint8_t ret = 0;
+ i2c_readReg(AD5258_I2C_ADDRESS, AD5258_INST_EEPROM, &ret, 1, 100);
+ return ret;
+}
+
+void ad5258_write_rdac(uint8_t rdac) {
+ // write RDAC register:
+ uint8_t data = rdac & 0x3F;
+ i2c_writeReg(AD5258_I2C_ADDRESS, AD5258_INST_RDAC, &data, 1, 100);
+}
diff --git a/keyboards/dyz/dyz_tkl/config.h b/keyboards/fc660c/ad5258.h
index 7e7ca8b694..c27f247675 100644
--- a/keyboards/dyz/dyz_tkl/config.h
+++ b/keyboards/fc660c/ad5258.h
@@ -1,5 +1,5 @@
/*
-Copyright 2021 dayatz
+Copyright 2017 Balz Guenat
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -17,4 +17,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once
-#define DYNAMIC_KEYMAP_LAYER_COUNT 3
+#include <stdint.h>
+
+void ad5258_init(void);
+
+uint8_t ad5258_read_rdac(void);
+
+uint8_t ad5258_read_eeprom(void);
+
+void ad5258_write_rdac(uint8_t rdac);
diff --git a/keyboards/fc660c/config.h b/keyboards/fc660c/config.h
index cd23bdb2b8..beff84d9be 100644
--- a/keyboards/fc660c/config.h
+++ b/keyboards/fc660c/config.h
@@ -27,8 +27,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
* These options are also useful to firmware size reduction.
*/
-#define USE_I2C
-
/* disable debug print */
//#define NO_DEBUG
diff --git a/keyboards/fc660c/fc660c.c b/keyboards/fc660c/fc660c.c
index 2054cd2818..50540cbfb9 100644
--- a/keyboards/fc660c/fc660c.c
+++ b/keyboards/fc660c/fc660c.c
@@ -14,16 +14,47 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "quantum.h"
-#ifdef ACTUATION_DEPTH_ADJUSTMENT
-#include "actuation_point.h"
-#endif
+#include "fc660c.h"
-void matrix_init_kb(void) {
#ifdef ACTUATION_DEPTH_ADJUSTMENT
+void matrix_init_kb(void) {
adjust_actuation_point(ACTUATION_DEPTH_ADJUSTMENT);
-#endif
- matrix_init_user();
+ matrix_init_user();
+}
+
+void actuation_point_up(void) {
+ // write RDAC register: lower value makes actuation point shallow
+ uint8_t rdac = ad5258_read_rdac();
+ if (rdac == 0) {
+ ad5258_write_rdac(0);
+ } else {
+ ad5258_write_rdac(rdac - 1);
+ }
+}
+
+void actuation_point_down(void) {
+ // write RDAC register: higher value makes actuation point deep
+ uint8_t rdac = ad5258_read_rdac();
+ if (rdac == 63) {
+ ad5258_write_rdac(63);
+ } else {
+ ad5258_write_rdac(rdac + 1);
+ }
}
+
+void adjust_actuation_point(int offset) {
+ ad5258_init();
+ uint8_t rdac = ad5258_read_eeprom() + offset;
+ if (rdac > 63) { // protects from under and overflows
+ if (offset > 0) {
+ ad5258_write_rdac(63);
+ } else {
+ ad5258_write_rdac(0);
+ }
+ } else {
+ ad5258_write_rdac(rdac);
+ }
+}
+#endif
diff --git a/keyboards/fc660c/actuation_point.h b/keyboards/fc660c/fc660c.h
index e02832186c..aa98e36be9 100644
--- a/keyboards/fc660c/actuation_point.h
+++ b/keyboards/fc660c/fc660c.h
@@ -17,13 +17,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once
-#include <stdint.h>
+#include "quantum.h"
+
+#ifdef ACTUATION_DEPTH_ADJUSTMENT
+# include "ad5258.h"
// see keymaps/actuation-point-example to see how these functions can be used.
-uint8_t read_rdac(void);
-uint8_t read_eeprom(void);
void actuation_point_up(void);
void actuation_point_down(void);
// be careful with this.
void adjust_actuation_point(int offset);
+#endif
diff --git a/keyboards/fc660c/i2c.c b/keyboards/fc660c/i2c.c
deleted file mode 100644
index 084c890c40..0000000000
--- a/keyboards/fc660c/i2c.c
+++ /dev/null
@@ -1,162 +0,0 @@
-#include <util/twi.h>
-#include <avr/io.h>
-#include <stdlib.h>
-#include <avr/interrupt.h>
-#include <util/twi.h>
-#include <stdbool.h>
-#include "i2c.h"
-
-#ifdef USE_I2C
-
-// Limits the amount of we wait for any one i2c transaction.
-// Since were running SCL line 100kHz (=> 10μs/bit), and each transactions is
-// 9 bits, a single transaction will take around 90μs to complete.
-//
-// (F_CPU/SCL_CLOCK) => # of μC cycles to transfer a bit
-// poll loop takes at least 8 clock cycles to execute
-#define I2C_LOOP_TIMEOUT (9+1)*(F_CPU/SCL_CLOCK)/8
-
-#define BUFFER_POS_INC() (slave_buffer_pos = (slave_buffer_pos+1)%SLAVE_BUFFER_SIZE)
-
-volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE];
-
-static volatile uint8_t slave_buffer_pos;
-static volatile bool slave_has_register_set = false;
-
-// Wait for an i2c operation to finish
-inline static
-void i2c_delay(void) {
- uint16_t lim = 0;
- while(!(TWCR & (1<<TWINT)) && lim < I2C_LOOP_TIMEOUT)
- lim++;
-
- // easier way, but will wait slightly longer
- // _delay_us(100);
-}
-
-// Setup twi to run at 100kHz
-void i2c_master_init(void) {
- // no prescaler
- TWSR = 0;
- // Set TWI clock frequency to SCL_CLOCK. Need TWBR>10.
- // Check datasheets for more info.
- TWBR = ((F_CPU/SCL_CLOCK)-16)/2;
-}
-
-// Start a transaction with the given i2c slave address. The direction of the
-// transfer is set with I2C_READ and I2C_WRITE.
-// returns: 0 => success
-// 1 => error
-uint8_t i2c_master_start(uint8_t address) {
- TWCR = (1<<TWINT) | (1<<TWEN) | (1<<TWSTA);
-
- i2c_delay();
-
- // check that we started successfully
- if ( (TW_STATUS != TW_START) && (TW_STATUS != TW_REP_START))
- return 1;
-
- TWDR = address;
- TWCR = (1<<TWINT) | (1<<TWEN);
-
- i2c_delay();
-
- if ( (TW_STATUS != TW_MT_SLA_ACK) && (TW_STATUS != TW_MR_SLA_ACK) )
- return 1; // slave did not acknowledge
- else
- return 0; // success
-}
-
-
-// Finish the i2c transaction.
-void i2c_master_stop(void) {
- TWCR = (1<<TWINT) | (1<<TWEN) | (1<<TWSTO);
-
- uint16_t lim = 0;
- while(!(TWCR & (1<<TWSTO)) && lim < I2C_LOOP_TIMEOUT)
- lim++;
-}
-
-// Write one byte to the i2c slave.
-// returns 0 => slave ACK
-// 1 => slave NACK
-uint8_t i2c_master_write(uint8_t data) {
- TWDR = data;
- TWCR = (1<<TWINT) | (1<<TWEN);
-
- i2c_delay();
-
- // check if the slave acknowledged us
- return (TW_STATUS == TW_MT_DATA_ACK) ? 0 : 1;
-}
-
-// Read one byte from the i2c slave. If ack=1 the slave is acknowledged,
-// if ack=0 the acknowledge bit is not set.
-// returns: byte read from i2c device
-uint8_t i2c_master_read(int ack) {
- TWCR = (1<<TWINT) | (1<<TWEN) | (ack<<TWEA);
-
- i2c_delay();
- return TWDR;
-}
-
-void i2c_reset_state(void) {
- TWCR = 0;
-}
-
-void i2c_slave_init(uint8_t address) {
- TWAR = address << 0; // slave i2c address
- // TWEN - twi enable
- // TWEA - enable address acknowledgement
- // TWINT - twi interrupt flag
- // TWIE - enable the twi interrupt
- TWCR = (1<<TWIE) | (1<<TWEA) | (1<<TWINT) | (1<<TWEN);
-}
-
-ISR(TWI_vect);
-
-ISR(TWI_vect) {
- uint8_t ack = 1;
- switch(TW_STATUS) {
- case TW_SR_SLA_ACK:
- // this device has been addressed as a slave receiver
- slave_has_register_set = false;
- break;
-
- case TW_SR_DATA_ACK:
- // this device has received data as a slave receiver
- // The first byte that we receive in this transaction sets the location
- // of the read/write location of the slaves memory that it exposes over
- // i2c. After that, bytes will be written at slave_buffer_pos, incrementing
- // slave_buffer_pos after each write.
- if(!slave_has_register_set) {
- slave_buffer_pos = TWDR;
- // don't acknowledge the master if this memory loctaion is out of bounds
- if ( slave_buffer_pos >= SLAVE_BUFFER_SIZE ) {
- ack = 0;
- slave_buffer_pos = 0;
- }
- slave_has_register_set = true;
- } else {
- i2c_slave_buffer[slave_buffer_pos] = TWDR;
- BUFFER_POS_INC();
- }
- break;
-
- case TW_ST_SLA_ACK:
- case TW_ST_DATA_ACK:
- // master has addressed this device as a slave transmitter and is
- // requesting data.
- TWDR = i2c_slave_buffer[slave_buffer_pos];
- BUFFER_POS_INC();
- break;
-
- case TW_BUS_ERROR: // something went wrong, reset twi state
- TWCR = 0;
- default:
- break;
- }
- // Reset everything, so we are ready for the next TWI interrupt
- TWCR |= (1<<TWIE) | (1<<TWINT) | (ack<<TWEA) | (1<<TWEN);
-}
-#endif
diff --git a/keyboards/fc660c/i2c.h b/keyboards/fc660c/i2c.h
deleted file mode 100644
index 8910e70f10..0000000000
--- a/keyboards/fc660c/i2c.h
+++ /dev/null
@@ -1,46 +0,0 @@
-#pragma once
-
-#include <stdint.h>
-
-#ifndef F_CPU
-#define F_CPU 16000000UL
-#endif
-
-#define I2C_READ 1
-#define I2C_WRITE 0
-
-#define I2C_ACK 1
-#define I2C_NACK 0
-
-#define SLAVE_BUFFER_SIZE 0x10
-
-// i2c SCL clock frequency
-#define SCL_CLOCK 400000L
-
-extern volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE];
-
-void i2c_master_init(void);
-uint8_t i2c_master_start(uint8_t address);
-void i2c_master_stop(void);
-uint8_t i2c_master_write(uint8_t data);
-uint8_t i2c_master_read(int);
-void i2c_reset_state(void);
-void i2c_slave_init(uint8_t address);
-
-
-static inline unsigned char i2c_start_read(unsigned char addr) {
- return i2c_master_start((addr << 1) | I2C_READ);
-}
-
-static inline unsigned char i2c_start_write(unsigned char addr) {
- return i2c_master_start((addr << 1) | I2C_WRITE);
-}
-
-// from SSD1306 scrips
-extern unsigned char i2c_rep_start(unsigned char addr);
-extern void i2c_start_wait(unsigned char addr);
-extern unsigned char i2c_readAck(void);
-extern unsigned char i2c_readNak(void);
-extern unsigned char i2c_read(unsigned char ack);
-
-#define i2c_read(ack) (ack) ? i2c_readAck() : i2c_readNak();
diff --git a/keyboards/fc660c/rules.mk b/keyboards/fc660c/rules.mk
index ed4a7ca66d..03a674d668 100644
--- a/keyboards/fc660c/rules.mk
+++ b/keyboards/fc660c/rules.mk
@@ -11,7 +11,7 @@ NKRO_ENABLE = yes # Enable N-Key Rollover
# Optimize size but this may cause error "relocation truncated to fit"
#EXTRALDFLAGS = -Wl,--relax
+I2C_DRIVER_REQUIRED = yes
+
CUSTOM_MATRIX = yes
-SRC += matrix.c \
- actuation_point.c \
- i2c.c
+SRC += matrix.c ad5258.c
diff --git a/keyboards/fc980c/actuation_point.c b/keyboards/fc980c/actuation_point.c
deleted file mode 100644
index 5f4cb16f40..0000000000
--- a/keyboards/fc980c/actuation_point.c
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
-Copyright 2017 Balz Guenat
-based on work by Jun Wako <wakojun@gmail.com>
-
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "actuation_point.h"
-#include "i2c.h"
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// AD5258 I2C digital potentiometer
-// http://www.analog.com/media/en/technical-documentation/data-sheets/AD5258.pdf
-//
-#define AD5258_ADDR 0b0011000
-#define AD5258_INST_RDAC 0x00
-#define AD5258_INST_EEPROM 0x20
-
-uint8_t read_rdac(void) {
- // read RDAC register
- i2c_start_write(AD5258_ADDR);
- i2c_master_write(AD5258_INST_RDAC);
- i2c_start_read(AD5258_ADDR);
- uint8_t ret = i2c_master_read(I2C_NACK);
- i2c_master_stop();
- return ret;
-};
-
-uint8_t read_eeprom(void) {
- i2c_start_write(AD5258_ADDR);
- i2c_master_write(AD5258_INST_EEPROM);
- i2c_start_read(AD5258_ADDR);
- uint8_t ret = i2c_master_read(I2C_NACK);
- i2c_master_stop();
- return ret;
-};
-
-void write_rdac(uint8_t rdac) {
- // write RDAC register:
- i2c_start_write(AD5258_ADDR);
- i2c_master_write(AD5258_INST_RDAC);
- i2c_master_write(rdac & 0x3F);
- i2c_master_stop();
-};
-
-void actuation_point_up(void) {
- // write RDAC register: lower value makes actuation point shallow
- uint8_t rdac = read_rdac();
- if (rdac == 0)
- write_rdac(0);
- else
- write_rdac(rdac-1);
-};
-
-void actuation_point_down(void) {
- // write RDAC register: higher value makes actuation point deep
- uint8_t rdac = read_rdac();
- if (rdac == 63)
- write_rdac(63);
- else
- write_rdac(rdac+1);
-};
-
-void adjust_actuation_point(int offset) {
- i2c_master_init();
- uint8_t rdac = read_eeprom() + offset;
- if (rdac > 63) { // protects from under and overflows
- if (offset > 0)
- write_rdac(63);
- else
- write_rdac(0);
- } else {
- write_rdac(rdac);
- }
-}
diff --git a/keyboards/fc980c/ad5258.c b/keyboards/fc980c/ad5258.c
new file mode 100644
index 0000000000..b1df75789b
--- /dev/null
+++ b/keyboards/fc980c/ad5258.c
@@ -0,0 +1,52 @@
+/*
+Copyright 2017 Balz Guenat
+based on work by Jun Wako <wakojun@gmail.com>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "ad5258.h"
+#include "i2c_master.h"
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// AD5258 I2C digital potentiometer
+// http://www.analog.com/media/en/technical-documentation/data-sheets/AD5258.pdf
+//
+#define AD5258_I2C_ADDRESS 0x18
+#define AD5258_INST_RDAC 0x00
+#define AD5258_INST_EEPROM 0x20
+
+void ad5258_init(void) {
+ i2c_init();
+}
+
+uint8_t ad5258_read_rdac(void) {
+ // read RDAC register
+ uint8_t ret = 0;
+ i2c_readReg(AD5258_I2C_ADDRESS, AD5258_INST_RDAC, &ret, 1, 100);
+ return ret;
+}
+
+uint8_t ad5258_read_eeprom(void) {
+ uint8_t ret = 0;
+ i2c_readReg(AD5258_I2C_ADDRESS, AD5258_INST_EEPROM, &ret, 1, 100);
+ return ret;
+}
+
+void ad5258_write_rdac(uint8_t rdac) {
+ // write RDAC register:
+ uint8_t data = rdac & 0x3F;
+ i2c_writeReg(AD5258_I2C_ADDRESS, AD5258_INST_RDAC, &data, 1, 100);
+}
diff --git a/keyboards/dyz/dyz40/config.h b/keyboards/fc980c/ad5258.h
index 7e7ca8b694..c27f247675 100644
--- a/keyboards/dyz/dyz40/config.h
+++ b/keyboards/fc980c/ad5258.h
@@ -1,5 +1,5 @@
/*
-Copyright 2021 dayatz
+Copyright 2017 Balz Guenat
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -17,4 +17,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once
-#define DYNAMIC_KEYMAP_LAYER_COUNT 3
+#include <stdint.h>
+
+void ad5258_init(void);
+
+uint8_t ad5258_read_rdac(void);
+
+uint8_t ad5258_read_eeprom(void);
+
+void ad5258_write_rdac(uint8_t rdac);
diff --git a/keyboards/fc980c/config.h b/keyboards/fc980c/config.h
index 7c0c3b31a6..776b8ef35f 100644
--- a/keyboards/fc980c/config.h
+++ b/keyboards/fc980c/config.h
@@ -30,8 +30,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
* These options are also useful to firmware size reduction.
*/
-#define USE_I2C
-
/* disable debug print */
//#define NO_DEBUG
diff --git a/keyboards/fc980c/fc980c.c b/keyboards/fc980c/fc980c.c
index fc3696f244..c1c62da9ac 100644
--- a/keyboards/fc980c/fc980c.c
+++ b/keyboards/fc980c/fc980c.c
@@ -15,16 +15,46 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "quantum.h"
+#include "fc980c.h"
#ifdef ACTUATION_DEPTH_ADJUSTMENT
-#include "actuation_point.h"
-#endif
-
void matrix_init_kb(void) {
-#ifdef ACTUATION_DEPTH_ADJUSTMENT
adjust_actuation_point(ACTUATION_DEPTH_ADJUSTMENT);
-#endif
- matrix_init_user();
+ matrix_init_user();
+}
+
+void actuation_point_up(void) {
+ // write RDAC register: lower value makes actuation point shallow
+ uint8_t rdac = ad5258_read_rdac();
+ if (rdac == 0) {
+ ad5258_write_rdac(0);
+ } else {
+ ad5258_write_rdac(rdac - 1);
+ }
}
+
+void actuation_point_down(void) {
+ // write RDAC register: higher value makes actuation point deep
+ uint8_t rdac = ad5258_read_rdac();
+ if (rdac == 63) {
+ ad5258_write_rdac(63);
+ } else {
+ ad5258_write_rdac(rdac + 1);
+ }
+}
+
+void adjust_actuation_point(int offset) {
+ ad5258_init();
+ uint8_t rdac = ad5258_read_eeprom() + offset;
+ if (rdac > 63) { // protects from under and overflows
+ if (offset > 0) {
+ ad5258_write_rdac(63);
+ } else {
+ ad5258_write_rdac(0);
+ }
+ } else {
+ ad5258_write_rdac(rdac);
+ }
+}
+#endif
diff --git a/keyboards/fc980c/actuation_point.h b/keyboards/fc980c/fc980c.h
index e02832186c..aa98e36be9 100644
--- a/keyboards/fc980c/actuation_point.h
+++ b/keyboards/fc980c/fc980c.h
@@ -17,13 +17,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once
-#include <stdint.h>
+#include "quantum.h"
+
+#ifdef ACTUATION_DEPTH_ADJUSTMENT
+# include "ad5258.h"
// see keymaps/actuation-point-example to see how these functions can be used.
-uint8_t read_rdac(void);
-uint8_t read_eeprom(void);
void actuation_point_up(void);
void actuation_point_down(void);
// be careful with this.
void adjust_actuation_point(int offset);
+#endif
diff --git a/keyboards/fc980c/i2c.c b/keyboards/fc980c/i2c.c
deleted file mode 100644
index 084c890c40..0000000000
--- a/keyboards/fc980c/i2c.c
+++ /dev/null
@@ -1,162 +0,0 @@
-#include <util/twi.h>
-#include <avr/io.h>
-#include <stdlib.h>
-#include <avr/interrupt.h>
-#include <util/twi.h>
-#include <stdbool.h>
-#include "i2c.h"
-
-#ifdef USE_I2C
-
-// Limits the amount of we wait for any one i2c transaction.
-// Since were running SCL line 100kHz (=> 10μs/bit), and each transactions is
-// 9 bits, a single transaction will take around 90μs to complete.
-//
-// (F_CPU/SCL_CLOCK) => # of μC cycles to transfer a bit
-// poll loop takes at least 8 clock cycles to execute
-#define I2C_LOOP_TIMEOUT (9+1)*(F_CPU/SCL_CLOCK)/8
-
-#define BUFFER_POS_INC() (slave_buffer_pos = (slave_buffer_pos+1)%SLAVE_BUFFER_SIZE)
-
-volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE];
-
-static volatile uint8_t slave_buffer_pos;
-static volatile bool slave_has_register_set = false;
-
-// Wait for an i2c operation to finish
-inline static
-void i2c_delay(void) {
- uint16_t lim = 0;
- while(!(TWCR & (1<<TWINT)) && lim < I2C_LOOP_TIMEOUT)
- lim++;
-
- // easier way, but will wait slightly longer
- // _delay_us(100);
-}
-
-// Setup twi to run at 100kHz
-void i2c_master_init(void) {
- // no prescaler
- TWSR = 0;
- // Set TWI clock frequency to SCL_CLOCK. Need TWBR>10.
- // Check datasheets for more info.
- TWBR = ((F_CPU/SCL_CLOCK)-16)/2;
-}
-
-// Start a transaction with the given i2c slave address. The direction of the
-// transfer is set with I2C_READ and I2C_WRITE.
-// returns: 0 => success
-// 1 => error
-uint8_t i2c_master_start(uint8_t address) {
- TWCR = (1<<TWINT) | (1<<TWEN) | (1<<TWSTA);
-
- i2c_delay();
-
- // check that we started successfully
- if ( (TW_STATUS != TW_START) && (TW_STATUS != TW_REP_START))
- return 1;
-
- TWDR = address;
- TWCR = (1<<TWINT) | (1<<TWEN);
-
- i2c_delay();
-
- if ( (TW_STATUS != TW_MT_SLA_ACK) && (TW_STATUS != TW_MR_SLA_ACK) )
- return 1; // slave did not acknowledge
- else
- return 0; // success
-}
-
-
-// Finish the i2c transaction.
-void i2c_master_stop(void) {
- TWCR = (1<<TWINT) | (1<<TWEN) | (1<<TWSTO);
-
- uint16_t lim = 0;
- while(!(TWCR & (1<<TWSTO)) && lim < I2C_LOOP_TIMEOUT)
- lim++;
-}
-
-// Write one byte to the i2c slave.
-// returns 0 => slave ACK
-// 1 => slave NACK
-uint8_t i2c_master_write(uint8_t data) {
- TWDR = data;
- TWCR = (1<<TWINT) | (1<<TWEN);
-
- i2c_delay();
-
- // check if the slave acknowledged us
- return (TW_STATUS == TW_MT_DATA_ACK) ? 0 : 1;
-}
-
-// Read one byte from the i2c slave. If ack=1 the slave is acknowledged,
-// if ack=0 the acknowledge bit is not set.
-// returns: byte read from i2c device
-uint8_t i2c_master_read(int ack) {
- TWCR = (1<<TWINT) | (1<<TWEN) | (ack<<TWEA);
-
- i2c_delay();
- return TWDR;
-}
-
-void i2c_reset_state(void) {
- TWCR = 0;
-}
-
-void i2c_slave_init(uint8_t address) {
- TWAR = address << 0; // slave i2c address
- // TWEN - twi enable
- // TWEA - enable address acknowledgement
- // TWINT - twi interrupt flag
- // TWIE - enable the twi interrupt
- TWCR = (1<<TWIE) | (1<<TWEA) | (1<<TWINT) | (1<<TWEN);
-}
-
-ISR(TWI_vect);
-
-ISR(TWI_vect) {
- uint8_t ack = 1;
- switch(TW_STATUS) {
- case TW_SR_SLA_ACK:
- // this device has been addressed as a slave receiver
- slave_has_register_set = false;
- break;
-
- case TW_SR_DATA_ACK:
- // this device has received data as a slave receiver
- // The first byte that we receive in this transaction sets the location
- // of the read/write location of the slaves memory that it exposes over
- // i2c. After that, bytes will be written at slave_buffer_pos, incrementing
- // slave_buffer_pos after each write.
- if(!slave_has_register_set) {
- slave_buffer_pos = TWDR;
- // don't acknowledge the master if this memory loctaion is out of bounds
- if ( slave_buffer_pos >= SLAVE_BUFFER_SIZE ) {
- ack = 0;
- slave_buffer_pos = 0;
- }
- slave_has_register_set = true;
- } else {
- i2c_slave_buffer[slave_buffer_pos] = TWDR;
- BUFFER_POS_INC();
- }
- break;
-
- case TW_ST_SLA_ACK:
- case TW_ST_DATA_ACK:
- // master has addressed this device as a slave transmitter and is
- // requesting data.
- TWDR = i2c_slave_buffer[slave_buffer_pos];
- BUFFER_POS_INC();
- break;
-
- case TW_BUS_ERROR: // something went wrong, reset twi state
- TWCR = 0;
- default:
- break;
- }
- // Reset everything, so we are ready for the next TWI interrupt
- TWCR |= (1<<TWIE) | (1<<TWINT) | (ack<<TWEA) | (1<<TWEN);
-}
-#endif
diff --git a/keyboards/fc980c/i2c.h b/keyboards/fc980c/i2c.h
deleted file mode 100644
index 8910e70f10..0000000000
--- a/keyboards/fc980c/i2c.h
+++ /dev/null
@@ -1,46 +0,0 @@
-#pragma once
-
-#include <stdint.h>
-
-#ifndef F_CPU
-#define F_CPU 16000000UL
-#endif
-
-#define I2C_READ 1
-#define I2C_WRITE 0
-
-#define I2C_ACK 1
-#define I2C_NACK 0
-
-#define SLAVE_BUFFER_SIZE 0x10
-
-// i2c SCL clock frequency
-#define SCL_CLOCK 400000L
-
-extern volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE];
-
-void i2c_master_init(void);
-uint8_t i2c_master_start(uint8_t address);
-void i2c_master_stop(void);
-uint8_t i2c_master_write(uint8_t data);
-uint8_t i2c_master_read(int);
-void i2c_reset_state(void);
-void i2c_slave_init(uint8_t address);
-
-
-static inline unsigned char i2c_start_read(unsigned char addr) {
- return i2c_master_start((addr << 1) | I2C_READ);
-}
-
-static inline unsigned char i2c_start_write(unsigned char addr) {
- return i2c_master_start((addr << 1) | I2C_WRITE);
-}
-
-// from SSD1306 scrips
-extern unsigned char i2c_rep_start(unsigned char addr);
-extern void i2c_start_wait(unsigned char addr);
-extern unsigned char i2c_readAck(void);
-extern unsigned char i2c_readNak(void);
-extern unsigned char i2c_read(unsigned char ack);
-
-#define i2c_read(ack) (ack) ? i2c_readAck() : i2c_readNak();
diff --git a/keyboards/fc980c/keymaps/actuation-point-example/config.h b/keyboards/fc980c/keymaps/actuation-point-example/config.h
index c2a538b6ae..a4ecab70fd 100644
--- a/keyboards/fc980c/keymaps/actuation-point-example/config.h
+++ b/keyboards/fc980c/keymaps/actuation-point-example/config.h
@@ -14,11 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
-
-
-// place overrides here
+#pragma once
// higher value means deeper actuation point, less sensitive
// be careful and only make small adjustments (steps of 1 or 2).
@@ -27,5 +23,3 @@
// this should probably stay in the range +/-5.
#undef ACTUATION_DEPTH_ADJUSTMENT
#define ACTUATION_DEPTH_ADJUSTMENT +1
-
-#endif
diff --git a/keyboards/fc980c/keymaps/actuation-point-example/keymap.c b/keyboards/fc980c/keymaps/actuation-point-example/keymap.c
index 85e782d625..50b6a9ff40 100644
--- a/keyboards/fc980c/keymaps/actuation-point-example/keymap.c
+++ b/keyboards/fc980c/keymaps/actuation-point-example/keymap.c
@@ -15,7 +15,6 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include QMK_KEYBOARD_H
-#include "actuation_point.h"
enum custom_keycodes
{
@@ -62,12 +61,12 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record)
}
case AP_READ_RDAC:
{
- xprintf("RDAC: %d", read_rdac());
+ xprintf("RDAC: %d", ad5258_read_rdac());
return false;
}
case AP_READ_EEPROM:
{
- xprintf("EEPROM: %d", read_eeprom());
+ xprintf("EEPROM: %d", ad5258_read_eeprom());
return false;
}
diff --git a/keyboards/fc980c/rules.mk b/keyboards/fc980c/rules.mk
index ed4a7ca66d..03a674d668 100644
--- a/keyboards/fc980c/rules.mk
+++ b/keyboards/fc980c/rules.mk
@@ -11,7 +11,7 @@ NKRO_ENABLE = yes # Enable N-Key Rollover
# Optimize size but this may cause error "relocation truncated to fit"
#EXTRALDFLAGS = -Wl,--relax
+I2C_DRIVER_REQUIRED = yes
+
CUSTOM_MATRIX = yes
-SRC += matrix.c \
- actuation_point.c \
- i2c.c
+SRC += matrix.c ad5258.c
diff --git a/keyboards/feker/ik75/config.h b/keyboards/feker/ik75/config.h
index a9914722fc..c266bf757e 100644
--- a/keyboards/feker/ik75/config.h
+++ b/keyboards/feker/ik75/config.h
@@ -25,9 +25,9 @@
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
/* RGB Matrix config */
- #define DRIVER_ADDR_1 0b1011111
- #define DRIVER_ADDR_2 0b1010000
- #define DRIVER_COUNT 2
+ #define DRIVER_ADDR_1 IS31FL3733_I2C_ADDRESS_VCC_VCC
+ #define DRIVER_ADDR_2 IS31FL3733_I2C_ADDRESS_GND_GND
+ #define IS31FL3733_DRIVER_COUNT 2
#define DRIVER_1_LED_TOTAL 63
#define DRIVER_2_LED_TOTAL 64
diff --git a/keyboards/feker/ik75/ik75.c b/keyboards/feker/ik75/ik75.c
index 98b24abfe8..826afab01b 100644
--- a/keyboards/feker/ik75/ik75.c
+++ b/keyboards/feker/ik75/ik75.c
@@ -18,7 +18,7 @@
#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3733_led_t PROGMEM g_is31fl3733_leds[RGB_MATRIX_LED_COUNT] = {
/* Refer to IS31 manual for these locations
* driver
* | G location
diff --git a/keyboards/ferris/0_1/rules.mk b/keyboards/ferris/0_1/rules.mk
index 487375928e..f971aa9a48 100644
--- a/keyboards/ferris/0_1/rules.mk
+++ b/keyboards/ferris/0_1/rules.mk
@@ -16,4 +16,4 @@ NO_USB_STARTUP_CHECK = yes
LTO_ENABLE = yes
SRC += matrix.c
-QUANTUM_LIB_SRC += i2c_master.c
+I2C_DRIVER_REQUIRED = yes
diff --git a/keyboards/ferris/0_2/bling/bling.c b/keyboards/ferris/0_2/bling/bling.c
index 8af1d33e85..07f58149cc 100644
--- a/keyboards/ferris/0_2/bling/bling.c
+++ b/keyboards/ferris/0_2/bling/bling.c
@@ -27,7 +27,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
| | 4 | | || | | 4 | |
| 6 | | | 2 || 2 | | | 5 |
*/
-const is31_led g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3731_led_t g_is31fl3731_leds[RGB_MATRIX_LED_COUNT] = {
/* Refer to IS31 manual for these locations
* driver
* | R location
diff --git a/keyboards/ferris/0_2/bling/config.h b/keyboards/ferris/0_2/bling/config.h
index cbb3b11c90..382c4c1e00 100644
--- a/keyboards/ferris/0_2/bling/config.h
+++ b/keyboards/ferris/0_2/bling/config.h
@@ -18,9 +18,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once
/* LED Drivers */
-#define DRIVER_ADDR_1 0b1110100
-#define DRIVER_ADDR_2 0b1110101
-#define DRIVER_COUNT 2
+#define DRIVER_ADDR_1 IS31FL3731_I2C_ADDRESS_GND
+#define DRIVER_ADDR_2 IS31FL3731_I2C_ADDRESS_SCL
+#define IS31FL3731_DRIVER_COUNT 2
#define DRIVER_1_LED_TOTAL 7
#define DRIVER_2_LED_TOTAL 7
#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
diff --git a/keyboards/ferris/0_2/rules.mk b/keyboards/ferris/0_2/rules.mk
index f3760b7b62..6f67e3dece 100644
--- a/keyboards/ferris/0_2/rules.mk
+++ b/keyboards/ferris/0_2/rules.mk
@@ -16,6 +16,6 @@ NO_USB_STARTUP_CHECK = yes
LTO_ENABLE = no
SRC += matrix.c
-QUANTUM_LIB_SRC += i2c_master.c
+I2C_DRIVER_REQUIRED = yes
DEFAULT_FOLDER = ferris/0_2/base
diff --git a/keyboards/flashquark/horizon_z/config.h b/keyboards/flashquark/horizon_z/config.h
index 8828834d74..f087af93c2 100755
--- a/keyboards/flashquark/horizon_z/config.h
+++ b/keyboards/flashquark/horizon_z/config.h
@@ -72,7 +72,7 @@
// # define ENABLE_RGB_MATRIX_SOLID_SPLASH
// # define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
-# define DRIVER_ADDR_1 0b1010000
-# define DRIVER_COUNT 1
+# define DRIVER_ADDR_1 IS31FL3733_I2C_ADDRESS_GND_GND
+# define IS31FL3733_DRIVER_COUNT 1
# define RGB_MATRIX_LED_COUNT 62
#endif
diff --git a/keyboards/flashquark/horizon_z/horizon_z.c b/keyboards/flashquark/horizon_z/horizon_z.c
index da62deaf29..a9faa5a943 100755
--- a/keyboards/flashquark/horizon_z/horizon_z.c
+++ b/keyboards/flashquark/horizon_z/horizon_z.c
@@ -17,7 +17,7 @@
#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3733_led_t PROGMEM g_is31fl3733_leds[RGB_MATRIX_LED_COUNT] = {
{0, B_1, A_1, C_1},
{0, B_2, A_2, C_2},
{0, B_3, A_3, C_3},
diff --git a/keyboards/frobiac/blackbowl/rules.mk b/keyboards/frobiac/blackbowl/rules.mk
index 6004c37f9e..4e81c7280c 100644
--- a/keyboards/frobiac/blackbowl/rules.mk
+++ b/keyboards/frobiac/blackbowl/rules.mk
@@ -1,7 +1,7 @@
CUSTOM_MATRIX = lite
# project specific files
-QUANTUM_LIB_SRC += i2c_master.c
+I2C_DRIVER_REQUIRED = yes
SRC += matrix.c
PS2_MOUSE_ENABLE = yes
diff --git a/keyboards/frooastboard/walnut/config.h b/keyboards/frooastboard/walnut/config.h
index 2703ec1e37..f60c57dec5 100644
--- a/keyboards/frooastboard/walnut/config.h
+++ b/keyboards/frooastboard/walnut/config.h
@@ -3,14 +3,10 @@
#pragma once
-#define ISSI_TIMEOUT 100
-#define ISSI_PERSISTENCE 0
-#define ISSI_PWM_FREQUENCY 0b010
-#define ISSI_SWPULLUP PUR_0R
-#define ISSI_CSPULLUP PUR_0R
-#define DRIVER_COUNT 1
+#define IS31FL3737_PWM_FREQUENCY IS31FL3737_PWM_FREQUENCY_26K7_HZ
+#define IS31FL3737_DRIVER_COUNT 1
#define RGB_MATRIX_LED_COUNT 48
-#define DRIVER_ADDR_1 0b1010000
+#define DRIVER_ADDR_1 IS31FL3737_I2C_ADDRESS_GND
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 191
diff --git a/keyboards/frooastboard/walnut/walnut.c b/keyboards/frooastboard/walnut/walnut.c
index 7163af011d..48d1677f7a 100644
--- a/keyboards/frooastboard/walnut/walnut.c
+++ b/keyboards/frooastboard/walnut/walnut.c
@@ -5,7 +5,7 @@
#if defined(RGB_MATRIX_ENABLE)
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3737_led_t PROGMEM g_is31fl3737_leds[RGB_MATRIX_LED_COUNT] = {
/* Refer to IS31 manual for these locations
* driver
* | R location
diff --git a/keyboards/gboards/butterstick/sten.h b/keyboards/gboards/butterstick/sten.h
index 84c54c9e2e..42ccdd8e69 100644
--- a/keyboards/gboards/butterstick/sten.h
+++ b/keyboards/gboards/butterstick/sten.h
@@ -8,9 +8,7 @@
#pragma once
#include QMK_KEYBOARD_H
-#include "mousekey.h"
#include "keymap_steno.h"
-#include "wait.h"
extern size_t keymapsCount; // Total keymaps
extern uint32_t cChord; // Current Chord
diff --git a/keyboards/gboards/ergotaco/rules.mk b/keyboards/gboards/ergotaco/rules.mk
index 2df8900c2d..6fbefbd22d 100644
--- a/keyboards/gboards/ergotaco/rules.mk
+++ b/keyboards/gboards/ergotaco/rules.mk
@@ -7,4 +7,5 @@ COMMAND_ENABLE = yes
# know what you're doing.
#
# No touchy, capiche?
-SRC += matrix.c i2c_master.c
+SRC += matrix.c
+I2C_DRIVER_REQUIRED = yes
diff --git a/keyboards/gboards/georgi/rules.mk b/keyboards/gboards/georgi/rules.mk
index 5980342669..5b63e269fa 100644
--- a/keyboards/gboards/georgi/rules.mk
+++ b/keyboards/gboards/georgi/rules.mk
@@ -14,4 +14,5 @@ CUSTOM_MATRIX = yes
STENO_ENABLE = yes
LTO_ENABLE = yes
-SRC += matrix.c i2c_master.c
+SRC += matrix.c
+I2C_DRIVER_REQUIRED = yes \ No newline at end of file
diff --git a/keyboards/gboards/georgi/sten.h b/keyboards/gboards/georgi/sten.h
index b5aa79893e..44a6472044 100644
--- a/keyboards/gboards/georgi/sten.h
+++ b/keyboards/gboards/georgi/sten.h
@@ -7,9 +7,7 @@
#pragma once
#include "georgi.h"
-#include "mousekey.h"
#include "keymap_steno.h"
-#include "wait.h"
extern size_t keymapsCount; // Total keymaps
extern uint32_t cChord; // Current Chord
diff --git a/keyboards/gboards/gergo/keymaps/colemak/rules.mk b/keyboards/gboards/gergo/keymaps/colemak/rules.mk
index 3b81fdfa1b..db8d965292 100644
--- a/keyboards/gboards/gergo/keymaps/colemak/rules.mk
+++ b/keyboards/gboards/gergo/keymaps/colemak/rules.mk
@@ -18,7 +18,8 @@ DEBUG_MATRIX = no
# know what you're doing.
#
# No touchy, capiche?
-SRC += matrix.c i2c_master.c
+SRC += matrix.c
+I2C_DRIVER_REQUIRED = yes
ifneq ($(strip $(BALLSTEP)),)
OPT_DEFS += -DTRKSTEP=$(strip $(BALLSTEP))
endif
diff --git a/keyboards/gboards/gergo/keymaps/default/rules.mk b/keyboards/gboards/gergo/keymaps/default/rules.mk
index bc2b3cf43b..6f203da1bd 100644
--- a/keyboards/gboards/gergo/keymaps/default/rules.mk
+++ b/keyboards/gboards/gergo/keymaps/default/rules.mk
@@ -18,7 +18,8 @@ DEBUG_MATRIX = yes
# know what you're doing.
#
# No touchy, capiche?
-SRC += matrix.c i2c_master.c
+SRC += matrix.c
+I2C_DRIVER_REQUIRED = yes
ifneq ($(strip $(BALLSTEP)),)
OPT_DEFS += -DTRKSTEP=$(strip $(BALLSTEP))
endif
diff --git a/keyboards/gboards/gergo/keymaps/germ/rules.mk b/keyboards/gboards/gergo/keymaps/germ/rules.mk
index 0fd941bb53..c100f8ab64 100644
--- a/keyboards/gboards/gergo/keymaps/germ/rules.mk
+++ b/keyboards/gboards/gergo/keymaps/germ/rules.mk
@@ -18,7 +18,8 @@ DEBUG_MATRIX = no
# know what you're doing.
#
# No touchy, capiche?
-SRC += matrix.c i2c_master.c
+SRC += matrix.c
+I2C_DRIVER_REQUIRED = yes
ifneq ($(strip $(BALLSTEP)),)
OPT_DEFS += -DTRKSTEP=$(strip $(BALLSTEP))
endif
diff --git a/keyboards/gboards/gergo/keymaps/gotham/rules.mk b/keyboards/gboards/gergo/keymaps/gotham/rules.mk
index bc2b3cf43b..6f203da1bd 100644
--- a/keyboards/gboards/gergo/keymaps/gotham/rules.mk
+++ b/keyboards/gboards/gergo/keymaps/gotham/rules.mk
@@ -18,7 +18,8 @@ DEBUG_MATRIX = yes
# know what you're doing.
#
# No touchy, capiche?
-SRC += matrix.c i2c_master.c
+SRC += matrix.c
+I2C_DRIVER_REQUIRED = yes
ifneq ($(strip $(BALLSTEP)),)
OPT_DEFS += -DTRKSTEP=$(strip $(BALLSTEP))
endif
diff --git a/keyboards/gboards/gergo/rules.mk b/keyboards/gboards/gergo/rules.mk
index 195915e431..d789b349da 100644
--- a/keyboards/gboards/gergo/rules.mk
+++ b/keyboards/gboards/gergo/rules.mk
@@ -8,4 +8,4 @@ COMMAND_ENABLE = yes
BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
SRC += matrix.c
-QUANTUM_LIB_SRC += i2c_master.c
+I2C_DRIVER_REQUIRED = yes
diff --git a/keyboards/gboards/gergoplex/rules.mk b/keyboards/gboards/gergoplex/rules.mk
index adf5cfd2e7..9846c64771 100644
--- a/keyboards/gboards/gergoplex/rules.mk
+++ b/keyboards/gboards/gergoplex/rules.mk
@@ -13,4 +13,4 @@ AUDIO_ENABLE = no # Audio output
CUSTOM_MATRIX = yes
SRC += matrix.c
-QUANTUM_LIB_SRC += i2c_master.c
+I2C_DRIVER_REQUIRED = yes
diff --git a/keyboards/geekboards/tester/config.h b/keyboards/geekboards/tester/config.h
index 0fea806b6f..5933471b8c 100644
--- a/keyboards/geekboards/tester/config.h
+++ b/keyboards/geekboards/tester/config.h
@@ -55,9 +55,9 @@
// # define ENABLE_RGB_MATRIX_SOLID_SPLASH
// # define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
-# define DRIVER_ADDR_1 0b1110100
-# define DRIVER_ADDR_2 0b1110101
-# define DRIVER_COUNT 2
+# define DRIVER_ADDR_1 IS31FL3731_I2C_ADDRESS_GND
+# define DRIVER_ADDR_2 IS31FL3731_I2C_ADDRESS_SCL
+# define IS31FL3731_DRIVER_COUNT 2
# define DRIVER_1_LED_TOTAL 8
# define DRIVER_2_LED_TOTAL 0
# define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
diff --git a/keyboards/geekboards/tester/tester.c b/keyboards/geekboards/tester/tester.c
index 05b220250f..187d887d58 100644
--- a/keyboards/geekboards/tester/tester.c
+++ b/keyboards/geekboards/tester/tester.c
@@ -1,6 +1,6 @@
#include "quantum.h"
-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/keyboards/geistmaschine/macropod/rules.mk b/keyboards/geistmaschine/macropod/rules.mk
index cf2b38601e..53d35b5bc6 100644
--- a/keyboards/geistmaschine/macropod/rules.mk
+++ b/keyboards/geistmaschine/macropod/rules.mk
@@ -2,4 +2,4 @@ CUSTOM_MATRIX = lite
VPATH += drivers/gpio
SRC += pca9555.c matrix.c
-QUANTUM_LIB_SRC += i2c_master.c \ No newline at end of file
+I2C_DRIVER_REQUIRED = yes \ No newline at end of file
diff --git a/keyboards/geonworks/frogmini/fmh/info.json b/keyboards/geonworks/frogmini/fmh/info.json
index a8c0645a70..7b381bc587 100644
--- a/keyboards/geonworks/frogmini/fmh/info.json
+++ b/keyboards/geonworks/frogmini/fmh/info.json
@@ -13,6 +13,9 @@
"rows": ["A3", "A2", "A1", "B8", "A7", "C0"]
},
"diode_direction": "COL2ROW",
+ "eeprom": {
+ "driver": "i2c"
+ },
"processor": "STM32F401",
"bootloader": "stm32-dfu",
"layout_aliases": {
diff --git a/keyboards/geonworks/frogmini/fmh/rules.mk b/keyboards/geonworks/frogmini/fmh/rules.mk
index 1f63f8feef..1775ec5c41 100644
--- a/keyboards/geonworks/frogmini/fmh/rules.mk
+++ b/keyboards/geonworks/frogmini/fmh/rules.mk
@@ -13,6 +13,3 @@ LTO_ENABLE = no
ENCODER_ENABLE = no
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
-
-EEPROM_DRIVER = i2c
-
diff --git a/keyboards/geonworks/frogmini/fms/info.json b/keyboards/geonworks/frogmini/fms/info.json
index b64392cc23..ada9188e37 100644
--- a/keyboards/geonworks/frogmini/fms/info.json
+++ b/keyboards/geonworks/frogmini/fms/info.json
@@ -13,6 +13,9 @@
"rows": ["A3", "A2", "A1", "B8", "A7", "C0"]
},
"diode_direction": "COL2ROW",
+ "eeprom": {
+ "driver": "i2c"
+ },
"backlight": {
"pin": "A10",
"levels": 20
diff --git a/keyboards/geonworks/frogmini/fms/rules.mk b/keyboards/geonworks/frogmini/fms/rules.mk
index dfd36d0f82..19b8048589 100644
--- a/keyboards/geonworks/frogmini/fms/rules.mk
+++ b/keyboards/geonworks/frogmini/fms/rules.mk
@@ -13,6 +13,3 @@ LTO_ENABLE = no
ENCODER_ENABLE = no
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
-
-EEPROM_DRIVER = i2c
-
diff --git a/keyboards/gizmo_engineering/gk6/config.h b/keyboards/gizmo_engineering/gk6/config.h
index ba683e4fed..dfd9f0c703 100755
--- a/keyboards/gizmo_engineering/gk6/config.h
+++ b/keyboards/gizmo_engineering/gk6/config.h
@@ -18,10 +18,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once
// RGB Matrix
-#define DRIVER_ADDR_1 0b1110100
-#define DRIVER_ADDR_2 0b1110111
+#define DRIVER_ADDR_1 IS31FL3731_I2C_ADDRESS_GND
+#define DRIVER_ADDR_2 IS31FL3731_I2C_ADDRESS_VCC
-#define DRIVER_COUNT 2
+#define IS31FL3731_DRIVER_COUNT 2
#define DRIVER_1_LED_TOTAL 32
#define DRIVER_2_LED_TOTAL 32
#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
diff --git a/keyboards/gizmo_engineering/gk6/gk6.c b/keyboards/gizmo_engineering/gk6/gk6.c
index e28f5d43c7..18883727b8 100755
--- a/keyboards/gizmo_engineering/gk6/gk6.c
+++ b/keyboards/gizmo_engineering/gk6/gk6.c
@@ -17,7 +17,7 @@
#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3731_led_t PROGMEM g_is31fl3731_leds[RGB_MATRIX_LED_COUNT] = {
{0, C1_8, C2_8, C3_8}, //0 led1
{0, C1_7, C2_7, C3_7}, //1 led2
{0, C1_6, C2_6, C3_6}, //2 led3
diff --git a/keyboards/gkeyboard/gpad8_2r/config.h b/keyboards/gkeyboard/gpad8_2r/config.h
index 0691d106b7..88debbe193 100644
--- a/keyboards/gkeyboard/gpad8_2r/config.h
+++ b/keyboards/gkeyboard/gpad8_2r/config.h
@@ -3,8 +3,6 @@
#pragma once
-#define DYNAMIC_KEYMAP_LAYER_COUNT 8
-
#define RGB_MATRIX_LED_COUNT 16
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
#define RGB_MATRIX_KEYPRESSES
diff --git a/keyboards/gkeyboard/gpad8_2r/info.json b/keyboards/gkeyboard/gpad8_2r/info.json
index 2111d58cc4..9aa63091c9 100644
--- a/keyboards/gkeyboard/gpad8_2r/info.json
+++ b/keyboards/gkeyboard/gpad8_2r/info.json
@@ -25,6 +25,9 @@
"rows": ["GP4", "GP5", "GP6"]
},
"diode_direction": "COL2ROW",
+ "dynamic_keymap": {
+ "layer_count": 8
+ },
"encoder": {
"enabled": true,
"rotary": [
diff --git a/keyboards/glenpickle/chimera_ergo/rules.mk b/keyboards/glenpickle/chimera_ergo/rules.mk
index 32eca4db31..f543b5fd9a 100644
--- a/keyboards/glenpickle/chimera_ergo/rules.mk
+++ b/keyboards/glenpickle/chimera_ergo/rules.mk
@@ -14,4 +14,4 @@ CUSTOM_MATRIX = lite
# project specific files
SRC += matrix.c
-QUANTUM_LIB_SRC += uart.c
+UART_DRIVER_REQUIRED = yes
diff --git a/keyboards/glenpickle/chimera_ls/rules.mk b/keyboards/glenpickle/chimera_ls/rules.mk
index 1ee3fc58f9..706d610653 100644
--- a/keyboards/glenpickle/chimera_ls/rules.mk
+++ b/keyboards/glenpickle/chimera_ls/rules.mk
@@ -14,7 +14,7 @@ CUSTOM_MATRIX = lite
# project specific files
SRC += matrix.c
-QUANTUM_LIB_SRC += uart.c
+UART_DRIVER_REQUIRED = yes
# Disable unsupported hardware
RGBLIGHT_SUPPORTED = no
diff --git a/keyboards/glenpickle/chimera_ortho/rules.mk b/keyboards/glenpickle/chimera_ortho/rules.mk
index 32eca4db31..f543b5fd9a 100644
--- a/keyboards/glenpickle/chimera_ortho/rules.mk
+++ b/keyboards/glenpickle/chimera_ortho/rules.mk
@@ -14,4 +14,4 @@ CUSTOM_MATRIX = lite
# project specific files
SRC += matrix.c
-QUANTUM_LIB_SRC += uart.c
+UART_DRIVER_REQUIRED = yes
diff --git a/keyboards/glenpickle/chimera_ortho_plus/rules.mk b/keyboards/glenpickle/chimera_ortho_plus/rules.mk
index 6b1876f87c..539a2d1004 100644
--- a/keyboards/glenpickle/chimera_ortho_plus/rules.mk
+++ b/keyboards/glenpickle/chimera_ortho_plus/rules.mk
@@ -15,4 +15,4 @@ CUSTOM_MATRIX = lite
# project specific files
SRC += matrix.c
-QUANTUM_LIB_SRC += uart.c
+UART_DRIVER_REQUIRED = yes
diff --git a/keyboards/gmmk/gmmk2/p65/ansi/ansi.c b/keyboards/gmmk/gmmk2/p65/ansi/ansi.c
index 2ed8874491..774006d529 100644
--- a/keyboards/gmmk/gmmk2/p65/ansi/ansi.c
+++ b/keyboards/gmmk/gmmk2/p65/ansi/ansi.c
@@ -18,8 +18,8 @@
#ifdef RGB_MATRIX_ENABLE
-const aw_led g_aw_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to IS31 manual for these locations
+const aw20216s_led_t g_aw20216s_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to AW20216S manual for these locations
* driver
* | R location
* | | G location
diff --git a/keyboards/gmmk/gmmk2/p65/ansi/info.json b/keyboards/gmmk/gmmk2/p65/ansi/info.json
index 902d1b6b5d..cd9296b81a 100644
--- a/keyboards/gmmk/gmmk2/p65/ansi/info.json
+++ b/keyboards/gmmk/gmmk2/p65/ansi/info.json
@@ -12,7 +12,7 @@
"tap_keycode_delay": 10
},
"rgb_matrix": {
- "driver": "aw20216"
+ "driver": "aw20216s"
},
"matrix_pins": {
"cols": ["A0", "A1", "A2", "A3", "A4", "A8", "A9", "A10"],
diff --git a/keyboards/gmmk/gmmk2/p65/ansi/rules.mk b/keyboards/gmmk/gmmk2/p65/ansi/rules.mk
index 1b4692a621..2d2e9895fd 100644
--- a/keyboards/gmmk/gmmk2/p65/ansi/rules.mk
+++ b/keyboards/gmmk/gmmk2/p65/ansi/rules.mk
@@ -11,5 +11,3 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality.
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow.
AUDIO_ENABLE = no # Audio output.
RGB_MATRIX_ENABLE = yes # Enable RGB matrix effects.
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = embedded_flash
diff --git a/keyboards/gmmk/gmmk2/p65/config.h b/keyboards/gmmk/gmmk2/p65/config.h
index 3c6a2fd906..37cf430a56 100644
--- a/keyboards/gmmk/gmmk2/p65/config.h
+++ b/keyboards/gmmk/gmmk2/p65/config.h
@@ -29,12 +29,12 @@
#define SPI_MOSI_PIN B15
#define SPI_MISO_PIN B14
-#define DRIVER_1_CS A15
-#define DRIVER_2_CS B9
-#define DRIVER_1_EN C13
-#define DRIVER_2_EN C13
+#define AW20216S_DRIVER_1_CS A15
+#define AW20216S_DRIVER_2_CS B9
+#define AW20216S_DRIVER_1_EN C13
+#define AW20216S_DRIVER_2_EN C13
-#define DRIVER_COUNT 2
+#define AW20216S_DRIVER_COUNT 2
#define DRIVER_1_LED_TOTAL 54
#define DRIVER_2_LED_TOTAL 34
#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
diff --git a/keyboards/gmmk/gmmk2/p65/iso/info.json b/keyboards/gmmk/gmmk2/p65/iso/info.json
index 90609dc911..c286cb7ba0 100644
--- a/keyboards/gmmk/gmmk2/p65/iso/info.json
+++ b/keyboards/gmmk/gmmk2/p65/iso/info.json
@@ -12,7 +12,7 @@
"tap_keycode_delay": 10
},
"rgb_matrix": {
- "driver": "aw20216"
+ "driver": "aw20216s"
},
"matrix_pins": {
"cols": ["A0", "A1", "A2", "A3", "A4", "A8", "A9", "A10"],
@@ -24,8 +24,9 @@
},
"processor": "WB32F3G71",
"bootloader": "wb32-dfu",
+ "community_layouts": ["65_iso_blocker"],
"layouts": {
- "LAYOUT": {
+ "LAYOUT_65_iso_blocker": {
"layout": [
{"matrix": [1, 3], "x": 0, "y": 0},
{"matrix": [1, 7], "x": 1, "y": 0},
@@ -56,7 +57,6 @@
{"matrix": [8, 0], "x": 10.5, "y": 1},
{"matrix": [8, 1], "x": 11.5, "y": 1},
{"matrix": [6, 1], "x": 12.5, "y": 1},
- {"matrix": [8, 4], "x": 13.75, "y": 1, "w": 1.25, "h": 2},
{"matrix": [2, 6], "x": 15, "y": 1},
{"matrix": [2, 1], "x": 0, "y": 2, "w": 1.75},
@@ -72,6 +72,7 @@
{"matrix": [8, 2], "x": 10.75, "y": 2},
{"matrix": [8, 3], "x": 11.75, "y": 2},
{"matrix": [7, 5], "x": 12.75, "y": 2},
+ {"matrix": [8, 4], "x": 13.75, "y": 1, "w": 1.25, "h": 2},
{"matrix": [6, 5], "x": 15, "y": 2},
{"matrix": [0, 0], "x": 0, "y": 3, "w": 1.25},
diff --git a/keyboards/gmmk/gmmk2/p65/iso/iso.c b/keyboards/gmmk/gmmk2/p65/iso/iso.c
index a296844f44..80c0dc2e0d 100644
--- a/keyboards/gmmk/gmmk2/p65/iso/iso.c
+++ b/keyboards/gmmk/gmmk2/p65/iso/iso.c
@@ -18,8 +18,8 @@
#ifdef RGB_MATRIX_ENABLE
-const aw_led g_aw_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to IS31 manual for these locations
+const aw20216s_led_t g_aw20216s_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to AW20216S manual for these locations
* driver
* | R location
* | | G location
diff --git a/keyboards/gmmk/gmmk2/p65/iso/keymaps/default/keymap.c b/keyboards/gmmk/gmmk2/p65/iso/keymaps/default/keymap.c
index 1ab85d7f0a..6a3da299a2 100644
--- a/keyboards/gmmk/gmmk2/p65/iso/keymaps/default/keymap.c
+++ b/keyboards/gmmk/gmmk2/p65/iso/keymaps/default/keymap.c
@@ -26,19 +26,19 @@ enum custom_layers {
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap _BL: Base Layer (Default Layer)
*/
-[_BL] = LAYOUT(
+[_BL] = LAYOUT_65_iso_blocker(
QK_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL,
- KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_ENT, KC_PGUP,
- KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_PGDN,
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_PGUP,
+ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, KC_PGDN,
KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT),
/* Keymap _FL: Function Layer
*/
-[_FL] = LAYOUT(
+[_FL] = LAYOUT_65_iso_blocker(
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_INS,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SCRL, KC_PAUS, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SCRL, KC_PAUS, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, RGB_HUI, RGB_HUD, RGB_SPD, RGB_SPI, KC_MUTE, KC_VOLU, KC_VOLD, KC_MPRV, KC_MPLY, KC_MNXT, _______, RGB_VAI, KC_HOME,
_______, _______, _______, QK_BOOT, _______, _______, RGB_RMOD, RGB_VAD, RGB_MOD)
};
diff --git a/keyboards/gmmk/gmmk2/p65/iso/keymaps/via/keymap.c b/keyboards/gmmk/gmmk2/p65/iso/keymaps/via/keymap.c
index 6146e7817f..f0fe740042 100644
--- a/keyboards/gmmk/gmmk2/p65/iso/keymaps/via/keymap.c
+++ b/keyboards/gmmk/gmmk2/p65/iso/keymaps/via/keymap.c
@@ -19,32 +19,32 @@
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap _BL: Base Layer (Default Layer)
*/
-[0] = LAYOUT(
+[0] = LAYOUT_65_iso_blocker(
QK_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL,
- KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_ENT, KC_PGUP,
- KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_PGDN,
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_PGUP,
+ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, KC_PGDN,
KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT),
/* Keymap _FL: Function Layer
*/
-[1] = LAYOUT(
- _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_INS,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SCRL, KC_PAUS, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+[1] = LAYOUT_65_iso_blocker(
+ _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_INS,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SCRL, KC_PAUS, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, RGB_HUI, RGB_HUD, RGB_SPD, RGB_SPI, KC_MUTE, KC_VOLU, KC_VOLD, KC_MPRV, KC_MPLY, KC_MNXT, _______, RGB_VAI, KC_HOME,
_______, _______, _______, QK_BOOT, _______, _______, RGB_RMOD, RGB_VAD, RGB_MOD),
-[2] = LAYOUT(
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+[2] = LAYOUT_65_iso_blocker(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______),
-[3] = LAYOUT(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______),
+[3] = LAYOUT_65_iso_blocker(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______)
};
diff --git a/keyboards/gmmk/gmmk2/p65/iso/rules.mk b/keyboards/gmmk/gmmk2/p65/iso/rules.mk
index 1b4692a621..2d2e9895fd 100644
--- a/keyboards/gmmk/gmmk2/p65/iso/rules.mk
+++ b/keyboards/gmmk/gmmk2/p65/iso/rules.mk
@@ -11,5 +11,3 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality.
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow.
AUDIO_ENABLE = no # Audio output.
RGB_MATRIX_ENABLE = yes # Enable RGB matrix effects.
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = embedded_flash
diff --git a/keyboards/gmmk/gmmk2/p96/ansi/ansi.c b/keyboards/gmmk/gmmk2/p96/ansi/ansi.c
index 467765e435..bc05ab6301 100644
--- a/keyboards/gmmk/gmmk2/p96/ansi/ansi.c
+++ b/keyboards/gmmk/gmmk2/p96/ansi/ansi.c
@@ -18,8 +18,8 @@
#ifdef RGB_MATRIX_ENABLE
-const aw_led g_aw_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to IS31 manual for these locations
+const aw20216s_led_t g_aw20216s_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to AW20216S manual for these locations
* driver
* | R location
* | | G location
diff --git a/keyboards/gmmk/gmmk2/p96/ansi/info.json b/keyboards/gmmk/gmmk2/p96/ansi/info.json
index cb0ecf9445..e4eaddbfe8 100644
--- a/keyboards/gmmk/gmmk2/p96/ansi/info.json
+++ b/keyboards/gmmk/gmmk2/p96/ansi/info.json
@@ -12,13 +12,20 @@
"tap_keycode_delay": 10
},
"rgb_matrix": {
- "driver": "aw20216"
+ "driver": "aw20216s"
},
"matrix_pins": {
"cols": ["A0", "A1", "A2", "A3", "A4", "A8", "A9", "A10"],
"rows": ["B0", "B1", "B2", "B3", "B4", "B5", "B6", "B7", "B8", "B9", "B10", "B11", "B12", "B13"]
},
"diode_direction": "COL2ROW",
+ "eeprom": {
+ "driver": "wear_leveling",
+ "wear_leveling": {
+ "driver": "spi_flash",
+ "backing_size": 2048
+ }
+ },
"processor": "WB32F3G71",
"bootloader": "wb32-dfu",
"layouts": {
diff --git a/keyboards/gmmk/gmmk2/p96/ansi/rules.mk b/keyboards/gmmk/gmmk2/p96/ansi/rules.mk
index a076e01916..2d2e9895fd 100644
--- a/keyboards/gmmk/gmmk2/p96/ansi/rules.mk
+++ b/keyboards/gmmk/gmmk2/p96/ansi/rules.mk
@@ -11,5 +11,3 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality.
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow.
AUDIO_ENABLE = no # Audio output.
RGB_MATRIX_ENABLE = yes # Enable RGB matrix effects.
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = spi_flash
diff --git a/keyboards/gmmk/gmmk2/p96/config.h b/keyboards/gmmk/gmmk2/p96/config.h
index e3b5cdcfa1..9a5a2bf8a4 100644
--- a/keyboards/gmmk/gmmk2/p96/config.h
+++ b/keyboards/gmmk/gmmk2/p96/config.h
@@ -25,7 +25,6 @@
/* External spi flash */
#define EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN B14
-#define WEAR_LEVELING_BACKING_SIZE 2048
/* SPI Config for LED Driver */
#define SPI_DRIVER SPIDQ
@@ -33,12 +32,12 @@
#define SPI_MOSI_PIN A7
#define SPI_MISO_PIN A6
-#define DRIVER_1_CS A15
-#define DRIVER_2_CS B15
-#define DRIVER_1_EN C13
-#define DRIVER_2_EN C13
+#define AW20216S_DRIVER_1_CS A15
+#define AW20216S_DRIVER_2_CS B15
+#define AW20216S_DRIVER_1_EN C13
+#define AW20216S_DRIVER_2_EN C13
-#define DRIVER_COUNT 2
+#define AW20216S_DRIVER_COUNT 2
#define DRIVER_1_LED_TOTAL 66
#define DRIVER_2_LED_TOTAL 54
#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
diff --git a/keyboards/gmmk/gmmk2/p96/iso/info.json b/keyboards/gmmk/gmmk2/p96/iso/info.json
index 788aa7393b..d9f53b76f1 100644
--- a/keyboards/gmmk/gmmk2/p96/iso/info.json
+++ b/keyboards/gmmk/gmmk2/p96/iso/info.json
@@ -12,13 +12,20 @@
"tap_keycode_delay": 10
},
"rgb_matrix": {
- "driver": "aw20216"
+ "driver": "aw20216s"
},
"matrix_pins": {
"cols": ["A0", "A1", "A2", "A3", "A4", "A8", "A9", "A10"],
"rows": ["B0", "B1", "B2", "B3", "B4", "B5", "B6", "B7", "B8", "B9", "B10", "B11", "B12", "B13"]
},
"diode_direction": "COL2ROW",
+ "eeprom": {
+ "driver": "wear_leveling",
+ "wear_leveling": {
+ "driver": "spi_flash",
+ "backing_size": 2048
+ }
+ },
"processor": "WB32F3G71",
"bootloader": "wb32-dfu",
"layouts": {
diff --git a/keyboards/gmmk/gmmk2/p96/iso/iso.c b/keyboards/gmmk/gmmk2/p96/iso/iso.c
index 40d28818b0..f6b3528cb4 100644
--- a/keyboards/gmmk/gmmk2/p96/iso/iso.c
+++ b/keyboards/gmmk/gmmk2/p96/iso/iso.c
@@ -18,8 +18,8 @@
#ifdef RGB_MATRIX_ENABLE
-const aw_led g_aw_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to IS31 manual for these locations
+const aw20216s_led_t g_aw20216s_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to AW20216S manual for these locations
* driver
* | R location
* | | G location
diff --git a/keyboards/gmmk/gmmk2/p96/iso/rules.mk b/keyboards/gmmk/gmmk2/p96/iso/rules.mk
index a076e01916..2d2e9895fd 100644
--- a/keyboards/gmmk/gmmk2/p96/iso/rules.mk
+++ b/keyboards/gmmk/gmmk2/p96/iso/rules.mk
@@ -11,5 +11,3 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality.
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow.
AUDIO_ENABLE = no # Audio output.
RGB_MATRIX_ENABLE = yes # Enable RGB matrix effects.
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = spi_flash
diff --git a/keyboards/gmmk/numpad/config.h b/keyboards/gmmk/numpad/config.h
index 6aa0a6c016..24a7a24a3f 100644
--- a/keyboards/gmmk/numpad/config.h
+++ b/keyboards/gmmk/numpad/config.h
@@ -28,16 +28,15 @@
#define SPI_MOSI_PIN B5
#define SPI_MISO_PIN B4
-#define DRIVER_1_CS B12
-#define DRIVER_1_EN A15
-#define DRIVER_1_PW_EN B13
+#define AW20216S_DRIVER_1_CS B12
+#define AW20216S_DRIVER_1_EN A15
+#define AW20216S_DRIVER_1_PW_EN B13
-#define DRIVER_COUNT 1
+#define AW20216S_DRIVER_COUNT 1
#define RGB_MATRIX_LED_COUNT 31
#define EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN B6
-#define WEAR_LEVELING_BACKING_SIZE 2048
#define ENABLE_RGB_MATRIX_ALPHAS_MODS
#define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN
diff --git a/keyboards/gmmk/numpad/info.json b/keyboards/gmmk/numpad/info.json
index 604a49b503..83f7d840dc 100644
--- a/keyboards/gmmk/numpad/info.json
+++ b/keyboards/gmmk/numpad/info.json
@@ -8,13 +8,20 @@
"pid": "0x5088",
"device_version": "0.0.1"
},
+ "eeprom": {
+ "driver": "wear_leveling",
+ "wear_leveling": {
+ "driver": "spi_flash",
+ "backing_size": 2048
+ }
+ },
"encoder": {
"rotary": [
{"pin_a": "A2", "pin_b": "A1"}
]
},
"rgb_matrix": {
- "driver": "aw20216"
+ "driver": "aw20216s"
},
"processor": "WB32F3G71",
"bootloader": "wb32-dfu",
diff --git a/keyboards/gmmk/numpad/numpad.c b/keyboards/gmmk/numpad/numpad.c
index f1a46170fd..e3fe8e063d 100644
--- a/keyboards/gmmk/numpad/numpad.c
+++ b/keyboards/gmmk/numpad/numpad.c
@@ -19,16 +19,13 @@
#ifdef RGB_MATRIX_ENABLE
-const aw_led g_aw_leds[RGB_MATRIX_LED_COUNT] = {
-/* Each AW20216 channel is controlled by a register at some offset between 0x00
- * and 0xD7 inclusive.
- * See drivers/awinic/aw20216.h for the mapping between register offsets and
- * driver pin locations.
+const aw20216s_led_t g_aw20216s_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to AW20216S manual for these locations
* driver
* | R location
- * | | G location
- * | | | B location
- * | | | | */
+ * | | G location
+ * | | | B location
+ * | | | | */
{0, CS4_SW1, CS5_SW1, CS6_SW1 }, // 0 NUM
{0, CS4_SW2, CS5_SW2, CS6_SW2 }, // 1 /
{0, CS7_SW1, CS8_SW1, CS9_SW1 }, // 2 *
@@ -110,12 +107,12 @@ led_config_t g_led_config = {{
2, 2, 2, 2, 2, 2, 2
} };
-# ifdef DRIVER_1_PW_EN
+# ifdef AW20216S_DRIVER_1_PW_EN
void keyboard_pre_init_user(void) {
wait_ms(2000);
- setPinOutput(DRIVER_1_PW_EN);
- writePinHigh(DRIVER_1_PW_EN);
+ setPinOutput(AW20216S_DRIVER_1_PW_EN);
+ writePinHigh(AW20216S_DRIVER_1_PW_EN);
}
# endif
diff --git a/keyboards/gmmk/numpad/rules.mk b/keyboards/gmmk/numpad/rules.mk
index 5a0d3e34f8..e30aa52954 100644
--- a/keyboards/gmmk/numpad/rules.mk
+++ b/keyboards/gmmk/numpad/rules.mk
@@ -16,9 +16,6 @@ MIDI_ENABLE = yes
RGB_MATRIX_ENABLE = yes
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = spi_flash
-
LTO_ENABLE = yes
SRC += analog.c \
diff --git a/keyboards/gmmk/pro/config.h b/keyboards/gmmk/pro/config.h
index 069823663e..6b62241839 100644
--- a/keyboards/gmmk/pro/config.h
+++ b/keyboards/gmmk/pro/config.h
@@ -26,12 +26,12 @@
#define SPI_MOSI_PIN A6
#define SPI_MISO_PIN A7
-#define DRIVER_1_CS B13
-#define DRIVER_2_CS B14
-#define DRIVER_1_EN C13
-#define DRIVER_2_EN C13
+#define AW20216S_DRIVER_1_CS B13
+#define AW20216S_DRIVER_2_CS B14
+#define AW20216S_DRIVER_1_EN C13
+#define AW20216S_DRIVER_2_EN C13
-#define DRIVER_COUNT 2
+#define AW20216S_DRIVER_COUNT 2
#define RGB_DISABLE_WHEN_USB_SUSPENDED
diff --git a/keyboards/gmmk/pro/rev1/ansi/ansi.c b/keyboards/gmmk/pro/rev1/ansi/ansi.c
index 9cd6a3739c..a06594cb88 100644
--- a/keyboards/gmmk/pro/rev1/ansi/ansi.c
+++ b/keyboards/gmmk/pro/rev1/ansi/ansi.c
@@ -136,7 +136,7 @@ led_config_t g_led_config = {{
4, 2, 2, 4, 4, 2, 2, 4, 2, 2, 4, 4, 2, 2, 4, 4, 2, 2, 4, 4, 4, 4, 4
}};
-const aw_led g_aw_leds[RGB_MATRIX_LED_COUNT] = {
+const aw20216s_led_t g_aw20216s_leds[RGB_MATRIX_LED_COUNT] = {
{0, CS1_SW1, CS2_SW1, CS3_SW1}, // 0, ESC, k13
{0, CS4_SW1, CS5_SW1, CS6_SW1}, // 1, ~, k16
{0, CS7_SW1, CS8_SW1, CS9_SW1}, // 2, Tab, k11
diff --git a/keyboards/gmmk/pro/rev1/ansi/info.json b/keyboards/gmmk/pro/rev1/ansi/info.json
index 7e0adbdb05..fc2197a0d7 100644
--- a/keyboards/gmmk/pro/rev1/ansi/info.json
+++ b/keyboards/gmmk/pro/rev1/ansi/info.json
@@ -9,7 +9,7 @@
"device_version": "0.0.1"
},
"rgb_matrix": {
- "driver": "aw20216"
+ "driver": "aw20216s"
},
"matrix_pins": {
"cols": ["A0", "A1", "A2", "A3", "A4", "A8", "A9", "A10"],
diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/mattgauf/ansi.c b/keyboards/gmmk/pro/rev1/ansi/keymaps/mattgauf/ansi.c
deleted file mode 100644
index a7ab0c9cc3..0000000000
--- a/keyboards/gmmk/pro/rev1/ansi/keymaps/mattgauf/ansi.c
+++ /dev/null
@@ -1,241 +0,0 @@
-/* Copyright 2021 Gigahawk
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-// clang-format off
-#include "ansi.h"
-
-#ifdef RGB_MATRIX_ENABLE
-led_config_t PROGMEM g_led_config = {{
- { 4, NO_LED, NO_LED, 95, 65, 79, 5, 28 },
- { 8, 2, 9, 0, 10, 75, 1, 7 },
- { 14, 3, 15, NO_LED, 16, 86, 6, 13 },
- { 20, 18, 21, 23, 22, 94, 12, 19 },
- { 25, 30, 26, 31, 27, 32, 29, 24 },
- { 41, 36, 42, 37, 43, 38, 35, 40 },
- { 46, 89, 47, 34, 48, 72, 78, 45 },
- { 52, 39, 53, 97, 54, 82, 44, 51 },
- { 58, 63, 59, 64, NO_LED, 60, 62, 57 },
- { 11, 90, 55, 17, 33, 49, NO_LED, 69 },
- { NO_LED, 85, 93, 61, 96, 66, 50, 56 }
-}, {
- {0, 0}, // 0, ESC, k13
- {0, 15}, // 1, ~, k16
- {4, 26}, // 2, Tab, k11
- {5, 38}, // 3, Caps, k21
- {9, 49}, // 4, Sh_L, k00
- {2, 61}, // 5, Ct_L, k06
- {18, 0}, // 6, F1, k26
- {14, 15}, // 7, 1, k17
- {22, 26}, // 8, Q, k10
- {25, 38}, // 9, A, k12
- {33, 49}, // 10, Z, k14
- {20, 61}, // 11, Win_L, k90
- {33, 0}, // 12, F2, k36
- {29, 15}, // 13, 2, k27
- {36, 26}, // 14, W, k20
- {40, 38}, // 15, S, k22
- {47, 49}, // 16, X, k24
- {38, 61}, // 17, Alt_L, k93
- {47, 0}, // 18, F3, k31
- {43, 15}, // 19, 3, k37
- {51, 26}, // 20, E, k30
- {54, 38}, // 21, D, k32
- {61, 49}, // 22, C, k34
- {61, 0}, // 23, F4, k33
- {58, 15}, // 24, 4, k47
- {65, 26}, // 25, R, k40
- {69, 38}, // 26, F, k42
- {76, 49}, // 27, V, k44
- {79, 0}, // 28, F5, k07
- {72, 15}, // 29, 5, k46
- {79, 26}, // 30, T, k41
- {83, 38}, // 31, G, k43
- {90, 49}, // 32, B, k45
- {92, 61}, // 33, SPACE, k94
- {94, 0}, // 34, F6, k63
- {87, 15}, // 35, 6, k56
- {94, 26}, // 36, Y, k51
- {98, 38}, // 37, H, k53
- {105, 49}, // 38, N, k55
- {108, 0}, // 39, F7, k71
- {101, 15}, // 40, 7, k57
- {108, 26}, // 41, U, k50
- {112, 38}, // 42, J, k52
- {119, 49}, // 43, M, k54
- {123, 0}, // 44, F8, k76
- {116, 15}, // 45, 8, k67
- {123, 26}, // 46, I, k60
- {126, 38}, // 47, K, k62
- {134, 49}, // 48, ,, k64
- {145, 61}, // 49, Alt_R, k95
- {141, 0}, // 50, F9, ka6
- {130, 15}, // 51, 9, k77
- {137, 26}, // 52, O, k70
- {141, 38}, // 53, L, k72
- {148, 49}, // 54, ., k74
- {159, 61}, // 55, FN, k92
- {155, 0}, // 56, F10, ka7
- {145, 15}, // 57, 0, k87
- {152, 26}, // 58, P, k80
- {155, 38}, // 59, ;, k82
- {163, 49}, // 60, ?, k85
- {170, 0}, // 61, F11, ka3
- {159, 15}, // 62, -, k86
- {166, 26}, // 63, [, k81
- {170, 38}, // 64, ", k83
- {173, 61}, // 65, Ct_R, k04
- {184, 0}, // 66, F12, ka5
- {0, 8}, // 67, LED, l01
- {224, 8}, // 68, LED, l11
- {202, 0}, // 69, Prt, k97
- {0, 15}, // 70, LED, l02
- {224, 15}, // 71, LED, l12
- {224, 15}, // 72, Del, k65
- {0, 21}, // 73, LED, l03
- {224, 21}, // 74, LED, l13
- {224, 26}, // 75, PgUp, k15
- {0, 28}, // 76, LED, l04
- {224, 28}, // 77, LED, l14
- {173, 15}, // 78, =, k66
- {220, 64}, // 79, Right, k05
- {0, 35}, // 80, LED, l05
- {224, 35}, // 81, LED, l15
- {224, 49}, // 82, End, k75
- {0, 42}, // 83, LED, l06
- {224, 42}, // 84, LED, l16
- {195, 15}, // 85, BSpc, ka1
- {224, 38}, // 86, PgDn, k25
- {0, 48}, // 87, LED, l07
- {224, 48}, // 88, LED, l17
- {181, 26}, // 89, ], k61
- {182, 49}, // 90, Sh_R, k91
- {0, 55}, // 91, LED, l08
- {224, 55}, // 92, LED, l18
- {199, 26}, // 93, \, ka2
- {206, 52}, // 94, Up, k35
- {191, 64}, // 95, Left, k03
- {193, 38}, // 96, Enter, ka4
- {206, 64} // 97, Down, k73
-}, {
- 4, 4, 4, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
- 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
- 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 4, 2, 2, 4, 2, 2,
- 4, 2, 2, 4, 4, 2, 2, 4, 2, 2, 4, 4, 2, 2, 4, 4, 2, 2, 4, 4, 4, 4, 4
-}};
-
-const aw_led g_aw_leds[RGB_MATRIX_LED_COUNT] = {
- {0, CS1_SW1, CS2_SW1, CS3_SW1}, // 0, ESC, k13
- {0, CS4_SW1, CS5_SW1, CS6_SW1}, // 1, ~, k16
- {0, CS7_SW1, CS8_SW1, CS9_SW1}, // 2, Tab, k11
- {0, CS10_SW1, CS11_SW1, CS12_SW1}, // 3, Caps, k21
- {0, CS13_SW1, CS14_SW1, CS15_SW1}, // 4, Sh_L, k00
- {0, CS16_SW1, CS17_SW1, CS18_SW1}, // 5, Ct_L, k06
- {0, CS1_SW2, CS2_SW2, CS3_SW2}, // 6, F1, k26
- {0, CS4_SW2, CS5_SW2, CS6_SW2}, // 7, 1, k17
- {0, CS7_SW2, CS8_SW2, CS9_SW2}, // 8, Q, k10
- {0, CS10_SW2, CS11_SW2, CS12_SW2}, // 9, A, k12
- {0, CS13_SW2, CS14_SW2, CS15_SW2}, // 10, Z, k14
- {0, CS16_SW2, CS17_SW2, CS18_SW2}, // 11, Win_L, k90
- {0, CS1_SW3, CS2_SW3, CS3_SW3}, // 12, F2, k36
- {0, CS4_SW3, CS5_SW3, CS6_SW3}, // 13, 2, k27
- {0, CS7_SW3, CS8_SW3, CS9_SW3}, // 14, W, k20
- {0, CS10_SW3, CS11_SW3, CS12_SW3}, // 15, S, k22
- {0, CS13_SW3, CS14_SW3, CS15_SW3}, // 16, X, k24
- {0, CS16_SW3, CS17_SW3, CS18_SW3}, // 17, Alt_L, k93
- {0, CS1_SW4, CS2_SW4, CS3_SW4}, // 18, F3, k31
- {0, CS4_SW4, CS5_SW4, CS6_SW4}, // 19, 3, k37
- {0, CS7_SW4, CS8_SW4, CS9_SW4}, // 20, E, k30
- {0, CS10_SW4, CS11_SW4, CS12_SW4}, // 21, D, k32
- {0, CS13_SW4, CS14_SW4, CS15_SW4}, // 22, C, k34
- {0, CS1_SW5, CS2_SW5, CS3_SW5}, // 23, F4, k33
- {0, CS4_SW5, CS5_SW5, CS6_SW5}, // 24, 4, k47
- {0, CS7_SW5, CS8_SW5, CS9_SW5}, // 25, R, k40
- {0, CS10_SW5, CS11_SW5, CS12_SW5}, // 26, F, k42
- {0, CS13_SW5, CS14_SW5, CS15_SW5}, // 27, V, k44
- {0, CS1_SW6, CS2_SW6, CS3_SW6}, // 28, F5, k07
- {0, CS4_SW6, CS5_SW6, CS6_SW6}, // 29, 5, k46
- {0, CS7_SW6, CS8_SW6, CS9_SW6}, // 30, T, k41
- {0, CS10_SW6, CS11_SW6, CS12_SW6}, // 31, G, k43
- {0, CS13_SW6, CS14_SW6, CS15_SW6}, // 32, B, k45
- {0, CS16_SW6, CS17_SW6, CS18_SW6}, // 33, SPACE, k94
- {0, CS1_SW7, CS2_SW7, CS3_SW7}, // 34, F6, k63
- {0, CS4_SW7, CS5_SW7, CS6_SW7}, // 35, 6, k56
- {0, CS7_SW7, CS8_SW7, CS9_SW7}, // 36, Y, k51
- {0, CS10_SW7, CS11_SW7, CS12_SW7}, // 37, H, k53
- {0, CS13_SW7, CS14_SW7, CS15_SW7}, // 38, N, k55
- {0, CS1_SW8, CS2_SW8, CS3_SW8}, // 39, F7, k71
- {0, CS4_SW8, CS5_SW8, CS6_SW8}, // 40, 7, k57
- {0, CS7_SW8, CS8_SW8, CS9_SW8}, // 41, U, k50
- {0, CS10_SW8, CS11_SW8, CS12_SW8}, // 42, J, k52
- {0, CS13_SW8, CS14_SW8, CS15_SW8}, // 43, M, k54
- {0, CS1_SW9, CS2_SW9, CS3_SW9}, // 44, F8, k76
- {0, CS4_SW9, CS5_SW9, CS6_SW9}, // 45, 8, k67
- {0, CS7_SW9, CS8_SW9, CS9_SW9}, // 46, I, k60
- {0, CS10_SW9, CS11_SW9, CS12_SW9}, // 47, K, k62
- {0, CS13_SW9, CS14_SW9, CS15_SW9}, // 48, ,, k64
- {0, CS16_SW9, CS17_SW9, CS18_SW9}, // 49, Alt_R, k95
- {0, CS1_SW10, CS2_SW10, CS3_SW10}, // 50, F9, ka6
- {0, CS4_SW10, CS5_SW10, CS6_SW10}, // 51, 9, k77
- {0, CS7_SW10, CS8_SW10, CS9_SW10}, // 52, O, k70
- {0, CS10_SW10, CS11_SW10, CS12_SW10}, // 53, L, k72
- {0, CS13_SW10, CS14_SW10, CS15_SW10}, // 54, ., k74
- {0, CS16_SW10, CS17_SW10, CS18_SW10}, // 55, FN, k92
- {0, CS1_SW11, CS2_SW11, CS3_SW11}, // 56, F10, ka7
- {0, CS4_SW11, CS5_SW11, CS6_SW11}, // 57, 0, k87
- {0, CS7_SW11, CS8_SW11, CS9_SW11}, // 58, P, k80
- {0, CS10_SW11, CS11_SW11, CS12_SW11}, // 59, ;, k82
- {0, CS13_SW11, CS14_SW11, CS15_SW11}, // 60, ?, k85
- {0, CS1_SW12, CS2_SW12, CS3_SW12}, // 61, F11, ka3
- {0, CS4_SW12, CS5_SW12, CS6_SW12}, // 62, -, k86
- {0, CS7_SW12, CS8_SW12, CS9_SW12}, // 63, [, k81
- {0, CS10_SW12, CS11_SW12, CS12_SW12}, // 64, ", k83
- {0, CS16_SW12, CS17_SW12, CS18_SW12}, // 65, Ct_R, k04
-
- {1, CS1_SW1, CS2_SW1, CS3_SW1}, // 66, F12, ka5
- {1, CS13_SW1, CS14_SW1, CS15_SW1}, // 67, LED, l01
- {1, CS16_SW1, CS17_SW1, CS18_SW1}, // 68, LED, l11
- {1, CS4_SW2, CS5_SW2, CS6_SW2}, // 69, Prt, k97
- {1, CS13_SW2, CS14_SW2, CS15_SW2}, // 70, LED, l02
- {1, CS16_SW2, CS17_SW2, CS18_SW2}, // 71, LED, l12
- {1, CS4_SW3, CS5_SW3, CS6_SW3}, // 72, Del, k65
- {1, CS13_SW3, CS14_SW3, CS15_SW3}, // 73, LED, l03
- {1, CS16_SW3, CS17_SW3, CS18_SW3}, // 74, LED, l13
- {1, CS4_SW4, CS5_SW4, CS6_SW4}, // 75, PgUp, k15
- {1, CS13_SW4, CS14_SW4, CS15_SW4}, // 76, LED, l04
- {1, CS16_SW4, CS17_SW4, CS18_SW4}, // 77, LED, l14
- {1, CS1_SW5, CS2_SW5, CS3_SW5}, // 78, =, k66
- {1, CS10_SW5, CS11_SW5, CS12_SW5}, // 79, Right, k05
- {1, CS13_SW5, CS14_SW5, CS15_SW5}, // 80, LED, l05
- {1, CS16_SW5, CS17_SW5, CS18_SW5}, // 81, LED, l15
- {1, CS4_SW6, CS5_SW6, CS6_SW6}, // 82, End, k75
- {1, CS13_SW6, CS14_SW6, CS15_SW6}, // 83, LED, l06
- {1, CS16_SW6, CS17_SW6, CS18_SW6}, // 84, LED, l16
- {1, CS1_SW7, CS2_SW7, CS3_SW7}, // 85, BSpc, ka1
- {1, CS4_SW7, CS5_SW7, CS6_SW7}, // 86, PgDn, k25
- {1, CS13_SW7, CS14_SW7, CS15_SW7}, // 87, LED, l07
- {1, CS16_SW7, CS17_SW7, CS18_SW7}, // 88, LED, l17
- {1, CS1_SW8, CS2_SW8, CS3_SW8}, // 89, ], k61
- {1, CS4_SW8, CS5_SW8, CS6_SW8}, // 90, Sh_R, k91
- {1, CS13_SW8, CS14_SW8, CS15_SW8}, // 91, LED, l08
- {1, CS16_SW8, CS17_SW8, CS18_SW8}, // 92, LED, l18
- {1, CS1_SW9, CS2_SW9, CS3_SW9}, // 93, \, ka2
- {1, CS4_SW9, CS5_SW9, CS6_SW9}, // 94, Up, k35
- {1, CS4_SW10, CS5_SW10, CS6_SW10}, // 95, Left, k03
- {1, CS1_SW11, CS2_SW11, CS3_SW11}, // 96, Enter, ka4
- {1, CS4_SW11, CS5_SW11, CS6_SW11}, // 97, Down, k73
-};
-// clang-format on
-#endif
diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/mattgauf/config.h b/keyboards/gmmk/pro/rev1/ansi/keymaps/mattgauf/config.h
deleted file mode 100644
index 0a10e8c8cf..0000000000
--- a/keyboards/gmmk/pro/rev1/ansi/keymaps/mattgauf/config.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/* Copyright 2021 Matt Gauf
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General 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/>.
- */
-
-// clang-format off
-#pragma once
-
-/* Defaults */
-#define RAW_USAGE_PAGE 0x200
-#define RAW_USAGE_ID 0x40
-
-/* Board Features */
-#define DYNAMIC_MACRO_SIZE 512
-
-/* RGB Matrix Features */
-#define RGB_MATRIX_KEYPRESSES
-#define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_SOLID_COLOR
-#define RGB_DISABLE_WHEN_USB_SUSPENDED true
-
-/* RGB Matrix Framebuffer Config */
-// #define RGB_MATRIX_FRAMEBUFFER_EFFECTS
-// #define RGB_MATRIX_TYPING_HEATMAP_DECREASE_DELAY_MS 25
-
-/* RGB Matrix Disabled Effects */
-#define DISABLE_RGB_MATRIX_ALPHAS_MODS // Static dual hue, speed is hue for secondary hue
-#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT // Single hue 3 blade spinning pinwheel fades saturation
-#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL // Single hue 3 blade spinning pinwheel fades brightness
-#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL // Full dual gradients scrolling out to in
-#define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL // Full gradient spinning pinwheel around center of keyboard
-#define DISABLE_RGB_MATRIX_DUAL_BEACON // Full gradient spinning around center of keyboard
-#define DISABLE_RGB_MATRIX_RAINBOW_BEACON // Full tighter gradient spinning around center of keyboard
-#define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS // Full dual gradients spinning two halfs of keyboard
-#define DISABLE_RGB_MATRIX_RAINDROPS // Randomly changes a single key's hue
-#define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS // Randomly changes a single key's hue and saturation
-#define DISABLE_RGB_MATRIX_HUE_PENDULUM // Hue shifts up a slight ammount in a wave to the right, then back to the left
-#define DISABLE_RGB_MATRIX_HUE_WAVE // Hue shifts up a slight ammount and then back down in a wave to the right
-
-#if defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS)
- #define DISABLE_RGB_MATRIX_DIGITAL_RAIN // That famous computer simulation
-#endif
-
-#if defined(RGB_MATRIX_KEYPRESSES) || defined(RGB_MATRIX_KEYRELEASES)
- #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE // Hue & value pulse near a single key hit then fades value out
- #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS // Hue & value pulse the same column and row of a single key hit then fades value out
- #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS // Hue & value pulse away on the same column and row of a single key hit then fades value out
- #define DISABLE_RGB_MATRIX_SPLASH // Full gradient & value pulse away from a single key hit then fades value out
- #define DISABLE_RGB_MATRIX_SOLID_SPLASH // Hue & value pulse away from a single key hit then fades value out
-#endif
-
-#define DISABLE_RGB_MATRIX_EFFECT_MAX
-// clang-format on
diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/mattgauf/helpers.c b/keyboards/gmmk/pro/rev1/ansi/keymaps/mattgauf/helpers.c
deleted file mode 100644
index d30224636b..0000000000
--- a/keyboards/gmmk/pro/rev1/ansi/keymaps/mattgauf/helpers.c
+++ /dev/null
@@ -1,25 +0,0 @@
-/* Copyright 2021 Matt Gauf
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General 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 "rgb_matrix.h"
-
-void rgb_matrix_set_color_flags(uint8_t red, uint8_t green, uint8_t blue, uint8_t flags) {
- for (uint8_t ii = 0; ii < RGB_MATRIX_LED_COUNT; ii++) {
- if (g_led_config.flags[ii] & flags) {
- rgb_matrix_set_color(ii, red, green, blue);
- }
- }
-}
diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/mattgauf/keymap.c b/keyboards/gmmk/pro/rev1/ansi/keymaps/mattgauf/keymap.c
deleted file mode 100644
index ceddf81a77..0000000000
--- a/keyboards/gmmk/pro/rev1/ansi/keymaps/mattgauf/keymap.c
+++ /dev/null
@@ -1,222 +0,0 @@
-/* Copyright 2021 Matt Gauf
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General 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/>.
- */
-
-// clang-format off
-#include QMK_KEYBOARD_H
-#include "keymap_helpers.h"
-
-
-enum custom_codes {
- SET_MP = RGB_M_P,
- SET_MB = RGB_M_B,
- SET_MR = RGB_M_R,
-
- MG_F17 = SAFE_RANGE,
- MG_F18,
- MG_F19
-};
-
-
-enum layer_names {
- _DEFAULT = 0,
- _EFFECTS,
- _UTILITY,
- _DFUMODE
-};
-
-
-// static uint8_t rgb_pin_fn_column[] = {PIN_DEL,PIN_PGUP,PIN_PGDN,PIN_END};
-// static uint8_t rgb_pin_left_underglow[] = {PIN_LED_L01,PIN_LED_L02,PIN_LED_L03,PIN_LED_L04,PIN_LED_L05,PIN_LED_L06,PIN_LED_L07,PIN_LED_L08};
-// static uint8_t rgb_pin_right_underglow[] = {PIN_LED_L11,PIN_LED_L12,PIN_LED_L13,PIN_LED_L14,PIN_LED_L15,PIN_LED_L16,PIN_LED_L17,PIN_LED_L18};
-
-
-#define MODS_SHIFT ((get_mods() | get_oneshot_mods()) & MOD_MASK_SHIFT)
-#define MODS_CTRL ((get_mods() | get_oneshot_mods()) & MOD_MASK_CTRL)
-#define MODS_ALT ((get_mods() | get_oneshot_mods()) & MOD_MASK_ALT)
-#define MODS_GUI ((get_mods() | get_oneshot_mods()) & MOD_MASK_GUI)
-
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [_DEFAULT] = LAYOUT(KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, MG_F17, KC_MUTE,
- KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME,
- KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP,
- KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN,
- KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END,
- KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, MO(_EFFECTS), KC_LEFT, KC_DOWN, KC_RGHT),
-
- [_EFFECTS] = LAYOUT(_______, KC_F13, KC_F14, KC_F15, KC_F16, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, MG_F18, _______,
- _______, SET_MP, SET_MB, SET_MR, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_MOD,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_RMOD,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SPI,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, _______, RGB_SAI, RGB_SPD,
- _______, _______, _______, _______, TG(_UTILITY), MO(_DFUMODE), _______, RGB_HUD, RGB_SAD, RGB_HUI),
-
- [_UTILITY] = LAYOUT(_______, _______, _______, _______, _______, _______, _______, _______, _______, DM_PLY1, DM_PLY2, DM_REC1, DM_REC2, DM_RSTP, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______),
-
- [_DFUMODE] = LAYOUT(QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, MG_F19, DB_TOGG,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______),
-};
-// Runs constantly in the background, in a loop.
-bool rgb_matrix_indicators_user(void) {
- if (rgb_matrix_get_flags() & (LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER)) {
-
- if (IS_LAYER_ON(_UTILITY)) {
- rgb_matrix_set_color(PIN_F9, LEDGREE);
- rgb_matrix_set_color(PIN_F10, LEDGREE);
- rgb_matrix_set_color(PIN_F11, LED_RED);
- rgb_matrix_set_color(PIN_F12, LED_RED);
- rgb_matrix_set_color(PIN_PRINT, LEDTEAL);
- }
-
- switch (get_highest_layer(layer_state)) {
- case _DFUMODE:
- rgb_matrix_set_color_all(LED_OFF);
- rgb_matrix_set_color(PIN_ESC, LED_RED);
- rgb_matrix_set_color(PIN_PRINT, LEDORAN);
- return;
- case _EFFECTS:
- rgb_matrix_set_color(PIN_PRINT, LEDGREE);
- break;
- default:
- break;
- }
-
- if (host_keyboard_led_state().caps_lock) {
- rgb_matrix_set_color(PIN_CAPS, RGB_WHITE);
- }
-
- }
- return false;
-}
-
-
-// Called on start
-void dynamic_macro_record_start_user(int8_t direction) {
- dprint("-- Recording Started\n");
- layer_on(_UTILITY);
-}
-
-
-// Called on end
-void dynamic_macro_record_end_user(int8_t direction) {
- dprint("-- Recording Ended\n");
-}
-
-
-// Called on playback
-void dynamic_macro_play_user(int8_t direction) {
- dprint("-- Recording Playing\n");
-}
-
-
-// Runs on encoder event
-bool encoder_update_user(uint8_t index, bool clockwise) {
- uint8_t curr_mod = get_mods();
-
- if (IS_LAYER_ON(_EFFECTS)) {
- if (clockwise) {
- rgb_matrix_increase_val();
- } else {
- rgb_matrix_decrease_val();
- }
- } else {
- if (MODS_GUI) {
- if (MODS_GUI && MODS_SHIFT) {
- clear_mods();
- if (clockwise) {
- tap_code16(LSG(KC_Z));
- } else {
- tap_code16(LGUI(KC_Z));
- }
- set_mods(curr_mod);
- } else if (MODS_GUI && MODS_ALT) {
- clear_mods();
- if (clockwise) {
- tap_code(KC_RIGHT);
- } else {
- tap_code(KC_LEFT);
- }
- set_mods(curr_mod);
- } else {
- if (clockwise) {
- tap_code16(LGUI(KC_TAB));
- } else {
- tap_code16(LSG(KC_TAB));
- }
- }
- } else {
- if (clockwise) {
- tap_code(KC_VOLU);
- } else {
- tap_code(KC_VOLD);
- }
- }
- }
- //return true; //set to return false to counteract enabled encoder in pro.c
- return false;
-}
-
-
-// Runs on key event
-bool process_record_user(uint16_t keycode, keyrecord_t *record) {
- switch (keycode) {
- case MG_F17:
- if (record->event.pressed) {
- tap_code16(HYPR(KC_F17));
- }
- return false;
- case MG_F18:
- if (record->event.pressed) {
- tap_code16(HYPR(KC_F18));
- }
- return false;
- case MG_F19:
- if (record->event.pressed) {
- tap_code16(HYPR(KC_F19));
- }
- return false;
- case RGB_TOG:
- if (record->event.pressed) {
- switch (rgb_matrix_get_flags()) {
- case LED_FLAG_ALL:
- rgb_matrix_set_flags(LED_FLAG_NONE);
- break;
- case LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER:
- rgb_matrix_set_flags(LED_FLAG_ALL);
- break;
- case LED_FLAG_UNDERGLOW:
- rgb_matrix_set_flags(LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER);
- break;
- default:
- rgb_matrix_set_flags(LED_FLAG_UNDERGLOW);
- break;
- }
- }
- return false;
- default:
- return true; // Process all other keycodes normally
- }
-}
-// clang-format on
diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/mattgauf/keymap_helpers.h b/keyboards/gmmk/pro/rev1/ansi/keymaps/mattgauf/keymap_helpers.h
deleted file mode 100644
index 2a6e8dae7b..0000000000
--- a/keyboards/gmmk/pro/rev1/ansi/keymaps/mattgauf/keymap_helpers.h
+++ /dev/null
@@ -1,165 +0,0 @@
-/* Copyright 2021 Matt Gauf
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General 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/>.
- */
-
-// clang-format off
-#include <inttypes.h>
-#include "rgb_matrix_types.h"
-
-/* Color Codes */
-#define LEDWHIT 0xff, 0xff, 0xff
-#define LED_RED 0xff, 0x00, 0x00
-#define LEDORAN 0xff, 0x29, 0x00
-#define LEDGOLD 0xff, 0x80, 0x00
-#define LEDYELL 0xff, 0xff, 0x00
-#define LEDCHAR 0x80, 0xff, 0x00
-#define LEDGREE 0x00, 0xff, 0x00
-#define LEDFOAM 0x00, 0xff, 0x40
-#define LEDTEAL 0x00, 0x80, 0xff
-#define LEDBLUE 0x00, 0x00, 0xff
-#define LEDPURP 0x80, 0x00, 0xff
-#define LEDMAGE 0xff, 0x00, 0xff
-#define LEDPINK 0xff, 0x00, 0x80
-#define LEDBLAC 0x00, 0x00, 0x00
-#define LED_OFF 0x00, 0x00, 0x00
-
-/* Color Functions */
-void rgb_matrix_set_color_flags(uint8_t red, uint8_t green, uint8_t blue, uint8_t flags);
-
-/* Function Row */
-#define PIN_ESC 0
-#define PIN_F1 6
-#define PIN_F2 12
-#define PIN_F3 18
-#define PIN_F4 23
-#define PIN_F5 28
-#define PIN_F6 34
-#define PIN_F7 39
-#define PIN_F8 44
-#define PIN_F9 50
-#define PIN_F10 56
-#define PIN_F11 61
-#define PIN_F12 66
-#define PIN_PRINT 69
-
-/* Number Row */
-#define PIN_0 57
-#define PIN_1 7
-#define PIN_2 13
-#define PIN_3 19
-#define PIN_4 24
-#define PIN_5 29
-#define PIN_6 35
-#define PIN_7 40
-#define PIN_8 45
-#define PIN_9 51
-
-/* QWERTY */
-#define PIN_A 9
-#define PIN_B 32
-#define PIN_C 22
-#define PIN_D 21
-#define PIN_E 20
-#define PIN_F 26
-#define PIN_G 31
-#define PIN_H 37
-#define PIN_I 46
-#define PIN_J 42
-#define PIN_K 47
-#define PIN_L 53
-#define PIN_M 43
-#define PIN_N 38
-#define PIN_O 52
-#define PIN_P 58
-#define PIN_Q 8
-#define PIN_R 25
-#define PIN_S 15
-#define PIN_T 30
-#define PIN_U 41
-#define PIN_V 27
-#define PIN_W 14
-#define PIN_X 16
-#define PIN_Y 36
-#define PIN_Z 10
-
-/* Symbols */
-#define PIN_MINUS 62
-#define PIN_EQUAL 78
-#define PIN_RBRACKET 89
-#define PIN_LBRACKET 63
-#define PIN_BSLASH 93
-#define PIN_SLASH 60
-#define PIN_SCOLON 59
-#define PIN_QUOTE 64
-#define PIN_COMMA 48
-#define PIN_DOT 54
-#define PIN_GRAVE 1
-
-/* Indentation */
-#define PIN_TAB 2
-#define PIN_SPACE 33
-
-/* Line Control */
-#define PIN_BSPACE 85
-#define PIN_ENTER 96
-
-/* Indicator */
-#define PIN_CAPS 3
-
-/* Left Modifiers */
-#define PIN_LSHIFT 4
-#define PIN_LCTRL 5
-#define PIN_LALT 17
-#define PIN_LGUI 11
-
-/* Right Modifiers */
-#define PIN_RSHIFT 90
-#define PIN_RCTRL 65
-#define PIN_RALT 49
-#define PIN_FN 55
-
-/* Arrow Keys */
-#define PIN_UP 94
-#define PIN_DOWN 97
-#define PIN_LEFT 95
-#define PIN_RIGHT 79
-
-/* Fn Column */
-#define PIN_DEL 72 // ┳ TOP
-#define PIN_PGUP 75 // ┃
-#define PIN_PGDN 86 // ┃
-#define PIN_END 82 // ┻ BOTTOM
-
-/* Left Side Underglow */
-#define PIN_LED_L01 67 // ┳ TOP
-#define PIN_LED_L02 70 // ┃
-#define PIN_LED_L03 73 // ┃
-#define PIN_LED_L04 76 // ┃
-#define PIN_LED_L05 80 // ┃
-#define PIN_LED_L06 83 // ┃
-#define PIN_LED_L07 87 // ┃
-#define PIN_LED_L08 91 // ┻ BOTTOM
-
-/* Right Side Underglow */
-#define PIN_LED_L11 68 // ┳ TOP
-#define PIN_LED_L12 71 // ┃
-#define PIN_LED_L13 74 // ┃
-#define PIN_LED_L14 77 // ┃
-#define PIN_LED_L15 81 // ┃
-#define PIN_LED_L16 84 // ┃
-#define PIN_LED_L17 88 // ┃
-#define PIN_LED_L18 92 // ┻ BOTTOM
-
-// clang-format on
diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/mattgauf/readme.md b/keyboards/gmmk/pro/rev1/ansi/keymaps/mattgauf/readme.md
deleted file mode 100644
index 94e268a0e3..0000000000
--- a/keyboards/gmmk/pro/rev1/ansi/keymaps/mattgauf/readme.md
+++ /dev/null
@@ -1,52 +0,0 @@
-# @mattgauf's GMMK Pro layout
-
-### `_DEFAULT`
-> *Based on the default ansi layout, this keymap contains the following changes to the default layer.*
- - Screensaver: `HYPER(F17)`
- - `KC_PSCR` → `MG_F17`
- - `KC_DEL` → `KC_HOME`
-
-> *Additionally the encoder will follow new rules when holding a key.*
- - `KC_GUI` will cycle through applications (macOS variant)
- - `KC_GUI + KC_ALT` will tap the left and right arrows.
- - `KC_GUI + KC_SHIFT` will tap Undo and Redo (macOS variant)
-
-### `_EFFECTS`
-> *The function layer is now used for additional layer access, effect keys, and media keys (following the Macbook Pro fn key layout).*
-
-> *Additionally while effects is active, the encoder will only adjust the brightness of the RGB matrix.*
- - The RGB matrix effect and speed keys are located on the right hand vertical nav column.
- - `KC_HOME` → `RGB_MOD`
- - `KC_PGUP` → `RGB_RMOD`
- - `KC_PGDN` → `RGB_SPI`
- - `KC_END` → `RGB_SPD`
- - The RGB matrix Hue, Saturation keys are mapped to the arrow keys.
- - `KC_UP` → `RGB_SAI`
- - `KC_DN` → `RGB_SAD`
- - `KC_LEFT` → `RGB_HUD`
- - `KC_RIGHT` → `RGB_HUI`
- - The RGB matrix toggle is intercepted in process_record_user() cycling through the `LED_FLAG` modifiers. (`NONE`, `UNDERGLOW`, `KEYLIGHT`, `ALL`)
- - `KC_SLSH` → `RGB_TOG`
- - Hibernate: `HYPER(F18)`
- - `MG_F17` → `MG_F18`
-
-
-### `_UTILITY`
-*The utility layer is currently used for remapping* `KF_F9` *to* `KC_F12` *&* `MG_F17` *to the dynamic macro keys.*
- - Playback
- - `KC_F9` → `DM_PLY1`
- - `KC_F10` → `DM_PLY2`
- - Record
- - `KC_F11` → `DM_REC1`
- - `KC_F12` → `DM_REC2`
- - Stop Recording
- - `MG_F17` → `DM_RSTP`
-
-### `_DFUMODE`
-> *The final layer is used for resetting the board or triggering an immediate shutdown.*
- - DFU Mode
- - `KC_ESC` → `RESET`
- - Shutdown: `HYPER(F19)`
- - `MG_F17` → `MG_F19`
- - Encoder press, triggers debug output.
- - `KC_MUTE` → `DB_TOGG`
diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/mattgauf/rules.mk b/keyboards/gmmk/pro/rev1/ansi/keymaps/mattgauf/rules.mk
deleted file mode 100644
index 76e1674d58..0000000000
--- a/keyboards/gmmk/pro/rev1/ansi/keymaps/mattgauf/rules.mk
+++ /dev/null
@@ -1,6 +0,0 @@
-# Build rules
-LIB_SRC += ansi.c
-LIB_SRC += helpers.c
-
-# Overrides
-MOUSEKEY_ENABLE = no # Mouse keys
diff --git a/keyboards/gmmk/pro/rev1/iso/info.json b/keyboards/gmmk/pro/rev1/iso/info.json
index 52ea4538c8..492a5cf486 100644
--- a/keyboards/gmmk/pro/rev1/iso/info.json
+++ b/keyboards/gmmk/pro/rev1/iso/info.json
@@ -9,7 +9,7 @@
"device_version": "0.0.1"
},
"rgb_matrix": {
- "driver": "aw20216"
+ "driver": "aw20216s"
},
"matrix_pins": {
"cols": ["A0", "A1", "A2", "A3", "A4", "A8", "A9", "A10"],
diff --git a/keyboards/gmmk/pro/rev1/iso/iso.c b/keyboards/gmmk/pro/rev1/iso/iso.c
index 0ded23162f..9744447587 100644
--- a/keyboards/gmmk/pro/rev1/iso/iso.c
+++ b/keyboards/gmmk/pro/rev1/iso/iso.c
@@ -137,7 +137,7 @@ led_config_t g_led_config = {{
2, 4, 2, 2, 4, 4, 2, 2, 4, 2, 2, 4, 4, 2, 2, 4, 4, 2, 2, 4, 4, 4, 4, 4
}};
-const aw_led g_aw_leds[RGB_MATRIX_LED_COUNT] = {
+const aw20216s_led_t g_aw20216s_leds[RGB_MATRIX_LED_COUNT] = {
{0, CS1_SW1, CS2_SW1, CS3_SW1}, // 0, ESC, k13
{0, CS4_SW1, CS5_SW1, CS6_SW1}, // 1, ~, k16
{0, CS7_SW1, CS8_SW1, CS9_SW1}, // 2, Tab, k11
diff --git a/keyboards/gmmk/pro/rev2/ansi/ansi.c b/keyboards/gmmk/pro/rev2/ansi/ansi.c
index ccdcd42726..322e94c938 100644
--- a/keyboards/gmmk/pro/rev2/ansi/ansi.c
+++ b/keyboards/gmmk/pro/rev2/ansi/ansi.c
@@ -136,7 +136,7 @@ led_config_t g_led_config = {{
4, 2, 2, 4, 4, 2, 2, 4, 2, 2, 4, 4, 2, 2, 4, 4, 2, 2, 4, 4, 4, 4, 4
}};
-const aw_led g_aw_leds[RGB_MATRIX_LED_COUNT] = {
+const aw20216s_led_t g_aw20216s_leds[RGB_MATRIX_LED_COUNT] = {
{0, CS1_SW1, CS2_SW1, CS3_SW1}, // 0, ESC, k13
{0, CS4_SW1, CS5_SW1, CS6_SW1}, // 1, ~, k16
{0, CS7_SW1, CS8_SW1, CS9_SW1}, // 2, Tab, k11
diff --git a/keyboards/gmmk/pro/rev2/ansi/info.json b/keyboards/gmmk/pro/rev2/ansi/info.json
index 082b5f8656..cd1fd31bf0 100644
--- a/keyboards/gmmk/pro/rev2/ansi/info.json
+++ b/keyboards/gmmk/pro/rev2/ansi/info.json
@@ -9,13 +9,20 @@
"device_version": "0.0.2"
},
"rgb_matrix": {
- "driver": "aw20216"
+ "driver": "aw20216s"
},
"matrix_pins": {
"cols": ["A0", "A1", "A2", "A3", "A4", "A8", "A9", "A10"],
"rows": ["B0", "B1", "B2", "B3", "B4", "B5", "B6", "B7", "B8", "B9", "B10"]
},
"diode_direction": "COL2ROW",
+ "eeprom": {
+ "driver": "wear_leveling",
+ "wear_leveling": {
+ "driver": "spi_flash",
+ "backing_size": 2048
+ }
+ },
"encoder": {
"rotary": [
{"pin_a": "C15", "pin_b": "C14"}
diff --git a/keyboards/gmmk/pro/rev2/ansi/rules.mk b/keyboards/gmmk/pro/rev2/ansi/rules.mk
index 2f50d82c82..6d23fe350a 100644
--- a/keyboards/gmmk/pro/rev2/ansi/rules.mk
+++ b/keyboards/gmmk/pro/rev2/ansi/rules.mk
@@ -12,5 +12,3 @@ RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
AUDIO_ENABLE = no # Audio output
ENCODER_ENABLE = yes
RGB_MATRIX_ENABLE = yes
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = spi_flash
diff --git a/keyboards/gmmk/pro/rev2/config.h b/keyboards/gmmk/pro/rev2/config.h
index fa409ba026..c393e04e45 100644
--- a/keyboards/gmmk/pro/rev2/config.h
+++ b/keyboards/gmmk/pro/rev2/config.h
@@ -19,7 +19,6 @@
/* External spi flash */
#define EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN B12
-#define WEAR_LEVELING_BACKING_SIZE 2048
/* SPI Config for LED Driver */
#define SPI_DRIVER SPIDQ
diff --git a/keyboards/gmmk/pro/rev2/iso/info.json b/keyboards/gmmk/pro/rev2/iso/info.json
index a4aef24e65..6233356616 100644
--- a/keyboards/gmmk/pro/rev2/iso/info.json
+++ b/keyboards/gmmk/pro/rev2/iso/info.json
@@ -9,13 +9,20 @@
"device_version": "0.0.2"
},
"rgb_matrix": {
- "driver": "aw20216"
+ "driver": "aw20216s"
},
"matrix_pins": {
"cols": ["A0", "A1", "A2", "A3", "A4", "A8", "A9", "A10"],
"rows": ["B0", "B1", "B2", "B3", "B4", "B5", "B6", "B7", "B8", "B9", "B10"]
},
"diode_direction": "COL2ROW",
+ "eeprom": {
+ "driver": "wear_leveling",
+ "wear_leveling": {
+ "driver": "spi_flash",
+ "backing_size": 2048
+ }
+ },
"encoder": {
"rotary": [
{"pin_a": "C15", "pin_b": "C14"}
diff --git a/keyboards/gmmk/pro/rev2/iso/iso.c b/keyboards/gmmk/pro/rev2/iso/iso.c
index e056ff6c12..3a5b21c014 100644
--- a/keyboards/gmmk/pro/rev2/iso/iso.c
+++ b/keyboards/gmmk/pro/rev2/iso/iso.c
@@ -137,7 +137,7 @@ led_config_t g_led_config = {{
2, 4, 2, 2, 4, 4, 2, 2, 4, 2, 2, 4, 4, 2, 2, 4, 4, 2, 2, 4, 4, 4, 4, 4
}};
-const aw_led g_aw_leds[RGB_MATRIX_LED_COUNT] = {
+const aw20216s_led_t g_aw20216s_leds[RGB_MATRIX_LED_COUNT] = {
{0, CS1_SW1, CS2_SW1, CS3_SW1}, // 0, ESC, k13
{0, CS4_SW1, CS5_SW1, CS6_SW1}, // 1, ~, k16
{0, CS7_SW1, CS8_SW1, CS9_SW1}, // 2, Tab, k11
diff --git a/keyboards/gmmk/pro/rev2/iso/rules.mk b/keyboards/gmmk/pro/rev2/iso/rules.mk
index db00e4c84c..46eda64be7 100644
--- a/keyboards/gmmk/pro/rev2/iso/rules.mk
+++ b/keyboards/gmmk/pro/rev2/iso/rules.mk
@@ -15,5 +15,3 @@ RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
AUDIO_ENABLE = no # Audio output
ENCODER_ENABLE = yes
RGB_MATRIX_ENABLE = yes
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = spi_flash
diff --git a/keyboards/handwired/co60/rev7/config.h b/keyboards/handwired/co60/rev7/config.h
index 7e50f570ed..b6b7cecec2 100644
--- a/keyboards/handwired/co60/rev7/config.h
+++ b/keyboards/handwired/co60/rev7/config.h
@@ -23,5 +23,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define LOCKING_RESYNC_ENABLE
/* RGB underglow configuration */
-#define WS2812_SPI SPID1
+#define WS2812_SPI_DRIVER SPID1
#define WS2812_SPI_MOSI_PAL_MODE 5
diff --git a/keyboards/handwired/dactyl/rules.mk b/keyboards/handwired/dactyl/rules.mk
index 830812f79a..bffd901b04 100644
--- a/keyboards/handwired/dactyl/rules.mk
+++ b/keyboards/handwired/dactyl/rules.mk
@@ -14,5 +14,5 @@ SWAP_HANDS_ENABLE = yes # Allow swapping hands of keyboard
RGBLIGHT_ENABLE = no
# project specific files
-QUANTUM_LIB_SRC += i2c_master.c
+I2C_DRIVER_REQUIRED = yes
SRC += matrix.c
diff --git a/keyboards/handwired/dactyl_manuform/dmote/62key/config.h b/keyboards/handwired/dactyl_manuform/dmote/62key/config.h
deleted file mode 100644
index e8bbf91d08..0000000000
--- a/keyboards/handwired/dactyl_manuform/dmote/62key/config.h
+++ /dev/null
@@ -1,5 +0,0 @@
-#pragma once
-
-// WS2812 RGB LED, normally used to indicate keyboard state:
-#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2
-#define RGBLIGHT_EFFECT_CHRISTMAS_STEP 1
diff --git a/keyboards/handwired/dactyl_manuform/dmote/62key/keymaps/default/config.h b/keyboards/handwired/dactyl_manuform/dmote/62key/keymaps/default/config.h
deleted file mode 100644
index 1809262044..0000000000
--- a/keyboards/handwired/dactyl_manuform/dmote/62key/keymaps/default/config.h
+++ /dev/null
@@ -1,3 +0,0 @@
-#pragma once
-
-#define EE_HANDS
diff --git a/keyboards/handwired/dactyl_manuform/dmote/62key/rules.mk b/keyboards/handwired/dactyl_manuform/dmote/62key/rules.mk
deleted file mode 100644
index a6a97a5c8e..0000000000
--- a/keyboards/handwired/dactyl_manuform/dmote/62key/rules.mk
+++ /dev/null
@@ -1,5 +0,0 @@
-# Build-process overrides for the DMOTE.
-MOUSEKEY_ENABLE = yes # Mouse keys
-EXTRAKEY_ENABLE = yes # Audio control and System control
-RGBLIGHT_ENABLE = yes # Needed for the C linker with lighting control.
-COMMAND_ENABLE = no # Not a good combo with Space Cadet shift.
diff --git a/keyboards/handwired/dactyl_manuform/dmote/readme.md b/keyboards/handwired/dactyl_manuform/dmote/readme.md
deleted file mode 100644
index 7aff2df524..0000000000
--- a/keyboards/handwired/dactyl_manuform/dmote/readme.md
+++ /dev/null
@@ -1,16 +0,0 @@
-DMOTE
-======
-
-The “Dactyl-ManuForm: Opposable Thumb Edition” is made from a Clojure
-application maintained [here](https://github.com/veikman/dactyl-keyboard).
-The application supports varied physical layouts and therefore matrices.
-This physical variability is its main feature; its QMK firmware is ordinary.
-
-Consult the general [Dactyl-ManuForm readme](../readme.md).
-
-## The `62key` layout
-
-This folder represents the default build target of the Clojure application
-as of its version 0.4.0. The default keymap for this layout has a QWERTY base
-layer but is intended for running Colemak on the OS side with the i3 tiling
-window manager. It’s also got a layer that forces Colemak from the QMK side.
diff --git a/keyboards/handwired/dactyl_minidox/info.json b/keyboards/handwired/dactyl_minidox/info.json
index a0bb416ce4..a94f517b52 100644
--- a/keyboards/handwired/dactyl_minidox/info.json
+++ b/keyboards/handwired/dactyl_minidox/info.json
@@ -8,6 +8,14 @@
"pid": "0x3536",
"device_version": "0.0.3"
},
+ "features": {
+ "bootmagic": true,
+ "console": false,
+ "command": false,
+ "extrakey": true,
+ "mousekey": true,
+ "nkro": true
+ },
"ws2812": {
"pin": "D3"
},
diff --git a/keyboards/handwired/dactyl_minidox/rules.mk b/keyboards/handwired/dactyl_minidox/rules.mk
index e22ac7f3ff..6e7633bfe0 100644
--- a/keyboards/handwired/dactyl_minidox/rules.mk
+++ b/keyboards/handwired/dactyl_minidox/rules.mk
@@ -1,12 +1 @@
-# Build Options
-# change yes to no to disable
-#
-BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
-MOUSEKEY_ENABLE = yes # Mouse keys
-EXTRAKEY_ENABLE = yes # Audio control and System control
-CONSOLE_ENABLE = no # Console for debug
-COMMAND_ENABLE = no # Commands for debug and configuration
-NKRO_ENABLE = yes # Enable N-Key Rollover
-BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
-RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
-# AUDIO_ENABLE = yes # Audio output
+# This file intentionally left blank
diff --git a/keyboards/kabedon/kabedon980/config.h b/keyboards/handwired/dmote/config.h
index 3623c508cc..4a2d46abe5 100644
--- a/keyboards/kabedon/kabedon980/config.h
+++ b/keyboards/handwired/dmote/config.h
@@ -1,5 +1,6 @@
/*
Copyright 2012 Jun Wako <wakojun@gmail.com>
+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
@@ -17,4 +18,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once
-#define DYNAMIC_KEYMAP_LAYER_COUNT 3
+// WS2812 RGB LED, normally used to indicate keyboard state:
+#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2
+#define RGBLIGHT_EFFECT_CHRISTMAS_STEP 1
diff --git a/keyboards/handwired/dactyl_manuform/dmote/62key/info.json b/keyboards/handwired/dmote/info.json
index 8e27a68f16..fc52fee11e 100644
--- a/keyboards/handwired/dactyl_manuform/dmote/62key/info.json
+++ b/keyboards/handwired/dmote/info.json
@@ -1,21 +1,29 @@
{
- "keyboard_name": "DMOTE (62-key)",
- "manufacturer": "tshort",
- "url": "",
+ "keyboard_name": "DMOTE",
+ "manufacturer": "veikman",
+ "url": "https://github.com/veikman/dactyl-keyboard",
"maintainer": "veikman",
- "processor": "atmega32u4",
- "bootloader": "atmel-dfu",
+ "development_board": "promicro",
"usb": {
"vid": "0x444D",
"pid": "0x3632",
- "device_version": "0.0.1"
+ "device_version": "1.0.0"
+ },
+ "features": {
+ "bootmagic": true,
+ "console": false,
+ "command": false,
+ "extrakey": true,
+ "mousekey": true,
+ "nkro": true,
+ "rgblight": true
},
"rgblight": {
"led_count": 6,
"split_count": [3, 3],
"animations": {
- "knight": true,
- "christmas": true
+ "christmas": true,
+ "knight": true
}
},
"ws2812": {
@@ -31,7 +39,7 @@
"soft_serial_pin": "D0"
},
"layouts": {
- "LAYOUT_62key": {
+ "LAYOUT": {
"layout": [
{"matrix": [0, 0], "x": 0, "y": 0},
{"matrix": [0, 1], "x": 1, "y": 0},
@@ -40,38 +48,6 @@
{"matrix": [0, 4], "x": 4, "y": 0},
{"matrix": [0, 5], "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": [1, 4], "x": 4, "y": 1},
- {"matrix": [1, 5], "x": 5, "y": 1},
-
- {"matrix": [2, 0], "x": 0, "y": 2},
- {"matrix": [2, 1], "x": 1, "y": 2},
- {"matrix": [2, 2], "x": 2, "y": 2},
- {"matrix": [2, 3], "x": 3, "y": 2},
- {"matrix": [2, 4], "x": 4, "y": 2},
- {"matrix": [2, 5], "x": 5, "y": 2},
-
- {"matrix": [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": [4, 3], "x": 3, "y": 4},
-
- {"matrix": [4, 2], "x": 4.5, "y": 4.5},
- {"matrix": [3, 5], "x": 5.5, "y": 4.5},
-
- {"matrix": [5, 2], "x": 4, "y": 5.5},
- {"matrix": [4, 4], "x": 5, "y": 5.5},
- {"matrix": [4, 5], "x": 6, "y": 5.5},
-
- {"matrix": [5, 4], "x": 4.5, "y": 6.5},
- {"matrix": [5, 5], "x": 5.5, "y": 6.5},
-
{"matrix": [6, 5], "x": 9, "y": 0},
{"matrix": [6, 4], "x": 10, "y": 0},
{"matrix": [6, 3], "x": 11, "y": 0},
@@ -79,6 +55,13 @@
{"matrix": [6, 1], "x": 13, "y": 0},
{"matrix": [6, 0], "x": 14, "y": 0},
+ {"matrix": [1, 0], "x": 0, "y": 1},
+ {"matrix": [1, 1], "x": 1, "y": 1},
+ {"matrix": [1, 2], "x": 2, "y": 1},
+ {"matrix": [1, 3], "x": 3, "y": 1},
+ {"matrix": [1, 4], "x": 4, "y": 1},
+ {"matrix": [1, 5], "x": 5, "y": 1},
+
{"matrix": [7, 5], "x": 9, "y": 1},
{"matrix": [7, 4], "x": 10, "y": 1},
{"matrix": [7, 3], "x": 11, "y": 1},
@@ -86,6 +69,13 @@
{"matrix": [7, 1], "x": 13, "y": 1},
{"matrix": [7, 0], "x": 14, "y": 1},
+ {"matrix": [2, 0], "x": 0, "y": 2},
+ {"matrix": [2, 1], "x": 1, "y": 2},
+ {"matrix": [2, 2], "x": 2, "y": 2},
+ {"matrix": [2, 3], "x": 3, "y": 2},
+ {"matrix": [2, 4], "x": 4, "y": 2},
+ {"matrix": [2, 5], "x": 5, "y": 2},
+
{"matrix": [8, 5], "x": 9, "y": 2},
{"matrix": [8, 4], "x": 10, "y": 2},
{"matrix": [8, 3], "x": 11, "y": 2},
@@ -93,21 +83,39 @@
{"matrix": [8, 1], "x": 13, "y": 2},
{"matrix": [8, 0], "x": 14, "y": 2},
+ {"matrix": [3, 0], "x": 0, "y": 3},
+ {"matrix": [3, 1], "x": 1, "y": 3},
+ {"matrix": [3, 2], "x": 2, "y": 3},
+ {"matrix": [3, 3], "x": 3, "y": 3},
+ {"matrix": [3, 4], "x": 4, "y": 3},
+
{"matrix": [9, 4], "x": 10, "y": 3},
{"matrix": [9, 3], "x": 11, "y": 3},
{"matrix": [9, 2], "x": 12, "y": 3},
{"matrix": [9, 1], "x": 13, "y": 3},
{"matrix": [9, 0], "x": 14, "y": 3},
+ {"matrix": [4, 3], "x": 3, "y": 4},
+
+ {"matrix": [4, 2], "x": 4.5, "y": 4.5},
+ {"matrix": [3, 5], "x": 5.5, "y": 4.5},
+
{"matrix": [9, 5], "x": 8.5, "y": 4.5},
{"matrix": [10, 2], "x": 9.5, "y": 4.5},
{"matrix": [10, 3], "x": 11, "y": 4},
+ {"matrix": [5, 2], "x": 4, "y": 5.5},
+ {"matrix": [4, 4], "x": 5, "y": 5.5},
+ {"matrix": [4, 5], "x": 6, "y": 5.5},
+
{"matrix": [10, 5], "x": 8, "y": 5.5},
{"matrix": [10, 4], "x": 9, "y": 5.5},
{"matrix": [11, 2], "x": 10, "y": 5.5},
+ {"matrix": [5, 4], "x": 4.5, "y": 6.5},
+ {"matrix": [5, 5], "x": 5.5, "y": 6.5},
+
{"matrix": [11, 5], "x": 8.5, "y": 6.5},
{"matrix": [11, 4], "x": 9.5, "y": 6.5}
]
diff --git a/keyboards/handwired/dactyl_manuform/dmote/62key/keymaps/default/keymap.c b/keyboards/handwired/dmote/keymaps/default/keymap.c
index ce2c8a3702..59a5b51f1b 100644
--- a/keyboards/handwired/dactyl_manuform/dmote/62key/keymaps/default/keymap.c
+++ b/keyboards/handwired/dmote/keymaps/default/keymap.c
@@ -1,3 +1,21 @@
+/*
+Copyright 2012 Jun Wako <wakojun@gmail.com>
+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/>.
+*/
+
#include QMK_KEYBOARD_H
#include "keymap_colemak.h"
@@ -7,7 +25,7 @@
enum layer_names {
_QWERTY, // OS-side Colemak. Default.
_COLEMAK, // Keyboard-side Colemak. Portability, emergency.
- _NUMERIC
+ _NUMERIC,
};
// Shorthand:
@@ -23,58 +41,34 @@ enum layer_names {
// https://github.com/qmk/qmk_firmware/pull/2055
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [_QWERTY] = LAYOUT_62key(
- KC_VOLD, KC_VOLU, CM_W, CM_F, CM_P, CM_G,
- KC_TAB, CM_Q, CM_R, CM_S, CM_T, CM_D,
- KC_BSPC, CM_A, CM_X, CM_C, CM_V, CM_B,
- SLQ, CM_Z, KC_HOME, KC_PGUP, KC_END,
- KC_PGDN, KC_ENT, KC_SPC,
- SC_LSPO, KC_LGUI, KC_MINS,
- BK_LCTL, KC_LALT,
-
- CM_J, CM_L, CM_U, CM_Y, KC_MPLY, KC_MUTE,
- CM_H, CM_N, CM_E, CM_I, CM_SCLN, KC_BSLS,
- CM_K, CM_M, KC_COMM, KC_DOT, CM_O, KC_QUOT,
- KC_LEFT, KC_UP, KC_RGHT, KC_SLSH, SRQ,
- KC_DEL, KC_ESC, KC_DOWN,
- KC_EQL, LAYER_N, SC_RSPC,
- KC_RALT, BK_RCTL
+ [_QWERTY] = LAYOUT(
+ KC_VOLD, KC_VOLU, CM_W, CM_F, CM_P, CM_G, CM_J, CM_L, CM_U, CM_Y, KC_MPLY, KC_MUTE,
+ KC_TAB, CM_Q, CM_R, CM_S, CM_T, CM_D, CM_H, CM_N, CM_E, CM_I, CM_SCLN, KC_BSLS,
+ KC_BSPC, CM_A, CM_X, CM_C, CM_V, CM_B, CM_K, CM_M, KC_COMM, KC_DOT, CM_O, KC_QUOT,
+ SLQ, CM_Z, KC_HOME, KC_PGUP, KC_END, KC_LEFT, KC_UP, KC_RGHT, KC_SLSH, SRQ,
+ KC_PGDN, KC_ENT, KC_SPC, KC_DEL, KC_ESC, KC_DOWN,
+ SC_LSPO, KC_LGUI, KC_MINS, KC_EQL, LAYER_N, SC_RSPC,
+ BK_LCTL, KC_LALT, KC_RALT, BK_RCTL
),
- [_COLEMAK] = LAYOUT_62key(
- _______, _______, KC_W, KC_F, KC_P, KC_G,
- _______, KC_Q, KC_R, KC_S, KC_T, KC_D,
- _______, KC_A, KC_X, KC_C, KC_V, KC_B,
- _______, KC_Z, _______, _______, _______,
- _______, _______, _______,
- _______, _______, _______,
- _______, _______,
-
- KC_J, KC_L, KC_U, KC_Y, _______, _______,
- KC_H, KC_N, KC_E, KC_I, KC_SCLN, _______,
- KC_K, KC_M, _______, _______, KC_O, _______,
- _______, _______, _______, _______, _______,
- _______, _______, _______,
- _______, _______, _______,
- _______, _______
+ [_COLEMAK] = LAYOUT(
+ _______, _______, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, _______, _______,
+ _______, KC_Q, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_SCLN, _______,
+ _______, KC_A, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, _______, _______, KC_O, _______,
+ _______, KC_Z, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______
),
- [_NUMERIC] = LAYOUT_62key(
- LAYER_C, KC_INS, KC_F2, KC_F3, KC_F4, KC_F5,
- KC_F12, KC_F1, KC_2, KC_3, KC_4, KC_5,
- _______, KC_1, KC_AT, KC_HASH, KC_DLR, KC_PERC,
- KC_GRV, KC_EXLM, KC_BTN1, KC_WH_U, KC_BTN2,
- KC_WH_D, RGB_MOD, _______,
- _______, _______, EMDASH,
- _______, _______,
-
- KC_F6, KC_F7, KC_F8, KC_F9, QK_BOOT, KC_WAKE, // *
- KC_6, KC_7, KC_8, KC_9, KC_F10, KC_F11,
- KC_CIRC, KC_AMPR, KC_ASTR, KC_APP, KC_0, PASTE,
- KC_MS_L, KC_MS_U, KC_MS_R, KC_PSCR, RGB_TOG,
- KC_ACL1, KC_ACL2, KC_MS_D,
- KC_ACL0, _______, _______,
- _______, _______
+ [_NUMERIC] = LAYOUT(
+ LAYER_C, KC_INS, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, QK_BOOT, KC_WAKE, // *
+ KC_F12, KC_F1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_F10, KC_F11,
+ _______, KC_1, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_APP, KC_0, PASTE,
+ KC_GRV, KC_EXLM, KC_BTN1, KC_WH_U, KC_BTN2, KC_MS_L, KC_MS_U, KC_MS_R, KC_PSCR, RGB_TOG,
+ KC_WH_D, RGB_MOD, _______, KC_ACL1, KC_ACL2, KC_MS_D,
+ _______, _______, EMDASH, KC_ACL0, _______, _______,
+ _______, _______, _______, _______
)
};
@@ -82,7 +76,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// Debian 10 was seeing duplicate keypress and release events for sleep
// (regardless of i3 binding), which ruined the function.
-
/*
The rest is all about lighting control.
The logic here represents a pretty poor compromise solution between the
diff --git a/keyboards/handwired/dmote/readme.md b/keyboards/handwired/dmote/readme.md
new file mode 100644
index 0000000000..9b6ff3a9f4
--- /dev/null
+++ b/keyboards/handwired/dmote/readme.md
@@ -0,0 +1,29 @@
+# DMOTE
+
+![DMOTE](https://i.imgur.com/JYkB6LBh.jpg)
+
+The “**D**actyl-**M**anuForm: **O**pposable **T**humb **E**dition” is made from a Clojure
+application maintained [here](https://github.com/veikman/dactyl-keyboard).
+The application supports varied physical layouts and therefore matrices.
+This physical variability is its main feature; its QMK firmware is ordinary.
+
+* Keyboard Maintainer: [Viktor Eikman](https://github.com/veikman/)
+* Hardware Supported: Pro Micro and clones
+
+Make example for this keyboard (after setting up your build environment):
+
+ make handwired/dmote:default
+
+Flashing example for this keyboard:
+
+ make handwired/dmote: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 - some may have pads you must short instead
+* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available
diff --git a/keyboards/handwired/dmote/rules.mk b/keyboards/handwired/dmote/rules.mk
new file mode 100644
index 0000000000..876618b9d1
--- /dev/null
+++ b/keyboards/handwired/dmote/rules.mk
@@ -0,0 +1 @@
+# File is intentionally blank
diff --git a/keyboards/handwired/dqz11n1g/rules.mk b/keyboards/handwired/dqz11n1g/rules.mk
index 23f6b89cc2..220e353ab7 100644
--- a/keyboards/handwired/dqz11n1g/rules.mk
+++ b/keyboards/handwired/dqz11n1g/rules.mk
@@ -1,7 +1,7 @@
# Keyboard matrix uses shift-registers read via SPI
CUSTOM_MATRIX = lite
SRC += matrix.c
-QUANTUM_LIB_SRC += spi_master.c
+SPI_DRIVER_REQUIRED = yes
# Build Options
# change yes to no to disable
diff --git a/keyboards/handwired/dygma/raise/rules.mk b/keyboards/handwired/dygma/raise/rules.mk
index 761e075500..ecf156629a 100644
--- a/keyboards/handwired/dygma/raise/rules.mk
+++ b/keyboards/handwired/dygma/raise/rules.mk
@@ -19,7 +19,7 @@ CUSTOM_MATRIX = lite
# alternate usb endpoints.
RAW_ENABLE = yes
-QUANTUM_LIB_SRC += i2c_master.c
+I2C_DRIVER_REQUIRED = yes
SRC += matrix.c
DEFAULT_FOLDER = handwired/dygma/raise/ansi
diff --git a/keyboards/handwired/frenchdev/rules.mk b/keyboards/handwired/frenchdev/rules.mk
index c310966f1d..e226d0b517 100644
--- a/keyboards/handwired/frenchdev/rules.mk
+++ b/keyboards/handwired/frenchdev/rules.mk
@@ -13,5 +13,5 @@ AUDIO_ENABLE = no # Audio output
RGBLIGHT_ENABLE = no
# project specific files
-SRC = i2c_master.c \
- matrix.c
+SRC = matrix.c
+I2C_DRIVER_REQUIRED = yes
diff --git a/keyboards/handwired/lagrange/rules.mk b/keyboards/handwired/lagrange/rules.mk
index 61bfdfa4d3..f4af87851c 100644
--- a/keyboards/handwired/lagrange/rules.mk
+++ b/keyboards/handwired/lagrange/rules.mk
@@ -14,4 +14,5 @@ UNICODE_ENABLE = yes
SPLIT_KEYBOARD = yes
SPLIT_TRANSPORT = custom
-SRC += transport.c spi_master.c
+SRC += transport.c
+SPI_DRIVER_REQUIRED = yes
diff --git a/keyboards/handwired/lovelive9/keymaps/default/keymap.c b/keyboards/handwired/lovelive9/keymaps/default/keymap.c
index 605f722f44..6d863449fe 100644
--- a/keyboards/handwired/lovelive9/keymaps/default/keymap.c
+++ b/keyboards/handwired/lovelive9/keymaps/default/keymap.c
@@ -154,15 +154,15 @@ int aqours_color_v[] = {255, 255, 255, 255, 255, 255, 200, 255, 255};
void LED_default_set(void) {
- sethsv(aqours_color_h[2], aqours_color_s[2], aqours_color_v[2], (LED_TYPE *)&led[0]);
- sethsv(aqours_color_h[7], aqours_color_s[7], aqours_color_v[7], (LED_TYPE *)&led[1]);
- sethsv(aqours_color_h[1], aqours_color_s[1], aqours_color_v[1], (LED_TYPE *)&led[2]);
- sethsv(aqours_color_h[5], aqours_color_s[5], aqours_color_v[5], (LED_TYPE *)&led[3]);
- sethsv(aqours_color_h[8], aqours_color_s[8], aqours_color_v[8], (LED_TYPE *)&led[4]);
- sethsv(aqours_color_h[6], aqours_color_s[6], aqours_color_v[6], (LED_TYPE *)&led[5]);
- sethsv(aqours_color_h[0], aqours_color_s[0], aqours_color_v[0], (LED_TYPE *)&led[6]);
- sethsv(aqours_color_h[4], aqours_color_s[4], aqours_color_v[4], (LED_TYPE *)&led[7]);
- sethsv(aqours_color_h[3], aqours_color_s[3], aqours_color_v[3], (LED_TYPE *)&led[8]);
+ sethsv(aqours_color_h[2], aqours_color_s[2], aqours_color_v[2], (rgb_led_t *)&led[0]);
+ sethsv(aqours_color_h[7], aqours_color_s[7], aqours_color_v[7], (rgb_led_t *)&led[1]);
+ sethsv(aqours_color_h[1], aqours_color_s[1], aqours_color_v[1], (rgb_led_t *)&led[2]);
+ sethsv(aqours_color_h[5], aqours_color_s[5], aqours_color_v[5], (rgb_led_t *)&led[3]);
+ sethsv(aqours_color_h[8], aqours_color_s[8], aqours_color_v[8], (rgb_led_t *)&led[4]);
+ sethsv(aqours_color_h[6], aqours_color_s[6], aqours_color_v[6], (rgb_led_t *)&led[5]);
+ sethsv(aqours_color_h[0], aqours_color_s[0], aqours_color_v[0], (rgb_led_t *)&led[6]);
+ sethsv(aqours_color_h[4], aqours_color_s[4], aqours_color_v[4], (rgb_led_t *)&led[7]);
+ sethsv(aqours_color_h[3], aqours_color_s[3], aqours_color_v[3], (rgb_led_t *)&led[8]);
rgblight_set();
@@ -171,7 +171,7 @@ void LED_default_set(void) {
void LED_layer_set(int aqours_index) {
for (int c = 0; c < 9; c++) {
- sethsv(aqours_color_h[aqours_index], aqours_color_s[aqours_index], aqours_color_v[aqours_index], (LED_TYPE *)&led[c]);
+ sethsv(aqours_color_h[aqours_index], aqours_color_s[aqours_index], aqours_color_v[aqours_index], (rgb_led_t *)&led[c]);
}
rgblight_set();
}
diff --git a/keyboards/handwired/onekey/kb2040/rules.mk b/keyboards/handwired/onekey/kb2040/rules.mk
index 0e5631b02b..dd68e9d3b0 100644
--- a/keyboards/handwired/onekey/kb2040/rules.mk
+++ b/keyboards/handwired/onekey/kb2040/rules.mk
@@ -1,3 +1 @@
OLED_ENABLE = yes
-
-OPT_DEFS += -DHAL_USE_I2C=TRUE
diff --git a/keyboards/handwired/onekey/keymaps/i2c_scanner/rules.mk b/keyboards/handwired/onekey/keymaps/i2c_scanner/rules.mk
index 04498a8831..3dec5cef29 100644
--- a/keyboards/handwired/onekey/keymaps/i2c_scanner/rules.mk
+++ b/keyboards/handwired/onekey/keymaps/i2c_scanner/rules.mk
@@ -1,3 +1,3 @@
CONSOLE_ENABLE = yes
-QUANTUM_LIB_SRC += i2c_master.c
+I2C_DRIVER_REQUIRED = yes
diff --git a/keyboards/handwired/orbweaver/config.h b/keyboards/handwired/orbweaver/config.h
index ab7cb9d9d5..a264089c71 100644
--- a/keyboards/handwired/orbweaver/config.h
+++ b/keyboards/handwired/orbweaver/config.h
@@ -17,8 +17,8 @@
#pragma once
-#define DRIVER_COUNT 1
-#define DRIVER_ADDR_1 0b1110100
+#define IS31FL3731_DRIVER_COUNT 1
+#define DRIVER_ADDR_1 IS31FL3731_I2C_ADDRESS_GND
#define RGB_MATRIX_LED_COUNT 20
#define I2C1_CLOCK_SPEED 100000
#define RGB_MATRIX_CENTER { 40, 30 }
diff --git a/keyboards/handwired/orbweaver/orbweaver.c b/keyboards/handwired/orbweaver/orbweaver.c
index f6485b6adf..63778ea52b 100644
--- a/keyboards/handwired/orbweaver/orbweaver.c
+++ b/keyboards/handwired/orbweaver/orbweaver.c
@@ -22,7 +22,7 @@
#include "rgb_matrix.h"
-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/keyboards/handwired/phantagom/baragon/info.json b/keyboards/handwired/phantagom/baragon/info.json
index f86dfcf436..390f114dd9 100644
--- a/keyboards/handwired/phantagom/baragon/info.json
+++ b/keyboards/handwired/phantagom/baragon/info.json
@@ -15,6 +15,7 @@
"encoder": true
},
"ws2812": {
+ "driver": "vendor",
"pin": "GP15"
},
"rgblight": {
diff --git a/keyboards/handwired/phantagom/baragon/rules.mk b/keyboards/handwired/phantagom/baragon/rules.mk
index bffd02535d..6e7633bfe0 100644
--- a/keyboards/handwired/phantagom/baragon/rules.mk
+++ b/keyboards/handwired/phantagom/baragon/rules.mk
@@ -1,2 +1 @@
-# Needed for RP2040
-WS2812_DRIVER = vendor \ No newline at end of file
+# This file intentionally left blank
diff --git a/keyboards/handwired/phantagom/varan/info.json b/keyboards/handwired/phantagom/varan/info.json
index 636c2d00e6..a767d45de0 100644
--- a/keyboards/handwired/phantagom/varan/info.json
+++ b/keyboards/handwired/phantagom/varan/info.json
@@ -14,6 +14,7 @@
"rgblight": true
},
"ws2812": {
+ "driver": "vendor",
"pin": "GP28"
},
"rgblight": {
diff --git a/keyboards/handwired/phantagom/varan/rules.mk b/keyboards/handwired/phantagom/varan/rules.mk
index bffd02535d..6e7633bfe0 100644
--- a/keyboards/handwired/phantagom/varan/rules.mk
+++ b/keyboards/handwired/phantagom/varan/rules.mk
@@ -1,2 +1 @@
-# Needed for RP2040
-WS2812_DRIVER = vendor \ No newline at end of file
+# This file intentionally left blank
diff --git a/keyboards/handwired/promethium/rgbsps.c b/keyboards/handwired/promethium/rgbsps.c
index f439876911..957726e775 100644
--- a/keyboards/handwired/promethium/rgbsps.c
+++ b/keyboards/handwired/promethium/rgbsps.c
@@ -1,7 +1,7 @@
#include "ws2812.h"
#include "rgbsps.h"
-cRGB led[RGBSPS_NUM];
+rgb_led_t led[RGBSPS_NUM];
void rgbsps_set(uint8_t index, uint8_t r, uint8_t g, uint8_t b) {
led[index].r = r;
diff --git a/keyboards/handwired/pterodactyl/rules.mk b/keyboards/handwired/pterodactyl/rules.mk
index 9f0cabc750..108e1498a8 100644
--- a/keyboards/handwired/pterodactyl/rules.mk
+++ b/keyboards/handwired/pterodactyl/rules.mk
@@ -18,4 +18,4 @@ CUSTOM_MATRIX = yes
BLUETOOTH_ENABLE = yes
SRC += matrix.c
-QUANTUM_LIB_SRC += i2c_master.c
+I2C_DRIVER_REQUIRED = yes
diff --git a/keyboards/handwired/rabijl/rotary_numpad/info.json b/keyboards/handwired/rabijl/rotary_numpad/info.json
new file mode 100644
index 0000000000..dafeec0fc0
--- /dev/null
+++ b/keyboards/handwired/rabijl/rotary_numpad/info.json
@@ -0,0 +1,66 @@
+{
+ "manufacturer": "rabijl",
+ "keyboard_name": "rotary_numpad",
+ "maintainer": "rabijl",
+ "url": "https://github.com/RABijl/",
+ "usb": {
+ "device_version": "1.0.0",
+ "pid": "0x0000",
+ "vid": "0xFEED"
+ },
+ "features": {
+ "bootmagic": true,
+ "command": false,
+ "console": false,
+ "extrakey": true,
+ "mousekey": true,
+ "nkro": true,
+ "encoder": true
+ },
+ "development_board": "promicro",
+ "diode_direction": "COL2ROW",
+ "matrix_pins": {
+ "cols": ["F5", "F4", "B5", "B4"],
+ "rows": ["F6", "F7", "B1", "B3", "B2", "B6"]
+ },
+ "encoder": {
+ "rotary": [
+ {"pin_a": "D1", "pin_b": "D0", "resolution": 3},
+ {"pin_a": "D4", "pin_b": "C6", "resolution": 3},
+ {"pin_a": "D7", "pin_b": "E6", "resolution": 3}
+ ]
+ },
+ "layouts": {
+ "LAYOUT": {
+ "layout": [
+ {"matrix": [5, 0],"x":0, "y":0.4},
+ {"matrix": [0, 0], "x":2, "y":0},
+ {"matrix": [0, 1], "x":3, "y":0},
+ {"matrix": [0, 2], "x":4, "y":0},
+ {"matrix": [0, 3], "x":5, "y":0},
+ {"matrix": [1, 0], "x":2, "y":1.25},
+ {"matrix": [1, 1], "x":3, "y":1.25},
+ {"matrix": [1, 2], "x":4, "y":1.25},
+ {"matrix": [1, 3], "x":5, "y":1.25},
+ {"matrix": [2, 0], "x":2, "y":2.25},
+ {"matrix": [2, 1], "x":3, "y":2.25},
+ {"matrix": [2, 2], "x":4, "y":2.25},
+ {"matrix": [2, 3], "x":5, "y":2.25, "h":2},
+
+ {"matrix": [3, 3], "x":0, "y":2.75},
+ {"matrix": [3, 0], "x":2, "y":3.25},
+ {"matrix": [3, 1], "x":3, "y":3.25},
+ {"matrix": [3, 2], "x":4, "y":3.25},
+
+ {"matrix": [4, 0], "x":2, "y":4.25},
+ {"matrix": [4, 1], "x":3, "y":4.25},
+ {"matrix": [4, 2], "x":4, "y":4.25},
+ {"matrix": [4, 3], "x":5, "y":4.25, "h":2},
+
+ {"matrix": [5, 3], "x":0, "y":5.05},
+ {"matrix": [5, 1], "x":2, "y":5.25, "w":2},
+ {"matrix": [5, 2], "x":4, "y":5.25}
+ ]
+ }
+ }
+}
diff --git a/keyboards/handwired/rabijl/rotary_numpad/keymaps/default/keymap.c b/keyboards/handwired/rabijl/rotary_numpad/keymaps/default/keymap.c
new file mode 100644
index 0000000000..d4462243b0
--- /dev/null
+++ b/keyboards/handwired/rabijl/rotary_numpad/keymaps/default/keymap.c
@@ -0,0 +1,62 @@
+// Copyright 2023 QMK
+// SPDX-License-Identifier: GPL-2.0-or-later
+//
+
+#include QMK_KEYBOARD_H
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ /*
+ * ┌───┐┌───┬───┬───┬───┐
+ * │Ply││Esc│Tab│MO1│Bsp│
+ * └───┘├───┼───┼───┼───┤
+ * │Num│ / │ * │ - │
+ * ├───┼───┼───┼───┤
+ * │ 7 │ 8 │ 9 │ │
+ * ┌───┐├───┼───┼───┤ + │
+ * │Esc││ 4 │ 5 │ 6 │ │
+ * └───┘├───┼───┼───┼───┤
+ * │ 1 │ 2 │ 3 │ │
+ * ┌───┐├───┴───┼───┤Ent│
+ * │ENT││ 0 │ . │ │
+ * └───┘└───────┴───┴───┘
+ */
+ [0] = LAYOUT(
+ KC_MPLY, KC_ESC, KC_TAB, MO(1), KC_BSPC,
+ KC_NUM, KC_PSLS, KC_PAST, KC_PMNS,
+ KC_P7, KC_P8, KC_P9, KC_PPLS,
+ KC_ESC, KC_P4, KC_P5, KC_P6,
+ KC_P1, KC_P2, KC_P3, KC_PENT,
+ KC_ENT, KC_P0, KC_PDOT
+ ),
+ /*
+ * ┌───┐┌───┬───┬───┬───┐
+ * │Ply││Rst│Tab│MO1│Bsp│
+ * └───┘├───┼───┼───┼───┤
+ * │Num│ / │ * │ - │
+ * ├───┼───┼───┼───┤
+ * │Hom│ ↑ │PgU│ │
+ * ┌───┐├───┼───┼───┤ + │
+ * │Esc││ ← │ │ → │ │
+ * └───┘├───┼───┼───┼───┤
+ * │End│ ↓ │PgD│ │
+ * ┌───┐├───┴───┼───┤Ent│
+ * │ENT││Insert │Del│ │
+ * └───┘└───────┴───┘───┘
+ */
+ [1] = LAYOUT(
+ _______, QK_BOOT, _______, _______, _______,
+ _______, _______, _______, _______,
+ KC_HOME, KC_UP, KC_PGUP, _______,
+ _______, KC_LEFT, KC_NO, KC_RGHT,
+ KC_END, KC_DOWN, KC_PGDN, _______,
+ _______, KC_INS, KC_DEL
+ )
+};
+
+#if defined(ENCODER_MAP_ENABLE)
+
+const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
+ [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(KC_DOWN, KC_UP), ENCODER_CCW_CW(KC_LEFT, KC_RIGHT) },
+ [1] = { ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(KC_LEFT, KC_RIGHT), ENCODER_CCW_CW(_______, _______) },
+};
+#endif
diff --git a/keyboards/handwired/rabijl/rotary_numpad/keymaps/default/rules.mk b/keyboards/handwired/rabijl/rotary_numpad/keymaps/default/rules.mk
new file mode 100644
index 0000000000..34789bf172
--- /dev/null
+++ b/keyboards/handwired/rabijl/rotary_numpad/keymaps/default/rules.mk
@@ -0,0 +1,2 @@
+
+ENCODER_MAP_ENABLE = yes
diff --git a/keyboards/handwired/rabijl/rotary_numpad/readme.md b/keyboards/handwired/rabijl/rotary_numpad/readme.md
new file mode 100644
index 0000000000..6eb2e1480f
--- /dev/null
+++ b/keyboards/handwired/rabijl/rotary_numpad/readme.md
@@ -0,0 +1,67 @@
+# Rotary Numpad
+
+
+![rotary_numpad](https://i.imgur.com/GwEH4WOh.jpeg)
+
+This is a personal project of mine where I wanted a number pad that I can put on the left side of keyboard that doesn't have a numberpad. I fell in love with the feel of rotary encoders on my 3d printer, so added three to be able to play around with.
+
+* Keyboard Maintainer: [rabijl](https://github.com/rabijl)
+* Hardware Supported: Sparkfun Pro Micro 5V (atmega32u4)
+* Hardware Availability: https://www.sparkfun.com/products/12640
+
+## How to build from scratch
+
+I handsoldered gateron blue switches to a 3D printed case. The design is modified from the [Ultipad](https://www.thingiverse.com/thing:4248565). \
+I used a sparkfun Pro Micro as my microcontroller and the pinout can be found in the `info.json`. I found this [site](https://golem.hu/article/pro-micro-pinout/) \
+to be very useful to identify different pins. You can find useful information on rotary encoders from the qmk docs [here](https://docs.qmk.fm/#/reference_info_json?id=encoders) and [here](https://docs.qmk.fm/#/feature_encoders).
+
+### matrix
+
+Due to the three rotary encoders, I had to use most of the available pins. Fortunately, all the buttons still fit in a 6x4 matrix. Looking at the diagram below, the three buttons in the first column correspond to each encoder button.
+
+```
+ ┌──┐┌──┐┌──┐┌──┐
+ │0A││0B││0C││0D│
+┌──┐ └──┘└──┘└──┘└──┘
+│5A│
+└──┘ ┌──┐┌──┐┌──┐┌──┐
+ │1A││1B││1C││1D│
+ └──┘└──┘└──┘└──┘
+ ┌──┐┌──┐┌──┐┌──┐
+ │2A││2B││2C││2D│
+┌──┐ └──┘└──┘└──┘│ │
+│3D│ ┌──┐┌──┐┌──┐│ │
+└──┘ │3A││3B││3C││ │
+ └──┘└──┘└──┘└──┘
+ ┌──┐┌──┐┌──┐┌──┐
+ │4A││4B││4C││4D│
+ └──┘└──┘└──┘│ │
+┌──┐ ┌──────┐┌──┐│ │
+│5D│ │5B ││5C││ │
+└──┘ └──────┘└──┘└──┘
+
+```
+
+## Flashing
+
+Make example for this keyboard (after setting up your build environment):
+
+ qmk compile -kb handwired/rabijl/rotary_numpad -km default
+
+Flashing example for this keyboard:
+
+ qmk flash -kb handwired/rabijl/rotary_numpad -km default
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
+
+## Bootloader
+
+Enter the bootloader in 3 ways:
+
+* **Short reset leads**: tap the reset lead to ground twice quickly after qmk is in flash mode
+* **Keycode in layout**: double tap the key mapped to `QK_BOOT`. On the default keymap this can be found by holding in key (0,C) and tapping key (0,A), see the matrix section for the positions of these keys.
+* **Bootmagic reset**: Hold down the key at (0,A) in the matrix (see matrix section) and plug in the keyboard
+
+**Note:** if the keyboard doesn't show up after putting the keyboard in reset mode, check that
+your user is added to the `tty` and/or `uucp` groups. \
+You may need to logout after adding these groups to your user, for the changes to take affect.
diff --git a/keyboards/handwired/rabijl/rotary_numpad/rules.mk b/keyboards/handwired/rabijl/rotary_numpad/rules.mk
new file mode 100644
index 0000000000..1287472e49
--- /dev/null
+++ b/keyboards/handwired/rabijl/rotary_numpad/rules.mk
@@ -0,0 +1 @@
+# file intentionally left blank
diff --git a/keyboards/handwired/steamvan/rev1/config.h b/keyboards/handwired/steamvan/rev1/config.h
index 88323300f8..a779dcccab 100644
--- a/keyboards/handwired/steamvan/rev1/config.h
+++ b/keyboards/handwired/steamvan/rev1/config.h
@@ -22,7 +22,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE
-#define WS2812_SPI SPID1
+#define WS2812_SPI_DRIVER SPID1
#define WS2812_SPI_MOSI_PAL_MODE 5
#define RGB_MATRIX_KEYPRESSES
diff --git a/keyboards/handwired/swiftrax/beegboy/config.h b/keyboards/handwired/swiftrax/beegboy/config.h
deleted file mode 100644
index 092f2ba0e9..0000000000
--- a/keyboards/handwired/swiftrax/beegboy/config.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
-Copyright 2020 Swiftrax <swiftrax@gmail.com>
-
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#pragma once
-
-/*EEPROM for via*/
-#define DYNAMIC_KEYMAP_LAYER_COUNT 3
diff --git a/keyboards/handwired/swiftrax/cowfish/config.h b/keyboards/handwired/swiftrax/cowfish/config.h
deleted file mode 100644
index 092f2ba0e9..0000000000
--- a/keyboards/handwired/swiftrax/cowfish/config.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
-Copyright 2020 Swiftrax <swiftrax@gmail.com>
-
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#pragma once
-
-/*EEPROM for via*/
-#define DYNAMIC_KEYMAP_LAYER_COUNT 3
diff --git a/keyboards/handwired/swiftrax/glacier/config.h b/keyboards/handwired/swiftrax/glacier/config.h
deleted file mode 100644
index 7f9b0b12d4..0000000000
--- a/keyboards/handwired/swiftrax/glacier/config.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
-Copyright 2021 Swiftrax <swiftrax@gmail.com>
-
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#pragma once
-
-/*EEPROM for via*/
-#define DYNAMIC_KEYMAP_LAYER_COUNT 3
diff --git a/keyboards/handwired/swiftrax/joypad/config.h b/keyboards/handwired/swiftrax/joypad/config.h
deleted file mode 100644
index 092f2ba0e9..0000000000
--- a/keyboards/handwired/swiftrax/joypad/config.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
-Copyright 2020 Swiftrax <swiftrax@gmail.com>
-
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#pragma once
-
-/*EEPROM for via*/
-#define DYNAMIC_KEYMAP_LAYER_COUNT 3
diff --git a/keyboards/handwired/swiftrax/koalafications/config.h b/keyboards/handwired/swiftrax/koalafications/config.h
deleted file mode 100644
index 7435ce54af..0000000000
--- a/keyboards/handwired/swiftrax/koalafications/config.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
-Copyright 2021 Swiftrax <swiftrax@gmail.com>
-
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#pragma once
-
-/*EEPROM for via*/
-#define DYNAMIC_KEYMAP_LAYER_COUNT 3 \ No newline at end of file
diff --git a/keyboards/handwired/swiftrax/nodu/config.h b/keyboards/handwired/swiftrax/nodu/config.h
deleted file mode 100644
index 6726795c45..0000000000
--- a/keyboards/handwired/swiftrax/nodu/config.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
-Copyright 2020 Swiftrax <swiftrax@gmail.com>
-
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#pragma once
-
-/*EEPROM for via*/
-#define DYNAMIC_KEYMAP_LAYER_COUNT 3 \ No newline at end of file
diff --git a/keyboards/handwired/swiftrax/pandamic/config.h b/keyboards/handwired/swiftrax/pandamic/config.h
deleted file mode 100644
index 092f2ba0e9..0000000000
--- a/keyboards/handwired/swiftrax/pandamic/config.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
-Copyright 2020 Swiftrax <swiftrax@gmail.com>
-
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#pragma once
-
-/*EEPROM for via*/
-#define DYNAMIC_KEYMAP_LAYER_COUNT 3
diff --git a/keyboards/handwired/swiftrax/the_galleon/config.h b/keyboards/handwired/swiftrax/the_galleon/config.h
deleted file mode 100644
index 7f9b0b12d4..0000000000
--- a/keyboards/handwired/swiftrax/the_galleon/config.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
-Copyright 2021 Swiftrax <swiftrax@gmail.com>
-
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#pragma once
-
-/*EEPROM for via*/
-#define DYNAMIC_KEYMAP_LAYER_COUNT 3
diff --git a/keyboards/handwired/swiftrax/the_galleon/info.json b/keyboards/handwired/swiftrax/the_galleon/info.json
index b12fc5c31f..2e0771e22c 100644
--- a/keyboards/handwired/swiftrax/the_galleon/info.json
+++ b/keyboards/handwired/swiftrax/the_galleon/info.json
@@ -13,6 +13,9 @@
"rows": ["B1", "B0", "D2", "B7", "D5", "D3", "D6", "D4", "B4", "D7", "B6", "B5", "C7", "C6"]
},
"diode_direction": "ROW2COL",
+ "dynamic_keymap": {
+ "layer_count": 3
+ },
"processor": "atmega32u4",
"bootloader": "atmel-dfu",
"layouts": {
diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/f303/info.json b/keyboards/handwired/tractyl_manuform/5x6_right/f303/info.json
index 62fa261ac7..eafb77fce2 100644
--- a/keyboards/handwired/tractyl_manuform/5x6_right/f303/info.json
+++ b/keyboards/handwired/tractyl_manuform/5x6_right/f303/info.json
@@ -5,6 +5,9 @@
"rows": ["B10", "B11", "B12", "A14", "A13", "A15"]
},
"diode_direction": "COL2ROW",
+ "eeprom": {
+ "driver": "spi"
+ },
"rgblight": {
"led_count": 20,
"split_count": [10, 10]
diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/f303/rules.mk b/keyboards/handwired/tractyl_manuform/5x6_right/f303/rules.mk
index 3959814c8d..ab601e31f9 100644
--- a/keyboards/handwired/tractyl_manuform/5x6_right/f303/rules.mk
+++ b/keyboards/handwired/tractyl_manuform/5x6_right/f303/rules.mk
@@ -1,6 +1,5 @@
# KEYBOARD_SHARED_EP = yes
CONSOLE_ENABLE = yes
-EEPROM_DRIVER = spi
SERIAL_DRIVER = usart
AUDIO_DRIVER = dac_additive
diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/f411/info.json b/keyboards/handwired/tractyl_manuform/5x6_right/f411/info.json
index 3f0c316928..e5a6dc6c7a 100644
--- a/keyboards/handwired/tractyl_manuform/5x6_right/f411/info.json
+++ b/keyboards/handwired/tractyl_manuform/5x6_right/f411/info.json
@@ -5,6 +5,9 @@
"rows": ["B12", "B13", "B14", "B15", "A8", "A10"]
},
"diode_direction": "COL2ROW",
+ "eeprom": {
+ "driver": "spi"
+ },
"rgblight": {
"led_count": 57,
"split_count": [26, 31]
diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/f411/rules.mk b/keyboards/handwired/tractyl_manuform/5x6_right/f411/rules.mk
index b466a6234a..0c4b05ee7e 100644
--- a/keyboards/handwired/tractyl_manuform/5x6_right/f411/rules.mk
+++ b/keyboards/handwired/tractyl_manuform/5x6_right/f411/rules.mk
@@ -2,6 +2,5 @@ KEYBOARD_SHARED_EP = yes
CONSOLE_ENABLE = yes
MOUSE_SHARED_EP = yes
-EEPROM_DRIVER = spi
SERIAL_DRIVER = usart
AUDIO_DRIVER = pwm_hardware
diff --git a/keyboards/handwired/traveller/keymaps/default/keymap.c b/keyboards/handwired/traveller/keymaps/default/keymap.c
index 2cd57db35f..5d2a3b3750 100644
--- a/keyboards/handwired/traveller/keymaps/default/keymap.c
+++ b/keyboards/handwired/traveller/keymaps/default/keymap.c
@@ -1,5 +1,4 @@
#include QMK_KEYBOARD_H
-#include "mousekey.h"
enum layer_names {
_QW,
diff --git a/keyboards/hazel/bad_wings/rules.mk b/keyboards/hazel/bad_wings/rules.mk
index 1001af0186..47a188155f 100644
--- a/keyboards/hazel/bad_wings/rules.mk
+++ b/keyboards/hazel/bad_wings/rules.mk
@@ -3,7 +3,7 @@ CAPS_WORD_ENABLE = yes
SRC += matrix.c
-QUANTUM_LIB_SRC += spi_master.c
+SPI_DRIVER_REQUIRED = yes
CUSTOM_MATRIX = lite
POINTING_DEVICE_DRIVER = cirque_pinnacle_spi
diff --git a/keyboards/hfdkb/ac001/config.h b/keyboards/hfdkb/ac001/config.h
index 6c0c2a2cf6..7d38c7392c 100644
--- a/keyboards/hfdkb/ac001/config.h
+++ b/keyboards/hfdkb/ac001/config.h
@@ -32,7 +32,6 @@
#define SPI_MOSI_PAL_MODE 5
#define EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN C12
-#define WEAR_LEVELING_BACKING_SIZE (8 * 1024)
#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
diff --git a/keyboards/hfdkb/ac001/info.json b/keyboards/hfdkb/ac001/info.json
index 0a361d63ed..3f896d5988 100644
--- a/keyboards/hfdkb/ac001/info.json
+++ b/keyboards/hfdkb/ac001/info.json
@@ -17,6 +17,13 @@
"rows": ["B15"]
},
"diode_direction": "ROW2COL",
+ "eeprom": {
+ "driver": "wear_leveling",
+ "wear_leveling": {
+ "driver": "spi_flash",
+ "backing_size": 8192
+ }
+ },
"ws2812": {
"pin": "A1"
},
diff --git a/keyboards/hfdkb/ac001/rules.mk b/keyboards/hfdkb/ac001/rules.mk
index 81b7e82c3f..1358ab075a 100644
--- a/keyboards/hfdkb/ac001/rules.mk
+++ b/keyboards/hfdkb/ac001/rules.mk
@@ -10,5 +10,3 @@ NKRO_ENABLE = yes # Enable N-Key Rollover
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
RGB_MATRIX_ENABLE = yes
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = spi_flash
diff --git a/keyboards/hineybush/hbcp/hbcp.c b/keyboards/hineybush/hbcp/hbcp.c
index 7d0f5ecf73..df17650f27 100644
--- a/keyboards/hineybush/hbcp/hbcp.c
+++ b/keyboards/hineybush/hbcp/hbcp.c
@@ -49,19 +49,19 @@ bool led_update_kb(led_t led_state) {
bool res = led_update_user(led_state);
if (res) {
if (led_state.caps_lock) {
- sethsv_raw(HSV_CAPS, (LED_TYPE *)&led[0]);
+ sethsv_raw(HSV_CAPS, (rgb_led_t *)&led[0]);
} else {
- sethsv(HSV_BLACK, (LED_TYPE *)&led[0]);
+ sethsv(HSV_BLACK, (rgb_led_t *)&led[0]);
}
if (led_state.num_lock) {
- sethsv_raw(HSV_NLCK, (LED_TYPE *)&led[1]);
+ sethsv_raw(HSV_NLCK, (rgb_led_t *)&led[1]);
} else {
- sethsv(HSV_BLACK, (LED_TYPE *)&led[1]);
+ sethsv(HSV_BLACK, (rgb_led_t *)&led[1]);
}
if (led_state.scroll_lock) {
- sethsv_raw(HSV_SCRL, (LED_TYPE *)&led[2]);
+ sethsv_raw(HSV_SCRL, (rgb_led_t *)&led[2]);
} else {
- sethsv(HSV_BLACK, (LED_TYPE *)&led[2]);
+ sethsv(HSV_BLACK, (rgb_led_t *)&led[2]);
}
rgblight_set();
}
@@ -83,7 +83,7 @@ void keyboard_post_init_user(void) {
__attribute__ ((weak))
void hbcp_sethsv_range(uint8_t hue, uint8_t sat, uint8_t val, uint8_t start, uint8_t end) {
- LED_TYPE tmp_led;
+ rgb_led_t tmp_led;
sethsv_raw(hue, sat, val, &tmp_led);
for (uint8_t i = start; i < end; i++) {
led[i] = tmp_led;
diff --git a/keyboards/hineybush/hbcp/keymaps/hiney/keymap.c b/keyboards/hineybush/hbcp/keymaps/hiney/keymap.c
index 26a67fe7ca..2311d4020f 100644
--- a/keyboards/hineybush/hbcp/keymaps/hiney/keymap.c
+++ b/keyboards/hineybush/hbcp/keymaps/hiney/keymap.c
@@ -79,19 +79,19 @@ void matrix_scan_user(void) {
// The first three LEDs are used as indicators for CAPS_LOCK, NUM_LOCK and SCROLL_LOCK.
bool led_update_user(led_t led_state) {
if (led_state.caps_lock) {
- sethsv_raw(HSV_SOFT_RED, (LED_TYPE *)&led[0]);
+ sethsv_raw(HSV_SOFT_RED, (rgb_led_t *)&led[0]);
} else {
- sethsv(HSV_BLACK, (LED_TYPE *)&led[0]);
+ sethsv(HSV_BLACK, (rgb_led_t *)&led[0]);
}
if (led_state.num_lock) {
- sethsv_raw(HSV_WARM_WHITE, (LED_TYPE *)&led[1]);
+ sethsv_raw(HSV_WARM_WHITE, (rgb_led_t *)&led[1]);
} else {
- sethsv(HSV_BLACK, (LED_TYPE *)&led[1]);
+ sethsv(HSV_BLACK, (rgb_led_t *)&led[1]);
}
if (led_state.scroll_lock) {
- sethsv_raw(HSV_SOFT_BLUE, (LED_TYPE *)&led[2]);
+ sethsv_raw(HSV_SOFT_BLUE, (rgb_led_t *)&led[2]);
} else {
- sethsv(HSV_BLACK, (LED_TYPE *)&led[2]);
+ sethsv(HSV_BLACK, (rgb_led_t *)&led[2]);
}
rgblight_set();
return false;
diff --git a/keyboards/horrortroll/handwired_k552/config.h b/keyboards/horrortroll/handwired_k552/config.h
index bec0ac055b..11461a9418 100644
--- a/keyboards/horrortroll/handwired_k552/config.h
+++ b/keyboards/horrortroll/handwired_k552/config.h
@@ -30,10 +30,6 @@
#define EXTERNAL_FLASH_BLOCK_SIZE 4096
#define EXTERNAL_FLASH_SIZE (256 * 1024) // 2M-bit flash size
-// Wear-leveling driver configuration
-#define WEAR_LEVELING_LOGICAL_SIZE 1024
-#define WEAR_LEVELING_BACKING_SIZE (WEAR_LEVELING_LOGICAL_SIZE * 2)
-
#ifdef OLED_ENABLE
/* Mapping I2C2 for OLED */
#define I2C1_SCL_PIN B10
diff --git a/keyboards/horrortroll/handwired_k552/info.json b/keyboards/horrortroll/handwired_k552/info.json
index d137a03a52..b064df38c2 100644
--- a/keyboards/horrortroll/handwired_k552/info.json
+++ b/keyboards/horrortroll/handwired_k552/info.json
@@ -20,6 +20,13 @@
"rows": ["C12", "C10", "A10", "A8", "C8", "C9"]
},
"diode_direction": "ROW2COL",
+ "eeprom": {
+ "driver": "wear_leveling",
+ "wear_leveling": {
+ "driver": "spi_flash",
+ "backing_size": 2048
+ }
+ },
"community_layouts": ["tkl_ansi"],
"layouts": {
"LAYOUT_tkl_ansi": {
diff --git a/keyboards/horrortroll/handwired_k552/rules.mk b/keyboards/horrortroll/handwired_k552/rules.mk
index fd1825af35..6d6ec253db 100644
--- a/keyboards/horrortroll/handwired_k552/rules.mk
+++ b/keyboards/horrortroll/handwired_k552/rules.mk
@@ -32,7 +32,3 @@ RGB_MATRIX_ENABLE = yes
# OLED enabled
OLED_ENABLE = yes
WPM_ENABLE = yes
-
-# Wear-levelling driver
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = spi_flash
diff --git a/keyboards/hotdox/rules.mk b/keyboards/hotdox/rules.mk
index 1088cbc14b..8e11eeabe0 100644
--- a/keyboards/hotdox/rules.mk
+++ b/keyboards/hotdox/rules.mk
@@ -15,5 +15,5 @@ RGBLIGHT_ENABLE = no
# project specific files
SRC = matrix.c \
- i2c_master.c \
left.c
+I2C_DRIVER_REQUIRED = yes
diff --git a/keyboards/hs60/v1/config.h b/keyboards/hs60/v1/config.h
index 62c800b9bc..c7eac09b17 100644
--- a/keyboards/hs60/v1/config.h
+++ b/keyboards/hs60/v1/config.h
@@ -41,10 +41,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// #define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 215
-#define DRIVER_ADDR_1 0b1110100
-#define DRIVER_ADDR_2 0b1110101
+#define DRIVER_ADDR_1 IS31FL3731_I2C_ADDRESS_GND
+#define DRIVER_ADDR_2 IS31FL3731_I2C_ADDRESS_SCL
-#define DRIVER_COUNT 2
+#define IS31FL3731_DRIVER_COUNT 2
#define DRIVER_1_LED_TOTAL 30
#ifdef HS60_ANSI
diff --git a/keyboards/hs60/v1/v1.c b/keyboards/hs60/v1/v1.c
index 6c5f03f428..50f6215a02 100644
--- a/keyboards/hs60/v1/v1.c
+++ b/keyboards/hs60/v1/v1.c
@@ -91,7 +91,7 @@ void raw_hid_receive( uint8_t *data, uint8_t length )
#ifdef HS60_ANSI
-const is31_led 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
@@ -199,7 +199,7 @@ led_config_t g_led_config = { {
#else
-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/keyboards/hs60/v2/ansi/config.h b/keyboards/hs60/v2/ansi/config.h
index 614b44d4d4..8b31f0e066 100644
--- a/keyboards/hs60/v2/ansi/config.h
+++ b/keyboards/hs60/v2/ansi/config.h
@@ -53,7 +53,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 }
#define RGB_BACKLIGHT_COLOR_2 { .h = 127, .s = 255 }
-#define DRIVER_COUNT 2
+#define IS31FL3733_DRIVER_COUNT 2
#define RGB_MATRIX_LED_COUNT 64
// These define which keys in the matrix are alphas/mods
diff --git a/keyboards/hs60/v2/ansi/rules.mk b/keyboards/hs60/v2/ansi/rules.mk
index a231765dff..bc8cb00131 100644
--- a/keyboards/hs60/v2/ansi/rules.mk
+++ b/keyboards/hs60/v2/ansi/rules.mk
@@ -22,5 +22,5 @@ CIE1931_CURVE = yes
SRC = keyboards/wilba_tech/wt_main.c \
keyboards/wilba_tech/wt_rgb_backlight.c \
drivers/led/issi/is31fl3733.c \
- quantum/color.c \
- i2c_master.c
+ quantum/color.c
+I2C_DRIVER_REQUIRED = yes
diff --git a/keyboards/hs60/v2/hhkb/config.h b/keyboards/hs60/v2/hhkb/config.h
index e834616068..7494b2e66c 100644
--- a/keyboards/hs60/v2/hhkb/config.h
+++ b/keyboards/hs60/v2/hhkb/config.h
@@ -53,7 +53,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 }
#define RGB_BACKLIGHT_COLOR_2 { .h = 127, .s = 255 }
-#define DRIVER_COUNT 2
+#define IS31FL3733_DRIVER_COUNT 2
#define RGB_MATRIX_LED_COUNT 64
// These define which keys in the matrix are alphas/mods
diff --git a/keyboards/hs60/v2/hhkb/rules.mk b/keyboards/hs60/v2/hhkb/rules.mk
index a231765dff..bc8cb00131 100644
--- a/keyboards/hs60/v2/hhkb/rules.mk
+++ b/keyboards/hs60/v2/hhkb/rules.mk
@@ -22,5 +22,5 @@ CIE1931_CURVE = yes
SRC = keyboards/wilba_tech/wt_main.c \
keyboards/wilba_tech/wt_rgb_backlight.c \
drivers/led/issi/is31fl3733.c \
- quantum/color.c \
- i2c_master.c
+ quantum/color.c
+I2C_DRIVER_REQUIRED = yes
diff --git a/keyboards/hs60/v2/iso/config.h b/keyboards/hs60/v2/iso/config.h
index 7421f1bf12..22608404b5 100644
--- a/keyboards/hs60/v2/iso/config.h
+++ b/keyboards/hs60/v2/iso/config.h
@@ -50,7 +50,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 }
#define RGB_BACKLIGHT_COLOR_2 { .h = 127, .s = 255 }
-#define DRIVER_COUNT 2
+#define IS31FL3733_DRIVER_COUNT 2
#define RGB_MATRIX_LED_COUNT 64
// These define which keys in the matrix are alphas/mods
diff --git a/keyboards/hs60/v2/iso/rules.mk b/keyboards/hs60/v2/iso/rules.mk
index a231765dff..bc8cb00131 100644
--- a/keyboards/hs60/v2/iso/rules.mk
+++ b/keyboards/hs60/v2/iso/rules.mk
@@ -22,5 +22,5 @@ CIE1931_CURVE = yes
SRC = keyboards/wilba_tech/wt_main.c \
keyboards/wilba_tech/wt_rgb_backlight.c \
drivers/led/issi/is31fl3733.c \
- quantum/color.c \
- i2c_master.c
+ quantum/color.c
+I2C_DRIVER_REQUIRED = yes
diff --git a/keyboards/ibm/model_m/mschwingen/mschwingen.c b/keyboards/ibm/model_m/mschwingen/mschwingen.c
index b764660e21..8e3810cd23 100644
--- a/keyboards/ibm/model_m/mschwingen/mschwingen.c
+++ b/keyboards/ibm/model_m/mschwingen/mschwingen.c
@@ -39,26 +39,26 @@ static uint8_t isRecording = 0;
# if RGBLED_NUM < 3
# error we need at least 3 RGB LEDs!
# endif
-static cRGB led[RGBLED_NUM] = {{255, 255, 255}, {255, 255, 255}, {255, 255, 255}};
+static rgb_led_t led[RGBLED_NUM] = {{255, 255, 255}, {255, 255, 255}, {255, 255, 255}};
# define BRIGHT 32
# define DIM 6
-static const cRGB black = {.r = 0, .g = 0, .b = 0};
+static const rgb_led_t black = {.r = 0, .g = 0, .b = 0};
-static const __attribute__((unused)) cRGB green = {.r = 0, .g = BRIGHT, .b = 0};
-static const __attribute__((unused)) cRGB lgreen = {.r = 0, .g = DIM, .b = 0};
+static const __attribute__((unused)) rgb_led_t green = {.r = 0, .g = BRIGHT, .b = 0};
+static const __attribute__((unused)) rgb_led_t lgreen = {.r = 0, .g = DIM, .b = 0};
-static const __attribute__((unused)) cRGB red = {.r = BRIGHT, .g = 0, .b = 0};
-static const __attribute__((unused)) cRGB lred = {.r = DIM, .g = 0, .b = 0};
+static const __attribute__((unused)) rgb_led_t red = {.r = BRIGHT, .g = 0, .b = 0};
+static const __attribute__((unused)) rgb_led_t lred = {.r = DIM, .g = 0, .b = 0};
-static const __attribute__((unused)) cRGB blue = {.r = 0, .g = 0, .b = BRIGHT};
-static const __attribute__((unused)) cRGB lblue = {.r = 0, .g = 0, .b = DIM};
+static const __attribute__((unused)) rgb_led_t blue = {.r = 0, .g = 0, .b = BRIGHT};
+static const __attribute__((unused)) rgb_led_t lblue = {.r = 0, .g = 0, .b = DIM};
-static const __attribute__((unused)) cRGB turq = {.r = 0, .g = BRIGHT, .b = BRIGHT};
-static const __attribute__((unused)) cRGB lturq = {.r = 0, .g = DIM, .b = DIM};
+static const __attribute__((unused)) rgb_led_t turq = {.r = 0, .g = BRIGHT, .b = BRIGHT};
+static const __attribute__((unused)) rgb_led_t lturq = {.r = 0, .g = DIM, .b = DIM};
-static const __attribute__((unused)) cRGB white = {.r = BRIGHT, .g = BRIGHT, .b = BRIGHT};
+static const __attribute__((unused)) rgb_led_t white = {.r = BRIGHT, .g = BRIGHT, .b = BRIGHT};
static led_t led_state;
static uint8_t layer;
diff --git a/keyboards/ibm/model_m/mschwingen/rules.mk b/keyboards/ibm/model_m/mschwingen/rules.mk
index 5ccab87d9b..7d81ffe326 100644
--- a/keyboards/ibm/model_m/mschwingen/rules.mk
+++ b/keyboards/ibm/model_m/mschwingen/rules.mk
@@ -19,8 +19,8 @@ DYNAMIC_MACRO_ENABLE = yes
UART_DEBUG = no
SRC += matrix.c
-QUANTUM_LIB_SRC += uart.c \
- spi_master.c
+UART_DRIVER_REQUIRED = yes
+SPI_DRIVER_REQUIRED = yes
OPT_DEFS += -DSLEEP_LED_ENABLE # we need our own sleep callbacks to turn of WS2812 LEDs
diff --git a/keyboards/ibm/model_m/yugo_m/config.h b/keyboards/ibm/model_m/yugo_m/config.h
index 2b7fc4d157..0e6881ded3 100644
--- a/keyboards/ibm/model_m/yugo_m/config.h
+++ b/keyboards/ibm/model_m/yugo_m/config.h
@@ -36,7 +36,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
//#define NO_ACTION_LAYER
//#define NO_ACTION_TAPPING
//#define NO_ACTION_ONESHOT
-
-/* redefine available (emulated) EEPROM as 4 kB rather than the default 2 kB to let VIA use more of the on-chip Flash of the STM32F303 to store 4 layers (since 4 layers * 8 rows * 16 columns * 2 = 1024 bytes but the default max available is 1023 bytes due to ATMEGA32U4 etc. only having 1 kB of EEPROM) */
-#define WEAR_LEVELING_BACKING_SIZE 4096
-#define WEAR_LEVELING_LOGICAL_SIZE 2048
diff --git a/keyboards/ibm/model_m/yugo_m/info.json b/keyboards/ibm/model_m/yugo_m/info.json
index 6e3a0b39c6..f4d9cc1d94 100644
--- a/keyboards/ibm/model_m/yugo_m/info.json
+++ b/keyboards/ibm/model_m/yugo_m/info.json
@@ -13,6 +13,11 @@
"rows": ["B8", "B7", "B6", "B5", "B4", "B3", "A15", "A14"]
},
"diode_direction": "ROW2COL",
+ "eeprom": {
+ "wear_leveling": {
+ "backing_size": 4096
+ }
+ },
"processor": "STM32F303",
"bootloader": "stm32-dfu",
"board": "QMK_PROTON_C",
diff --git a/keyboards/idyllic/tinny50_rgb/config.h b/keyboards/idyllic/tinny50_rgb/config.h
index 15e1a6ff5c..0cb5eac432 100644
--- a/keyboards/idyllic/tinny50_rgb/config.h
+++ b/keyboards/idyllic/tinny50_rgb/config.h
@@ -17,9 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once
-
-#define DYNAMIC_KEYMAP_LAYER_COUNT 6
-
#ifdef RGB_MATRIX_ENABLE
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 255
#define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS * 7/8
diff --git a/keyboards/idyllic/tinny50_rgb/info.json b/keyboards/idyllic/tinny50_rgb/info.json
index f02e88f459..7e68b960f5 100644
--- a/keyboards/idyllic/tinny50_rgb/info.json
+++ b/keyboards/idyllic/tinny50_rgb/info.json
@@ -22,6 +22,9 @@
"rgb_matrix": true
},
"diode_direction": "COL2ROW",
+ "dynamic_keymap": {
+ "layer_count": 6
+ },
"matrix_pins": {
"rows": ["GP0", "GP2", "GP3", "GP4", "GP7"],
"cols": ["GP29", "GP28", "GP27", "GP26", "GP25", "GP24", "GP23", "GP20", "GP19", "GP1", "GP6", "GP5"]
diff --git a/keyboards/ilumkb/simpler61/config.h b/keyboards/ilumkb/simpler61/config.h
index 151eba96c9..5a9b4df785 100644
--- a/keyboards/ilumkb/simpler61/config.h
+++ b/keyboards/ilumkb/simpler61/config.h
@@ -21,8 +21,8 @@
#define RGB_MATRIX_LED_PROCESS_LIMIT 4
#define RGB_MATRIX_LED_FLUSH_LIMIT 26
#define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_CYCLE_ALL
-#define DRIVER_ADDR_1 0b0110000
-#define DRIVER_COUNT 1
+#define DRIVER_ADDR_1 IS31FL3741_I2C_ADDRESS_GND
+#define IS31FL3741_DRIVER_COUNT 1
#define DRIVER_1_LED_TOTAL 61
#define RGB_MATRIX_LED_COUNT DRIVER_1_LED_TOTAL
#define DRIVER_INDICATOR_LED_TOTAL 0
diff --git a/keyboards/ilumkb/simpler61/simpler61.c b/keyboards/ilumkb/simpler61/simpler61.c
index 32670396da..f29f05defe 100644
--- a/keyboards/ilumkb/simpler61/simpler61.c
+++ b/keyboards/ilumkb/simpler61/simpler61.c
@@ -17,7 +17,7 @@
#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3741_led_t PROGMEM g_is31fl3741_leds[RGB_MATRIX_LED_COUNT] = {
{0, CS3_SW1, CS2_SW1, CS1_SW1},
{0, CS3_SW2, CS2_SW2, CS1_SW2},
{0, CS3_SW3, CS2_SW3, CS1_SW3},
diff --git a/keyboards/ilumkb/simpler64/config.h b/keyboards/ilumkb/simpler64/config.h
index 5554f56bd1..ab1265fe1c 100644
--- a/keyboards/ilumkb/simpler64/config.h
+++ b/keyboards/ilumkb/simpler64/config.h
@@ -21,8 +21,8 @@
#define RGB_MATRIX_LED_PROCESS_LIMIT 4
#define RGB_MATRIX_LED_FLUSH_LIMIT 26
#define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_CYCLE_ALL
-#define DRIVER_ADDR_1 0b0110000
-#define DRIVER_COUNT 1
+#define DRIVER_ADDR_1 IS31FL3741_I2C_ADDRESS_GND
+#define IS31FL3741_DRIVER_COUNT 1
#define DRIVER_1_LED_TOTAL 64
#define RGB_MATRIX_LED_COUNT DRIVER_1_LED_TOTAL
#define DRIVER_INDICATOR_LED_TOTAL 0
diff --git a/keyboards/ilumkb/simpler64/simpler64.c b/keyboards/ilumkb/simpler64/simpler64.c
index 130898f037..a562fa5c8b 100644
--- a/keyboards/ilumkb/simpler64/simpler64.c
+++ b/keyboards/ilumkb/simpler64/simpler64.c
@@ -17,7 +17,7 @@
#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3741_led_t PROGMEM g_is31fl3741_leds[RGB_MATRIX_LED_COUNT] = {
{0, CS3_SW1, CS2_SW1, CS1_SW1},
{0, CS3_SW2, CS2_SW2, CS1_SW2},
{0, CS3_SW3, CS2_SW3, CS1_SW3},
diff --git a/keyboards/inett_studio/sqx/hotswap/config.h b/keyboards/inett_studio/sqx/hotswap/config.h
index f698867ffb..66a6a8a611 100644
--- a/keyboards/inett_studio/sqx/hotswap/config.h
+++ b/keyboards/inett_studio/sqx/hotswap/config.h
@@ -32,9 +32,9 @@
//rgb matrix setting
#define DRIVER_1_LED_TOTAL 33
#define DRIVER_2_LED_TOTAL 31
-#define DRIVER_ADDR_1 0b1110100
-#define DRIVER_ADDR_2 0b1110111
-#define DRIVER_COUNT 2
+#define DRIVER_ADDR_1 IS31FL3731_I2C_ADDRESS_GND
+#define DRIVER_ADDR_2 IS31FL3731_I2C_ADDRESS_VCC
+#define IS31FL3731_DRIVER_COUNT 2
#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
#if defined(RGB_MATRIX_ENABLE) && defined(RGBLIGHT_ENABLE)
diff --git a/keyboards/inett_studio/sqx/hotswap/hotswap.c b/keyboards/inett_studio/sqx/hotswap/hotswap.c
index 7f5e298c4c..4d77a4829e 100644
--- a/keyboards/inett_studio/sqx/hotswap/hotswap.c
+++ b/keyboards/inett_studio/sqx/hotswap/hotswap.c
@@ -20,7 +20,7 @@
#include "hotswap.h"
#ifdef RGB_MATRIX_ENABLE
-const is31_led 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/keyboards/inett_studio/sqx/universal/config.h b/keyboards/inett_studio/sqx/universal/config.h
index 30903b5803..73bda58206 100644
--- a/keyboards/inett_studio/sqx/universal/config.h
+++ b/keyboards/inett_studio/sqx/universal/config.h
@@ -32,9 +32,9 @@
//rgb matrix setting
#define DRIVER_1_LED_TOTAL 36
#define DRIVER_2_LED_TOTAL 36
-#define DRIVER_ADDR_1 0b1110100
-#define DRIVER_ADDR_2 0b1110111
-#define DRIVER_COUNT 2
+#define DRIVER_ADDR_1 IS31FL3731_I2C_ADDRESS_GND
+#define DRIVER_ADDR_2 IS31FL3731_I2C_ADDRESS_VCC
+#define IS31FL3731_DRIVER_COUNT 2
#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
#if defined(RGB_MATRIX_ENABLE) && defined(RGBLIGHT_ENABLE)
diff --git a/keyboards/inett_studio/sqx/universal/universal.c b/keyboards/inett_studio/sqx/universal/universal.c
index 9715f28b78..3ba42e9995 100644
--- a/keyboards/inett_studio/sqx/universal/universal.c
+++ b/keyboards/inett_studio/sqx/universal/universal.c
@@ -20,7 +20,7 @@
#include "universal.h"
#ifdef RGB_MATRIX_ENABLE
-const is31_led 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/keyboards/ingrained/rules.mk b/keyboards/ingrained/rules.mk
index 8dd9805257..e9a8002f90 100644
--- a/keyboards/ingrained/rules.mk
+++ b/keyboards/ingrained/rules.mk
@@ -16,4 +16,4 @@ NO_USB_STARTUP_CHECK = yes
LTO_ENABLE = yes
SRC += matrix.c
-QUANTUM_LIB_SRC += i2c_master.c
+I2C_DRIVER_REQUIRED = yes
diff --git a/keyboards/inland/kb83/config.h b/keyboards/inland/kb83/config.h
index d1e7d11acc..efa076c915 100644
--- a/keyboards/inland/kb83/config.h
+++ b/keyboards/inland/kb83/config.h
@@ -36,12 +36,11 @@
#define SPI_MOSI_PAL_MODE 5
#define EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN C12
-#define WEAR_LEVELING_BACKING_SIZE (8 * 1024)
/* I2C Config for LED Driver */
-#define DRIVER_COUNT 2
-#define DRIVER_ADDR_1 0b1110100
-#define DRIVER_ADDR_2 0b1110111
+#define SNLED27351_DRIVER_COUNT 2
+#define DRIVER_ADDR_1 SNLED27351_I2C_ADDRESS_GND
+#define DRIVER_ADDR_2 SNLED27351_I2C_ADDRESS_VDDIO
#define I2C1_SDA_PIN B7
#define I2C1_SCL_PIN B6
#define I2C1_SCL_PAL_MODE 4
diff --git a/keyboards/inland/kb83/info.json b/keyboards/inland/kb83/info.json
index ce577fb029..f0da3f50b6 100644
--- a/keyboards/inland/kb83/info.json
+++ b/keyboards/inland/kb83/info.json
@@ -9,7 +9,7 @@
"force_nkro": true
},
"rgb_matrix": {
- "driver": "is31fl3733"
+ "driver": "snled27351"
},
"processor": "WB32FQ95",
"bootloader": "wb32-dfu",
@@ -18,6 +18,13 @@
"rows": ["B15", "C6", "C7", "C8", "C9", "A8"]
},
"diode_direction": "ROW2COL",
+ "eeprom": {
+ "driver": "wear_leveling",
+ "wear_leveling": {
+ "driver": "spi_flash",
+ "backing_size": 8192
+ }
+ },
"encoder": {
"rotary": [
{"pin_a": "B14", "pin_b": "B13", "resolution": 4}
diff --git a/keyboards/inland/kb83/kb83.c b/keyboards/inland/kb83/kb83.c
index 86b52cfe92..49604b93be 100644
--- a/keyboards/inland/kb83/kb83.c
+++ b/keyboards/inland/kb83/kb83.c
@@ -18,8 +18,8 @@
// clang-format off
#ifdef RGB_MATRIX_ENABLE
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to IS31 manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | R location
* | | G location
diff --git a/keyboards/inland/kb83/rules.mk b/keyboards/inland/kb83/rules.mk
index 756d0c0719..aefdb5a168 100644
--- a/keyboards/inland/kb83/rules.mk
+++ b/keyboards/inland/kb83/rules.mk
@@ -14,6 +14,4 @@ AUDIO_ENABLE = no # Audio output
DIP_SWITCH_ENABLE = yes # DPI Switch
ENCODER_ENABLE = yes
RGB_MATRIX_ENABLE = yes
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = spi_flash
#RGB_MATRIX_CUSTOM_USER = yes #Add turnoff LED
diff --git a/keyboards/inland/mk47/config.h b/keyboards/inland/mk47/config.h
index 678686555a..7e0115f7f0 100644
--- a/keyboards/inland/mk47/config.h
+++ b/keyboards/inland/mk47/config.h
@@ -23,11 +23,11 @@
#define SPI_MISO_PIN B4
#define EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN C12
-#define WEAR_LEVELING_BACKING_SIZE (4 * 1024)
/* I2C Config for LED Driver */
-#define DRIVER_COUNT 1
-#define DRIVER_ADDR_1 0b1110100
+#define SNLED27351_DRIVER_COUNT 1
+#define DRIVER_ADDR_1 SNLED27351_I2C_ADDRESS_GND
+
/* WB32 MCU has no default definition */
#define I2C1_OPMODE OPMODE_I2C
#define I2C1_CLOCK_SPEED 400000
diff --git a/keyboards/inland/mk47/info.json b/keyboards/inland/mk47/info.json
index 45a11e913a..e647723ed8 100644
--- a/keyboards/inland/mk47/info.json
+++ b/keyboards/inland/mk47/info.json
@@ -25,8 +25,16 @@
"cols": ["C1","C2","C3","A0","A1","A2","A3","A4","A5","A6","A7","C4"],
"rows": ["C6", "C7", "C8", "C9"]
},
+ "diode_direction": "ROW2COL",
+ "eeprom": {
+ "driver": "wear_leveling",
+ "wear_leveling": {
+ "driver": "spi_flash",
+ "backing_size": 4096
+ }
+ },
"rgb_matrix": {
- "driver": "is31fl3733",
+ "driver": "snled27351",
"max_brightness": 200,
"animations": {
"breathing": true,
@@ -99,7 +107,6 @@
{ "flags": 4, "matrix": [3, 11], "x": 224, "y": 64}
]
},
- "diode_direction": "ROW2COL",
"layout_aliases": {
"LAYOUT": "LAYOUT_planck_mit"
},
diff --git a/keyboards/inland/mk47/mk47.c b/keyboards/inland/mk47/mk47.c
index f247855944..5a34527c6c 100644
--- a/keyboards/inland/mk47/mk47.c
+++ b/keyboards/inland/mk47/mk47.c
@@ -16,8 +16,8 @@
#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to IS31 manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | R location
* | | G location
diff --git a/keyboards/inland/mk47/rules.mk b/keyboards/inland/mk47/rules.mk
index 24d5f6f52e..6e7633bfe0 100644
--- a/keyboards/inland/mk47/rules.mk
+++ b/keyboards/inland/mk47/rules.mk
@@ -1,2 +1 @@
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = spi_flash
+# This file intentionally left blank
diff --git a/keyboards/input_club/ergodox_infinity/config.h b/keyboards/input_club/ergodox_infinity/config.h
index 7db6119a1c..7c35ccc784 100644
--- a/keyboards/input_club/ergodox_infinity/config.h
+++ b/keyboards/input_club/ergodox_infinity/config.h
@@ -43,8 +43,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define LED_BRIGHTNESS_HI 255
/* LED matrix driver */
-#define LED_DRIVER_ADDR_1 0x74
-#define LED_DRIVER_COUNT 1
+#define LED_DRIVER_ADDR_1 IS31FL3731_I2C_ADDRESS_GND
+#define IS31FL3731_DRIVER_COUNT 1
#define LED_MATRIX_LED_COUNT 76
#define LED_MATRIX_SPLIT { 38, 38 }
#define LED_DISABLE_WHEN_USB_SUSPENDED
diff --git a/keyboards/input_club/ergodox_infinity/ergodox_infinity.c b/keyboards/input_club/ergodox_infinity/ergodox_infinity.c
index b8f0d4ae13..8f245d9fa3 100644
--- a/keyboards/input_club/ergodox_infinity/ergodox_infinity.c
+++ b/keyboards/input_club/ergodox_infinity/ergodox_infinity.c
@@ -117,9 +117,6 @@ void matrix_init_kb(void) {
* Since K20x is stuck with a 32 byte EEPROM (see tmk_core/common/chibios/eeprom_teensy.c),
* and neither led_matrix_eeconfig.speed or .flags fit in this boundary, just force their values to default on boot.
*/
-# if !defined(LED_MATRIX_DEFAULT_SPD)
-# define LED_MATRIX_DEFAULT_SPD UINT8_MAX / 2
-# endif
led_matrix_set_speed(LED_MATRIX_DEFAULT_SPD);
led_matrix_set_flags(LED_FLAG_ALL);
#endif
@@ -174,7 +171,7 @@ const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
#endif
#ifdef LED_MATRIX_ENABLE
-const is31_led PROGMEM g_is31_leds[LED_MATRIX_LED_COUNT] = {
+const is31fl3731_led_t PROGMEM g_is31fl3731_leds[LED_MATRIX_LED_COUNT] = {
// The numbers in the comments are the led numbers DXX on the PCB
/* Refer to IS31 manual for these locations
* driver
@@ -198,7 +195,7 @@ const is31_led PROGMEM g_is31_leds[LED_MATRIX_LED_COUNT] = {
// 71 70 69
{ 0, C3_7 }, { 0, C2_7 }, { 0, C1_7 },
// Right half (mirrored)
-// Due to how LED_MATRIX_SPLIT is implemented, only the first half of g_is31_leds is actually used.
+// Due to how LED_MATRIX_SPLIT is implemented, only the first half of g_is31fl3731_leds is actually used.
// Luckily, the right half has the same LED pinouts, just mirrored.
// 45 44 43 42 41 40 39
{ 0, C2_2 }, { 0, C1_2 }, { 0, C5_1 }, { 0, C4_1 }, { 0, C3_1 }, { 0, C2_1 }, { 0, C1_1 },
diff --git a/keyboards/input_club/infinity60/keymaps/default/keymap.c b/keyboards/input_club/infinity60/keymaps/default/keymap.c
index 8f571a2b9e..29ee5a378e 100644
--- a/keyboards/input_club/infinity60/keymaps/default/keymap.c
+++ b/keyboards/input_club/infinity60/keymaps/default/keymap.c
@@ -1,3 +1,6 @@
+// Copyright 2023 QMK
+// SPDX-License-Identifier: GPL-2.0-or-later
+
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
diff --git a/keyboards/input_club/infinity60/keymaps/jpetermans/config.h b/keyboards/input_club/infinity60/keymaps/jpetermans/config.h
deleted file mode 100644
index 1949a9ad9d..0000000000
--- a/keyboards/input_club/infinity60/keymaps/jpetermans/config.h
+++ /dev/null
@@ -1,6 +0,0 @@
-#pragma once
-
-//overrides
-#undef TAPPING_TOGGLE
-#define TAPPING_TOGGLE 2
-
diff --git a/keyboards/input_club/infinity60/keymaps/jpetermans/keymap.c b/keyboards/input_club/infinity60/keymaps/jpetermans/keymap.c
deleted file mode 100644
index d82517b662..0000000000
--- a/keyboards/input_club/infinity60/keymaps/jpetermans/keymap.c
+++ /dev/null
@@ -1,264 +0,0 @@
-#include QMK_KEYBOARD_H
-#include "led_controller.h"
-
-//Define Layer Names
-#define _BASE 0
-#define _NUMPAD 1
-#define _FNAV 2
-#define _MEDIA 3
-#define _TILDE 4
-
-//IS31 chip has 8 available led pages, using 0 for all leds and 7 for single toggles
-#define max_pages 6
-
-enum led_modes {
- MODE_ALL,
- MODE_GAME,
- MODE_SINGLE,
- MODE_PAGE,
- MODE_FLASH
-};
-
-enum macro_id {
- LED_ALL = SAFE_RANGE,
- LED_GAME,
- LED_BACKLIGHT,
- LED_BRIGHT,
- LED_DIM,
- LED_SINGLE,
- LED_PAGE,
- LED_FLASH
-};
-
-uint8_t current_layer_global = 0;
-uint8_t led_mode_global = MODE_SINGLE;
-uint8_t backlight_status_global = 1; //init on/off state of backlight
-uint32_t led_layer_state = 0;
-
-/* ==================================
- * KEYMAPS
- * ==================================*/
-
-const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- /* Layer 0: Default Layer
- * ,-----------------------------------------------------------.
- * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| Backs|
- * |-----------------------------------------------------------|
- * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \|
- * |-----------------------------------------------------------|
- * |CapsLo| A| S| D| F| G| H| J| K| L| ;| '|Enter |
- * |-----------------------------------------------------------|
- * |Shif| | Z| X| C| V| B| N| M| ,| .| /|Shift |
- * |-----------------------------------------------------------|
- * |Ctrl|Gui |Alt | Space |Alt |Gui | FN | Ctrl |
- * `-----------------------------------------------------------'
- */
- /* default */
- [_BASE] = LAYOUT_60_ansi_split_bs_rshift(
- KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,KC_EQL, KC_BSLS,KC_NO,
- KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,KC_RBRC,KC_BSPC,
- TT(_FNAV), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT,KC_ENT,
- KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,LM(_TILDE, MOD_LSFT),KC_NO,
- KC_LCTL, KC_LGUI,KC_LALT, LT(_FNAV, KC_SPC), KC_RALT,TG(_NUMPAD),MO(_MEDIA), KC_RCTL
- ),
-
- /* numpad */
- [_NUMPAD] = LAYOUT_60_ansi_split_bs_rshift(
- _______,_______,_______,_______,_______,_______,_______, KC_P7, KC_P8, KC_P9, KC_PSLS, _______,_______,_______,KC_NO,
- _______,_______,_______,_______,_______,_______,_______, KC_P4, KC_P5, KC_P6, KC_PAST, _______,_______,_______,
- MO(_FNAV),_______,_______,_______,_______,_______,_______, KC_P1, KC_P2, KC_P3, KC_PMNS, _______,_______,
- _______,_______,_______,_______,_______,_______,_______, KC_P0,KC_COMM,KC_PDOT,KC_PPLS, _______,KC_NO,
- _______,_______,_______, TO(_BASE), _______,_______,_______,_______
- ),
-
- /* F-, arrow, and media keys */
- [_FNAV] = LAYOUT_60_ansi_split_bs_rshift(
- KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______,KC_NO,
- KC_CAPS,_______,_______,_______,_______,_______,_______,KC_PGUP,KC_UP,KC_PGDN,KC_PSCR,_______,_______,KC_DEL,
- _______,_______,KC_BTN2,_______,_______,_______,KC_HOME,KC_LEFT,KC_DOWN,KC_RGHT,KC_INS,_______,_______,
- _______,KC_APP,KC_BTN1,KC_CALC,_______,_______,KC_END,_______,_______,_______,_______,_______,KC_NO,
- _______,_______,_______, _______, C(A(KC_DEL)),KC_NUM,_______,_______
- ),
-
- /* media */
- [_MEDIA] = LAYOUT_60_ansi_split_bs_rshift(
- _______,LED_SINGLE,LED_PAGE,LED_FLASH,_______,_______,_______, _______, _______, _______,KC_MUTE, KC_VOLD, KC_VOLU,_______,KC_NO,
- _______,_______,_______,_______,_______,_______,_______, _______, _______, _______,_______, _______,_______,_______,
- _______,_______,_______,_______,_______,LED_GAME,_______, _______, _______, _______,_______, _______,_______,
- _______,_______,LED_ALL ,LED_BRIGHT,LED_DIM,LED_BACKLIGHT,_______, _______, KC_MPRV, KC_MNXT,KC_MSTP, _______,KC_NO,
- _______,_______,_______, KC_MPLY, _______,_______, _______,_______
- ),
- /* ~ */
- [_TILDE] = LAYOUT_60_ansi_split_bs_rshift(
- KC_GRV,_______,_______,_______,_______,_______,_______, _______, _______, _______,_______, _______,_______,_______,KC_NO,
- _______,_______,_______,_______,_______,_______,_______, _______, _______, _______,_______, _______,_______,_______,
- _______,_______,_______,_______,_______,_______,_______, _______, _______, _______,_______, _______,_______,
- _______,_______,_______,_______,_______,_______,_______, _______, _______, _______,_______, _______,KC_NO,
- _______,_______,_______, _______, _______,_______, _______,_______
- ),
- /* template */
- [5] = LAYOUT_60_ansi_split_bs_rshift(
- _______,_______,_______,_______,_______,_______,_______, _______, _______, _______,_______, _______,_______,_______,KC_NO,
- _______,_______,_______,_______,_______,_______,_______, _______, _______, _______,_______, _______,_______,_______,
- _______,_______,_______,_______,_______,_______,_______, _______, _______, _______,_______, _______,_______,
- _______,_______,_______,_______,_______,_______,_______, _______, _______, _______,_______, _______,KC_NO,
- _______,_______,_______, _______, _______,_______, _______,_______
- ),
-};
-
-/* ==================================
- * LED MAPPING
- * ==================================*/
-
-/*
- Infinity60 LED MAP
- 11 12 13 14 15 16 17 18 21 22 23 24 25 26 27*
- 28 31 32 33 34 35 36 37 38 41 42 43 44 45
- 46 47 48 51 52 53 54 55 56 57 58 61 62
- 63 64 65 66 67 68 71 72 73 74 75 76 77*
- 78 81 82 83 84 85 86 87
- *Unused in Alphabet Layout
-*/
-
-//======== full page arrays =========
-//any change in array size needs to be mirrored in matrix_init_user
-uint8_t led_numpad[16] = {
- 18,21,22,23,
- 37,38,41,42,
- 55,56,57,58,
- 72,73,74,75
-};
-//LED Page 2 - _Nav
-uint8_t led_nav[12] = {
- 38,
- 47,48, 55,56,57,
- 64,65,66
-};
-//LED Page 3 - _Media
-uint8_t led_media[15] = {
- 12,13,14, 23,24,25,
- 65,66,67,68, 73,74,75,
- 83, 86
-};
-//LED Page 4 - _Game "WASD"
-uint8_t led_game[5] = {
- 11,
- 32,
- 47,48,51
-};
-
-bool process_record_user(uint16_t keycode, keyrecord_t *record) {
- msg_t msg;
-
- switch(keycode) {
- case LED_ALL:
- if(record->event.pressed) {
- led_mode_global = led_mode_global == MODE_ALL ? MODE_SINGLE : MODE_ALL;
- msg=TOGGLE_ALL;
- chMBPost(&led_mailbox, msg, TIME_IMMEDIATE);
- }
- return false;
-
- case LED_BACKLIGHT:
- if(record->event.pressed) {
- backlight_status_global ^= 1;
- msg=(backlight_status_global << 8) | TOGGLE_BACKLIGHT;
- chMBPost(&led_mailbox, msg, TIME_IMMEDIATE);
- }
- return false;
-
- case LED_GAME:
- if(record->event.pressed) {
- led_mode_global = led_mode_global == MODE_GAME ? MODE_SINGLE : MODE_GAME;
-
- msg=(4 << 8) | DISPLAY_PAGE;
- chMBPost(&led_mailbox, msg, TIME_IMMEDIATE);
- }
- return false;
-
- case LED_BRIGHT:
- if(record->event.pressed) {
- msg=(1 << 8) | STEP_BRIGHTNESS;
- chMBPost(&led_mailbox, msg, TIME_IMMEDIATE);
- }
- return false;
-
- case LED_DIM:
- if(record->event.pressed) {
- msg=(0 << 8) | STEP_BRIGHTNESS;
- chMBPost(&led_mailbox, msg, TIME_IMMEDIATE);
- }
- return false;
-
- //set led_mode for matrix_scan to toggle leds
- case LED_SINGLE:
- led_mode_global = MODE_SINGLE;
- return false;
- case LED_PAGE:
- led_mode_global = MODE_PAGE;
- return false;
- case LED_FLASH:
- led_mode_global = MODE_FLASH;
- return false;
-
- }
- return true;
-}
-
-// Runs just one time when the keyboard initializes.
-void matrix_init_user(void) {
-
- led_controller_init();
-
- // Write predefined led pages.
- write_led_page(_NUMPAD, led_numpad, 16);
- chThdSleepMilliseconds(10);
-
- write_led_page(_FNAV, led_nav, 12);
- chThdSleepMilliseconds(10);
-
- write_led_page(_MEDIA, led_media, 15);
- chThdSleepMilliseconds(10);
-
- write_led_page(4, led_game, 5);
- chThdSleepMilliseconds(1000);
-};
-
-// Loops constantly in the background.
-void matrix_scan_user(void) {
- uint8_t page;
- uint8_t led_pin_byte;
- msg_t msg;
-
- if (backlight_status_global == 0) {//backlight is off, skip the rest
- return;
- }
-
- if (led_layer_state != layer_state && led_mode_global != MODE_GAME && led_mode_global != MODE_ALL) {
- //check mode
- //Turn on layer indicator or page depending on mode
- switch(led_mode_global) {
- case MODE_FLASH: //flash preset page leds then single indicator
- page = get_highest_layer(layer_state) > max_pages ? 7 : get_highest_layer(layer_state);
- msg=(page << 8) | DISPLAY_PAGE;
- chMBPost(&led_mailbox, msg, TIME_IMMEDIATE);
- chThdSleepMilliseconds(500);
- //flow to display single layer leds
-
- case MODE_SINGLE: //light layer indicators for all active layers
- led_pin_byte = layer_state & 0xFF;
- msg=(7 << 8) | DISPLAY_PAGE;
- chMBPost(&led_mailbox, msg, TIME_IMMEDIATE);
- msg=(1 << 16) | (led_pin_byte << 8) | SET_FULL_ROW;
- chMBPost(&led_mailbox, msg, TIME_IMMEDIATE);
- break;
-
- case MODE_PAGE: //display pre-defined led page
- page = get_highest_layer(layer_state) > max_pages ? 7 : get_highest_layer(layer_state);
- msg=(page << 8) | DISPLAY_PAGE;
- chMBPost(&led_mailbox, msg, TIME_IMMEDIATE);
- break;
- }
- led_layer_state = layer_state;
- }
-}
diff --git a/keyboards/input_club/infinity60/keymaps/jpetermans/readme.md b/keyboards/input_club/infinity60/keymaps/jpetermans/readme.md
deleted file mode 100644
index 00421015bd..0000000000
--- a/keyboards/input_club/infinity60/keymaps/jpetermans/readme.md
+++ /dev/null
@@ -1,87 +0,0 @@
-Backlight for Infinity60
-========================
-
-## Led Controller Specs
-
-The Infinity60 (revision 1.1a) pcb uses the IS31FL3731C matrix LED driver from ISSI [(datasheet)](http://www.issi.com/WW/pdf/31FL3731C.pdf). The IS31 has the ability to control two led matrices (A & B), each matrix controlling 9 pins, each pin controlling 8 leds. The Infinity only utilizes matrix A.
-
-Infinity60 LED Map:
-digits mean "row" and "col", i.e. 45 means pin 4, column 5 in the IS31 datasheet
-```c
- 11 12 13 14 15 16 17 18 21 22 23 24 25 26 27*
- 28 31 32 33 34 35 36 37 38 41 42 43 44 45
- 46 47 48 51 52 53 54 55 56 57 58 61 62
- 63 64 65 66 67 68 71 72 73 74 75 76 77*
- 78 81 82 83 84 85 86 87
-```
-*Unused in Alphabet Layout
-
-The IS31 includes 8 led pages (or frames) 0-7 than can be displayed, and each page consists of 144 bytes.
-- **bytes 0 - 17** - LED control (on/off).
- * 18 bytes which alternate between A and B matrices (A1, B1, A2, B2, ..).
- * Each byte controls the 8 leds on that pin with bits (8 to 1).
-- **bytes 8 - 35** - Blink control.
- * Same as LED control above, but sets blink on/off.
-- **bytes 36 - 143** - PWM control.
- * One byte per LED, sets PWM from 0 to 255.
- * Same as above, the register alternates, every 8 *bytes* (not bits) between the A & B matrices.
-
-## Led Controller Code
-In the Infinity60 project folder, led_controller.c sets up ability to write led layers at startup or control leds on demand as part of fn_actions. By default led_controller.c assumes page 0 will be used for full on/off. The remaining 7 pages (1-7) are free for preset led maps or single led actions at init or on demand. Communication with the IS31 is primarily done through the led_mailbox using chMBPost described further below under "Sending messages in Keymap.c". This code is based on work matt3o and flabbergast did for tmk firmware on the [whitefox](https://github.com/tmk/whitefox).
-
-One function is available to directly set leds without the mailbox:
-```
-write_led_page(page#, array of leds by address, # of addresses in array)
-```
-This function saves a full page to the controller using a supplied array of led locations such as:
-```c
-uint8_t led_numpad[16] = {
- 18,21,22,23,
- 37,38,41,42,
- 55,56,57,58,
- 72,73,74,75
-}
-write_led_page(5, led_numpad, 16);
-```
-
-Remaining led control is done through the led mailbox using these message types:
-- **SET_FULL_ROW** (3 bytes) - message type, 8-bit mask, and row#. Sets all leds on one pin per the bit mask.
-- **OFF_LED, ON_LED, TOGGLE_LED** (3 bytes) - message type, led address, and page#. Off/on/toggle specific led.
-- **BLINK_OFF_LED, BLINK_ON_LED, BLINK_TOGGLE_LED** (3 bytes) - message type, led address, and page#. Set blink Off/on/toggle for specific led.
-- **TOGGLE_ALL** (1 byte) - Turn on/off full backlight.
-- **TOGGLE_BACKLIGHT** (2 bytes) - message type, on/off. Sets backlight completely off, no leds will display.
-- **DISPLAY_PAGE** (2 bytes) - message type, page to display. Switch to specific pre-set page.
-- **RESET_PAGE** (2 bytes) - message type, page to reset. Reset/erase specific page.
-- **TOGGLE_NUM_LOCK** (2 bytes) - message type, on/off (NUM_LOCK_LED_ADDRESS). Toggle numlock on/off. Usually run with the `set_leds` function to check state of numlock or capslock. If all leds are on (e.i. TOGGLE_ALL) then this sets numlock to blink instead (this is still a little buggy if toggling on/off quickly).
-- **TOGGLE_CAPS_LOCK** (2 bytes) - message type, on/off (CAPS_LOCK_LED_ADDRESS). Same as numlock.
-- **STEP_BRIGHTNESS** (2 bytes) - message type, and step up (1) or step down (0). Increase or decrease led brightness.
-
-## Sending messages in Keymap.c
-Sending an action to the led mailbox is done using chMBPost:
-```
-chMBPost(&led_mailbox, message, timeout);
-```
-- &led_mailbox - pointer to led mailbox
-- message - up to 4 bytes but most messages use only 2. First byte (LSB) is the message type, the remaining three bytes are the message to process.
-- timeout is TIME_IMMEDIATE
-
-An example:
-```c
-//set the message to be sent. First byte (LSB) is the message type, and second is the led address
-msg=(42 << 8) | ON_LED;
-
-//send msg to the led mailbox
-chMBPost(&led_mailbox, msg, TIME_IMMEDIATE);
-```
-
-Another:
-```c
-msg=(46 << 8) | BLINK_TOGGLE_LED;
-chMBPost(&led_mailbox, msg, TIME_IMMEDIATE);
-```
-
-Finally, SET_FULL_ROW requires an extra byte with row information in the message so sending this message looks like:
-```c
-msg=(row<<16) | (led_pin_byte << 8) | SET_FULL_ROW;
-chMBPost(&led_mailbox, msg, TIME_IMMEDIATE);
-```
diff --git a/keyboards/input_club/infinity60/led.c b/keyboards/input_club/infinity60/led.c
deleted file mode 100644
index 33871bcc49..0000000000
--- a/keyboards/input_club/infinity60/led.c
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
-Copyright 2015 Jun Wako <wakojun@gmail.com>
-Copyright 2017 jpetermans <tibcmhhm@gmail.com>
-
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include <hal.h>
-
-#include "led.h"
-
-#include "led_controller.h"
-
-/* WARNING! This function needs to be callable from
- * both regular threads and ISRs, unlocked (during resume-from-sleep).
- * In particular, I2C functions (interrupt-driven) should NOT be called from here.
- */
-bool led_update_kb(led_t led_state) {
- bool res = led_update_user(led_state);
- if (res) {
- msg_t msg;
-
- if (led_state.num_lock) {
- chSysUnconditionalLock();
- msg=(1 << 8) | TOGGLE_NUM_LOCK;
- chMBPostI(&led_mailbox, msg);
- chSysUnconditionalUnlock();
- } else {
- chSysUnconditionalLock();
- msg=(0 << 8) | TOGGLE_NUM_LOCK;
- chMBPostI(&led_mailbox, msg);
- chSysUnconditionalUnlock();
- }
- if (led_state.caps_lock) {
- chSysUnconditionalLock();
- msg=(1 << 8) | TOGGLE_CAPS_LOCK;
- chMBPostI(&led_mailbox, msg);
- chSysUnconditionalUnlock();
- } else {
- chSysUnconditionalLock();
- msg=(0 << 8) | TOGGLE_CAPS_LOCK;
- chMBPostI(&led_mailbox, msg);
- chSysUnconditionalUnlock();
- }
- }
- return false;
-}
diff --git a/keyboards/input_club/infinity60/led/config.h b/keyboards/input_club/infinity60/led/config.h
new file mode 100644
index 0000000000..035cce88e9
--- /dev/null
+++ b/keyboards/input_club/infinity60/led/config.h
@@ -0,0 +1,15 @@
+// Copyright 2023 QMK
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#pragma once
+
+#define LED_MATRIX_LED_COUNT 63
+
+#define IS31FL3731_DRIVER_COUNT 1
+#define LED_DRIVER_ADDR_1 IS31FL3731_I2C_ADDRESS_GND
+
+#define I2C1_CLOCK_SPEED 400000
+#define I2C1_SCL_PIN B0
+#define I2C1_SDA_PIN B1
+#define I2C1_SCL_PAL_MODE PAL_MODE_ALTERNATIVE_2
+#define I2C1_SDA_PAL_MODE PAL_MODE_ALTERNATIVE_2
diff --git a/keyboards/input_club/infinity60/led/halconf.h b/keyboards/input_club/infinity60/led/halconf.h
new file mode 100644
index 0000000000..50c7d00001
--- /dev/null
+++ b/keyboards/input_club/infinity60/led/halconf.h
@@ -0,0 +1,8 @@
+// Copyright 2023 QMK
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#pragma once
+
+#define HAL_USE_I2C TRUE
+
+#include_next <halconf.h>
diff --git a/keyboards/input_club/infinity60/led/info.json b/keyboards/input_club/infinity60/led/info.json
index 7a9b924a71..f16554d245 100644
--- a/keyboards/input_club/infinity60/led/info.json
+++ b/keyboards/input_club/infinity60/led/info.json
@@ -3,5 +3,97 @@
"cols": ["C0", "C1", "C2", "C3", "C4", "C5", "C6", "C7", "D0"],
"rows": ["D1", "D2", "D3", "D4", "D5", "D6", "D7"]
},
- "diode_direction": "COL2ROW"
+ "diode_direction": "COL2ROW",
+ "features": {
+ "led_matrix": true
+ },
+ "led_matrix": {
+ "driver": "is31fl3731",
+ "animations": {
+ "breathing": true,
+ "cycle_left_right": true,
+ "cycle_up_down": true,
+ "cycle_out_in": true,
+ "solid_reactive_simple": 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,
+ "solid_splash": true,
+ "solid_multisplash": true,
+ "wave_left_right": true,
+ "wave_up_down": true
+ },
+ "layout": [
+ {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1},
+ {"matrix": [0, 1], "x": 16, "y": 0, "flags": 4},
+ {"matrix": [0, 2], "x": 32, "y": 0, "flags": 4},
+ {"matrix": [0, 3], "x": 48, "y": 0, "flags": 4},
+ {"matrix": [0, 4], "x": 64, "y": 0, "flags": 4},
+ {"matrix": [0, 5], "x": 80, "y": 0, "flags": 4},
+ {"matrix": [0, 6], "x": 96, "y": 0, "flags": 4},
+ {"matrix": [0, 7], "x": 112, "y": 0, "flags": 4},
+ {"matrix": [0, 8], "x": 128, "y": 0, "flags": 4},
+ {"matrix": [1, 0], "x": 144, "y": 0, "flags": 4},
+ {"matrix": [1, 1], "x": 160, "y": 0, "flags": 4},
+ {"matrix": [1, 2], "x": 176, "y": 0, "flags": 4},
+ {"matrix": [1, 3], "x": 192, "y": 0, "flags": 4},
+ {"matrix": [1, 4], "x": 208, "y": 0, "flags": 1},
+ {"matrix": [1, 5], "x": 224, "y": 0, "flags": 1},
+
+ {"matrix": [1, 6], "x": 0, "y": 16, "flags": 1},
+ {"matrix": [1, 7], "x": 17, "y": 16, "flags": 4},
+ {"matrix": [1, 8], "x": 35, "y": 16, "flags": 4},
+ {"matrix": [2, 0], "x": 52, "y": 16, "flags": 4},
+ {"matrix": [2, 1], "x": 69, "y": 16, "flags": 4},
+ {"matrix": [2, 2], "x": 86, "y": 16, "flags": 4},
+ {"matrix": [2, 3], "x": 103, "y": 16, "flags": 4},
+ {"matrix": [2, 4], "x": 121, "y": 16, "flags": 4},
+ {"matrix": [2, 5], "x": 138, "y": 16, "flags": 4},
+ {"matrix": [2, 6], "x": 155, "y": 16, "flags": 4},
+ {"matrix": [2, 7], "x": 172, "y": 16, "flags": 4},
+ {"matrix": [2, 8], "x": 190, "y": 16, "flags": 4},
+ {"matrix": [3, 0], "x": 207, "y": 16, "flags": 4},
+ {"matrix": [3, 1], "x": 224, "y": 16, "flags": 4},
+
+ {"matrix": [3, 2], "x": 0, "y": 32, "flags": 9},
+ {"matrix": [3, 3], "x": 19, "y": 32, "flags": 4},
+ {"matrix": [3, 4], "x": 37, "y": 32, "flags": 4},
+ {"matrix": [3, 5], "x": 56, "y": 32, "flags": 4},
+ {"matrix": [3, 6], "x": 75, "y": 32, "flags": 4},
+ {"matrix": [3, 7], "x": 93, "y": 32, "flags": 4},
+ {"matrix": [3, 8], "x": 112, "y": 32, "flags": 4},
+ {"matrix": [4, 0], "x": 131, "y": 32, "flags": 4},
+ {"matrix": [4, 1], "x": 149, "y": 32, "flags": 4},
+ {"matrix": [4, 2], "x": 168, "y": 32, "flags": 4},
+ {"matrix": [4, 3], "x": 187, "y": 32, "flags": 4},
+ {"matrix": [4, 4], "x": 205, "y": 32, "flags": 4},
+ {"matrix": [4, 5], "x": 224, "y": 32, "flags": 1},
+
+ {"matrix": [4, 6], "x": 0, "y": 48, "flags": 1},
+ {"matrix": [4, 7], "x": 19, "y": 48, "flags": 4},
+ {"matrix": [4, 8], "x": 37, "y": 48, "flags": 4},
+ {"matrix": [5, 0], "x": 56, "y": 48, "flags": 4},
+ {"matrix": [5, 1], "x": 75, "y": 48, "flags": 4},
+ {"matrix": [5, 2], "x": 93, "y": 48, "flags": 4},
+ {"matrix": [5, 3], "x": 112, "y": 48, "flags": 4},
+ {"matrix": [5, 4], "x": 131, "y": 48, "flags": 4},
+ {"matrix": [5, 5], "x": 149, "y": 48, "flags": 4},
+ {"matrix": [5, 6], "x": 168, "y": 48, "flags": 4},
+ {"matrix": [5, 7], "x": 187, "y": 48, "flags": 4},
+ {"matrix": [5, 8], "x": 205, "y": 48, "flags": 1},
+ {"matrix": [6, 0], "x": 224, "y": 48, "flags": 1},
+
+ {"matrix": [6, 1], "x": 0, "y": 64, "flags": 1},
+ {"matrix": [6, 2], "x": 32, "y": 64, "flags": 1},
+ {"matrix": [6, 3], "x": 64, "y": 64, "flags": 1},
+ {"matrix": [6, 4], "x": 96, "y": 64, "flags": 4},
+ {"matrix": [6, 5], "x": 128, "y": 64, "flags": 1},
+ {"matrix": [6, 6], "x": 160, "y": 64, "flags": 1},
+ {"matrix": [6, 7], "x": 192, "y": 64, "flags": 1},
+ {"matrix": [6, 8], "x": 224, "y": 64, "flags": 1}
+ ]
+ }
}
diff --git a/keyboards/input_club/infinity60/led/led.c b/keyboards/input_club/infinity60/led/led.c
new file mode 100644
index 0000000000..a6a63e202d
--- /dev/null
+++ b/keyboards/input_club/infinity60/led/led.c
@@ -0,0 +1,83 @@
+// Copyright 2023 QMK
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#include "quantum.h"
+
+#ifdef LED_MATRIX_ENABLE
+const is31fl3731_led_t g_is31fl3731_leds[LED_MATRIX_LED_COUNT] = {
+/* Refer to IS31 manual for these locations
+ * driver
+ * | LED address
+ * | | */
+ {0, C1_1}, // LED1
+ {0, C1_2}, // LED2
+ {0, C1_3}, // LED3
+ {0, C1_4}, // LED4
+ {0, C1_5}, // LED5
+ {0, C1_6}, // LED6
+ {0, C1_7}, // LED7
+ {0, C1_8}, // LED8
+
+ {0, C2_1}, // LED9
+ {0, C2_2}, // LED10
+ {0, C2_3}, // LED11
+ {0, C2_4}, // LED12
+ {0, C2_5}, // LED13
+ {0, C2_6}, // LED14/114
+ {0, C2_7}, // LED15
+ {0, C2_8}, // LED16
+
+ {0, C3_1}, // LED17
+ {0, C3_2}, // LED18
+ {0, C3_3}, // LED19
+ {0, C3_4}, // LED20
+ {0, C3_5}, // LED21
+ {0, C3_6}, // LED22
+ {0, C3_7}, // LED23
+ {0, C3_8}, // LED24
+
+ {0, C4_1}, // LED25
+ {0, C4_2}, // LED26
+ {0, C4_3}, // LED27
+ {0, C4_4}, // LED28
+ {0, C4_5}, // LED29
+ {0, C4_6}, // LED30
+ {0, C4_7}, // LED31
+ {0, C4_8}, // LED32
+
+ {0, C5_1}, // LED33
+ {0, C5_2}, // LED34
+ {0, C5_3}, // LED35
+ {0, C5_4}, // LED36
+ {0, C5_5}, // LED37
+ {0, C5_6}, // LED38
+ {0, C5_7}, // LED39
+ {0, C5_8}, // LED40
+
+ {0, C6_1}, // LED41
+ {0, C6_2}, // LED42
+ {0, C6_3}, // LED43
+ {0, C6_4}, // LED44
+ {0, C6_5}, // LED45
+ {0, C6_6}, // LED46
+ {0, C6_7}, // LED47
+ {0, C6_8}, // LED48
+
+ {0, C7_1}, // LED49
+ {0, C7_2}, // LED50
+ {0, C7_3}, // LED51
+ {0, C7_4}, // LED52
+ {0, C7_5}, // LED53
+ {0, C7_6}, // LED54/154
+ {0, C7_7}, // LED55
+ {0, C7_8}, // LED56/156
+
+ {0, C8_1}, // LED57/157
+ {0, C8_2}, // LED58/158
+ {0, C8_3}, // LED59/159
+ {0, C8_4}, // LED60/160
+ {0, C8_5}, // LED61/161
+ {0, C8_6}, // LED62/162
+ {0, C8_7} // LED63/163
+};
+#endif
diff --git a/keyboards/input_club/infinity60/led/rules.mk b/keyboards/input_club/infinity60/led/rules.mk
index d48f3b73a5..e69de29bb2 100644
--- a/keyboards/input_club/infinity60/led/rules.mk
+++ b/keyboards/input_club/infinity60/led/rules.mk
@@ -1,3 +0,0 @@
-# project specific files
-SRC += led.c \
- led_controller.c \ No newline at end of file
diff --git a/keyboards/input_club/infinity60/led_controller.c b/keyboards/input_club/infinity60/led_controller.c
deleted file mode 100644
index 5ea0ae804c..0000000000
--- a/keyboards/input_club/infinity60/led_controller.c
+++ /dev/null
@@ -1,488 +0,0 @@
-/*
-Copyright 2016 flabbergast <s3+flabbergast@sdfeu.org>
-Copyright 2017 jpetermans <tibcmhhm@gmail.com>
-
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-/*
- * LED controller code
- * IS31FL3731C matrix LED driver from ISSI
- * datasheet: http://www.issi.com/WW/pdf/31FL3731C.pdf
- */
-
-#include <ch.h>
-#include <hal.h>
-#include "print.h"
-#include "led.h"
-#include "host.h"
-
-#include "led_controller.h"
-
-#include "suspend.h"
-
-#include "usb_main.h"
-
-/* Infinity60 LED MAP
- - digits mean "row" and "col", i.e. 45 means C4-5 in the IS31 datasheet, matrix A
-
- 11 12 13 14 15 16 17 18 21 22 23 24 25 26 27*
- 28 31 32 33 34 35 36 37 38 41 42 43 44 45
- 46 47 48 51 52 53 54 55 56 57 58 61 62
- 63 64 65 66 67 68 71 72 73 74 75 76 77*
- 78 81 82 83 84 85 86 87
-
-*Unused in Alphabet Layout
-*/
-
-/*
- each page has 0xB4 bytes
- 0 - 0x11: LED control (on/off):
- order: CA1, CB1, CA2, CB2, .... (CA - matrix A, CB - matrix B)
- CAn controls Cn-8 .. Cn-1 (LSbit)
- 0x12 - 0x23: blink control (like "LED control")
- 0x24 - 0xB3: PWM control: byte per LED, 0xFF max on
- order same as above (CA 1st row (8bytes), CB 1st row (8bytes), ...)
-*/
-
-// Which LED should be used for CAPS LOCK indicator
-#if !defined(CAPS_LOCK_LED_ADDRESS)
-#define CAPS_LOCK_LED_ADDRESS 46
-#endif
-
-#if !defined(NUM_LOCK_LED_ADDRESS)
-#define NUM_LOCK_LED_ADDRESS 85
-#endif
-
-/* Which LED should breathe during sleep */
-#if !defined(BREATHE_LED_ADDRESS)
-#define BREATHE_LED_ADDRESS CAPS_LOCK_LED_ADDRESS
-#endif
-
-/* =================
- * ChibiOS I2C setup
- * ================= */
-static const I2CConfig i2ccfg = {
- 400000 // clock speed (Hz); 400kHz max for IS31
-};
-
-/* ==============
- * variables
- * ============== */
-// internal communication buffers
-uint8_t tx[2] __attribute__((aligned(2)));
-uint8_t rx[1] __attribute__((aligned(2)));
-
-// buffer for sending the whole page at once (used also as a temp buffer)
-uint8_t full_page[0xB4+1] = {0};
-
-// LED mask (which LEDs are present, selected by bits)
-// IC60 pcb uses only CA matrix.
-// Each byte is a control pin for 8 leds ordered 8-1
-const uint8_t all_on_leds_mask[0x12] = {
- 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF,
- 0x00, 0xFF, 0x00, 0xFF, 0x00, 0x7F, 0x00, 0x00, 0x00
-};
-
-// array to hold brightness pwm steps
-const uint8_t pwm_levels[5] = {
- 0x00, 0x16, 0x4E, 0xA1, 0xFF
-};
-
-// array to write to pwm register
-uint8_t pwm_register_array[9] = {0};
-
-
-/* ============================
- * communication functions
- * ============================ */
-msg_t is31_select_page(uint8_t page) {
- tx[0] = IS31_COMMANDREGISTER;
- tx[1] = page;
- return i2cMasterTransmitTimeout(&I2CD1, IS31_ADDR_DEFAULT, tx, 2, NULL, 0, TIME_US2I(IS31_TIMEOUT));
-}
-
-msg_t is31_write_data(uint8_t page, uint8_t *buffer, uint8_t size) {
- is31_select_page(page);
- return i2cMasterTransmitTimeout(&I2CD1, IS31_ADDR_DEFAULT, buffer, size, NULL, 0, TIME_US2I(IS31_TIMEOUT));
-}
-
-msg_t is31_write_register(uint8_t page, uint8_t reg, uint8_t data) {
- is31_select_page(page);
- tx[0] = reg;
- tx[1] = data;
- return i2cMasterTransmitTimeout(&I2CD1, IS31_ADDR_DEFAULT, tx, 2, NULL, 0, TIME_US2I(IS31_TIMEOUT));
-}
-
-msg_t is31_read_register(uint8_t page, uint8_t reg, uint8_t *result) {
- is31_select_page(page);
-
- tx[0] = reg;
- return i2cMasterTransmitTimeout(&I2CD1, IS31_ADDR_DEFAULT, tx, 1, result, 1, TIME_US2I(IS31_TIMEOUT));
-}
-
-/* ========================
- * initialise the IS31 chip
- * ======================== */
-void is31_init(void) {
- // just to be sure that it's all zeroes
- __builtin_memset(full_page,0,0xB4+1);
- // zero function page, all registers (assuming full_page is all zeroes)
- is31_write_data(IS31_FUNCTIONREG, full_page, 0xD + 1);
- // disable hardware shutdown
- palSetPadMode(GPIOB, 16, PAL_MODE_OUTPUT_PUSHPULL);
- palSetPad(GPIOB, 16);
- chThdSleepMilliseconds(10);
- // software shutdown
- is31_write_register(IS31_FUNCTIONREG, IS31_REG_SHUTDOWN, IS31_REG_SHUTDOWN_ON);
- chThdSleepMilliseconds(10);
- // zero function page, all registers
- is31_write_data(IS31_FUNCTIONREG, full_page, 0xD + 1);
- chThdSleepMilliseconds(10);
- // software shutdown disable (i.e. turn stuff on)
- is31_write_register(IS31_FUNCTIONREG, IS31_REG_SHUTDOWN, IS31_REG_SHUTDOWN_OFF);
- chThdSleepMilliseconds(10);
- // zero all LED registers on all 8 pages
- uint8_t i;
- for(i=0; i<8; i++) {
- is31_write_data(i, full_page, 0xB4 + 1);
- chThdSleepMilliseconds(5);
- }
-}
-
-/* ==================
- * LED control thread
- * ================== */
-#define LED_MAILBOX_NUM_MSGS 5
-static msg_t led_mailbox_queue[LED_MAILBOX_NUM_MSGS];
-mailbox_t led_mailbox;
-static THD_WORKING_AREA(waLEDthread, 256);
-static THD_FUNCTION(LEDthread, arg) {
- (void)arg;
- chRegSetThreadName("LEDthread");
-
- uint8_t i;
- uint8_t control_register_word[2] = {0};//2 bytes: register address, byte to write
- uint8_t led_control_reg[0x13] = {0};//led control register start address + 0x12 bytes
-
- //persistent status variables
- uint8_t pwm_step_status, page_status, capslock_status, numlock_status;
-
- //mailbox variables
- uint8_t temp, msg_type;
- uint8_t msg_args[3];
- msg_t msg;
-
- // initialize persistent variables
- pwm_step_status = 4; //full brightness
- page_status = 0; //start frame 0 (all off/on)
- led_t led_state = host_keyboard_led_state();
- numlock_status = led_state.num_lock ? 1 : 0;
- capslock_status = led_state.caps_lock ? 1 : 0;
-
- while(true) {
- // wait for a message (asynchronous)
- // (messages are queued (up to LED_MAILBOX_NUM_MSGS) if they can't
- // be processed right away
- chMBFetchTimeout(&led_mailbox, &msg, TIME_INFINITE);
- msg_type = msg & 0xFF; //first byte is action information
- msg_args[0] = (msg >> 8) & 0xFF;
- msg_args[1] = (msg >> 16) & 0XFF;
- msg_args[2] = (msg >> 24) & 0xFF;
-
-
- switch (msg_type){
- case SET_FULL_ROW:
- //write full byte to pin address, msg_args[1] = pin #, msg_args[0] = 8 bits to write
- //writes only to currently displayed page
- write_led_byte(page_status, msg_args[1], msg_args[0]);
- break;
-
- case OFF_LED:
- //on/off/toggle single led, msg_args[0] = row/col of led, msg_args[1] = page
- set_led_bit(msg_args[1], control_register_word, msg_args[0], 0);
- break;
- case ON_LED:
- set_led_bit(msg_args[1], control_register_word, msg_args[0], 1);
- break;
- case TOGGLE_LED:
- set_led_bit(msg_args[1], control_register_word, msg_args[0], 2);
- break;
-
- case BLINK_OFF_LED:
- //on/off/toggle single led, msg_args[0] = row/col of led
- set_led_bit(msg_args[1], control_register_word, msg_args[0], 4);
- break;
- case BLINK_ON_LED:
- set_led_bit(msg_args[1], control_register_word, msg_args[0], 5);
- break;
- case BLINK_TOGGLE_LED:
- set_led_bit(msg_args[1], control_register_word, msg_args[0], 6);
- break;
-
- case TOGGLE_ALL:
- //turn on/off all leds, msg_args = unused
- is31_write_register(IS31_FUNCTIONREG, IS31_REG_SHUTDOWN, IS31_REG_SHUTDOWN_ON);
- chThdSleepMilliseconds(5);
- is31_read_register(0, 0x00, &temp);
- is31_write_register(IS31_FUNCTIONREG, IS31_REG_SHUTDOWN, IS31_REG_SHUTDOWN_OFF);
-
- led_control_reg[0] = 0;
-
- //toggle led mask based on current state (temp)
- if (temp==0 || page_status > 0) {
- __builtin_memcpy(led_control_reg+1, all_on_leds_mask, 0x12);
- } else {
- __builtin_memset(led_control_reg+1, 0, 0x12);
- }
- is31_write_data(0, led_control_reg, 0x13);
-
- if (page_status > 0) {
- is31_write_register(IS31_FUNCTIONREG, IS31_REG_PICTDISP, 0);
-
- page_status=0;
-
- //maintain lock leds, reset to off and force recheck to blink of all leds toggled on
- numlock_status = 0;
- capslock_status = 0;
- led_set(host_keyboard_leds());
- }
- break;
-
- case TOGGLE_BACKLIGHT:
- //msg_args[0] = on/off
-
- //populate 9 byte rows to be written to each pin, first byte is register (pin) address
- if (msg_args[0] == 1) {
- __builtin_memset(pwm_register_array+1, pwm_levels[pwm_step_status], 8);
- } else {
- __builtin_memset(pwm_register_array+1, 0, 8);
- }
-
- for(i=0; i<8; i++) {
- //first byte is register address, every 0x10 9 bytes is A-matrix pwm pins
- pwm_register_array[0] = 0x24 + (i * 0x10);
- is31_write_data(0,pwm_register_array,9);
- }
- break;
-
- case DISPLAY_PAGE:
- //msg_args[0] = page to toggle on
- if (page_status != msg_args[0]) {
- is31_write_register(IS31_FUNCTIONREG, IS31_REG_PICTDISP, msg_args[0]);
- page_status = msg_args[0];
-
- //maintain lock leds, reset to off and force recheck for new page
- numlock_status = 0;
- capslock_status = 0;
- led_set(host_keyboard_leds());
- }
- break;
-
- case RESET_PAGE:
- //led_args[0] = page to reset
- led_control_reg[0] = 0;
- __builtin_memset(led_control_reg+1, 0, 0x12);
- is31_write_data(msg_args[0], led_control_reg, 0x13);
-
- //repeat for blink register
- led_control_reg[0] = 0x12;
- is31_write_data(msg_args[0], led_control_reg, 0x13);
- break;
-
- case TOGGLE_NUM_LOCK:
- //msg_args[0] = 0 or 1, off/on
- if (numlock_status != msg_args[0]) {
- set_lock_leds(NUM_LOCK_LED_ADDRESS, msg_args[0], page_status);
- numlock_status = msg_args[0];
- }
- break;
- case TOGGLE_CAPS_LOCK:
- //msg_args[0] = 0 or 1, off/on
- if (capslock_status != msg_args[0]) {
- set_lock_leds(CAPS_LOCK_LED_ADDRESS, msg_args[0], page_status);
- capslock_status = msg_args[0];
- }
- break;
-
- case STEP_BRIGHTNESS:
- //led_args[0] = step up (1) or down (0)
- switch (msg_args[0]) {
- case 0:
- if (pwm_step_status == 0) {
- pwm_step_status = 4;
- } else {
- pwm_step_status--;
- }
- break;
-
- case 1:
- if (pwm_step_status == 4) {
- pwm_step_status = 0;
- } else {
- pwm_step_status++;
- }
- break;
- }
-
- //populate 8 byte arrays to write on each pin
- //first byte is register address, every 0x10 9 bytes are A-matrix pwm pins
- __builtin_memset(pwm_register_array+1, pwm_levels[pwm_step_status], 8);
-
- for(i=0; i<8; i++) {
- pwm_register_array[0] = 0x24 + (i * 0x10);
- is31_write_data(0,pwm_register_array,9);
- }
- break;
- }
- }
-}
-
-/* ==============================
- * led processing functions
- * ============================== */
-
-void set_led_bit (uint8_t page, uint8_t *led_control_word, uint8_t led_addr, uint8_t action) {
- //returns 2 bytes: led control register address and byte to write
- //action: 0 - off, 1 - on, 2 - toggle, 4 - blink on, 5 - blink off, 6 - toggle blink
-
- uint8_t control_reg_addr, column_bit, column_byte, temp, blink_bit;
-
- //check for valid led address
- if (led_addr < 0 || led_addr > 87 || led_addr % 10 > 8) {
- return;
- }
-
- blink_bit = action>>2;//check for blink bit
- action &= ~(1<<2); //strip blink bit
-
- //led_addr tens column is pin#, ones column is bit position in 8-bit mask
- control_reg_addr = ((led_addr / 10) % 10 - 1 ) * 0x02;// A-matrix is every other byte
- control_reg_addr += blink_bit == 1 ? 0x12 : 0x00;//if blink_bit, shift 12 bytes to blink register
-
- is31_write_register(IS31_FUNCTIONREG, IS31_REG_SHUTDOWN, IS31_REG_SHUTDOWN_ON);
- chThdSleepMilliseconds(5);
- is31_read_register(page, control_reg_addr, &temp);//maintain status of leds on this byte
- is31_write_register(IS31_FUNCTIONREG, IS31_REG_SHUTDOWN, IS31_REG_SHUTDOWN_OFF);
-
- column_bit = 1<<(led_addr % 10 - 1);
- column_byte = temp;
-
- switch(action) {
- case 0:
- column_byte &= ~column_bit;
- break;
- case 1:
- column_byte |= column_bit;
- break;
- case 2:
- column_byte ^= column_bit;
- break;
- }
-
- //return word to be written in register
- led_control_word[0] = control_reg_addr;
- led_control_word[1] = column_byte;
- is31_write_data (page, led_control_word, 0x02);
-}
-
-void write_led_byte (uint8_t page, uint8_t row, uint8_t led_byte) {
- uint8_t led_control_word[2] = {0};//register address and on/off byte
-
- led_control_word[0] = (row - 1 ) * 0x02;// A-matrix is every other byte
- led_control_word[1] = led_byte;
- is31_write_data(page, led_control_word, 0x02);
-}
-
-void write_led_page (uint8_t page, uint8_t *user_led_array, uint8_t led_count) {
- uint8_t i;
- uint8_t pin, col;
- uint8_t led_control_register[0x13] = {0};
-
- __builtin_memset(led_control_register,0,13);
-
- for(i=0;i<led_count;i++){
- //shift pin by 1 for led register 0x00 address
- pin = ((user_led_array[i] / 10) % 10 - 1 ) * 2 + 1;
- col = user_led_array[i] % 10 - 1;
- led_control_register[pin] |= 1<<(col);
- }
-
- is31_write_data(page, led_control_register, 0x13);
-}
-
-void set_lock_leds(uint8_t led_addr, uint8_t led_action, uint8_t page) {
- uint8_t temp;
- uint8_t led_control_word[2] = {0};
-
- //blink if all leds are on
- if (page == 0) {
- is31_write_register(IS31_FUNCTIONREG, IS31_REG_SHUTDOWN, IS31_REG_SHUTDOWN_ON);
- chThdSleepMilliseconds(5);
- is31_read_register(0, 0x00, &temp);
- is31_write_register(IS31_FUNCTIONREG, IS31_REG_SHUTDOWN, IS31_REG_SHUTDOWN_OFF);
-
- if (temp == 0xFF) {
- led_action |= (1<<2); //set blink bit
- }
- }
-
- set_led_bit(page,led_control_word,led_addr,led_action);
-}
-
-/* =====================
- * hook into user keymap
- * ===================== */
-void led_controller_init(void) {
- uint8_t i;
-
- /* initialise I2C */
- /* I2C pins */
- palSetPadMode(GPIOB, 0, PAL_MODE_ALTERNATIVE_2); // PTB0/I2C0/SCL
- palSetPadMode(GPIOB, 1, PAL_MODE_ALTERNATIVE_2); // PTB1/I2C0/SDA
- /* start I2C */
- i2cStart(&I2CD1, &i2ccfg);
- // try high drive (from kiibohd)
- I2CD1.i2c->C2 |= I2Cx_C2_HDRS;
- // try glitch fixing (from kiibohd)
- I2CD1.i2c->FLT = 4;
-
- chThdSleepMilliseconds(10);
-
- /* initialise IS31 chip */
- is31_init();
-
- //set Display Option Register so all pwm intensity is controlled from page 0
- //enable blink and set blink period to 0.27s x rate
- is31_write_register(IS31_FUNCTIONREG, IS31_REG_DISPLAYOPT, IS31_REG_DISPLAYOPT_INTENSITY_SAME + IS31_REG_DISPLAYOPT_BLINK_ENABLE + 4);
-
- /* set full pwm on page 1 */
- pwm_register_array[0] = 0;
- __builtin_memset(pwm_register_array+1, 0xFF, 8);
- for(i=0; i<8; i++) {
- pwm_register_array[0] = 0x24 + (i * 0x10);//first byte of 9 bytes must be register address
- is31_write_data(0, pwm_register_array, 9);
- chThdSleepMilliseconds(5);
- }
-
- /* enable breathing when the displayed page changes */
- // Fade-in Fade-out, time = 26ms * 2^N, N=3
- is31_write_register(IS31_FUNCTIONREG, IS31_REG_BREATHCTRL1, (3<<4)|3);
- is31_write_register(IS31_FUNCTIONREG, IS31_REG_BREATHCTRL2, IS31_REG_BREATHCTRL2_ENABLE|3);
-
- /* more time consuming LED processing should be offloaded into
- * a thread, with asynchronous messaging. */
- chMBObjectInit(&led_mailbox, led_mailbox_queue, LED_MAILBOX_NUM_MSGS);
- chThdCreateStatic(waLEDthread, sizeof(waLEDthread), LOWPRIO, LEDthread, NULL);
-}
diff --git a/keyboards/input_club/infinity60/led_controller.h b/keyboards/input_club/infinity60/led_controller.h
deleted file mode 100644
index e4b4717646..0000000000
--- a/keyboards/input_club/infinity60/led_controller.h
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
-Copyright 2016 flabbergast <s3+flabbergast@sdfeu.org>
-Copyright 2017 jpetermans <tibcmhhm@gmail.com>
-
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#ifndef _LED_CONTROLLER_H_
-#define _LED_CONTROLLER_H_
-
-/* =========================
- * communication functions
- * ========================= */
-
-msg_t is31_write_data(uint8_t page, uint8_t *buffer, uint8_t size);
-msg_t is31_write_register(uint8_t page, uint8_t reg, uint8_t data);
-msg_t is31_read_register(uint8_t page, uint8_t reg, uint8_t *result);
-
-/* ============================
- * init functions/definitions
- * ============================*/
-
-void led_controller_init(void);
-
-#define CAPS_LOCK_LED_ADDRESS 46 //pin matrix location
-#define NUM_LOCK_LED_ADDRESS 85
-
-/* =============================
- * IS31 chip related definitions
- * ============================= */
-
-#define IS31_ADDR_DEFAULT 0x74
-
-#define IS31_REG_CONFIG 0x00
-// bits in reg
-#define IS31_REG_CONFIG_PICTUREMODE 0x00
-#define IS31_REG_CONFIG_AUTOPLAYMODE 0x08
-#define IS31_REG_CONFIG_AUDIOPLAYMODE 0x18
-// D2:D0 bits are starting frame for autoplay mode
-
-#define IS31_REG_PICTDISP 0x01 // D2:D0 frame select for picture mode
-
-#define IS31_REG_AUTOPLAYCTRL1 0x02
-// D6:D4 number of loops (000=infty)
-// D2:D0 number of frames to be used
-
-#define IS31_REG_AUTOPLAYCTRL2 0x03 // D5:D0 delay time (*11ms)
-
-#define IS31_REG_DISPLAYOPT 0x05
-#define IS31_REG_DISPLAYOPT_INTENSITY_SAME 0x20 // same intensity for all frames
-#define IS31_REG_DISPLAYOPT_BLINK_ENABLE 0x08
-// D2:D0 bits blink period time (*0.27s)
-
-#define IS31_REG_AUDIOSYNC 0x06
-#define IS31_REG_AUDIOSYNC_ENABLE 0x1
-
-#define IS31_REG_FRAMESTATE 0x07
-
-#define IS31_REG_BREATHCTRL1 0x08
-// D6:D4 fade out time (26ms*2^i)
-// D2:D0 fade in time (26ms*2^i)
-
-#define IS31_REG_BREATHCTRL2 0x09
-#define IS31_REG_BREATHCTRL2_ENABLE 0x10
-// D2:D0 extinguish time (3.5ms*2^i)
-
-#define IS31_REG_SHUTDOWN 0x0A
-#define IS31_REG_SHUTDOWN_OFF 0x1
-#define IS31_REG_SHUTDOWN_ON 0x0
-
-#define IS31_REG_AGCCTRL 0x0B
-#define IS31_REG_ADCRATE 0x0C
-
-#define IS31_COMMANDREGISTER 0xFD
-#define IS31_FUNCTIONREG 0x0B // helpfully called 'page nine'
-
-#define IS31_TIMEOUT 10000 // needs to be long enough to write a whole page
-
-/* ========================================
- * LED Thread related items
- * ========================================*/
-
-extern mailbox_t led_mailbox;
-
-void set_led_bit (uint8_t page, uint8_t *led_control_reg, uint8_t led_addr, uint8_t action);
-void set_lock_leds (uint8_t led_addr, uint8_t led_action, uint8_t page);
-void write_led_byte (uint8_t page, uint8_t row, uint8_t led_byte);
-void write_led_page (uint8_t page, uint8_t *led_array, uint8_t led_count);
-
-// constants for signaling the LED controller thread
-enum led_msg_t {
- KEY_LIGHT,
- SET_FULL_ROW,
- OFF_LED,
- ON_LED,
- TOGGLE_LED,
- BLINK_OFF_LED,
- BLINK_ON_LED,
- BLINK_TOGGLE_LED,
- TOGGLE_ALL,
- TOGGLE_BACKLIGHT,
- DISPLAY_PAGE,
- RESET_PAGE,
- TOGGLE_NUM_LOCK,
- TOGGLE_CAPS_LOCK,
- TOGGLE_BREATH,
- STEP_BRIGHTNESS
-};
-
-#endif /* _LED_CONTROLLER_H_ */
diff --git a/keyboards/input_club/k_type/config.h b/keyboards/input_club/k_type/config.h
index 2a4c7d057c..b3365bd0af 100644
--- a/keyboards/input_club/k_type/config.h
+++ b/keyboards/input_club/k_type/config.h
@@ -103,9 +103,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
# define I2C2_SCL_PAL_MODE PAL_MODE_ALTERNATIVE_2
# define I2C2_SDA_PAL_MODE PAL_MODE_ALTERNATIVE_2
-# define DRIVER_ADDR_1 0b1010000
-# define DRIVER_ADDR_2 0b1010000
-# define DRIVER_COUNT 2
+# define DRIVER_ADDR_1 IS31FL3733_I2C_ADDRESS_GND_GND
+# define DRIVER_ADDR_2 IS31FL3733_I2C_ADDRESS_GND_GND
+# define IS31FL3733_DRIVER_COUNT 2
# define DRIVER_1_LED_TOTAL 64
# define DRIVER_2_LED_TOTAL 55
# define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
diff --git a/keyboards/input_club/k_type/is31fl3733-dual.c b/keyboards/input_club/k_type/is31fl3733-dual.c
index 2dec2b0a26..ea523eea1f 100644
--- a/keyboards/input_club/k_type/is31fl3733-dual.c
+++ b/keyboards/input_club/k_type/is31fl3733-dual.c
@@ -16,46 +16,48 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifdef RGB_MATRIX_ENABLE
-
#include "is31fl3733-dual.h"
#include "i2c_master.h"
#include "wait.h"
-// This is a 7-bit address, that gets left-shifted and bit 0
-// set to 0 for write, 1 for read (as per I2C protocol)
-// The address will vary depending on your wiring:
-// 00 <-> GND
-// 01 <-> SCL
-// 10 <-> SDA
-// 11 <-> VCC
-// ADDR1 represents A1:A0 of the 7-bit address.
-// ADDR2 represents A3:A2 of the 7-bit address.
-// The result is: 0b101(ADDR2)(ADDR1)
-#define ISSI_ADDR_DEFAULT 0x50
-
-#define ISSI_COMMANDREGISTER 0xFD
-#define ISSI_COMMANDREGISTER_WRITELOCK 0xFE
-#define ISSI_INTERRUPTMASKREGISTER 0xF0
-#define ISSI_INTERRUPTSTATUSREGISTER 0xF1
-
-#define ISSI_PAGE_LEDCONTROL 0x00 // PG0
-#define ISSI_PAGE_PWM 0x01 // PG1
-#define ISSI_PAGE_AUTOBREATH 0x02 // PG2
-#define ISSI_PAGE_FUNCTION 0x03 // PG3
-
-#define ISSI_REG_CONFIGURATION 0x00 // PG3
-#define ISSI_REG_GLOBALCURRENT 0x01 // PG3
-#define ISSI_REG_RESET 0x11 // PG3
-#define ISSI_REG_SWPULLUP 0x0F // PG3
-#define ISSI_REG_CSPULLUP 0x10 // PG3
-
-#ifndef ISSI_TIMEOUT
-# define ISSI_TIMEOUT 5000
+#define IS31FL3733_COMMANDREGISTER 0xFD
+#define IS31FL3733_COMMANDREGISTER_WRITELOCK 0xFE
+#define IS31FL3733_INTERRUPTMASKREGISTER 0xF0
+#define IS31FL3733_INTERRUPTSTATUSREGISTER 0xF1
+
+#define IS31FL3733_PAGE_LEDCONTROL 0x00 // PG0
+#define IS31FL3733_PAGE_PWM 0x01 // PG1
+#define IS31FL3733_PAGE_AUTOBREATH 0x02 // PG2
+#define IS31FL3733_PAGE_FUNCTION 0x03 // PG3
+
+#define IS31FL3733_REG_CONFIGURATION 0x00 // PG3
+#define IS31FL3733_REG_GLOBALCURRENT 0x01 // PG3
+#define IS31FL3733_REG_RESET 0x11 // PG3
+#define IS31FL3733_REG_SWPULLUP 0x0F // PG3
+#define IS31FL3733_REG_CSPULLUP 0x10 // PG3
+
+#ifndef IS31FL3733_I2C_TIMEOUT
+# define IS31FL3733_I2C_TIMEOUT 100
+#endif
+
+#ifndef IS31FL3733_I2C_PERSISTENCE
+# define IS31FL3733_I2C_PERSISTENCE 0
+#endif
+
+#ifndef IS31FL3733_PWM_FREQUENCY
+# define IS31FL3733_PWM_FREQUENCY IS31FL3733_PWM_FREQUENCY_8K4_HZ // PFS - IS31FL3733B only
+#endif
+
+#ifndef IS31FL3733_SWPULLUP
+# define IS31FL3733_SWPULLUP IS31FL3733_PUR_0R
+#endif
+
+#ifndef IS31FL3733_CSPULLUP
+# define IS31FL3733_CSPULLUP IS31FL3733_PUR_0R
#endif
-#ifndef ISSI_PERSISTENCE
-# define ISSI_PERSISTENCE 0
+#ifndef IS31FL3733_GLOBALCURRENT
+# define IS31FL3733_GLOBALCURRENT 0xFF
#endif
// Transfer buffer for TWITransmitData()
@@ -67,25 +69,25 @@ uint8_t g_twi_transfer_buffer[20];
// We could optimize this and take out the unused registers from these
// buffers and the transfers in is31fl3733_write_pwm_buffer() but it's
// probably not worth the extra complexity.
-uint8_t g_pwm_buffer[DRIVER_COUNT][192];
-bool g_pwm_buffer_update_required[DRIVER_COUNT] = {false};
+uint8_t g_pwm_buffer[IS31FL3733_DRIVER_COUNT][192];
+bool g_pwm_buffer_update_required[IS31FL3733_DRIVER_COUNT] = {false};
-uint8_t g_led_control_registers[DRIVER_COUNT][24] = {{0}, {0}};
-bool g_led_control_registers_update_required[DRIVER_COUNT] = {false};
+uint8_t g_led_control_registers[IS31FL3733_DRIVER_COUNT][24] = {{0}, {0}};
+bool g_led_control_registers_update_required[IS31FL3733_DRIVER_COUNT] = {false};
bool is31fl3733_write_register(uint8_t index, uint8_t addr, uint8_t reg, uint8_t data) {
// If the transaction fails function returns false.
g_twi_transfer_buffer[0] = reg;
g_twi_transfer_buffer[1] = data;
-#if ISSI_PERSISTENCE > 0
- for (uint8_t i = 0; i < ISSI_PERSISTENCE; i++) {
- if (i2c_transmit(index, addr << 1, g_twi_transfer_buffer, 2, TIME_US2I(ISSI_TIMEOUT)) != 0) {
+#if IS31FL3733_I2C_PERSISTENCE > 0
+ for (uint8_t i = 0; i < IS31FL3733_I2C_PERSISTENCE; i++) {
+ if (i2c_transmit(index, addr << 1, g_twi_transfer_buffer, 2, IS31FL3733_I2C_TIMEOUT) != 0) {
return false;
}
}
#else
- if (i2c_transmit(index, addr << 1, g_twi_transfer_buffer, 2, TIME_US2I(ISSI_TIMEOUT)) != 0) {
+ if (i2c_transmit(index, addr << 1, g_twi_transfer_buffer, 2, IS31FL3733_I2C_TIMEOUT) != 0) {
return false;
}
#endif
@@ -108,14 +110,14 @@ bool is31fl3733_write_pwm_buffer(uint8_t index, uint8_t addr, uint8_t *pwm_buffe
g_twi_transfer_buffer[1 + j] = pwm_buffer[i + j];
}
-#if ISSI_PERSISTENCE > 0
- for (uint8_t i = 0; i < ISSI_PERSISTENCE; i++) {
- if (i2c_transmit(index, addr << 1, g_twi_transfer_buffer, 17, TIME_US2I(ISSI_TIMEOUT)) != 0) {
+#if IS31FL3733_I2C_PERSISTENCE > 0
+ for (uint8_t i = 0; i < IS31FL3733_I2C_PERSISTENCE; i++) {
+ if (i2c_transmit(index, addr << 1, g_twi_transfer_buffer, 17, IS31FL3733_I2C_TIMEOUT) != 0) {
return false;
}
}
#else
- if (i2c_transmit(index, addr << 1, g_twi_transfer_buffer, 17, TIME_US2I(ISSI_TIMEOUT)) != 0) {
+ if (i2c_transmit(index, addr << 1, g_twi_transfer_buffer, 17, IS31FL3733_I2C_TIMEOUT) != 0) {
return false;
}
#endif
@@ -131,38 +133,52 @@ void is31fl3733_init(uint8_t bus, uint8_t addr, uint8_t sync) {
// Sync is passed so set it according to the datasheet.
// Unlock the command register.
- is31fl3733_write_register(bus, addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5);
+ is31fl3733_write_register(bus, addr, IS31FL3733_COMMANDREGISTER_WRITELOCK, 0xC5);
+
// Select PG0
- is31fl3733_write_register(bus, addr, ISSI_COMMANDREGISTER, ISSI_PAGE_LEDCONTROL);
+ is31fl3733_write_register(bus, addr, IS31FL3733_COMMANDREGISTER, IS31FL3733_PAGE_LEDCONTROL);
// Turn off all LEDs.
for (int i = 0x00; i <= 0x17; i++) {
is31fl3733_write_register(bus, addr, i, 0x00);
}
+
// Unlock the command register.
- is31fl3733_write_register(bus, addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5);
+ is31fl3733_write_register(bus, addr, IS31FL3733_COMMANDREGISTER_WRITELOCK, 0xC5);
+
// Select PG1
- is31fl3733_write_register(bus, addr, ISSI_COMMANDREGISTER, ISSI_PAGE_PWM);
+ is31fl3733_write_register(bus, addr, IS31FL3733_COMMANDREGISTER, IS31FL3733_PAGE_PWM);
// Set PWM on all LEDs to 0
// No need to setup Breath registers to PWM as that is the default.
for (int i = 0x00; i <= 0xBF; i++) {
is31fl3733_write_register(bus, addr, i, 0x00);
}
+
// Unlock the command register.
- is31fl3733_write_register(bus, addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5);
+ is31fl3733_write_register(bus, addr, IS31FL3733_COMMANDREGISTER_WRITELOCK, 0xC5);
+
// Select PG3
- is31fl3733_write_register(bus, addr, ISSI_COMMANDREGISTER, ISSI_PAGE_FUNCTION);
+ is31fl3733_write_register(bus, addr, IS31FL3733_COMMANDREGISTER, IS31FL3733_PAGE_FUNCTION);
+ // Set de-ghost pull-up resistors (SWx)
+ is31fl3733_write_register(bus, addr, IS31FL3733_REG_SWPULLUP, IS31FL3733_SWPULLUP);
+ // Set de-ghost pull-down resistors (CSx)
+ is31fl3733_write_register(bus, addr, IS31FL3733_REG_CSPULLUP, IS31FL3733_CSPULLUP);
// Set global current to maximum.
- is31fl3733_write_register(bus, addr, ISSI_REG_GLOBALCURRENT, 0xFF);
+ is31fl3733_write_register(bus, addr, IS31FL3733_REG_GLOBALCURRENT, IS31FL3733_GLOBALCURRENT);
// Disable software shutdown.
- is31fl3733_write_register(bus, addr, ISSI_REG_CONFIGURATION, (sync << 6) | 0x01);
+ is31fl3733_write_register(bus, addr, IS31FL3733_REG_CONFIGURATION, ((sync & 0b11) << 6) | ((IS31FL3733_PWM_FREQUENCY & 0b111) << 3) | 0x01);
+
// Wait 10ms to ensure the device has woken up.
wait_ms(10);
}
void is31fl3733_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) {
+ is31fl3733_led_t led;
if (index >= 0 && index < RGB_MATRIX_LED_COUNT) {
- is31_led led = g_is31_leds[index];
+ memcpy_P(&led, (&g_is31fl3733_leds[index]), sizeof(led));
+ if (g_pwm_buffer[led.driver][led.r] == red && g_pwm_buffer[led.driver][led.g] == green && g_pwm_buffer[led.driver][led.b] == blue) {
+ return;
+ }
g_pwm_buffer[led.driver][led.r] = red;
g_pwm_buffer[led.driver][led.g] = green;
g_pwm_buffer[led.driver][led.b] = blue;
@@ -177,7 +193,8 @@ void is31fl3733_set_color_all(uint8_t red, uint8_t green, uint8_t blue) {
}
void is31fl3733_set_led_control_register(uint8_t index, bool red, bool green, bool blue) {
- is31_led led = g_is31_leds[index];
+ is31fl3733_led_t led;
+ memcpy_P(&led, (&g_is31fl3733_leds[index]), sizeof(led));
uint8_t control_register_r = led.r / 8;
uint8_t control_register_g = led.g / 8;
@@ -208,8 +225,8 @@ void is31fl3733_set_led_control_register(uint8_t index, bool red, bool green, bo
void is31fl3733_update_pwm_buffers(uint8_t addr, uint8_t index) {
if (g_pwm_buffer_update_required[index]) {
// Firstly we need to unlock the command register and select PG1.
- is31fl3733_write_register(index, addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5);
- is31fl3733_write_register(index, addr, ISSI_COMMANDREGISTER, ISSI_PAGE_PWM);
+ is31fl3733_write_register(index, addr, IS31FL3733_COMMANDREGISTER_WRITELOCK, 0xC5);
+ is31fl3733_write_register(index, addr, IS31FL3733_COMMANDREGISTER, IS31FL3733_PAGE_PWM);
// If any of the transactions fail we risk writing dirty PG0,
// refresh page 0 just in case.
@@ -223,14 +240,11 @@ void is31fl3733_update_pwm_buffers(uint8_t addr, uint8_t index) {
void is31fl3733_update_led_control_registers(uint8_t addr, uint8_t index) {
if (g_led_control_registers_update_required[index]) {
// Firstly we need to unlock the command register and select PG0
- is31fl3733_write_register(index, addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5);
- is31fl3733_write_register(index, addr, ISSI_COMMANDREGISTER, ISSI_PAGE_LEDCONTROL);
+ is31fl3733_write_register(index, addr, IS31FL3733_COMMANDREGISTER_WRITELOCK, 0xC5);
+ is31fl3733_write_register(index, addr, IS31FL3733_COMMANDREGISTER, IS31FL3733_PAGE_LEDCONTROL);
for (int i = 0; i < 24; i++) {
is31fl3733_write_register(index, addr, i, g_led_control_registers[index][i]);
}
}
g_led_control_registers_update_required[index] = false;
}
-
-
-#endif
diff --git a/keyboards/input_club/k_type/is31fl3733-dual.h b/keyboards/input_club/k_type/is31fl3733-dual.h
index 1becefbf93..7a43bc49f4 100644
--- a/keyboards/input_club/k_type/is31fl3733-dual.h
+++ b/keyboards/input_club/k_type/is31fl3733-dual.h
@@ -22,14 +22,31 @@
#include <stdbool.h>
#include "progmem.h"
-typedef struct is31_led {
+#define IS31FL3733_I2C_ADDRESS_GND_GND 0x50
+#define IS31FL3733_I2C_ADDRESS_GND_SCL 0x51
+#define IS31FL3733_I2C_ADDRESS_GND_SDA 0x52
+#define IS31FL3733_I2C_ADDRESS_GND_VCC 0x53
+#define IS31FL3733_I2C_ADDRESS_SCL_GND 0x54
+#define IS31FL3733_I2C_ADDRESS_SCL_SCL 0x55
+#define IS31FL3733_I2C_ADDRESS_SCL_SDA 0x56
+#define IS31FL3733_I2C_ADDRESS_SCL_VCC 0x57
+#define IS31FL3733_I2C_ADDRESS_SDA_GND 0x58
+#define IS31FL3733_I2C_ADDRESS_SDA_SCL 0x59
+#define IS31FL3733_I2C_ADDRESS_SDA_SDA 0x5A
+#define IS31FL3733_I2C_ADDRESS_SDA_VCC 0x5B
+#define IS31FL3733_I2C_ADDRESS_VCC_GND 0x5C
+#define IS31FL3733_I2C_ADDRESS_VCC_SCL 0x5D
+#define IS31FL3733_I2C_ADDRESS_VCC_SDA 0x5E
+#define IS31FL3733_I2C_ADDRESS_VCC_VCC 0x5F
+
+typedef struct is31fl3733_led_t {
uint8_t driver : 2;
uint8_t r;
uint8_t g;
uint8_t b;
-} __attribute__((packed)) is31_led;
+} __attribute__((packed)) is31fl3733_led_t;
-extern const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT];
+extern const is31fl3733_led_t PROGMEM g_is31fl3733_leds[RGB_MATRIX_LED_COUNT];
void is31fl3733_init(uint8_t bus, uint8_t addr, uint8_t sync);
bool is31fl3733_write_register(uint8_t index, uint8_t addr, uint8_t reg, uint8_t data);
@@ -47,6 +64,20 @@ void is31fl3733_set_led_control_register(uint8_t index, bool red, bool green, bo
void is31fl3733_update_pwm_buffers(uint8_t addr, uint8_t index); // index is the driver index
void is31fl3733_update_led_control_registers(uint8_t addr, uint8_t index);
+#define IS31FL3733_PUR_0R 0x00 // No PUR resistor
+#define IS31FL3733_PUR_05KR 0x02 // 0.5k Ohm resistor in t_NOL
+#define IS31FL3733_PUR_3KR 0x03 // 3.0k Ohm resistor on all the time
+#define IS31FL3733_PUR_4KR 0x04 // 4.0k Ohm resistor on all the time
+#define IS31FL3733_PUR_8KR 0x05 // 8.0k Ohm resistor on all the time
+#define IS31FL3733_PUR_16KR 0x06 // 16k Ohm resistor on all the time
+#define IS31FL3733_PUR_32KR 0x07 // 32k Ohm resistor in t_NOL
+
+#define IS31FL3733_PWM_FREQUENCY_8K4_HZ 0x00
+#define IS31FL3733_PWM_FREQUENCY_4K2_HZ 0x01
+#define IS31FL3733_PWM_FREQUENCY_26K7_HZ 0x02
+#define IS31FL3733_PWM_FREQUENCY_2K1_HZ 0x03
+#define IS31FL3733_PWM_FREQUENCY_1K05_HZ 0x04
+
#define A_1 0x00
#define A_2 0x01
#define A_3 0x02
diff --git a/keyboards/input_club/k_type/k_type-rgbdriver.c b/keyboards/input_club/k_type/k_type-rgbdriver.c
index dc5d4abd67..18cdb3cda3 100644
--- a/keyboards/input_club/k_type/k_type-rgbdriver.c
+++ b/keyboards/input_club/k_type/k_type-rgbdriver.c
@@ -15,11 +15,10 @@
*/
#ifdef RGB_MATRIX_ENABLE
-
-#include "rgb_matrix.h"
-#include "i2c_master.h"
-#include "is31fl3733-dual.h"
-#include "gpio.h"
+# include "rgb_matrix.h"
+# include "i2c_master.h"
+# include "is31fl3733-dual.h"
+# include "gpio.h"
static void init(void) {
i2c_init(&I2CD1, I2C1_SCL_PIN, I2C1_SDA_PIN);
@@ -52,5 +51,4 @@ const rgb_matrix_driver_t rgb_matrix_driver = {
.set_color = is31fl3733_set_color,
.set_color_all = is31fl3733_set_color_all,
};
-
#endif
diff --git a/keyboards/input_club/k_type/k_type.c b/keyboards/input_club/k_type/k_type.c
index 23a3895408..c6d06b51dc 100644
--- a/keyboards/input_club/k_type/k_type.c
+++ b/keyboards/input_club/k_type/k_type.c
@@ -18,11 +18,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
+# include "is31fl3733-dual.h"
-#include "is31fl3733-dual.h"
-
-
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3733_led_t PROGMEM g_is31fl3733_leds[RGB_MATRIX_LED_COUNT] = {
{ 0, B_1, A_1, C_1 },
{ 0, B_2, A_2, C_2 },
{ 0, B_3, A_3, C_3 },
@@ -202,15 +200,12 @@ led_config_t g_led_config = {
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
}
};
-#endif
-
void keyboard_pre_init_kb(void) {
-#ifdef RGB_MATRIX_ENABLE
// Turn on LED controller
setPinOutput(B16);
writePinHigh(B16);
-#endif
+
keyboard_pre_init_user();
}
@@ -218,17 +213,13 @@ void matrix_init_kb(void) {
// put your keyboard start-up code here
// runs once when the firmware starts up
-#ifdef RGB_MATRIX_ENABLE
/*
* Since K20x is stuck with a 32 byte EEPROM (see tmk_core/common/chibios/eeprom_teensy.c),
* and neither led_matrix_eeconfig.speed or .flags fit in this boundary, just force their values to default on boot.
*/
-# if !defined(RGB_MATRIX_DEFAULT_SPD)
-# define RGB_MATRIX_DEFAULT_SPD UINT8_MAX / 2
-# endif
rgb_matrix_set_speed(RGB_MATRIX_DEFAULT_SPD),
rgb_matrix_set_flags(LED_FLAG_ALL);
-#endif
matrix_init_user();
}
+#endif
diff --git a/keyboards/input_club/k_type/post_rules.mk b/keyboards/input_club/k_type/post_rules.mk
new file mode 100644
index 0000000000..897e422b05
--- /dev/null
+++ b/keyboards/input_club/k_type/post_rules.mk
@@ -0,0 +1,5 @@
+ifeq ($(strip $(RGB_MATRIX_ENABLE)), yes)
+ # Additional files for RGB lighting
+ SRC += k_type-rgbdriver.c
+ QUANTUM_LIB_SRC += i2c_master.c is31fl3733-dual.c
+endif
diff --git a/keyboards/input_club/k_type/rules.mk b/keyboards/input_club/k_type/rules.mk
index d7776bb755..684de50562 100644
--- a/keyboards/input_club/k_type/rules.mk
+++ b/keyboards/input_club/k_type/rules.mk
@@ -13,8 +13,3 @@ AUDIO_ENABLE = no # Audio output
# RGB options
RGB_MATRIX_ENABLE = no
-
-# Additional files for RGB lighting
-SRC += k_type-rgbdriver.c
-QUANTUM_LIB_SRC += i2c_master.c is31fl3733-dual.c
-
diff --git a/keyboards/input_club/whitefox/config.h b/keyboards/input_club/whitefox/config.h
index 067b7f4e59..aa8277d4ca 100644
--- a/keyboards/input_club/whitefox/config.h
+++ b/keyboards/input_club/whitefox/config.h
@@ -21,8 +21,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define LED_BRIGHTNESS_HI 255
/* LED matrix driver */
-#define LED_DRIVER_ADDR_1 0x74
-#define LED_DRIVER_COUNT 1
+#define LED_DRIVER_ADDR_1 IS31FL3731_I2C_ADDRESS_GND
+#define IS31FL3731_DRIVER_COUNT 1
#define LED_MATRIX_LED_COUNT 71
#define LED_DISABLE_WHEN_USB_SUSPENDED
diff --git a/keyboards/input_club/whitefox/whitefox.c b/keyboards/input_club/whitefox/whitefox.c
index 4aa12586f3..63c6a49240 100644
--- a/keyboards/input_club/whitefox/whitefox.c
+++ b/keyboards/input_club/whitefox/whitefox.c
@@ -18,7 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "quantum.h"
#ifdef LED_MATRIX_ENABLE
-const is31_led PROGMEM g_is31_leds[LED_MATRIX_LED_COUNT] = {
+const is31fl3731_led_t PROGMEM g_is31fl3731_leds[LED_MATRIX_LED_COUNT] = {
// The numbers in the comments are the led numbers DXX on the PCB
/* Refer to IS31 manual for these locations
* driver
@@ -83,9 +83,6 @@ void matrix_init_kb(void) {
* Since K20x is stuck with a 32 byte EEPROM (see tmk_core/common/chibios/eeprom_teensy.c),
* and neither led_matrix_eeconfig.speed or .flags fit in this boundary, just force their values to default on boot.
*/
-# if !defined(LED_MATRIX_DEFAULT_SPD)
-# define LED_MATRIX_DEFAULT_SPD UINT8_MAX / 2
-# endif
led_matrix_set_speed(LED_MATRIX_DEFAULT_SPD),
led_matrix_set_flags(LED_FLAG_ALL);
#endif
diff --git a/keyboards/jacky_studio/piggy60/rev2/info.json b/keyboards/jacky_studio/piggy60/rev2/info.json
index 50f2849e73..6d5db8874f 100644
--- a/keyboards/jacky_studio/piggy60/rev2/info.json
+++ b/keyboards/jacky_studio/piggy60/rev2/info.json
@@ -1,5 +1,4 @@
{
- "board": "STM32_F103_STM32DUINO",
"bootloader": "uf2boot",
"diode_direction": "ROW2COL",
"community_layouts": ["60_hhkb", "60_tsangan_hhkb"],
diff --git a/keyboards/jian/keymaps/advanced/config.h b/keyboards/jian/keymaps/advanced/config.h
index 1a033d8311..edeab03fb1 100644
--- a/keyboards/jian/keymaps/advanced/config.h
+++ b/keyboards/jian/keymaps/advanced/config.h
@@ -24,3 +24,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
//#define AUTO_SHIFT_MODIFIERS
#define ALT_LAYOUTS_ENABLE
//#define TRAINING_HALFES_LOCK
+
+#define LAYER_STATE_32BIT
diff --git a/keyboards/jian/keymaps/advanced/keymap.c b/keyboards/jian/keymaps/advanced/keymap.c
index a825e061b5..4a6fdec063 100644
--- a/keyboards/jian/keymaps/advanced/keymap.c
+++ b/keyboards/jian/keymaps/advanced/keymap.c
@@ -86,9 +86,6 @@ enum jian_layers {
_LEFT,
_RIGHT,
#endif //TRAINING_HALFES_LOCK
-#ifdef DIPS_ENABLE
- _DIPS,
-#endif // DIPS_ENABLE
#ifdef STENO_ENABLE
_PLOVER
#endif // STENO_ENABLE
@@ -107,7 +104,7 @@ enum jian_keycodes {
CH_QWE,
CH_DVK,
//endif // ALT_LAYOUTS_ENABLE
-#ifdef DIPS_ENABLE
+#ifdef DIP_SWITCH_ENABLE
LAYOUT0,
LAYOUT1,
LAYOUT2,
@@ -120,18 +117,18 @@ enum jian_keycodes {
DIP9,
DIP10,
DIP11,
-#endif // DIPS_ENABLE
+#endif // DIP_SWITCH_ENABLE
};
#ifdef TRAINING_HALFES_LOCK
static uint8_t lock_timeout = 1;
static uint8_t lock_cooldown = 0;
#endif //TRAINING_HALFES_LOCK
-#ifdef DIPS_ENABLE
+#ifdef DIP_SWITCH_ENABLE
#ifdef ALT_LAYOUTS_ENABLE
static uint8_t layout_conversion_dip_state = 0;
#endif // ALT_LAYOUTS_ENABLE
-#endif // DIPS_ENABLE
+#endif // DIP_SWITCH_ENABLE
#define LOWER MO(_LOWER)
#define RAISE MO(_RAISE)
@@ -190,13 +187,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_QWERTY] = LAYOUT_base_wrapper(QWERTY_base),
-#ifdef DIPS_ENABLE
-[_DIPS] = LAYOUT_dips(
- LAYOUT0, LAYOUT1, LAYOUT2, LAYOUT3, DIP_ISO, FLIP_TH,
- LAYOUT0, LAYOUT1, LAYOUT2, LAYOUT3, DIP_ISO, FLIP_TH
-),
-#endif // DIPS_ENABLE
-
[_LOWER] = LAYOUT(
_______, KC_UNDS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, F12_RGU,
EQL_LCT, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, MIN_RCT,
@@ -282,7 +272,7 @@ layer_state_t layer_state_set_user(layer_state_t state) {
return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
}
-#ifdef DIPS_ENABLE
+#ifdef DIP_SWITCH_ENABLE
#ifdef ALT_LAYOUTS_ENABLE
void layout_convert(uint8_t statuses) {
switch (0b1111 & statuses) {
@@ -337,13 +327,7 @@ void layout_convert(uint8_t statuses) {
}
}
#endif // ALT_LAYOUTS_ENABLE
-#endif // DIPS_ENABLE
-
-void matrix_init_user(void) {
-#ifdef DIPS_ENABLE
- layer_on(_DIPS);
-#endif // DIPS_ENABLE
-}
+#endif // DIP_SWITCH_ENABLE
void keyboard_post_init_user(void) {
user_config.raw = eeconfig_read_user();
@@ -515,70 +499,83 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
return false;
#endif // ALT_LAYOUTS_ENABLE
-#ifdef DIPS_ENABLE
-#ifdef ALT_LAYOUTS_ENABLE
- case LAYOUT0:
+ case THUMB_ALT:
+ if (record->event.pressed) {
+ layer_invert(_THUMB_ALT);
+ user_config.thumb_alt ^= 1;
+ eeconfig_update_user(user_config.raw);
+ }
+ return false;
+ case ISO:
if (record->event.pressed) {
+ layer_invert(_ISO);
+ user_config.iso ^= 1;
+ eeconfig_update_user(user_config.raw);
+ }
+ return false;
+ }
+ return true;
+}
+
+#if defined(DIP_SWITCH_ENABLE)
+bool dip_switch_update_user(uint8_t index, bool active) {
+ switch (index) {
+# if defined(ALT_LAYOUTS_ENABLE)
+ case 0: // LAYOUT0
+ case 6:
+ if (active) {
layout_conversion_dip_state |= 1 << 0;
} else {
layout_conversion_dip_state &= ~(1 << 0);
}
layout_convert(layout_conversion_dip_state);
- return false;
- case LAYOUT1:
- if (record->event.pressed) {
+ break;
+ case 1: // LAYOUT1
+ case 7:
+ if (active) {
layout_conversion_dip_state |= 1 << 1;
} else {
layout_conversion_dip_state &= ~(1 << 1);
}
layout_convert(layout_conversion_dip_state);
- return false;
- case LAYOUT2:
- if (record->event.pressed) {
+ break;
+ case 2: // LAYOUT2
+ case 8:
+ if (active) {
layout_conversion_dip_state |= 1 << 2;
} else {
layout_conversion_dip_state &= ~(1 << 2);
}
layout_convert(layout_conversion_dip_state);
- return false;
- case LAYOUT3:
- if (record->event.pressed) {
+ break;
+ case 3: // LAYOUT3
+ case 9:
+ if (active) {
layout_conversion_dip_state |= 1 << 3;
} else {
layout_conversion_dip_state &= ~(1 << 3);
}
layout_convert(layout_conversion_dip_state);
- return false;
-#endif // ALT_LAYOUTS_ENABLE
- case DIP_ISO:
- if (record->event.pressed) {
- layer_on(_ISO);
+ break;
+ case 4: // DIP_ISO
+ case 10:
+ if (active) {
+ layer_on(_ISO);
} else {
- layer_off(_ISO);
+ layer_off(_ISO);
}
- return false;
- case FLIP_TH:
- if (record->event.pressed) {
- layer_on(_THUMB_ALT);
+ break;
+ case 5: // FLIP_TH
+ case 11:
+ if (active) {
+ layer_on(_THUMB_ALT);
} else {
- layer_off(_THUMB_ALT);
- }
- return false;
-#endif // DIPS_ENABLE
- case THUMB_ALT:
- if (record->event.pressed) {
- layer_invert(_THUMB_ALT);
- user_config.thumb_alt ^= 1;
- eeconfig_update_user(user_config.raw);
- }
- return false;
- case ISO:
- if (record->event.pressed) {
- layer_invert(_ISO);
- user_config.iso ^= 1;
- eeconfig_update_user(user_config.raw);
+ layer_off(_THUMB_ALT);
}
- return false;
+ break;
+# endif
}
+
return true;
}
+#endif
diff --git a/keyboards/jian/rev1/config.h b/keyboards/jian/rev1/config.h
index 8f1a34c2ff..980f27c7cc 100644
--- a/keyboards/jian/rev1/config.h
+++ b/keyboards/jian/rev1/config.h
@@ -25,7 +25,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define EE_HANDS
// different Jian configs
-#define DIPS_ENABLE
#define PHYSICAL_LEDS_ENABLE
#define NUM_LOCK_LED_PIN C6
#define CAPS_LOCK_LED_PIN D7
@@ -79,3 +78,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// iOS device need lessthan 100
#define USB_MAX_POWER_CONSUMPTION 100
#endif
+
+#define DIP_SWITCH_MATRIX_GRID { \
+ {1, 0}, {2, 0}, {3, 0}, {3, 1}, {3, 2}, {3, 3}, \
+ {7, 3}, {7, 2}, {7, 1}, {7, 0}, {6, 0}, {5, 0} \
+}
diff --git a/keyboards/jian/rev1/info.json b/keyboards/jian/rev1/info.json
index 27c5c957a6..879b85a9c1 100644
--- a/keyboards/jian/rev1/info.json
+++ b/keyboards/jian/rev1/info.json
@@ -90,23 +90,6 @@
{"matrix": [7, 5], "x": 10, "y": 3.375},
{"matrix": [7, 4], "x": 11, "y": 3.25}
]
- },
- "LAYOUT_dips": {
- "layout": [
- {"matrix": [1, 0], "x": 0, "y": 0},
- {"matrix": [2, 0], "x": 1, "y": 0},
- {"matrix": [3, 0], "x": 2, "y": 0},
- {"matrix": [3, 1], "x": 3, "y": 0},
- {"matrix": [3, 2], "x": 4, "y": 0},
- {"matrix": [3, 3], "x": 5, "y": 0},
-
- {"matrix": [7, 3], "x": 6, "y": 0},
- {"matrix": [7, 2], "x": 7, "y": 0},
- {"matrix": [7, 1], "x": 8, "y": 0},
- {"matrix": [7, 0], "x": 9, "y": 0},
- {"matrix": [6, 0], "x": 10, "y": 0},
- {"matrix": [5, 0], "x": 11, "y": 0}
- ]
}
}
}
diff --git a/keyboards/jian/rev1/rules.mk b/keyboards/jian/rev1/rules.mk
index 8e6da2d84f..33588c1755 100644
--- a/keyboards/jian/rev1/rules.mk
+++ b/keyboards/jian/rev1/rules.mk
@@ -5,3 +5,4 @@ CONSOLE_ENABLE = no
SPLIT_KEYBOARD = yes
BACKLIGHT_ENABLE = yes
RGBLIGHT_ENABLE = yes
+DIP_SWITCH_ENABLE = yes
diff --git a/keyboards/jolofsor/denial75/info.json b/keyboards/jolofsor/denial75/info.json
index 545243e410..18becc3ffb 100644
--- a/keyboards/jolofsor/denial75/info.json
+++ b/keyboards/jolofsor/denial75/info.json
@@ -27,8 +27,12 @@
},
"processor": "atmega32u4",
"bootloader": "atmel-dfu",
+ "community_layouts": ["75_ansi"],
+ "layout_aliases": {
+ "LAYOUT_denial75_ansi": "LAYOUT_75_ansi"
+ },
"layouts": {
- "LAYOUT_denial75_ansi": {
+ "LAYOUT_75_ansi": {
"layout": [
{"x": 0, "y": 0, "matrix": [0, 0]},
{"x": 1.25, "y": 0, "matrix": [0, 1]},
diff --git a/keyboards/jolofsor/denial75/keymaps/default/keymap.c b/keyboards/jolofsor/denial75/keymaps/default/keymap.c
index b324f24558..cf3be1f3e7 100644
--- a/keyboards/jolofsor/denial75/keymaps/default/keymap.c
+++ b/keyboards/jolofsor/denial75/keymaps/default/keymap.c
@@ -114,7 +114,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [0] = LAYOUT_denial75_ansi(
+ [0] = LAYOUT_75_ansi(
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_INS, KC_DEL,
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP,
@@ -123,12 +123,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
),
- [1] = LAYOUT_denial75_ansi(
+ [1] = LAYOUT_75_ansi(
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MUTE, KC_AUDIO_VOL_DOWN, KC_AUDIO_VOL_UP,
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_BRIU,
KC_NO, LEDRED, LEDBLUE, LEDYELLOW, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_BRID,
KC_NO, LEDORANGE, LEDGREEN, LEDPURPLE, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RGB_VAI,
KC_NO, LEDWHITE, LEDPINK, LEDBLACK, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RGB_VAD,
- KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, MO(1), RGB_TOG, KC_NO, KC_NO, KC_NO
+ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, RGB_TOG, KC_NO, KC_NO, KC_NO
)
};
diff --git a/keyboards/jolofsor/denial75/keymaps/via/keymap.c b/keyboards/jolofsor/denial75/keymaps/via/keymap.c
index 678522ddfb..cf3be1f3e7 100644
--- a/keyboards/jolofsor/denial75/keymaps/via/keymap.c
+++ b/keyboards/jolofsor/denial75/keymaps/via/keymap.c
@@ -114,7 +114,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [0] = LAYOUT_denial75_ansi(
+ [0] = LAYOUT_75_ansi(
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_INS, KC_DEL,
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP,
@@ -123,30 +123,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
),
- [1] = LAYOUT_denial75_ansi(
+ [1] = LAYOUT_75_ansi(
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MUTE, KC_AUDIO_VOL_DOWN, KC_AUDIO_VOL_UP,
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_BRIU,
KC_NO, LEDRED, LEDBLUE, LEDYELLOW, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_BRID,
KC_NO, LEDORANGE, LEDGREEN, LEDPURPLE, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RGB_VAI,
KC_NO, LEDWHITE, LEDPINK, LEDBLACK, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RGB_VAD,
- KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, MO(1), RGB_TOG, KC_NO, KC_NO, KC_NO
- ),
-
- [2] = LAYOUT_denial75_ansi(
- KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
- KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
- KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
- KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
- KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
- KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO
- ),
-
- [3] = LAYOUT_denial75_ansi(
- KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
- KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
- KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
- KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
- KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
- KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO
+ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, RGB_TOG, KC_NO, KC_NO, KC_NO
)
};
diff --git a/keyboards/jones/v1/config.h b/keyboards/jones/v1/config.h
index e36574e56a..541a6ae2f0 100644
--- a/keyboards/jones/v1/config.h
+++ b/keyboards/jones/v1/config.h
@@ -32,8 +32,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* External EEPROM */
// Use 24LC64 EEPROM
#define EEPROM_I2C_24LC64
-// Set MAX_ADDR to specify actual EEPROM size.
-// If it's not set, EEPROM size will be set ATmega32u4's 1023.
-#define DYNAMIC_KEYMAP_EEPROM_MAX_ADDR 8191
-// How many layers to use with VIA / Remap.
-#define DYNAMIC_KEYMAP_LAYER_COUNT 6 // default:4
diff --git a/keyboards/jones/v1/info.json b/keyboards/jones/v1/info.json
index fdc5cbd310..54496d3164 100644
--- a/keyboards/jones/v1/info.json
+++ b/keyboards/jones/v1/info.json
@@ -21,6 +21,12 @@
"pin": "F1"
},
"diode_direction": "COL2ROW",
+ "dynamic_keymap": {
+ "layer_count": 6
+ },
+ "eeprom": {
+ "driver": "i2c"
+ },
"encoder": {
"rotary": [
{"pin_a": "F5", "pin_b": "F4"},
diff --git a/keyboards/jones/v1/rules.mk b/keyboards/jones/v1/rules.mk
index cfc8879b74..6f522a4365 100644
--- a/keyboards/jones/v1/rules.mk
+++ b/keyboards/jones/v1/rules.mk
@@ -12,7 +12,4 @@ RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
AUDIO_ENABLE = yes # Audio output
ENCODER_ENABLE = yes # Rotary Encoder
-# Use I2C connected External EEPROM
-EEPROM_DRIVER = i2c
-
LTO_ENABLE = yes
diff --git a/keyboards/kabedon/kabedon980/info.json b/keyboards/kabedon/kabedon980/info.json
index ae15a51ea3..f443f58a3d 100644
--- a/keyboards/kabedon/kabedon980/info.json
+++ b/keyboards/kabedon/kabedon980/info.json
@@ -33,6 +33,9 @@
"rows": ["D0", "D2", "F7", "B1", "B0", "D6", "C7", "D7", "B5", "B2"]
},
"diode_direction": "ROW2COL",
+ "dynamic_keymap": {
+ "layer_count": 3
+ },
"processor": "atmega32u4",
"bootloader": "atmel-dfu",
"layouts": {
diff --git a/keyboards/kagizaraya/chidori/rules.mk b/keyboards/kagizaraya/chidori/rules.mk
index cbec27a8cb..f94317cf22 100644
--- a/keyboards/kagizaraya/chidori/rules.mk
+++ b/keyboards/kagizaraya/chidori/rules.mk
@@ -16,4 +16,4 @@ CUSTOM_MATRIX = lite
# project specific files
SRC += matrix.c
SRC += board.c
-QUANTUM_LIB_SRC += i2c_master.c
+I2C_DRIVER_REQUIRED = yes
diff --git a/keyboards/kbdcraft/adam64/adam64.c b/keyboards/kbdcraft/adam64/adam64.c
index c23bd489a5..b0712aec39 100644
--- a/keyboards/kbdcraft/adam64/adam64.c
+++ b/keyboards/kbdcraft/adam64/adam64.c
@@ -19,7 +19,7 @@
#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3741_led_t PROGMEM g_is31fl3741_leds[RGB_MATRIX_LED_COUNT] = {
/* Refer to IS31 manual for these locations
* driver
* | R location
diff --git a/keyboards/kbdcraft/adam64/config.h b/keyboards/kbdcraft/adam64/config.h
index 81101bbb61..b2c0cca3d1 100644
--- a/keyboards/kbdcraft/adam64/config.h
+++ b/keyboards/kbdcraft/adam64/config.h
@@ -23,8 +23,8 @@
#define I2C1_CLOCK_SPEED 400000
#define I2C1_DUTY_CYCLE FAST_DUTY_CYCLE_16_9
-#define DRIVER_COUNT 1
-#define DRIVER_ADDR_1 0b0110000
+#define IS31FL3741_DRIVER_COUNT 1
+#define DRIVER_ADDR_1 IS31FL3741_I2C_ADDRESS_GND
#define RGB_MATRIX_LED_COUNT 64
/* turn off effects when suspended */
diff --git a/keyboards/kbdfans/bella/rgb/config.h b/keyboards/kbdfans/bella/rgb/config.h
index c8114dc57b..c3c7e423f3 100644
--- a/keyboards/kbdfans/bella/rgb/config.h
+++ b/keyboards/kbdfans/bella/rgb/config.h
@@ -71,8 +71,8 @@
// # define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
//#define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_SOLID_COLOR
#define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_CYCLE_ALL
-#define DRIVER_ADDR_1 0b0110000
-#define DRIVER_COUNT 1
+#define DRIVER_ADDR_1 IS31FL3741_I2C_ADDRESS_GND
+#define IS31FL3741_DRIVER_COUNT 1
#define RGB_MATRIX_LED_COUNT 108
#define DRIVER_INDICATOR_LED_TOTAL 0
#endif
diff --git a/keyboards/kbdfans/bella/rgb/rgb.c b/keyboards/kbdfans/bella/rgb/rgb.c
index aac16dd820..8bdc1d8fdf 100644
--- a/keyboards/kbdfans/bella/rgb/rgb.c
+++ b/keyboards/kbdfans/bella/rgb/rgb.c
@@ -15,7 +15,7 @@
*/
#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3741_led_t PROGMEM g_is31fl3741_leds[RGB_MATRIX_LED_COUNT] = {
{0, CS18_SW1, CS17_SW1, CS16_SW1}, /* RGB6 */
{0, CS18_SW3, CS17_SW3, CS16_SW3}, /* RGB32 */
{0, CS18_SW4, CS17_SW4, CS16_SW4}, /* RGB45 */
diff --git a/keyboards/kbdfans/bella/rgb_iso/config.h b/keyboards/kbdfans/bella/rgb_iso/config.h
index 8dea9c2164..dc3f987bbe 100644
--- a/keyboards/kbdfans/bella/rgb_iso/config.h
+++ b/keyboards/kbdfans/bella/rgb_iso/config.h
@@ -71,8 +71,8 @@
// # define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
//#define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_SOLID_COLOR
#define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_CYCLE_ALL
-#define DRIVER_ADDR_1 0b0110000
-#define DRIVER_COUNT 1
+#define DRIVER_ADDR_1 IS31FL3741_I2C_ADDRESS_GND
+#define IS31FL3741_DRIVER_COUNT 1
#define RGB_MATRIX_LED_COUNT 109
#define DRIVER_INDICATOR_LED_TOTAL 0
#endif
diff --git a/keyboards/kbdfans/bella/rgb_iso/rgb_iso.c b/keyboards/kbdfans/bella/rgb_iso/rgb_iso.c
index 30371614d8..e36b811bbc 100644
--- a/keyboards/kbdfans/bella/rgb_iso/rgb_iso.c
+++ b/keyboards/kbdfans/bella/rgb_iso/rgb_iso.c
@@ -15,7 +15,7 @@
*/
#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3741_led_t PROGMEM g_is31fl3741_leds[RGB_MATRIX_LED_COUNT] = {
{0, CS18_SW1, CS17_SW1, CS16_SW1}, /* RGB6 */
{0, CS18_SW3, CS17_SW3, CS16_SW3}, /* RGB32 */
{0, CS18_SW4, CS17_SW4, CS16_SW4}, /* RGB45 */
diff --git a/keyboards/kbdfans/boop65/rgb/config.h b/keyboards/kbdfans/boop65/rgb/config.h
index c1955ac84f..89375078d7 100644
--- a/keyboards/kbdfans/boop65/rgb/config.h
+++ b/keyboards/kbdfans/boop65/rgb/config.h
@@ -26,8 +26,8 @@
# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255
# define RGB_MATRIX_DEFAULT_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS // Sets the default brightness value, if none has been set
# define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_CYCLE_ALL
-# define DRIVER_ADDR_1 0b0110000
-# define DRIVER_COUNT 1
+# define DRIVER_ADDR_1 IS31FL3741_I2C_ADDRESS_GND
+# define IS31FL3741_DRIVER_COUNT 1
# define RGB_MATRIX_LED_COUNT 83
# define DRIVER_INDICATOR_LED_TOTAL 0
#define ENABLE_RGB_MATRIX_ALPHAS_MODS
diff --git a/keyboards/kbdfans/boop65/rgb/rgb.c b/keyboards/kbdfans/boop65/rgb/rgb.c
index 985f877e85..f2b5858966 100644
--- a/keyboards/kbdfans/boop65/rgb/rgb.c
+++ b/keyboards/kbdfans/boop65/rgb/rgb.c
@@ -18,7 +18,7 @@
#ifdef RGB_MATRIX_ENABLE
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3741_led_t PROGMEM g_is31fl3741_leds[RGB_MATRIX_LED_COUNT] = {
{0, CS21_SW1, CS20_SW1, CS19_SW1},
{0, CS21_SW2, CS20_SW2, CS19_SW2},
{0, CS21_SW3, CS20_SW3, CS19_SW3},
diff --git a/keyboards/kbdfans/kbd67/mkiirgb/v1/config.h b/keyboards/kbdfans/kbd67/mkiirgb/v1/config.h
index f2ee16dac2..b836410d60 100644
--- a/keyboards/kbdfans/kbd67/mkiirgb/v1/config.h
+++ b/keyboards/kbdfans/kbd67/mkiirgb/v1/config.h
@@ -55,9 +55,9 @@
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200
#define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_CYCLE_ALL
-#define DRIVER_ADDR_1 0b1110100
-#define DRIVER_ADDR_2 0b1110111
-#define DRIVER_COUNT 2
+#define DRIVER_ADDR_1 IS31FL3731_I2C_ADDRESS_GND
+#define DRIVER_ADDR_2 IS31FL3731_I2C_ADDRESS_VCC
+#define IS31FL3731_DRIVER_COUNT 2
#define DRIVER_1_LED_TOTAL 35
#define DRIVER_2_LED_TOTAL 32
#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
diff --git a/keyboards/kbdfans/kbd67/mkiirgb/v1/v1.c b/keyboards/kbdfans/kbd67/mkiirgb/v1/v1.c
index 336526eb11..c70622dd56 100644
--- a/keyboards/kbdfans/kbd67/mkiirgb/v1/v1.c
+++ b/keyboards/kbdfans/kbd67/mkiirgb/v1/v1.c
@@ -16,7 +16,7 @@
#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3731_led_t PROGMEM g_is31fl3731_leds[RGB_MATRIX_LED_COUNT] = {
{0, C8_8, C7_8, C6_8}, // LA17
{0, C9_8, C7_7, C6_7}, // LA16
diff --git a/keyboards/kbdfans/kbd67/mkiirgb/v2/config.h b/keyboards/kbdfans/kbd67/mkiirgb/v2/config.h
index cf7f488280..0dad3d6767 100644
--- a/keyboards/kbdfans/kbd67/mkiirgb/v2/config.h
+++ b/keyboards/kbdfans/kbd67/mkiirgb/v2/config.h
@@ -55,9 +55,9 @@
// #define ENABLE_RGB_MATRIX_SOLID_SPLASH
// #define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 255
-# define DRIVER_ADDR_1 0b1110100
-# define DRIVER_ADDR_2 0b1110111
-# define DRIVER_COUNT 2
+# define DRIVER_ADDR_1 IS31FL3731_I2C_ADDRESS_GND
+# define DRIVER_ADDR_2 IS31FL3731_I2C_ADDRESS_VCC
+# define IS31FL3731_DRIVER_COUNT 2
# define DRIVER_1_LED_TOTAL 35
# define DRIVER_2_LED_TOTAL 32
# define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
diff --git a/keyboards/kbdfans/kbd67/mkiirgb/v2/v2.c b/keyboards/kbdfans/kbd67/mkiirgb/v2/v2.c
index 3bb336c0a2..7de8060d7a 100644
--- a/keyboards/kbdfans/kbd67/mkiirgb/v2/v2.c
+++ b/keyboards/kbdfans/kbd67/mkiirgb/v2/v2.c
@@ -16,7 +16,7 @@
#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3731_led_t PROGMEM g_is31fl3731_leds[RGB_MATRIX_LED_COUNT] = {
{0, C8_8, C7_8, C6_8}, // LA17
{0, C9_8, C7_7, C6_7}, // LA16
diff --git a/keyboards/kbdfans/kbd67/mkiirgb/v3/config.h b/keyboards/kbdfans/kbd67/mkiirgb/v3/config.h
index e291fa6368..971ed5c866 100755
--- a/keyboards/kbdfans/kbd67/mkiirgb/v3/config.h
+++ b/keyboards/kbdfans/kbd67/mkiirgb/v3/config.h
@@ -72,8 +72,8 @@
#define RGB_MATRIX_LED_PROCESS_LIMIT 4
#define RGB_MATRIX_LED_FLUSH_LIMIT 26
#define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_CYCLE_ALL
-#define DRIVER_ADDR_1 0b0110000
-#define DRIVER_COUNT 1
+#define DRIVER_ADDR_1 IS31FL3741_I2C_ADDRESS_GND
+#define IS31FL3741_DRIVER_COUNT 1
#define RGB_MATRIX_LED_COUNT 67
#define DRIVER_INDICATOR_LED_TOTAL 0
#endif
diff --git a/keyboards/kbdfans/kbd67/mkiirgb/v3/info.json b/keyboards/kbdfans/kbd67/mkiirgb/v3/info.json
index 165db96293..284461c2a7 100644
--- a/keyboards/kbdfans/kbd67/mkiirgb/v3/info.json
+++ b/keyboards/kbdfans/kbd67/mkiirgb/v3/info.json
@@ -5,7 +5,8 @@
"device_version": "0.0.3"
},
"rgb_matrix": {
- "driver": "is31fl3741"
+ "driver": "is31fl3741",
+ "val_steps": 8
},
"matrix_pins": {
"cols": ["F7", "F6", "F5", "C7", "B0", "B1", "B2", "B3", "B4", "D7", "D6", "D4", "D5", "D3", "D2"],
diff --git a/keyboards/kbdfans/kbd67/mkiirgb/v3/v3.c b/keyboards/kbdfans/kbd67/mkiirgb/v3/v3.c
index 4329893ac1..7347a365bc 100755
--- a/keyboards/kbdfans/kbd67/mkiirgb/v3/v3.c
+++ b/keyboards/kbdfans/kbd67/mkiirgb/v3/v3.c
@@ -18,7 +18,7 @@
#ifdef RGB_MATRIX_ENABLE
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3741_led_t PROGMEM g_is31fl3741_leds[RGB_MATRIX_LED_COUNT] = {
{0, CS21_SW1, CS20_SW1, CS19_SW1},
{0, CS21_SW2, CS20_SW2, CS19_SW2},
{0, CS21_SW3, CS20_SW3, CS19_SW3},
@@ -125,16 +125,12 @@ led_config_t g_led_config = { {
#if defined(RGB_MATRIX_ENABLE) && defined(CAPS_LOCK_LED_INDEX)
-#ifdef RGB_MATRIX_MAXIMUM_BRIGHTNESS
+#if !defined(CAPS_LOCK_MAX_BRIGHTNESS)
#define CAPS_LOCK_MAX_BRIGHTNESS RGB_MATRIX_MAXIMUM_BRIGHTNESS
-#else
- #define CAPS_LOCK_MAX_BRIGHTNESS 0xFF
#endif
-#ifdef RGB_MATRIX_VAL_STEP
+#if !defined(CAPS_LOCK_VAL_STEP)
#define CAPS_LOCK_VAL_STEP RGB_MATRIX_VAL_STEP
-#else
- #define CAPS_LOCK_VAL_STEP 8
#endif
bool rgb_matrix_indicators_kb(void) {
diff --git a/keyboards/kbdfans/kbdmini/config.h b/keyboards/kbdfans/kbdmini/config.h
index a3e8408094..243693d57e 100644
--- a/keyboards/kbdfans/kbdmini/config.h
+++ b/keyboards/kbdfans/kbdmini/config.h
@@ -53,7 +53,7 @@
// #define ENABLE_RGB_MATRIX_SOLID_SPLASH
// #define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
-#define DRIVER_ADDR_1 0b1010000
-#define DRIVER_COUNT 1
+#define DRIVER_ADDR_1 IS31FL3733_I2C_ADDRESS_GND_GND
+#define IS31FL3733_DRIVER_COUNT 1
#define RGB_MATRIX_LED_COUNT 52
#endif
diff --git a/keyboards/kbdfans/kbdmini/kbdmini.c b/keyboards/kbdfans/kbdmini/kbdmini.c
index 4dd76e974e..d46283b973 100644
--- a/keyboards/kbdfans/kbdmini/kbdmini.c
+++ b/keyboards/kbdfans/kbdmini/kbdmini.c
@@ -1,6 +1,6 @@
#include "quantum.h"
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3733_led_t PROGMEM g_is31fl3733_leds[RGB_MATRIX_LED_COUNT] = {
{ 0, B_9, A_9, C_9 }, //LA33
{ 0, B_10, A_10, C_10 }, //LA37
{ 0, B_11, A_11, C_11 }, //LA41
diff --git a/keyboards/kbdfans/maja/config.h b/keyboards/kbdfans/maja/config.h
index 8f15d2619f..b7f75f982a 100755
--- a/keyboards/kbdfans/maja/config.h
+++ b/keyboards/kbdfans/maja/config.h
@@ -54,9 +54,9 @@
// #define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
#define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_CYCLE_ALL
-#define DRIVER_ADDR_1 0b1110100
-#define DRIVER_ADDR_2 0b1110110
-#define DRIVER_COUNT 2
+#define DRIVER_ADDR_1 IS31FL3731_I2C_ADDRESS_GND
+#define DRIVER_ADDR_2 IS31FL3731_I2C_ADDRESS_SDA
+#define IS31FL3731_DRIVER_COUNT 2
#define DRIVER_1_LED_TOTAL 36
#define DRIVER_2_LED_TOTAL 31
#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
diff --git a/keyboards/kbdfans/maja/maja.c b/keyboards/kbdfans/maja/maja.c
index 43153808d9..d30d327113 100755
--- a/keyboards/kbdfans/maja/maja.c
+++ b/keyboards/kbdfans/maja/maja.c
@@ -1,6 +1,6 @@
#include "quantum.h"
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3731_led_t PROGMEM g_is31fl3731_leds[RGB_MATRIX_LED_COUNT] = {
{0, C2_1, C3_1, C4_1}, // LA0
{0, C1_1, C3_2, C4_2}, // LA1
{0, C1_2, C2_2, C4_3}, // LA2
diff --git a/keyboards/kbdfans/niu_mini/keymaps/xtonhasvim/keymap.c b/keyboards/kbdfans/niu_mini/keymaps/xtonhasvim/keymap.c
index 78fdb0713c..5a50c1556d 100644
--- a/keyboards/kbdfans/niu_mini/keymaps/xtonhasvim/keymap.c
+++ b/keyboards/kbdfans/niu_mini/keymaps/xtonhasvim/keymap.c
@@ -162,7 +162,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/** Set just 4 LEDs closest to the user. Slightly less annoying to bystanders.*/
void rgbflag(uint8_t r, uint8_t g, uint8_t b, uint8_t rr, uint8_t gg, uint8_t bb) {
- LED_TYPE *target_led = user_rgb_mode ? shadowed_led : led;
+ rgb_led_t *target_led = user_rgb_mode ? shadowed_led : led;
for (int i = 0; i < RGBLED_NUM; i++) {
switch (i) {
case 12: case 13:
diff --git a/keyboards/kc60/info.json b/keyboards/kc60/info.json
index ea0e7998b8..5dbead0c5f 100644
--- a/keyboards/kc60/info.json
+++ b/keyboards/kc60/info.json
@@ -41,7 +41,7 @@
},
"processor": "atmega32u4",
"bootloader": "atmel-dfu",
- "community_layouts": ["60_ansi"],
+ "community_layouts": ["60_ansi", "60_ansi_split_bs_rshift", "60_ansi_tsangan", "60_tsangan_hhkb", "60_hhkb", "60_abnt2", "60_iso", "60_iso_split_bs_rshift", "60_iso_tsangan"],
"layouts": {
"LAYOUT_all": {
"layout": [
@@ -116,7 +116,7 @@
{"matrix": [4, 13], "x": 13.75, "y": 4, "w": 1.25}
]
},
- "LAYOUT": {
+ "LAYOUT_60_ansi": {
"layout": [
{"matrix": [0, 0], "x": 0, "y": 0},
{"matrix": [0, 1], "x": 1, "y": 0},
@@ -131,7 +131,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},
+ {"matrix": [0, 13], "x": 13, "y": 0, "w": 2},
{"matrix": [1, 0], "x": 0, "y": 1, "w": 1.5},
{"matrix": [1, 1], "x": 1.5, "y": 1},
@@ -160,11 +160,9 @@
{"matrix": [2, 9], "x": 9.75, "y": 2},
{"matrix": [2, 10], "x": 10.75, "y": 2},
{"matrix": [2, 11], "x": 11.75, "y": 2},
- {"matrix": [2, 12], "x": 12.75, "y": 2},
- {"matrix": [2, 13], "x": 13.75, "y": 2, "w": 1.25},
+ {"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, 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},
@@ -175,21 +173,90 @@
{"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, 12], "x": 12.25, "y": 3, "w": 1.75},
- {"matrix": [3, 13], "x": 14, "y": 3},
+ {"matrix": [3, 13], "x": 12.25, "y": 3, "w": 2.75},
{"matrix": [4, 0], "x": 0, "y": 4, "w": 1.25},
{"matrix": [4, 1], "x": 1.25, "y": 4, "w": 1.25},
{"matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.25},
{"matrix": [4, 5], "x": 3.75, "y": 4, "w": 6.25},
+ {"matrix": [4, 10], "x": 10, "y": 4, "w": 1.25},
+ {"matrix": [4, 11], "x": 11.25, "y": 4, "w": 1.25},
+ {"matrix": [4, 12], "x": 12.5, "y": 4, "w": 1.25},
+ {"matrix": [4, 13], "x": 13.75, "y": 4, "w": 1.25}
+ ]
+ },
+ "LAYOUT_60_ansi_split_bs_rshift": {
+ "layout": [
+ {"matrix": [0, 0], "x": 0, "y": 0},
+ {"matrix": [0, 1], "x": 1, "y": 0},
+ {"matrix": [0, 2], "x": 2, "y": 0},
+ {"matrix": [0, 3], "x": 3, "y": 0},
+ {"matrix": [0, 4], "x": 4, "y": 0},
+ {"matrix": [0, 5], "x": 5, "y": 0},
+ {"matrix": [0, 6], "x": 6, "y": 0},
+ {"matrix": [0, 7], "x": 7, "y": 0},
+ {"matrix": [0, 8], "x": 8, "y": 0},
+ {"matrix": [0, 9], "x": 9, "y": 0},
+ {"matrix": [0, 10], "x": 10, "y": 0},
+ {"matrix": [0, 11], "x": 11, "y": 0},
+ {"matrix": [0, 12], "x": 12, "y": 0},
+ {"matrix": [0, 13], "x": 13, "y": 0},
{"matrix": [4, 9], "x": 14, "y": 0},
+
+ {"matrix": [1, 0], "x": 0, "y": 1, "w": 1.5},
+ {"matrix": [1, 1], "x": 1.5, "y": 1},
+ {"matrix": [1, 2], "x": 2.5, "y": 1},
+ {"matrix": [1, 3], "x": 3.5, "y": 1},
+ {"matrix": [1, 4], "x": 4.5, "y": 1},
+ {"matrix": [1, 5], "x": 5.5, "y": 1},
+ {"matrix": [1, 6], "x": 6.5, "y": 1},
+ {"matrix": [1, 7], "x": 7.5, "y": 1},
+ {"matrix": [1, 8], "x": 8.5, "y": 1},
+ {"matrix": [1, 9], "x": 9.5, "y": 1},
+ {"matrix": [1, 10], "x": 10.5, "y": 1},
+ {"matrix": [1, 11], "x": 11.5, "y": 1},
+ {"matrix": [1, 12], "x": 12.5, "y": 1},
+ {"matrix": [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},
+ {"matrix": [2, 3], "x": 3.75, "y": 2},
+ {"matrix": [2, 4], "x": 4.75, "y": 2},
+ {"matrix": [2, 5], "x": 5.75, "y": 2},
+ {"matrix": [2, 6], "x": 6.75, "y": 2},
+ {"matrix": [2, 7], "x": 7.75, "y": 2},
+ {"matrix": [2, 8], "x": 8.75, "y": 2},
+ {"matrix": [2, 9], "x": 9.75, "y": 2},
+ {"matrix": [2, 10], "x": 10.75, "y": 2},
+ {"matrix": [2, 11], "x": 11.75, "y": 2},
+ {"matrix": [2, 13], "x": 12.75, "y": 2, "w": 2.25},
+
+ {"matrix": [3, 0], "x": 0, "y": 3, "w": 2.25},
+ {"matrix": [3, 2], "x": 2.25, "y": 3},
+ {"matrix": [3, 3], "x": 3.25, "y": 3},
+ {"matrix": [3, 4], "x": 4.25, "y": 3},
+ {"matrix": [3, 5], "x": 5.25, "y": 3},
+ {"matrix": [3, 6], "x": 6.25, "y": 3},
+ {"matrix": [3, 7], "x": 7.25, "y": 3},
+ {"matrix": [3, 8], "x": 8.25, "y": 3},
+ {"matrix": [3, 9], "x": 9.25, "y": 3},
+ {"matrix": [3, 10], "x": 10.25, "y": 3},
+ {"matrix": [3, 11], "x": 11.25, "y": 3},
+ {"matrix": [3, 13], "x": 12.25, "y": 3, "w": 1.75},
+ {"matrix": [3, 12], "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, 5], "x": 3.75, "y": 4, "w": 6.25},
{"matrix": [4, 10], "x": 10, "y": 4, "w": 1.25},
{"matrix": [4, 11], "x": 11.25, "y": 4, "w": 1.25},
{"matrix": [4, 12], "x": 12.5, "y": 4, "w": 1.25},
{"matrix": [4, 13], "x": 13.75, "y": 4, "w": 1.25}
]
},
- "LAYOUT_60_ansi": {
+ "LAYOUT_60_ansi_tsangan": {
"layout": [
{"matrix": [0, 0], "x": 0, "y": 0},
{"matrix": [0, 1], "x": 1, "y": 0},
@@ -248,6 +315,424 @@
{"matrix": [3, 11], "x": 11.25, "y": 3},
{"matrix": [3, 13], "x": 12.25, "y": 3, "w": 2.75},
+ {"matrix": [4, 0], "x": 0, "y": 4, "w": 1.5},
+ {"matrix": [4, 1], "x": 1.5, "y": 4},
+ {"matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.5},
+ {"matrix": [4, 5], "x": 4, "y": 4, "w": 7},
+ {"matrix": [4, 11], "x": 11, "y": 4, "w": 1.5},
+ {"matrix": [4, 12], "x": 12.5, "y": 4},
+ {"matrix": [4, 13], "x": 13.5, "y": 4, "w": 1.5}
+ ]
+ },
+ "LAYOUT_60_tsangan_hhkb": {
+ "layout": [
+ {"matrix": [0, 0], "x": 0, "y": 0},
+ {"matrix": [0, 1], "x": 1, "y": 0},
+ {"matrix": [0, 2], "x": 2, "y": 0},
+ {"matrix": [0, 3], "x": 3, "y": 0},
+ {"matrix": [0, 4], "x": 4, "y": 0},
+ {"matrix": [0, 5], "x": 5, "y": 0},
+ {"matrix": [0, 6], "x": 6, "y": 0},
+ {"matrix": [0, 7], "x": 7, "y": 0},
+ {"matrix": [0, 8], "x": 8, "y": 0},
+ {"matrix": [0, 9], "x": 9, "y": 0},
+ {"matrix": [0, 10], "x": 10, "y": 0},
+ {"matrix": [0, 11], "x": 11, "y": 0},
+ {"matrix": [0, 12], "x": 12, "y": 0},
+ {"matrix": [0, 13], "x": 13, "y": 0},
+ {"matrix": [4, 9], "x": 14, "y": 0},
+
+ {"matrix": [1, 0], "x": 0, "y": 1, "w": 1.5},
+ {"matrix": [1, 1], "x": 1.5, "y": 1},
+ {"matrix": [1, 2], "x": 2.5, "y": 1},
+ {"matrix": [1, 3], "x": 3.5, "y": 1},
+ {"matrix": [1, 4], "x": 4.5, "y": 1},
+ {"matrix": [1, 5], "x": 5.5, "y": 1},
+ {"matrix": [1, 6], "x": 6.5, "y": 1},
+ {"matrix": [1, 7], "x": 7.5, "y": 1},
+ {"matrix": [1, 8], "x": 8.5, "y": 1},
+ {"matrix": [1, 9], "x": 9.5, "y": 1},
+ {"matrix": [1, 10], "x": 10.5, "y": 1},
+ {"matrix": [1, 11], "x": 11.5, "y": 1},
+ {"matrix": [1, 12], "x": 12.5, "y": 1},
+ {"matrix": [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},
+ {"matrix": [2, 3], "x": 3.75, "y": 2},
+ {"matrix": [2, 4], "x": 4.75, "y": 2},
+ {"matrix": [2, 5], "x": 5.75, "y": 2},
+ {"matrix": [2, 6], "x": 6.75, "y": 2},
+ {"matrix": [2, 7], "x": 7.75, "y": 2},
+ {"matrix": [2, 8], "x": 8.75, "y": 2},
+ {"matrix": [2, 9], "x": 9.75, "y": 2},
+ {"matrix": [2, 10], "x": 10.75, "y": 2},
+ {"matrix": [2, 11], "x": 11.75, "y": 2},
+ {"matrix": [2, 13], "x": 12.75, "y": 2, "w": 2.25},
+
+ {"matrix": [3, 0], "x": 0, "y": 3, "w": 2.25},
+ {"matrix": [3, 2], "x": 2.25, "y": 3},
+ {"matrix": [3, 3], "x": 3.25, "y": 3},
+ {"matrix": [3, 4], "x": 4.25, "y": 3},
+ {"matrix": [3, 5], "x": 5.25, "y": 3},
+ {"matrix": [3, 6], "x": 6.25, "y": 3},
+ {"matrix": [3, 7], "x": 7.25, "y": 3},
+ {"matrix": [3, 8], "x": 8.25, "y": 3},
+ {"matrix": [3, 9], "x": 9.25, "y": 3},
+ {"matrix": [3, 10], "x": 10.25, "y": 3},
+ {"matrix": [3, 11], "x": 11.25, "y": 3},
+ {"matrix": [3, 13], "x": 12.25, "y": 3, "w": 1.75},
+ {"matrix": [3, 12], "x": 14, "y": 3},
+
+ {"matrix": [4, 0], "x": 0, "y": 4, "w": 1.5},
+ {"matrix": [4, 1], "x": 1.5, "y": 4},
+ {"matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.5},
+ {"matrix": [4, 5], "x": 4, "y": 4, "w": 7},
+ {"matrix": [4, 11], "x": 11, "y": 4, "w": 1.5},
+ {"matrix": [4, 12], "x": 12.5, "y": 4},
+ {"matrix": [4, 13], "x": 13.5, "y": 4, "w": 1.5}
+ ]
+ },
+ "LAYOUT_60_hhkb": {
+ "layout": [
+ {"matrix": [0, 0], "x": 0, "y": 0},
+ {"matrix": [0, 1], "x": 1, "y": 0},
+ {"matrix": [0, 2], "x": 2, "y": 0},
+ {"matrix": [0, 3], "x": 3, "y": 0},
+ {"matrix": [0, 4], "x": 4, "y": 0},
+ {"matrix": [0, 5], "x": 5, "y": 0},
+ {"matrix": [0, 6], "x": 6, "y": 0},
+ {"matrix": [0, 7], "x": 7, "y": 0},
+ {"matrix": [0, 8], "x": 8, "y": 0},
+ {"matrix": [0, 9], "x": 9, "y": 0},
+ {"matrix": [0, 10], "x": 10, "y": 0},
+ {"matrix": [0, 11], "x": 11, "y": 0},
+ {"matrix": [0, 12], "x": 12, "y": 0},
+ {"matrix": [0, 13], "x": 13, "y": 0},
+ {"matrix": [4, 9], "x": 14, "y": 0},
+
+ {"matrix": [1, 0], "x": 0, "y": 1, "w": 1.5},
+ {"matrix": [1, 1], "x": 1.5, "y": 1},
+ {"matrix": [1, 2], "x": 2.5, "y": 1},
+ {"matrix": [1, 3], "x": 3.5, "y": 1},
+ {"matrix": [1, 4], "x": 4.5, "y": 1},
+ {"matrix": [1, 5], "x": 5.5, "y": 1},
+ {"matrix": [1, 6], "x": 6.5, "y": 1},
+ {"matrix": [1, 7], "x": 7.5, "y": 1},
+ {"matrix": [1, 8], "x": 8.5, "y": 1},
+ {"matrix": [1, 9], "x": 9.5, "y": 1},
+ {"matrix": [1, 10], "x": 10.5, "y": 1},
+ {"matrix": [1, 11], "x": 11.5, "y": 1},
+ {"matrix": [1, 12], "x": 12.5, "y": 1},
+ {"matrix": [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},
+ {"matrix": [2, 3], "x": 3.75, "y": 2},
+ {"matrix": [2, 4], "x": 4.75, "y": 2},
+ {"matrix": [2, 5], "x": 5.75, "y": 2},
+ {"matrix": [2, 6], "x": 6.75, "y": 2},
+ {"matrix": [2, 7], "x": 7.75, "y": 2},
+ {"matrix": [2, 8], "x": 8.75, "y": 2},
+ {"matrix": [2, 9], "x": 9.75, "y": 2},
+ {"matrix": [2, 10], "x": 10.75, "y": 2},
+ {"matrix": [2, 11], "x": 11.75, "y": 2},
+ {"matrix": [2, 13], "x": 12.75, "y": 2, "w": 2.25},
+
+ {"matrix": [3, 0], "x": 0, "y": 3, "w": 2.25},
+ {"matrix": [3, 2], "x": 2.25, "y": 3},
+ {"matrix": [3, 3], "x": 3.25, "y": 3},
+ {"matrix": [3, 4], "x": 4.25, "y": 3},
+ {"matrix": [3, 5], "x": 5.25, "y": 3},
+ {"matrix": [3, 6], "x": 6.25, "y": 3},
+ {"matrix": [3, 7], "x": 7.25, "y": 3},
+ {"matrix": [3, 8], "x": 8.25, "y": 3},
+ {"matrix": [3, 9], "x": 9.25, "y": 3},
+ {"matrix": [3, 10], "x": 10.25, "y": 3},
+ {"matrix": [3, 11], "x": 11.25, "y": 3},
+ {"matrix": [3, 13], "x": 12.25, "y": 3, "w": 1.75},
+ {"matrix": [3, 12], "x": 14, "y": 3},
+
+ {"matrix": [4, 1], "x": 1.5, "y": 4},
+ {"matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.5},
+ {"matrix": [4, 5], "x": 4, "y": 4, "w": 7},
+ {"matrix": [4, 11], "x": 11, "y": 4, "w": 1.5},
+ {"matrix": [4, 12], "x": 12.5, "y": 4}
+ ]
+ },
+ "LAYOUT_60_true_hhkb": {
+ "layout": [
+ {"matrix": [0, 0], "x": 0, "y": 0},
+ {"matrix": [0, 1], "x": 1, "y": 0},
+ {"matrix": [0, 2], "x": 2, "y": 0},
+ {"matrix": [0, 3], "x": 3, "y": 0},
+ {"matrix": [0, 4], "x": 4, "y": 0},
+ {"matrix": [0, 5], "x": 5, "y": 0},
+ {"matrix": [0, 6], "x": 6, "y": 0},
+ {"matrix": [0, 7], "x": 7, "y": 0},
+ {"matrix": [0, 8], "x": 8, "y": 0},
+ {"matrix": [0, 9], "x": 9, "y": 0},
+ {"matrix": [0, 10], "x": 10, "y": 0},
+ {"matrix": [0, 11], "x": 11, "y": 0},
+ {"matrix": [0, 12], "x": 12, "y": 0},
+ {"matrix": [0, 13], "x": 13, "y": 0},
+ {"matrix": [4, 9], "x": 14, "y": 0},
+
+ {"matrix": [1, 0], "x": 0, "y": 1, "w": 1.5},
+ {"matrix": [1, 1], "x": 1.5, "y": 1},
+ {"matrix": [1, 2], "x": 2.5, "y": 1},
+ {"matrix": [1, 3], "x": 3.5, "y": 1},
+ {"matrix": [1, 4], "x": 4.5, "y": 1},
+ {"matrix": [1, 5], "x": 5.5, "y": 1},
+ {"matrix": [1, 6], "x": 6.5, "y": 1},
+ {"matrix": [1, 7], "x": 7.5, "y": 1},
+ {"matrix": [1, 8], "x": 8.5, "y": 1},
+ {"matrix": [1, 9], "x": 9.5, "y": 1},
+ {"matrix": [1, 10], "x": 10.5, "y": 1},
+ {"matrix": [1, 11], "x": 11.5, "y": 1},
+ {"matrix": [1, 12], "x": 12.5, "y": 1},
+ {"matrix": [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},
+ {"matrix": [2, 3], "x": 3.75, "y": 2},
+ {"matrix": [2, 4], "x": 4.75, "y": 2},
+ {"matrix": [2, 5], "x": 5.75, "y": 2},
+ {"matrix": [2, 6], "x": 6.75, "y": 2},
+ {"matrix": [2, 7], "x": 7.75, "y": 2},
+ {"matrix": [2, 8], "x": 8.75, "y": 2},
+ {"matrix": [2, 9], "x": 9.75, "y": 2},
+ {"matrix": [2, 10], "x": 10.75, "y": 2},
+ {"matrix": [2, 11], "x": 11.75, "y": 2},
+ {"matrix": [2, 13], "x": 12.75, "y": 2, "w": 2.25},
+
+ {"matrix": [3, 0], "x": 0, "y": 3, "w": 2.25},
+ {"matrix": [3, 2], "x": 2.25, "y": 3},
+ {"matrix": [3, 3], "x": 3.25, "y": 3},
+ {"matrix": [3, 4], "x": 4.25, "y": 3},
+ {"matrix": [3, 5], "x": 5.25, "y": 3},
+ {"matrix": [3, 6], "x": 6.25, "y": 3},
+ {"matrix": [3, 7], "x": 7.25, "y": 3},
+ {"matrix": [3, 8], "x": 8.25, "y": 3},
+ {"matrix": [3, 9], "x": 9.25, "y": 3},
+ {"matrix": [3, 10], "x": 10.25, "y": 3},
+ {"matrix": [3, 11], "x": 11.25, "y": 3},
+ {"matrix": [3, 13], "x": 12.25, "y": 3, "w": 1.75},
+ {"matrix": [3, 12], "x": 14, "y": 3},
+
+ {"matrix": [4, 1], "x": 1.5, "y": 4},
+ {"matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.5},
+ {"matrix": [4, 5], "x": 4, "y": 4, "w": 6},
+ {"matrix": [4, 10], "x": 10, "y": 4, "w": 1.5},
+ {"matrix": [4, 11], "x": 11.5, "y": 4}
+ ]
+ },
+ "LAYOUT_60_abnt2": {
+ "layout": [
+ {"matrix": [0, 0], "x": 0, "y": 0},
+ {"matrix": [0, 1], "x": 1, "y": 0},
+ {"matrix": [0, 2], "x": 2, "y": 0},
+ {"matrix": [0, 3], "x": 3, "y": 0},
+ {"matrix": [0, 4], "x": 4, "y": 0},
+ {"matrix": [0, 5], "x": 5, "y": 0},
+ {"matrix": [0, 6], "x": 6, "y": 0},
+ {"matrix": [0, 7], "x": 7, "y": 0},
+ {"matrix": [0, 8], "x": 8, "y": 0},
+ {"matrix": [0, 9], "x": 9, "y": 0},
+ {"matrix": [0, 10], "x": 10, "y": 0},
+ {"matrix": [0, 11], "x": 11, "y": 0},
+ {"matrix": [0, 12], "x": 12, "y": 0},
+ {"matrix": [0, 13], "x": 13, "y": 0, "w": 2},
+
+ {"matrix": [1, 0], "x": 0, "y": 1, "w": 1.5},
+ {"matrix": [1, 1], "x": 1.5, "y": 1},
+ {"matrix": [1, 2], "x": 2.5, "y": 1},
+ {"matrix": [1, 3], "x": 3.5, "y": 1},
+ {"matrix": [1, 4], "x": 4.5, "y": 1},
+ {"matrix": [1, 5], "x": 5.5, "y": 1},
+ {"matrix": [1, 6], "x": 6.5, "y": 1},
+ {"matrix": [1, 7], "x": 7.5, "y": 1},
+ {"matrix": [1, 8], "x": 8.5, "y": 1},
+ {"matrix": [1, 9], "x": 9.5, "y": 1},
+ {"matrix": [1, 10], "x": 10.5, "y": 1},
+ {"matrix": [1, 11], "x": 11.5, "y": 1},
+ {"matrix": [1, 12], "x": 12.5, "y": 1},
+
+ {"matrix": [2, 0], "x": 0, "y": 2, "w": 1.75},
+ {"matrix": [2, 1], "x": 1.75, "y": 2},
+ {"matrix": [2, 2], "x": 2.75, "y": 2},
+ {"matrix": [2, 3], "x": 3.75, "y": 2},
+ {"matrix": [2, 4], "x": 4.75, "y": 2},
+ {"matrix": [2, 5], "x": 5.75, "y": 2},
+ {"matrix": [2, 6], "x": 6.75, "y": 2},
+ {"matrix": [2, 7], "x": 7.75, "y": 2},
+ {"matrix": [2, 8], "x": 8.75, "y": 2},
+ {"matrix": [2, 9], "x": 9.75, "y": 2},
+ {"matrix": [2, 10], "x": 10.75, "y": 2},
+ {"matrix": [2, 11], "x": 11.75, "y": 2},
+ {"matrix": [2, 12], "x": 12.75, "y": 2},
+ {"matrix": [2, 13], "x": 13.75, "y": 1, "w": 1.25, "h": 2},
+
+ {"matrix": [3, 0], "x": 0, "y": 3, "w": 1.25},
+ {"matrix": [3, 1], "x": 1.25, "y": 3},
+ {"matrix": [3, 2], "x": 2.25, "y": 3},
+ {"matrix": [3, 3], "x": 3.25, "y": 3},
+ {"matrix": [3, 4], "x": 4.25, "y": 3},
+ {"matrix": [3, 5], "x": 5.25, "y": 3},
+ {"matrix": [3, 6], "x": 6.25, "y": 3},
+ {"matrix": [3, 7], "x": 7.25, "y": 3},
+ {"matrix": [3, 8], "x": 8.25, "y": 3},
+ {"matrix": [3, 9], "x": 9.25, "y": 3},
+ {"matrix": [3, 10], "x": 10.25, "y": 3},
+ {"matrix": [3, 11], "x": 11.25, "y": 3},
+ {"matrix": [3, 12], "x": 12.25, "y": 3},
+ {"matrix": [3, 13], "x": 13.25, "y": 3, "w": 1.75},
+
+ {"matrix": [4, 0], "x": 0, "y": 4, "w": 1.25},
+ {"matrix": [4, 1], "x": 1.25, "y": 4, "w": 1.25},
+ {"matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.25},
+ {"matrix": [4, 5], "x": 3.75, "y": 4, "w": 6.25},
+ {"matrix": [4, 10], "x": 10, "y": 4, "w": 1.25},
+ {"matrix": [4, 11], "x": 11.25, "y": 4, "w": 1.25},
+ {"matrix": [4, 12], "x": 12.5, "y": 4, "w": 1.25},
+ {"matrix": [4, 13], "x": 13.75, "y": 4, "w": 1.25}
+ ]
+ },
+ "LAYOUT_60_iso": {
+ "layout": [
+ {"matrix": [0, 0], "x": 0, "y": 0},
+ {"matrix": [0, 1], "x": 1, "y": 0},
+ {"matrix": [0, 2], "x": 2, "y": 0},
+ {"matrix": [0, 3], "x": 3, "y": 0},
+ {"matrix": [0, 4], "x": 4, "y": 0},
+ {"matrix": [0, 5], "x": 5, "y": 0},
+ {"matrix": [0, 6], "x": 6, "y": 0},
+ {"matrix": [0, 7], "x": 7, "y": 0},
+ {"matrix": [0, 8], "x": 8, "y": 0},
+ {"matrix": [0, 9], "x": 9, "y": 0},
+ {"matrix": [0, 10], "x": 10, "y": 0},
+ {"matrix": [0, 11], "x": 11, "y": 0},
+ {"matrix": [0, 12], "x": 12, "y": 0},
+ {"matrix": [0, 13], "x": 13, "y": 0, "w": 2},
+
+ {"matrix": [1, 0], "x": 0, "y": 1, "w": 1.5},
+ {"matrix": [1, 1], "x": 1.5, "y": 1},
+ {"matrix": [1, 2], "x": 2.5, "y": 1},
+ {"matrix": [1, 3], "x": 3.5, "y": 1},
+ {"matrix": [1, 4], "x": 4.5, "y": 1},
+ {"matrix": [1, 5], "x": 5.5, "y": 1},
+ {"matrix": [1, 6], "x": 6.5, "y": 1},
+ {"matrix": [1, 7], "x": 7.5, "y": 1},
+ {"matrix": [1, 8], "x": 8.5, "y": 1},
+ {"matrix": [1, 9], "x": 9.5, "y": 1},
+ {"matrix": [1, 10], "x": 10.5, "y": 1},
+ {"matrix": [1, 11], "x": 11.5, "y": 1},
+ {"matrix": [1, 12], "x": 12.5, "y": 1},
+
+ {"matrix": [2, 0], "x": 0, "y": 2, "w": 1.75},
+ {"matrix": [2, 1], "x": 1.75, "y": 2},
+ {"matrix": [2, 2], "x": 2.75, "y": 2},
+ {"matrix": [2, 3], "x": 3.75, "y": 2},
+ {"matrix": [2, 4], "x": 4.75, "y": 2},
+ {"matrix": [2, 5], "x": 5.75, "y": 2},
+ {"matrix": [2, 6], "x": 6.75, "y": 2},
+ {"matrix": [2, 7], "x": 7.75, "y": 2},
+ {"matrix": [2, 8], "x": 8.75, "y": 2},
+ {"matrix": [2, 9], "x": 9.75, "y": 2},
+ {"matrix": [2, 10], "x": 10.75, "y": 2},
+ {"matrix": [2, 11], "x": 11.75, "y": 2},
+ {"matrix": [2, 12], "x": 12.75, "y": 2},
+ {"matrix": [2, 13], "x": 13.75, "y": 1, "w": 1.25, "h": 2},
+
+ {"matrix": [3, 0], "x": 0, "y": 3, "w": 1.25},
+ {"matrix": [3, 1], "x": 1.25, "y": 3},
+ {"matrix": [3, 2], "x": 2.25, "y": 3},
+ {"matrix": [3, 3], "x": 3.25, "y": 3},
+ {"matrix": [3, 4], "x": 4.25, "y": 3},
+ {"matrix": [3, 5], "x": 5.25, "y": 3},
+ {"matrix": [3, 6], "x": 6.25, "y": 3},
+ {"matrix": [3, 7], "x": 7.25, "y": 3},
+ {"matrix": [3, 8], "x": 8.25, "y": 3},
+ {"matrix": [3, 9], "x": 9.25, "y": 3},
+ {"matrix": [3, 10], "x": 10.25, "y": 3},
+ {"matrix": [3, 11], "x": 11.25, "y": 3},
+ {"matrix": [3, 13], "x": 12.25, "y": 3, "w": 2.75},
+
+ {"matrix": [4, 0], "x": 0, "y": 4, "w": 1.25},
+ {"matrix": [4, 1], "x": 1.25, "y": 4, "w": 1.25},
+ {"matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.25},
+ {"matrix": [4, 5], "x": 3.75, "y": 4, "w": 6.25},
+ {"matrix": [4, 10], "x": 10, "y": 4, "w": 1.25},
+ {"matrix": [4, 11], "x": 11.25, "y": 4, "w": 1.25},
+ {"matrix": [4, 12], "x": 12.5, "y": 4, "w": 1.25},
+ {"matrix": [4, 13], "x": 13.75, "y": 4, "w": 1.25}
+ ]
+ },
+ "LAYOUT_60_iso_split_bs_rshift": {
+ "layout": [
+ {"matrix": [0, 0], "x": 0, "y": 0},
+ {"matrix": [0, 1], "x": 1, "y": 0},
+ {"matrix": [0, 2], "x": 2, "y": 0},
+ {"matrix": [0, 3], "x": 3, "y": 0},
+ {"matrix": [0, 4], "x": 4, "y": 0},
+ {"matrix": [0, 5], "x": 5, "y": 0},
+ {"matrix": [0, 6], "x": 6, "y": 0},
+ {"matrix": [0, 7], "x": 7, "y": 0},
+ {"matrix": [0, 8], "x": 8, "y": 0},
+ {"matrix": [0, 9], "x": 9, "y": 0},
+ {"matrix": [0, 10], "x": 10, "y": 0},
+ {"matrix": [0, 11], "x": 11, "y": 0},
+ {"matrix": [0, 12], "x": 12, "y": 0},
+ {"matrix": [0, 13], "x": 13, "y": 0},
+ {"matrix": [4, 9], "x": 14, "y": 0},
+
+ {"matrix": [1, 0], "x": 0, "y": 1, "w": 1.5},
+ {"matrix": [1, 1], "x": 1.5, "y": 1},
+ {"matrix": [1, 2], "x": 2.5, "y": 1},
+ {"matrix": [1, 3], "x": 3.5, "y": 1},
+ {"matrix": [1, 4], "x": 4.5, "y": 1},
+ {"matrix": [1, 5], "x": 5.5, "y": 1},
+ {"matrix": [1, 6], "x": 6.5, "y": 1},
+ {"matrix": [1, 7], "x": 7.5, "y": 1},
+ {"matrix": [1, 8], "x": 8.5, "y": 1},
+ {"matrix": [1, 9], "x": 9.5, "y": 1},
+ {"matrix": [1, 10], "x": 10.5, "y": 1},
+ {"matrix": [1, 11], "x": 11.5, "y": 1},
+ {"matrix": [1, 12], "x": 12.5, "y": 1},
+
+ {"matrix": [2, 0], "x": 0, "y": 2, "w": 1.75},
+ {"matrix": [2, 1], "x": 1.75, "y": 2},
+ {"matrix": [2, 2], "x": 2.75, "y": 2},
+ {"matrix": [2, 3], "x": 3.75, "y": 2},
+ {"matrix": [2, 4], "x": 4.75, "y": 2},
+ {"matrix": [2, 5], "x": 5.75, "y": 2},
+ {"matrix": [2, 6], "x": 6.75, "y": 2},
+ {"matrix": [2, 7], "x": 7.75, "y": 2},
+ {"matrix": [2, 8], "x": 8.75, "y": 2},
+ {"matrix": [2, 9], "x": 9.75, "y": 2},
+ {"matrix": [2, 10], "x": 10.75, "y": 2},
+ {"matrix": [2, 11], "x": 11.75, "y": 2},
+ {"matrix": [2, 12], "x": 12.75, "y": 2},
+ {"matrix": [2, 13], "x": 13.75, "y": 1, "w": 1.25, "h": 2},
+
+ {"matrix": [3, 0], "x": 0, "y": 3, "w": 1.25},
+ {"matrix": [3, 1], "x": 1.25, "y": 3},
+ {"matrix": [3, 2], "x": 2.25, "y": 3},
+ {"matrix": [3, 3], "x": 3.25, "y": 3},
+ {"matrix": [3, 4], "x": 4.25, "y": 3},
+ {"matrix": [3, 5], "x": 5.25, "y": 3},
+ {"matrix": [3, 6], "x": 6.25, "y": 3},
+ {"matrix": [3, 7], "x": 7.25, "y": 3},
+ {"matrix": [3, 8], "x": 8.25, "y": 3},
+ {"matrix": [3, 9], "x": 9.25, "y": 3},
+ {"matrix": [3, 10], "x": 10.25, "y": 3},
+ {"matrix": [3, 11], "x": 11.25, "y": 3},
+ {"matrix": [3, 13], "x": 12.25, "y": 3, "w": 1.75},
+ {"matrix": [3, 12], "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},
@@ -257,6 +742,146 @@
{"matrix": [4, 12], "x": 12.5, "y": 4, "w": 1.25},
{"matrix": [4, 13], "x": 13.75, "y": 4, "w": 1.25}
]
+ },
+ "LAYOUT_60_iso_tsangan": {
+ "layout": [
+ {"matrix": [0, 0], "x": 0, "y": 0},
+ {"matrix": [0, 1], "x": 1, "y": 0},
+ {"matrix": [0, 2], "x": 2, "y": 0},
+ {"matrix": [0, 3], "x": 3, "y": 0},
+ {"matrix": [0, 4], "x": 4, "y": 0},
+ {"matrix": [0, 5], "x": 5, "y": 0},
+ {"matrix": [0, 6], "x": 6, "y": 0},
+ {"matrix": [0, 7], "x": 7, "y": 0},
+ {"matrix": [0, 8], "x": 8, "y": 0},
+ {"matrix": [0, 9], "x": 9, "y": 0},
+ {"matrix": [0, 10], "x": 10, "y": 0},
+ {"matrix": [0, 11], "x": 11, "y": 0},
+ {"matrix": [0, 12], "x": 12, "y": 0},
+ {"matrix": [0, 13], "x": 13, "y": 0, "w": 2},
+
+ {"matrix": [1, 0], "x": 0, "y": 1, "w": 1.5},
+ {"matrix": [1, 1], "x": 1.5, "y": 1},
+ {"matrix": [1, 2], "x": 2.5, "y": 1},
+ {"matrix": [1, 3], "x": 3.5, "y": 1},
+ {"matrix": [1, 4], "x": 4.5, "y": 1},
+ {"matrix": [1, 5], "x": 5.5, "y": 1},
+ {"matrix": [1, 6], "x": 6.5, "y": 1},
+ {"matrix": [1, 7], "x": 7.5, "y": 1},
+ {"matrix": [1, 8], "x": 8.5, "y": 1},
+ {"matrix": [1, 9], "x": 9.5, "y": 1},
+ {"matrix": [1, 10], "x": 10.5, "y": 1},
+ {"matrix": [1, 11], "x": 11.5, "y": 1},
+ {"matrix": [1, 12], "x": 12.5, "y": 1},
+
+ {"matrix": [2, 0], "x": 0, "y": 2, "w": 1.75},
+ {"matrix": [2, 1], "x": 1.75, "y": 2},
+ {"matrix": [2, 2], "x": 2.75, "y": 2},
+ {"matrix": [2, 3], "x": 3.75, "y": 2},
+ {"matrix": [2, 4], "x": 4.75, "y": 2},
+ {"matrix": [2, 5], "x": 5.75, "y": 2},
+ {"matrix": [2, 6], "x": 6.75, "y": 2},
+ {"matrix": [2, 7], "x": 7.75, "y": 2},
+ {"matrix": [2, 8], "x": 8.75, "y": 2},
+ {"matrix": [2, 9], "x": 9.75, "y": 2},
+ {"matrix": [2, 10], "x": 10.75, "y": 2},
+ {"matrix": [2, 11], "x": 11.75, "y": 2},
+ {"matrix": [2, 12], "x": 12.75, "y": 2},
+ {"matrix": [2, 13], "x": 13.75, "y": 1, "w": 1.25, "h": 2},
+
+ {"matrix": [3, 0], "x": 0, "y": 3, "w": 1.25},
+ {"matrix": [3, 1], "x": 1.25, "y": 3},
+ {"matrix": [3, 2], "x": 2.25, "y": 3},
+ {"matrix": [3, 3], "x": 3.25, "y": 3},
+ {"matrix": [3, 4], "x": 4.25, "y": 3},
+ {"matrix": [3, 5], "x": 5.25, "y": 3},
+ {"matrix": [3, 6], "x": 6.25, "y": 3},
+ {"matrix": [3, 7], "x": 7.25, "y": 3},
+ {"matrix": [3, 8], "x": 8.25, "y": 3},
+ {"matrix": [3, 9], "x": 9.25, "y": 3},
+ {"matrix": [3, 10], "x": 10.25, "y": 3},
+ {"matrix": [3, 11], "x": 11.25, "y": 3},
+ {"matrix": [3, 13], "x": 12.25, "y": 3, "w": 2.75},
+
+ {"matrix": [4, 0], "x": 0, "y": 4, "w": 1.5},
+ {"matrix": [4, 1], "x": 1.5, "y": 4},
+ {"matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.5},
+ {"matrix": [4, 5], "x": 4, "y": 4, "w": 7},
+ {"matrix": [4, 11], "x": 11, "y": 4, "w": 1.5},
+ {"matrix": [4, 12], "x": 12.5, "y": 4},
+ {"matrix": [4, 13], "x": 13.5, "y": 4, "w": 1.5}
+ ]
+ },
+ "LAYOUT_60_iso_tsangan_split_bs_rshift": {
+ "layout": [
+ {"matrix": [0, 0], "x": 0, "y": 0},
+ {"matrix": [0, 1], "x": 1, "y": 0},
+ {"matrix": [0, 2], "x": 2, "y": 0},
+ {"matrix": [0, 3], "x": 3, "y": 0},
+ {"matrix": [0, 4], "x": 4, "y": 0},
+ {"matrix": [0, 5], "x": 5, "y": 0},
+ {"matrix": [0, 6], "x": 6, "y": 0},
+ {"matrix": [0, 7], "x": 7, "y": 0},
+ {"matrix": [0, 8], "x": 8, "y": 0},
+ {"matrix": [0, 9], "x": 9, "y": 0},
+ {"matrix": [0, 10], "x": 10, "y": 0},
+ {"matrix": [0, 11], "x": 11, "y": 0},
+ {"matrix": [0, 12], "x": 12, "y": 0},
+ {"matrix": [0, 13], "x": 13, "y": 0},
+ {"matrix": [4, 9], "x": 14, "y": 0},
+
+ {"matrix": [1, 0], "x": 0, "y": 1, "w": 1.5},
+ {"matrix": [1, 1], "x": 1.5, "y": 1},
+ {"matrix": [1, 2], "x": 2.5, "y": 1},
+ {"matrix": [1, 3], "x": 3.5, "y": 1},
+ {"matrix": [1, 4], "x": 4.5, "y": 1},
+ {"matrix": [1, 5], "x": 5.5, "y": 1},
+ {"matrix": [1, 6], "x": 6.5, "y": 1},
+ {"matrix": [1, 7], "x": 7.5, "y": 1},
+ {"matrix": [1, 8], "x": 8.5, "y": 1},
+ {"matrix": [1, 9], "x": 9.5, "y": 1},
+ {"matrix": [1, 10], "x": 10.5, "y": 1},
+ {"matrix": [1, 11], "x": 11.5, "y": 1},
+ {"matrix": [1, 12], "x": 12.5, "y": 1},
+
+ {"matrix": [2, 0], "x": 0, "y": 2, "w": 1.75},
+ {"matrix": [2, 1], "x": 1.75, "y": 2},
+ {"matrix": [2, 2], "x": 2.75, "y": 2},
+ {"matrix": [2, 3], "x": 3.75, "y": 2},
+ {"matrix": [2, 4], "x": 4.75, "y": 2},
+ {"matrix": [2, 5], "x": 5.75, "y": 2},
+ {"matrix": [2, 6], "x": 6.75, "y": 2},
+ {"matrix": [2, 7], "x": 7.75, "y": 2},
+ {"matrix": [2, 8], "x": 8.75, "y": 2},
+ {"matrix": [2, 9], "x": 9.75, "y": 2},
+ {"matrix": [2, 10], "x": 10.75, "y": 2},
+ {"matrix": [2, 11], "x": 11.75, "y": 2},
+ {"matrix": [2, 12], "x": 12.75, "y": 2},
+ {"matrix": [2, 13], "x": 13.75, "y": 1, "w": 1.25, "h": 2},
+
+ {"matrix": [3, 0], "x": 0, "y": 3, "w": 1.25},
+ {"matrix": [3, 1], "x": 1.25, "y": 3},
+ {"matrix": [3, 2], "x": 2.25, "y": 3},
+ {"matrix": [3, 3], "x": 3.25, "y": 3},
+ {"matrix": [3, 4], "x": 4.25, "y": 3},
+ {"matrix": [3, 5], "x": 5.25, "y": 3},
+ {"matrix": [3, 6], "x": 6.25, "y": 3},
+ {"matrix": [3, 7], "x": 7.25, "y": 3},
+ {"matrix": [3, 8], "x": 8.25, "y": 3},
+ {"matrix": [3, 9], "x": 9.25, "y": 3},
+ {"matrix": [3, 10], "x": 10.25, "y": 3},
+ {"matrix": [3, 11], "x": 11.25, "y": 3},
+ {"matrix": [3, 13], "x": 12.25, "y": 3, "w": 1.75},
+ {"matrix": [3, 12], "x": 14, "y": 3},
+
+ {"matrix": [4, 0], "x": 0, "y": 4, "w": 1.5},
+ {"matrix": [4, 1], "x": 1.5, "y": 4},
+ {"matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.5},
+ {"matrix": [4, 5], "x": 4, "y": 4, "w": 7},
+ {"matrix": [4, 11], "x": 11, "y": 4, "w": 1.5},
+ {"matrix": [4, 12], "x": 12.5, "y": 4},
+ {"matrix": [4, 13], "x": 13.5, "y": 4, "w": 1.5}
+ ]
}
}
}
diff --git a/keyboards/kc60/keymaps/dbroqua/keymap.c b/keyboards/kc60/keymaps/dbroqua/keymap.c
index ee489bbe91..22ef319103 100644
--- a/keyboards/kc60/keymaps/dbroqua/keymap.c
+++ b/keyboards/kc60/keymaps/dbroqua/keymap.c
@@ -1,82 +1,73 @@
#include QMK_KEYBOARD_H
-#define _QWERTY 0
-#define _FNCAPS 1
-#define _FNRIGHTSHIFT 2
-
-// Fillers to make layering more clear
-#define ______ KC_TRNS
-
-/*
- * | | |
- * | | |
- * | | |
- * | | |
- * | |
- */
+enum layer_names {
+ _QWERTY,
+ _FNCAPS,
+ _FNRIGHTSHIFT
+};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-/* Qwerty
- * ,-----------------------------------------------------------------------------------------.
- * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` |
- * |-----------------------------------------------------------------------------------------+
- * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Bksp |
- * |-----------------------------------------------------------------------------------------+
- * | Caps/FN1| A | S | D | F | G | H | J | K | L | ; | ' | Enter |
- * |-----------------------------------------------------------------------------------------+
- * | Shift | Z | X | C | V | B | N | M | , | . | / | Up | FN2 |
- * |-----------------------------------------------------------------------------------------+
- * | Ctrl | Gui | Alt | Space | AltGr | Left | Down | Right |
- * `-----------------------------------------------------------------------------------------'
- */
- [0] = LAYOUT( /* Basic QWERTY */
- KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS,
- KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC,
- LT(_FNCAPS, KC_CAPS), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT,
- KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MO(_FNRIGHTSHIFT), KC_UP,
- KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_GRV, KC_RALT, KC_LEFT, KC_DOWN, KC_RIGHT
- ),
+ /* Qwerty
+ * ,-----------------------------------------------------------------------------------------.
+ * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` |
+ * |-----------------------------------------------------------------------------------------+
+ * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Bksp |
+ * |-----------------------------------------------------------------------------------------+
+ * | Caps/FN1| A | S | D | F | G | H | J | K | L | ; | ' | Enter |
+ * |-----------------------------------------------------------------------------------------+
+ * | Shift | Z | X | C | V | B | N | M | , | . | / | Up | FN2 |
+ * |-----------------------------------------------------------------------------------------+
+ * | Ctrl | Gui | Alt | Space | AltGr | Left | Down | Right |
+ * `-----------------------------------------------------------------------------------------'
+ */
+ [0] = LAYOUT_all( /* Basic QWERTY */
+ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV,
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC,
+ LT(_FNCAPS, KC_CAPS), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT,
+ KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_UP, MO(_FNRIGHTSHIFT),
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_LEFT, KC_DOWN, KC_RIGHT
+ ),
-/* Layer 1
- * ,-----------------------------------------------------------------------------------------.
- * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Ins | Del |
- * |-----------------------------------------------------------------------------------------+
- * | | | | | | | | | | | | | | |
- * |-----------------------------------------------------------------------------------------+
- * | | | | | | | | Psc | | | | | |
- * |-----------------------------------------------------------------------------------------+
- * | | Led | Led+| Led-| | Mute| Vol+| Vol-| | | | Play | |
- * |-----------------------------------------------------------------------------------------+
- * | | | | | | Prev | Stop | Next |
- * `-----------------------------------------------------------------------------------------'
- */
- [_FNCAPS] = LAYOUT( /* Layer 1 */
- ______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS,
- ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______,
- ______, ______, ______, ______, ______, ______, ______, KC_PSCR,______, ______, ______, ______, ______, ______,
- ______, ______, BL_TOGG, BL_UP, BL_DOWN,______,KC_MUTE,KC_VOLU,KC_VOLD,______, ______, ______, ______,KC_MPLY,
- ______, ______, ______, ______, KC_DEL, ______, KC_MPRV, KC_MSTP, KC_MNXT
- ),
+ /* Layer 1
+ * ,-----------------------------------------------------------------------------------------.
+ * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Ins | Del |
+ * |-----------------------------------------------------------------------------------------+
+ * | | | | | | | | | | | | | | |
+ * |-----------------------------------------------------------------------------------------+
+ * | | | | | | | | Psc | | | | | |
+ * |-----------------------------------------------------------------------------------------+
+ * | | Led | Led+| Led-| | Mute| Vol+| Vol-| | | | Play | |
+ * |-----------------------------------------------------------------------------------------+
+ * | | | | | | Prev | Stop | Next |
+ * `-----------------------------------------------------------------------------------------'
+ */
+ [_FNCAPS] = LAYOUT_all( /* Layer 1 */
+ _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, KC_PSCR, _______, _______, _______, _______, _______, _______,
+ _______, _______, BL_TOGG, BL_UP, BL_DOWN, _______, KC_MUTE, KC_VOLU, KC_VOLD, _______, _______, _______, KC_MPLY, _______,
+ _______, _______, _______, _______, _______, KC_MPRV, KC_MSTP, KC_MNXT
+ ),
-/* Layer 2
- * ,-----------------------------------------------------------------------------------------.
- * | | | | | | | | | | | | | | | |
- * |-----------------------------------------------------------------------------------------+
- * | | | | | | | | | | | | | | |
- * |-----------------------------------------------------------------------------------------+
- * | | | | | | | | | | | | | |
- * |-----------------------------------------------------------------------------------------+
- * | | | | | | | | | | | | PgUp | |
- * |-----------------------------------------------------------------------------------------+
- * | | | | | | Home | PgDown| End |
- * `-----------------------------------------------------------------------------------------'
- */
- [_FNRIGHTSHIFT] = LAYOUT( /* Layer 2 */
- ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______,
- ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______,
- ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______,
- ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, KC_PGUP,
- ______, ______, ______, ______, ______, ______, KC_HOME,KC_PGDN,KC_END
- ),
+ /* Layer 2
+ * ,-----------------------------------------------------------------------------------------.
+ * | | | | | | | | | | | | | | | |
+ * |-----------------------------------------------------------------------------------------+
+ * | | | | | | | | | | | | | | |
+ * |-----------------------------------------------------------------------------------------+
+ * | | | | | | | | | | | | | |
+ * |-----------------------------------------------------------------------------------------+
+ * | | | | | | | | | | | | PgUp | |
+ * |-----------------------------------------------------------------------------------------+
+ * | | | | | | Home | PgDown| End |
+ * `-----------------------------------------------------------------------------------------'
+ */
+ [_FNRIGHTSHIFT] = LAYOUT_all( /* Layer 2 */
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, _______,
+ _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END
+ ),
};
diff --git a/keyboards/kc60/keymaps/dbroqua_hhkb/keymap.c b/keyboards/kc60/keymaps/dbroqua_hhkb/keymap.c
index be15be6174..2189e5bc5c 100644
--- a/keyboards/kc60/keymaps/dbroqua_hhkb/keymap.c
+++ b/keyboards/kc60/keymaps/dbroqua_hhkb/keymap.c
@@ -1,52 +1,51 @@
#include QMK_KEYBOARD_H
-#define _QWERTY 0
-#define _FN 1
-
-// Fillers to make layering more clear
-#define ______ KC_TRNS
+enum layer_names {
+ _QWERTY,
+ _FN
+};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-/* Qwerty
- * ,-----------------------------------------------------------------------------------------.
- * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` |
- * |-----------------------------------------------------------------------------------------+
- * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Bksp |
- * |-----------------------------------------------------------------------------------------+
- * | Ctrl | A | S | D | F | G | H | J | K | L | ; | ' | Enter |
- * |-----------------------------------------------------------------------------------------+
- * | Shift | Z | X | C | V | B | N | M | , | . | / | RShift | FN |
- * |-----------------------------------------------------------------------------------------+
- * | LGUI | LAlt | Space | RAlt | RGUI |
- * `-----------------------------------------------------------------'
- */
- [0] = LAYOUT( /* Basic QWERTY */
- KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS,
- KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC,
- KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT,
- KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MO(_FN), KC_RSFT,
- ______, KC_LGUI, KC_LALT, KC_SPC, KC_GRV, KC_RALT, KC_RGUI, ______, ______
- ),
+ /* Qwerty
+ * ,-----------------------------------------------------------------------------------------.
+ * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` |
+ * |-----------------------------------------------------------------------------------------+
+ * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Bksp |
+ * |-----------------------------------------------------------------------------------------+
+ * | Ctrl | A | S | D | F | G | H | J | K | L | ; | ' | Enter |
+ * |-----------------------------------------------------------------------------------------+
+ * | Shift | Z | X | C | V | B | N | M | , | . | / | RShift | FN |
+ * |-----------------------------------------------------------------------------------------+
+ * | LGUI | LAlt | Space | RAlt | RGUI |
+ * `-----------------------------------------------------------------'
+ */
+ [0] = LAYOUT_all( /* Basic QWERTY */
+ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV,
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC,
+ KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT,
+ KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_FN),
+ _______, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, _______, _______
+ ),
-/* Layer 1
- * ,-----------------------------------------------------------------------------------------.
- * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Ins | Del |
- * |-----------------------------------------------------------------------------------------+
- * | CAPS | Led | Led-| Led+| | | | | Psc | Slck| Paus| Up | | |
- * |-----------------------------------------------------------------------------------------+
- * | | Vol-| Vol+| Mute| | | * | / | Home| PgUp| Left|Right| |
- * |-----------------------------------------------------------------------------------------+
- * | | Prev| Play| Next| | | + | - | End |PgDn| Down| | |
- * |-----------------------------------------------------------------------------------------+
- * | | | | Stop | |
- * `-----------------------------------------------------------------'
- */
- [_FN] = LAYOUT( /* Layer 1 */
- ______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS,
- KC_CAPS, BL_TOGG, BL_UP, BL_DOWN,______, ______, ______, ______, KC_PSCR, KC_SCRL, KC_PAUS, KC_UP, ______, ______,
- ______, KC_VOLD, KC_VOLU, KC_MUTE, ______, ______, KC_PAST, KC_PSLS,KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, ______, ______,
- ______, ______, KC_MPRV, KC_MPLY, KC_MNXT,______,______,KC_PPLS,KC_PMNS,KC_END, KC_PGDN, KC_DOWN, ______,______,
- ______, ______, ______, ______, KC_DEL, KC_MSTP, ______, ______, ______
- )
+ /* Layer 1
+ * ,-----------------------------------------------------------------------------------------.
+ * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Ins | Del |
+ * |-----------------------------------------------------------------------------------------+
+ * | CAPS | Led | Led-| Led+| | | | | Psc | Slck| Paus| Up | | |
+ * |-----------------------------------------------------------------------------------------+
+ * | | Vol-| Vol+| Mute| | | * | / | Home| PgUp| Left|Right| |
+ * |-----------------------------------------------------------------------------------------+
+ * | | Prev| Play| Next| | | + | - | End |PgDn| Down| | |
+ * |-----------------------------------------------------------------------------------------+
+ * | | | | Stop | |
+ * `-----------------------------------------------------------------'
+ */
+ [_FN] = LAYOUT_all( /* Layer 1 */
+ _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL,
+ KC_CAPS, BL_TOGG, BL_UP, BL_DOWN, _______, _______, _______, _______, KC_PSCR, KC_SCRL, KC_PAUS, KC_UP, _______, _______,
+ _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, _______, _______,
+ _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, _______, _______,
+ _______, _______, _______, _______, KC_MSTP, _______, _______, _______
+ )
};
diff --git a/keyboards/kc60/keymaps/default/keymap.c b/keyboards/kc60/keymaps/default/keymap.c
index dfadce34d8..b135569e91 100644
--- a/keyboards/kc60/keymaps/default/keymap.c
+++ b/keyboards/kc60/keymaps/default/keymap.c
@@ -9,7 +9,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, LT(1, KC_APP), KC_RCTL
),
[1] = LAYOUT_all(
- QK_BOOT, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, XXXXXXX,
+ QK_BOOT, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, KC_UP, XXXXXXX, XXXXXXX, XXXXXXX, KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_PSCR, KC_SCRL, KC_PAUS,
XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, XXXXXXX, XXXXXXX, XXXXXXX,
_______, XXXXXXX, XXXXXXX, BL_DOWN, BL_TOGG, BL_UP, BL_BRTG, XXXXXXX, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, _______, _______,
diff --git a/keyboards/kc60/keymaps/sgoodwin/keymap.c b/keyboards/kc60/keymaps/sgoodwin/keymap.c
index 75091a1557..e62e89d016 100644
--- a/keyboards/kc60/keymaps/sgoodwin/keymap.c
+++ b/keyboards/kc60/keymaps/sgoodwin/keymap.c
@@ -2,29 +2,29 @@
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- /*
- * Toggles between colemak and qwerty by tapping the bottom right key.
- * Holding capslock key gives a layer like the KBParadise v60.
- */
- [0] = LAYOUT( /* Basic Colemak */
- KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC,
- KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSLS,
- MO(2), KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_NO, KC_ENT,
- KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_NO, KC_RSFT,
- KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_NO, KC_RGUI, KC_RALT, KC_RCTL, DF(1)
- ),
- [1] = LAYOUT( /* Basic QWERTY */
- KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC,
- KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
- MO(2), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT,
- KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_NO, KC_RSFT,
- KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_NO, KC_RGUI, KC_RALT, KC_RCTL, DF(0)
- ),
- [2] = LAYOUT( /* KBP v60-like arrows, media keys, etc */
- KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL,
- KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, BL_UP, BL_DOWN, BL_STEP,
- KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_NO, KC_TRNS,
- KC_TRNS, KC_NO, KC_MPRV, KC_MPLY, KC_MNXT, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_SPC, KC_NO, DB_TOGG, QK_BOOT, KC_TRNS, KC_NO
- ),
+ /*
+ * Toggles between colemak and qwerty by tapping the bottom right key.
+ * Holding capslock key gives a layer like the KBParadise v60.
+ */
+ [0] = LAYOUT_all( /* Basic Colemak */
+ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_NO,
+ KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSLS,
+ MO(2), KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_NO, KC_ENT,
+ KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_NO,
+ KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_RCTL, DF(1)
+ ),
+ [1] = LAYOUT_all( /* Basic QWERTY */
+ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_NO,
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
+ MO(2), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT,
+ KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_NO,
+ KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_RCTL, DF(0)
+ ),
+ [2] = LAYOUT_all( /* KBP v60-like arrows, media keys, etc */
+ 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_NO,
+ KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, BL_UP, BL_DOWN, BL_STEP,
+ KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_NO, KC_TRNS,
+ KC_TRNS, KC_NO, KC_MPRV, KC_MPLY, KC_MNXT, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_SPC, DB_TOGG, QK_BOOT, KC_TRNS, KC_NO
+ ),
};
diff --git a/keyboards/kc60/keymaps/stanleylai/config.h b/keyboards/kc60/keymaps/stanleylai/config.h
deleted file mode 100644
index b5024a6d02..0000000000
--- a/keyboards/kc60/keymaps/stanleylai/config.h
+++ /dev/null
@@ -1,3 +0,0 @@
-// Use configs from WS2812 enabled Keymap
-
-#include "../ws2812/config.h"
diff --git a/keyboards/kc60/keymaps/stanleylai/keymap.c b/keyboards/kc60/keymaps/stanleylai/keymap.c
index 9440ab1c78..6a1503ce64 100644
--- a/keyboards/kc60/keymaps/stanleylai/keymap.c
+++ b/keyboards/kc60/keymaps/stanleylai/keymap.c
@@ -5,45 +5,47 @@
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
// Layer names don't all need to be of the same length, obviously, and you can also skip them
// entirely and just use numbers.
-#define _BL 0
-#define _FL 1
-#define _RGBL 2
+enum layer_names {
+ _BL,
+ _FL,
+ _RGBL
+};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-// See base_layer.png and rgb_layer.png for layout reference
+ // See base_layer.png and rgb_layer.png for layout reference
-// Base Default Layer
-// Mac Modifier Layout. Use BootMagic to toggle GUI and ALT positions.
-[_BL] = LAYOUT(
- QK_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC,
- KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
- LT(_FL, KC_CAPS), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_NO, KC_ENT,
- KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, MO(_FL), KC_UP,
- KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_NO, KC_RGUI,KC_LEFT, KC_DOWN, KC_RGHT),
+ // Base Default Layer
+ // Mac Modifier Layout. Use BootMagic to toggle GUI and ALT positions.
+ [_BL] = LAYOUT_all(
+ QK_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_NO,
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
+ LT(_FL, KC_CAPS), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT,
+ KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_UP, MO(_FL),
+ KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_LEFT, KC_DOWN, KC_RGHT),
-// Function layer
-[_FL] = LAYOUT(
- KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL,
- KC_NO, KC_MPRV,KC_UP, KC_MNXT,KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_PSCR,KC_SCRL, KC_PAUS, KC_INS,
- KC_TRNS,KC_LEFT,KC_DOWN,KC_RGHT,KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
- KC_TRNS,KC_NO, KC_MUTE,KC_VOLD,KC_VOLU,KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, LT(_RGBL, KC_PGUP),
- KC_TRNS,KC_TRNS,KC_TRNS, KC_MPLY, KC_NO, KC_TRNS,KC_HOME, KC_PGDN, KC_END),
+ // Function layer
+ [_FL] = 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_NO,
+ KC_NO, KC_MPRV, KC_UP, KC_MNXT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_PSCR, KC_SCRL, KC_PAUS, KC_INS,
+ KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
+ KC_TRNS, KC_NO, KC_MUTE, KC_VOLD, KC_VOLU, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, LT(_RGBL, KC_PGUP), KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, KC_TRNS, KC_HOME, KC_PGDN, KC_END),
-// RGB Layer
-[_RGBL] = LAYOUT(
- #ifdef RGBLIGHT_ENABLE
- QK_BOOT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
- KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
- KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
- KC_TRNS,KC_NO, RGB_TOG,RGB_MOD,RGB_HUI,RGB_HUD,RGB_SAI,RGB_SAD,RGB_VAI,RGB_VAD,BL_STEP,BL_TOGG, KC_TRNS, KC_TRNS,
- KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_NO, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS
- #else
- QK_BOOT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
- KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
- KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
- KC_TRNS,KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, BL_STEP,BL_TOGG, KC_TRNS, KC_TRNS,
- KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_NO, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS
- #endif
- ),
+ // RGB Layer
+ [_RGBL] = LAYOUT_all(
+ #ifdef RGBLIGHT_ENABLE
+ QK_BOOT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
+ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
+ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
+ KC_TRNS, KC_NO, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, BL_STEP, BL_TOGG, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
+ #else
+ QK_BOOT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
+ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
+ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
+ KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, BL_STEP, BL_TOGG, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
+ #endif
+ ),
};
diff --git a/keyboards/kc60/keymaps/via/keymap.c b/keyboards/kc60/keymaps/via/keymap.c
index d8925172fd..877d62e04f 100644
--- a/keyboards/kc60/keymaps/via/keymap.c
+++ b/keyboards/kc60/keymaps/via/keymap.c
@@ -9,7 +9,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, LT(1, KC_APP), KC_RCTL
),
[1] = LAYOUT_all(
- QK_BOOT, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, XXXXXXX,
+ QK_BOOT, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, KC_UP, XXXXXXX, XXXXXXX, XXXXXXX, KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_PSCR, KC_SCRL, KC_PAUS,
XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, XXXXXXX, XXXXXXX, XXXXXXX,
_______, XXXXXXX, XXXXXXX, BL_DOWN, BL_TOGG, BL_UP, BL_BRTG, XXXXXXX, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, _______, _______,
diff --git a/keyboards/kc60/keymaps/wigguno/keymap.c b/keyboards/kc60/keymaps/wigguno/keymap.c
index 8d1ae5f1c5..ba4571c4e4 100644
--- a/keyboards/kc60/keymaps/wigguno/keymap.c
+++ b/keyboards/kc60/keymaps/wigguno/keymap.c
@@ -6,47 +6,47 @@
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- /* Basic QWERTY
- * ,-----------------------------------------------------------.
- * |Esc | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp |
- * |-----------------------------------------------------------|
- * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ |
- * |-----------------------------------------------------------|
- * |CAPS | A| S| D| F| G| H| J| K| L| ;| '|Return |
- * |-----------------------------------------------------------|
- * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift |
- * |-----------------------------------------------------------|
- * |Ctrl|Gui |Alt | Space |Alt |FN |Gui |Ctrl |
- * `-----------------------------------------------------------'
- */
- [0] = LAYOUT(
- KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC,
- KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
- KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT,
- KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_NO, KC_RSFT,
- KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_NO, KC_RALT, MO(1), KC_RGUI, KC_RCTL
- ),
+ /* Basic QWERTY
+ * ,-----------------------------------------------------------.
+ * |Esc | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp |
+ * |-----------------------------------------------------------|
+ * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ |
+ * |-----------------------------------------------------------|
+ * |CAPS | A| S| D| F| G| H| J| K| L| ;| '|Return |
+ * |-----------------------------------------------------------|
+ * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift |
+ * |-----------------------------------------------------------|
+ * |Ctrl|Gui |Alt | Space |Alt |FN |Gui |Ctrl |
+ * `-----------------------------------------------------------'
+ */
+ [0] = LAYOUT_all(
+ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_NO,
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
+ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT,
+ KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_NO,
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RGUI, KC_RCTL
+ ),
- /*
- * ,-----------------------------------------------------------.
- * | ` |F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12| Del |
- * |-----------------------------------------------------------|
- * | | | Up| | | | | | | | PS| | | |
- * |-----------------------------------------------------------|
- * | |Lft|Dwn|Rgt| |BL-|BL+| | | | | | |
- * |-----------------------------------------------------------|
- * | |Prv| PP|Nxt| | | | |Hom|End| | |
- * |-----------------------------------------------------------|
- * | Rst| | | BL | | | | |
- * `-----------------------------------------------------------'
- * PS = Print Screen
- * PP = Play/Pause
- */
- [1] = LAYOUT( /* Function Layer */
- 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_DELETE,
- KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, BL_DOWN, BL_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_END, KC_TRNS, KC_TRNS, KC_TRNS,
- QK_BOOT, KC_TRNS, KC_TRNS, BL_TOGG, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
- ),
+ /*
+ * ,-----------------------------------------------------------.
+ * | ` |F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12| Del |
+ * |-----------------------------------------------------------|
+ * | | | Up| | | | | | | | PS| | | |
+ * |-----------------------------------------------------------|
+ * | |Lft|Dwn|Rgt| |BL-|BL+| | | | | | |
+ * |-----------------------------------------------------------|
+ * | |Prv| PP|Nxt| | | | |Hom|End| | |
+ * |-----------------------------------------------------------|
+ * | Rst| | | BL | | | | |
+ * `-----------------------------------------------------------'
+ * PS = Print Screen
+ * PP = Play/Pause
+ */
+ [1] = LAYOUT_all( /* Function Layer */
+ 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_NO,
+ KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, BL_DOWN, BL_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_END, KC_TRNS, KC_TRNS, KC_TRNS,
+ QK_BOOT, KC_TRNS, KC_TRNS, BL_TOGG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
+ ),
};
diff --git a/keyboards/kc60/matrix_diagram.md b/keyboards/kc60/matrix_diagram.md
new file mode 100644
index 0000000000..d8d63ca5ec
--- /dev/null
+++ b/keyboards/kc60/matrix_diagram.md
@@ -0,0 +1,33 @@
+# Matrix Diagram for NPKC KC60
+
+```
+ ┌───────┐
+ 2u Backspace │0D │
+ └───────┘
+┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
+│00 │01 │02 │03 │04 │05 │06 │07 │08 │09 │0A │0B │0C │0D │49 │
+├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ ┌─────┐
+│10 │11 │12 │13 │14 │15 │16 │17 │18 │19 │1A │1B │1C │1D │ │ │
+├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ ┌──┴┐2D │ ISO Enter
+│20 │21 │22 │23 │24 │25 │26 │27 │28 │29 │2A │2B │2D │ │2C │ │
+├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ └───┴────┘
+│30 │31 │32 │33 │34 │35 │36 │37 │38 │39 │3A │3B │3D │3C │
+├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬┴───┤
+│40 │41 │42 │45 │4A │4B │4C │4D │
+└────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
+┌────────┐ ┌──────────┐
+│30 │ 2.25u LShift 2.75u RShift │3D │
+└────────┘ └──────────┘
+ ┌───┬──────┐
+ 1u/1.75u RShift (JIS) │3C │3D │
+ └───┴──────┘
+┌─────┬───┬─────┬───────────────────────────┬─────┬───┬─────┐
+│40 │41 │42 │45 │4B │4C │4D │ Tsangan/WKL/HHKB
+└─────┴───┴─────┴───────────────────────────┴─────┴───┴─────┘
+┌─────┬───┬─────┬───────────────────────┬─────┬───┬───┬─────┐
+│40 │41 │42 │45 │4A │4B │4C │4D │ 6u Spacebar
+└─────┴───┴─────┴───────────────────────┴─────┴───┴───┴─────┘
+ ┌───┬─────┬───────────────────────┬─────┬───┐
+ │41 │42 │45 │4A │4B │ True HHKB
+ └───┴─────┴───────────────────────┴─────┴───┘
+```
diff --git a/keyboards/keebio/cepstrum/rev1/info.json b/keyboards/keebio/cepstrum/rev1/info.json
index b5bf188c92..b4b764c889 100644
--- a/keyboards/keebio/cepstrum/rev1/info.json
+++ b/keyboards/keebio/cepstrum/rev1/info.json
@@ -121,6 +121,7 @@
}
},
"ws2812": {
+ "driver": "vendor",
"pin": "GP18"
},
"rgb_matrix": {
diff --git a/keyboards/keebio/cepstrum/rev1/rules.mk b/keyboards/keebio/cepstrum/rev1/rules.mk
index 8fb51ec82d..161ec22b16 100644
--- a/keyboards/keebio/cepstrum/rev1/rules.mk
+++ b/keyboards/keebio/cepstrum/rev1/rules.mk
@@ -1,2 +1 @@
SERIAL_DRIVER = vendor
-WS2812_DRIVER = vendor
diff --git a/keyboards/keebio/levinson/keymaps/xtonhasvim/keymap.c b/keyboards/keebio/levinson/keymaps/xtonhasvim/keymap.c
index b260f5d43c..c82bf06075 100644
--- a/keyboards/keebio/levinson/keymaps/xtonhasvim/keymap.c
+++ b/keyboards/keebio/levinson/keymaps/xtonhasvim/keymap.c
@@ -157,7 +157,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
#define C_ORG 0xFF, 0x93, 0x00
void rgbflag(uint8_t r, uint8_t g, uint8_t b, uint8_t rr, uint8_t gg, uint8_t bb) {
- LED_TYPE *target_led = user_rgb_mode ? shadowed_led : led;
+ rgb_led_t *target_led = user_rgb_mode ? shadowed_led : led;
for (int i = 0; i < RGBLED_NUM; i++) {
switch (i) {
case 10: case 11:
diff --git a/keyboards/keebsforall/coarse60/config.h b/keyboards/keebsforall/coarse60/config.h
index a9cd3b03b0..6ea9b9aae2 100644
--- a/keyboards/keebsforall/coarse60/config.h
+++ b/keyboards/keebsforall/coarse60/config.h
@@ -25,7 +25,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE
-#define WS2812_SPI SPID2
+#define WS2812_SPI_DRIVER SPID2
#define WS2812_SPI_MOSI_PAL_MODE 0
#define WS2812_SPI_SCK_PAL_MODE 0
#define WS2812_SPI_SCK_PIN B13
diff --git a/keyboards/keebwerk/mega/ansi/config.h b/keyboards/keebwerk/mega/ansi/config.h
index c02f298e84..a9734683f4 100755
--- a/keyboards/keebwerk/mega/ansi/config.h
+++ b/keyboards/keebwerk/mega/ansi/config.h
@@ -50,7 +50,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 }
#define RGB_BACKLIGHT_COLOR_2 { .h = 127, .s = 255 }
-#define DRIVER_COUNT 2
+#define IS31FL3733_DRIVER_COUNT 2
#define RGB_MATRIX_LED_COUNT 128
// These define which keys in the matrix are alphas/mods
diff --git a/keyboards/keebwerk/mega/ansi/rules.mk b/keyboards/keebwerk/mega/ansi/rules.mk
index 5546dc18d4..e257f3063f 100755
--- a/keyboards/keebwerk/mega/ansi/rules.mk
+++ b/keyboards/keebwerk/mega/ansi/rules.mk
@@ -24,4 +24,4 @@ SRC += keyboards/wilba_tech/wt_main.c \
keyboards/wilba_tech/wt_rgb_backlight.c \
drivers/led/issi/is31fl3733.c \
quantum/color.c
-QUANTUM_LIB_SRC += i2c_master.c
+I2C_DRIVER_REQUIRED = yes
diff --git a/keyboards/keyboardio/model01/rules.mk b/keyboards/keyboardio/model01/rules.mk
index e653ec5f73..29e1f4fea8 100644
--- a/keyboards/keyboardio/model01/rules.mk
+++ b/keyboards/keyboardio/model01/rules.mk
@@ -9,7 +9,7 @@ COMMAND_ENABLE = no # Commands for debug and configuration
NKRO_ENABLE = no # Enable N-Key Rollover
CUSTOM_MATRIX = yes
-QUANTUM_LIB_SRC += i2c_master.c
+I2C_DRIVER_REQUIRED = yes
SRC += leds.c \
matrix.c
diff --git a/keyboards/keychron/c1_pro/ansi/rgb/config.h b/keyboards/keychron/c1_pro/ansi/rgb/config.h
index a103d190d0..f2779f2bb9 100644
--- a/keyboards/keychron/c1_pro/ansi/rgb/config.h
+++ b/keyboards/keychron/c1_pro/ansi/rgb/config.h
@@ -20,19 +20,18 @@
// #define MATRIX_UNSELECT_DRIVE_HIGH
/* RGB Matrix Driver Configuration */
-#define DRIVER_COUNT 2
-#define DRIVER_ADDR_1 0b1110111
-#define DRIVER_ADDR_2 0b1110100
+#define SNLED27351_DRIVER_COUNT 2
+#define DRIVER_ADDR_1 SNLED27351_I2C_ADDRESS_VDDIO
+#define DRIVER_ADDR_2 SNLED27351_I2C_ADDRESS_GND
/* RGB Matrix Configuration */
#define DRIVER_1_LED_TOTAL 49
#define DRIVER_2_LED_TOTAL 39
#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
-/* Scan phase of led driver set as MSKPHASE_9CHANNEL(defined as 0x03 in CKLED2001.h) */
-#define PHASE_CHANNEL MSKPHASE_9CHANNEL
+#define SNLED27351_PHASE_CHANNEL SNLED27351_MSKPHASE_9CHANNEL
/* Set led driver current */
-#define CKLED2001_CURRENT_TUNE \
+#define SNLED27351_CURRENT_TUNE \
{ 0x9D, 0x9D, 0x44, 0x9D, 0x9D, 0x44, 0x9D, 0x9D, 0x44, 0x9D, 0x9D, 0x44 }
/* turn off effects when suspended */
diff --git a/keyboards/keychron/c1_pro/ansi/rgb/info.json b/keyboards/keychron/c1_pro/ansi/rgb/info.json
index c6011a2837..fcd805706b 100644
--- a/keyboards/keychron/c1_pro/ansi/rgb/info.json
+++ b/keyboards/keychron/c1_pro/ansi/rgb/info.json
@@ -105,7 +105,7 @@
}
},
"rgb_matrix": {
- "driver": "ckled2001",
+ "driver": "snled27351",
"animations": {
"breathing": true,
"band_spiral_val": true,
diff --git a/keyboards/keychron/c1_pro/ansi/rgb/rgb.c b/keyboards/keychron/c1_pro/ansi/rgb/rgb.c
index 04565f3b01..c04e82a44e 100644
--- a/keyboards/keychron/c1_pro/ansi/rgb/rgb.c
+++ b/keyboards/keychron/c1_pro/ansi/rgb/rgb.c
@@ -18,8 +18,8 @@
// clang-format off
#ifdef RGB_MATRIX_ENABLE
-const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to CKLED2001 manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | R location
* | | G location
diff --git a/keyboards/keychron/c1_pro/ansi/white/config.h b/keyboards/keychron/c1_pro/ansi/white/config.h
index dd3e1da477..430cb68a8e 100644
--- a/keyboards/keychron/c1_pro/ansi/white/config.h
+++ b/keyboards/keychron/c1_pro/ansi/white/config.h
@@ -20,16 +20,15 @@
// #define MATRIX_UNSELECT_DRIVE_HIGH
/* LED Matrix Driver Configuration */
-#define DRIVER_COUNT 1
-#define DRIVER_ADDR_1 0b1110100
+#define SNLED27351_DRIVER_COUNT 1
+#define DRIVER_ADDR_1 SNLED27351_I2C_ADDRESS_GND
/* LED Matrix Configuration */
#define LED_MATRIX_LED_COUNT 90
-/* Scan phase of led driver set as MSKPHASE_9CHANNEL(defined as 0x03 in CKLED2001.h) */
-#define PHASE_CHANNEL MSKPHASE_9CHANNEL
+#define SNLED27351_PHASE_CHANNEL SNLED27351_MSKPHASE_9CHANNEL
/* Set led driver current */
-#define CKLED2001_CURRENT_TUNE \
+#define SNLED27351_CURRENT_TUNE \
{ 0x9D, 0x9D, 0x44, 0x9D, 0x9D, 0x44, 0x9D, 0x9D, 0x44, 0x9D, 0x9D, 0x44 }
/* turn off effects when suspended */
diff --git a/keyboards/keychron/c1_pro/ansi/white/info.json b/keyboards/keychron/c1_pro/ansi/white/info.json
index 070ed6c427..4a6c6e2b8d 100644
--- a/keyboards/keychron/c1_pro/ansi/white/info.json
+++ b/keyboards/keychron/c1_pro/ansi/white/info.json
@@ -105,7 +105,7 @@
}
},
"led_matrix": {
- "driver": "ckled2001",
+ "driver": "snled27351",
"animations": {
"none": true,
"solid": true,
diff --git a/keyboards/keychron/c1_pro/ansi/white/white.c b/keyboards/keychron/c1_pro/ansi/white/white.c
index 72e9ad4db1..15f291e80c 100644
--- a/keyboards/keychron/c1_pro/ansi/white/white.c
+++ b/keyboards/keychron/c1_pro/ansi/white/white.c
@@ -18,8 +18,8 @@
// clang-format off
#ifdef LED_MATRIX_ENABLE
-const ckled2001_led PROGMEM g_ckled2001_leds[LED_MATRIX_LED_COUNT] = {
-/* Refer to CKLED2001 manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[LED_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | LED address
* | | */
diff --git a/keyboards/keychron/c2_pro/ansi/rgb/config.h b/keyboards/keychron/c2_pro/ansi/rgb/config.h
index d62b756f5a..673e8e438e 100644
--- a/keyboards/keychron/c2_pro/ansi/rgb/config.h
+++ b/keyboards/keychron/c2_pro/ansi/rgb/config.h
@@ -17,12 +17,12 @@
#pragma once
/* RGB Matrix Driver Configuration */
-#define DRIVER_COUNT 2
-#define DRIVER_ADDR_1 0b1110111
-#define DRIVER_ADDR_2 0b1110100
+#define SNLED27351_DRIVER_COUNT 2
+#define DRIVER_ADDR_1 SNLED27351_I2C_ADDRESS_VDDIO
+#define DRIVER_ADDR_2 SNLED27351_I2C_ADDRESS_GND
/* Set LED driver current */
-#define CKLED2001_CURRENT_TUNE \
+#define SNLED27351_CURRENT_TUNE \
{ 0xAA, 0xAA, 0x56, 0xAA, 0xAA, 0x56, 0xAA, 0xAA, 0x56, 0xAA, 0xAA, 0x56 }
/* RGB Matrix Configuration */
diff --git a/keyboards/keychron/c2_pro/ansi/rgb/info.json b/keyboards/keychron/c2_pro/ansi/rgb/info.json
index e527af3371..1eee0ee1cd 100644
--- a/keyboards/keychron/c2_pro/ansi/rgb/info.json
+++ b/keyboards/keychron/c2_pro/ansi/rgb/info.json
@@ -122,7 +122,7 @@
}
},
"rgb_matrix": {
- "driver": "ckled2001",
+ "driver": "snled27351",
"animations": {
"breathing": true,
"band_spiral_val": true,
diff --git a/keyboards/keychron/c2_pro/ansi/rgb/rgb.c b/keyboards/keychron/c2_pro/ansi/rgb/rgb.c
index 998933081f..d42c2de39e 100644
--- a/keyboards/keychron/c2_pro/ansi/rgb/rgb.c
+++ b/keyboards/keychron/c2_pro/ansi/rgb/rgb.c
@@ -17,8 +17,8 @@
#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
-const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to CKLED2001 manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | R location
* | | G location
diff --git a/keyboards/keychron/c2_pro/ansi/white/config.h b/keyboards/keychron/c2_pro/ansi/white/config.h
index d2a0e27b57..9945901527 100644
--- a/keyboards/keychron/c2_pro/ansi/white/config.h
+++ b/keyboards/keychron/c2_pro/ansi/white/config.h
@@ -17,11 +17,11 @@
#pragma once
/* LED Matrix Driver Configuration */
-#define DRIVER_COUNT 1
-#define DRIVER_ADDR_1 0b1110100
+#define SNLED27351_DRIVER_COUNT 1
+#define DRIVER_ADDR_1 SNLED27351_I2C_ADDRESS_GND
/* Set LED driver current */
-#define CKLED2001_CURRENT_TUNE \
+#define SNLED27351_CURRENT_TUNE \
{ 0xA0, 0xA0, 0xA0, 0xA0, 0xA0, 0xA0, 0xA0, 0xA0, 0xA0, 0xA0, 0xA0, 0xA0 }
/* LED Matrix Configuration */
diff --git a/keyboards/keychron/c2_pro/ansi/white/info.json b/keyboards/keychron/c2_pro/ansi/white/info.json
index dc58d1943b..4d9b1e12b8 100644
--- a/keyboards/keychron/c2_pro/ansi/white/info.json
+++ b/keyboards/keychron/c2_pro/ansi/white/info.json
@@ -122,7 +122,7 @@
}
},
"led_matrix": {
- "driver": "ckled2001",
+ "driver": "snled27351",
"animations": {
"none": true,
"solid": true,
diff --git a/keyboards/keychron/c2_pro/ansi/white/white.c b/keyboards/keychron/c2_pro/ansi/white/white.c
index 963ac8755f..9c75e73c6d 100644
--- a/keyboards/keychron/c2_pro/ansi/white/white.c
+++ b/keyboards/keychron/c2_pro/ansi/white/white.c
@@ -18,8 +18,8 @@
// clang-format off
#ifdef LED_MATRIX_ENABLE
-const ckled2001_led PROGMEM g_ckled2001_leds[LED_MATRIX_LED_COUNT] = {
-/* Refer to CKLED2001 manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[LED_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | LED address
* | | */
diff --git a/keyboards/keychron/q0/rev_0130/rev_0130.c b/keyboards/keychron/q0/base/base.c
index ffe82a6d8c..05803234c0 100644
--- a/keyboards/keychron/q0/rev_0130/rev_0130.c
+++ b/keyboards/keychron/q0/base/base.c
@@ -20,8 +20,8 @@
// clang-format off
-const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to CKLED manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | R location
* | | G location
diff --git a/keyboards/keychron/q0/rev_0130/config.h b/keyboards/keychron/q0/base/config.h
index 12ecfe1356..566f808762 100644
--- a/keyboards/keychron/q0/rev_0130/config.h
+++ b/keyboards/keychron/q0/base/config.h
@@ -17,12 +17,11 @@
#pragma once
/* RGB Matrix Driver Configuration */
-#define DRIVER_COUNT 1
-#define DRIVER_ADDR_1 0b1110100
+#define SNLED27351_DRIVER_COUNT 1
+#define DRIVER_ADDR_1 SNLED27351_I2C_ADDRESS_GND
/* RGB Matrix Configuration */
-#define DRIVER_1_LED_TOTAL 21
-#define RGB_MATRIX_LED_COUNT DRIVER_1_LED_TOTAL
+#define RGB_MATRIX_LED_COUNT 21
/* Enable num-lock LED */
#define NUM_LOCK_LED_INDEX 4
diff --git a/keyboards/keychron/q0/rev_0130/info.json b/keyboards/keychron/q0/base/info.json
index f6225c884a..ad89cf84da 100644
--- a/keyboards/keychron/q0/rev_0130/info.json
+++ b/keyboards/keychron/q0/base/info.json
@@ -1,58 +1,14 @@
{
"keyboard_name": "Q0",
- "manufacturer": "Keychron",
- "url": "https://github.com/Keychron",
- "maintainer": "lalalademaxiya1",
"usb": {
- "vid": "0x3434",
"pid": "0x0130",
- "device_version": "1.0.2",
- "force_nkro": true
+ "device_version": "1.0.2"
},
"matrix_pins": {
"cols": ["A5", "A6", "A7", "B0"],
"rows": ["B5", "B4", "B3", "A15", "A14", "A13"]
},
- "features": {
- "audio": false,
- "backlight": false,
- "bootmagic": true,
- "command": false,
- "console": false,
- "extrakey": true,
- "mousekey": true,
- "nkro": true,
- "rgb_matrix": true,
- "rgblight": false
- },
- "diode_direction": "ROW2COL",
- "processor": "STM32L432",
- "bootloader": "stm32-dfu",
"rgb_matrix": {
- "driver": "ckled2001",
- "animations": {
- "band_spiral_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,
- "dual_beacon": true,
- "rainbow_beacon": true,
- "jellybean_raindrops": true,
- "pixel_rain": true,
- "typing_heatmap": true,
- "digital_rain": true,
- "solid_reactive_simple": true,
- "solid_reactive_multiwide": true,
- "solid_reactive_multinexus": true,
- "splash": true,
- "solid_splash": true
- },
"center_point": [56, 16],
"layout": [
{"flags": 1, "matrix": [0, 0], "x": 0, "y": 0},
@@ -83,6 +39,7 @@
{"flags": 1, "matrix": [4, 3], "x": 112, "y": 29}
]
},
+ "community_layouts": ["numpad_6x4"],
"layouts": {
"LAYOUT_numpad_6x4": {
"layout": [
diff --git a/keyboards/keychron/q0/rev_0130/keymaps/default/keymap.c b/keyboards/keychron/q0/base/keymaps/default/keymap.c
index 387ff2d686..387ff2d686 100644
--- a/keyboards/keychron/q0/rev_0130/keymaps/default/keymap.c
+++ b/keyboards/keychron/q0/base/keymaps/default/keymap.c
diff --git a/keyboards/keychron/q0/rev_0130/keymaps/keychron/keymap.c b/keyboards/keychron/q0/base/keymaps/keychron/keymap.c
index 73826716fc..73826716fc 100644
--- a/keyboards/keychron/q0/rev_0130/keymaps/keychron/keymap.c
+++ b/keyboards/keychron/q0/base/keymaps/keychron/keymap.c
diff --git a/keyboards/keychron/q0/rev_0130/keymaps/keychron/rules.mk b/keyboards/keychron/q0/base/keymaps/keychron/rules.mk
index 495e8907b4..495e8907b4 100644
--- a/keyboards/keychron/q0/rev_0130/keymaps/keychron/rules.mk
+++ b/keyboards/keychron/q0/base/keymaps/keychron/rules.mk
diff --git a/keyboards/keychron/q0/rev_0130/keymaps/via/keymap.c b/keyboards/keychron/q0/base/keymaps/via/keymap.c
index 32fd198cf0..32fd198cf0 100644
--- a/keyboards/keychron/q0/rev_0130/keymaps/via/keymap.c
+++ b/keyboards/keychron/q0/base/keymaps/via/keymap.c
diff --git a/keyboards/keychron/q0/rev_0130/keymaps/via/rules.mk b/keyboards/keychron/q0/base/keymaps/via/rules.mk
index 1e5b99807c..1e5b99807c 100644
--- a/keyboards/keychron/q0/rev_0130/keymaps/via/rules.mk
+++ b/keyboards/keychron/q0/base/keymaps/via/rules.mk
diff --git a/keyboards/keychron/q0/rev_0130/readme.md b/keyboards/keychron/q0/base/readme.md
index a6db5bc015..a6db5bc015 100644
--- a/keyboards/keychron/q0/rev_0130/readme.md
+++ b/keyboards/keychron/q0/base/readme.md
diff --git a/keyboards/keychron/q0/base/rules.mk b/keyboards/keychron/q0/base/rules.mk
new file mode 100644
index 0000000000..7ff128fa69
--- /dev/null
+++ b/keyboards/keychron/q0/base/rules.mk
@@ -0,0 +1 @@
+# This file intentionally left blank \ No newline at end of file
diff --git a/keyboards/keychron/q0/config.h b/keyboards/keychron/q0/config.h
index c0366b1ed8..24b629a520 100644
--- a/keyboards/keychron/q0/config.h
+++ b/keyboards/keychron/q0/config.h
@@ -16,14 +16,10 @@
#pragma once
-#define CKLED2001_CURRENT_TUNE { 0xFF, 0xFF, 0x70, 0xFF, 0xFF, 0x70, 0xFF, 0xFF, 0x70, 0xFF, 0xFF, 0x70 }
+#define SNLED27351_CURRENT_TUNE { 0xFF, 0xFF, 0x70, 0xFF, 0xFF, 0x70, 0xFF, 0xFF, 0x70, 0xFF, 0xFF, 0x70 }
/* turn off effects when suspended */
#define RGB_DISABLE_WHEN_USB_SUSPENDED
-/* EEPROM Driver Configuration */
-#define WEAR_LEVELING_LOGICAL_SIZE 2048
-#define WEAR_LEVELING_BACKING_SIZE (WEAR_LEVELING_LOGICAL_SIZE * 2)
-
#define RGB_MATRIX_KEYPRESSES
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS \ No newline at end of file
diff --git a/keyboards/keychron/q0/info.json b/keyboards/keychron/q0/info.json
new file mode 100644
index 0000000000..70a726c520
--- /dev/null
+++ b/keyboards/keychron/q0/info.json
@@ -0,0 +1,52 @@
+{
+ "manufacturer": "Keychron",
+ "maintainer": "lalalademaxiya1",
+ "bootloader": "stm32-dfu",
+ "diode_direction": "ROW2COL",
+ "eeprom": {
+ "wear_leveling": {
+ "backing_size": 4096
+ }
+ },
+ "features": {
+ "bootmagic": true,
+ "command": false,
+ "console": false,
+ "extrakey": true,
+ "mousekey": true,
+ "nkro": true,
+ "rgb_matrix": true
+ },
+ "processor": "STM32L432",
+ "rgb_matrix": {
+ "animations": {
+ "band_spiral_val": true,
+ "breathing": true,
+ "cycle_all": true,
+ "cycle_left_right": 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,
+ "jellybean_raindrops": true,
+ "pixel_rain": true,
+ "rainbow_beacon": true,
+ "rainbow_moving_chevron": true,
+ "solid_reactive_multinexus": true,
+ "solid_reactive_multiwide": true,
+ "solid_reactive_simple": true,
+ "solid_splash": true,
+ "splash": true,
+ "typing_heatmap": true
+ },
+ "driver": "snled27351"
+ },
+ "url": "https://github.com/Keychron",
+ "usb": {
+ "force_nkro": true,
+ "vid": "0x3434"
+ }
+} \ No newline at end of file
diff --git a/keyboards/keychron/q0/rev_0131/config.h b/keyboards/keychron/q0/plus/config.h
index e4c5c2d3fc..1c47234f12 100644
--- a/keyboards/keychron/q0/rev_0131/config.h
+++ b/keyboards/keychron/q0/plus/config.h
@@ -17,18 +17,16 @@
#pragma once
/* RGB Matrix Driver Configuration */
-#define DRIVER_COUNT 1
-#define DRIVER_ADDR_1 0b1110111
+#define SNLED27351_DRIVER_COUNT 1
+#define DRIVER_ADDR_1 SNLED27351_I2C_ADDRESS_VDDIO
/* RGB Matrix Configuration */
-#define DRIVER_1_LED_TOTAL 26
-#define RGB_MATRIX_LED_COUNT DRIVER_1_LED_TOTAL
+#define RGB_MATRIX_LED_COUNT 26
-/* Scan phase of led driver set as MSKPHASE_9CHANNEL(defined as 0x03 in CKLED2001.h) */
-#define PHASE_CHANNEL MSKPHASE_9CHANNEL
+#define SNLED27351_PHASE_CHANNEL SNLED27351_MSKPHASE_9CHANNEL
+
+/* Encoder Configuration*/
+#define ENCODER_DEFAULT_POS 0x3
/* Enable num-lock LED */
#define NUM_LOCK_LED_INDEX 5
-
-/* Encoder Configuration */
-#define ENCODER_DEFAULT_POS 0x3
diff --git a/keyboards/keychron/q0/rev_0131/info.json b/keyboards/keychron/q0/plus/info.json
index c569e498f4..b187a79139 100644
--- a/keyboards/keychron/q0/rev_0131/info.json
+++ b/keyboards/keychron/q0/plus/info.json
@@ -1,33 +1,15 @@
{
"keyboard_name": "Keychron Q0 Plus",
- "manufacturer": "Keychron",
- "url": "https://github.com/Keychron",
- "maintainer": "lalalademaxiya1",
"usb": {
- "vid": "0x3434",
"pid": "0x0131",
- "device_version": "1.0.0",
- "force_nkro": true
+ "device_version": "1.0.0"
},
"matrix_pins": {
"cols": ["C14", "C15", "A0", "A1", "A2"],
"rows": ["B5", "B4", "B3", "A15", "A14", "A13"]
},
- "features": {
- "audio": false,
- "backlight": false,
- "bootmagic": true,
- "command": false,
- "console": false,
- "encoder": true,
- "extrakey": true,
- "mousekey": true,
- "nkro": true,
- "rgb_matrix": true,
- "rgblight": false
- },
- "diode_direction": "ROW2COL",
"encoder": {
+ "enabled": true,
"rotary": [
{"pin_a": "A3", "pin_b": "A4"}
]
@@ -35,33 +17,7 @@
"bootmagic": {
"matrix": [0, 1]
},
- "processor": "STM32L432",
- "bootloader": "stm32-dfu",
"rgb_matrix": {
- "driver": "ckled2001",
- "animations": {
- "band_spiral_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,
- "dual_beacon": true,
- "rainbow_beacon": true,
- "jellybean_raindrops": true,
- "pixel_rain": true,
- "typing_heatmap": true,
- "digital_rain": true,
- "solid_reactive_simple": true,
- "solid_reactive_multiwide": true,
- "solid_reactive_multinexus": true,
- "splash": true,
- "solid_splash": true
- },
"layout": [
{"flags": 1, "matrix": [0, 1], "x": 56, "y": 0},
{"flags": 1, "matrix": [0, 2], "x": 112, "y": 0},
@@ -96,6 +52,7 @@
{"flags": 1, "matrix": [5, 3], "x": 168, "y": 64}
]
},
+ "community_layouts": ["numpad_6x5"],
"layouts": {
"LAYOUT_numpad_6x5": {
"layout": [
diff --git a/keyboards/keychron/q0/rev_0131/keymaps/default/keymap.c b/keyboards/keychron/q0/plus/keymaps/default/keymap.c
index 4e281d4d7d..4e281d4d7d 100644
--- a/keyboards/keychron/q0/rev_0131/keymaps/default/keymap.c
+++ b/keyboards/keychron/q0/plus/keymaps/default/keymap.c
diff --git a/keyboards/keychron/q0/rev_0131/keymaps/default/rules.mk b/keyboards/keychron/q0/plus/keymaps/default/rules.mk
index ee32568148..ee32568148 100644
--- a/keyboards/keychron/q0/rev_0131/keymaps/default/rules.mk
+++ b/keyboards/keychron/q0/plus/keymaps/default/rules.mk
diff --git a/keyboards/keychron/q0/rev_0131/keymaps/keychron/keymap.c b/keyboards/keychron/q0/plus/keymaps/keychron/keymap.c
index 795c275543..795c275543 100644
--- a/keyboards/keychron/q0/rev_0131/keymaps/keychron/keymap.c
+++ b/keyboards/keychron/q0/plus/keymaps/keychron/keymap.c
diff --git a/keyboards/keychron/q0/rev_0131/keymaps/keychron/rules.mk b/keyboards/keychron/q0/plus/keymaps/keychron/rules.mk
index 9cf1a9b56c..9cf1a9b56c 100644
--- a/keyboards/keychron/q0/rev_0131/keymaps/keychron/rules.mk
+++ b/keyboards/keychron/q0/plus/keymaps/keychron/rules.mk
diff --git a/keyboards/keychron/q0/rev_0131/keymaps/via/keymap.c b/keyboards/keychron/q0/plus/keymaps/via/keymap.c
index 935d3edb76..935d3edb76 100644
--- a/keyboards/keychron/q0/rev_0131/keymaps/via/keymap.c
+++ b/keyboards/keychron/q0/plus/keymaps/via/keymap.c
diff --git a/keyboards/keychron/q0/rev_0131/keymaps/via/rules.mk b/keyboards/keychron/q0/plus/keymaps/via/rules.mk
index f1adcab005..f1adcab005 100644
--- a/keyboards/keychron/q0/rev_0131/keymaps/via/rules.mk
+++ b/keyboards/keychron/q0/plus/keymaps/via/rules.mk
diff --git a/keyboards/keychron/q0/rev_0131/rev_0131.c b/keyboards/keychron/q0/plus/plus.c
index 282c511ce2..0466e1a584 100644
--- a/keyboards/keychron/q0/rev_0131/rev_0131.c
+++ b/keyboards/keychron/q0/plus/plus.c
@@ -20,8 +20,8 @@
// clang-format off
-const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to CKLED manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | R location
* | | G location
diff --git a/keyboards/keychron/q0/plus/readme.md b/keyboards/keychron/q0/plus/readme.md
new file mode 100644
index 0000000000..6cc6e263f4
--- /dev/null
+++ b/keyboards/keychron/q0/plus/readme.md
@@ -0,0 +1,12 @@
+# Keychron Q0 Plus
+
+![Keychron Q0 Plus](https://i.imgur.com/EDbfVVOh.jpg)
+
+* Keyboard Maintainer: [Keychron](https://github.com/keychron)
+* Hardware Supported: Keychron Q0 Plus
+* Hardware Availability: [Keychron Q0 Plus QMK Custom Number Pad](https://www.keychron.com/products/keychron-q0-plus-qmk-custom-number-pad)
+
+1. The name of this keyboard is "Keychron Q0 Plus"
+2. Enables EC11 rotary encoder
+ - Turn clockwise to increase volume and turn anti-clockwise to decrease volume
+ - Press the knob button to mute
diff --git a/keyboards/keychron/q0/plus/rules.mk b/keyboards/keychron/q0/plus/rules.mk
new file mode 100644
index 0000000000..7ff128fa69
--- /dev/null
+++ b/keyboards/keychron/q0/plus/rules.mk
@@ -0,0 +1 @@
+# This file intentionally left blank \ No newline at end of file
diff --git a/keyboards/keychron/q0/readme.md b/keyboards/keychron/q0/readme.md
index d0180d386e..aa6d109a29 100644
--- a/keyboards/keychron/q0/readme.md
+++ b/keyboards/keychron/q0/readme.md
@@ -1,18 +1,22 @@
# Keychron Q0
+![Keychron Q0](https://i.imgur.com/cLbEiZ0h.jpg)
+
A customizable number keypad.
* Keyboard Maintainer: [Keychron](https://github.com/keychron)
* Hardware Supported: Keychron Q0
-* Hardware Availability: [Keychron](https://www.keychron.com)
+* Hardware Availability: [Keychron Q0 QMK Custom Number Pad](https://www.keychron.com/products/keychron-q0-qmk-custom-number-pad)
Make example for this keyboard (after setting up your build environment):
- make keychron/q0/rev_0130:default
+ make keychron/q0/base:default
+ make keychron/q0/plus:default
Flashing example for this keyboard:
- make keychron/q0/rev_0130:default:flash
+ make keychron/q0/base:default:flash
+ make keychron/q0/plus:default:flash
**Reset Key**: Hold down the key located at *K00*, commonly programmed as *Esc* while plugging in the keyboard.
diff --git a/keyboards/keychron/q0/rev_0130/rules.mk b/keyboards/keychron/q0/rev_0130/rules.mk
deleted file mode 100644
index f6868e88e3..0000000000
--- a/keyboards/keychron/q0/rev_0130/rules.mk
+++ /dev/null
@@ -1,3 +0,0 @@
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = embedded_flash
-
diff --git a/keyboards/keychron/q0/rev_0131/readme.md b/keyboards/keychron/q0/rev_0131/readme.md
deleted file mode 100644
index df07c40e49..0000000000
--- a/keyboards/keychron/q0/rev_0131/readme.md
+++ /dev/null
@@ -1,6 +0,0 @@
-# The enhanced version with encoder of the Keychron Q0
-
-- The name of this keyboard is "Q0 Plus"
-- Enable EC11 rotary encoder
-- Turn clockwise to increase volume and turn anti-clockwise to decrease volume
-- Press the knob button to mute
diff --git a/keyboards/keychron/q0/rev_0131/rules.mk b/keyboards/keychron/q0/rev_0131/rules.mk
deleted file mode 100644
index f6868e88e3..0000000000
--- a/keyboards/keychron/q0/rev_0131/rules.mk
+++ /dev/null
@@ -1,3 +0,0 @@
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = embedded_flash
-
diff --git a/keyboards/keychron/q1/ansi/info.json b/keyboards/keychron/q1/ansi/info.json
deleted file mode 100644
index 8ff2075747..0000000000
--- a/keyboards/keychron/q1/ansi/info.json
+++ /dev/null
@@ -1,115 +0,0 @@
-{
- "keyboard_name": "Q1",
- "manufacturer": "Keychron",
- "url": "https://github.com/Keychron",
- "maintainer": "lalalademaxiya1",
- "usb": {
- "vid": "0x3434",
- "pid": "0x0100",
- "device_version": "1.0.0",
- "force_nkro": true
- },
- "rgb_matrix": {
- "driver": "is31fl3733"
- },
- "matrix_pins": {
- "cols": ["D5", "D4", "D6", "D7", "B4", "B5", "B6", "C6", "C7", "F7", "F6", "F5", "F4", "F1", "F0"],
- "rows": ["D3", "D2", "B3", "B2", "B1", "B0"]
- },
- "diode_direction": "ROW2COL",
- "processor": "atmega32u4",
- "bootloader": "atmel-dfu",
- "layouts": {
- "LAYOUT_ansi_82": {
- "layout": [
- {"matrix": [0, 0], "x": 0, "y": 0},
- {"matrix": [0, 2], "x": 1.25, "y": 0},
- {"matrix": [0, 3], "x": 2.25, "y": 0},
- {"matrix": [0, 4], "x": 3.25, "y": 0},
- {"matrix": [0, 5], "x": 4.25, "y": 0},
- {"matrix": [0, 6], "x": 5.5, "y": 0},
- {"matrix": [0, 7], "x": 6.5, "y": 0},
- {"matrix": [0, 8], "x": 7.5, "y": 0},
- {"matrix": [0, 9], "x": 8.5, "y": 0},
- {"matrix": [0, 10], "x": 9.75, "y": 0},
- {"matrix": [0, 11], "x": 10.75, "y": 0},
- {"matrix": [0, 12], "x": 11.75, "y": 0},
- {"matrix": [0, 13], "x": 12.75, "y": 0},
- {"matrix": [4, 14], "x": 14, "y": 0},
- {"matrix": [0, 14], "x": 15.25, "y": 0},
-
- {"matrix": [1, 0], "x": 0, "y": 1},
- {"matrix": [1, 1], "x": 1, "y": 1},
- {"matrix": [1, 2], "x": 2, "y": 1},
- {"matrix": [1, 3], "x": 3, "y": 1},
- {"matrix": [1, 4], "x": 4, "y": 1},
- {"matrix": [1, 5], "x": 5, "y": 1},
- {"matrix": [1, 6], "x": 6, "y": 1},
- {"matrix": [1, 7], "x": 7, "y": 1},
- {"matrix": [1, 8], "x": 8, "y": 1},
- {"matrix": [1, 9], "x": 9, "y": 1},
- {"matrix": [1, 10], "x": 10, "y": 1},
- {"matrix": [1, 11], "x": 11, "y": 1},
- {"matrix": [1, 12], "x": 12, "y": 1},
- {"matrix": [1, 13], "x": 13, "y": 1, "w": 2},
- {"matrix": [1, 14], "x": 15.25, "y": 1},
-
- {"matrix": [2, 0], "x": 0, "y": 2, "w": 1.5},
- {"matrix": [2, 1], "x": 1.5, "y": 2},
- {"matrix": [2, 2], "x": 2.5, "y": 2},
- {"matrix": [2, 3], "x": 3.5, "y": 2},
- {"matrix": [2, 4], "x": 4.5, "y": 2},
- {"matrix": [2, 5], "x": 5.5, "y": 2},
- {"matrix": [2, 6], "x": 6.5, "y": 2},
- {"matrix": [2, 7], "x": 7.5, "y": 2},
- {"matrix": [2, 8], "x": 8.5, "y": 2},
- {"matrix": [2, 9], "x": 9.5, "y": 2},
- {"matrix": [2, 10], "x": 10.5, "y": 2},
- {"matrix": [2, 11], "x": 11.5, "y": 2},
- {"matrix": [2, 12], "x": 12.5, "y": 2},
- {"matrix": [2, 13], "x": 13.5, "y": 2, "w": 1.5},
- {"matrix": [2, 14], "x": 15.25, "y": 2},
-
- {"matrix": [3, 0], "x": 0, "y": 3, "w": 1.75},
- {"matrix": [3, 1], "x": 1.75, "y": 3},
- {"matrix": [3, 2], "x": 2.75, "y": 3},
- {"matrix": [3, 3], "x": 3.75, "y": 3},
- {"matrix": [3, 4], "x": 4.75, "y": 3},
- {"matrix": [3, 5], "x": 5.75, "y": 3},
- {"matrix": [3, 6], "x": 6.75, "y": 3},
- {"matrix": [3, 7], "x": 7.75, "y": 3},
- {"matrix": [3, 8], "x": 8.75, "y": 3},
- {"matrix": [3, 9], "x": 9.75, "y": 3},
- {"matrix": [3, 10], "x": 10.75, "y": 3},
- {"matrix": [3, 11], "x": 11.75, "y": 3},
- {"matrix": [3, 13], "x": 12.75, "y": 3, "w": 2.25},
- {"matrix": [3, 14], "x": 15.25, "y": 3},
-
- {"matrix": [4, 0], "x": 0, "y": 4, "w": 2.25},
- {"matrix": [4, 2], "x": 2.25, "y": 4},
- {"matrix": [4, 3], "x": 3.25, "y": 4},
- {"matrix": [4, 4], "x": 4.25, "y": 4},
- {"matrix": [4, 5], "x": 5.25, "y": 4},
- {"matrix": [4, 6], "x": 6.25, "y": 4},
- {"matrix": [4, 7], "x": 7.25, "y": 4},
- {"matrix": [4, 8], "x": 8.25, "y": 4},
- {"matrix": [4, 9], "x": 9.25, "y": 4},
- {"matrix": [4, 10], "x": 10.25, "y": 4},
- {"matrix": [4, 11], "x": 11.25, "y": 4},
- {"matrix": [4, 13], "x": 12.25, "y": 4, "w": 1.75},
- {"matrix": [3, 12], "x": 14.25, "y": 4.25},
-
- {"matrix": [5, 0], "x": 0, "y": 5, "w": 1.25},
- {"matrix": [5, 1], "x": 1.25, "y": 5, "w": 1.25},
- {"matrix": [5, 2], "x": 2.5, "y": 5, "w": 1.25},
- {"matrix": [5, 6], "x": 3.75, "y": 5, "w": 6.25},
- {"matrix": [5, 10], "x": 10, "y": 5},
- {"matrix": [5, 11], "x": 11, "y": 5},
- {"matrix": [5, 12], "x": 12, "y": 5},
- {"matrix": [5, 13], "x": 13.25, "y": 5.25},
- {"matrix": [4, 12], "x": 14.25, "y": 5.25},
- {"matrix": [5, 14], "x": 15.25, "y": 5.25}
- ]
- }
- }
-}
diff --git a/keyboards/keychron/q1/ansi/rules.mk b/keyboards/keychron/q1/ansi/rules.mk
deleted file mode 100644
index 0379fdb94c..0000000000
--- a/keyboards/keychron/q1/ansi/rules.mk
+++ /dev/null
@@ -1,15 +0,0 @@
-# Build Options
-# change yes to no to disable
-#
-BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
-MOUSEKEY_ENABLE = no # Mouse keys
-EXTRAKEY_ENABLE = yes # Audio control and System control
-CONSOLE_ENABLE = no # Console for debug
-COMMAND_ENABLE = no # Commands for debug and configuration
-NKRO_ENABLE = yes # Enable N-Key Rollover
-BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
-RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
-AUDIO_ENABLE = no # Audio output
-DIP_SWITCH_ENABLE = yes
-RGB_MATRIX_ENABLE = yes
-LTO_ENABLE = yes
diff --git a/keyboards/keychron/q1/ansi_encoder/info.json b/keyboards/keychron/q1/ansi_encoder/info.json
deleted file mode 100644
index ef361257f0..0000000000
--- a/keyboards/keychron/q1/ansi_encoder/info.json
+++ /dev/null
@@ -1,120 +0,0 @@
-{
- "keyboard_name": "Q1",
- "manufacturer": "Keychron",
- "url": "https://github.com/Keychron",
- "maintainer": "lalalademaxiya1",
- "usb": {
- "vid": "0x3434",
- "pid": "0x0101",
- "device_version": "1.0.0",
- "force_nkro": true
- },
- "rgb_matrix": {
- "driver": "is31fl3733"
- },
- "matrix_pins": {
- "cols": ["D5", "D4", "D6", "D7", "B4", "B5", "B6", "C6", "C7", "F7", "F6", "F5", "F4", "F1", "F0"],
- "rows": ["D3", "D2", "B3", "B2", "B1", "B0"]
- },
- "diode_direction": "ROW2COL",
- "encoder": {
- "rotary": [
- {"pin_a": "E6", "pin_b": "B7"}
- ]
- },
- "processor": "atmega32u4",
- "bootloader": "atmel-dfu",
- "layouts": {
- "LAYOUT_ansi_82": {
- "layout": [
- {"matrix": [0, 0], "x": 0, "y": 0},
- {"matrix": [0, 2], "x": 1.25, "y": 0},
- {"matrix": [0, 3], "x": 2.25, "y": 0},
- {"matrix": [0, 4], "x": 3.25, "y": 0},
- {"matrix": [0, 5], "x": 4.25, "y": 0},
- {"matrix": [0, 6], "x": 5.5, "y": 0},
- {"matrix": [0, 7], "x": 6.5, "y": 0},
- {"matrix": [0, 8], "x": 7.5, "y": 0},
- {"matrix": [0, 9], "x": 8.5, "y": 0},
- {"matrix": [0, 10], "x": 9.75, "y": 0},
- {"matrix": [0, 11], "x": 10.75, "y": 0},
- {"matrix": [0, 12], "x": 11.75, "y": 0},
- {"matrix": [0, 13], "x": 12.75, "y": 0},
- {"matrix": [4, 14], "x": 14, "y": 0},
- {"matrix": [0, 14], "x": 15.25, "y": 0},
-
- {"matrix": [1, 0], "x": 0, "y": 1},
- {"matrix": [1, 1], "x": 1, "y": 1},
- {"matrix": [1, 2], "x": 2, "y": 1},
- {"matrix": [1, 3], "x": 3, "y": 1},
- {"matrix": [1, 4], "x": 4, "y": 1},
- {"matrix": [1, 5], "x": 5, "y": 1},
- {"matrix": [1, 6], "x": 6, "y": 1},
- {"matrix": [1, 7], "x": 7, "y": 1},
- {"matrix": [1, 8], "x": 8, "y": 1},
- {"matrix": [1, 9], "x": 9, "y": 1},
- {"matrix": [1, 10], "x": 10, "y": 1},
- {"matrix": [1, 11], "x": 11, "y": 1},
- {"matrix": [1, 12], "x": 12, "y": 1},
- {"matrix": [1, 13], "x": 13, "y": 1, "w": 2},
- {"matrix": [1, 14], "x": 15.25, "y": 1},
-
- {"matrix": [2, 0], "x": 0, "y": 2, "w": 1.5},
- {"matrix": [2, 1], "x": 1.5, "y": 2},
- {"matrix": [2, 2], "x": 2.5, "y": 2},
- {"matrix": [2, 3], "x": 3.5, "y": 2},
- {"matrix": [2, 4], "x": 4.5, "y": 2},
- {"matrix": [2, 5], "x": 5.5, "y": 2},
- {"matrix": [2, 6], "x": 6.5, "y": 2},
- {"matrix": [2, 7], "x": 7.5, "y": 2},
- {"matrix": [2, 8], "x": 8.5, "y": 2},
- {"matrix": [2, 9], "x": 9.5, "y": 2},
- {"matrix": [2, 10], "x": 10.5, "y": 2},
- {"matrix": [2, 11], "x": 11.5, "y": 2},
- {"matrix": [2, 12], "x": 12.5, "y": 2},
- {"matrix": [2, 13], "x": 13.5, "y": 2, "w": 1.5},
- {"matrix": [2, 14], "x": 15.25, "y": 2},
-
- {"matrix": [3, 0], "x": 0, "y": 3, "w": 1.75},
- {"matrix": [3, 1], "x": 1.75, "y": 3},
- {"matrix": [3, 2], "x": 2.75, "y": 3},
- {"matrix": [3, 3], "x": 3.75, "y": 3},
- {"matrix": [3, 4], "x": 4.75, "y": 3},
- {"matrix": [3, 5], "x": 5.75, "y": 3},
- {"matrix": [3, 6], "x": 6.75, "y": 3},
- {"matrix": [3, 7], "x": 7.75, "y": 3},
- {"matrix": [3, 8], "x": 8.75, "y": 3},
- {"matrix": [3, 9], "x": 9.75, "y": 3},
- {"matrix": [3, 10], "x": 10.75, "y": 3},
- {"matrix": [3, 11], "x": 11.75, "y": 3},
- {"matrix": [3, 13], "x": 12.75, "y": 3, "w": 2.25},
- {"matrix": [3, 14], "x": 15.25, "y": 3},
-
- {"matrix": [4, 0], "x": 0, "y": 4, "w": 2.25},
- {"matrix": [4, 2], "x": 2.25, "y": 4},
- {"matrix": [4, 3], "x": 3.25, "y": 4},
- {"matrix": [4, 4], "x": 4.25, "y": 4},
- {"matrix": [4, 5], "x": 5.25, "y": 4},
- {"matrix": [4, 6], "x": 6.25, "y": 4},
- {"matrix": [4, 7], "x": 7.25, "y": 4},
- {"matrix": [4, 8], "x": 8.25, "y": 4},
- {"matrix": [4, 9], "x": 9.25, "y": 4},
- {"matrix": [4, 10], "x": 10.25, "y": 4},
- {"matrix": [4, 11], "x": 11.25, "y": 4},
- {"matrix": [4, 13], "x": 12.25, "y": 4, "w": 1.75},
- {"matrix": [3, 12], "x": 14.25, "y": 4.25},
-
- {"matrix": [5, 0], "x": 0, "y": 5, "w": 1.25},
- {"matrix": [5, 1], "x": 1.25, "y": 5, "w": 1.25},
- {"matrix": [5, 2], "x": 2.5, "y": 5, "w": 1.25},
- {"matrix": [5, 6], "x": 3.75, "y": 5, "w": 6.25},
- {"matrix": [5, 10], "x": 10, "y": 5},
- {"matrix": [5, 11], "x": 11, "y": 5},
- {"matrix": [5, 12], "x": 12, "y": 5},
- {"matrix": [5, 13], "x": 13.25, "y": 5.25},
- {"matrix": [4, 12], "x": 14.25, "y": 5.25},
- {"matrix": [5, 14], "x": 15.25, "y": 5.25}
- ]
- }
- }
-}
diff --git a/keyboards/keychron/q1/ansi_encoder/rules.mk b/keyboards/keychron/q1/ansi_encoder/rules.mk
deleted file mode 100644
index d60167579e..0000000000
--- a/keyboards/keychron/q1/ansi_encoder/rules.mk
+++ /dev/null
@@ -1,16 +0,0 @@
-# Build Options
-# change yes to no to disable
-#
-BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
-MOUSEKEY_ENABLE = no # Mouse keys
-EXTRAKEY_ENABLE = yes # Audio control and System control
-CONSOLE_ENABLE = no # Console for debug
-COMMAND_ENABLE = no # Commands for debug and configuration
-NKRO_ENABLE = yes # Enable N-Key Rollover
-BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
-RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
-AUDIO_ENABLE = no # Audio output
-ENCODER_ENABLE = yes # Enable Encoder
-DIP_SWITCH_ENABLE = yes
-RGB_MATRIX_ENABLE = yes
-LTO_ENABLE = yes
diff --git a/keyboards/keychron/q1/config.h b/keyboards/keychron/q1/config.h
deleted file mode 100644
index c78453dc5f..0000000000
--- a/keyboards/keychron/q1/config.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/* Copyright 2021 @ Keychron(https://www.keychron.com)
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#pragma once
-
-/* RGB Matrix Driver Configuration */
-#define DRIVER_COUNT 2
-#define DRIVER_ADDR_1 0b1010000
-#define DRIVER_ADDR_2 0b1011111
-
-/* DIP switch */
-#define DIP_SWITCH_MATRIX_GRID { {0,1} }
-
-/* Disable DIP switch in matrix data */
-#define MATRIX_MASKED
-
-/* Disable RGB lighting when PC is in suspend */
-#define RGB_DISABLE_WHEN_USB_SUSPENDED
-
-// RGB Matrix Animation modes. Explicitly enabled
-// For full list of effects, see:
-// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects
-// #define ENABLE_RGB_MATRIX_ALPHAS_MODS
-// #define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN
-// #define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT
-#define ENABLE_RGB_MATRIX_BREATHING
-// #define ENABLE_RGB_MATRIX_BAND_SAT
-// #define ENABLE_RGB_MATRIX_BAND_VAL
-// #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
-// #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL
-// #define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT
-#define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL
-#define ENABLE_RGB_MATRIX_CYCLE_ALL
-#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
-#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN
-#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
-#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN
-#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
-#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL
-#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL
-#define ENABLE_RGB_MATRIX_DUAL_BEACON
-#define ENABLE_RGB_MATRIX_RAINBOW_BEACON
-// #define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS
-// #define ENABLE_RGB_MATRIX_RAINDROPS
-#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
-// #define ENABLE_RGB_MATRIX_HUE_BREATHING
-// #define ENABLE_RGB_MATRIX_HUE_PENDULUM
-// #define ENABLE_RGB_MATRIX_HUE_WAVE
-#define ENABLE_RGB_MATRIX_PIXEL_RAIN
-// #define ENABLE_RGB_MATRIX_PIXEL_FLOW
-// #define ENABLE_RGB_MATRIX_PIXEL_FRACTAL
-// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined
-#define ENABLE_RGB_MATRIX_TYPING_HEATMAP
-#define ENABLE_RGB_MATRIX_DIGITAL_RAIN
-// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined
-#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
-// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE
-// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
-#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
-// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
-// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
-// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
-#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
-#define ENABLE_RGB_MATRIX_SPLASH
-// #define ENABLE_RGB_MATRIX_MULTISPLASH
-#define ENABLE_RGB_MATRIX_SOLID_SPLASH
-#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
diff --git a/keyboards/keychron/q1/iso/info.json b/keyboards/keychron/q1/iso/info.json
deleted file mode 100644
index 424ed021e1..0000000000
--- a/keyboards/keychron/q1/iso/info.json
+++ /dev/null
@@ -1,116 +0,0 @@
-{
- "keyboard_name": "Q1",
- "manufacturer": "Keychron",
- "url": "https://github.com/Keychron",
- "maintainer": "lalalademaxiya1",
- "usb": {
- "vid": "0x3434",
- "pid": "0x0102",
- "device_version": "1.0.0",
- "force_nkro": true
- },
- "rgb_matrix": {
- "driver": "is31fl3733"
- },
- "matrix_pins": {
- "cols": ["D5", "D4", "D6", "D7", "B4", "B5", "B6", "C6", "C7", "F7", "F6", "F5", "F4", "F1", "F0"],
- "rows": ["D3", "D2", "B3", "B2", "B1", "B0"]
- },
- "diode_direction": "ROW2COL",
- "processor": "atmega32u4",
- "bootloader": "atmel-dfu",
- "layouts": {
- "LAYOUT_iso_83": {
- "layout": [
- {"matrix": [0, 0], "x": 0, "y": 0},
- {"matrix": [0, 2], "x": 1.25, "y": 0},
- {"matrix": [0, 3], "x": 2.25, "y": 0},
- {"matrix": [0, 4], "x": 3.25, "y": 0},
- {"matrix": [0, 5], "x": 4.25, "y": 0},
- {"matrix": [0, 6], "x": 5.5, "y": 0},
- {"matrix": [0, 7], "x": 6.5, "y": 0},
- {"matrix": [0, 8], "x": 7.5, "y": 0},
- {"matrix": [0, 9], "x": 8.5, "y": 0},
- {"matrix": [0, 10], "x": 9.75, "y": 0},
- {"matrix": [0, 11], "x": 10.75, "y": 0},
- {"matrix": [0, 12], "x": 11.75, "y": 0},
- {"matrix": [0, 13], "x": 12.75, "y": 0},
- {"matrix": [4, 14], "x": 14, "y": 0},
- {"matrix": [0, 14], "x": 15.25, "y": 0},
-
- {"matrix": [1, 0], "x": 0, "y": 1.25},
- {"matrix": [1, 1], "x": 1, "y": 1.25},
- {"matrix": [1, 2], "x": 2, "y": 1.25},
- {"matrix": [1, 3], "x": 3, "y": 1.25},
- {"matrix": [1, 4], "x": 4, "y": 1.25},
- {"matrix": [1, 5], "x": 5, "y": 1.25},
- {"matrix": [1, 6], "x": 6, "y": 1.25},
- {"matrix": [1, 7], "x": 7, "y": 1.25},
- {"matrix": [1, 8], "x": 8, "y": 1.25},
- {"matrix": [1, 9], "x": 9, "y": 1.25},
- {"matrix": [1, 10], "x": 10, "y": 1.25},
- {"matrix": [1, 11], "x": 11, "y": 1.25},
- {"matrix": [1, 12], "x": 12, "y": 1.25},
- {"matrix": [1, 13], "x": 13, "y": 1.25, "w": 2},
- {"matrix": [1, 14], "x": 15.25, "y": 1.25},
-
- {"matrix": [2, 0], "x": 0, "y": 2.25, "w": 1.5},
- {"matrix": [2, 1], "x": 1.5, "y": 2.25},
- {"matrix": [2, 2], "x": 2.5, "y": 2.25},
- {"matrix": [2, 3], "x": 3.5, "y": 2.25},
- {"matrix": [2, 4], "x": 4.5, "y": 2.25},
- {"matrix": [2, 5], "x": 5.5, "y": 2.25},
- {"matrix": [2, 6], "x": 6.5, "y": 2.25},
- {"matrix": [2, 7], "x": 7.5, "y": 2.25},
- {"matrix": [2, 8], "x": 8.5, "y": 2.25},
- {"matrix": [2, 9], "x": 9.5, "y": 2.25},
- {"matrix": [2, 10], "x": 10.5, "y": 2.25},
- {"matrix": [2, 11], "x": 11.5, "y": 2.25},
- {"matrix": [2, 12], "x": 12.5, "y": 2.25},
- {"matrix": [2, 14], "x": 15.25, "y": 2.25},
-
- {"matrix": [3, 0], "x": 0, "y": 3.25, "w": 1.75},
- {"matrix": [3, 1], "x": 1.75, "y": 3.25},
- {"matrix": [3, 2], "x": 2.75, "y": 3.25},
- {"matrix": [3, 3], "x": 3.75, "y": 3.25},
- {"matrix": [3, 4], "x": 4.75, "y": 3.25},
- {"matrix": [3, 5], "x": 5.75, "y": 3.25},
- {"matrix": [3, 6], "x": 6.75, "y": 3.25},
- {"matrix": [3, 7], "x": 7.75, "y": 3.25},
- {"matrix": [3, 8], "x": 8.75, "y": 3.25},
- {"matrix": [3, 9], "x": 9.75, "y": 3.25},
- {"matrix": [3, 10], "x": 10.75, "y": 3.25},
- {"matrix": [3, 11], "x": 11.75, "y": 3.25},
- {"matrix": [3, 13], "x": 12.75, "y": 3.25},
- {"matrix": [2, 13], "x": 13.75, "y": 2.25, "w": 1.25, "h": 2},
- {"matrix": [3, 14], "x": 15.25, "y": 3.25},
-
- {"matrix": [4, 0], "x": 0, "y": 4.25, "w": 1.25},
- {"matrix": [4, 1], "x": 1.25, "y": 4.25},
- {"matrix": [4, 2], "x": 2.25, "y": 4.25},
- {"matrix": [4, 3], "x": 3.25, "y": 4.25},
- {"matrix": [4, 4], "x": 4.25, "y": 4.25},
- {"matrix": [4, 5], "x": 5.25, "y": 4.25},
- {"matrix": [4, 6], "x": 6.25, "y": 4.25},
- {"matrix": [4, 7], "x": 7.25, "y": 4.25},
- {"matrix": [4, 8], "x": 8.25, "y": 4.25},
- {"matrix": [4, 9], "x": 9.25, "y": 4.25},
- {"matrix": [4, 10], "x": 10.25, "y": 4.25},
- {"matrix": [4, 11], "x": 11.25, "y": 4.25},
- {"matrix": [4, 13], "x": 12.25, "y": 4.25, "w": 1.75},
- {"matrix": [3, 12], "x": 14.25, "y": 4.5},
-
- {"matrix": [5, 0], "x": 0, "y": 5.25, "w": 1.25},
- {"matrix": [5, 1], "x": 1.25, "y": 5.25, "w": 1.25},
- {"matrix": [5, 2], "x": 2.5, "y": 5.25, "w": 1.25},
- {"matrix": [5, 6], "x": 3.75, "y": 5.25, "w": 6.25},
- {"matrix": [5, 10], "x": 10, "y": 5.25},
- {"matrix": [5, 11], "x": 11, "y": 5.25},
- {"matrix": [5, 12], "x": 12, "y": 5.25},
- {"matrix": [5, 13], "x": 13.25, "y": 5.5},
- {"matrix": [4, 12], "x": 14.25, "y": 5.5},
- {"matrix": [5, 14], "x": 15.25, "y": 5.5}
- ]
- }
- }
-}
diff --git a/keyboards/keychron/q1/iso/rules.mk b/keyboards/keychron/q1/iso/rules.mk
deleted file mode 100644
index 0379fdb94c..0000000000
--- a/keyboards/keychron/q1/iso/rules.mk
+++ /dev/null
@@ -1,15 +0,0 @@
-# Build Options
-# change yes to no to disable
-#
-BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
-MOUSEKEY_ENABLE = no # Mouse keys
-EXTRAKEY_ENABLE = yes # Audio control and System control
-CONSOLE_ENABLE = no # Console for debug
-COMMAND_ENABLE = no # Commands for debug and configuration
-NKRO_ENABLE = yes # Enable N-Key Rollover
-BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
-RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
-AUDIO_ENABLE = no # Audio output
-DIP_SWITCH_ENABLE = yes
-RGB_MATRIX_ENABLE = yes
-LTO_ENABLE = yes
diff --git a/keyboards/keychron/q1/iso_encoder/info.json b/keyboards/keychron/q1/iso_encoder/info.json
deleted file mode 100644
index 250cd1ffb4..0000000000
--- a/keyboards/keychron/q1/iso_encoder/info.json
+++ /dev/null
@@ -1,121 +0,0 @@
-{
- "keyboard_name": "Keychron Q1",
- "manufacturer": "Keychron",
- "url": "https://github.com/Keychron",
- "maintainer": "lalalademaxiya1",
- "usb": {
- "vid": "0x3434",
- "pid": "0x0103",
- "device_version": "1.0.2",
- "force_nkro": true
- },
- "rgb_matrix": {
- "driver": "is31fl3733"
- },
- "matrix_pins": {
- "cols": ["D5", "D4", "D6", "D7", "B4", "B5", "B6", "C6", "C7", "F7", "F6", "F5", "F4", "F1", "F0"],
- "rows": ["D3", "D2", "B3", "B2", "B1", "B0"]
- },
- "diode_direction": "ROW2COL",
- "encoder": {
- "rotary": [
- {"pin_a": "E6", "pin_b": "B7"}
- ]
- },
- "processor": "atmega32u4",
- "bootloader": "atmel-dfu",
- "layouts": {
- "LAYOUT_iso_83": {
- "layout": [
- {"matrix": [0, 0], "x": 0, "y": 0},
- {"matrix": [0, 2], "x": 1.25, "y": 0},
- {"matrix": [0, 3], "x": 2.25, "y": 0},
- {"matrix": [0, 4], "x": 3.25, "y": 0},
- {"matrix": [0, 5], "x": 4.25, "y": 0},
- {"matrix": [0, 6], "x": 5.5, "y": 0},
- {"matrix": [0, 7], "x": 6.5, "y": 0},
- {"matrix": [0, 8], "x": 7.5, "y": 0},
- {"matrix": [0, 9], "x": 8.5, "y": 0},
- {"matrix": [0, 10], "x": 9.75, "y": 0},
- {"matrix": [0, 11], "x": 10.75, "y": 0},
- {"matrix": [0, 12], "x": 11.75, "y": 0},
- {"matrix": [0, 13], "x": 12.75, "y": 0},
- {"matrix": [4, 14], "x": 14, "y": 0},
- {"matrix": [0, 14], "x": 15.25, "y": 0},
-
- {"matrix": [1, 0], "x": 0, "y": 1.25},
- {"matrix": [1, 1], "x": 1, "y": 1.25},
- {"matrix": [1, 2], "x": 2, "y": 1.25},
- {"matrix": [1, 3], "x": 3, "y": 1.25},
- {"matrix": [1, 4], "x": 4, "y": 1.25},
- {"matrix": [1, 5], "x": 5, "y": 1.25},
- {"matrix": [1, 6], "x": 6, "y": 1.25},
- {"matrix": [1, 7], "x": 7, "y": 1.25},
- {"matrix": [1, 8], "x": 8, "y": 1.25},
- {"matrix": [1, 9], "x": 9, "y": 1.25},
- {"matrix": [1, 10], "x": 10, "y": 1.25},
- {"matrix": [1, 11], "x": 11, "y": 1.25},
- {"matrix": [1, 12], "x": 12, "y": 1.25},
- {"matrix": [1, 13], "x": 13, "y": 1.25, "w": 2},
- {"matrix": [1, 14], "x": 15.25, "y": 1.25},
-
- {"matrix": [2, 0], "x": 0, "y": 2.25, "w": 1.5},
- {"matrix": [2, 1], "x": 1.5, "y": 2.25},
- {"matrix": [2, 2], "x": 2.5, "y": 2.25},
- {"matrix": [2, 3], "x": 3.5, "y": 2.25},
- {"matrix": [2, 4], "x": 4.5, "y": 2.25},
- {"matrix": [2, 5], "x": 5.5, "y": 2.25},
- {"matrix": [2, 6], "x": 6.5, "y": 2.25},
- {"matrix": [2, 7], "x": 7.5, "y": 2.25},
- {"matrix": [2, 8], "x": 8.5, "y": 2.25},
- {"matrix": [2, 9], "x": 9.5, "y": 2.25},
- {"matrix": [2, 10], "x": 10.5, "y": 2.25},
- {"matrix": [2, 11], "x": 11.5, "y": 2.25},
- {"matrix": [2, 12], "x": 12.5, "y": 2.25},
- {"matrix": [2, 14], "x": 15.25, "y": 2.25},
-
- {"matrix": [3, 0], "x": 0, "y": 3.25, "w": 1.75},
- {"matrix": [3, 1], "x": 1.75, "y": 3.25},
- {"matrix": [3, 2], "x": 2.75, "y": 3.25},
- {"matrix": [3, 3], "x": 3.75, "y": 3.25},
- {"matrix": [3, 4], "x": 4.75, "y": 3.25},
- {"matrix": [3, 5], "x": 5.75, "y": 3.25},
- {"matrix": [3, 6], "x": 6.75, "y": 3.25},
- {"matrix": [3, 7], "x": 7.75, "y": 3.25},
- {"matrix": [3, 8], "x": 8.75, "y": 3.25},
- {"matrix": [3, 9], "x": 9.75, "y": 3.25},
- {"matrix": [3, 10], "x": 10.75, "y": 3.25},
- {"matrix": [3, 11], "x": 11.75, "y": 3.25},
- {"matrix": [3, 13], "x": 12.75, "y": 3.25},
- {"matrix": [2, 13], "x": 13.75, "y": 2.25, "w": 1.25, "h": 2},
- {"matrix": [3, 14], "x": 15.25, "y": 3.25},
-
- {"matrix": [4, 0], "x": 0, "y": 4.25, "w": 1.25},
- {"matrix": [4, 1], "x": 1.25, "y": 4.25},
- {"matrix": [4, 2], "x": 2.25, "y": 4.25},
- {"matrix": [4, 3], "x": 3.25, "y": 4.25},
- {"matrix": [4, 4], "x": 4.25, "y": 4.25},
- {"matrix": [4, 5], "x": 5.25, "y": 4.25},
- {"matrix": [4, 6], "x": 6.25, "y": 4.25},
- {"matrix": [4, 7], "x": 7.25, "y": 4.25},
- {"matrix": [4, 8], "x": 8.25, "y": 4.25},
- {"matrix": [4, 9], "x": 9.25, "y": 4.25},
- {"matrix": [4, 10], "x": 10.25, "y": 4.25},
- {"matrix": [4, 11], "x": 11.25, "y": 4.25},
- {"matrix": [4, 13], "x": 12.25, "y": 4.25, "w": 1.75},
- {"matrix": [3, 12], "x": 14.25, "y": 4.5},
-
- {"matrix": [5, 0], "x": 0, "y": 5.25, "w": 1.25},
- {"matrix": [5, 1], "x": 1.25, "y": 5.25, "w": 1.25},
- {"matrix": [5, 2], "x": 2.5, "y": 5.25, "w": 1.25},
- {"matrix": [5, 6], "x": 3.75, "y": 5.25, "w": 6.25},
- {"matrix": [5, 10], "x": 10, "y": 5.25},
- {"matrix": [5, 11], "x": 11, "y": 5.25},
- {"matrix": [5, 12], "x": 12, "y": 5.25},
- {"matrix": [5, 13], "x": 13.25, "y": 5.5},
- {"matrix": [4, 12], "x": 14.25, "y": 5.5},
- {"matrix": [5, 14], "x": 15.25, "y": 5.5}
- ]
- }
- }
-}
diff --git a/keyboards/keychron/q1/q1.c b/keyboards/keychron/q1/q1.c
deleted file mode 100644
index 3df62c4339..0000000000
--- a/keyboards/keychron/q1/q1.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/* Copyright 2021 @ Keychron (https://www.keychron.com)
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "quantum.h"
-
-const matrix_row_t matrix_mask[] = {
- 0b0111111111111101,
- 0b0111111111111111,
- 0b0111111111111111,
- 0b0111111111111111,
- 0b0111111111111111,
- 0b0111111111111111,
-};
-
-#ifdef DIP_SWITCH_ENABLE
-
-bool dip_switch_update_kb(uint8_t index, bool active) {
- if (!dip_switch_update_user(index, active)) { return false;}
- if (index == 0) {
- default_layer_set(1UL << (active ? 2 : 0));
- }
- return true;
-}
-
-#endif // DIP_SWITCH_ENABLE
diff --git a/keyboards/keychron/q1/readme.md b/keyboards/keychron/q1/readme.md
deleted file mode 100644
index 94b7a21f5b..0000000000
--- a/keyboards/keychron/q1/readme.md
+++ /dev/null
@@ -1,21 +0,0 @@
-# Keychron Q1
-
-![Keychron Q1](https://cdn.shopify.com/s/files/1/0059/0630/1017/t/5/assets/pf-823ebdc7--1073.jpg)
-
-A customizable 75% keyboard.
-
-* Keyboard Maintainer: [Keychron](https://github.com/keychron)
-* Hardware Supported: Keychron Q1
-* Hardware Availability: [Keychron](https://www.keychron.com)
-
-Make example for this keyboard (after setting up your build environment):
-
- make keychron/q1/ansi:default
-
-Flashing example for this keyboard:
-
- make keychron/q1/ansi:default:flash
-
-**Reset Key**: Hold down the key located at *K00*, commonly programmed as *Esc* while plugging in the keyboard.
-
-See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/keychron/q10/ansi_encoder/ansi_encoder.c b/keyboards/keychron/q10/ansi_encoder/ansi_encoder.c
index c5abcb4f6e..a9df1609e0 100644
--- a/keyboards/keychron/q10/ansi_encoder/ansi_encoder.c
+++ b/keyboards/keychron/q10/ansi_encoder/ansi_encoder.c
@@ -20,8 +20,8 @@
// clang-format off
-const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to IS31 manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | R location
* | | G location
diff --git a/keyboards/keychron/q10/ansi_encoder/info.json b/keyboards/keychron/q10/ansi_encoder/info.json
index 8a8a624154..da2cb106e3 100644
--- a/keyboards/keychron/q10/ansi_encoder/info.json
+++ b/keyboards/keychron/q10/ansi_encoder/info.json
@@ -9,7 +9,7 @@
"device_version": "1.0.0"
},
"rgb_matrix": {
- "driver": "ckled2001"
+ "driver": "snled27351"
},
"encoder": {
"rotary": [
diff --git a/keyboards/keychron/q10/ansi_encoder/rules.mk b/keyboards/keychron/q10/ansi_encoder/rules.mk
index 7da353fbd1..4c6e5bebf0 100644
--- a/keyboards/keychron/q10/ansi_encoder/rules.mk
+++ b/keyboards/keychron/q10/ansi_encoder/rules.mk
@@ -13,8 +13,6 @@ AUDIO_ENABLE = no # Audio output
ENCODER_ENABLE = yes # Enable Encoder
DIP_SWITCH_ENABLE = yes
RGB_MATRIX_ENABLE = yes
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = embedded_flash
# custom matrix setup
CUSTOM_MATRIX = lite
diff --git a/keyboards/keychron/q10/config.h b/keyboards/keychron/q10/config.h
index 0ef4edf245..b31322464e 100644
--- a/keyboards/keychron/q10/config.h
+++ b/keyboards/keychron/q10/config.h
@@ -30,9 +30,9 @@
#define DIODE_DIRECTION ROW2COL
/* RGB Matrix Driver Configuration */
-#define DRIVER_COUNT 2
-#define DRIVER_ADDR_1 0b1110111
-#define DRIVER_ADDR_2 0b1110100
+#define SNLED27351_DRIVER_COUNT 2
+#define DRIVER_ADDR_1 SNLED27351_I2C_ADDRESS_VDDIO
+#define DRIVER_ADDR_2 SNLED27351_I2C_ADDRESS_GND
/* Increase I2C speed to 1000 KHz */
#define I2C1_TIMINGR_PRESC 0U
@@ -41,9 +41,8 @@
#define I2C1_TIMINGR_SCLH 15U
#define I2C1_TIMINGR_SCLL 51U
-/* Scan phase of led driver set as MSKPHASE_9CHANNEL(defined as 0x03 in CKLED2001.h) */
-#define PHASE_CHANNEL MSKPHASE_9CHANNEL
-#define CKLED2001_CURRENT_TUNE \
+#define SNLED27351_PHASE_CHANNEL SNLED27351_MSKPHASE_9CHANNEL
+#define SNLED27351_CURRENT_TUNE \
{ 0x98, 0x98, 0x4A, 0x98, 0x98, 0x4A, 0x98, 0x98, 0x4A, 0x98, 0x98, 0x4A }
/* DIP switch */
diff --git a/keyboards/keychron/q10/iso_encoder/info.json b/keyboards/keychron/q10/iso_encoder/info.json
index d7e1bf2885..08e6b2deae 100644
--- a/keyboards/keychron/q10/iso_encoder/info.json
+++ b/keyboards/keychron/q10/iso_encoder/info.json
@@ -9,7 +9,7 @@
"device_version": "1.0.0"
},
"rgb_matrix": {
- "driver": "ckled2001"
+ "driver": "snled27351"
},
"encoder": {
"rotary": [
diff --git a/keyboards/keychron/q10/iso_encoder/iso_encoder.c b/keyboards/keychron/q10/iso_encoder/iso_encoder.c
index 1e8f80ddd8..fbe4bca637 100644
--- a/keyboards/keychron/q10/iso_encoder/iso_encoder.c
+++ b/keyboards/keychron/q10/iso_encoder/iso_encoder.c
@@ -20,8 +20,8 @@
// clang-format off
-const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to IS31 manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | R location
* | | G location
diff --git a/keyboards/keychron/q10/iso_encoder/rules.mk b/keyboards/keychron/q10/iso_encoder/rules.mk
index 7da353fbd1..4c6e5bebf0 100644
--- a/keyboards/keychron/q10/iso_encoder/rules.mk
+++ b/keyboards/keychron/q10/iso_encoder/rules.mk
@@ -13,8 +13,6 @@ AUDIO_ENABLE = no # Audio output
ENCODER_ENABLE = yes # Enable Encoder
DIP_SWITCH_ENABLE = yes
RGB_MATRIX_ENABLE = yes
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = embedded_flash
# custom matrix setup
CUSTOM_MATRIX = lite
diff --git a/keyboards/keychron/q11/ansi_encoder/ansi_encoder.c b/keyboards/keychron/q11/ansi_encoder/ansi_encoder.c
index 0585ae9c96..f7acae7add 100755
--- a/keyboards/keychron/q11/ansi_encoder/ansi_encoder.c
+++ b/keyboards/keychron/q11/ansi_encoder/ansi_encoder.c
@@ -17,8 +17,8 @@
#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
-const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to IS31 manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | R location
* | | G location
diff --git a/keyboards/keychron/q11/ansi_encoder/rules.mk b/keyboards/keychron/q11/ansi_encoder/rules.mk
index 60d5c6bea2..c6e2988321 100644
--- a/keyboards/keychron/q11/ansi_encoder/rules.mk
+++ b/keyboards/keychron/q11/ansi_encoder/rules.mk
@@ -1,6 +1 @@
-# Build Options
-# change yes to no to disable
-#
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = embedded_flash
SERIAL_DRIVER = usart
diff --git a/keyboards/keychron/q11/config.h b/keyboards/keychron/q11/config.h
index d2c7ad4a96..6880ee7c2d 100755
--- a/keyboards/keychron/q11/config.h
+++ b/keyboards/keychron/q11/config.h
@@ -27,8 +27,8 @@
#define MATRIX_MASKED // actual mask is defined by `matrix_mask` in `q11.c`
/* RGB Matrix Driver Configuration */
-#define DRIVER_COUNT 1
-#define DRIVER_ADDR_1 0b1110100
+#define SNLED27351_DRIVER_COUNT 1
+#define DRIVER_ADDR_1 SNLED27351_I2C_ADDRESS_GND
/* Increase I2C speed to 1000 KHz */
#define I2C1_TIMINGR_PRESC 0U
@@ -37,7 +37,7 @@
#define I2C1_TIMINGR_SCLH 15U
#define I2C1_TIMINGR_SCLL 51U
-#define CKLED2001_CURRENT_TUNE \
+#define SNLED27351_CURRENT_TUNE \
{ 0x80, 0xFF, 0xFF, 0x80, 0xFF, 0xFF, 0x80, 0xFF, 0xFF, 0x80, 0xFF, 0xFF } // 300mA
/* EEPROM Driver Configuration */
diff --git a/keyboards/keychron/q11/info.json b/keyboards/keychron/q11/info.json
index cd2864979d..7a56725324 100755
--- a/keyboards/keychron/q11/info.json
+++ b/keyboards/keychron/q11/info.json
@@ -59,7 +59,7 @@
]
},
"rgb_matrix": {
- "driver": "ckled2001",
+ "driver": "snled27351",
"animations": {
"breathing": true,
"band_spiral_val": true,
diff --git a/keyboards/keychron/q11/iso_encoder/iso_encoder.c b/keyboards/keychron/q11/iso_encoder/iso_encoder.c
index 08858d9b79..a2db569710 100755
--- a/keyboards/keychron/q11/iso_encoder/iso_encoder.c
+++ b/keyboards/keychron/q11/iso_encoder/iso_encoder.c
@@ -17,8 +17,8 @@
#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
-const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to CKLED2001 manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | R location
* | | G location
diff --git a/keyboards/keychron/q12/ansi_encoder/ansi_encoder.c b/keyboards/keychron/q12/ansi_encoder/ansi_encoder.c
index 2cfaeae8fc..350da52661 100644
--- a/keyboards/keychron/q12/ansi_encoder/ansi_encoder.c
+++ b/keyboards/keychron/q12/ansi_encoder/ansi_encoder.c
@@ -17,8 +17,8 @@
#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
-const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to IS31 manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | R location
* | | G location
diff --git a/keyboards/keychron/q12/ansi_encoder/info.json b/keyboards/keychron/q12/ansi_encoder/info.json
index 97c1334ffd..291fd1774c 100644
--- a/keyboards/keychron/q12/ansi_encoder/info.json
+++ b/keyboards/keychron/q12/ansi_encoder/info.json
@@ -9,7 +9,7 @@
"device_version": "1.0.0"
},
"rgb_matrix": {
- "driver": "ckled2001"
+ "driver": "snled27351"
},
"encoder": {
"rotary": [
diff --git a/keyboards/keychron/q12/ansi_encoder/rules.mk b/keyboards/keychron/q12/ansi_encoder/rules.mk
index 80a3f300bd..213c733c9c 100644
--- a/keyboards/keychron/q12/ansi_encoder/rules.mk
+++ b/keyboards/keychron/q12/ansi_encoder/rules.mk
@@ -13,8 +13,6 @@ AUDIO_ENABLE = no # Audio output
ENCODER_ENABLE = yes # Enable Encoder
DIP_SWITCH_ENABLE = yes
RGB_MATRIX_ENABLE = yes
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = embedded_flash
# custom matrix setup
CUSTOM_MATRIX = lite
diff --git a/keyboards/keychron/q12/config.h b/keyboards/keychron/q12/config.h
index 95281b4854..1114c966aa 100644
--- a/keyboards/keychron/q12/config.h
+++ b/keyboards/keychron/q12/config.h
@@ -26,9 +26,9 @@
#define DIODE_DIRECTION ROW2COL
/* RGB Matrix Driver Configuration */
-#define DRIVER_COUNT 2
-#define DRIVER_ADDR_1 0b1110111
-#define DRIVER_ADDR_2 0b1110100
+#define SNLED27351_DRIVER_COUNT 2
+#define DRIVER_ADDR_1 SNLED27351_I2C_ADDRESS_VDDIO
+#define DRIVER_ADDR_2 SNLED27351_I2C_ADDRESS_GND
/* Increase I2C speed to 1000 KHz */
#define I2C1_TIMINGR_PRESC 0U
@@ -37,7 +37,7 @@
#define I2C1_TIMINGR_SCLH 15U
#define I2C1_TIMINGR_SCLL 51U
-#define CKLED2001_CURRENT_TUNE \
+#define SNLED27351_CURRENT_TUNE \
{ 0xAD, 0xAD, 0x55, 0xAD, 0xAD, 0x55, 0xAD, 0xAD, 0x55, 0xAD, 0xAD, 0x55 }
/* DIP switch */
diff --git a/keyboards/keychron/q12/iso_encoder/info.json b/keyboards/keychron/q12/iso_encoder/info.json
index cd848c86b6..edd0d0ea43 100644
--- a/keyboards/keychron/q12/iso_encoder/info.json
+++ b/keyboards/keychron/q12/iso_encoder/info.json
@@ -9,7 +9,7 @@
"device_version": "1.0.0"
},
"rgb_matrix": {
- "driver": "ckled2001"
+ "driver": "snled27351"
},
"encoder": {
"rotary": [
diff --git a/keyboards/keychron/q12/iso_encoder/iso_encoder.c b/keyboards/keychron/q12/iso_encoder/iso_encoder.c
index 8090649d33..37d9db10b4 100644
--- a/keyboards/keychron/q12/iso_encoder/iso_encoder.c
+++ b/keyboards/keychron/q12/iso_encoder/iso_encoder.c
@@ -18,8 +18,8 @@
#ifdef RGB_MATRIX_ENABLE
-const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to IS31 manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | R location
* | | G location
diff --git a/keyboards/keychron/q12/iso_encoder/rules.mk b/keyboards/keychron/q12/iso_encoder/rules.mk
index 9867724957..39b0594039 100644
--- a/keyboards/keychron/q12/iso_encoder/rules.mk
+++ b/keyboards/keychron/q12/iso_encoder/rules.mk
@@ -13,8 +13,6 @@ AUDIO_ENABLE = no # Audio output
ENCODER_ENABLE = yes # Enable Encoder
DIP_SWITCH_ENABLE = yes
RGB_MATRIX_ENABLE = yes
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = embedded_flash
# custom matrix setup
CUSTOM_MATRIX = lite
diff --git a/keyboards/keychron/q1/ansi_encoder/ansi_encoder.c b/keyboards/keychron/q1v1/ansi/ansi.c
index bc559b3541..5f74267bf4 100644
--- a/keyboards/keychron/q1/ansi_encoder/ansi_encoder.c
+++ b/keyboards/keychron/q1v1/ansi/ansi.c
@@ -16,8 +16,17 @@
#include "quantum.h"
+const matrix_row_t matrix_mask[] = {
+ 0b0111111111111101,
+ 0b0111111111111111,
+ 0b0111111111111111,
+ 0b0111111111111111,
+ 0b0111111111111111,
+ 0b0111111111111111,
+};
+
#ifdef RGB_MATRIX_ENABLE
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3733_led_t PROGMEM g_is31fl3733_leds[RGB_MATRIX_LED_COUNT] = {
/* Refer to IS31 manual for these locations
* driver
* | R location
@@ -111,38 +120,7 @@ const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
{1, F_14, D_14, E_14},
{1, F_15, D_15, E_15},
{1, F_16, D_16, E_16}
-};
-
-#define __ NO_LED
-led_config_t g_led_config = {
- {
- // Key Matrix to LED Index
- { 0, __, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14 },
- { 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29 },
- { 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44 },
- { 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 71, 57, 58 },
- { 59, __, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 80, 70, 13 },
- { 72, 73, 74, __, __, __, 75, __, __, __, 76, 77, 78, 79, 81 }
- },
- {
- // LED Index to Physical Position
- {0,0}, {18,0}, {33,0}, {48,0}, {62,0}, {81,0}, {95,0}, {110,0}, {125,0}, {143,0}, {158,0}, {173,0}, {187,0}, {206,0}, {224,0},
- {0,15}, {15,15}, {29,15}, {44,15}, {59,15}, {73,15}, {88,15}, {103,15}, {118,15}, {132,15}, {147,15}, {162,15}, {176,15}, {198,15}, {224,15},
- {4,26}, {22,26}, {37,26}, {51,26}, {66,26}, {81,26}, {95,26}, {110,26}, {125,26}, {140,26}, {154,26}, {169,26}, {184,26}, {202,26}, {224,26},
- {6,38}, {26,38}, {40,38}, {55,38}, {70,38}, {84,38}, {99,38}, {114,38}, {129,38}, {143,38}, {158,38}, {173,38}, {196,38}, {224,38},
- {9,49}, {33,49}, {48,49}, {62,49}, {77,49}, {92,49}, {106,49}, {121,49}, {136,49}, {151,49}, {165,49}, {185,49}, {209,52},
- {2,61}, {20,61}, {39,61}, {94,61}, {147,61}, {162,61}, {176,61}, {195,64}, {209,64}, {224,64}
- },
- {
- // RGB LED Index to Flag
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1,
- 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
- 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1,
- 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1,
- 1, 1, 1, 4, 1, 1, 1, 1, 1, 1
- }
};
#endif // RGB_MATRIX_ENABLE
diff --git a/keyboards/keychron/q1/iso/config.h b/keyboards/keychron/q1v1/ansi/config.h
index cb7b05560a..5eaa1e82f1 100644
--- a/keyboards/keychron/q1/iso/config.h
+++ b/keyboards/keychron/q1v1/ansi/config.h
@@ -17,6 +17,7 @@
#pragma once
/* RGB Matrix Configuration */
-#define DRIVER_1_LED_TOTAL 59
-#define DRIVER_2_LED_TOTAL 24
-#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) \ No newline at end of file
+#define RGB_MATRIX_LED_COUNT 82
+
+/* Enable caps-lock LED */
+#define CAPS_LOCK_LED_INDEX 45 \ No newline at end of file
diff --git a/keyboards/keychron/q1v1/ansi/info.json b/keyboards/keychron/q1v1/ansi/info.json
new file mode 100644
index 0000000000..028967d608
--- /dev/null
+++ b/keyboards/keychron/q1v1/ansi/info.json
@@ -0,0 +1,190 @@
+{
+ "usb": {
+ "pid": "0x0100",
+ "device_version": "1.0.0"
+ },
+ "rgb_matrix": {
+ "layout": [
+ {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1},
+ {"matrix": [0, 2], "x": 18, "y": 0, "flags": 1},
+ {"matrix": [0, 3], "x": 33, "y": 0, "flags": 1},
+ {"matrix": [0, 4], "x": 48, "y": 0, "flags": 1},
+ {"matrix": [0, 5], "x": 62, "y": 0, "flags": 1},
+ {"matrix": [0, 6], "x": 81, "y": 0, "flags": 1},
+ {"matrix": [0, 7], "x": 95, "y": 0, "flags": 1},
+ {"matrix": [0, 8], "x": 110, "y": 0, "flags": 1},
+ {"matrix": [0, 9], "x": 125, "y": 0, "flags": 1},
+ {"matrix": [0, 10], "x": 143, "y": 0, "flags": 1},
+ {"matrix": [0, 11], "x": 158, "y": 0, "flags": 1},
+ {"matrix": [0, 12], "x": 173, "y": 0, "flags": 1},
+ {"matrix": [0, 13], "x": 187, "y": 0, "flags": 1},
+ {"matrix": [4, 14], "x": 206, "y": 0, "flags": 1},
+ {"matrix": [0, 14], "x": 224, "y": 0, "flags": 1},
+
+ {"matrix": [1, 0], "x": 0, "y": 15, "flags": 1},
+ {"matrix": [1, 1], "x": 15, "y": 15, "flags": 4},
+ {"matrix": [1, 2], "x": 29, "y": 15, "flags": 4},
+ {"matrix": [1, 3], "x": 44, "y": 15, "flags": 4},
+ {"matrix": [1, 4], "x": 59, "y": 15, "flags": 4},
+ {"matrix": [1, 5], "x": 73, "y": 15, "flags": 4},
+ {"matrix": [1, 6], "x": 88, "y": 15, "flags": 4},
+ {"matrix": [1, 7], "x": 103, "y": 15, "flags": 4},
+ {"matrix": [1, 8], "x": 118, "y": 15, "flags": 4},
+ {"matrix": [1, 9], "x": 132, "y": 15, "flags": 4},
+ {"matrix": [1, 10], "x": 147, "y": 15, "flags": 4},
+ {"matrix": [1, 11], "x": 162, "y": 15, "flags": 4},
+ {"matrix": [1, 12], "x": 176, "y": 15, "flags": 4},
+ {"matrix": [1, 13], "x": 198, "y": 15, "flags": 1},
+ {"matrix": [1, 14], "x": 224, "y": 15, "flags": 1},
+
+ {"matrix": [2, 0], "x": 4, "y": 26, "flags": 1},
+ {"matrix": [2, 1], "x": 22, "y": 26, "flags": 4},
+ {"matrix": [2, 2], "x": 37, "y": 26, "flags": 4},
+ {"matrix": [2, 3], "x": 51, "y": 26, "flags": 4},
+ {"matrix": [2, 4], "x": 66, "y": 26, "flags": 4},
+ {"matrix": [2, 5], "x": 81, "y": 26, "flags": 4},
+ {"matrix": [2, 6], "x": 95, "y": 26, "flags": 4},
+ {"matrix": [2, 7], "x": 110, "y": 26, "flags": 4},
+ {"matrix": [2, 8], "x": 125, "y": 26, "flags": 4},
+ {"matrix": [2, 9], "x": 140, "y": 26, "flags": 4},
+ {"matrix": [2, 10], "x": 154, "y": 26, "flags": 4},
+ {"matrix": [2, 11], "x": 169, "y": 26, "flags": 4},
+ {"matrix": [2, 12], "x": 184, "y": 26, "flags": 4},
+ {"matrix": [2, 13], "x": 202, "y": 26, "flags": 4},
+ {"matrix": [2, 14], "x": 224, "y": 26, "flags": 1},
+
+ {"matrix": [3, 0], "x": 6, "y": 38, "flags": 1},
+ {"matrix": [3, 1], "x": 26, "y": 38, "flags": 4},
+ {"matrix": [3, 2], "x": 40, "y": 38, "flags": 4},
+ {"matrix": [3, 3], "x": 55, "y": 38, "flags": 4},
+ {"matrix": [3, 4], "x": 70, "y": 38, "flags": 4},
+ {"matrix": [3, 5], "x": 84, "y": 38, "flags": 4},
+ {"matrix": [3, 6], "x": 99, "y": 38, "flags": 4},
+ {"matrix": [3, 7], "x": 114, "y": 38, "flags": 4},
+ {"matrix": [3, 8], "x": 129, "y": 38, "flags": 4},
+ {"matrix": [3, 9], "x": 143, "y": 38, "flags": 4},
+ {"matrix": [3, 10], "x": 158, "y": 38, "flags": 4},
+ {"matrix": [3, 11], "x": 173, "y": 38, "flags": 4},
+ {"matrix": [3, 13], "x": 196, "y": 38, "flags": 1},
+ {"matrix": [3, 14], "x": 224, "y": 38, "flags": 1},
+
+ {"matrix": [4, 0], "x": 9, "y": 49, "flags": 1},
+ {"matrix": [4, 2], "x": 33, "y": 49, "flags": 4},
+ {"matrix": [4, 3], "x": 48, "y": 49, "flags": 4},
+ {"matrix": [4, 4], "x": 62, "y": 49, "flags": 4},
+ {"matrix": [4, 5], "x": 77, "y": 49, "flags": 4},
+ {"matrix": [4, 6], "x": 92, "y": 49, "flags": 4},
+ {"matrix": [4, 7], "x": 106, "y": 49, "flags": 4},
+ {"matrix": [4, 8], "x": 121, "y": 49, "flags": 4},
+ {"matrix": [4, 9], "x": 136, "y": 49, "flags": 4},
+ {"matrix": [4, 10], "x": 151, "y": 49, "flags": 4},
+ {"matrix": [4, 11], "x": 165, "y": 49, "flags": 4},
+ {"matrix": [4, 13], "x": 185, "y": 49, "flags": 1},
+ {"matrix": [3, 12], "x": 209, "y": 52, "flags": 1},
+
+ {"matrix": [5, 0], "x":2, "y": 61, "flags": 1},
+ {"matrix": [5, 1], "x":20, "y": 61, "flags": 1},
+ {"matrix": [5, 2], "x":39, "y": 61, "flags": 1},
+ {"matrix": [5, 6], "x":94, "y": 61, "flags": 4},
+ {"matrix": [5, 10], "x":147, "y": 61, "flags": 1},
+ {"matrix": [5, 11], "x":162, "y": 61, "flags": 1},
+ {"matrix": [5, 12], "x":176, "y": 61, "flags": 1},
+ {"matrix": [5, 13], "x":195, "y": 64, "flags": 1},
+ {"matrix": [4, 12], "x":209, "y": 64, "flags": 1},
+ {"matrix": [5, 14], "x":224, "y": 64, "flags": 1}
+ ]
+ },
+ "layouts": {
+ "LAYOUT_ansi_82": {
+ "layout": [
+ {"matrix": [0, 0], "x": 0, "y": 0},
+ {"matrix": [0, 2], "x": 1.25, "y": 0},
+ {"matrix": [0, 3], "x": 2.25, "y": 0},
+ {"matrix": [0, 4], "x": 3.25, "y": 0},
+ {"matrix": [0, 5], "x": 4.25, "y": 0},
+ {"matrix": [0, 6], "x": 5.5, "y": 0},
+ {"matrix": [0, 7], "x": 6.5, "y": 0},
+ {"matrix": [0, 8], "x": 7.5, "y": 0},
+ {"matrix": [0, 9], "x": 8.5, "y": 0},
+ {"matrix": [0, 10], "x": 9.75, "y": 0},
+ {"matrix": [0, 11], "x": 10.75, "y": 0},
+ {"matrix": [0, 12], "x": 11.75, "y": 0},
+ {"matrix": [0, 13], "x": 12.75, "y": 0},
+ {"matrix": [4, 14], "x": 14, "y": 0},
+ {"matrix": [0, 14], "x": 15.25, "y": 0},
+
+ {"matrix": [1, 0], "x": 0, "y": 1},
+ {"matrix": [1, 1], "x": 1, "y": 1},
+ {"matrix": [1, 2], "x": 2, "y": 1},
+ {"matrix": [1, 3], "x": 3, "y": 1},
+ {"matrix": [1, 4], "x": 4, "y": 1},
+ {"matrix": [1, 5], "x": 5, "y": 1},
+ {"matrix": [1, 6], "x": 6, "y": 1},
+ {"matrix": [1, 7], "x": 7, "y": 1},
+ {"matrix": [1, 8], "x": 8, "y": 1},
+ {"matrix": [1, 9], "x": 9, "y": 1},
+ {"matrix": [1, 10], "x": 10, "y": 1},
+ {"matrix": [1, 11], "x": 11, "y": 1},
+ {"matrix": [1, 12], "x": 12, "y": 1},
+ {"matrix": [1, 13], "x": 13, "y": 1, "w": 2},
+ {"matrix": [1, 14], "x": 15.25, "y": 1},
+
+ {"matrix": [2, 0], "x": 0, "y": 2, "w": 1.5},
+ {"matrix": [2, 1], "x": 1.5, "y": 2},
+ {"matrix": [2, 2], "x": 2.5, "y": 2},
+ {"matrix": [2, 3], "x": 3.5, "y": 2},
+ {"matrix": [2, 4], "x": 4.5, "y": 2},
+ {"matrix": [2, 5], "x": 5.5, "y": 2},
+ {"matrix": [2, 6], "x": 6.5, "y": 2},
+ {"matrix": [2, 7], "x": 7.5, "y": 2},
+ {"matrix": [2, 8], "x": 8.5, "y": 2},
+ {"matrix": [2, 9], "x": 9.5, "y": 2},
+ {"matrix": [2, 10], "x": 10.5, "y": 2},
+ {"matrix": [2, 11], "x": 11.5, "y": 2},
+ {"matrix": [2, 12], "x": 12.5, "y": 2},
+ {"matrix": [2, 13], "x": 13.5, "y": 2, "w": 1.5},
+ {"matrix": [2, 14], "x": 15.25, "y": 2},
+
+ {"matrix": [3, 0], "x": 0, "y": 3, "w": 1.75},
+ {"matrix": [3, 1], "x": 1.75, "y": 3},
+ {"matrix": [3, 2], "x": 2.75, "y": 3},
+ {"matrix": [3, 3], "x": 3.75, "y": 3},
+ {"matrix": [3, 4], "x": 4.75, "y": 3},
+ {"matrix": [3, 5], "x": 5.75, "y": 3},
+ {"matrix": [3, 6], "x": 6.75, "y": 3},
+ {"matrix": [3, 7], "x": 7.75, "y": 3},
+ {"matrix": [3, 8], "x": 8.75, "y": 3},
+ {"matrix": [3, 9], "x": 9.75, "y": 3},
+ {"matrix": [3, 10], "x": 10.75, "y": 3},
+ {"matrix": [3, 11], "x": 11.75, "y": 3},
+ {"matrix": [3, 13], "x": 12.75, "y": 3, "w": 2.25},
+ {"matrix": [3, 14], "x": 15.25, "y": 3},
+
+ {"matrix": [4, 0], "x": 0, "y": 4, "w": 2.25},
+ {"matrix": [4, 2], "x": 2.25, "y": 4},
+ {"matrix": [4, 3], "x": 3.25, "y": 4},
+ {"matrix": [4, 4], "x": 4.25, "y": 4},
+ {"matrix": [4, 5], "x": 5.25, "y": 4},
+ {"matrix": [4, 6], "x": 6.25, "y": 4},
+ {"matrix": [4, 7], "x": 7.25, "y": 4},
+ {"matrix": [4, 8], "x": 8.25, "y": 4},
+ {"matrix": [4, 9], "x": 9.25, "y": 4},
+ {"matrix": [4, 10], "x": 10.25, "y": 4},
+ {"matrix": [4, 11], "x": 11.25, "y": 4},
+ {"matrix": [4, 13], "x": 12.25, "y": 4, "w": 1.75},
+ {"matrix": [3, 12], "x": 14.25, "y": 4.25},
+
+ {"matrix": [5, 0], "x": 0, "y": 5, "w": 1.25},
+ {"matrix": [5, 1], "x": 1.25, "y": 5, "w": 1.25},
+ {"matrix": [5, 2], "x": 2.5, "y": 5, "w": 1.25},
+ {"matrix": [5, 6], "x": 3.75, "y": 5, "w": 6.25},
+ {"matrix": [5, 10], "x": 10, "y": 5},
+ {"matrix": [5, 11], "x": 11, "y": 5},
+ {"matrix": [5, 12], "x": 12, "y": 5},
+ {"matrix": [5, 13], "x": 13.25, "y": 5.25},
+ {"matrix": [4, 12], "x": 14.25, "y": 5.25},
+ {"matrix": [5, 14], "x": 15.25, "y": 5.25}
+ ]
+ }
+ }
+}
diff --git a/keyboards/keychron/q1/ansi/keymaps/default/keymap.c b/keyboards/keychron/q1v1/ansi/keymaps/default/keymap.c
index 092d446773..092d446773 100644
--- a/keyboards/keychron/q1/ansi/keymaps/default/keymap.c
+++ b/keyboards/keychron/q1v1/ansi/keymaps/default/keymap.c
diff --git a/keyboards/keychron/q1/ansi/keymaps/gtg465x/README.md b/keyboards/keychron/q1v1/ansi/keymaps/gtg465x/README.md
index c2d5799bb8..c2d5799bb8 100644
--- a/keyboards/keychron/q1/ansi/keymaps/gtg465x/README.md
+++ b/keyboards/keychron/q1v1/ansi/keymaps/gtg465x/README.md
diff --git a/keyboards/keychron/q1/ansi/keymaps/gtg465x/config.h b/keyboards/keychron/q1v1/ansi/keymaps/gtg465x/config.h
index 5ac05d04c1..5ac05d04c1 100644
--- a/keyboards/keychron/q1/ansi/keymaps/gtg465x/config.h
+++ b/keyboards/keychron/q1v1/ansi/keymaps/gtg465x/config.h
diff --git a/keyboards/keychron/q1/ansi/keymaps/gtg465x/keymap.c b/keyboards/keychron/q1v1/ansi/keymaps/gtg465x/keymap.c
index 8da475c3c6..8da475c3c6 100644
--- a/keyboards/keychron/q1/ansi/keymaps/gtg465x/keymap.c
+++ b/keyboards/keychron/q1v1/ansi/keymaps/gtg465x/keymap.c
diff --git a/keyboards/keychron/q1/ansi/keymaps/gtg465x/keymap_user.h b/keyboards/keychron/q1v1/ansi/keymaps/gtg465x/keymap_user.h
index 728114d556..728114d556 100644
--- a/keyboards/keychron/q1/ansi/keymaps/gtg465x/keymap_user.h
+++ b/keyboards/keychron/q1v1/ansi/keymaps/gtg465x/keymap_user.h
diff --git a/keyboards/keychron/q1/ansi/keymaps/gtg465x/rgb_matrix_user.c b/keyboards/keychron/q1v1/ansi/keymaps/gtg465x/rgb_matrix_user.c
index b7d12f9466..b7d12f9466 100644
--- a/keyboards/keychron/q1/ansi/keymaps/gtg465x/rgb_matrix_user.c
+++ b/keyboards/keychron/q1v1/ansi/keymaps/gtg465x/rgb_matrix_user.c
diff --git a/keyboards/keychron/q1/ansi/keymaps/gtg465x/rgb_matrix_user.h b/keyboards/keychron/q1v1/ansi/keymaps/gtg465x/rgb_matrix_user.h
index dead454167..dead454167 100644
--- a/keyboards/keychron/q1/ansi/keymaps/gtg465x/rgb_matrix_user.h
+++ b/keyboards/keychron/q1v1/ansi/keymaps/gtg465x/rgb_matrix_user.h
diff --git a/keyboards/keychron/q1/ansi/keymaps/gtg465x/rules.mk b/keyboards/keychron/q1v1/ansi/keymaps/gtg465x/rules.mk
index 42ba38028d..42ba38028d 100644
--- a/keyboards/keychron/q1/ansi/keymaps/gtg465x/rules.mk
+++ b/keyboards/keychron/q1v1/ansi/keymaps/gtg465x/rules.mk
diff --git a/keyboards/keychron/q1/ansi/keymaps/keychron/keymap.c b/keyboards/keychron/q1v1/ansi/keymaps/keychron/keymap.c
index e7c9fddcdc..e7c9fddcdc 100644
--- a/keyboards/keychron/q1/ansi/keymaps/keychron/keymap.c
+++ b/keyboards/keychron/q1v1/ansi/keymaps/keychron/keymap.c
diff --git a/keyboards/keychron/q1/ansi/keymaps/keychron/rules.mk b/keyboards/keychron/q1v1/ansi/keymaps/keychron/rules.mk
index 495e8907b4..495e8907b4 100644
--- a/keyboards/keychron/q1/ansi/keymaps/keychron/rules.mk
+++ b/keyboards/keychron/q1v1/ansi/keymaps/keychron/rules.mk
diff --git a/keyboards/keychron/q1/ansi/keymaps/mkillewald/config.h b/keyboards/keychron/q1v1/ansi/keymaps/mkillewald/config.h
index bc9fe405c3..bc9fe405c3 100644
--- a/keyboards/keychron/q1/ansi/keymaps/mkillewald/config.h
+++ b/keyboards/keychron/q1v1/ansi/keymaps/mkillewald/config.h
diff --git a/keyboards/keychron/q1/ansi/keymaps/mkillewald/keymap.c b/keyboards/keychron/q1v1/ansi/keymaps/mkillewald/keymap.c
index 4fc8ad58e5..4fc8ad58e5 100644
--- a/keyboards/keychron/q1/ansi/keymaps/mkillewald/keymap.c
+++ b/keyboards/keychron/q1v1/ansi/keymaps/mkillewald/keymap.c
diff --git a/keyboards/keychron/q1/ansi/keymaps/mkillewald/keymap_user.h b/keyboards/keychron/q1v1/ansi/keymaps/mkillewald/keymap_user.h
index 87b1baf47f..87b1baf47f 100644
--- a/keyboards/keychron/q1/ansi/keymaps/mkillewald/keymap_user.h
+++ b/keyboards/keychron/q1v1/ansi/keymaps/mkillewald/keymap_user.h
diff --git a/keyboards/keychron/q1/ansi/keymaps/mkillewald/readme.md b/keyboards/keychron/q1v1/ansi/keymaps/mkillewald/readme.md
index 8ff2dbcc2c..8ff2dbcc2c 100644
--- a/keyboards/keychron/q1/ansi/keymaps/mkillewald/readme.md
+++ b/keyboards/keychron/q1v1/ansi/keymaps/mkillewald/readme.md
diff --git a/keyboards/keychron/q1/ansi/keymaps/mkillewald/rgb_matrix_user.c b/keyboards/keychron/q1v1/ansi/keymaps/mkillewald/rgb_matrix_user.c
index c6fa5f1f15..c6fa5f1f15 100644
--- a/keyboards/keychron/q1/ansi/keymaps/mkillewald/rgb_matrix_user.c
+++ b/keyboards/keychron/q1v1/ansi/keymaps/mkillewald/rgb_matrix_user.c
diff --git a/keyboards/keychron/q1/ansi/keymaps/mkillewald/rgb_matrix_user.h b/keyboards/keychron/q1v1/ansi/keymaps/mkillewald/rgb_matrix_user.h
index 1fb79c0b2a..1fb79c0b2a 100644
--- a/keyboards/keychron/q1/ansi/keymaps/mkillewald/rgb_matrix_user.h
+++ b/keyboards/keychron/q1v1/ansi/keymaps/mkillewald/rgb_matrix_user.h
diff --git a/keyboards/keychron/q1/ansi/keymaps/mkillewald/rules.mk b/keyboards/keychron/q1v1/ansi/keymaps/mkillewald/rules.mk
index af720e37ee..af720e37ee 100644
--- a/keyboards/keychron/q1/ansi/keymaps/mkillewald/rules.mk
+++ b/keyboards/keychron/q1v1/ansi/keymaps/mkillewald/rules.mk
diff --git a/keyboards/keychron/q1/ansi/keymaps/teimor/config.h b/keyboards/keychron/q1v1/ansi/keymaps/teimor/config.h
index 4378af4f58..4378af4f58 100644
--- a/keyboards/keychron/q1/ansi/keymaps/teimor/config.h
+++ b/keyboards/keychron/q1v1/ansi/keymaps/teimor/config.h
diff --git a/keyboards/keychron/q1/ansi/keymaps/teimor/keymap.c b/keyboards/keychron/q1v1/ansi/keymaps/teimor/keymap.c
index 77af30c5b6..77af30c5b6 100644
--- a/keyboards/keychron/q1/ansi/keymaps/teimor/keymap.c
+++ b/keyboards/keychron/q1v1/ansi/keymaps/teimor/keymap.c
diff --git a/keyboards/keychron/q1/ansi/keymaps/teimor/keymap_user.h b/keyboards/keychron/q1v1/ansi/keymaps/teimor/keymap_user.h
index 57ac5258c2..57ac5258c2 100644
--- a/keyboards/keychron/q1/ansi/keymaps/teimor/keymap_user.h
+++ b/keyboards/keychron/q1v1/ansi/keymaps/teimor/keymap_user.h
diff --git a/keyboards/keychron/q1/ansi/keymaps/teimor/readme.md b/keyboards/keychron/q1v1/ansi/keymaps/teimor/readme.md
index 9aa16f9a89..9aa16f9a89 100644
--- a/keyboards/keychron/q1/ansi/keymaps/teimor/readme.md
+++ b/keyboards/keychron/q1v1/ansi/keymaps/teimor/readme.md
diff --git a/keyboards/keychron/q1/ansi/keymaps/teimor/rgb_matrix_user.c b/keyboards/keychron/q1v1/ansi/keymaps/teimor/rgb_matrix_user.c
index fbc37fb5bf..fbc37fb5bf 100644
--- a/keyboards/keychron/q1/ansi/keymaps/teimor/rgb_matrix_user.c
+++ b/keyboards/keychron/q1v1/ansi/keymaps/teimor/rgb_matrix_user.c
diff --git a/keyboards/keychron/q1/ansi/keymaps/teimor/rgb_matrix_user.h b/keyboards/keychron/q1v1/ansi/keymaps/teimor/rgb_matrix_user.h
index 5b53b5b8ec..5b53b5b8ec 100644
--- a/keyboards/keychron/q1/ansi/keymaps/teimor/rgb_matrix_user.h
+++ b/keyboards/keychron/q1v1/ansi/keymaps/teimor/rgb_matrix_user.h
diff --git a/keyboards/keychron/q1/ansi/keymaps/teimor/rules.mk b/keyboards/keychron/q1v1/ansi/keymaps/teimor/rules.mk
index bafb40484b..bafb40484b 100644
--- a/keyboards/keychron/q1/ansi/keymaps/teimor/rules.mk
+++ b/keyboards/keychron/q1v1/ansi/keymaps/teimor/rules.mk
diff --git a/keyboards/keychron/q1/ansi/keymaps/teimor/tap_dance_mac_caps.c b/keyboards/keychron/q1v1/ansi/keymaps/teimor/tap_dance_mac_caps.c
index dfb0346ff1..dfb0346ff1 100644
--- a/keyboards/keychron/q1/ansi/keymaps/teimor/tap_dance_mac_caps.c
+++ b/keyboards/keychron/q1v1/ansi/keymaps/teimor/tap_dance_mac_caps.c
diff --git a/keyboards/keychron/q1/ansi/keymaps/teimor/tap_dance_mac_caps.h b/keyboards/keychron/q1v1/ansi/keymaps/teimor/tap_dance_mac_caps.h
index ef552a2c2c..ef552a2c2c 100644
--- a/keyboards/keychron/q1/ansi/keymaps/teimor/tap_dance_mac_caps.h
+++ b/keyboards/keychron/q1v1/ansi/keymaps/teimor/tap_dance_mac_caps.h
diff --git a/keyboards/keychron/q1/ansi/keymaps/teimor/tap_dance_setup.c b/keyboards/keychron/q1v1/ansi/keymaps/teimor/tap_dance_setup.c
index 07257e556a..07257e556a 100644
--- a/keyboards/keychron/q1/ansi/keymaps/teimor/tap_dance_setup.c
+++ b/keyboards/keychron/q1v1/ansi/keymaps/teimor/tap_dance_setup.c
diff --git a/keyboards/keychron/q1/ansi/keymaps/teimor/tap_dance_setup.h b/keyboards/keychron/q1v1/ansi/keymaps/teimor/tap_dance_setup.h
index 5d2f4acd57..5d2f4acd57 100644
--- a/keyboards/keychron/q1/ansi/keymaps/teimor/tap_dance_setup.h
+++ b/keyboards/keychron/q1v1/ansi/keymaps/teimor/tap_dance_setup.h
diff --git a/keyboards/keychron/q1/ansi/keymaps/teimor/tap_dance_user.c b/keyboards/keychron/q1v1/ansi/keymaps/teimor/tap_dance_user.c
index ed8120572e..ed8120572e 100644
--- a/keyboards/keychron/q1/ansi/keymaps/teimor/tap_dance_user.c
+++ b/keyboards/keychron/q1v1/ansi/keymaps/teimor/tap_dance_user.c
diff --git a/keyboards/keychron/q1/ansi/keymaps/teimor/tap_dance_win_caps.c b/keyboards/keychron/q1v1/ansi/keymaps/teimor/tap_dance_win_caps.c
index 1c7c438d2e..1c7c438d2e 100644
--- a/keyboards/keychron/q1/ansi/keymaps/teimor/tap_dance_win_caps.c
+++ b/keyboards/keychron/q1v1/ansi/keymaps/teimor/tap_dance_win_caps.c
diff --git a/keyboards/keychron/q1/ansi/keymaps/teimor/tap_dance_win_caps.h b/keyboards/keychron/q1v1/ansi/keymaps/teimor/tap_dance_win_caps.h
index 2289cce326..2289cce326 100644
--- a/keyboards/keychron/q1/ansi/keymaps/teimor/tap_dance_win_caps.h
+++ b/keyboards/keychron/q1v1/ansi/keymaps/teimor/tap_dance_win_caps.h
diff --git a/keyboards/keychron/q1/ansi/keymaps/via/keymap.c b/keyboards/keychron/q1v1/ansi/keymaps/via/keymap.c
index 6cbf71baf5..6cbf71baf5 100644
--- a/keyboards/keychron/q1/ansi/keymaps/via/keymap.c
+++ b/keyboards/keychron/q1v1/ansi/keymaps/via/keymap.c
diff --git a/keyboards/keychron/q1/ansi/keymaps/via/rules.mk b/keyboards/keychron/q1v1/ansi/keymaps/via/rules.mk
index 1e5b99807c..1e5b99807c 100644
--- a/keyboards/keychron/q1/ansi/keymaps/via/rules.mk
+++ b/keyboards/keychron/q1v1/ansi/keymaps/via/rules.mk
diff --git a/keyboards/keychron/q1/ansi/readme.md b/keyboards/keychron/q1v1/ansi/readme.md
index 5cf488f048..5cf488f048 100644
--- a/keyboards/keychron/q1/ansi/readme.md
+++ b/keyboards/keychron/q1v1/ansi/readme.md
diff --git a/keyboards/keychron/q1v1/ansi/rules.mk b/keyboards/keychron/q1v1/ansi/rules.mk
new file mode 100644
index 0000000000..7ff128fa69
--- /dev/null
+++ b/keyboards/keychron/q1v1/ansi/rules.mk
@@ -0,0 +1 @@
+# This file intentionally left blank \ No newline at end of file
diff --git a/keyboards/keychron/q1/iso/iso.c b/keyboards/keychron/q1v1/ansi_encoder/ansi_encoder.c
index 619d89dffc..c4fc884bc2 100644
--- a/keyboards/keychron/q1/iso/iso.c
+++ b/keyboards/keychron/q1v1/ansi_encoder/ansi_encoder.c
@@ -16,8 +16,17 @@
#include "quantum.h"
+const matrix_row_t matrix_mask[] = {
+ 0b0111111111111101,
+ 0b0111111111111111,
+ 0b0111111111111111,
+ 0b0111111111111111,
+ 0b0111111111111111,
+ 0b0111111111111111,
+};
+
#ifdef RGB_MATRIX_ENABLE
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3733_led_t PROGMEM g_is31fl3733_leds[RGB_MATRIX_LED_COUNT] = {
/* Refer to IS31 manual for these locations
* driver
* | R location
@@ -69,6 +78,7 @@ const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
{0, I_11, G_11, H_11},
{0, I_12, G_12, H_12},
{0, I_13, G_13, H_13},
+ {0, I_14, G_14, H_14},
{0, I_16, G_16, H_16},
{0, L_1, J_1, K_1},
@@ -83,12 +93,10 @@ const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
{0, L_10, J_10, K_10},
{0, L_11, J_11, K_11},
{0, L_12, J_12, K_12},
- {0, L_14, J_14, K_14},
- {0, I_14, G_14, H_14},
+ {0, L_14, J_14, K_14},
{0, L_16, J_16, K_16},
{1, C_1, A_1, B_1},
- {1, C_2, A_2, B_2},
{1, C_3, A_3, B_3},
{1, C_4, A_4, B_4},
{1, C_5, A_5, B_5},
@@ -114,36 +122,4 @@ const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
{1, F_16, D_16, E_16}
};
-#define __ NO_LED
-
-led_config_t g_led_config = {
- {
- // Key Matrix to LED Index
- { 0, __, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14 },
- { 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29 },
- { 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 57, 43 },
- { 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 72, 56, 58 },
- { 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 81, 71, 13 },
- { 73, 74, 75, __, __, __, 76, __, __, __, 77, 78, 79, 80, 82 }
- },
- {
- // LED Index to Physical Position
- {0,0}, {18,0}, {33,0}, {48,0}, {62,0}, {81,0}, {95,0}, {110,0}, {125,0}, {143,0}, {158,0}, {173,0}, {187,0}, {206,0}, {224,0},
- {0,15}, {15,15}, {29,15}, {44,15}, {59,15}, {73,15}, {88,15}, {103,15}, {118,15}, {132,15}, {147,15}, {162,15}, {176,15}, {198,15}, {224,15},
- {4,26}, {22,26}, {37,26}, {51,26}, {66,26}, {81,26}, {95,26}, {110,26}, {125,26}, {140,26}, {154,26}, {169,26}, {184,26}, {224,26},
- {6,38}, {26,38}, {40,38}, {55,38}, {70,38}, {84,38}, {99,38}, {114,38}, {129,38}, {143,38}, {158,38}, {173,38}, {187,38}, {203,32}, {224,38},
- {2,49}, {18,49}, {33,49}, {48,49}, {62,49}, {77,49}, {92,49}, {106,49}, {121,49}, {136,49}, {151,49}, {165,49}, {185,49}, {209,52},
- {2,61}, {20,61}, {39,61}, {94,61}, {147,61}, {162,61}, {176,61}, {195,64}, {209,64}, {224,64}
- },
- {
- // RGB LED Index to Flag
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1,
- 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
- 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1,
- 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1,
- 1, 1, 1, 4, 1, 1, 1, 1, 1, 1
- }
-};
-
#endif // RGB_MATRIX_ENABLE
diff --git a/keyboards/keychron/q1/ansi/config.h b/keyboards/keychron/q1v1/ansi_encoder/config.h
index c6d4e44c87..e608b42c8d 100644
--- a/keyboards/keychron/q1/ansi/config.h
+++ b/keyboards/keychron/q1v1/ansi_encoder/config.h
@@ -17,6 +17,7 @@
#pragma once
/* RGB Matrix Configuration */
-#define DRIVER_1_LED_TOTAL 59
-#define DRIVER_2_LED_TOTAL 23
-#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) \ No newline at end of file
+#define RGB_MATRIX_LED_COUNT 82
+
+/* Enable caps-lock LED */
+#define CAPS_LOCK_LED_INDEX 45
diff --git a/keyboards/keychron/q1v1/ansi_encoder/info.json b/keyboards/keychron/q1v1/ansi_encoder/info.json
new file mode 100644
index 0000000000..786c297fd3
--- /dev/null
+++ b/keyboards/keychron/q1v1/ansi_encoder/info.json
@@ -0,0 +1,196 @@
+{
+ "usb": {
+ "pid": "0x0101",
+ "device_version": "1.0.0"
+ },
+ "encoder": {
+ "enabled": true,
+ "rotary": [
+ {"pin_a": "E6", "pin_b": "B7"}
+ ]
+ },
+ "rgb_matrix": {
+ "layout": [
+ {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1},
+ {"matrix": [0, 2], "x": 18, "y": 0, "flags": 1},
+ {"matrix": [0, 3], "x": 33, "y": 0, "flags": 1},
+ {"matrix": [0, 4], "x": 48, "y": 0, "flags": 1},
+ {"matrix": [0, 5], "x": 62, "y": 0, "flags": 1},
+ {"matrix": [0, 6], "x": 81, "y": 0, "flags": 1},
+ {"matrix": [0, 7], "x": 95, "y": 0, "flags": 1},
+ {"matrix": [0, 8], "x": 110, "y": 0, "flags": 1},
+ {"matrix": [0, 9], "x": 125, "y": 0, "flags": 1},
+ {"matrix": [0, 10], "x": 143, "y": 0, "flags": 1},
+ {"matrix": [0, 11], "x": 158, "y": 0, "flags": 1},
+ {"matrix": [0, 12], "x": 173, "y": 0, "flags": 1},
+ {"matrix": [0, 13], "x": 187, "y": 0, "flags": 1},
+ {"matrix": [4, 14], "x": 206, "y": 0, "flags": 1},
+ {"matrix": [0, 14], "x": 224, "y": 0, "flags": 1},
+
+ {"matrix": [1, 0], "x": 0, "y": 15, "flags": 1},
+ {"matrix": [1, 1], "x": 15, "y": 15, "flags": 4},
+ {"matrix": [1, 2], "x": 29, "y": 15, "flags": 4},
+ {"matrix": [1, 3], "x": 44, "y": 15, "flags": 4},
+ {"matrix": [1, 4], "x": 59, "y": 15, "flags": 4},
+ {"matrix": [1, 5], "x": 73, "y": 15, "flags": 4},
+ {"matrix": [1, 6], "x": 88, "y": 15, "flags": 4},
+ {"matrix": [1, 7], "x": 103, "y": 15, "flags": 4},
+ {"matrix": [1, 8], "x": 118, "y": 15, "flags": 4},
+ {"matrix": [1, 9], "x": 132, "y": 15, "flags": 4},
+ {"matrix": [1, 10], "x": 147, "y": 15, "flags": 4},
+ {"matrix": [1, 11], "x": 162, "y": 15, "flags": 4},
+ {"matrix": [1, 12], "x": 176, "y": 15, "flags": 4},
+ {"matrix": [1, 13], "x": 198, "y": 15, "flags": 1},
+ {"matrix": [1, 14], "x": 224, "y": 15, "flags": 1},
+
+ {"matrix": [2, 0], "x": 4, "y": 26, "flags": 1},
+ {"matrix": [2, 1], "x": 22, "y": 26, "flags": 4},
+ {"matrix": [2, 2], "x": 37, "y": 26, "flags": 4},
+ {"matrix": [2, 3], "x": 51, "y": 26, "flags": 4},
+ {"matrix": [2, 4], "x": 66, "y": 26, "flags": 4},
+ {"matrix": [2, 5], "x": 81, "y": 26, "flags": 4},
+ {"matrix": [2, 6], "x": 95, "y": 26, "flags": 4},
+ {"matrix": [2, 7], "x": 110, "y": 26, "flags": 4},
+ {"matrix": [2, 8], "x": 125, "y": 26, "flags": 4},
+ {"matrix": [2, 9], "x": 140, "y": 26, "flags": 4},
+ {"matrix": [2, 10], "x": 154, "y": 26, "flags": 4},
+ {"matrix": [2, 11], "x": 169, "y": 26, "flags": 4},
+ {"matrix": [2, 12], "x": 184, "y": 26, "flags": 4},
+ {"matrix": [2, 13], "x": 202, "y": 26, "flags": 4},
+ {"matrix": [2, 14], "x": 224, "y": 26, "flags": 1},
+
+ {"matrix": [3, 0], "x": 6, "y": 38, "flags": 1},
+ {"matrix": [3, 1], "x": 26, "y": 38, "flags": 4},
+ {"matrix": [3, 2], "x": 40, "y": 38, "flags": 4},
+ {"matrix": [3, 3], "x": 55, "y": 38, "flags": 4},
+ {"matrix": [3, 4], "x": 70, "y": 38, "flags": 4},
+ {"matrix": [3, 5], "x": 84, "y": 38, "flags": 4},
+ {"matrix": [3, 6], "x": 99, "y": 38, "flags": 4},
+ {"matrix": [3, 7], "x": 114, "y": 38, "flags": 4},
+ {"matrix": [3, 8], "x": 129, "y": 38, "flags": 4},
+ {"matrix": [3, 9], "x": 143, "y": 38, "flags": 4},
+ {"matrix": [3, 10], "x": 158, "y": 38, "flags": 4},
+ {"matrix": [3, 11], "x": 173, "y": 38, "flags": 4},
+ {"matrix": [3, 13], "x": 196, "y": 38, "flags": 1},
+ {"matrix": [3, 14], "x": 224, "y": 38, "flags": 1},
+
+ {"matrix": [4, 0], "x": 9, "y": 49, "flags": 1},
+ {"matrix": [4, 2], "x": 33, "y": 49, "flags": 4},
+ {"matrix": [4, 3], "x": 48, "y": 49, "flags": 4},
+ {"matrix": [4, 4], "x": 62, "y": 49, "flags": 4},
+ {"matrix": [4, 5], "x": 77, "y": 49, "flags": 4},
+ {"matrix": [4, 6], "x": 92, "y": 49, "flags": 4},
+ {"matrix": [4, 7], "x": 106, "y": 49, "flags": 4},
+ {"matrix": [4, 8], "x": 121, "y": 49, "flags": 4},
+ {"matrix": [4, 9], "x": 136, "y": 49, "flags": 4},
+ {"matrix": [4, 10], "x": 151, "y": 49, "flags": 4},
+ {"matrix": [4, 11], "x": 165, "y": 49, "flags": 4},
+ {"matrix": [4, 13], "x": 185, "y": 49, "flags": 1},
+ {"matrix": [3, 12], "x": 209, "y": 52, "flags": 1},
+
+ {"matrix": [5, 0], "x":2, "y": 61, "flags": 1},
+ {"matrix": [5, 1], "x":20, "y": 61, "flags": 1},
+ {"matrix": [5, 2], "x":39, "y": 61, "flags": 1},
+ {"matrix": [5, 6], "x":94, "y": 61, "flags": 4},
+ {"matrix": [5, 10], "x":147, "y": 61, "flags": 1},
+ {"matrix": [5, 11], "x":162, "y": 61, "flags": 1},
+ {"matrix": [5, 12], "x":176, "y": 61, "flags": 1},
+ {"matrix": [5, 13], "x":195, "y": 64, "flags": 1},
+ {"matrix": [4, 12], "x":209, "y": 64, "flags": 1},
+ {"matrix": [5, 14], "x":224, "y": 64, "flags": 1}
+ ]
+ },
+ "layouts": {
+ "LAYOUT_ansi_82": {
+ "layout": [
+ {"matrix": [0, 0], "x": 0, "y": 0},
+ {"matrix": [0, 2], "x": 1.25, "y": 0},
+ {"matrix": [0, 3], "x": 2.25, "y": 0},
+ {"matrix": [0, 4], "x": 3.25, "y": 0},
+ {"matrix": [0, 5], "x": 4.25, "y": 0},
+ {"matrix": [0, 6], "x": 5.5, "y": 0},
+ {"matrix": [0, 7], "x": 6.5, "y": 0},
+ {"matrix": [0, 8], "x": 7.5, "y": 0},
+ {"matrix": [0, 9], "x": 8.5, "y": 0},
+ {"matrix": [0, 10], "x": 9.75, "y": 0},
+ {"matrix": [0, 11], "x": 10.75, "y": 0},
+ {"matrix": [0, 12], "x": 11.75, "y": 0},
+ {"matrix": [0, 13], "x": 12.75, "y": 0},
+ {"matrix": [4, 14], "x": 14, "y": 0},
+ {"matrix": [0, 14], "x": 15.25, "y": 0},
+
+ {"matrix": [1, 0], "x": 0, "y": 1},
+ {"matrix": [1, 1], "x": 1, "y": 1},
+ {"matrix": [1, 2], "x": 2, "y": 1},
+ {"matrix": [1, 3], "x": 3, "y": 1},
+ {"matrix": [1, 4], "x": 4, "y": 1},
+ {"matrix": [1, 5], "x": 5, "y": 1},
+ {"matrix": [1, 6], "x": 6, "y": 1},
+ {"matrix": [1, 7], "x": 7, "y": 1},
+ {"matrix": [1, 8], "x": 8, "y": 1},
+ {"matrix": [1, 9], "x": 9, "y": 1},
+ {"matrix": [1, 10], "x": 10, "y": 1},
+ {"matrix": [1, 11], "x": 11, "y": 1},
+ {"matrix": [1, 12], "x": 12, "y": 1},
+ {"matrix": [1, 13], "x": 13, "y": 1, "w": 2},
+ {"matrix": [1, 14], "x": 15.25, "y": 1},
+
+ {"matrix": [2, 0], "x": 0, "y": 2, "w": 1.5},
+ {"matrix": [2, 1], "x": 1.5, "y": 2},
+ {"matrix": [2, 2], "x": 2.5, "y": 2},
+ {"matrix": [2, 3], "x": 3.5, "y": 2},
+ {"matrix": [2, 4], "x": 4.5, "y": 2},
+ {"matrix": [2, 5], "x": 5.5, "y": 2},
+ {"matrix": [2, 6], "x": 6.5, "y": 2},
+ {"matrix": [2, 7], "x": 7.5, "y": 2},
+ {"matrix": [2, 8], "x": 8.5, "y": 2},
+ {"matrix": [2, 9], "x": 9.5, "y": 2},
+ {"matrix": [2, 10], "x": 10.5, "y": 2},
+ {"matrix": [2, 11], "x": 11.5, "y": 2},
+ {"matrix": [2, 12], "x": 12.5, "y": 2},
+ {"matrix": [2, 13], "x": 13.5, "y": 2, "w": 1.5},
+ {"matrix": [2, 14], "x": 15.25, "y": 2},
+
+ {"matrix": [3, 0], "x": 0, "y": 3, "w": 1.75},
+ {"matrix": [3, 1], "x": 1.75, "y": 3},
+ {"matrix": [3, 2], "x": 2.75, "y": 3},
+ {"matrix": [3, 3], "x": 3.75, "y": 3},
+ {"matrix": [3, 4], "x": 4.75, "y": 3},
+ {"matrix": [3, 5], "x": 5.75, "y": 3},
+ {"matrix": [3, 6], "x": 6.75, "y": 3},
+ {"matrix": [3, 7], "x": 7.75, "y": 3},
+ {"matrix": [3, 8], "x": 8.75, "y": 3},
+ {"matrix": [3, 9], "x": 9.75, "y": 3},
+ {"matrix": [3, 10], "x": 10.75, "y": 3},
+ {"matrix": [3, 11], "x": 11.75, "y": 3},
+ {"matrix": [3, 13], "x": 12.75, "y": 3, "w": 2.25},
+ {"matrix": [3, 14], "x": 15.25, "y": 3},
+
+ {"matrix": [4, 0], "x": 0, "y": 4, "w": 2.25},
+ {"matrix": [4, 2], "x": 2.25, "y": 4},
+ {"matrix": [4, 3], "x": 3.25, "y": 4},
+ {"matrix": [4, 4], "x": 4.25, "y": 4},
+ {"matrix": [4, 5], "x": 5.25, "y": 4},
+ {"matrix": [4, 6], "x": 6.25, "y": 4},
+ {"matrix": [4, 7], "x": 7.25, "y": 4},
+ {"matrix": [4, 8], "x": 8.25, "y": 4},
+ {"matrix": [4, 9], "x": 9.25, "y": 4},
+ {"matrix": [4, 10], "x": 10.25, "y": 4},
+ {"matrix": [4, 11], "x": 11.25, "y": 4},
+ {"matrix": [4, 13], "x": 12.25, "y": 4, "w": 1.75},
+ {"matrix": [3, 12], "x": 14.25, "y": 4.25},
+
+ {"matrix": [5, 0], "x": 0, "y": 5, "w": 1.25},
+ {"matrix": [5, 1], "x": 1.25, "y": 5, "w": 1.25},
+ {"matrix": [5, 2], "x": 2.5, "y": 5, "w": 1.25},
+ {"matrix": [5, 6], "x": 3.75, "y": 5, "w": 6.25},
+ {"matrix": [5, 10], "x": 10, "y": 5},
+ {"matrix": [5, 11], "x": 11, "y": 5},
+ {"matrix": [5, 12], "x": 12, "y": 5},
+ {"matrix": [5, 13], "x": 13.25, "y": 5.25},
+ {"matrix": [4, 12], "x": 14.25, "y": 5.25},
+ {"matrix": [5, 14], "x": 15.25, "y": 5.25}
+ ]
+ }
+ }
+}
diff --git a/keyboards/keychron/q1/ansi_encoder/keymaps/default/keymap.c b/keyboards/keychron/q1v1/ansi_encoder/keymaps/default/keymap.c
index a4febc93c7..a4febc93c7 100644
--- a/keyboards/keychron/q1/ansi_encoder/keymaps/default/keymap.c
+++ b/keyboards/keychron/q1v1/ansi_encoder/keymaps/default/keymap.c
diff --git a/keyboards/keychron/q1/ansi_encoder/keymaps/default/rules.mk b/keyboards/keychron/q1v1/ansi_encoder/keymaps/default/rules.mk
index a40474b4d5..a40474b4d5 100644
--- a/keyboards/keychron/q1/ansi_encoder/keymaps/default/rules.mk
+++ b/keyboards/keychron/q1v1/ansi_encoder/keymaps/default/rules.mk
diff --git a/keyboards/keychron/q1/ansi_encoder/keymaps/keychron/keymap.c b/keyboards/keychron/q1v1/ansi_encoder/keymaps/keychron/keymap.c
index 88d0b49efd..88d0b49efd 100644
--- a/keyboards/keychron/q1/ansi_encoder/keymaps/keychron/keymap.c
+++ b/keyboards/keychron/q1v1/ansi_encoder/keymaps/keychron/keymap.c
diff --git a/keyboards/keychron/q1/ansi_encoder/keymaps/keychron/rules.mk b/keyboards/keychron/q1v1/ansi_encoder/keymaps/keychron/rules.mk
index 9cf1a9b56c..9cf1a9b56c 100644
--- a/keyboards/keychron/q1/ansi_encoder/keymaps/keychron/rules.mk
+++ b/keyboards/keychron/q1v1/ansi_encoder/keymaps/keychron/rules.mk
diff --git a/keyboards/keychron/q1/ansi_encoder/keymaps/via/keymap.c b/keyboards/keychron/q1v1/ansi_encoder/keymaps/via/keymap.c
index 9372a1d814..9372a1d814 100644
--- a/keyboards/keychron/q1/ansi_encoder/keymaps/via/keymap.c
+++ b/keyboards/keychron/q1v1/ansi_encoder/keymaps/via/keymap.c
diff --git a/keyboards/keychron/q1/ansi_encoder/keymaps/via/rules.mk b/keyboards/keychron/q1v1/ansi_encoder/keymaps/via/rules.mk
index f1adcab005..f1adcab005 100644
--- a/keyboards/keychron/q1/ansi_encoder/keymaps/via/rules.mk
+++ b/keyboards/keychron/q1v1/ansi_encoder/keymaps/via/rules.mk
diff --git a/keyboards/keychron/q1/ansi_encoder/readme.md b/keyboards/keychron/q1v1/ansi_encoder/readme.md
index b89c9ad7ad..b89c9ad7ad 100644
--- a/keyboards/keychron/q1/ansi_encoder/readme.md
+++ b/keyboards/keychron/q1v1/ansi_encoder/readme.md
diff --git a/keyboards/keychron/q1v1/ansi_encoder/rules.mk b/keyboards/keychron/q1v1/ansi_encoder/rules.mk
new file mode 100644
index 0000000000..6e7633bfe0
--- /dev/null
+++ b/keyboards/keychron/q1v1/ansi_encoder/rules.mk
@@ -0,0 +1 @@
+# This file intentionally left blank
diff --git a/keyboards/keychron/q1/iso_encoder/config.h b/keyboards/keychron/q1v1/config.h
index c1e84e44d3..93452f86fd 100644
--- a/keyboards/keychron/q1/iso_encoder/config.h
+++ b/keyboards/keychron/q1v1/config.h
@@ -1,4 +1,4 @@
-/* Copyright 2021 @ Keychron (https://www.keychron.com)
+/* Copyright 2021 @ Keychron(https://www.keychron.com)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -16,18 +16,22 @@
#pragma once
+/* RGB Matrix Driver Configuration */
+#define IS31FL3733_DRIVER_COUNT 2
+#define DRIVER_ADDR_1 IS31FL3733_I2C_ADDRESS_GND_GND
+#define DRIVER_ADDR_2 IS31FL3733_I2C_ADDRESS_GND_VCC
+
/* DIP switch */
#define DIP_SWITCH_MATRIX_GRID { {0,1} }
-/* RGB Matrix Driver Configuration */
-#define DRIVER_COUNT 2
-#define DRIVER_ADDR_1 0b1010000
-#define DRIVER_ADDR_2 0b1011111
+/* Disable DIP switch in matrix data */
+#define MATRIX_MASKED
+
+/* Encoder Configuration*/
+#define ENCODER_DEFAULT_POS 0x3
-/* RGB Matrix Configuration */
-#define DRIVER_1_LED_TOTAL 59
-#define DRIVER_2_LED_TOTAL 24
-#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
+/* Disable RGB lighting when PC is in suspend */
+#define RGB_DISABLE_WHEN_USB_SUSPENDED
-/* Enable caps-lock LED */
-#define CAPS_LOCK_LED_INDEX 44
+#define RGB_MATRIX_KEYPRESSES
+#define RGB_MATRIX_FRAMEBUFFER_EFFECTS \ No newline at end of file
diff --git a/keyboards/keychron/q1v1/info.json b/keyboards/keychron/q1v1/info.json
new file mode 100644
index 0000000000..26c846927b
--- /dev/null
+++ b/keyboards/keychron/q1v1/info.json
@@ -0,0 +1,54 @@
+{
+ "keyboard_name": "Keychron Q1v1",
+ "manufacturer": "Keychron",
+ "maintainer": "lalalademaxiya1",
+ "bootloader": "atmel-dfu",
+ "diode_direction": "ROW2COL",
+ "features": {
+ "bootmagic": true,
+ "command": false,
+ "console": false,
+ "dip_switch": true,
+ "extrakey": true,
+ "lto": true,
+ "mousekey": true,
+ "nkro": true,
+ "rgb_matrix": true
+ },
+ "matrix_pins": {
+ "cols": ["D5", "D4", "D6", "D7", "B4", "B5", "B6", "C6", "C7", "F7", "F6", "F5", "F4", "F1", "F0"],
+ "rows": ["D3", "D2", "B3", "B2", "B1", "B0"]
+ },
+ "processor": "atmega32u4",
+ "rgb_matrix": {
+ "animations": {
+ "band_spiral_val": true,
+ "breathing": true,
+ "cycle_all": true,
+ "cycle_left_right": 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,
+ "jellybean_raindrops": true,
+ "pixel_rain": true,
+ "rainbow_beacon": true,
+ "rainbow_moving_chevron": true,
+ "solid_reactive_multinexus": true,
+ "solid_reactive_multiwide": true,
+ "solid_reactive_simple": true,
+ "solid_splash": true,
+ "splash": true,
+ "typing_heatmap": true
+ },
+ "driver": "is31fl3733"
+ },
+ "url": "https://github.com/Keychron",
+ "usb": {
+ "force_nkro": true,
+ "vid": "0x3434"
+ }
+} \ No newline at end of file
diff --git a/keyboards/keychron/q1/ansi_encoder/config.h b/keyboards/keychron/q1v1/iso/config.h
index 28bbea9087..b6a2563986 100644
--- a/keyboards/keychron/q1/ansi_encoder/config.h
+++ b/keyboards/keychron/q1v1/iso/config.h
@@ -17,6 +17,7 @@
#pragma once
/* RGB Matrix Configuration */
-#define DRIVER_1_LED_TOTAL 59
-#define DRIVER_2_LED_TOTAL 23
-#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
+#define RGB_MATRIX_LED_COUNT 83
+
+/* Enable caps-lock LED */
+#define CAPS_LOCK_LED_INDEX 44 \ No newline at end of file
diff --git a/keyboards/keychron/q1v1/iso/info.json b/keyboards/keychron/q1v1/iso/info.json
new file mode 100644
index 0000000000..2bd353803e
--- /dev/null
+++ b/keyboards/keychron/q1v1/iso/info.json
@@ -0,0 +1,192 @@
+{
+ "usb": {
+ "pid": "0x0102",
+ "device_version": "1.0.0"
+ },
+ "rgb_matrix": {
+ "layout": [
+ {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1},
+ {"matrix": [0, 2], "x": 18, "y": 0, "flags": 1},
+ {"matrix": [0, 3], "x": 33, "y": 0, "flags": 1},
+ {"matrix": [0, 4], "x": 48, "y": 0, "flags": 1},
+ {"matrix": [0, 5], "x": 62, "y": 0, "flags": 1},
+ {"matrix": [0, 6], "x": 81, "y": 0, "flags": 1},
+ {"matrix": [0, 7], "x": 95, "y": 0, "flags": 1},
+ {"matrix": [0, 8], "x": 110, "y": 0, "flags": 1},
+ {"matrix": [0, 9], "x": 125, "y": 0, "flags": 1},
+ {"matrix": [0, 10], "x": 143, "y": 0, "flags": 1},
+ {"matrix": [0, 11], "x": 158, "y": 0, "flags": 1},
+ {"matrix": [0, 12], "x": 173, "y": 0, "flags": 1},
+ {"matrix": [0, 13], "x": 187, "y": 0, "flags": 1},
+ {"matrix": [4, 14], "x": 206, "y": 0, "flags": 1},
+ {"matrix": [0, 14], "x": 224, "y": 0, "flags": 1},
+
+ {"matrix": [1, 0], "x": 0, "y": 15, "flags": 1},
+ {"matrix": [1, 1], "x": 15, "y": 15, "flags": 4},
+ {"matrix": [1, 2], "x": 29, "y": 15, "flags": 4},
+ {"matrix": [1, 3], "x": 44, "y": 15, "flags": 4},
+ {"matrix": [1, 4], "x": 59, "y": 15, "flags": 4},
+ {"matrix": [1, 5], "x": 73, "y": 15, "flags": 4},
+ {"matrix": [1, 6], "x": 88, "y": 15, "flags": 4},
+ {"matrix": [1, 7], "x": 103, "y": 15, "flags": 4},
+ {"matrix": [1, 8], "x": 118, "y": 15, "flags": 4},
+ {"matrix": [1, 9], "x": 132, "y": 15, "flags": 4},
+ {"matrix": [1, 10], "x": 147, "y": 15, "flags": 4},
+ {"matrix": [1, 12], "x": 162, "y": 15, "flags": 4},
+ {"matrix": [1, 12], "x": 176, "y": 15, "flags": 4},
+ {"matrix": [1, 13], "x": 198, "y": 15, "flags": 1},
+ {"matrix": [1, 14], "x": 224, "y": 15, "flags": 1},
+
+ {"matrix": [2, 0], "x": 4, "y": 26, "flags": 1},
+ {"matrix": [2, 1], "x": 22, "y": 26, "flags": 4},
+ {"matrix": [2, 2], "x": 37, "y": 26, "flags": 4},
+ {"matrix": [2, 3], "x": 51, "y": 26, "flags": 4},
+ {"matrix": [2, 4], "x": 66, "y": 26, "flags": 4},
+ {"matrix": [2, 5], "x": 81, "y": 26, "flags": 4},
+ {"matrix": [2, 6], "x": 95, "y": 26, "flags": 4},
+ {"matrix": [2, 7], "x": 110, "y": 26, "flags": 4},
+ {"matrix": [2, 8], "x": 125, "y": 26, "flags": 4},
+ {"matrix": [2, 9], "x": 140, "y": 26, "flags": 4},
+ {"matrix": [2, 10], "x": 154, "y": 26, "flags": 4},
+ {"matrix": [2, 11], "x": 169, "y": 26, "flags": 4},
+ {"matrix": [2, 12], "x": 184, "y": 26, "flags": 4},
+ {"matrix": [2, 14], "x": 224, "y": 26, "flags": 1},
+
+ {"matrix": [3, 0], "x": 6, "y": 38, "flags": 1},
+ {"matrix": [3, 1], "x": 26, "y": 38, "flags": 4},
+ {"matrix": [3, 2], "x": 40, "y": 38, "flags": 4},
+ {"matrix": [3, 3], "x": 55, "y": 38, "flags": 4},
+ {"matrix": [3, 4], "x": 70, "y": 38, "flags": 4},
+ {"matrix": [3, 5], "x": 84, "y": 38, "flags": 4},
+ {"matrix": [3, 6], "x": 99, "y": 38, "flags": 4},
+ {"matrix": [3, 7], "x": 114, "y": 38, "flags": 4},
+ {"matrix": [3, 8], "x": 129, "y": 38, "flags": 4},
+ {"matrix": [3, 9], "x": 143, "y": 38, "flags": 4},
+ {"matrix": [3, 10], "x": 158, "y": 38, "flags": 4},
+ {"matrix": [3, 11], "x": 173, "y": 38, "flags": 4},
+ {"matrix": [3, 13], "x": 187, "y": 38, "flags": 4},
+ {"matrix": [2, 13], "x": 203, "y": 32, "flags": 1},
+ {"matrix": [3, 14], "x": 224, "y": 38, "flags": 1},
+
+ {"matrix": [4, 0], "x": 2, "y": 49, "flags": 1},
+ {"matrix": [4, 1], "x": 18, "y": 49, "flags": 4},
+ {"matrix": [4, 2], "x": 33, "y": 49, "flags": 4},
+ {"matrix": [4, 3], "x": 48, "y": 49, "flags": 4},
+ {"matrix": [4, 4], "x": 62, "y": 49, "flags": 4},
+ {"matrix": [4, 5], "x": 77, "y": 49, "flags": 4},
+ {"matrix": [4, 6], "x": 92, "y": 49, "flags": 4},
+ {"matrix": [4, 7], "x": 106, "y": 49, "flags": 4},
+ {"matrix": [4, 8], "x": 121, "y": 49, "flags": 4},
+ {"matrix": [4, 9], "x": 136, "y": 49, "flags": 4},
+ {"matrix": [4, 10], "x": 151, "y": 49, "flags": 4},
+ {"matrix": [4, 11], "x": 165, "y": 49, "flags": 4},
+ {"matrix": [4, 13], "x": 185, "y": 49, "flags": 1},
+ {"matrix": [3, 12], "x": 209, "y": 52, "flags": 1},
+
+ {"matrix": [5, 0], "x": 2, "y": 61, "flags": 1},
+ {"matrix": [5, 1], "x": 20, "y": 61, "flags": 1},
+ {"matrix": [5, 2], "x": 39, "y": 61, "flags": 1},
+ {"matrix": [5, 6], "x": 94, "y": 61, "flags": 4},
+ {"matrix": [5, 10], "x": 147, "y": 61, "flags": 1},
+ {"matrix": [5, 11], "x": 162, "y": 61, "flags": 1},
+ {"matrix": [5, 12], "x": 176, "y": 61, "flags": 1},
+ {"matrix": [5, 13], "x": 195, "y": 64, "flags": 1},
+ {"matrix": [4, 12], "x": 209, "y": 64, "flags": 1},
+ {"matrix": [5, 14], "x": 224, "y": 64, "flags": 1}
+ ]
+ },
+ "layouts": {
+ "LAYOUT_iso_83": {
+ "layout": [
+ {"matrix": [0, 0], "x": 0, "y": 0},
+ {"matrix": [0, 2], "x": 1.25, "y": 0},
+ {"matrix": [0, 3], "x": 2.25, "y": 0},
+ {"matrix": [0, 4], "x": 3.25, "y": 0},
+ {"matrix": [0, 5], "x": 4.25, "y": 0},
+ {"matrix": [0, 6], "x": 5.5, "y": 0},
+ {"matrix": [0, 7], "x": 6.5, "y": 0},
+ {"matrix": [0, 8], "x": 7.5, "y": 0},
+ {"matrix": [0, 9], "x": 8.5, "y": 0},
+ {"matrix": [0, 10], "x": 9.75, "y": 0},
+ {"matrix": [0, 11], "x": 10.75, "y": 0},
+ {"matrix": [0, 12], "x": 11.75, "y": 0},
+ {"matrix": [0, 13], "x": 12.75, "y": 0},
+ {"matrix": [4, 14], "x": 14, "y": 0},
+ {"matrix": [0, 14], "x": 15.25, "y": 0},
+
+ {"matrix": [1, 0], "x": 0, "y": 1.25},
+ {"matrix": [1, 1], "x": 1, "y": 1.25},
+ {"matrix": [1, 2], "x": 2, "y": 1.25},
+ {"matrix": [1, 3], "x": 3, "y": 1.25},
+ {"matrix": [1, 4], "x": 4, "y": 1.25},
+ {"matrix": [1, 5], "x": 5, "y": 1.25},
+ {"matrix": [1, 6], "x": 6, "y": 1.25},
+ {"matrix": [1, 7], "x": 7, "y": 1.25},
+ {"matrix": [1, 8], "x": 8, "y": 1.25},
+ {"matrix": [1, 9], "x": 9, "y": 1.25},
+ {"matrix": [1, 10], "x": 10, "y": 1.25},
+ {"matrix": [1, 11], "x": 11, "y": 1.25},
+ {"matrix": [1, 12], "x": 12, "y": 1.25},
+ {"matrix": [1, 13], "x": 13, "y": 1.25, "w": 2},
+ {"matrix": [1, 14], "x": 15.25, "y": 1.25},
+
+ {"matrix": [2, 0], "x": 0, "y": 2.25, "w": 1.5},
+ {"matrix": [2, 1], "x": 1.5, "y": 2.25},
+ {"matrix": [2, 2], "x": 2.5, "y": 2.25},
+ {"matrix": [2, 3], "x": 3.5, "y": 2.25},
+ {"matrix": [2, 4], "x": 4.5, "y": 2.25},
+ {"matrix": [2, 5], "x": 5.5, "y": 2.25},
+ {"matrix": [2, 6], "x": 6.5, "y": 2.25},
+ {"matrix": [2, 7], "x": 7.5, "y": 2.25},
+ {"matrix": [2, 8], "x": 8.5, "y": 2.25},
+ {"matrix": [2, 9], "x": 9.5, "y": 2.25},
+ {"matrix": [2, 10], "x": 10.5, "y": 2.25},
+ {"matrix": [2, 11], "x": 11.5, "y": 2.25},
+ {"matrix": [2, 12], "x": 12.5, "y": 2.25},
+ {"matrix": [2, 14], "x": 15.25, "y": 2.25},
+
+ {"matrix": [3, 0], "x": 0, "y": 3.25, "w": 1.75},
+ {"matrix": [3, 1], "x": 1.75, "y": 3.25},
+ {"matrix": [3, 2], "x": 2.75, "y": 3.25},
+ {"matrix": [3, 3], "x": 3.75, "y": 3.25},
+ {"matrix": [3, 4], "x": 4.75, "y": 3.25},
+ {"matrix": [3, 5], "x": 5.75, "y": 3.25},
+ {"matrix": [3, 6], "x": 6.75, "y": 3.25},
+ {"matrix": [3, 7], "x": 7.75, "y": 3.25},
+ {"matrix": [3, 8], "x": 8.75, "y": 3.25},
+ {"matrix": [3, 9], "x": 9.75, "y": 3.25},
+ {"matrix": [3, 10], "x": 10.75, "y": 3.25},
+ {"matrix": [3, 11], "x": 11.75, "y": 3.25},
+ {"matrix": [3, 13], "x": 12.75, "y": 3.25},
+ {"matrix": [2, 13], "x": 13.75, "y": 2.25, "w": 1.25, "h": 2},
+ {"matrix": [3, 14], "x": 15.25, "y": 3.25},
+
+ {"matrix": [4, 0], "x": 0, "y": 4.25, "w": 1.25},
+ {"matrix": [4, 1], "x": 1.25, "y": 4.25},
+ {"matrix": [4, 2], "x": 2.25, "y": 4.25},
+ {"matrix": [4, 3], "x": 3.25, "y": 4.25},
+ {"matrix": [4, 4], "x": 4.25, "y": 4.25},
+ {"matrix": [4, 5], "x": 5.25, "y": 4.25},
+ {"matrix": [4, 6], "x": 6.25, "y": 4.25},
+ {"matrix": [4, 7], "x": 7.25, "y": 4.25},
+ {"matrix": [4, 8], "x": 8.25, "y": 4.25},
+ {"matrix": [4, 9], "x": 9.25, "y": 4.25},
+ {"matrix": [4, 10], "x": 10.25, "y": 4.25},
+ {"matrix": [4, 11], "x": 11.25, "y": 4.25},
+ {"matrix": [4, 13], "x": 12.25, "y": 4.25, "w": 1.75},
+ {"matrix": [3, 12], "x": 14.25, "y": 4.5},
+
+ {"matrix": [5, 0], "x": 0, "y": 5.25, "w": 1.25},
+ {"matrix": [5, 1], "x": 1.25, "y": 5.25, "w": 1.25},
+ {"matrix": [5, 2], "x": 2.5, "y": 5.25, "w": 1.25},
+ {"matrix": [5, 6], "x": 3.75, "y": 5.25, "w": 6.25},
+ {"matrix": [5, 10], "x": 10, "y": 5.25},
+ {"matrix": [5, 11], "x": 11, "y": 5.25},
+ {"matrix": [5, 12], "x": 12, "y": 5.25},
+ {"matrix": [5, 13], "x": 13.25, "y": 5.5},
+ {"matrix": [4, 12], "x": 14.25, "y": 5.5},
+ {"matrix": [5, 14], "x": 15.25, "y": 5.5}
+ ]
+ }
+ }
+}
diff --git a/keyboards/keychron/q1/ansi/ansi.c b/keyboards/keychron/q1v1/iso/iso.c
index ee586fef93..874f5c8539 100644
--- a/keyboards/keychron/q1/ansi/ansi.c
+++ b/keyboards/keychron/q1v1/iso/iso.c
@@ -16,9 +16,17 @@
#include "quantum.h"
-#ifdef RGB_MATRIX_ENABLE
+const matrix_row_t matrix_mask[] = {
+ 0b0111111111111101,
+ 0b0111111111111111,
+ 0b0111111111111111,
+ 0b0111111111111111,
+ 0b0111111111111111,
+ 0b0111111111111111,
+};
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+#ifdef RGB_MATRIX_ENABLE
+const is31fl3733_led_t PROGMEM g_is31fl3733_leds[RGB_MATRIX_LED_COUNT] = {
/* Refer to IS31 manual for these locations
* driver
* | R location
@@ -70,7 +78,6 @@ const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
{0, I_11, G_11, H_11},
{0, I_12, G_12, H_12},
{0, I_13, G_13, H_13},
- {0, I_14, G_14, H_14},
{0, I_16, G_16, H_16},
{0, L_1, J_1, K_1},
@@ -85,10 +92,12 @@ const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
{0, L_10, J_10, K_10},
{0, L_11, J_11, K_11},
{0, L_12, J_12, K_12},
- {0, L_14, J_14, K_14},
+ {0, L_14, J_14, K_14},
+ {0, I_14, G_14, H_14},
{0, L_16, J_16, K_16},
{1, C_1, A_1, B_1},
+ {1, C_2, A_2, B_2},
{1, C_3, A_3, B_3},
{1, C_4, A_4, B_4},
{1, C_5, A_5, B_5},
@@ -112,7 +121,6 @@ const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
{1, F_14, D_14, E_14},
{1, F_15, D_15, E_15},
{1, F_16, D_16, E_16}
-
};
#define __ NO_LED
diff --git a/keyboards/keychron/q1/iso/keymaps/default/keymap.c b/keyboards/keychron/q1v1/iso/keymaps/default/keymap.c
index 080e2839c8..080e2839c8 100644
--- a/keyboards/keychron/q1/iso/keymaps/default/keymap.c
+++ b/keyboards/keychron/q1v1/iso/keymaps/default/keymap.c
diff --git a/keyboards/keychron/q1/iso/keymaps/keychron/keymap.c b/keyboards/keychron/q1v1/iso/keymaps/keychron/keymap.c
index d641f62c3f..d641f62c3f 100644
--- a/keyboards/keychron/q1/iso/keymaps/keychron/keymap.c
+++ b/keyboards/keychron/q1v1/iso/keymaps/keychron/keymap.c
diff --git a/keyboards/keychron/q1/iso/keymaps/keychron/rules.mk b/keyboards/keychron/q1v1/iso/keymaps/keychron/rules.mk
index 495e8907b4..495e8907b4 100644
--- a/keyboards/keychron/q1/iso/keymaps/keychron/rules.mk
+++ b/keyboards/keychron/q1v1/iso/keymaps/keychron/rules.mk
diff --git a/keyboards/keychron/q1/iso/keymaps/kubahorak/README.md b/keyboards/keychron/q1v1/iso/keymaps/kubahorak/README.md
index 3cfae17543..3cfae17543 100644
--- a/keyboards/keychron/q1/iso/keymaps/kubahorak/README.md
+++ b/keyboards/keychron/q1v1/iso/keymaps/kubahorak/README.md
diff --git a/keyboards/keychron/q1/iso/keymaps/kubahorak/config.h b/keyboards/keychron/q1v1/iso/keymaps/kubahorak/config.h
index 55dbb74d4a..55dbb74d4a 100644
--- a/keyboards/keychron/q1/iso/keymaps/kubahorak/config.h
+++ b/keyboards/keychron/q1v1/iso/keymaps/kubahorak/config.h
diff --git a/keyboards/keychron/q1/iso/keymaps/kubahorak/keymap.c b/keyboards/keychron/q1v1/iso/keymaps/kubahorak/keymap.c
index 479988dfa9..479988dfa9 100644
--- a/keyboards/keychron/q1/iso/keymaps/kubahorak/keymap.c
+++ b/keyboards/keychron/q1v1/iso/keymaps/kubahorak/keymap.c
diff --git a/keyboards/keychron/q1/iso/keymaps/kubahorak/keymap_user.h b/keyboards/keychron/q1v1/iso/keymaps/kubahorak/keymap_user.h
index 728114d556..728114d556 100644
--- a/keyboards/keychron/q1/iso/keymaps/kubahorak/keymap_user.h
+++ b/keyboards/keychron/q1v1/iso/keymaps/kubahorak/keymap_user.h
diff --git a/keyboards/keychron/q1/iso/keymaps/kubahorak/rgb_matrix_user.c b/keyboards/keychron/q1v1/iso/keymaps/kubahorak/rgb_matrix_user.c
index 638aa77eb0..638aa77eb0 100644
--- a/keyboards/keychron/q1/iso/keymaps/kubahorak/rgb_matrix_user.c
+++ b/keyboards/keychron/q1v1/iso/keymaps/kubahorak/rgb_matrix_user.c
diff --git a/keyboards/keychron/q1/iso/keymaps/kubahorak/rgb_matrix_user.h b/keyboards/keychron/q1v1/iso/keymaps/kubahorak/rgb_matrix_user.h
index dead454167..dead454167 100644
--- a/keyboards/keychron/q1/iso/keymaps/kubahorak/rgb_matrix_user.h
+++ b/keyboards/keychron/q1v1/iso/keymaps/kubahorak/rgb_matrix_user.h
diff --git a/keyboards/keychron/q1/iso/keymaps/kubahorak/rules.mk b/keyboards/keychron/q1v1/iso/keymaps/kubahorak/rules.mk
index af720e37ee..af720e37ee 100644
--- a/keyboards/keychron/q1/iso/keymaps/kubahorak/rules.mk
+++ b/keyboards/keychron/q1v1/iso/keymaps/kubahorak/rules.mk
diff --git a/keyboards/keychron/q1/iso/keymaps/mkillewald_iso/config.h b/keyboards/keychron/q1v1/iso/keymaps/mkillewald_iso/config.h
index bc9fe405c3..bc9fe405c3 100644
--- a/keyboards/keychron/q1/iso/keymaps/mkillewald_iso/config.h
+++ b/keyboards/keychron/q1v1/iso/keymaps/mkillewald_iso/config.h
diff --git a/keyboards/keychron/q1/iso/keymaps/mkillewald_iso/keymap.c b/keyboards/keychron/q1v1/iso/keymaps/mkillewald_iso/keymap.c
index f86a84e468..f86a84e468 100644
--- a/keyboards/keychron/q1/iso/keymaps/mkillewald_iso/keymap.c
+++ b/keyboards/keychron/q1v1/iso/keymaps/mkillewald_iso/keymap.c
diff --git a/keyboards/keychron/q1/iso/keymaps/mkillewald_iso/keymap_user.h b/keyboards/keychron/q1v1/iso/keymaps/mkillewald_iso/keymap_user.h
index 87b1baf47f..87b1baf47f 100644
--- a/keyboards/keychron/q1/iso/keymaps/mkillewald_iso/keymap_user.h
+++ b/keyboards/keychron/q1v1/iso/keymaps/mkillewald_iso/keymap_user.h
diff --git a/keyboards/keychron/q1/iso/keymaps/mkillewald_iso/readme.md b/keyboards/keychron/q1v1/iso/keymaps/mkillewald_iso/readme.md
index 25d835b1c0..25d835b1c0 100644
--- a/keyboards/keychron/q1/iso/keymaps/mkillewald_iso/readme.md
+++ b/keyboards/keychron/q1v1/iso/keymaps/mkillewald_iso/readme.md
diff --git a/keyboards/keychron/q1/iso/keymaps/mkillewald_iso/rgb_matrix_user.c b/keyboards/keychron/q1v1/iso/keymaps/mkillewald_iso/rgb_matrix_user.c
index c6fa5f1f15..c6fa5f1f15 100644
--- a/keyboards/keychron/q1/iso/keymaps/mkillewald_iso/rgb_matrix_user.c
+++ b/keyboards/keychron/q1v1/iso/keymaps/mkillewald_iso/rgb_matrix_user.c
diff --git a/keyboards/keychron/q1/iso/keymaps/mkillewald_iso/rgb_matrix_user.h b/keyboards/keychron/q1v1/iso/keymaps/mkillewald_iso/rgb_matrix_user.h
index 1fb79c0b2a..1fb79c0b2a 100644
--- a/keyboards/keychron/q1/iso/keymaps/mkillewald_iso/rgb_matrix_user.h
+++ b/keyboards/keychron/q1v1/iso/keymaps/mkillewald_iso/rgb_matrix_user.h
diff --git a/keyboards/keychron/q1/iso/keymaps/mkillewald_iso/rules.mk b/keyboards/keychron/q1v1/iso/keymaps/mkillewald_iso/rules.mk
index af720e37ee..af720e37ee 100644
--- a/keyboards/keychron/q1/iso/keymaps/mkillewald_iso/rules.mk
+++ b/keyboards/keychron/q1v1/iso/keymaps/mkillewald_iso/rules.mk
diff --git a/keyboards/keychron/q1/iso/keymaps/via/keymap.c b/keyboards/keychron/q1v1/iso/keymaps/via/keymap.c
index 4d9f158e1e..4d9f158e1e 100644
--- a/keyboards/keychron/q1/iso/keymaps/via/keymap.c
+++ b/keyboards/keychron/q1v1/iso/keymaps/via/keymap.c
diff --git a/keyboards/keychron/q1/iso/keymaps/via/rules.mk b/keyboards/keychron/q1v1/iso/keymaps/via/rules.mk
index 1e5b99807c..1e5b99807c 100644
--- a/keyboards/keychron/q1/iso/keymaps/via/rules.mk
+++ b/keyboards/keychron/q1v1/iso/keymaps/via/rules.mk
diff --git a/keyboards/keychron/q1/iso/keymaps/victorsavu3/config.h b/keyboards/keychron/q1v1/iso/keymaps/victorsavu3/config.h
index 02f08db4a7..02f08db4a7 100644
--- a/keyboards/keychron/q1/iso/keymaps/victorsavu3/config.h
+++ b/keyboards/keychron/q1v1/iso/keymaps/victorsavu3/config.h
diff --git a/keyboards/keychron/q1/iso/keymaps/victorsavu3/keymap.c b/keyboards/keychron/q1v1/iso/keymaps/victorsavu3/keymap.c
index 5256c97dca..5256c97dca 100644
--- a/keyboards/keychron/q1/iso/keymaps/victorsavu3/keymap.c
+++ b/keyboards/keychron/q1v1/iso/keymaps/victorsavu3/keymap.c
diff --git a/keyboards/keychron/q1/iso/keymaps/victorsavu3/readme.md b/keyboards/keychron/q1v1/iso/keymaps/victorsavu3/readme.md
index c96130816e..c96130816e 100644
--- a/keyboards/keychron/q1/iso/keymaps/victorsavu3/readme.md
+++ b/keyboards/keychron/q1v1/iso/keymaps/victorsavu3/readme.md
diff --git a/keyboards/keychron/q1/iso/keymaps/victorsavu3/rules.mk b/keyboards/keychron/q1v1/iso/keymaps/victorsavu3/rules.mk
index 853c414ec7..853c414ec7 100644
--- a/keyboards/keychron/q1/iso/keymaps/victorsavu3/rules.mk
+++ b/keyboards/keychron/q1v1/iso/keymaps/victorsavu3/rules.mk
diff --git a/keyboards/keychron/q1/iso/readme.md b/keyboards/keychron/q1v1/iso/readme.md
index 777ce04773..777ce04773 100644
--- a/keyboards/keychron/q1/iso/readme.md
+++ b/keyboards/keychron/q1v1/iso/readme.md
diff --git a/keyboards/keychron/q1v1/iso/rules.mk b/keyboards/keychron/q1v1/iso/rules.mk
new file mode 100644
index 0000000000..7ff128fa69
--- /dev/null
+++ b/keyboards/keychron/q1v1/iso/rules.mk
@@ -0,0 +1 @@
+# This file intentionally left blank \ No newline at end of file
diff --git a/keyboards/keychron/q1v1/iso_encoder/config.h b/keyboards/keychron/q1v1/iso_encoder/config.h
new file mode 100644
index 0000000000..0907aa14af
--- /dev/null
+++ b/keyboards/keychron/q1v1/iso_encoder/config.h
@@ -0,0 +1,23 @@
+/* Copyright 2021 @ Keychron (https://www.keychron.com)
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#pragma once
+
+/* RGB Matrix Configuration */
+#define RGB_MATRIX_LED_COUNT 83
+
+/* Enable caps-lock LED */
+#define CAPS_LOCK_LED_INDEX 44
diff --git a/keyboards/keychron/q1v1/iso_encoder/info.json b/keyboards/keychron/q1v1/iso_encoder/info.json
new file mode 100644
index 0000000000..780fc7ae82
--- /dev/null
+++ b/keyboards/keychron/q1v1/iso_encoder/info.json
@@ -0,0 +1,199 @@
+{
+ "usb": {
+ "pid": "0x0103",
+ "device_version": "1.0.2"
+ },
+ "diode_direction": "ROW2COL",
+ "encoder": {
+ "enabled": true,
+ "rotary": [
+ {"pin_a": "E6", "pin_b": "B7"}
+ ]
+ },
+ "rgb_matrix": {
+ "layout": [
+ {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1},
+ {"matrix": [0, 2], "x": 18, "y": 0, "flags": 1},
+ {"matrix": [0, 3], "x": 33, "y": 0, "flags": 1},
+ {"matrix": [0, 4], "x": 48, "y": 0, "flags": 1},
+ {"matrix": [0, 5], "x": 62, "y": 0, "flags": 1},
+ {"matrix": [0, 6], "x": 81, "y": 0, "flags": 1},
+ {"matrix": [0, 7], "x": 95, "y": 0, "flags": 1},
+ {"matrix": [0, 8], "x": 110, "y": 0, "flags": 1},
+ {"matrix": [0, 9], "x": 125, "y": 0, "flags": 1},
+ {"matrix": [0, 10], "x": 143, "y": 0, "flags": 1},
+ {"matrix": [0, 11], "x": 158, "y": 0, "flags": 1},
+ {"matrix": [0, 12], "x": 173, "y": 0, "flags": 1},
+ {"matrix": [0, 13], "x": 187, "y": 0, "flags": 1},
+ {"matrix": [4, 14], "x": 206, "y": 0, "flags": 1},
+ {"matrix": [0, 14], "x": 224, "y": 0, "flags": 1},
+
+ {"matrix": [1, 0], "x": 0, "y": 15, "flags": 1},
+ {"matrix": [1, 1], "x": 15, "y": 15, "flags": 4},
+ {"matrix": [1, 2], "x": 29, "y": 15, "flags": 4},
+ {"matrix": [1, 3], "x": 44, "y": 15, "flags": 4},
+ {"matrix": [1, 4], "x": 59, "y": 15, "flags": 4},
+ {"matrix": [1, 5], "x": 73, "y": 15, "flags": 4},
+ {"matrix": [1, 6], "x": 88, "y": 15, "flags": 4},
+ {"matrix": [1, 7], "x": 103, "y": 15, "flags": 4},
+ {"matrix": [1, 8], "x": 118, "y": 15, "flags": 4},
+ {"matrix": [1, 9], "x": 132, "y": 15, "flags": 4},
+ {"matrix": [1, 10], "x": 147, "y": 15, "flags": 4},
+ {"matrix": [1, 12], "x": 162, "y": 15, "flags": 4},
+ {"matrix": [1, 12], "x": 176, "y": 15, "flags": 4},
+ {"matrix": [1, 13], "x": 198, "y": 15, "flags": 1},
+ {"matrix": [1, 14], "x": 224, "y": 15, "flags": 1},
+
+ {"matrix": [2, 0], "x": 4, "y": 26, "flags": 1},
+ {"matrix": [2, 1], "x": 22, "y": 26, "flags": 4},
+ {"matrix": [2, 2], "x": 37, "y": 26, "flags": 4},
+ {"matrix": [2, 3], "x": 51, "y": 26, "flags": 4},
+ {"matrix": [2, 4], "x": 66, "y": 26, "flags": 4},
+ {"matrix": [2, 5], "x": 81, "y": 26, "flags": 4},
+ {"matrix": [2, 6], "x": 95, "y": 26, "flags": 4},
+ {"matrix": [2, 7], "x": 110, "y": 26, "flags": 4},
+ {"matrix": [2, 8], "x": 125, "y": 26, "flags": 4},
+ {"matrix": [2, 9], "x": 140, "y": 26, "flags": 4},
+ {"matrix": [2, 10], "x": 154, "y": 26, "flags": 4},
+ {"matrix": [2, 11], "x": 169, "y": 26, "flags": 4},
+ {"matrix": [2, 12], "x": 184, "y": 26, "flags": 4},
+ {"matrix": [2, 14], "x": 224, "y": 26, "flags": 1},
+
+ {"matrix": [3, 0], "x": 6, "y": 38, "flags": 1},
+ {"matrix": [3, 1], "x": 26, "y": 38, "flags": 4},
+ {"matrix": [3, 2], "x": 40, "y": 38, "flags": 4},
+ {"matrix": [3, 3], "x": 55, "y": 38, "flags": 4},
+ {"matrix": [3, 4], "x": 70, "y": 38, "flags": 4},
+ {"matrix": [3, 5], "x": 84, "y": 38, "flags": 4},
+ {"matrix": [3, 6], "x": 99, "y": 38, "flags": 4},
+ {"matrix": [3, 7], "x": 114, "y": 38, "flags": 4},
+ {"matrix": [3, 8], "x": 129, "y": 38, "flags": 4},
+ {"matrix": [3, 9], "x": 143, "y": 38, "flags": 4},
+ {"matrix": [3, 10], "x": 158, "y": 38, "flags": 4},
+ {"matrix": [3, 11], "x": 173, "y": 38, "flags": 4},
+ {"matrix": [3, 13], "x": 187, "y": 38, "flags": 4},
+ {"matrix": [2, 13], "x": 203, "y": 32, "flags": 1},
+ {"matrix": [3, 14], "x": 224, "y": 38, "flags": 1},
+
+ {"matrix": [4, 0], "x": 2, "y": 49, "flags": 1},
+ {"matrix": [4, 1], "x": 18, "y": 49, "flags": 4},
+ {"matrix": [4, 2], "x": 33, "y": 49, "flags": 4},
+ {"matrix": [4, 3], "x": 48, "y": 49, "flags": 4},
+ {"matrix": [4, 4], "x": 62, "y": 49, "flags": 4},
+ {"matrix": [4, 5], "x": 77, "y": 49, "flags": 4},
+ {"matrix": [4, 6], "x": 92, "y": 49, "flags": 4},
+ {"matrix": [4, 7], "x": 106, "y": 49, "flags": 4},
+ {"matrix": [4, 8], "x": 121, "y": 49, "flags": 4},
+ {"matrix": [4, 9], "x": 136, "y": 49, "flags": 4},
+ {"matrix": [4, 10], "x": 151, "y": 49, "flags": 4},
+ {"matrix": [4, 11], "x": 165, "y": 49, "flags": 4},
+ {"matrix": [4, 13], "x": 185, "y": 49, "flags": 1},
+ {"matrix": [3, 12], "x": 209, "y": 52, "flags": 1},
+
+ {"matrix": [5, 0], "x": 2, "y": 61, "flags": 1},
+ {"matrix": [5, 1], "x": 20, "y": 61, "flags": 1},
+ {"matrix": [5, 2], "x": 39, "y": 61, "flags": 1},
+ {"matrix": [5, 6], "x": 94, "y": 61, "flags": 4},
+ {"matrix": [5, 10], "x": 147, "y": 61, "flags": 1},
+ {"matrix": [5, 11], "x": 162, "y": 61, "flags": 1},
+ {"matrix": [5, 12], "x": 176, "y": 61, "flags": 1},
+ {"matrix": [5, 13], "x": 195, "y": 64, "flags": 1},
+ {"matrix": [4, 12], "x": 209, "y": 64, "flags": 1},
+ {"matrix": [5, 14], "x": 224, "y": 64, "flags": 1}
+ ]
+ },
+ "layouts": {
+ "LAYOUT_iso_83": {
+ "layout": [
+ {"matrix": [0, 0], "x": 0, "y": 0},
+ {"matrix": [0, 2], "x": 1.25, "y": 0},
+ {"matrix": [0, 3], "x": 2.25, "y": 0},
+ {"matrix": [0, 4], "x": 3.25, "y": 0},
+ {"matrix": [0, 5], "x": 4.25, "y": 0},
+ {"matrix": [0, 6], "x": 5.5, "y": 0},
+ {"matrix": [0, 7], "x": 6.5, "y": 0},
+ {"matrix": [0, 8], "x": 7.5, "y": 0},
+ {"matrix": [0, 9], "x": 8.5, "y": 0},
+ {"matrix": [0, 10], "x": 9.75, "y": 0},
+ {"matrix": [0, 11], "x": 10.75, "y": 0},
+ {"matrix": [0, 12], "x": 11.75, "y": 0},
+ {"matrix": [0, 13], "x": 12.75, "y": 0},
+ {"matrix": [4, 14], "x": 14, "y": 0},
+ {"matrix": [0, 14], "x": 15.25, "y": 0},
+
+ {"matrix": [1, 0], "x": 0, "y": 1.25},
+ {"matrix": [1, 1], "x": 1, "y": 1.25},
+ {"matrix": [1, 2], "x": 2, "y": 1.25},
+ {"matrix": [1, 3], "x": 3, "y": 1.25},
+ {"matrix": [1, 4], "x": 4, "y": 1.25},
+ {"matrix": [1, 5], "x": 5, "y": 1.25},
+ {"matrix": [1, 6], "x": 6, "y": 1.25},
+ {"matrix": [1, 7], "x": 7, "y": 1.25},
+ {"matrix": [1, 8], "x": 8, "y": 1.25},
+ {"matrix": [1, 9], "x": 9, "y": 1.25},
+ {"matrix": [1, 10], "x": 10, "y": 1.25},
+ {"matrix": [1, 11], "x": 11, "y": 1.25},
+ {"matrix": [1, 12], "x": 12, "y": 1.25},
+ {"matrix": [1, 13], "x": 13, "y": 1.25, "w": 2},
+ {"matrix": [1, 14], "x": 15.25, "y": 1.25},
+
+ {"matrix": [2, 0], "x": 0, "y": 2.25, "w": 1.5},
+ {"matrix": [2, 1], "x": 1.5, "y": 2.25},
+ {"matrix": [2, 2], "x": 2.5, "y": 2.25},
+ {"matrix": [2, 3], "x": 3.5, "y": 2.25},
+ {"matrix": [2, 4], "x": 4.5, "y": 2.25},
+ {"matrix": [2, 5], "x": 5.5, "y": 2.25},
+ {"matrix": [2, 6], "x": 6.5, "y": 2.25},
+ {"matrix": [2, 7], "x": 7.5, "y": 2.25},
+ {"matrix": [2, 8], "x": 8.5, "y": 2.25},
+ {"matrix": [2, 9], "x": 9.5, "y": 2.25},
+ {"matrix": [2, 10], "x": 10.5, "y": 2.25},
+ {"matrix": [2, 11], "x": 11.5, "y": 2.25},
+ {"matrix": [2, 12], "x": 12.5, "y": 2.25},
+ {"matrix": [2, 14], "x": 15.25, "y": 2.25},
+
+ {"matrix": [3, 0], "x": 0, "y": 3.25, "w": 1.75},
+ {"matrix": [3, 1], "x": 1.75, "y": 3.25},
+ {"matrix": [3, 2], "x": 2.75, "y": 3.25},
+ {"matrix": [3, 3], "x": 3.75, "y": 3.25},
+ {"matrix": [3, 4], "x": 4.75, "y": 3.25},
+ {"matrix": [3, 5], "x": 5.75, "y": 3.25},
+ {"matrix": [3, 6], "x": 6.75, "y": 3.25},
+ {"matrix": [3, 7], "x": 7.75, "y": 3.25},
+ {"matrix": [3, 8], "x": 8.75, "y": 3.25},
+ {"matrix": [3, 9], "x": 9.75, "y": 3.25},
+ {"matrix": [3, 10], "x": 10.75, "y": 3.25},
+ {"matrix": [3, 11], "x": 11.75, "y": 3.25},
+ {"matrix": [3, 13], "x": 12.75, "y": 3.25},
+ {"matrix": [2, 13], "x": 13.75, "y": 2.25, "w": 1.25, "h": 2},
+ {"matrix": [3, 14], "x": 15.25, "y": 3.25},
+
+ {"matrix": [4, 0], "x": 0, "y": 4.25, "w": 1.25},
+ {"matrix": [4, 1], "x": 1.25, "y": 4.25},
+ {"matrix": [4, 2], "x": 2.25, "y": 4.25},
+ {"matrix": [4, 3], "x": 3.25, "y": 4.25},
+ {"matrix": [4, 4], "x": 4.25, "y": 4.25},
+ {"matrix": [4, 5], "x": 5.25, "y": 4.25},
+ {"matrix": [4, 6], "x": 6.25, "y": 4.25},
+ {"matrix": [4, 7], "x": 7.25, "y": 4.25},
+ {"matrix": [4, 8], "x": 8.25, "y": 4.25},
+ {"matrix": [4, 9], "x": 9.25, "y": 4.25},
+ {"matrix": [4, 10], "x": 10.25, "y": 4.25},
+ {"matrix": [4, 11], "x": 11.25, "y": 4.25},
+ {"matrix": [4, 13], "x": 12.25, "y": 4.25, "w": 1.75},
+ {"matrix": [3, 12], "x": 14.25, "y": 4.5},
+
+ {"matrix": [5, 0], "x": 0, "y": 5.25, "w": 1.25},
+ {"matrix": [5, 1], "x": 1.25, "y": 5.25, "w": 1.25},
+ {"matrix": [5, 2], "x": 2.5, "y": 5.25, "w": 1.25},
+ {"matrix": [5, 6], "x": 3.75, "y": 5.25, "w": 6.25},
+ {"matrix": [5, 10], "x": 10, "y": 5.25},
+ {"matrix": [5, 11], "x": 11, "y": 5.25},
+ {"matrix": [5, 12], "x": 12, "y": 5.25},
+ {"matrix": [5, 13], "x": 13.25, "y": 5.5},
+ {"matrix": [4, 12], "x": 14.25, "y": 5.5},
+ {"matrix": [5, 14], "x": 15.25, "y": 5.5}
+ ]
+ }
+ }
+}
diff --git a/keyboards/keychron/q1/iso_encoder/iso_encoder.c b/keyboards/keychron/q1v1/iso_encoder/iso_encoder.c
index c6b091fff1..4a7496ed29 100644
--- a/keyboards/keychron/q1/iso_encoder/iso_encoder.c
+++ b/keyboards/keychron/q1v1/iso_encoder/iso_encoder.c
@@ -16,9 +16,18 @@
#include "quantum.h"
+const matrix_row_t matrix_mask[] = {
+ 0b0111111111111101,
+ 0b0111111111111111,
+ 0b0111111111111111,
+ 0b0111111111111111,
+ 0b0111111111111111,
+ 0b0111111111111111,
+};
+
#ifdef RGB_MATRIX_ENABLE
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3733_led_t PROGMEM g_is31fl3733_leds[RGB_MATRIX_LED_COUNT] = {
/* Refer to IS31 manual for these locations
* driver
* | R location
@@ -115,36 +124,4 @@ const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
{1, F_16, D_16, E_16}
};
-#define __ NO_LED
-
-led_config_t g_led_config = {
- {
- // Key Matrix to LED Index
- { 0, __, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14 },
- { 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29 },
- { 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 57, 43 },
- { 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 72, 56, 58 },
- { 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 81, 71, 13 },
- { 73, 74, 75, __, __, __, 76, __, __, __, 77, 78, 79, 80, 82 }
- },
- {
- // LED Index to Physical Position
- {0,0}, {18,0}, {33,0}, {48,0}, {62,0}, {81,0}, {95,0}, {110,0}, {125,0}, {143,0}, {158,0}, {173,0}, {187,0}, {206,0}, {224,0},
- {0,15}, {15,15}, {29,15}, {44,15}, {59,15}, {73,15}, {88,15}, {103,15}, {118,15}, {132,15}, {147,15}, {162,15}, {176,15}, {198,15}, {224,15},
- {4,26}, {22,26}, {37,26}, {51,26}, {66,26}, {81,26}, {95,26}, {110,26}, {125,26}, {140,26}, {154,26}, {169,26}, {184,26}, {224,26},
- {6,38}, {26,38}, {40,38}, {55,38}, {70,38}, {84,38}, {99,38}, {114,38}, {129,38}, {143,38}, {158,38}, {173,38}, {187,38}, {203,32}, {224,38},
- {2,49}, {18,49}, {33,49}, {48,49}, {62,49}, {77,49}, {92,49}, {106,49}, {121,49}, {136,49}, {151,49}, {165,49}, {185,49}, {209,52},
- {2,61}, {20,61}, {39,61}, {94,61}, {147,61}, {162,61}, {176,61}, {195,64}, {209,64}, {224,64}
- },
- {
- // RGB LED Index to Flag
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1,
- 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
- 9, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1,
- 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1,
- 1, 1, 1, 4, 1, 1, 1, 1, 1, 1
- }
-};
-
#endif // RGB_MATRIX_ENABLE
diff --git a/keyboards/keychron/q1/iso_encoder/keymaps/default/keymap.c b/keyboards/keychron/q1v1/iso_encoder/keymaps/default/keymap.c
index 237d9a3f1e..237d9a3f1e 100644
--- a/keyboards/keychron/q1/iso_encoder/keymaps/default/keymap.c
+++ b/keyboards/keychron/q1v1/iso_encoder/keymaps/default/keymap.c
diff --git a/keyboards/keychron/q1/iso_encoder/keymaps/default/rules.mk b/keyboards/keychron/q1v1/iso_encoder/keymaps/default/rules.mk
index a40474b4d5..a40474b4d5 100644
--- a/keyboards/keychron/q1/iso_encoder/keymaps/default/rules.mk
+++ b/keyboards/keychron/q1v1/iso_encoder/keymaps/default/rules.mk
diff --git a/keyboards/keychron/q1/iso_encoder/keymaps/keychron/keymap.c b/keyboards/keychron/q1v1/iso_encoder/keymaps/keychron/keymap.c
index b007e56fba..b007e56fba 100644
--- a/keyboards/keychron/q1/iso_encoder/keymaps/keychron/keymap.c
+++ b/keyboards/keychron/q1v1/iso_encoder/keymaps/keychron/keymap.c
diff --git a/keyboards/keychron/q1/iso_encoder/keymaps/keychron/rules.mk b/keyboards/keychron/q1v1/iso_encoder/keymaps/keychron/rules.mk
index 2d17902f98..2d17902f98 100644
--- a/keyboards/keychron/q1/iso_encoder/keymaps/keychron/rules.mk
+++ b/keyboards/keychron/q1v1/iso_encoder/keymaps/keychron/rules.mk
diff --git a/keyboards/keychron/q1/iso_encoder/keymaps/via/keymap.c b/keyboards/keychron/q1v1/iso_encoder/keymaps/via/keymap.c
index 47f04d8a29..47f04d8a29 100644
--- a/keyboards/keychron/q1/iso_encoder/keymaps/via/keymap.c
+++ b/keyboards/keychron/q1v1/iso_encoder/keymaps/via/keymap.c
diff --git a/keyboards/keychron/q1/iso_encoder/keymaps/via/rules.mk b/keyboards/keychron/q1v1/iso_encoder/keymaps/via/rules.mk
index 4253f570f0..4253f570f0 100644
--- a/keyboards/keychron/q1/iso_encoder/keymaps/via/rules.mk
+++ b/keyboards/keychron/q1v1/iso_encoder/keymaps/via/rules.mk
diff --git a/keyboards/keychron/q1/iso_encoder/readme.md b/keyboards/keychron/q1v1/iso_encoder/readme.md
index 66db24a197..66db24a197 100644
--- a/keyboards/keychron/q1/iso_encoder/readme.md
+++ b/keyboards/keychron/q1v1/iso_encoder/readme.md
diff --git a/keyboards/keychron/q1v1/iso_encoder/rules.mk b/keyboards/keychron/q1v1/iso_encoder/rules.mk
new file mode 100644
index 0000000000..6968c52335
--- /dev/null
+++ b/keyboards/keychron/q1v1/iso_encoder/rules.mk
@@ -0,0 +1,2 @@
+# This file intentionally left blank
+
diff --git a/keyboards/keychron/q1v1/q1v1.c b/keyboards/keychron/q1v1/q1v1.c
new file mode 100644
index 0000000000..2ed907adb9
--- /dev/null
+++ b/keyboards/keychron/q1v1/q1v1.c
@@ -0,0 +1,73 @@
+/* Copyright 2021 @ Keychron (https://www.keychron.com)
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "quantum.h"
+
+#ifdef DIP_SWITCH_ENABLE
+
+bool dip_switch_update_kb(uint8_t index, bool active) {
+ if (!dip_switch_update_user(index, active)) { return false;}
+ if (index == 0) {
+ default_layer_set(1UL << (active ? 2 : 0));
+ }
+ return true;
+}
+
+#endif // DIP_SWITCH_ENABLE
+
+#if defined(RGB_MATRIX_ENABLE) && defined(CAPS_LOCK_LED_INDEX)
+
+bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
+ if (!process_record_user(keycode, record)) { return false; }
+ switch (keycode) {
+#ifdef RGB_MATRIX_ENABLE
+ case RGB_TOG:
+ if (record->event.pressed) {
+ switch (rgb_matrix_get_flags()) {
+ case LED_FLAG_ALL: {
+ rgb_matrix_set_flags(LED_FLAG_NONE);
+ rgb_matrix_set_color_all(0, 0, 0);
+ } break;
+ default: {
+ rgb_matrix_set_flags(LED_FLAG_ALL);
+ } break;
+ }
+ }
+ if (!rgb_matrix_is_enabled()) {
+ rgb_matrix_set_flags(LED_FLAG_ALL);
+ rgb_matrix_enable();
+ }
+ return false;
+#endif
+ }
+ 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; }
+ // RGB_MATRIX_INDICATOR_SET_COLOR(index, red, green, blue);
+
+ if (host_keyboard_led_state().caps_lock) {
+ RGB_MATRIX_INDICATOR_SET_COLOR(CAPS_LOCK_LED_INDEX, 255, 255, 255);
+ } else {
+ if (!rgb_matrix_get_flags()) {
+ RGB_MATRIX_INDICATOR_SET_COLOR(CAPS_LOCK_LED_INDEX, 0, 0, 0);
+ }
+ }
+ return true;
+}
+
+#endif // CAPS_LOCK_LED_INDEX \ No newline at end of file
diff --git a/keyboards/keychron/q1v1/readme.md b/keyboards/keychron/q1v1/readme.md
new file mode 100644
index 0000000000..af54da8195
--- /dev/null
+++ b/keyboards/keychron/q1v1/readme.md
@@ -0,0 +1,27 @@
+# Keychron Q1v1
+
+![Keychron Q1v1](https://i.imgur.com/BbJNGLY.jpg)
+
+A customizable 75% keyboard.
+
+* Keyboard Maintainer: [Keychron](https://github.com/keychron)
+* Hardware Supported: Keychron Q1v1
+* Hardware Availability: [Keychron Q1v1 QMK Custom Mechanical Keyboard](https://www.keychron.com/products/keychron-q1-qmk-custom-mechanical-keyboard)
+
+Make example for this keyboard (after setting up your build environment):
+
+ make keychron/q1v1/ansi:default
+ make keychron/q1v1/ansi_encoder:default
+ make keychron/q1v1/iso:default
+ make keychron/q1v1/iso_encoder:default
+
+Flashing example for this keyboard:
+
+ make keychron/q1v1/ansi:default:flash
+ make keychron/q1v1/ansi_encoder:default:flash
+ make keychron/q1v1/iso:default:flash
+ make keychron/q1v1/iso_encoder:default:flash
+
+**Reset Key**: Hold down the key located at *K00*, commonly programmed as *Esc* while plugging in the keyboard.
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). \ No newline at end of file
diff --git a/keyboards/keychron/q2/ansi/ansi.c b/keyboards/keychron/q2/ansi/ansi.c
index 28f91269c4..d0ff0a1869 100644
--- a/keyboards/keychron/q2/ansi/ansi.c
+++ b/keyboards/keychron/q2/ansi/ansi.c
@@ -17,8 +17,8 @@
#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
-const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to CKLED manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | R location
* | | G location
@@ -97,33 +97,4 @@ const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
{1, F_16, D_16, E_16},
};
-#define __ NO_LED
-
-led_config_t g_led_config = {
- {
- // Key Matrix to LED Index
- { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 },
- { 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29 },
- { 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 65, 42, 43 },
- { 44, __, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, __, 55, 56 },
- { 57, 58, 59, __, __, __, 60, __, __, __, 61, 62, 63, 64, 66 }
- },
- {
- // LED Index to Physical Position
- {0,0}, {15,0}, {29,0}, {44,0}, {59,0}, {73,0}, {88,0}, {103,0}, {118,0}, {132,0}, {147,0}, {162,0}, {176,0}, {198,0}, {224,0},
- {4,15}, {22,15}, {37,15}, {51,15}, {66,15}, {81,15}, {95,15}, {110,15}, {125,15}, {140,15}, {154,15}, {169,15}, {184,15}, {202,15}, {224,15},
- {6,30}, {26,30}, {40,30}, {55,30}, {70,30}, {84,30}, {99,30}, {114,30}, {129,30}, {143,30}, {158,30}, {173,30}, {196,30}, {224,30},
- {9,45}, {33,45}, {48,45}, {62,45}, {77,45}, {92,45}, {106,45}, {121,45}, {136,45}, {151,45}, {165,45}, {185,45}, {209,49},
- {2,60}, {20,60}, {39,60}, {94,60}, {147,60}, {162,60}, {176,60}, {195,64}, {209,64}, {224,64}
- },
- {
- // RGB LED Index to Flag
- 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1,
- 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1,
- 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1,
- 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1,
- 1, 1, 1, 4, 1, 1, 1, 1, 1, 1
- }
-};
-
#endif // RGB_MATRIX_ENABLE
diff --git a/keyboards/keychron/q2/ansi/config.h b/keyboards/keychron/q2/ansi/config.h
index 6c39432b74..41b92074be 100644
--- a/keyboards/keychron/q2/ansi/config.h
+++ b/keyboards/keychron/q2/ansi/config.h
@@ -17,6 +17,7 @@
#pragma once
/* RGB Matrix Configuration */
-#define DRIVER_1_LED_TOTAL 34
-#define DRIVER_2_LED_TOTAL 33
-#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
+#define RGB_MATRIX_LED_COUNT 67
+
+/* Enable caps-lock LED */
+#define CAPS_LOCK_LED_INDEX 30 \ No newline at end of file
diff --git a/keyboards/keychron/q2/ansi/info.json b/keyboards/keychron/q2/ansi/info.json
index 8ed601fe8f..d419d31eef 100644
--- a/keyboards/keychron/q2/ansi/info.json
+++ b/keyboards/keychron/q2/ansi/info.json
@@ -1,23 +1,84 @@
{
- "keyboard_name": "Q2",
- "manufacturer": "Keychron",
- "url": "https://github.com/Keychron",
- "maintainer": "lalalademaxiya1",
"usb": {
- "vid": "0x3434",
"pid": "0x0110",
"device_version": "1.0.0"
},
"rgb_matrix": {
- "driver": "ckled2001"
- },
- "matrix_pins": {
- "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"],
- "rows": ["B4", "B3", "A15", "A14", "A13"]
+ "layout": [
+ {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1},
+ {"matrix": [0, 1], "x": 15, "y": 0, "flags": 4},
+ {"matrix": [0, 2], "x": 29, "y": 0, "flags": 4},
+ {"matrix": [0, 3], "x": 44, "y": 0, "flags": 4},
+ {"matrix": [0, 4], "x": 59, "y": 0, "flags": 4},
+ {"matrix": [0, 5], "x": 73, "y": 0, "flags": 4},
+ {"matrix": [0, 6], "x": 88, "y": 0, "flags": 4},
+ {"matrix": [0, 7], "x": 103, "y": 0, "flags": 4},
+ {"matrix": [0, 8], "x": 118, "y": 0, "flags": 4},
+ {"matrix": [0, 9], "x": 132, "y": 0, "flags": 4},
+ {"matrix": [0, 10], "x": 147, "y": 0, "flags": 4},
+ {"matrix": [0, 11], "x": 162, "y": 0, "flags": 4},
+ {"matrix": [0, 12], "x": 176, "y": 0, "flags": 4},
+ {"matrix": [0, 13], "x": 198, "y": 0, "flags": 1},
+ {"matrix": [0, 14], "x": 224, "y": 0, "flags": 1},
+
+ {"matrix": [1, 0], "x": 4, "y": 15, "flags": 1},
+ {"matrix": [1, 1], "x": 22, "y": 15, "flags": 4},
+ {"matrix": [1, 2], "x": 37, "y": 15, "flags": 4},
+ {"matrix": [1, 3], "x": 51, "y": 15, "flags": 4},
+ {"matrix": [1, 4], "x": 66, "y": 15, "flags": 4},
+ {"matrix": [1, 5], "x": 81, "y": 15, "flags": 4},
+ {"matrix": [1, 6], "x": 95, "y": 15, "flags": 4},
+ {"matrix": [1, 7], "x": 110, "y": 15, "flags": 4},
+ {"matrix": [1, 8], "x": 125, "y": 15, "flags": 4},
+ {"matrix": [1, 9], "x": 140, "y": 15, "flags": 4},
+ {"matrix": [1, 10], "x": 154, "y": 15, "flags": 4},
+ {"matrix": [1, 11], "x": 169, "y": 15, "flags": 4},
+ {"matrix": [1, 12], "x": 184, "y": 15, "flags": 4},
+ {"matrix": [1, 13], "x": 202, "y": 15, "flags": 1},
+ {"matrix": [1, 14], "x": 224, "y": 15, "flags": 1},
+
+ {"matrix": [2, 0], "x": 6, "y": 30, "flags": 1},
+ {"matrix": [2, 1], "x": 26, "y": 30, "flags": 4},
+ {"matrix": [2, 2], "x": 40, "y": 30, "flags": 4},
+ {"matrix": [2, 3], "x": 55, "y": 30, "flags": 4},
+ {"matrix": [2, 4], "x": 70, "y": 30, "flags": 4},
+ {"matrix": [2, 5], "x": 84, "y": 30, "flags": 4},
+ {"matrix": [2, 6], "x": 99, "y": 30, "flags": 4},
+ {"matrix": [2, 7], "x": 114, "y": 30, "flags": 4},
+ {"matrix": [2, 8], "x": 129, "y": 30, "flags": 4},
+ {"matrix": [2, 9], "x": 143, "y": 30, "flags": 4},
+ {"matrix": [2, 10], "x": 158, "y": 30, "flags": 4},
+ {"matrix": [2, 11], "x": 173, "y": 30, "flags": 4},
+ {"matrix": [2, 13], "x": 196, "y": 30, "flags": 1},
+ {"matrix": [2, 14], "x": 224, "y": 30, "flags": 1},
+
+ {"matrix": [3, 0], "x": 9, "y": 45, "flags": 1},
+ {"matrix": [3, 2], "x": 33, "y": 45, "flags": 4},
+ {"matrix": [3, 3], "x": 48, "y": 45, "flags": 4},
+ {"matrix": [3, 4], "x": 62, "y": 45, "flags": 4},
+ {"matrix": [3, 5], "x": 77, "y": 45, "flags": 4},
+ {"matrix": [3, 6], "x": 92, "y": 45, "flags": 4},
+ {"matrix": [3, 7], "x": 106, "y": 45, "flags": 4},
+ {"matrix": [3, 8], "x": 121, "y": 45, "flags": 4},
+ {"matrix": [3, 9], "x": 136, "y": 45, "flags": 4},
+ {"matrix": [3, 10], "x": 151, "y": 45, "flags": 4},
+ {"matrix": [3, 11], "x": 165, "y": 45, "flags": 4},
+ {"matrix": [3, 13], "x": 185, "y": 45, "flags": 1},
+ {"matrix": [3, 14], "x": 209, "y": 49, "flags": 1},
+
+ {"matrix": [4, 0], "x": 2, "y": 60, "flags": 1},
+ {"matrix": [4, 1], "x": 20, "y": 60, "flags": 1},
+ {"matrix": [4, 2], "x": 39, "y": 60, "flags": 1},
+ {"matrix": [4, 6], "x": 94, "y": 60, "flags": 4},
+ {"matrix": [4, 10], "x": 147, "y": 60, "flags": 1},
+ {"matrix": [4, 11], "x": 162, "y": 60, "flags": 1},
+ {"matrix": [4, 12], "x": 176, "y": 60, "flags": 1},
+ {"matrix": [4, 13], "x": 195, "y": 64, "flags": 1},
+ {"matrix": [2, 12], "x": 209, "y": 64, "flags": 1},
+ {"matrix": [4, 14], "x": 224, "y": 64, "flags": 1}
+
+ ]
},
- "diode_direction": "ROW2COL",
- "processor": "STM32L432",
- "bootloader": "stm32-dfu",
"layouts": {
"LAYOUT_ansi_67": {
"layout": [
diff --git a/keyboards/keychron/q2/ansi/rules.mk b/keyboards/keychron/q2/ansi/rules.mk
index ede7d6fab2..7ff128fa69 100644
--- a/keyboards/keychron/q2/ansi/rules.mk
+++ b/keyboards/keychron/q2/ansi/rules.mk
@@ -1,18 +1 @@
-# Build Options
-# change yes to no to disable
-#
-BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
-MOUSEKEY_ENABLE = yes # Mouse keys
-EXTRAKEY_ENABLE = yes # Audio control and System control
-CONSOLE_ENABLE = no # Console for debug
-COMMAND_ENABLE = no # Commands for debug and configuration
-NKRO_ENABLE = yes # Enable N-Key Rollover
-BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
-RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
-AUDIO_ENABLE = no # Audio output
-ENCODER_ENABLE = no # Enable Encoder
-DIP_SWITCH_ENABLE = yes
-RGB_MATRIX_ENABLE = yes
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = embedded_flash
-
+# This file intentionally left blank \ No newline at end of file
diff --git a/keyboards/keychron/q2/ansi_encoder/ansi_encoder.c b/keyboards/keychron/q2/ansi_encoder/ansi_encoder.c
index 28f91269c4..d0ff0a1869 100644
--- a/keyboards/keychron/q2/ansi_encoder/ansi_encoder.c
+++ b/keyboards/keychron/q2/ansi_encoder/ansi_encoder.c
@@ -17,8 +17,8 @@
#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
-const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to CKLED manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | R location
* | | G location
@@ -97,33 +97,4 @@ const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
{1, F_16, D_16, E_16},
};
-#define __ NO_LED
-
-led_config_t g_led_config = {
- {
- // Key Matrix to LED Index
- { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 },
- { 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29 },
- { 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 65, 42, 43 },
- { 44, __, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, __, 55, 56 },
- { 57, 58, 59, __, __, __, 60, __, __, __, 61, 62, 63, 64, 66 }
- },
- {
- // LED Index to Physical Position
- {0,0}, {15,0}, {29,0}, {44,0}, {59,0}, {73,0}, {88,0}, {103,0}, {118,0}, {132,0}, {147,0}, {162,0}, {176,0}, {198,0}, {224,0},
- {4,15}, {22,15}, {37,15}, {51,15}, {66,15}, {81,15}, {95,15}, {110,15}, {125,15}, {140,15}, {154,15}, {169,15}, {184,15}, {202,15}, {224,15},
- {6,30}, {26,30}, {40,30}, {55,30}, {70,30}, {84,30}, {99,30}, {114,30}, {129,30}, {143,30}, {158,30}, {173,30}, {196,30}, {224,30},
- {9,45}, {33,45}, {48,45}, {62,45}, {77,45}, {92,45}, {106,45}, {121,45}, {136,45}, {151,45}, {165,45}, {185,45}, {209,49},
- {2,60}, {20,60}, {39,60}, {94,60}, {147,60}, {162,60}, {176,60}, {195,64}, {209,64}, {224,64}
- },
- {
- // RGB LED Index to Flag
- 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1,
- 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1,
- 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1,
- 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1,
- 1, 1, 1, 4, 1, 1, 1, 1, 1, 1
- }
-};
-
#endif // RGB_MATRIX_ENABLE
diff --git a/keyboards/keychron/q2/ansi_encoder/config.h b/keyboards/keychron/q2/ansi_encoder/config.h
index b7e4b1e7f8..41b92074be 100644
--- a/keyboards/keychron/q2/ansi_encoder/config.h
+++ b/keyboards/keychron/q2/ansi_encoder/config.h
@@ -17,9 +17,7 @@
#pragma once
/* RGB Matrix Configuration */
-#define DRIVER_1_LED_TOTAL 34
-#define DRIVER_2_LED_TOTAL 33
-#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
+#define RGB_MATRIX_LED_COUNT 67
-/* Encoder used pins */
-#define ENCODER_DEFAULT_POS 0x3
+/* Enable caps-lock LED */
+#define CAPS_LOCK_LED_INDEX 30 \ No newline at end of file
diff --git a/keyboards/keychron/q2/ansi_encoder/info.json b/keyboards/keychron/q2/ansi_encoder/info.json
index c9587d20ea..1e1f22bada 100644
--- a/keyboards/keychron/q2/ansi_encoder/info.json
+++ b/keyboards/keychron/q2/ansi_encoder/info.json
@@ -1,28 +1,90 @@
{
- "keyboard_name": "Q2",
- "manufacturer": "Keychron",
- "url": "https://github.com/Keychron",
- "maintainer": "lalalademaxiya1",
"usb": {
- "vid": "0x3434",
"pid": "0x0111",
"device_version": "1.0.0"
},
- "rgb_matrix": {
- "driver": "ckled2001"
- },
- "matrix_pins": {
- "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"],
- "rows": ["B4", "B3", "A15", "A14", "A13"]
- },
- "diode_direction": "ROW2COL",
"encoder": {
+ "enabled": true,
"rotary": [
{"pin_a": "A10", "pin_b": "B5"}
]
},
- "processor": "STM32L432",
- "bootloader": "stm32-dfu",
+ "rgb_matrix": {
+ "layout": [
+ {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1},
+ {"matrix": [0, 1], "x": 15, "y": 0, "flags": 4},
+ {"matrix": [0, 2], "x": 29, "y": 0, "flags": 4},
+ {"matrix": [0, 3], "x": 44, "y": 0, "flags": 4},
+ {"matrix": [0, 4], "x": 59, "y": 0, "flags": 4},
+ {"matrix": [0, 5], "x": 73, "y": 0, "flags": 4},
+ {"matrix": [0, 6], "x": 88, "y": 0, "flags": 4},
+ {"matrix": [0, 7], "x": 103, "y": 0, "flags": 4},
+ {"matrix": [0, 8], "x": 118, "y": 0, "flags": 4},
+ {"matrix": [0, 9], "x": 132, "y": 0, "flags": 4},
+ {"matrix": [0, 10], "x": 147, "y": 0, "flags": 4},
+ {"matrix": [0, 11], "x": 162, "y": 0, "flags": 4},
+ {"matrix": [0, 12], "x": 176, "y": 0, "flags": 4},
+ {"matrix": [0, 13], "x": 198, "y": 0, "flags": 1},
+ {"matrix": [0, 14], "x": 224, "y": 0, "flags": 1},
+
+ {"matrix": [1, 0], "x": 4, "y": 15, "flags": 1},
+ {"matrix": [1, 1], "x": 22, "y": 15, "flags": 4},
+ {"matrix": [1, 2], "x": 37, "y": 15, "flags": 4},
+ {"matrix": [1, 3], "x": 51, "y": 15, "flags": 4},
+ {"matrix": [1, 4], "x": 66, "y": 15, "flags": 4},
+ {"matrix": [1, 5], "x": 81, "y": 15, "flags": 4},
+ {"matrix": [1, 6], "x": 95, "y": 15, "flags": 4},
+ {"matrix": [1, 7], "x": 110, "y": 15, "flags": 4},
+ {"matrix": [1, 8], "x": 125, "y": 15, "flags": 4},
+ {"matrix": [1, 9], "x": 140, "y": 15, "flags": 4},
+ {"matrix": [1, 10], "x": 154, "y": 15, "flags": 4},
+ {"matrix": [1, 11], "x": 169, "y": 15, "flags": 4},
+ {"matrix": [1, 12], "x": 184, "y": 15, "flags": 4},
+ {"matrix": [1, 13], "x": 202, "y": 15, "flags": 1},
+ {"matrix": [1, 14], "x": 224, "y": 15, "flags": 1},
+
+ {"matrix": [2, 0], "x": 6, "y": 30, "flags": 1},
+ {"matrix": [2, 1], "x": 26, "y": 30, "flags": 4},
+ {"matrix": [2, 2], "x": 40, "y": 30, "flags": 4},
+ {"matrix": [2, 3], "x": 55, "y": 30, "flags": 4},
+ {"matrix": [2, 4], "x": 70, "y": 30, "flags": 4},
+ {"matrix": [2, 5], "x": 84, "y": 30, "flags": 4},
+ {"matrix": [2, 6], "x": 99, "y": 30, "flags": 4},
+ {"matrix": [2, 7], "x": 114, "y": 30, "flags": 4},
+ {"matrix": [2, 8], "x": 129, "y": 30, "flags": 4},
+ {"matrix": [2, 9], "x": 143, "y": 30, "flags": 4},
+ {"matrix": [2, 10], "x": 158, "y": 30, "flags": 4},
+ {"matrix": [2, 11], "x": 173, "y": 30, "flags": 4},
+ {"matrix": [2, 13], "x": 196, "y": 30, "flags": 1},
+ {"matrix": [2, 14], "x": 224, "y": 30, "flags": 1},
+
+ {"matrix": [3, 0], "x": 9, "y": 45, "flags": 1},
+ {"matrix": [3, 2], "x": 33, "y": 45, "flags": 4},
+ {"matrix": [3, 3], "x": 48, "y": 45, "flags": 4},
+ {"matrix": [3, 4], "x": 62, "y": 45, "flags": 4},
+ {"matrix": [3, 5], "x": 77, "y": 45, "flags": 4},
+ {"matrix": [3, 6], "x": 92, "y": 45, "flags": 4},
+ {"matrix": [3, 7], "x": 106, "y": 45, "flags": 4},
+ {"matrix": [3, 8], "x": 121, "y": 45, "flags": 4},
+ {"matrix": [3, 9], "x": 136, "y": 45, "flags": 4},
+ {"matrix": [3, 10], "x": 151, "y": 45, "flags": 4},
+ {"matrix": [3, 11], "x": 165, "y": 45, "flags": 4},
+ {"matrix": [3, 13], "x": 185, "y": 45, "flags": 1},
+ {"matrix": [3, 14], "x": 209, "y": 49, "flags": 1},
+
+ {"matrix": [4, 0], "x": 2, "y": 60, "flags": 1},
+ {"matrix": [4, 1], "x": 20, "y": 60, "flags": 1},
+ {"matrix": [4, 2], "x": 39, "y": 60, "flags": 1},
+ {"matrix": [4, 6], "x": 94, "y": 60, "flags": 4},
+ {"matrix": [4, 10], "x": 147, "y": 60, "flags": 1},
+ {"matrix": [4, 11], "x": 162, "y": 60, "flags": 1},
+ {"matrix": [4, 12], "x": 176, "y": 60, "flags": 1},
+ {"matrix": [4, 13], "x": 195, "y": 64, "flags": 1},
+ {"matrix": [2, 12], "x": 209, "y": 64, "flags": 1},
+ {"matrix": [4, 14], "x": 224, "y": 64, "flags": 1}
+
+ ]
+ },
"layouts": {
"LAYOUT_ansi_67": {
"layout": [
diff --git a/keyboards/keychron/q2/ansi_encoder/rules.mk b/keyboards/keychron/q2/ansi_encoder/rules.mk
index b294cf950e..7ff128fa69 100644
--- a/keyboards/keychron/q2/ansi_encoder/rules.mk
+++ b/keyboards/keychron/q2/ansi_encoder/rules.mk
@@ -1,18 +1 @@
-# Build Options
-# change yes to no to disable
-#
-BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
-MOUSEKEY_ENABLE = yes # Mouse keys
-EXTRAKEY_ENABLE = yes # Audio control and System control
-CONSOLE_ENABLE = no # Console for debug
-COMMAND_ENABLE = no # Commands for debug and configuration
-NKRO_ENABLE = yes # Enable N-Key Rollover
-BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
-RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
-AUDIO_ENABLE = no # Audio output
-ENCODER_ENABLE = yes # Enable Encoder
-DIP_SWITCH_ENABLE = yes
-RGB_MATRIX_ENABLE = yes
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = embedded_flash
-
+# This file intentionally left blank \ No newline at end of file
diff --git a/keyboards/keychron/q2/config.h b/keyboards/keychron/q2/config.h
index 63e31cd01d..9b17851400 100644
--- a/keyboards/keychron/q2/config.h
+++ b/keyboards/keychron/q2/config.h
@@ -22,12 +22,11 @@
#define DIP_SWITCH_MATRIX_GRID { {4, 4} }
/* RGB Matrix Driver Configuration */
-#define DRIVER_COUNT 2
-#define DRIVER_ADDR_1 0b1110111
-#define DRIVER_ADDR_2 0b1110100
+#define SNLED27351_DRIVER_COUNT 2
+#define DRIVER_ADDR_1 SNLED27351_I2C_ADDRESS_VDDIO
+#define DRIVER_ADDR_2 SNLED27351_I2C_ADDRESS_GND
-/* Scan phase of led driver set as MSKPHASE_9CHANNEL(defined as 0x03 in CKLED2001.h) */
-#define PHASE_CHANNEL MSKPHASE_9CHANNEL
+#define SNLED27351_PHASE_CHANNEL SNLED27351_MSKPHASE_9CHANNEL
/* Disable DIP switch in matrix data */
#define MATRIX_MASKED
@@ -35,61 +34,8 @@
/* turn off effects when suspended */
#define RGB_DISABLE_WHEN_USB_SUSPENDED
-/* Use 5 dynamic keymap layers */
-#define DYNAMIC_KEYMAP_LAYER_COUNT 5
-
-/* EEPROM Driver Configuration */
-#define WEAR_LEVELING_LOGICAL_SIZE 2048
-#define WEAR_LEVELING_BACKING_SIZE (WEAR_LEVELING_LOGICAL_SIZE * 2)
-
-// RGB Matrix Animation modes. Explicitly enabled
-// For full list of effects, see:
-// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects
-// #define ENABLE_RGB_MATRIX_ALPHAS_MODS
-// #define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN
-// #define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT
-#define ENABLE_RGB_MATRIX_BREATHING
-// #define ENABLE_RGB_MATRIX_BAND_SAT
-// #define ENABLE_RGB_MATRIX_BAND_VAL
-// #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
-// #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL
-// #define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT
-#define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL
-#define ENABLE_RGB_MATRIX_CYCLE_ALL
-#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
-#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN
-#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
-#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN
-#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
-#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL
-#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL
-#define ENABLE_RGB_MATRIX_DUAL_BEACON
-#define ENABLE_RGB_MATRIX_RAINBOW_BEACON
-// #define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS
-// #define ENABLE_RGB_MATRIX_RAINDROPS
-#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
-// #define ENABLE_RGB_MATRIX_HUE_BREATHING
-// #define ENABLE_RGB_MATRIX_HUE_PENDULUM
-// #define ENABLE_RGB_MATRIX_HUE_WAVE
-#define ENABLE_RGB_MATRIX_PIXEL_RAIN
-// #define ENABLE_RGB_MATRIX_PIXEL_FLOW
-// #define ENABLE_RGB_MATRIX_PIXEL_FRACTAL
-// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined
-#define ENABLE_RGB_MATRIX_TYPING_HEATMAP
-#define ENABLE_RGB_MATRIX_DIGITAL_RAIN
-// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined
-#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
-// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE
-// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
-#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
-// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
-// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
-// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
-#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
-#define ENABLE_RGB_MATRIX_SPLASH
-// #define ENABLE_RGB_MATRIX_MULTISPLASH
-#define ENABLE_RGB_MATRIX_SOLID_SPLASH
-// #define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
+/* Encoder Configuration*/
+#define ENCODER_DEFAULT_POS 0x3
#define RGB_MATRIX_KEYPRESSES
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
diff --git a/keyboards/keychron/q2/info.json b/keyboards/keychron/q2/info.json
new file mode 100644
index 0000000000..47d9aa83b1
--- /dev/null
+++ b/keyboards/keychron/q2/info.json
@@ -0,0 +1,60 @@
+{
+ "keyboard_name": "Keychron Q2",
+ "manufacturer": "Keychron",
+ "maintainer": "lalalademaxiya1",
+ "bootloader": "stm32-dfu",
+ "diode_direction": "ROW2COL",
+ "dynamic_keymap": {
+ "layer_count": 5
+ },
+ "eeprom": {
+ "wear_leveling": {
+ "backing_size": 4096
+ }
+ },
+ "features": {
+ "bootmagic": true,
+ "command": false,
+ "console": false,
+ "dip_switch": true,
+ "extrakey": true,
+ "mousekey": true,
+ "nkro": true,
+ "rgb_matrix": true
+ },
+ "matrix_pins": {
+ "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"],
+ "rows": ["B4", "B3", "A15", "A14", "A13"]
+ },
+ "processor": "STM32L432",
+ "rgb_matrix": {
+ "animations": {
+ "band_spiral_val": true,
+ "breathing": true,
+ "cycle_all": true,
+ "cycle_left_right": 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,
+ "jellybean_raindrops": true,
+ "pixel_rain": true,
+ "rainbow_beacon": true,
+ "rainbow_moving_chevron": true,
+ "solid_reactive_multinexus": true,
+ "solid_reactive_multiwide": true,
+ "solid_reactive_simple": true,
+ "solid_splash": true,
+ "splash": true,
+ "typing_heatmap": true
+ },
+ "driver": "snled27351"
+ },
+ "url": "https://github.com/Keychron",
+ "usb": {
+ "vid": "0x3434"
+ }
+} \ No newline at end of file
diff --git a/keyboards/keychron/q2/iso/config.h b/keyboards/keychron/q2/iso/config.h
index 35a86d5839..b463f7886e 100644
--- a/keyboards/keychron/q2/iso/config.h
+++ b/keyboards/keychron/q2/iso/config.h
@@ -17,6 +17,7 @@
#pragma once
/* RGB Matrix Configuration */
-#define DRIVER_1_LED_TOTAL 34
-#define DRIVER_2_LED_TOTAL 34
-#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
+#define RGB_MATRIX_LED_COUNT 68
+
+/* Enable caps-lock LED */
+#define CAPS_LOCK_LED_INDEX 29 \ No newline at end of file
diff --git a/keyboards/keychron/q2/iso/info.json b/keyboards/keychron/q2/iso/info.json
index e3cad79b14..8a2023320d 100644
--- a/keyboards/keychron/q2/iso/info.json
+++ b/keyboards/keychron/q2/iso/info.json
@@ -1,23 +1,85 @@
{
- "keyboard_name": "Q2",
- "manufacturer": "Keychron",
- "url": "https://github.com/Keychron",
- "maintainer": "lalalademaxiya1",
"usb": {
- "vid": "0x3434",
"pid": "0x0112",
"device_version": "1.0.0"
},
"rgb_matrix": {
- "driver": "ckled2001"
- },
- "matrix_pins": {
- "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"],
- "rows": ["B4", "B3", "A15", "A14", "A13"]
+ "layout": [
+ {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1},
+ {"matrix": [0, 1], "x": 15, "y": 0, "flags": 4},
+ {"matrix": [0, 2], "x": 29, "y": 0, "flags": 4},
+ {"matrix": [0, 3], "x": 44, "y": 0, "flags": 4},
+ {"matrix": [0, 4], "x": 59, "y": 0, "flags": 4},
+ {"matrix": [0, 5], "x": 73, "y": 0, "flags": 4},
+ {"matrix": [0, 6], "x": 88, "y": 0, "flags": 4},
+ {"matrix": [0, 7], "x": 103, "y": 0, "flags": 4},
+ {"matrix": [0, 8], "x": 118, "y": 0, "flags": 4},
+ {"matrix": [0, 9], "x": 132, "y": 0, "flags": 4},
+ {"matrix": [0, 10], "x": 147, "y": 0, "flags": 4},
+ {"matrix": [0, 11], "x": 162, "y": 0, "flags": 4},
+ {"matrix": [0, 12], "x": 176, "y": 0, "flags": 4},
+ {"matrix": [0, 13], "x": 198, "y": 0, "flags": 1},
+ {"matrix": [0, 14], "x": 224, "y": 0, "flags": 1},
+
+ {"matrix": [1, 0], "x": 4, "y": 15, "flags": 1},
+ {"matrix": [1, 1], "x": 22, "y": 15, "flags": 4},
+ {"matrix": [1, 2], "x": 37, "y": 15, "flags": 4},
+ {"matrix": [1, 3], "x": 51, "y": 15, "flags": 4},
+ {"matrix": [1, 4], "x": 66, "y": 15, "flags": 4},
+ {"matrix": [1, 5], "x": 81, "y": 15, "flags": 4},
+ {"matrix": [1, 6], "x": 95, "y": 15, "flags": 4},
+ {"matrix": [1, 7], "x": 110, "y": 15, "flags": 4},
+ {"matrix": [1, 8], "x": 125, "y": 15, "flags": 4},
+ {"matrix": [1, 9], "x": 140, "y": 15, "flags": 4},
+ {"matrix": [1, 10], "x": 154, "y": 15, "flags": 4},
+ {"matrix": [1, 11], "x": 169, "y": 15, "flags": 4},
+ {"matrix": [1, 12], "x": 184, "y": 15, "flags": 4},
+ {"matrix": [1, 14], "x": 224, "y": 15, "flags": 1},
+
+ {"matrix": [2, 0], "x": 6, "y": 30, "flags": 1},
+ {"matrix": [2, 1], "x": 26, "y": 30, "flags": 4},
+ {"matrix": [2, 2], "x": 40, "y": 30, "flags": 4},
+ {"matrix": [2, 3], "x": 55, "y": 30, "flags": 4},
+ {"matrix": [2, 4], "x": 70, "y": 30, "flags": 4},
+ {"matrix": [2, 5], "x": 84, "y": 30, "flags": 4},
+ {"matrix": [2, 6], "x": 99, "y": 30, "flags": 4},
+ {"matrix": [2, 7], "x": 114, "y": 30, "flags": 4},
+ {"matrix": [2, 8], "x": 129, "y": 30, "flags": 4},
+ {"matrix": [2, 9], "x": 143, "y": 30, "flags": 4},
+ {"matrix": [2, 10], "x": 158, "y": 30, "flags": 4},
+ {"matrix": [2, 11], "x": 173, "y": 30, "flags": 4},
+ {"matrix": [2, 13], "x": 187, "y": 30, "flags": 4},
+ {"matrix": [1, 13], "x": 204, "y": 23, "flags": 1},
+ {"matrix": [2, 14], "x": 224, "y": 30, "flags": 1},
+
+ {"matrix": [3, 0], "x": 9, "y": 45, "flags": 1},
+ {"matrix": [3, 1], "x": 18, "y": 45, "flags": 4},
+ {"matrix": [3, 2], "x": 33, "y": 45, "flags": 4},
+ {"matrix": [3, 3], "x": 48, "y": 45, "flags": 4},
+ {"matrix": [3, 4], "x": 62, "y": 45, "flags": 4},
+ {"matrix": [3, 5], "x": 77, "y": 45, "flags": 4},
+ {"matrix": [3, 6], "x": 92, "y": 45, "flags": 4},
+ {"matrix": [3, 7], "x": 106, "y": 45, "flags": 4},
+ {"matrix": [3, 8], "x": 121, "y": 45, "flags": 4},
+ {"matrix": [3, 9], "x": 136, "y": 45, "flags": 4},
+ {"matrix": [3, 10], "x": 151, "y": 45, "flags": 4},
+ {"matrix": [3, 11], "x": 165, "y": 45, "flags": 4},
+ {"matrix": [3, 13], "x": 185, "y": 45, "flags": 1},
+ {"matrix": [3, 14], "x": 209, "y": 49, "flags": 1},
+
+ {"matrix": [4, 0], "x": 2, "y": 60, "flags": 1},
+ {"matrix": [4, 1], "x": 20, "y": 60, "flags": 1},
+ {"matrix": [4, 2], "x": 39, "y": 60, "flags": 1},
+ {"matrix": [4, 6], "x": 94, "y": 60, "flags": 4},
+ {"matrix": [4, 10], "x": 147, "y": 60, "flags": 1},
+ {"matrix": [4, 11], "x": 162, "y": 60, "flags": 1},
+ {"matrix": [4, 12], "x": 176, "y": 60, "flags": 1},
+ {"matrix": [4, 13], "x": 195, "y": 64, "flags": 1},
+ {"matrix": [2, 12], "x": 209, "y": 64, "flags": 1},
+ {"matrix": [4, 14], "x": 224, "y": 64, "flags": 1}
+
+ ]
},
- "diode_direction": "ROW2COL",
- "processor": "STM32L432",
- "bootloader": "stm32-dfu",
"layouts": {
"LAYOUT_iso_68": {
"layout": [
diff --git a/keyboards/keychron/q2/iso/iso.c b/keyboards/keychron/q2/iso/iso.c
index 1f2c76468e..a54c90bc4b 100644
--- a/keyboards/keychron/q2/iso/iso.c
+++ b/keyboards/keychron/q2/iso/iso.c
@@ -17,8 +17,8 @@
#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
-const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to IS31 manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | R location
* | | G location
@@ -98,33 +98,4 @@ const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
{1, F_16, D_16, E_16}
};
-#define __ NO_LED
-
-led_config_t g_led_config = {
- {
- // Key Matrix to LED Index
- { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 },
- { 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 42, 28 },
- { 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 66, 41, 43 },
- { 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, __, 56, 57 },
- { 58, 59, 60, __, __, __, 61, __, __, __, 62, 63, 64, 65, 67 }
- },
- {
- // LED Index to Physical Position
- {0,0}, {15,0}, {29,0}, {44,0}, {59,0}, {73,0}, {88,0}, {103,0}, {118,0}, {132,0}, {147,0}, {162,0}, {176,0}, {198,0}, {224,0},
- {4,15}, {22,15}, {37,15}, {51,15}, {66,15}, {81,15}, {95,15}, {110,15}, {125,15}, {140,15}, {154,15}, {169,15}, {184,15}, {224,15},
- {6,30}, {26,30}, {40,30}, {55,30}, {70,30}, {84,30}, {99,30}, {114,30}, {129,30}, {143,30}, {158,30}, {173,30}, {187,30}, {204,23}, {224,30},
- {2,45}, {18,45}, {33,45}, {48,45}, {62,45}, {77,45}, {92,45}, {106,45}, {121,45}, {136,45}, {151,45}, {165,45}, {185,45}, {209,49},
- {2,60}, {20,60}, {39,60}, {94,60}, {147,60}, {162,60}, {176,60}, {195,64}, {209,64}, {224,64}
- },
- {
- // RGB LED Index to Flag
- 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1,
- 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
- 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1,
- 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1,
- 1, 1, 1, 4, 1, 1, 1, 1, 1, 1
- }
-};
-
#endif // RGB_MATRIX_ENABLE
diff --git a/keyboards/keychron/q2/iso/rules.mk b/keyboards/keychron/q2/iso/rules.mk
index b3de962291..7ff128fa69 100644
--- a/keyboards/keychron/q2/iso/rules.mk
+++ b/keyboards/keychron/q2/iso/rules.mk
@@ -1,18 +1 @@
-# Build Options
-# change yes to no to disable
-#
-BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
-MOUSEKEY_ENABLE = no # Mouse keys
-EXTRAKEY_ENABLE = yes # Audio control and System control
-CONSOLE_ENABLE = no # Console for debug
-COMMAND_ENABLE = no # Commands for debug and configuration
-NKRO_ENABLE = yes # Enable N-Key Rollover
-BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
-RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
-AUDIO_ENABLE = no # Audio output
-ENCODER_ENABLE = no # Enable Encoder
-DIP_SWITCH_ENABLE = yes
-RGB_MATRIX_ENABLE = yes
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = embedded_flash
-
+# This file intentionally left blank \ No newline at end of file
diff --git a/keyboards/keychron/q2/iso_encoder/config.h b/keyboards/keychron/q2/iso_encoder/config.h
index 376b92b6fa..b463f7886e 100644
--- a/keyboards/keychron/q2/iso_encoder/config.h
+++ b/keyboards/keychron/q2/iso_encoder/config.h
@@ -17,9 +17,7 @@
#pragma once
/* RGB Matrix Configuration */
-#define DRIVER_1_LED_TOTAL 34
-#define DRIVER_2_LED_TOTAL 34
-#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
+#define RGB_MATRIX_LED_COUNT 68
-/* Encoder used pins */
-#define ENCODER_DEFAULT_POS 0x3
+/* Enable caps-lock LED */
+#define CAPS_LOCK_LED_INDEX 29 \ No newline at end of file
diff --git a/keyboards/keychron/q2/iso_encoder/info.json b/keyboards/keychron/q2/iso_encoder/info.json
index 5030e6be42..b828c88931 100644
--- a/keyboards/keychron/q2/iso_encoder/info.json
+++ b/keyboards/keychron/q2/iso_encoder/info.json
@@ -1,28 +1,91 @@
{
- "keyboard_name": "Q2",
- "manufacturer": "Keychron",
- "url": "https://github.com/Keychron",
- "maintainer": "lalalademaxiya1",
"usb": {
- "vid": "0x3434",
"pid": "0x0113",
"device_version": "1.0.0"
},
- "rgb_matrix": {
- "driver": "ckled2001"
- },
- "matrix_pins": {
- "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"],
- "rows": ["B4", "B3", "A15", "A14", "A13"]
- },
- "diode_direction": "ROW2COL",
"encoder": {
+ "enabled": true,
"rotary": [
{"pin_a": "A10", "pin_b": "B5"}
]
},
- "processor": "STM32L432",
- "bootloader": "stm32-dfu",
+ "rgb_matrix": {
+ "layout": [
+ {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1},
+ {"matrix": [0, 1], "x": 15, "y": 0, "flags": 4},
+ {"matrix": [0, 2], "x": 29, "y": 0, "flags": 4},
+ {"matrix": [0, 3], "x": 44, "y": 0, "flags": 4},
+ {"matrix": [0, 4], "x": 59, "y": 0, "flags": 4},
+ {"matrix": [0, 5], "x": 73, "y": 0, "flags": 4},
+ {"matrix": [0, 6], "x": 88, "y": 0, "flags": 4},
+ {"matrix": [0, 7], "x": 103, "y": 0, "flags": 4},
+ {"matrix": [0, 8], "x": 118, "y": 0, "flags": 4},
+ {"matrix": [0, 9], "x": 132, "y": 0, "flags": 4},
+ {"matrix": [0, 10], "x": 147, "y": 0, "flags": 4},
+ {"matrix": [0, 11], "x": 162, "y": 0, "flags": 4},
+ {"matrix": [0, 12], "x": 176, "y": 0, "flags": 4},
+ {"matrix": [0, 13], "x": 198, "y": 0, "flags": 1},
+ {"matrix": [0, 14], "x": 224, "y": 0, "flags": 1},
+
+ {"matrix": [1, 0], "x": 4, "y": 15, "flags": 1},
+ {"matrix": [1, 1], "x": 22, "y": 15, "flags": 4},
+ {"matrix": [1, 2], "x": 37, "y": 15, "flags": 4},
+ {"matrix": [1, 3], "x": 51, "y": 15, "flags": 4},
+ {"matrix": [1, 4], "x": 66, "y": 15, "flags": 4},
+ {"matrix": [1, 5], "x": 81, "y": 15, "flags": 4},
+ {"matrix": [1, 6], "x": 95, "y": 15, "flags": 4},
+ {"matrix": [1, 7], "x": 110, "y": 15, "flags": 4},
+ {"matrix": [1, 8], "x": 125, "y": 15, "flags": 4},
+ {"matrix": [1, 9], "x": 140, "y": 15, "flags": 4},
+ {"matrix": [1, 10], "x": 154, "y": 15, "flags": 4},
+ {"matrix": [1, 11], "x": 169, "y": 15, "flags": 4},
+ {"matrix": [1, 12], "x": 184, "y": 15, "flags": 4},
+ {"matrix": [1, 14], "x": 224, "y": 15, "flags": 1},
+
+ {"matrix": [2, 0], "x": 6, "y": 30, "flags": 1},
+ {"matrix": [2, 1], "x": 26, "y": 30, "flags": 4},
+ {"matrix": [2, 2], "x": 40, "y": 30, "flags": 4},
+ {"matrix": [2, 3], "x": 55, "y": 30, "flags": 4},
+ {"matrix": [2, 4], "x": 70, "y": 30, "flags": 4},
+ {"matrix": [2, 5], "x": 84, "y": 30, "flags": 4},
+ {"matrix": [2, 6], "x": 99, "y": 30, "flags": 4},
+ {"matrix": [2, 7], "x": 114, "y": 30, "flags": 4},
+ {"matrix": [2, 8], "x": 129, "y": 30, "flags": 4},
+ {"matrix": [2, 9], "x": 143, "y": 30, "flags": 4},
+ {"matrix": [2, 10], "x": 158, "y": 30, "flags": 4},
+ {"matrix": [2, 11], "x": 173, "y": 30, "flags": 4},
+ {"matrix": [2, 13], "x": 187, "y": 30, "flags": 4},
+ {"matrix": [1, 13], "x": 204, "y": 23, "flags": 1},
+ {"matrix": [2, 14], "x": 224, "y": 30, "flags": 1},
+
+ {"matrix": [3, 0], "x": 9, "y": 45, "flags": 1},
+ {"matrix": [3, 1], "x": 18, "y": 45, "flags": 4},
+ {"matrix": [3, 2], "x": 33, "y": 45, "flags": 4},
+ {"matrix": [3, 3], "x": 48, "y": 45, "flags": 4},
+ {"matrix": [3, 4], "x": 62, "y": 45, "flags": 4},
+ {"matrix": [3, 5], "x": 77, "y": 45, "flags": 4},
+ {"matrix": [3, 6], "x": 92, "y": 45, "flags": 4},
+ {"matrix": [3, 7], "x": 106, "y": 45, "flags": 4},
+ {"matrix": [3, 8], "x": 121, "y": 45, "flags": 4},
+ {"matrix": [3, 9], "x": 136, "y": 45, "flags": 4},
+ {"matrix": [3, 10], "x": 151, "y": 45, "flags": 4},
+ {"matrix": [3, 11], "x": 165, "y": 45, "flags": 4},
+ {"matrix": [3, 13], "x": 185, "y": 45, "flags": 1},
+ {"matrix": [3, 14], "x": 209, "y": 49, "flags": 1},
+
+ {"matrix": [4, 0], "x": 2, "y": 60, "flags": 1},
+ {"matrix": [4, 1], "x": 20, "y": 60, "flags": 1},
+ {"matrix": [4, 2], "x": 39, "y": 60, "flags": 1},
+ {"matrix": [4, 6], "x": 94, "y": 60, "flags": 4},
+ {"matrix": [4, 10], "x": 147, "y": 60, "flags": 1},
+ {"matrix": [4, 11], "x": 162, "y": 60, "flags": 1},
+ {"matrix": [4, 12], "x": 176, "y": 60, "flags": 1},
+ {"matrix": [4, 13], "x": 195, "y": 64, "flags": 1},
+ {"matrix": [2, 12], "x": 209, "y": 64, "flags": 1},
+ {"matrix": [4, 14], "x": 224, "y": 64, "flags": 1}
+
+ ]
+ },
"layouts": {
"LAYOUT_iso_68": {
"layout": [
diff --git a/keyboards/keychron/q2/iso_encoder/iso_encoder.c b/keyboards/keychron/q2/iso_encoder/iso_encoder.c
index 1f2c76468e..a54c90bc4b 100644
--- a/keyboards/keychron/q2/iso_encoder/iso_encoder.c
+++ b/keyboards/keychron/q2/iso_encoder/iso_encoder.c
@@ -17,8 +17,8 @@
#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
-const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to IS31 manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | R location
* | | G location
@@ -98,33 +98,4 @@ const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
{1, F_16, D_16, E_16}
};
-#define __ NO_LED
-
-led_config_t g_led_config = {
- {
- // Key Matrix to LED Index
- { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 },
- { 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 42, 28 },
- { 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 66, 41, 43 },
- { 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, __, 56, 57 },
- { 58, 59, 60, __, __, __, 61, __, __, __, 62, 63, 64, 65, 67 }
- },
- {
- // LED Index to Physical Position
- {0,0}, {15,0}, {29,0}, {44,0}, {59,0}, {73,0}, {88,0}, {103,0}, {118,0}, {132,0}, {147,0}, {162,0}, {176,0}, {198,0}, {224,0},
- {4,15}, {22,15}, {37,15}, {51,15}, {66,15}, {81,15}, {95,15}, {110,15}, {125,15}, {140,15}, {154,15}, {169,15}, {184,15}, {224,15},
- {6,30}, {26,30}, {40,30}, {55,30}, {70,30}, {84,30}, {99,30}, {114,30}, {129,30}, {143,30}, {158,30}, {173,30}, {187,30}, {204,23}, {224,30},
- {2,45}, {18,45}, {33,45}, {48,45}, {62,45}, {77,45}, {92,45}, {106,45}, {121,45}, {136,45}, {151,45}, {165,45}, {185,45}, {209,49},
- {2,60}, {20,60}, {39,60}, {94,60}, {147,60}, {162,60}, {176,60}, {195,64}, {209,64}, {224,64}
- },
- {
- // RGB LED Index to Flag
- 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1,
- 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
- 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1,
- 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1,
- 1, 1, 1, 4, 1, 1, 1, 1, 1, 1
- }
-};
-
#endif // RGB_MATRIX_ENABLE
diff --git a/keyboards/keychron/q2/iso_encoder/rules.mk b/keyboards/keychron/q2/iso_encoder/rules.mk
index aba76c0944..7ff128fa69 100644
--- a/keyboards/keychron/q2/iso_encoder/rules.mk
+++ b/keyboards/keychron/q2/iso_encoder/rules.mk
@@ -1,18 +1 @@
-# Build Options
-# change yes to no to disable
-#
-BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
-MOUSEKEY_ENABLE = no # Mouse keys
-EXTRAKEY_ENABLE = yes # Audio control and System control
-CONSOLE_ENABLE = no # Console for debug
-COMMAND_ENABLE = no # Commands for debug and configuration
-NKRO_ENABLE = yes # Enable N-Key Rollover
-BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
-RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
-AUDIO_ENABLE = no # Audio output
-ENCODER_ENABLE = yes # Enable Encoder
-DIP_SWITCH_ENABLE = yes
-RGB_MATRIX_ENABLE = yes
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = embedded_flash
-
+# This file intentionally left blank \ No newline at end of file
diff --git a/keyboards/keychron/q2/jis/config.h b/keyboards/keychron/q2/jis/config.h
index 2d83933f9a..0d811e0845 100644
--- a/keyboards/keychron/q2/jis/config.h
+++ b/keyboards/keychron/q2/jis/config.h
@@ -17,11 +17,9 @@
#pragma once
/* RGB Matrix Configuration */
-#define DRIVER_1_LED_TOTAL 35
-#define DRIVER_2_LED_TOTAL 36
-#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
+#define RGB_MATRIX_LED_COUNT 71
-#define CKLED2001_CURRENT_TUNE { 0xC0, 0xC0, 0x5D, 0xC0, 0xC0, 0x5D, 0xC0, 0xC0, 0x5D, 0xC0, 0xC0, 0x5D }
+#define SNLED27351_CURRENT_TUNE { 0xC0, 0xC0, 0x5D, 0xC0, 0xC0, 0x5D, 0xC0, 0xC0, 0x5D, 0xC0, 0xC0, 0x5D }
/* Enable caps-lock LED */
#define CAPS_LOCK_LED_INDEX 30
diff --git a/keyboards/keychron/q2/jis/info.json b/keyboards/keychron/q2/jis/info.json
index d0af24b29d..834b89332e 100644
--- a/keyboards/keychron/q2/jis/info.json
+++ b/keyboards/keychron/q2/jis/info.json
@@ -1,23 +1,86 @@
{
- "keyboard_name": "Keychron Q2",
- "manufacturer": "Keychron",
- "url": "https://github.com/Keychron",
- "maintainer": "lalalademaxiya1",
"usb": {
- "vid": "0x3434",
"pid": "0x0114",
"device_version": "1.0.0"
},
"rgb_matrix": {
- "driver": "ckled2001"
- },
- "matrix_pins": {
- "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"],
- "rows": ["B4", "B3", "A15", "A14", "A13"]
+ "layout": [
+ {"matrix": [0, 0], "x": 0, "y": 4, "flags": 1},
+ {"matrix": [0, 1], "x": 15, "y": 4, "flags": 4},
+ {"matrix": [0, 2], "x": 29, "y": 4, "flags": 4},
+ {"matrix": [0, 3], "x": 44, "y": 4, "flags": 4},
+ {"matrix": [0, 4], "x": 59, "y": 4, "flags": 4},
+ {"matrix": [0, 5], "x": 73, "y": 4, "flags": 4},
+ {"matrix": [0, 6], "x": 88, "y": 4, "flags": 4},
+ {"matrix": [0, 7], "x": 103, "y": 4, "flags": 4},
+ {"matrix": [0, 8], "x": 117, "y": 4, "flags": 4},
+ {"matrix": [0, 9], "x": 132, "y": 4, "flags": 4},
+ {"matrix": [0, 10], "x": 146, "y": 4, "flags": 4},
+ {"matrix": [0, 11], "x": 161, "y": 4, "flags": 4},
+ {"matrix": [0, 12], "x": 176, "y": 4, "flags": 4},
+ {"matrix": [0, 13], "x": 190, "y": 4, "flags": 4},
+ {"matrix": [3, 1], "x": 205, "y": 4, "flags": 1},
+ {"matrix": [0, 14], "x": 224, "y": 0, "flags": 1},
+
+ {"matrix": [1, 0], "x": 4, "y": 19, "flags": 1},
+ {"matrix": [1, 1], "x": 22, "y": 19, "flags": 4},
+ {"matrix": [1, 2], "x": 37, "y": 19, "flags": 4},
+ {"matrix": [1, 3], "x": 51, "y": 19, "flags": 4},
+ {"matrix": [1, 4], "x": 66, "y": 19, "flags": 4},
+ {"matrix": [1, 5], "x": 81, "y": 19, "flags": 4},
+ {"matrix": [1, 6], "x": 95, "y": 19, "flags": 4},
+ {"matrix": [1, 7], "x": 110, "y": 19, "flags": 4},
+ {"matrix": [1, 8], "x": 125, "y": 19, "flags": 4},
+ {"matrix": [1, 9], "x": 139, "y": 19, "flags": 4},
+ {"matrix": [1, 10], "x": 154, "y": 19, "flags": 4},
+ {"matrix": [1, 11], "x": 168, "y": 19, "flags": 4},
+ {"matrix": [1, 12], "x": 183, "y": 19, "flags": 4},
+ {"matrix": [1, 14], "x": 224, "y": 19, "flags": 1},
+
+ {"matrix": [2, 0], "x": 6, "y": 34, "flags": 1},
+ {"matrix": [2, 1], "x": 26, "y": 34, "flags": 4},
+ {"matrix": [2, 2], "x": 40, "y": 34, "flags": 4},
+ {"matrix": [2, 3], "x": 55, "y": 34, "flags": 4},
+ {"matrix": [2, 4], "x": 70, "y": 34, "flags": 4},
+ {"matrix": [2, 5], "x": 84, "y": 34, "flags": 4},
+ {"matrix": [2, 6], "x": 99, "y": 34, "flags": 4},
+ {"matrix": [2, 7], "x": 114, "y": 34, "flags": 4},
+ {"matrix": [2, 8], "x": 128, "y": 34, "flags": 4},
+ {"matrix": [2, 9], "x": 143, "y": 34, "flags": 4},
+ {"matrix": [2, 10], "x": 158, "y": 34, "flags": 4},
+ {"matrix": [2, 11], "x": 172, "y": 34, "flags": 4},
+ {"matrix": [2, 13], "x": 187, "y": 34, "flags": 4},
+ {"matrix": [1, 13], "x": 207, "y": 29, "flags": 1},
+ {"matrix": [2, 14], "x": 224, "y": 34, "flags": 1},
+
+ {"matrix": [3, 0], "x": 9, "y": 49, "flags": 1},
+ {"matrix": [3, 2], "x": 33, "y": 49, "flags": 4},
+ {"matrix": [3, 3], "x": 48, "y": 49, "flags": 4},
+ {"matrix": [3, 4], "x": 62, "y": 49, "flags": 4},
+ {"matrix": [3, 5], "x": 77, "y": 49, "flags": 4},
+ {"matrix": [3, 6], "x": 92, "y": 49, "flags": 4},
+ {"matrix": [3, 7], "x": 106, "y": 49, "flags": 4},
+ {"matrix": [3, 8], "x": 121, "y": 49, "flags": 4},
+ {"matrix": [3, 9], "x": 136, "y": 49, "flags": 4},
+ {"matrix": [3, 10], "x": 150, "y": 49, "flags": 4},
+ {"matrix": [3, 11], "x": 179, "y": 49, "flags": 4},
+ {"matrix": [3, 13], "x": 194, "y": 49, "flags": 1},
+ {"matrix": [3, 14], "x": 209, "y": 49, "flags": 1},
+
+ {"matrix": [4, 0], "x": 2, "y": 64, "flags": 1},
+ {"matrix": [4, 1], "x": 18, "y": 64, "flags": 1},
+ {"matrix": [4, 2], "x": 35, "y": 64, "flags": 1},
+ {"matrix": [4, 3], "x": 51, "y": 64, "flags": 1},
+ {"matrix": [4, 6], "x": 92, "y": 64, "flags": 4},
+ {"matrix": [4, 9], "x": 134, "y": 64, "flags": 1},
+ {"matrix": [4, 10], "x": 150, "y": 64, "flags": 1},
+ {"matrix": [4, 11], "x": 165, "y": 64, "flags": 1},
+ {"matrix": [4, 12], "x": 179, "y": 64, "flags": 1},
+ {"matrix": [4, 13], "x": 194, "y": 64, "flags": 1},
+ {"matrix": [2, 12], "x": 209, "y": 64, "flags": 1},
+ {"matrix": [4, 14], "x": 223, "y": 64, "flags": 1}
+ ]
},
- "diode_direction": "ROW2COL",
- "processor": "STM32L432",
- "bootloader": "stm32-dfu",
"layouts": {
"LAYOUT_jis_71": {
"layout": [
diff --git a/keyboards/keychron/q2/jis/jis.c b/keyboards/keychron/q2/jis/jis.c
index 31ed1edc58..d877e225d9 100644
--- a/keyboards/keychron/q2/jis/jis.c
+++ b/keyboards/keychron/q2/jis/jis.c
@@ -18,8 +18,8 @@
#ifdef RGB_MATRIX_ENABLE
-const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to IS31 manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | R location
* | | G location
@@ -102,33 +102,4 @@ const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
{1, F_16, D_16, E_16}
};
-#define __ NO_LED
-
-led_config_t g_led_config = {
- {
- // Key Matrix to LED Index
- { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15 },
- { 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 43, 29 },
- { 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 69, 42, 44 },
- { 45, 14, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58 },
- { 59, 60, 61, 62, __, __, 63, __, __, 64, 65, 66, 67, 68, 70 }
- },
- {
- // LED Index to Physical Position
- {0,4}, {15,4}, {29,4}, {44,4}, {59,4}, {73,4}, {88,4}, {103,4}, {117,4}, {132,4}, {146,4}, {161,4}, {176,4}, {190,4}, {205,4}, {224,0},
- {4,19}, {22,19}, {37,19}, {51,19}, {66,19}, {81,19}, {95,19}, {110,19}, {125,19}, {139,19}, {154,19}, {168,19}, {183,19}, {224,19},
- {6,34}, {26,34}, {40,34}, {55,34}, {70,34}, {84,34}, {99,34}, {114,34}, {128,34}, {143,34}, {158,34}, {172,34}, {187,34}, {207,29}, {224,34},
- {9,49}, {33,49}, {48,49}, {62,49}, {77,49}, {92,49}, {106,49}, {121,49}, {136,49}, {150,49}, {165,49}, {179,49}, {194,49}, {209,49},
- {2,64}, {18,64}, {35,64}, {51,64}, {92,64}, {134,64}, {150,64}, {165,64}, {179,64}, {194,64}, {209,64}, {223,64},
- },
- {
- // RGB LED Index to Flag
- 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1,
- 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
- 8, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1,
- 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1,
- 1, 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1
- }
-};
-
#endif // RGB_MATRIX_ENABLE
diff --git a/keyboards/keychron/q2/jis/rules.mk b/keyboards/keychron/q2/jis/rules.mk
index c37beecb9e..6e7633bfe0 100644
--- a/keyboards/keychron/q2/jis/rules.mk
+++ b/keyboards/keychron/q2/jis/rules.mk
@@ -1,17 +1 @@
-# Build Options
-# change yes to no to disable
-#
-BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
-MOUSEKEY_ENABLE = yes # Mouse keys
-EXTRAKEY_ENABLE = yes # Audio control and System control
-CONSOLE_ENABLE = no # Console for debug
-COMMAND_ENABLE = no # Commands for debug and configuration
-NKRO_ENABLE = yes # Enable USB N-key Rollover
-BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
-RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
-AUDIO_ENABLE = no # Audio output
-DIP_SWITCH_ENABLE = yes
-RGB_MATRIX_ENABLE = yes
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = embedded_flash
-
+# This file intentionally left blank
diff --git a/keyboards/keychron/q2/jis_encoder/config.h b/keyboards/keychron/q2/jis_encoder/config.h
index 5e7ab55143..0d811e0845 100644
--- a/keyboards/keychron/q2/jis_encoder/config.h
+++ b/keyboards/keychron/q2/jis_encoder/config.h
@@ -17,14 +17,9 @@
#pragma once
/* RGB Matrix Configuration */
-#define DRIVER_1_LED_TOTAL 35
-#define DRIVER_2_LED_TOTAL 36
-#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
+#define RGB_MATRIX_LED_COUNT 71
-#define CKLED2001_CURRENT_TUNE { 0xC0, 0xC0, 0x5D, 0xC0, 0xC0, 0x5D, 0xC0, 0xC0, 0x5D, 0xC0, 0xC0, 0x5D }
-
-/* Encoder Configuration */
-#define ENCODER_DEFAULT_POS 0x3
+#define SNLED27351_CURRENT_TUNE { 0xC0, 0xC0, 0x5D, 0xC0, 0xC0, 0x5D, 0xC0, 0xC0, 0x5D, 0xC0, 0xC0, 0x5D }
/* Enable caps-lock LED */
#define CAPS_LOCK_LED_INDEX 30
diff --git a/keyboards/keychron/q2/jis_encoder/info.json b/keyboards/keychron/q2/jis_encoder/info.json
index e409fb63a6..32b691742b 100644
--- a/keyboards/keychron/q2/jis_encoder/info.json
+++ b/keyboards/keychron/q2/jis_encoder/info.json
@@ -1,28 +1,92 @@
{
- "keyboard_name": "Keychron Q2",
- "manufacturer": "Keychron",
- "url": "https://github.com/Keychron",
- "maintainer": "lalalademaxiya1",
"usb": {
- "vid": "0x3434",
"pid": "0x0115",
"device_version": "1.0.0"
},
- "rgb_matrix": {
- "driver": "ckled2001"
- },
- "matrix_pins": {
- "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"],
- "rows": ["B4", "B3", "A15", "A14", "A13"]
- },
- "diode_direction": "ROW2COL",
"encoder": {
+ "enabled": true,
"rotary": [
{"pin_a": "A10", "pin_b": "B5"}
]
},
- "processor": "STM32L432",
- "bootloader": "stm32-dfu",
+ "rgb_matrix": {
+ "layout": [
+ {"matrix": [0, 0], "x": 0, "y": 4, "flags": 1},
+ {"matrix": [0, 1], "x": 15, "y": 4, "flags": 4},
+ {"matrix": [0, 2], "x": 29, "y": 4, "flags": 4},
+ {"matrix": [0, 3], "x": 44, "y": 4, "flags": 4},
+ {"matrix": [0, 4], "x": 59, "y": 4, "flags": 4},
+ {"matrix": [0, 5], "x": 73, "y": 4, "flags": 4},
+ {"matrix": [0, 6], "x": 88, "y": 4, "flags": 4},
+ {"matrix": [0, 7], "x": 103, "y": 4, "flags": 4},
+ {"matrix": [0, 8], "x": 117, "y": 4, "flags": 4},
+ {"matrix": [0, 9], "x": 132, "y": 4, "flags": 4},
+ {"matrix": [0, 10], "x": 146, "y": 4, "flags": 4},
+ {"matrix": [0, 11], "x": 161, "y": 4, "flags": 4},
+ {"matrix": [0, 12], "x": 176, "y": 4, "flags": 4},
+ {"matrix": [0, 13], "x": 190, "y": 4, "flags": 4},
+ {"matrix": [3, 1], "x": 205, "y": 4, "flags": 1},
+ {"matrix": [0, 14], "x": 224, "y": 0, "flags": 1},
+
+ {"matrix": [1, 0], "x": 4, "y": 19, "flags": 1},
+ {"matrix": [1, 1], "x": 22, "y": 19, "flags": 4},
+ {"matrix": [1, 2], "x": 37, "y": 19, "flags": 4},
+ {"matrix": [1, 3], "x": 51, "y": 19, "flags": 4},
+ {"matrix": [1, 4], "x": 66, "y": 19, "flags": 4},
+ {"matrix": [1, 5], "x": 81, "y": 19, "flags": 4},
+ {"matrix": [1, 6], "x": 95, "y": 19, "flags": 4},
+ {"matrix": [1, 7], "x": 110, "y": 19, "flags": 4},
+ {"matrix": [1, 8], "x": 125, "y": 19, "flags": 4},
+ {"matrix": [1, 9], "x": 139, "y": 19, "flags": 4},
+ {"matrix": [1, 10], "x": 154, "y": 19, "flags": 4},
+ {"matrix": [1, 11], "x": 168, "y": 19, "flags": 4},
+ {"matrix": [1, 12], "x": 183, "y": 19, "flags": 4},
+ {"matrix": [1, 14], "x": 224, "y": 19, "flags": 1},
+
+ {"matrix": [2, 0], "x": 6, "y": 34, "flags": 1},
+ {"matrix": [2, 1], "x": 26, "y": 34, "flags": 4},
+ {"matrix": [2, 2], "x": 40, "y": 34, "flags": 4},
+ {"matrix": [2, 3], "x": 55, "y": 34, "flags": 4},
+ {"matrix": [2, 4], "x": 70, "y": 34, "flags": 4},
+ {"matrix": [2, 5], "x": 84, "y": 34, "flags": 4},
+ {"matrix": [2, 6], "x": 99, "y": 34, "flags": 4},
+ {"matrix": [2, 7], "x": 114, "y": 34, "flags": 4},
+ {"matrix": [2, 8], "x": 128, "y": 34, "flags": 4},
+ {"matrix": [2, 9], "x": 143, "y": 34, "flags": 4},
+ {"matrix": [2, 10], "x": 158, "y": 34, "flags": 4},
+ {"matrix": [2, 11], "x": 172, "y": 34, "flags": 4},
+ {"matrix": [2, 13], "x": 187, "y": 34, "flags": 4},
+ {"matrix": [1, 13], "x": 207, "y": 29, "flags": 1},
+ {"matrix": [2, 14], "x": 224, "y": 34, "flags": 1},
+
+ {"matrix": [3, 0], "x": 9, "y": 49, "flags": 1},
+ {"matrix": [3, 2], "x": 33, "y": 49, "flags": 4},
+ {"matrix": [3, 3], "x": 48, "y": 49, "flags": 4},
+ {"matrix": [3, 4], "x": 62, "y": 49, "flags": 4},
+ {"matrix": [3, 5], "x": 77, "y": 49, "flags": 4},
+ {"matrix": [3, 6], "x": 92, "y": 49, "flags": 4},
+ {"matrix": [3, 7], "x": 106, "y": 49, "flags": 4},
+ {"matrix": [3, 8], "x": 121, "y": 49, "flags": 4},
+ {"matrix": [3, 9], "x": 136, "y": 49, "flags": 4},
+ {"matrix": [3, 10], "x": 150, "y": 49, "flags": 4},
+ {"matrix": [3, 11], "x": 179, "y": 49, "flags": 4},
+ {"matrix": [3, 13], "x": 194, "y": 49, "flags": 1},
+ {"matrix": [3, 14], "x": 209, "y": 49, "flags": 1},
+
+ {"matrix": [4, 0], "x": 2, "y": 64, "flags": 1},
+ {"matrix": [4, 1], "x": 18, "y": 64, "flags": 1},
+ {"matrix": [4, 2], "x": 35, "y": 64, "flags": 1},
+ {"matrix": [4, 3], "x": 51, "y": 64, "flags": 1},
+ {"matrix": [4, 6], "x": 92, "y": 64, "flags": 4},
+ {"matrix": [4, 9], "x": 134, "y": 64, "flags": 1},
+ {"matrix": [4, 10], "x": 150, "y": 64, "flags": 1},
+ {"matrix": [4, 11], "x": 165, "y": 64, "flags": 1},
+ {"matrix": [4, 12], "x": 179, "y": 64, "flags": 1},
+ {"matrix": [4, 13], "x": 194, "y": 64, "flags": 1},
+ {"matrix": [2, 12], "x": 209, "y": 64, "flags": 1},
+ {"matrix": [4, 14], "x": 223, "y": 64, "flags": 1}
+ ]
+ },
"layouts": {
"LAYOUT_jis_71": {
"layout": [
diff --git a/keyboards/keychron/q2/jis_encoder/jis_encoder.c b/keyboards/keychron/q2/jis_encoder/jis_encoder.c
index de20255e0b..d877e225d9 100644
--- a/keyboards/keychron/q2/jis_encoder/jis_encoder.c
+++ b/keyboards/keychron/q2/jis_encoder/jis_encoder.c
@@ -18,8 +18,8 @@
#ifdef RGB_MATRIX_ENABLE
-const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to IS31 manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | R location
* | | G location
@@ -102,33 +102,4 @@ const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
{1, F_16, D_16, E_16}
};
-#define __ NO_LED
-
-led_config_t g_led_config = {
- {
- // Key Matrix to LED Index
- { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15 },
- { 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 43, 29 },
- { 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 69, 42, 44 },
- { 45, 14, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58 },
- { 59, 60, 61, 62, __, __, 63, __, __, 64, 65, 66, 67, 68, 70 },
- },
- {
- // LED Index to Physical Position
- {0,4}, {15,4}, {29,4}, {44,4}, {59,4}, {73,4}, {88,4}, {103,4}, {117,4}, {132,4}, {146,4}, {161,4}, {176,4}, {190,4}, {205,4}, {224,0},
- {4,19}, {22,19}, {37,19}, {51,19}, {66,19}, {81,19}, {95,19}, {110,19}, {125,19}, {139,19}, {154,19}, {168,19}, {183,19}, {224,19},
- {6,34}, {26,34}, {40,34}, {55,34}, {70,34}, {84,34}, {99,34}, {114,34}, {128,34}, {143,34}, {158,34}, {172,34}, {187,34}, {207,29}, {224,34},
- {9,49}, {33,49}, {48,49}, {62,49}, {77,49}, {92,49}, {106,49}, {121,49}, {136,49}, {150,49}, {165,49}, {179,49}, {194,49}, {209,49},
- {2,64}, {18,64}, {35,64}, {51,64}, {92,64}, {134,64}, {150,64}, {165,64}, {179,64}, {194,64}, {209,64}, {223,64},
- },
- {
- // RGB LED Index to Flag
- 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1,
- 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
- 8, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1,
- 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1,
- 1, 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1,
- }
-};
-
#endif // RGB_MATRIX_ENABLE
diff --git a/keyboards/keychron/q2/jis_encoder/rules.mk b/keyboards/keychron/q2/jis_encoder/rules.mk
index 5091fe9414..6e7633bfe0 100644
--- a/keyboards/keychron/q2/jis_encoder/rules.mk
+++ b/keyboards/keychron/q2/jis_encoder/rules.mk
@@ -1,18 +1 @@
-# Build Options
-# change yes to no to disable
-#
-BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
-MOUSEKEY_ENABLE = yes # Mouse keys
-EXTRAKEY_ENABLE = yes # Audio control and System control
-CONSOLE_ENABLE = no # Console for debug
-COMMAND_ENABLE = no # Commands for debug and configuration
-NKRO_ENABLE = yes # Enable USB N-key Rollover
-BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
-RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
-AUDIO_ENABLE = no # Audio output
-ENCODER_ENABLE = yes # Enable Encoder
-DIP_SWITCH_ENABLE = yes
-RGB_MATRIX_ENABLE = yes
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = embedded_flash
-
+# This file intentionally left blank
diff --git a/keyboards/keychron/q2/readme.md b/keyboards/keychron/q2/readme.md
index 60144a1079..69a2d892ff 100644
--- a/keyboards/keychron/q2/readme.md
+++ b/keyboards/keychron/q2/readme.md
@@ -1,19 +1,31 @@
# Keychron Q2
+![Keychron Q2](https://i.imgur.com/9bJ6Moh.jpg)
+
A customizable 65% keyboard.
* Keyboard Maintainer: [Keychron](https://github.com/keychron)
* Hardware Supported: Keychron Q2
-* Hardware Availability: [Keychron](https://www.keychron.com)
+* Hardware Availability: [Keychron Q2 QMK Custom Mechanical Keyboard](https://www.keychron.com/products/keychron-q2-qmk-custom-mechanical-keyboard)
Make example for this keyboard (after setting up your build environment):
make keychron/q2/ansi:default
+ make keychron/q2/ansi_encoder:default
+ make keychron/q2/iso:default
+ make keychron/q2/iso_encoder:default
+ make keychron/q2/jis:default
+ make keychron/q2/jis_encoder:default
Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid))
make keychron/q2/ansi:default:flash
+ make keychron/q2/ansi_encoder:default:flash
+ make keychron/q2/iso:default:flash
+ make keychron/q2/iso_encoder:default:flash
+ make keychron/q2/jis:default:flash
+ make keychron/q2/jis_encoder:default:flash
**Reset Key**: Hold down the key located at *K00*, commonly programmed as *Esc* while plugging in the keyboard.
-See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). \ No newline at end of file
diff --git a/keyboards/keychron/q3/ansi/ansi.c b/keyboards/keychron/q3/ansi/ansi.c
index 432a914058..8327ee430b 100644
--- a/keyboards/keychron/q3/ansi/ansi.c
+++ b/keyboards/keychron/q3/ansi/ansi.c
@@ -18,8 +18,8 @@
#ifdef RGB_MATRIX_ENABLE
-const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to IS31 manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | R location
* | | G location
@@ -119,36 +119,4 @@ const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
{1, C_15, A_15, B_15},
};
-#define __ NO_LED
-
-led_config_t g_led_config = {
- {
- // Key Matrix to LED Index
- { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, __, 13, 14 },
- { 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 },
- { 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48 },
- { 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 49, 62, 15, 32 },
- { 63, __, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, __, 74, 86, 75 },
- { 76, 77, 78, __, __, __, 79, __, __, __, 80, 81, 82, 83, 84, 85 },
- },
- {
- // LED Index to Physical Position
- {0,0}, {26,0}, {39,0}, {52,0}, {65,0}, {85,0}, {98,0}, {111,0}, {124,0}, {143,0}, {156,0}, {169,0}, {182,0}, {198,0}, {211,0}, {224,0},
- {0,15}, {13,15}, {26,15}, {39,15}, {52,15}, {65,15}, {78,15}, {91,15}, {104,15}, {117,15}, {130,15}, {143,15}, {156,15}, {176,15}, {198,15}, {211,15}, {224,15},
- {3,28}, {20,28}, {33,28}, {46,28}, {59,28}, {72,28}, {85,28}, {98,28}, {111,28}, {124,28}, {137,28}, {150,28}, {163,28}, {179,28}, {198,28}, {211,28}, {224,28},
- {5,40}, {23,40}, {36,40}, {49,40}, {62,40}, {75,40}, {88,40}, {101,40}, {114,40}, {127,40}, {140,40}, {153,40}, {174,40},
- {8,52}, {29,52}, {42,52}, {55,52}, {68,52}, {81,52}, {94,52}, {107,52}, {120,52}, {133,52}, {146,52}, {171,52}, {211,52},
- {2,64}, {18,64}, {34,64}, {83,64}, {131,64}, {148,64}, {164,64}, {180,64}, {198,64}, {211,64}, {224,64},
- },
- {
- // RGB LED Index to Flag
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, 1,
- 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1,
- 8, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
- 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1,
- 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1,
- }
-};
-
#endif // RGB_MATRIX_ENABLE
diff --git a/keyboards/keychron/q3/ansi/config.h b/keyboards/keychron/q3/ansi/config.h
index f7c1c16931..77afc9b9b6 100644
--- a/keyboards/keychron/q3/ansi/config.h
+++ b/keyboards/keychron/q3/ansi/config.h
@@ -16,19 +16,13 @@
#pragma once
-/* key matrix pins */
-#define MATRIX_ROW_PINS { B5, B4, B3, A15, A14, A13 }
-#define MATRIX_COL_PINS { C14, C15, A0, A1, A2, A3, A4, A5, A6, A7, B0, B1, A8, A9, A10, H3 }
-
-/* We uses a pin with a stronger pull resistor than the internal MCU pins */
+/* We use a pin with a stronger pull resistor than the internal MCU pins */
// #define MATRIX_UNSELECT_DRIVE_HIGH
/* RGB Matrix Configuration */
-#define DRIVER_1_LED_TOTAL 48
-#define DRIVER_2_LED_TOTAL 39
-#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
+#define RGB_MATRIX_LED_COUNT 87
-#define CKLED2001_CURRENT_TUNE \
+#define SNLED27351_CURRENT_TUNE \
{ 0x9D, 0x9D, 0x44, 0x9D, 0x9D, 0x44, 0x9D, 0x9D, 0x44, 0x9D, 0x9D, 0x44 }
/* Enable CapsLcok LED */
diff --git a/keyboards/keychron/q3/ansi/info.json b/keyboards/keychron/q3/ansi/info.json
index 124ac1bdcc..2162208082 100644
--- a/keyboards/keychron/q3/ansi/info.json
+++ b/keyboards/keychron/q3/ansi/info.json
@@ -1,18 +1,109 @@
{
- "keyboard_name": "Keychron Q3",
- "manufacturer": "Keychron",
- "url": "https://github.com/Keychron",
- "maintainer": "lalalademaxiya1",
"usb": {
- "vid": "0x3434",
"pid": "0x0120",
"device_version": "1.0.0"
},
"rgb_matrix": {
- "driver": "ckled2001"
+ "layout": [
+ {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1},
+ {"matrix": [0, 1], "x": 26, "y": 0, "flags": 1},
+ {"matrix": [0, 2], "x": 39, "y": 0, "flags": 1},
+ {"matrix": [0, 3], "x": 52, "y": 0, "flags": 1},
+ {"matrix": [0, 4], "x": 65, "y": 0, "flags": 1},
+ {"matrix": [0, 5], "x": 85, "y": 0, "flags": 1},
+ {"matrix": [0, 6], "x": 98, "y": 0, "flags": 1},
+ {"matrix": [0, 7], "x": 111, "y": 0, "flags": 1},
+ {"matrix": [0, 8], "x": 124, "y": 0, "flags": 1},
+ {"matrix": [0, 9], "x": 143, "y": 0, "flags": 1},
+ {"matrix": [0, 10], "x": 156, "y": 0, "flags": 1},
+ {"matrix": [0, 11], "x": 169, "y": 0, "flags": 1},
+ {"matrix": [0, 12], "x": 182, "y": 0, "flags": 1},
+ {"matrix": [0, 14], "x": 198, "y": 0, "flags": 1},
+ {"matrix": [0, 15], "x": 211, "y": 0, "flags": 1},
+ {"matrix": [3, 14], "x": 224, "y": 0, "flags": 1},
+
+ {"matrix": [1, 0], "x": 0, "y": 15, "flags": 1},
+ {"matrix": [1, 1], "x": 13, "y": 15, "flags": 4},
+ {"matrix": [1, 2], "x": 26, "y": 15, "flags": 4},
+ {"matrix": [1, 3], "x": 39, "y": 15, "flags": 4},
+ {"matrix": [1, 4], "x": 52, "y": 15, "flags": 4},
+ {"matrix": [1, 5], "x": 65, "y": 15, "flags": 4},
+ {"matrix": [1, 6], "x": 78, "y": 15, "flags": 4},
+ {"matrix": [1, 7], "x": 91, "y": 15, "flags": 4},
+ {"matrix": [1, 8], "x": 104, "y": 15, "flags": 4},
+ {"matrix": [1, 9], "x": 117, "y": 15, "flags": 4},
+ {"matrix": [1, 10], "x": 130, "y": 15, "flags": 4},
+ {"matrix": [1, 11], "x": 143, "y": 15, "flags": 4},
+ {"matrix": [1, 12], "x": 156, "y": 15, "flags": 4},
+ {"matrix": [1, 13], "x": 176, "y": 15, "flags": 1},
+ {"matrix": [1, 14], "x": 198, "y": 15, "flags": 1},
+ {"matrix": [1, 15], "x": 211, "y": 15, "flags": 1},
+ {"matrix": [3, 15], "x": 224, "y": 15, "flags": 1},
+
+ {"matrix": [2, 0], "x": 3, "y": 28, "flags": 1},
+ {"matrix": [2, 1], "x": 20, "y": 28, "flags": 4},
+ {"matrix": [2, 2], "x": 33, "y": 28, "flags": 4},
+ {"matrix": [2, 3], "x": 46, "y": 28, "flags": 4},
+ {"matrix": [2, 4], "x": 59, "y": 28, "flags": 4},
+ {"matrix": [2, 5], "x": 72, "y": 28, "flags": 4},
+ {"matrix": [2, 6], "x": 85, "y": 28, "flags": 4},
+ {"matrix": [2, 7], "x": 98, "y": 28, "flags": 4},
+ {"matrix": [2, 8], "x": 111, "y": 28, "flags": 4},
+ {"matrix": [2, 9], "x": 124, "y": 28, "flags": 4},
+ {"matrix": [2, 10], "x": 137, "y": 28, "flags": 4},
+ {"matrix": [2, 11], "x": 150, "y": 28, "flags": 4},
+ {"matrix": [2, 12], "x": 163, "y": 28, "flags": 4},
+ {"matrix": [2, 13], "x": 179, "y": 28, "flags": 4},
+ {"matrix": [2, 14], "x": 198, "y": 28, "flags": 1},
+ {"matrix": [2, 15], "x": 211, "y": 28, "flags": 1},
+ {"matrix": [3, 12], "x": 224, "y": 28, "flags": 1},
+
+ {"matrix": [3, 0], "x": 5, "y": 40, "flags": 8},
+ {"matrix": [3, 1], "x": 23, "y": 40, "flags": 4},
+ {"matrix": [3, 2], "x": 36, "y": 40, "flags": 4},
+ {"matrix": [3, 3], "x": 49, "y": 40, "flags": 4},
+ {"matrix": [3, 4], "x": 62, "y": 40, "flags": 4},
+ {"matrix": [3, 5], "x": 75, "y": 40, "flags": 4},
+ {"matrix": [3, 6], "x": 88, "y": 40, "flags": 4},
+ {"matrix": [3, 7], "x": 101, "y": 40, "flags": 4},
+ {"matrix": [3, 8], "x": 114, "y": 40, "flags": 4},
+ {"matrix": [3, 9], "x": 127, "y": 40, "flags": 4},
+ {"matrix": [3, 10], "x": 140, "y": 40, "flags": 4},
+ {"matrix": [3, 11], "x": 153, "y": 40, "flags": 4},
+ {"matrix": [3, 13], "x": 174, "y": 40, "flags": 1},
+
+ {"matrix": [4, 0], "x": 8, "y": 52, "flags": 1},
+ {"matrix": [4, 2], "x": 29, "y": 52, "flags": 4},
+ {"matrix": [4, 3], "x": 42, "y": 52, "flags": 4},
+ {"matrix": [4, 4], "x": 55, "y": 52, "flags": 4},
+ {"matrix": [4, 5], "x": 68, "y": 52, "flags": 4},
+ {"matrix": [4, 6], "x": 81, "y": 52, "flags": 4},
+ {"matrix": [4, 7], "x": 94, "y": 52, "flags": 4},
+ {"matrix": [4, 8], "x": 107, "y": 52, "flags": 4},
+ {"matrix": [4, 9], "x": 120, "y": 52, "flags": 4},
+ {"matrix": [4, 10], "x": 133, "y": 52, "flags": 4},
+ {"matrix": [4, 11], "x": 146, "y": 52, "flags": 4},
+ {"matrix": [4, 13], "x": 171, "y": 52, "flags": 1},
+ {"matrix": [4, 15], "x": 211, "y": 52, "flags": 1},
+
+ {"matrix": [5, 0], "x": 2, "y": 64, "flags": 1},
+ {"matrix": [5, 1], "x": 18, "y": 64, "flags": 1},
+ {"matrix": [5, 2], "x": 34, "y": 64, "flags": 1},
+ {"matrix": [5, 6], "x": 83, "y": 64, "flags": 4},
+ {"matrix": [5, 10], "x": 131, "y": 64, "flags": 1},
+ {"matrix": [5, 11], "x": 148, "y": 64, "flags": 1},
+ {"matrix": [5, 12], "x": 164, "y": 64, "flags": 1},
+ {"matrix": [5, 13], "x": 180, "y": 64, "flags": 1},
+ {"matrix": [5, 14], "x": 198, "y": 64, "flags": 1},
+ {"matrix": [5, 15], "x": 211, "y": 64, "flags": 1},
+ {"matrix": [4, 14], "x": 224, "y": 64, "flags": 1}
+ ]
+ },
+ "matrix_pins": {
+ "rows": ["B5", "B4", "B3", "A15", "A14", "A13"],
+ "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "A10", "H3"]
},
- "processor": "STM32L432",
- "bootloader": "stm32-dfu",
+ "community_layouts": ["tkl_ansi"],
"layouts": {
"LAYOUT_tkl_ansi": {
"layout": [
diff --git a/keyboards/keychron/q3/ansi/rules.mk b/keyboards/keychron/q3/ansi/rules.mk
index 58bbb89a72..7ff128fa69 100644
--- a/keyboards/keychron/q3/ansi/rules.mk
+++ b/keyboards/keychron/q3/ansi/rules.mk
@@ -1,18 +1 @@
-# Build Options
-# change yes to no to disable
-#
-BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
-MOUSEKEY_ENABLE = yes # Mouse keys
-EXTRAKEY_ENABLE = yes # Audio control and System control
-CONSOLE_ENABLE = no # Console for debug
-COMMAND_ENABLE = no # Commands for debug and configuration
-NKRO_ENABLE = yes # Enable USB N-key Rollover
-BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
-RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
-AUDIO_ENABLE = no # Audio output
-DIP_SWITCH_ENABLE = yes
-RGB_MATRIX_ENABLE = yes
-LTO_ENABLE = yes
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = embedded_flash
-
+# This file intentionally left blank \ No newline at end of file
diff --git a/keyboards/keychron/q3/ansi_encoder/ansi_encoder.c b/keyboards/keychron/q3/ansi_encoder/ansi_encoder.c
index f873f77d12..a386e87a01 100644
--- a/keyboards/keychron/q3/ansi_encoder/ansi_encoder.c
+++ b/keyboards/keychron/q3/ansi_encoder/ansi_encoder.c
@@ -18,8 +18,8 @@
#ifdef RGB_MATRIX_ENABLE
-const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to IS31 manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | R location
* | | G location
@@ -119,36 +119,4 @@ const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
{1, C_15, A_15, B_15},
};
-#define __ NO_LED
-
-led_config_t g_led_config = {
- {
- // Key Matrix to LED Index
- { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, __, 13, 14 },
- { 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 },
- { 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48 },
- { 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 49, 62, 15, 32 },
- { 63, __, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, __, 74, 86, 75 },
- { 76, 77, 78, __, __, __, 79, __, __, __, 80, 81, 82, 83, 84, 85 },
- },
- {
- // LED Index to Physical Position
- {0,0}, {16,0}, {29,0}, {42,0}, {55,0}, {71,0}, {84,0}, {97,0}, {110,0}, {126,0}, {139,0}, {152,0}, {165,0}, {198,0}, {211,0}, {224,0},
- {0,15}, {13,15}, {26,15}, {39,15}, {52,15}, {65,15}, {78,15}, {91,15}, {104,15}, {117,15}, {130,15}, {143,15}, {156,15}, {176,15}, {198,15}, {211,15}, {224,15},
- {3,28}, {19,28}, {32,28}, {45,28}, {59,28}, {72,28}, {85,28}, {98,28}, {111,28}, {124,28}, {137,28}, {150,28}, {163,28}, {179,28}, {198,28}, {211,28}, {224,28},
- {5,40}, {23,40}, {36,40}, {49,40}, {62,40}, {75,40}, {88,40}, {101,40}, {114,40}, {127,40}, {140,40}, {153,40}, {174,40},
- {8,52}, {29,52}, {42,52}, {55,52}, {68,52}, {81,52}, {94,52}, {107,52}, {120,52}, {133,52}, {146,52}, {171,52}, {211,52},
- {2,64}, {18,64}, {34,64}, {83,64}, {131,64}, {148,64}, {164,64}, {180,64}, {198,64}, {211,64}, {224,64},
- },
- {
- // RGB LED Index to Flag
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, 1,
- 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1,
- 8, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
- 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1,
- 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1,
- }
-};
-
#endif // RGB_MATRIX_ENABLE
diff --git a/keyboards/keychron/q3/ansi_encoder/config.h b/keyboards/keychron/q3/ansi_encoder/config.h
index 201288841a..2a6f9ba4c5 100644
--- a/keyboards/keychron/q3/ansi_encoder/config.h
+++ b/keyboards/keychron/q3/ansi_encoder/config.h
@@ -21,14 +21,9 @@
#define MATRIX_COL_PINS { C14, C15, A0, A1, A2, A3, A4, A5, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN }
/* RGB Matrix Configuration */
-#define DRIVER_1_LED_TOTAL 48
-#define DRIVER_2_LED_TOTAL 39
-#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
+#define RGB_MATRIX_LED_COUNT 87
-/* Encoder Configuration */
-#define ENCODER_DEFAULT_POS 0x3
-
-#define CKLED2001_CURRENT_TUNE \
+#define SNLED27351_CURRENT_TUNE \
{ 0x9D, 0x9D, 0x44, 0x9D, 0x9D, 0x44, 0x9D, 0x9D, 0x44, 0x9D, 0x9D, 0x44 }
/* Enable CapsLcok LED */
diff --git a/keyboards/keychron/q3/ansi_encoder/info.json b/keyboards/keychron/q3/ansi_encoder/info.json
index 2dd2f18bf9..f3bab2768f 100644
--- a/keyboards/keychron/q3/ansi_encoder/info.json
+++ b/keyboards/keychron/q3/ansi_encoder/info.json
@@ -1,23 +1,111 @@
{
- "keyboard_name": "Keychron Q3",
- "manufacturer": "Keychron",
- "url": "https://github.com/Keychron",
- "maintainer": "lalalademaxiya1",
"usb": {
- "vid": "0x3434",
"pid": "0x0121",
"device_version": "1.0.0"
},
- "rgb_matrix": {
- "driver": "ckled2001"
- },
"encoder": {
+ "enabled": true,
"rotary": [
{"pin_a": "A10", "pin_b": "A8"}
]
},
- "processor": "STM32L432",
- "bootloader": "stm32-dfu",
+ "rgb_matrix": {
+ "layout": [
+ {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1},
+ {"matrix": [0, 1], "x": 16, "y": 0, "flags": 1},
+ {"matrix": [0, 2], "x": 29, "y": 0, "flags": 1},
+ {"matrix": [0, 3], "x": 42, "y": 0, "flags": 1},
+ {"matrix": [0, 4], "x": 55, "y": 0, "flags": 1},
+ {"matrix": [0, 5], "x": 71, "y": 0, "flags": 1},
+ {"matrix": [0, 6], "x": 84, "y": 0, "flags": 1},
+ {"matrix": [0, 7], "x": 97, "y": 0, "flags": 1},
+ {"matrix": [0, 8], "x": 110, "y": 0, "flags": 1},
+ {"matrix": [0, 9], "x": 126, "y": 0, "flags": 1},
+ {"matrix": [0, 10], "x": 139, "y": 0, "flags": 1},
+ {"matrix": [0, 11], "x": 152, "y": 0, "flags": 1},
+ {"matrix": [0, 12], "x": 165, "y": 0, "flags": 1},
+ {"matrix": [0, 14], "x": 198, "y": 0, "flags": 1},
+ {"matrix": [0, 15], "x": 211, "y": 0, "flags": 1},
+ {"matrix": [3, 14], "x": 224, "y": 0, "flags": 1},
+
+ {"matrix": [1, 0], "x": 0, "y": 15, "flags": 1},
+ {"matrix": [1, 1], "x": 13, "y": 15, "flags": 4},
+ {"matrix": [1, 2], "x": 26, "y": 15, "flags": 4},
+ {"matrix": [1, 3], "x": 39, "y": 15, "flags": 4},
+ {"matrix": [1, 4], "x": 52, "y": 15, "flags": 4},
+ {"matrix": [1, 5], "x": 65, "y": 15, "flags": 4},
+ {"matrix": [1, 6], "x": 78, "y": 15, "flags": 4},
+ {"matrix": [1, 7], "x": 91, "y": 15, "flags": 4},
+ {"matrix": [1, 8], "x": 104, "y": 15, "flags": 4},
+ {"matrix": [1, 9], "x": 117, "y": 15, "flags": 4},
+ {"matrix": [1, 10], "x": 130, "y": 15, "flags": 4},
+ {"matrix": [1, 11], "x": 143, "y": 15, "flags": 4},
+ {"matrix": [1, 12], "x": 156, "y": 15, "flags": 4},
+ {"matrix": [1, 13], "x": 176, "y": 15, "flags": 1},
+ {"matrix": [1, 14], "x": 198, "y": 15, "flags": 1},
+ {"matrix": [1, 15], "x": 211, "y": 15, "flags": 1},
+ {"matrix": [3, 15], "x": 224, "y": 15, "flags": 1},
+
+ {"matrix": [2, 0], "x": 3, "y": 28, "flags": 1},
+ {"matrix": [2, 1], "x": 19, "y": 28, "flags": 4},
+ {"matrix": [2, 2], "x": 32, "y": 28, "flags": 4},
+ {"matrix": [2, 3], "x": 45, "y": 28, "flags": 4},
+ {"matrix": [2, 4], "x": 59, "y": 28, "flags": 4},
+ {"matrix": [2, 5], "x": 72, "y": 28, "flags": 4},
+ {"matrix": [2, 6], "x": 85, "y": 28, "flags": 4},
+ {"matrix": [2, 7], "x": 98, "y": 28, "flags": 4},
+ {"matrix": [2, 8], "x": 111, "y": 28, "flags": 4},
+ {"matrix": [2, 9], "x": 124, "y": 28, "flags": 4},
+ {"matrix": [2, 10], "x": 137, "y": 28, "flags": 4},
+ {"matrix": [2, 11], "x": 150, "y": 28, "flags": 4},
+ {"matrix": [2, 12], "x": 163, "y": 28, "flags": 4},
+ {"matrix": [2, 13], "x": 179, "y": 28, "flags": 4},
+ {"matrix": [2, 14], "x": 198, "y": 28, "flags": 1},
+ {"matrix": [2, 15], "x": 211, "y": 28, "flags": 1},
+ {"matrix": [3, 12], "x": 224, "y": 28, "flags": 1},
+
+ {"matrix": [3, 0], "x": 5, "y": 40, "flags": 8},
+ {"matrix": [3, 1], "x": 23, "y": 40, "flags": 4},
+ {"matrix": [3, 2], "x": 36, "y": 40, "flags": 4},
+ {"matrix": [3, 3], "x": 49, "y": 40, "flags": 4},
+ {"matrix": [3, 4], "x": 62, "y": 40, "flags": 4},
+ {"matrix": [3, 5], "x": 75, "y": 40, "flags": 4},
+ {"matrix": [3, 6], "x": 88, "y": 40, "flags": 4},
+ {"matrix": [3, 7], "x": 101, "y": 40, "flags": 4},
+ {"matrix": [3, 8], "x": 114, "y": 40, "flags": 4},
+ {"matrix": [3, 9], "x": 127, "y": 40, "flags": 4},
+ {"matrix": [3, 10], "x": 140, "y": 40, "flags": 4},
+ {"matrix": [3, 11], "x": 153, "y": 40, "flags": 4},
+ {"matrix": [3, 13], "x": 174, "y": 40, "flags": 1},
+
+ {"matrix": [4, 0], "x": 8, "y": 52, "flags": 1},
+ {"matrix": [4, 2], "x": 29, "y": 52, "flags": 4},
+ {"matrix": [4, 3], "x": 42, "y": 52, "flags": 4},
+ {"matrix": [4, 4], "x": 55, "y": 52, "flags": 4},
+ {"matrix": [4, 5], "x": 68, "y": 52, "flags": 4},
+ {"matrix": [4, 6], "x": 81, "y": 52, "flags": 4},
+ {"matrix": [4, 7], "x": 94, "y": 52, "flags": 4},
+ {"matrix": [4, 8], "x": 107, "y": 52, "flags": 4},
+ {"matrix": [4, 9], "x": 120, "y": 52, "flags": 4},
+ {"matrix": [4, 10], "x": 133, "y": 52, "flags": 4},
+ {"matrix": [4, 11], "x": 146, "y": 52, "flags": 4},
+ {"matrix": [4, 13], "x": 171, "y": 52, "flags": 1},
+ {"matrix": [4, 15], "x": 211, "y": 52, "flags": 1},
+
+ {"matrix": [5, 0], "x": 2, "y": 64, "flags": 1},
+ {"matrix": [5, 1], "x": 18, "y": 64, "flags": 1},
+ {"matrix": [5, 2], "x": 34, "y": 64, "flags": 1},
+ {"matrix": [5, 6], "x": 83, "y": 64, "flags": 4},
+ {"matrix": [5, 10], "x": 131, "y": 64, "flags": 1},
+ {"matrix": [5, 11], "x": 148, "y": 64, "flags": 1},
+ {"matrix": [5, 12], "x": 164, "y": 64, "flags": 1},
+ {"matrix": [5, 13], "x": 180, "y": 64, "flags": 1},
+ {"matrix": [5, 14], "x": 198, "y": 64, "flags": 1},
+ {"matrix": [5, 15], "x": 211, "y": 64, "flags": 1},
+ {"matrix": [4, 14], "x": 224, "y": 64, "flags": 1}
+ ]
+ },
+ "community_layouts": ["tkl_f13_ansi"],
"layouts": {
"LAYOUT_tkl_f13_ansi": {
"layout": [
diff --git a/keyboards/keychron/q3/ansi_encoder/rules.mk b/keyboards/keychron/q3/ansi_encoder/rules.mk
index 77b90f2466..5f0634f6d3 100644
--- a/keyboards/keychron/q3/ansi_encoder/rules.mk
+++ b/keyboards/keychron/q3/ansi_encoder/rules.mk
@@ -1,23 +1,4 @@
-# Build Options
-# change yes to no to disable
-#
-BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
-MOUSEKEY_ENABLE = yes # Mouse keys
-EXTRAKEY_ENABLE = yes # Audio control and System control
-CONSOLE_ENABLE = no # Console for debug
-COMMAND_ENABLE = no # Commands for debug and configuration
-NKRO_ENABLE = yes # Enable USB N-key Rollover
-BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
-RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
-AUDIO_ENABLE = no # Audio output
-ENCODER_ENABLE = yes # Enable Encoder
-DIP_SWITCH_ENABLE = yes
-RGB_MATRIX_ENABLE = yes
-LTO_ENABLE = yes
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = embedded_flash
-
-# custom matrix setup
+# Custom matrix setup
CUSTOM_MATRIX = lite
SRC += matrix.c
diff --git a/keyboards/keychron/q3/config.h b/keyboards/keychron/q3/config.h
index 79f07d0390..035aea2bb3 100644
--- a/keyboards/keychron/q3/config.h
+++ b/keyboards/keychron/q3/config.h
@@ -16,17 +16,10 @@
#pragma once
-/* key matrix size */
-#define MATRIX_ROWS 6
-#define MATRIX_COLS 16
-
-/* COL2ROW or ROW2COL */
-#define DIODE_DIRECTION ROW2COL
-
/* RGB Matrix Driver Configuration */
-#define DRIVER_COUNT 2
-#define DRIVER_ADDR_1 0b1110111
-#define DRIVER_ADDR_2 0b1110100
+#define SNLED27351_DRIVER_COUNT 2
+#define DRIVER_ADDR_1 SNLED27351_I2C_ADDRESS_VDDIO
+#define DRIVER_ADDR_2 SNLED27351_I2C_ADDRESS_GND
/* Increase I2C speed to 1000 KHz */
#define I2C1_TIMINGR_PRESC 0U
@@ -35,8 +28,7 @@
#define I2C1_TIMINGR_SCLH 15U
#define I2C1_TIMINGR_SCLL 51U
-/* Scan phase of led driver set as MSKPHASE_9CHANNEL(defined as 0x03 in CKLED2001.h) */
-#define PHASE_CHANNEL MSKPHASE_9CHANNEL
+#define SNLED27351_PHASE_CHANNEL SNLED27351_MSKPHASE_9CHANNEL
/* DIP switch */
#define DIP_SWITCH_MATRIX_GRID { {5, 4} }
@@ -44,61 +36,11 @@
/* Disable DIP switch in matrix data */
#define MATRIX_MASKED
+/* Encoder Configuration*/
+#define ENCODER_DEFAULT_POS 0x3
+
/* turn off effects when suspended */
#define RGB_DISABLE_WHEN_USB_SUSPENDED
-/* EEPROM Driver Configuration */
-#define WEAR_LEVELING_LOGICAL_SIZE 2048
-#define WEAR_LEVELING_BACKING_SIZE (WEAR_LEVELING_LOGICAL_SIZE * 2)
-
-// RGB Matrix Animation modes. Explicitly enabled
-// For full list of effects, see:
-// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects
-// #define ENABLE_RGB_MATRIX_ALPHAS_MODS
-// #define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN
-// #define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT
-#define ENABLE_RGB_MATRIX_BREATHING
-// #define ENABLE_RGB_MATRIX_BAND_SAT
-// #define ENABLE_RGB_MATRIX_BAND_VAL
-// #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
-// #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL
-// #define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT
-#define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL
-#define ENABLE_RGB_MATRIX_CYCLE_ALL
-#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
-#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN
-#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
-#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN
-#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
-#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL
-#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL
-#define ENABLE_RGB_MATRIX_DUAL_BEACON
-#define ENABLE_RGB_MATRIX_RAINBOW_BEACON
-// #define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS
-// #define ENABLE_RGB_MATRIX_RAINDROPS
-#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
-// #define ENABLE_RGB_MATRIX_HUE_BREATHING
-// #define ENABLE_RGB_MATRIX_HUE_PENDULUM
-// #define ENABLE_RGB_MATRIX_HUE_WAVE
-#define ENABLE_RGB_MATRIX_PIXEL_RAIN
-// #define ENABLE_RGB_MATRIX_PIXEL_FLOW
-// #define ENABLE_RGB_MATRIX_PIXEL_FRACTAL
-// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined
-#define ENABLE_RGB_MATRIX_TYPING_HEATMAP
-#define ENABLE_RGB_MATRIX_DIGITAL_RAIN
-// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined
-#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
-// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE
-// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
-#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
-// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
-// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
-// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
-#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
-#define ENABLE_RGB_MATRIX_SPLASH
-// #define ENABLE_RGB_MATRIX_MULTISPLASH
-#define ENABLE_RGB_MATRIX_SOLID_SPLASH
-// #define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
-
#define RGB_MATRIX_KEYPRESSES
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
diff --git a/keyboards/keychron/q3/info.json b/keyboards/keychron/q3/info.json
new file mode 100644
index 0000000000..c08d73f26a
--- /dev/null
+++ b/keyboards/keychron/q3/info.json
@@ -0,0 +1,52 @@
+{
+ "manufacturer": "Keychron Q3",
+ "maintainer": "lalalademaxiya1",
+ "bootloader": "stm32-dfu",
+ "diode_direction": "ROW2COL",
+ "eeprom": {
+ "wear_leveling": {
+ "backing_size": 4096
+ }
+ },
+ "features": {
+ "bootmagic": true,
+ "dip_switch": true,
+ "command": false,
+ "console": false,
+ "extrakey": true,
+ "mousekey": true,
+ "nkro": true,
+ "rgb_matrix": true
+ },
+ "processor": "STM32L432",
+ "rgb_matrix": {
+ "animations": {
+ "band_spiral_val": true,
+ "breathing": true,
+ "cycle_all": true,
+ "cycle_left_right": 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,
+ "jellybean_raindrops": true,
+ "pixel_rain": true,
+ "rainbow_beacon": true,
+ "rainbow_moving_chevron": true,
+ "solid_reactive_multinexus": true,
+ "solid_reactive_multiwide": true,
+ "solid_reactive_simple": true,
+ "solid_splash": true,
+ "splash": true,
+ "typing_heatmap": true
+ },
+ "driver": "snled27351"
+ },
+ "url": "https://github.com/Keychron",
+ "usb": {
+ "vid": "0x3434"
+ }
+} \ No newline at end of file
diff --git a/keyboards/keychron/q3/iso/config.h b/keyboards/keychron/q3/iso/config.h
index c6992eb52b..3ffda1ce1e 100644
--- a/keyboards/keychron/q3/iso/config.h
+++ b/keyboards/keychron/q3/iso/config.h
@@ -16,19 +16,13 @@
#pragma once
-/* key matrix pins */
-#define MATRIX_ROW_PINS { B5, B4, B3, A15, A14, A13 }
-#define MATRIX_COL_PINS { C14, C15, A0, A1, A2, A3, A4, A5, A6, A7, B0, B1, A8, A9, A10, H3 }
-
-/* We uses a pin with a stronger pull resistor than the internal MCU pins */
+/* We use a pin with a stronger pull resistor than the internal MCU pins */
// #define MATRIX_UNSELECT_DRIVE_HIGH
/* RGB Matrix Configuration */
-#define DRIVER_1_LED_TOTAL 48
-#define DRIVER_2_LED_TOTAL 40
-#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
+#define RGB_MATRIX_LED_COUNT 88
-#define CKLED2001_CURRENT_TUNE \
+#define SNLED27351_CURRENT_TUNE \
{ 0x9D, 0x9D, 0x44, 0x9D, 0x9D, 0x44, 0x9D, 0x9D, 0x44, 0x9D, 0x9D, 0x44 }
/* Enable caps-lock LED */
diff --git a/keyboards/keychron/q3/iso/info.json b/keyboards/keychron/q3/iso/info.json
index c9618c5b47..14e1e96629 100644
--- a/keyboards/keychron/q3/iso/info.json
+++ b/keyboards/keychron/q3/iso/info.json
@@ -1,18 +1,110 @@
{
- "keyboard_name": "Keychron Q3",
- "manufacturer": "Keychron",
- "url": "https://github.com/Keychron",
- "maintainer": "lalalademaxiya1",
"usb": {
- "vid": "0x3434",
"pid": "0x0122",
"device_version": "1.0.0"
},
"rgb_matrix": {
- "driver": "ckled2001"
+ "layout": [
+ {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1},
+ {"matrix": [0, 1], "x": 26, "y": 0, "flags": 1},
+ {"matrix": [0, 2], "x": 39, "y": 0, "flags": 1},
+ {"matrix": [0, 3], "x": 52, "y": 0, "flags": 1},
+ {"matrix": [0, 4], "x": 65, "y": 0, "flags": 1},
+ {"matrix": [0, 5], "x": 84, "y": 0, "flags": 1},
+ {"matrix": [0, 6], "x": 97, "y": 0, "flags": 1},
+ {"matrix": [0, 7], "x": 111, "y": 0, "flags": 1},
+ {"matrix": [0, 8], "x": 124, "y": 0, "flags": 1},
+ {"matrix": [0, 9], "x": 143, "y": 0, "flags": 1},
+ {"matrix": [0, 10], "x": 156, "y": 0, "flags": 1},
+ {"matrix": [0, 11], "x": 169, "y": 0, "flags": 1},
+ {"matrix": [0, 12], "x": 182, "y": 0, "flags": 1},
+ {"matrix": [0, 14], "x": 198, "y": 0, "flags": 1},
+ {"matrix": [0, 15], "x": 211, "y": 0, "flags": 1},
+ {"matrix": [3, 14], "x": 224, "y": 0, "flags": 1},
+
+ {"matrix": [1, 0], "x": 0, "y": 15, "flags": 1},
+ {"matrix": [1, 1], "x": 13, "y": 15, "flags": 4},
+ {"matrix": [1, 2], "x": 26, "y": 15, "flags": 4},
+ {"matrix": [1, 3], "x": 39, "y": 15, "flags": 4},
+ {"matrix": [1, 4], "x": 52, "y": 15, "flags": 4},
+ {"matrix": [1, 5], "x": 65, "y": 15, "flags": 4},
+ {"matrix": [1, 6], "x": 78, "y": 15, "flags": 4},
+ {"matrix": [1, 7], "x": 91, "y": 15, "flags": 4},
+ {"matrix": [1, 8], "x": 104, "y": 15, "flags": 4},
+ {"matrix": [1, 9], "x": 117, "y": 15, "flags": 4},
+ {"matrix": [1, 10], "x": 130, "y": 15, "flags": 4},
+ {"matrix": [1, 11], "x": 143, "y": 15, "flags": 4},
+ {"matrix": [1, 12], "x": 156, "y": 15, "flags": 4},
+ {"matrix": [1, 13], "x": 176, "y": 15, "flags": 1},
+ {"matrix": [1, 14], "x": 198, "y": 15, "flags": 1},
+ {"matrix": [1, 15], "x": 211, "y": 15, "flags": 1},
+ {"matrix": [3, 15], "x": 224, "y": 15, "flags": 1},
+
+ {"matrix": [2, 0], "x": 3, "y": 28, "flags": 1},
+ {"matrix": [2, 1], "x": 19, "y": 28, "flags": 4},
+ {"matrix": [2, 2], "x": 32, "y": 28, "flags": 4},
+ {"matrix": [2, 3], "x": 45, "y": 28, "flags": 4},
+ {"matrix": [2, 4], "x": 59, "y": 28, "flags": 4},
+ {"matrix": [2, 5], "x": 72, "y": 28, "flags": 4},
+ {"matrix": [2, 6], "x": 85, "y": 28, "flags": 4},
+ {"matrix": [2, 7], "x": 98, "y": 28, "flags": 4},
+ {"matrix": [2, 8], "x": 111, "y": 28, "flags": 4},
+ {"matrix": [2, 9], "x": 124, "y": 28, "flags": 4},
+ {"matrix": [2, 10], "x": 137, "y": 28, "flags": 4},
+ {"matrix": [2, 11], "x": 150, "y": 28, "flags": 4},
+ {"matrix": [2, 12], "x": 163, "y": 28, "flags": 4},
+ {"matrix": [2, 14], "x": 198, "y": 28, "flags": 1},
+ {"matrix": [2, 15], "x": 211, "y": 28, "flags": 1},
+ {"matrix": [3, 12], "x": 224, "y": 28, "flags": 1},
+
+ {"matrix": [3, 0], "x": 5, "y": 40, "flags": 8},
+ {"matrix": [3, 1], "x": 23, "y": 40, "flags": 4},
+ {"matrix": [3, 2], "x": 36, "y": 40, "flags": 4},
+ {"matrix": [3, 3], "x": 49, "y": 40, "flags": 4},
+ {"matrix": [3, 4], "x": 62, "y": 40, "flags": 4},
+ {"matrix": [3, 5], "x": 75, "y": 40, "flags": 4},
+ {"matrix": [3, 6], "x": 88, "y": 40, "flags": 4},
+ {"matrix": [3, 7], "x": 101, "y": 40, "flags": 4},
+ {"matrix": [3, 8], "x": 114, "y": 40, "flags": 4},
+ {"matrix": [3, 9], "x": 127, "y": 40, "flags": 4},
+ {"matrix": [3, 10], "x": 140, "y": 40, "flags": 4},
+ {"matrix": [3, 11], "x": 153, "y": 40, "flags": 4},
+ {"matrix": [3, 13], "x": 166, "y": 40, "flags": 4},
+ {"matrix": [2, 13], "x": 183, "y": 36, "flags": 1},
+
+ {"matrix": [4, 0], "x": 2, "y": 52, "flags": 1},
+ {"matrix": [4, 1], "x": 16, "y": 52, "flags": 4},
+ {"matrix": [4, 2], "x": 29, "y": 52, "flags": 4},
+ {"matrix": [4, 3], "x": 42, "y": 52, "flags": 4},
+ {"matrix": [4, 4], "x": 55, "y": 52, "flags": 4},
+ {"matrix": [4, 5], "x": 68, "y": 52, "flags": 4},
+ {"matrix": [4, 6], "x": 81, "y": 52, "flags": 4},
+ {"matrix": [4, 7], "x": 94, "y": 52, "flags": 4},
+ {"matrix": [4, 8], "x": 107, "y": 52, "flags": 4},
+ {"matrix": [4, 9], "x": 120, "y": 52, "flags": 4},
+ {"matrix": [4, 10], "x": 133, "y": 52, "flags": 4},
+ {"matrix": [4, 11], "x": 146, "y": 52, "flags": 4},
+ {"matrix": [4, 13], "x": 171, "y": 52, "flags": 1},
+ {"matrix": [4, 15], "x": 211, "y": 52, "flags": 1},
+
+ {"matrix": [5, 0], "x": 2, "y": 64, "flags": 1},
+ {"matrix": [5, 1], "x": 18, "y": 64, "flags": 1},
+ {"matrix": [5, 2], "x": 34, "y": 64, "flags": 1},
+ {"matrix": [5, 6], "x": 83, "y": 64, "flags": 4},
+ {"matrix": [5, 10], "x": 131, "y": 64, "flags": 1},
+ {"matrix": [5, 11], "x": 148, "y": 64, "flags": 1},
+ {"matrix": [5, 12], "x": 164, "y": 64, "flags": 1},
+ {"matrix": [5, 13], "x": 180, "y": 64, "flags": 1},
+ {"matrix": [5, 14], "x": 198, "y": 64, "flags": 1},
+ {"matrix": [5, 15], "x": 211, "y": 64, "flags": 1},
+ {"matrix": [4, 14], "x": 224, "y": 64, "flags": 1}
+ ]
+ },
+ "matrix_pins": {
+ "rows": ["B5", "B4", "B3", "A15", "A14", "A13"],
+ "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "A10", "H3"]
},
- "processor": "STM32L432",
- "bootloader": "stm32-dfu",
+ "community_layouts": ["tkl_iso"],
"layouts": {
"LAYOUT_tkl_iso": {
"layout": [
diff --git a/keyboards/keychron/q3/iso/iso.c b/keyboards/keychron/q3/iso/iso.c
index d747d55115..725af67006 100644
--- a/keyboards/keychron/q3/iso/iso.c
+++ b/keyboards/keychron/q3/iso/iso.c
@@ -18,8 +18,8 @@
#ifdef RGB_MATRIX_ENABLE
-const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to IS31 manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | R location
* | | G location
@@ -120,36 +120,4 @@ const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
{1, C_15, A_15, B_15},
};
-#define __ NO_LED
-
-led_config_t g_led_config = {
- {
- // Key Matrix to LED Index
- { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, __, 13, 14 },
- { 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 },
- { 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 62, 46, 47 },
- { 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 48, 61, 15, 32 },
- { 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, __, 75, 87, 76 },
- { 77, 78, 79, __, __, __, 80, __, __, __, 81, 82, 83, 84, 85, 86 },
- },
- {
- // LED Index to Physical Position
- {0,0}, {26,0}, {39,0}, {52,0}, {65,0}, {84,0}, {97,0}, {111,0}, {124,0}, {143,0}, {156,0}, {169,0}, {182,0}, {198,0}, {211,0}, {224,0},
- {0,15}, {13,15}, {26,15}, {39,15}, {52,15}, {65,15}, {78,15}, {91,15}, {104,15}, {117,15}, {130,15}, {143,15}, {156,15}, {176,15}, {198,15}, {211,15}, {224,15},
- {3,28}, {19,28}, {32,28}, {45,28}, {59,28}, {72,28}, {85,28}, {98,28}, {111,28}, {124,28}, {137,28}, {150,28}, {163,28}, {198,28}, {211,28}, {224,28},
- {5,40}, {23,40}, {36,40}, {49,40}, {62,40}, {75,40}, {88,40}, {101,40}, {114,40}, {127,40}, {140,40}, {153,40}, {166,40}, {183,36},
- {2,52}, {16,52}, {29,52}, {42,52}, {55,52}, {68,52}, {81,52}, {94,52}, {107,52}, {120,52}, {133,52}, {146,52}, {171,52}, {211,52},
- {2,64}, {18,64}, {34,64}, {83,64}, {131,64}, {148,64}, {164,64}, {180,64}, {198,64}, {211,64}, {224,64},
- },
- {
- // RGB LED Index to Flag
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, 1,
- 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1,
- 8, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
- 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1,
- 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1,
- }
-};
-
#endif // RGB_MATRIX_ENABLE
diff --git a/keyboards/keychron/q3/iso/rules.mk b/keyboards/keychron/q3/iso/rules.mk
index 58bbb89a72..7ff128fa69 100644
--- a/keyboards/keychron/q3/iso/rules.mk
+++ b/keyboards/keychron/q3/iso/rules.mk
@@ -1,18 +1 @@
-# Build Options
-# change yes to no to disable
-#
-BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
-MOUSEKEY_ENABLE = yes # Mouse keys
-EXTRAKEY_ENABLE = yes # Audio control and System control
-CONSOLE_ENABLE = no # Console for debug
-COMMAND_ENABLE = no # Commands for debug and configuration
-NKRO_ENABLE = yes # Enable USB N-key Rollover
-BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
-RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
-AUDIO_ENABLE = no # Audio output
-DIP_SWITCH_ENABLE = yes
-RGB_MATRIX_ENABLE = yes
-LTO_ENABLE = yes
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = embedded_flash
-
+# This file intentionally left blank \ No newline at end of file
diff --git a/keyboards/keychron/q3/iso_encoder/config.h b/keyboards/keychron/q3/iso_encoder/config.h
index 2ee93a4fae..6893c2e8ff 100644
--- a/keyboards/keychron/q3/iso_encoder/config.h
+++ b/keyboards/keychron/q3/iso_encoder/config.h
@@ -21,14 +21,9 @@
#define MATRIX_COL_PINS { C14, C15, A0, A1, A2, A3, A4, A5, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN }
/* RGB Matrix Configuration */
-#define DRIVER_1_LED_TOTAL 48
-#define DRIVER_2_LED_TOTAL 40
-#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
+#define RGB_MATRIX_LED_COUNT 88
-/* Encoder Configuration */
-#define ENCODER_DEFAULT_POS 0x3
-
-#define CKLED2001_CURRENT_TUNE \
+#define SNLED27351_CURRENT_TUNE \
{ 0x9D, 0x9D, 0x44, 0x9D, 0x9D, 0x44, 0x9D, 0x9D, 0x44, 0x9D, 0x9D, 0x44 }
/* Enable caps-lock LED */
diff --git a/keyboards/keychron/q3/iso_encoder/info.json b/keyboards/keychron/q3/iso_encoder/info.json
index 8571445087..f86e425c9d 100644
--- a/keyboards/keychron/q3/iso_encoder/info.json
+++ b/keyboards/keychron/q3/iso_encoder/info.json
@@ -1,23 +1,112 @@
{
- "keyboard_name": "Keychron Q3",
- "manufacturer": "Keychron",
- "url": "https://github.com/Keychron",
- "maintainer": "lalalademaxiya1",
"usb": {
- "vid": "0x3434",
"pid": "0x0123",
"device_version": "1.0.0"
},
- "rgb_matrix": {
- "driver": "ckled2001"
- },
"encoder": {
+ "enabled": true,
"rotary": [
{"pin_a": "A10", "pin_b": "A8"}
]
},
- "processor": "STM32L432",
- "bootloader": "stm32-dfu",
+ "rgb_matrix": {
+ "layout": [
+ {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1},
+ {"matrix": [0, 1], "x": 16, "y": 0, "flags": 1},
+ {"matrix": [0, 2], "x": 29, "y": 0, "flags": 1},
+ {"matrix": [0, 3], "x": 42, "y": 0, "flags": 1},
+ {"matrix": [0, 4], "x": 55, "y": 0, "flags": 1},
+ {"matrix": [0, 5], "x": 71, "y": 0, "flags": 1},
+ {"matrix": [0, 6], "x": 84, "y": 0, "flags": 1},
+ {"matrix": [0, 7], "x": 97, "y": 0, "flags": 1},
+ {"matrix": [0, 8], "x": 110, "y": 0, "flags": 1},
+ {"matrix": [0, 9], "x": 126, "y": 0, "flags": 1},
+ {"matrix": [0, 10], "x": 139, "y": 0, "flags": 1},
+ {"matrix": [0, 11], "x": 152, "y": 0, "flags": 1},
+ {"matrix": [0, 12], "x": 165, "y": 0, "flags": 1},
+ {"matrix": [0, 14], "x": 198, "y": 0, "flags": 1},
+ {"matrix": [0, 15], "x": 211, "y": 0, "flags": 1},
+ {"matrix": [3, 14], "x": 224, "y": 0, "flags": 1},
+
+ {"matrix": [1, 0], "x": 0, "y": 15, "flags": 1},
+ {"matrix": [1, 1], "x": 13, "y": 15, "flags": 4},
+ {"matrix": [1, 2], "x": 26, "y": 15, "flags": 4},
+ {"matrix": [1, 3], "x": 39, "y": 15, "flags": 4},
+ {"matrix": [1, 4], "x": 52, "y": 15, "flags": 4},
+ {"matrix": [1, 5], "x": 65, "y": 15, "flags": 4},
+ {"matrix": [1, 6], "x": 78, "y": 15, "flags": 4},
+ {"matrix": [1, 7], "x": 91, "y": 15, "flags": 4},
+ {"matrix": [1, 8], "x": 104, "y": 15, "flags": 4},
+ {"matrix": [1, 9], "x": 117, "y": 15, "flags": 4},
+ {"matrix": [1, 10], "x": 130, "y": 15, "flags": 4},
+ {"matrix": [1, 11], "x": 143, "y": 15, "flags": 4},
+ {"matrix": [1, 12], "x": 156, "y": 15, "flags": 4},
+ {"matrix": [1, 13], "x": 176, "y": 15, "flags": 1},
+ {"matrix": [1, 14], "x": 198, "y": 15, "flags": 1},
+ {"matrix": [1, 15], "x": 211, "y": 15, "flags": 1},
+ {"matrix": [3, 15], "x": 224, "y": 15, "flags": 1},
+
+ {"matrix": [2, 0], "x": 3, "y": 28, "flags": 1},
+ {"matrix": [2, 1], "x": 19, "y": 28, "flags": 4},
+ {"matrix": [2, 2], "x": 32, "y": 28, "flags": 4},
+ {"matrix": [2, 3], "x": 45, "y": 28, "flags": 4},
+ {"matrix": [2, 4], "x": 59, "y": 28, "flags": 4},
+ {"matrix": [2, 5], "x": 72, "y": 28, "flags": 4},
+ {"matrix": [2, 6], "x": 85, "y": 28, "flags": 4},
+ {"matrix": [2, 7], "x": 98, "y": 28, "flags": 4},
+ {"matrix": [2, 8], "x": 111, "y": 28, "flags": 4},
+ {"matrix": [2, 9], "x": 124, "y": 28, "flags": 4},
+ {"matrix": [2, 10], "x": 137, "y": 28, "flags": 4},
+ {"matrix": [2, 11], "x": 150, "y": 28, "flags": 4},
+ {"matrix": [2, 12], "x": 163, "y": 28, "flags": 4},
+ {"matrix": [2, 14], "x": 198, "y": 28, "flags": 1},
+ {"matrix": [2, 15], "x": 211, "y": 28, "flags": 1},
+ {"matrix": [3, 12], "x": 224, "y": 28, "flags": 1},
+
+ {"matrix": [3, 0], "x": 5, "y": 40, "flags": 8},
+ {"matrix": [3, 1], "x": 23, "y": 40, "flags": 4},
+ {"matrix": [3, 2], "x": 36, "y": 40, "flags": 4},
+ {"matrix": [3, 3], "x": 49, "y": 40, "flags": 4},
+ {"matrix": [3, 4], "x": 62, "y": 40, "flags": 4},
+ {"matrix": [3, 5], "x": 75, "y": 40, "flags": 4},
+ {"matrix": [3, 6], "x": 88, "y": 40, "flags": 4},
+ {"matrix": [3, 7], "x": 101, "y": 40, "flags": 4},
+ {"matrix": [3, 8], "x": 114, "y": 40, "flags": 4},
+ {"matrix": [3, 9], "x": 127, "y": 40, "flags": 4},
+ {"matrix": [3, 10], "x": 140, "y": 40, "flags": 4},
+ {"matrix": [3, 11], "x": 153, "y": 40, "flags": 4},
+ {"matrix": [3, 13], "x": 166, "y": 40, "flags": 4},
+ {"matrix": [2, 13], "x": 183, "y": 36, "flags": 1},
+
+ {"matrix": [4, 0], "x": 2, "y": 52, "flags": 1},
+ {"matrix": [4, 1], "x": 16, "y": 52, "flags": 4},
+ {"matrix": [4, 2], "x": 29, "y": 52, "flags": 4},
+ {"matrix": [4, 3], "x": 42, "y": 52, "flags": 4},
+ {"matrix": [4, 4], "x": 55, "y": 52, "flags": 4},
+ {"matrix": [4, 5], "x": 68, "y": 52, "flags": 4},
+ {"matrix": [4, 6], "x": 81, "y": 52, "flags": 4},
+ {"matrix": [4, 7], "x": 94, "y": 52, "flags": 4},
+ {"matrix": [4, 8], "x": 107, "y": 52, "flags": 4},
+ {"matrix": [4, 9], "x": 120, "y": 52, "flags": 4},
+ {"matrix": [4, 10], "x": 133, "y": 52, "flags": 4},
+ {"matrix": [4, 11], "x": 146, "y": 52, "flags": 4},
+ {"matrix": [4, 13], "x": 171, "y": 52, "flags": 1},
+ {"matrix": [4, 15], "x": 211, "y": 52, "flags": 1},
+
+ {"matrix": [5, 0], "x": 2, "y": 64, "flags": 1},
+ {"matrix": [5, 1], "x": 18, "y": 64, "flags": 1},
+ {"matrix": [5, 2], "x": 34, "y": 64, "flags": 1},
+ {"matrix": [5, 6], "x": 83, "y": 64, "flags": 4},
+ {"matrix": [5, 10], "x": 131, "y": 64, "flags": 1},
+ {"matrix": [5, 11], "x": 148, "y": 64, "flags": 1},
+ {"matrix": [5, 12], "x": 164, "y": 64, "flags": 1},
+ {"matrix": [5, 13], "x": 180, "y": 64, "flags": 1},
+ {"matrix": [5, 14], "x": 198, "y": 64, "flags": 1},
+ {"matrix": [5, 15], "x": 211, "y": 64, "flags": 1},
+ {"matrix": [4, 14], "x": 224, "y": 64, "flags": 1}
+ ]
+ },
+ "community_layouts": ["tkl_f13_iso"],
"layouts": {
"LAYOUT_tkl_f13_iso": {
"layout": [
diff --git a/keyboards/keychron/q3/iso_encoder/iso_encoder.c b/keyboards/keychron/q3/iso_encoder/iso_encoder.c
index d2bb169aac..725af67006 100644
--- a/keyboards/keychron/q3/iso_encoder/iso_encoder.c
+++ b/keyboards/keychron/q3/iso_encoder/iso_encoder.c
@@ -18,8 +18,8 @@
#ifdef RGB_MATRIX_ENABLE
-const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to IS31 manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | R location
* | | G location
@@ -120,36 +120,4 @@ const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
{1, C_15, A_15, B_15},
};
-#define __ NO_LED
-
-led_config_t g_led_config = {
- {
- // Key Matrix to LED Index
- { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, __, 13, 14 },
- { 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 },
- { 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 62, 46, 47 },
- { 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 48, 61, 15, 32 },
- { 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, __, 75, 87, 76 },
- { 77, 78, 79, __, __, __, 80, __, __, __, 81, 82, 83, 84, 85, 86 },
- },
- {
- // LED Index to Physical Position
- {0,0}, {16,0}, {29,0}, {42,0}, {55,0}, {71,0}, {84,0}, {97,0}, {110,0}, {126,0}, {139,0}, {152,0}, {165,0}, {198,0}, {211,0}, {224,0},
- {0,15}, {13,15}, {26,15}, {39,15}, {52,15}, {65,15}, {78,15}, {91,15}, {104,15}, {117,15}, {130,15}, {143,15}, {156,15}, {176,15}, {198,15}, {211,15}, {224,15},
- {3,28}, {19,28}, {32,28}, {45,28}, {59,28}, {72,28}, {85,28}, {98,28}, {111,28}, {124,28}, {137,28}, {150,28}, {163,28}, {198,28}, {211,28}, {224,28},
- {5,40}, {23,40}, {36,40}, {49,40}, {62,40}, {75,40}, {88,40}, {101,40}, {114,40}, {127,40}, {140,40}, {153,40}, {166,40}, {183,36},
- {2,52}, {16,52}, {29,52}, {42,52}, {55,52}, {68,52}, {81,52}, {94,52}, {107,52}, {120,52}, {133,52}, {146,52}, {171,52}, {211,52},
- {2,64}, {18,64}, {34,64}, {83,64}, {131,64}, {148,64}, {164,64}, {180,64}, {198,64}, {211,64}, {224,64},
- },
- {
- // RGB LED Index to Flag
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, 1,
- 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1,
- 8, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
- 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1,
- 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1,
- }
-};
-
#endif // RGB_MATRIX_ENABLE
diff --git a/keyboards/keychron/q3/iso_encoder/rules.mk b/keyboards/keychron/q3/iso_encoder/rules.mk
index 77b90f2466..5f0634f6d3 100644
--- a/keyboards/keychron/q3/iso_encoder/rules.mk
+++ b/keyboards/keychron/q3/iso_encoder/rules.mk
@@ -1,23 +1,4 @@
-# Build Options
-# change yes to no to disable
-#
-BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
-MOUSEKEY_ENABLE = yes # Mouse keys
-EXTRAKEY_ENABLE = yes # Audio control and System control
-CONSOLE_ENABLE = no # Console for debug
-COMMAND_ENABLE = no # Commands for debug and configuration
-NKRO_ENABLE = yes # Enable USB N-key Rollover
-BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
-RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
-AUDIO_ENABLE = no # Audio output
-ENCODER_ENABLE = yes # Enable Encoder
-DIP_SWITCH_ENABLE = yes
-RGB_MATRIX_ENABLE = yes
-LTO_ENABLE = yes
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = embedded_flash
-
-# custom matrix setup
+# Custom matrix setup
CUSTOM_MATRIX = lite
SRC += matrix.c
diff --git a/keyboards/keychron/q3/jis/config.h b/keyboards/keychron/q3/jis/config.h
index 856dd14df4..1ea4386bba 100644
--- a/keyboards/keychron/q3/jis/config.h
+++ b/keyboards/keychron/q3/jis/config.h
@@ -16,21 +16,13 @@
#pragma once
-/* key matrix pins */
-#define MATRIX_ROW_PINS \
- { B5, B4, B3, A15, A14, A13 }
-#define MATRIX_COL_PINS \
- { C14, C15, A0, A1, A2, A3, A4, A5, A6, A7, B0, B1, A8, A9, A10, H3 }
-
/* If PH3 used with a stronger pull resistor then the following definition needs be included */
// #define MATRIX_UNSELECT_DRIVE_HIGH
/* RGB Matrix Configuration */
-#define DRIVER_1_LED_TOTAL 48
-#define DRIVER_2_LED_TOTAL 43
-#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
+#define RGB_MATRIX_LED_COUNT 91
-#define CKLED2001_CURRENT_TUNE \
+#define SNLED27351_CURRENT_TUNE \
{ 0x94, 0x94, 0x44, 0x94, 0x94, 0x44, 0x94, 0x94, 0x44, 0x94, 0x94, 0x44 }
/* Enable CapsLcok LED */
diff --git a/keyboards/keychron/q3/jis/info.json b/keyboards/keychron/q3/jis/info.json
index 6f17a7cf9d..7a45046f82 100644
--- a/keyboards/keychron/q3/jis/info.json
+++ b/keyboards/keychron/q3/jis/info.json
@@ -1,18 +1,116 @@
{
- "keyboard_name": "Keychron Q3",
- "manufacturer": "Keychron",
- "url": "https://github.com/Keychron",
- "maintainer": "lalalademaxiya1",
"usb": {
- "vid": "0x3434",
"pid": "0x0124",
"device_version": "1.0.0"
},
"rgb_matrix": {
- "driver": "ckled2001"
+ "layout": [
+ {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1},
+ {"matrix": [0, 1], "x": 26, "y": 0, "flags": 1},
+ {"matrix": [0, 2], "x": 39, "y": 0, "flags": 1},
+ {"matrix": [0, 3], "x": 52, "y": 0, "flags": 1},
+ {"matrix": [0, 4], "x": 65, "y": 0, "flags": 1},
+ {"matrix": [0, 5], "x": 84, "y": 0, "flags": 1},
+ {"matrix": [0, 6], "x": 97, "y": 0, "flags": 1},
+ {"matrix": [0, 7], "x": 111, "y": 0, "flags": 1},
+ {"matrix": [0, 8], "x": 124, "y": 0, "flags": 1},
+ {"matrix": [0, 9], "x": 143, "y": 0, "flags": 1},
+ {"matrix": [0, 10], "x": 156, "y": 0, "flags": 1},
+ {"matrix": [0, 11], "x": 169, "y": 0, "flags": 1},
+ {"matrix": [0, 12], "x": 182, "y": 0, "flags": 1},
+ {"matrix": [0, 14], "x": 198, "y": 0, "flags": 1},
+ {"matrix": [0, 15], "x": 211, "y": 0, "flags": 1},
+ {"matrix": [3, 14], "x": 224, "y": 0, "flags": 1},
+
+ {"matrix": [1, 0], "x": 0, "y": 15, "flags": 1},
+ {"matrix": [1, 1], "x": 13, "y": 15, "flags": 4},
+ {"matrix": [1, 2], "x": 26, "y": 15, "flags": 4},
+ {"matrix": [1, 3], "x": 39, "y": 15, "flags": 4},
+ {"matrix": [1, 4], "x": 52, "y": 15, "flags": 4},
+ {"matrix": [1, 5], "x": 65, "y": 15, "flags": 4},
+ {"matrix": [1, 6], "x": 78, "y": 15, "flags": 4},
+ {"matrix": [1, 7], "x": 91, "y": 15, "flags": 4},
+ {"matrix": [1, 8], "x": 104, "y": 15, "flags": 4},
+ {"matrix": [1, 9], "x": 117, "y": 15, "flags": 4},
+ {"matrix": [1, 10], "x": 130, "y": 15, "flags": 4},
+ {"matrix": [1, 11], "x": 143, "y": 15, "flags": 4},
+ {"matrix": [1, 12], "x": 156, "y": 15, "flags": 4},
+ {"matrix": [1, 13], "x": 169, "y": 15, "flags": 4},
+ {"matrix": [0, 13], "x": 182, "y": 15, "flags": 1},
+ {"matrix": [1, 14], "x": 198, "y": 15, "flags": 1},
+ {"matrix": [1, 15], "x": 211, "y": 15, "flags": 1},
+ {"matrix": [3, 15], "x": 224, "y": 15, "flags": 1},
+
+ {"matrix": [2, 0], "x": 3, "y": 28, "flags": 1},
+ {"matrix": [2, 1], "x": 19, "y": 28, "flags": 4},
+ {"matrix": [2, 2], "x": 32, "y": 28, "flags": 4},
+ {"matrix": [2, 3], "x": 45, "y": 28, "flags": 4},
+ {"matrix": [2, 4], "x": 59, "y": 28, "flags": 4},
+ {"matrix": [2, 5], "x": 72, "y": 28, "flags": 4},
+ {"matrix": [2, 6], "x": 85, "y": 28, "flags": 4},
+ {"matrix": [2, 7], "x": 98, "y": 28, "flags": 4},
+ {"matrix": [2, 8], "x": 111, "y": 28, "flags": 4},
+ {"matrix": [2, 9], "x": 124, "y": 28, "flags": 4},
+ {"matrix": [2, 10], "x": 137, "y": 28, "flags": 4},
+ {"matrix": [2, 11], "x": 150, "y": 28, "flags": 4},
+ {"matrix": [2, 12], "x": 163, "y": 28, "flags": 4},
+ {"matrix": [2, 14], "x": 198, "y": 28, "flags": 1},
+ {"matrix": [2, 15], "x": 211, "y": 28, "flags": 1},
+ {"matrix": [3, 12], "x": 224, "y": 28, "flags": 1},
+
+ {"matrix": [3, 0], "x": 5, "y": 40, "flags": 8},
+ {"matrix": [3, 1], "x": 23, "y": 40, "flags": 4},
+ {"matrix": [3, 2], "x": 36, "y": 40, "flags": 4},
+ {"matrix": [3, 3], "x": 49, "y": 40, "flags": 4},
+ {"matrix": [3, 4], "x": 62, "y": 40, "flags": 4},
+ {"matrix": [3, 5], "x": 75, "y": 40, "flags": 4},
+ {"matrix": [3, 6], "x": 88, "y": 40, "flags": 4},
+ {"matrix": [3, 7], "x": 101, "y": 40, "flags": 4},
+ {"matrix": [3, 8], "x": 114, "y": 40, "flags": 4},
+ {"matrix": [3, 9], "x": 127, "y": 40, "flags": 4},
+ {"matrix": [3, 10], "x": 140, "y": 40, "flags": 4},
+ {"matrix": [3, 11], "x": 153, "y": 40, "flags": 4},
+ {"matrix": [3, 13], "x": 166, "y": 40, "flags": 4},
+ {"matrix": [2, 13], "x": 183, "y": 36, "flags": 1},
+
+ {"matrix": [4, 0], "x": 8, "y": 52, "flags": 1},
+ {"matrix": [4, 2], "x": 29, "y": 52, "flags": 4},
+ {"matrix": [4, 3], "x": 42, "y": 52, "flags": 4},
+ {"matrix": [4, 4], "x": 55, "y": 52, "flags": 4},
+ {"matrix": [4, 5], "x": 68, "y": 52, "flags": 4},
+ {"matrix": [4, 6], "x": 81, "y": 52, "flags": 4},
+ {"matrix": [4, 7], "x": 94, "y": 52, "flags": 4},
+ {"matrix": [4, 8], "x": 107, "y": 52, "flags": 4},
+ {"matrix": [4, 9], "x": 120, "y": 52, "flags": 4},
+ {"matrix": [4, 10], "x": 133, "y": 52, "flags": 4},
+ {"matrix": [4, 11], "x": 146, "y": 52, "flags": 4},
+ {"matrix": [4, 12], "x": 159, "y": 52, "flags": 4},
+ {"matrix": [4, 13], "x": 177, "y": 52, "flags": 1},
+ {"matrix": [4, 15], "x": 211, "y": 52, "flags": 1},
+
+ {"matrix": [5, 0], "x": 2, "y": 64, "flags": 1},
+ {"matrix": [5, 1], "x": 16, "y": 64, "flags": 1},
+ {"matrix": [5, 2], "x": 31, "y": 64, "flags": 1},
+ {"matrix": [5, 3], "x": 45, "y": 64, "flags": 1},
+ {"matrix": [5, 6], "x": 83, "y": 64, "flags": 4},
+ {"matrix": [5, 9], "x": 119, "y": 64, "flags": 1},
+ {"matrix": [5, 10], "x": 135, "y": 64, "flags": 1},
+ {"matrix": [5, 11], "x": 151, "y": 64, "flags": 1},
+ {"matrix": [5, 12], "x": 166, "y": 64, "flags": 1},
+ {"matrix": [5, 13], "x": 180, "y": 64, "flags": 1},
+ {"matrix": [5, 14], "x": 198, "y": 64, "flags": 1},
+ {"matrix": [5, 15], "x": 211, "y": 64, "flags": 1},
+ {"matrix": [4, 14], "x": 224, "y": 64, "flags": 1}
+ ]
+ },
+ "matrix_pins": {
+ "rows": ["B5", "B4", "B3", "A15", "A14", "A13"],
+ "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "A10", "H3"]
+ },
+ "layout_aliases": {
+ "LAYOUT_tkl_jis": "LAYOUT_jis_91"
},
- "processor": "STM32L432",
- "bootloader": "stm32-dfu",
+ "community_layouts": ["tkl_jis"],
"layouts": {
"LAYOUT_jis_91": {
"layout": [
diff --git a/keyboards/keychron/q3/jis/jis.c b/keyboards/keychron/q3/jis/jis.c
index f262d3c7d8..4b19eca52f 100644
--- a/keyboards/keychron/q3/jis/jis.c
+++ b/keyboards/keychron/q3/jis/jis.c
@@ -18,8 +18,8 @@
#ifdef RGB_MATRIX_ENABLE
-const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to IS31 manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | R location
* | | G location
@@ -123,36 +123,4 @@ const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
{1, C_15, A_15, B_15}, // Right
};
-#define __ NO_LED
-
-led_config_t g_led_config = {
- {
- // Key Matrix to LED Index
- { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 30, 13, 14 },
- { 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 31, 32 },
- { 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 63, 47, 48 },
- { 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 49, 62, 15, 33 },
- { 64, __, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 90, 77 },
- { 78, 79, 80, 81, __, __, 82, __, __, 83, 84, 85, 86, 87, 88, 89 },
- },
- {
- // LED Index to Physical Position
- {0,0}, {26,0}, {39,0}, {52,0}, {65,0}, {84,0}, {97,0}, {111,0}, {124,0}, {143,0}, {156,0}, {169,0}, {182,0}, {198,0}, {211,0}, {224,0},
- {0,15}, {13,15}, {26,15}, {39,15}, {52,15}, {65,15}, {78,15}, {91,15}, {104,15}, {117,15}, {130,15}, {143,15}, {156,15}, {169,15}, {182,15}, {198,15}, {211,15}, {224,15},
- {3,28}, {19,28}, {32,28}, {45,28}, {59,28}, {72,28}, {85,28}, {98,28}, {111,28}, {124,28}, {137,28}, {150,28}, {163,28}, {198,28}, {211,28}, {224,28},
- {5,40}, {23,40}, {36,40}, {49,40}, {62,40}, {75,40}, {88,40}, {101,40}, {114,40}, {127,40}, {140,40}, {153,40}, {166,40}, {183,36},
- {8,52}, {29,52}, {42,52}, {55,52}, {68,52}, {81,52}, {94,52}, {107,52}, {120,52}, {133,52}, {146,52}, {159,52}, {177,52}, {211,52},
- {2,64}, {16,64}, {31,64}, {45,64}, {81,64}, {119,64}, {135,64}, {151,64}, {166,64}, {180,64}, {198,64}, {211,64}, {224,64}
- },
- {
- // RGB LED Index to Flag
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, 1,
- 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1,
- 8, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
- 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1,
- 1, 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1,
- }
-};
-
#endif // GB_MATRIX_ENABLE
diff --git a/keyboards/keychron/q3/jis/rules.mk b/keyboards/keychron/q3/jis/rules.mk
index 58bbb89a72..7ff128fa69 100644
--- a/keyboards/keychron/q3/jis/rules.mk
+++ b/keyboards/keychron/q3/jis/rules.mk
@@ -1,18 +1 @@
-# Build Options
-# change yes to no to disable
-#
-BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
-MOUSEKEY_ENABLE = yes # Mouse keys
-EXTRAKEY_ENABLE = yes # Audio control and System control
-CONSOLE_ENABLE = no # Console for debug
-COMMAND_ENABLE = no # Commands for debug and configuration
-NKRO_ENABLE = yes # Enable USB N-key Rollover
-BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
-RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
-AUDIO_ENABLE = no # Audio output
-DIP_SWITCH_ENABLE = yes
-RGB_MATRIX_ENABLE = yes
-LTO_ENABLE = yes
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = embedded_flash
-
+# This file intentionally left blank \ No newline at end of file
diff --git a/keyboards/keychron/q3/jis_encoder/config.h b/keyboards/keychron/q3/jis_encoder/config.h
index 9fca0cfc73..5c5efb4ff6 100644
--- a/keyboards/keychron/q3/jis_encoder/config.h
+++ b/keyboards/keychron/q3/jis_encoder/config.h
@@ -17,21 +17,14 @@
#pragma once
/* key matrix pins */
-#define MATRIX_ROW_PINS \
- { B5, B4, B3, A15, A14, A13 }
-#define MATRIX_COL_PINS \
- { C14, C15, A0, A1, A2, A3, A4, A5, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN }
+#define MATRIX_ROW_PINS { B5, B4, B3, A15, A14, A13 }
+#define MATRIX_COL_PINS { C14, C15, A0, A1, A2, A3, A4, A5, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN }
/* RGB Matrix Configuration */
-#define DRIVER_1_LED_TOTAL 49
-#define DRIVER_2_LED_TOTAL 43
-#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
+#define RGB_MATRIX_LED_COUNT 92
-#define CKLED2001_CURRENT_TUNE \
+#define SNLED27351_CURRENT_TUNE \
{ 0x94, 0x94, 0x44, 0x94, 0x94, 0x44, 0x94, 0x94, 0x44, 0x94, 0x94, 0x44 }
-/* Encoder Configuration */
-#define ENCODER_DEFAULT_POS 0x3
-
/* Enable CapsLcok LED */
#define CAPS_LOCK_LED_INDEX 51
diff --git a/keyboards/keychron/q3/jis_encoder/info.json b/keyboards/keychron/q3/jis_encoder/info.json
index fd1f361f57..9fc61c7e6c 100644
--- a/keyboards/keychron/q3/jis_encoder/info.json
+++ b/keyboards/keychron/q3/jis_encoder/info.json
@@ -1,23 +1,119 @@
{
- "keyboard_name": "Keychron Q3",
- "manufacturer": "Keychron",
- "url": "https://github.com/Keychron",
- "maintainer": "lalalademaxiya1",
"usb": {
- "vid": "0x3434",
"pid": "0x0125",
"device_version": "1.0.0"
},
- "rgb_matrix": {
- "driver": "ckled2001"
- },
"encoder": {
+ "enabled": true,
"rotary": [
{"pin_a": "A10", "pin_b": "A8"}
]
},
- "processor": "STM32L432",
- "bootloader": "stm32-dfu",
+ "rgb_matrix": {
+ "layout": [
+ {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1},
+ {"matrix": [0, 1], "x": 16, "y": 0, "flags": 1},
+ {"matrix": [0, 2], "x": 29, "y": 0, "flags": 1},
+ {"matrix": [0, 3], "x": 42, "y": 0, "flags": 1},
+ {"matrix": [0, 4], "x": 55, "y": 0, "flags": 1},
+ {"matrix": [0, 5], "x": 71, "y": 0, "flags": 1},
+ {"matrix": [0, 6], "x": 84, "y": 0, "flags": 1},
+ {"matrix": [0, 7], "x": 97, "y": 0, "flags": 1},
+ {"matrix": [0, 8], "x": 110, "y": 0, "flags": 1},
+ {"matrix": [0, 9], "x": 126, "y": 0, "flags": 1},
+ {"matrix": [0, 10], "x": 139, "y": 0, "flags": 1},
+ {"matrix": [0, 11], "x": 152, "y": 0, "flags": 1},
+ {"matrix": [0, 12], "x": 165, "y": 0, "flags": 1},
+ {"matrix": [0, 13], "x": 182, "y": 0, "flags": 1},
+ {"matrix": [0, 14], "x": 198, "y": 0, "flags": 1},
+ {"matrix": [0, 15], "x": 211, "y": 0, "flags": 1},
+ {"matrix": [3, 14], "x": 224, "y": 0, "flags": 1},
+
+ {"matrix": [1, 0], "x": 0, "y": 15, "flags": 1},
+ {"matrix": [1, 1], "x": 13, "y": 15, "flags": 4},
+ {"matrix": [1, 2], "x": 26, "y": 15, "flags": 4},
+ {"matrix": [1, 3], "x": 39, "y": 15, "flags": 4},
+ {"matrix": [1, 4], "x": 52, "y": 15, "flags": 4},
+ {"matrix": [1, 5], "x": 65, "y": 15, "flags": 4},
+ {"matrix": [1, 6], "x": 78, "y": 15, "flags": 4},
+ {"matrix": [1, 7], "x": 91, "y": 15, "flags": 4},
+ {"matrix": [1, 8], "x": 104, "y": 15, "flags": 4},
+ {"matrix": [1, 9], "x": 117, "y": 15, "flags": 4},
+ {"matrix": [1, 10], "x": 130, "y": 15, "flags": 4},
+ {"matrix": [1, 11], "x": 143, "y": 15, "flags": 4},
+ {"matrix": [1, 12], "x": 156, "y": 15, "flags": 4},
+ {"matrix": [1, 13], "x": 169, "y": 15, "flags": 4},
+ {"matrix": [0, 13], "x": 182, "y": 15, "flags": 1},
+ {"matrix": [1, 14], "x": 198, "y": 15, "flags": 1},
+ {"matrix": [1, 15], "x": 211, "y": 15, "flags": 1},
+ {"matrix": [3, 15], "x": 224, "y": 15, "flags": 1},
+
+ {"matrix": [2, 0], "x": 3, "y": 28, "flags": 1},
+ {"matrix": [2, 1], "x": 19, "y": 28, "flags": 4},
+ {"matrix": [2, 2], "x": 32, "y": 28, "flags": 4},
+ {"matrix": [2, 3], "x": 45, "y": 28, "flags": 4},
+ {"matrix": [2, 4], "x": 59, "y": 28, "flags": 4},
+ {"matrix": [2, 5], "x": 72, "y": 28, "flags": 4},
+ {"matrix": [2, 6], "x": 85, "y": 28, "flags": 4},
+ {"matrix": [2, 7], "x": 98, "y": 28, "flags": 4},
+ {"matrix": [2, 8], "x": 111, "y": 28, "flags": 4},
+ {"matrix": [2, 9], "x": 124, "y": 28, "flags": 4},
+ {"matrix": [2, 10], "x": 137, "y": 28, "flags": 4},
+ {"matrix": [2, 11], "x": 150, "y": 28, "flags": 4},
+ {"matrix": [2, 12], "x": 163, "y": 28, "flags": 4},
+ {"matrix": [2, 14], "x": 198, "y": 28, "flags": 1},
+ {"matrix": [2, 15], "x": 211, "y": 28, "flags": 1},
+ {"matrix": [3, 12], "x": 224, "y": 28, "flags": 1},
+
+ {"matrix": [3, 0], "x": 5, "y": 40, "flags": 8},
+ {"matrix": [3, 1], "x": 23, "y": 40, "flags": 4},
+ {"matrix": [3, 2], "x": 36, "y": 40, "flags": 4},
+ {"matrix": [3, 3], "x": 49, "y": 40, "flags": 4},
+ {"matrix": [3, 4], "x": 62, "y": 40, "flags": 4},
+ {"matrix": [3, 5], "x": 75, "y": 40, "flags": 4},
+ {"matrix": [3, 6], "x": 88, "y": 40, "flags": 4},
+ {"matrix": [3, 7], "x": 101, "y": 40, "flags": 4},
+ {"matrix": [3, 8], "x": 114, "y": 40, "flags": 4},
+ {"matrix": [3, 9], "x": 127, "y": 40, "flags": 4},
+ {"matrix": [3, 10], "x": 140, "y": 40, "flags": 4},
+ {"matrix": [3, 11], "x": 153, "y": 40, "flags": 4},
+ {"matrix": [3, 13], "x": 166, "y": 40, "flags": 4},
+ {"matrix": [2, 13], "x": 183, "y": 36, "flags": 1},
+
+ {"matrix": [4, 0], "x": 8, "y": 52, "flags": 1},
+ {"matrix": [4, 2], "x": 29, "y": 52, "flags": 4},
+ {"matrix": [4, 3], "x": 42, "y": 52, "flags": 4},
+ {"matrix": [4, 4], "x": 55, "y": 52, "flags": 4},
+ {"matrix": [4, 5], "x": 68, "y": 52, "flags": 4},
+ {"matrix": [4, 6], "x": 81, "y": 52, "flags": 4},
+ {"matrix": [4, 7], "x": 94, "y": 52, "flags": 4},
+ {"matrix": [4, 8], "x": 107, "y": 52, "flags": 4},
+ {"matrix": [4, 9], "x": 120, "y": 52, "flags": 4},
+ {"matrix": [4, 10], "x": 133, "y": 52, "flags": 4},
+ {"matrix": [4, 11], "x": 146, "y": 52, "flags": 4},
+ {"matrix": [4, 12], "x": 159, "y": 52, "flags": 4},
+ {"matrix": [4, 13], "x": 177, "y": 52, "flags": 1},
+ {"matrix": [4, 15], "x": 211, "y": 52, "flags": 1},
+
+ {"matrix": [5, 0], "x": 2, "y": 64, "flags": 1},
+ {"matrix": [5, 1], "x": 16, "y": 64, "flags": 1},
+ {"matrix": [5, 2], "x": 31, "y": 64, "flags": 1},
+ {"matrix": [5, 3], "x": 45, "y": 64, "flags": 1},
+ {"matrix": [5, 6], "x": 81, "y": 64, "flags": 4},
+ {"matrix": [5, 9], "x": 119, "y": 64, "flags": 1},
+ {"matrix": [5, 10], "x": 135, "y": 64, "flags": 1},
+ {"matrix": [5, 11], "x": 151, "y": 64, "flags": 1},
+ {"matrix": [5, 12], "x": 166, "y": 64, "flags": 1},
+ {"matrix": [5, 13], "x": 180, "y": 64, "flags": 1},
+ {"matrix": [5, 14], "x": 198, "y": 64, "flags": 1},
+ {"matrix": [5, 15], "x": 211, "y": 64, "flags": 1},
+ {"matrix": [4, 14], "x": 224, "y": 64, "flags": 1}
+ ]
+ },
+ "layout_aliases": {
+ "LAYOUT_tkl_f13_jis": "LAYOUT_jis_92"
+ },
+ "community_layouts": ["tkl_f13_jis"],
"layouts": {
"LAYOUT_jis_92": {
"layout": [
diff --git a/keyboards/keychron/q3/jis_encoder/jis_encoder.c b/keyboards/keychron/q3/jis_encoder/jis_encoder.c
index 0a97c5ca68..8770f9d33c 100644
--- a/keyboards/keychron/q3/jis_encoder/jis_encoder.c
+++ b/keyboards/keychron/q3/jis_encoder/jis_encoder.c
@@ -18,8 +18,8 @@
#ifdef RGB_MATRIX_ENABLE
-const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to IS31 manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | R location
* | | G location
@@ -124,36 +124,4 @@ const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
{1, C_15, A_15, B_15}, // Right
};
-#define __ NO_LED
-
-led_config_t g_led_config = {
- {
- // Key Matrix to LED Index
- { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 },
- { 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 32, 33 },
- { 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 64, 48, 49 },
- { 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 50, 63, 16, 34 },
- { 65, __, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 91, 78 },
- { 79, 80, 81, 82, __, 31, 83, __, __, 84, 85, 86, 87, 88, 89, 90 },
- },
- {
- // LED Index to Physical Position
- {0,0}, {16,0}, {29,0}, {42,0}, {55,0}, {71,0}, {84,0}, {97,0}, {110,0}, {126,0}, {139,0}, {152,0}, {165,0}, {182,0}, {198,0}, {211,0}, {224,0},
- {0,15}, {13,15}, {26,15}, {39,15}, {52,15}, {65,15}, {78,15}, {91,15}, {104,15}, {117,15}, {130,15}, {143,15}, {156,15}, {169,15}, {182,15}, {198,15}, {211,15}, {224,15},
- {3,28}, {19,28}, {32,28}, {45,28}, {59,28}, {72,28}, {85,28}, {98,28}, {111,28}, {124,28}, {137,28}, {150,28}, {163,28}, {198,28}, {211,28}, {224,28},
- {5,40}, {23,40}, {36,40}, {49,40}, {62,40}, {75,40}, {88,40}, {101,40}, {114,40}, {127,40}, {140,40}, {153,40}, {166,40}, {183,36},
- {8,52}, {29,52}, {42,52}, {55,52}, {68,52}, {81,52}, {94,52}, {107,52}, {120,52}, {133,52}, {146,52}, {159,52}, {177,52}, {211,52},
- {2,64}, {16,64}, {31,64}, {45,64}, {81,64}, {119,64}, {135,64}, {151,64}, {166,64}, {180,64}, {198,64}, {211,64}, {224,64},
- },
- {
- // RGB LED Index to Flag
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, 1,
- 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1,
- 8, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
- 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1,
- 1, 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1,
- }
-};
-
#endif // RGB_MATRIX_ENABLE
diff --git a/keyboards/keychron/q3/jis_encoder/rules.mk b/keyboards/keychron/q3/jis_encoder/rules.mk
index 77b90f2466..5f0634f6d3 100644
--- a/keyboards/keychron/q3/jis_encoder/rules.mk
+++ b/keyboards/keychron/q3/jis_encoder/rules.mk
@@ -1,23 +1,4 @@
-# Build Options
-# change yes to no to disable
-#
-BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
-MOUSEKEY_ENABLE = yes # Mouse keys
-EXTRAKEY_ENABLE = yes # Audio control and System control
-CONSOLE_ENABLE = no # Console for debug
-COMMAND_ENABLE = no # Commands for debug and configuration
-NKRO_ENABLE = yes # Enable USB N-key Rollover
-BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
-RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
-AUDIO_ENABLE = no # Audio output
-ENCODER_ENABLE = yes # Enable Encoder
-DIP_SWITCH_ENABLE = yes
-RGB_MATRIX_ENABLE = yes
-LTO_ENABLE = yes
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = embedded_flash
-
-# custom matrix setup
+# Custom matrix setup
CUSTOM_MATRIX = lite
SRC += matrix.c
diff --git a/keyboards/keychron/q3/readme.md b/keyboards/keychron/q3/readme.md
index 8e25a1b332..073455336f 100644
--- a/keyboards/keychron/q3/readme.md
+++ b/keyboards/keychron/q3/readme.md
@@ -1,22 +1,30 @@
# Keychron Q3
+![Keychron Q3](https://i.imgur.com/KjP4nqdh.jpg)
+
A customizable 80% keyboard.
* Keyboard Maintainer: [Keychron](https://github.com/keychron)
* Hardware Supported: Keychron Q3
-* Hardware Availability: [Keychron](https://www.keychron.com)
+* Hardware Availability: [Keychron Q3 QMK Custom Mechanical Keyboard](https://www.keychron.com/products/keychron-q3-qmk-custom-mechanical-keyboard)
Make example for this keyboard (after setting up your build environment):
-```
- make keychron/q3/ansi:default
-```
+ make keychron/q3/ansi:default
+ make keychron/q3/ansi_encoder:default
+ make keychron/q3/iso:default
+ make keychron/q3/iso_encoder:default
+ make keychron/q3/jis:default
+ make keychron/q3/jis_encoder:default
Flashing example for this keyboard:
-```
- make keychron/q3/ansi:default:flash
-```
+ make keychron/q3/ansi:default:flash
+ make keychron/q3/ansi_encoder:default:flash
+ make keychron/q3/iso:default:flash
+ make keychron/q3/iso_encoder:default:flash
+ make keychron/q3/jis:default:flash
+ make keychron/q3/jis_encoder:default:flash
**Reset Key**: Hold down the key located at *K00*, commonly programmed as *Esc* while plugging in the keyboard.
diff --git a/keyboards/keychron/q4/ansi/config.h b/keyboards/keychron/q4/ansi/config.h
new file mode 100644
index 0000000000..c05e8f73a0
--- /dev/null
+++ b/keyboards/keychron/q4/ansi/config.h
@@ -0,0 +1,20 @@
+/* Copyright 2022 @ Keychron (https://www.keychron.com)
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#pragma once
+
+/* Enable CapsLcok LED*/
+#define CAPS_LOCK_LED_INDEX 28
diff --git a/keyboards/keychron/q4/ansi/info.json b/keyboards/keychron/q4/ansi/info.json
new file mode 100644
index 0000000000..392ef8fc45
--- /dev/null
+++ b/keyboards/keychron/q4/ansi/info.json
@@ -0,0 +1,147 @@
+{
+ "usb": {
+ "pid": "0x0140",
+ "device_version": "1.0.6"
+ },
+ "rgb_matrix": {
+ "layout": [
+ {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1},
+ {"matrix": [0, 1], "x": 16, "y": 0, "flags": 4},
+ {"matrix": [0, 2], "x": 32, "y": 0, "flags": 4},
+ {"matrix": [0, 3], "x": 48, "y": 0, "flags": 4},
+ {"matrix": [0, 4], "x": 64, "y": 0, "flags": 4},
+ {"matrix": [0, 5], "x": 81, "y": 0, "flags": 4},
+ {"matrix": [0, 6], "x": 97, "y": 0, "flags": 4},
+ {"matrix": [0, 7], "x": 113, "y": 0, "flags": 4},
+ {"matrix": [0, 8], "x": 129, "y": 0, "flags": 4},
+ {"matrix": [0, 9], "x": 145, "y": 0, "flags": 4},
+ {"matrix": [0, 10], "x": 161, "y": 0, "flags": 4},
+ {"matrix": [0, 11], "x": 177, "y": 0, "flags": 4},
+ {"matrix": [0, 12], "x": 193, "y": 0, "flags": 4},
+ {"matrix": [0, 13], "x": 218, "y": 0, "flags": 1},
+
+ {"matrix": [1, 0], "x": 4,"y": 16, "flags": 1},
+ {"matrix": [1, 1], "x": 24,"y": 16, "flags": 4},
+ {"matrix": [1, 2], "x": 40,"y": 16, "flags": 4},
+ {"matrix": [1, 3], "x": 56,"y": 16, "flags": 4},
+ {"matrix": [1, 4], "x": 73,"y": 16, "flags": 4},
+ {"matrix": [1, 5], "x": 89,"y": 16, "flags": 4},
+ {"matrix": [1, 6], "x": 105,"y": 16, "flags": 4},
+ {"matrix": [1, 7], "x": 121,"y": 16, "flags": 4},
+ {"matrix": [1, 8], "x": 137,"y": 16, "flags": 4},
+ {"matrix": [1, 9], "x": 153,"y": 16, "flags": 4},
+ {"matrix": [1, 10], "x": 169,"y": 16, "flags": 4},
+ {"matrix": [1, 11], "x": 185,"y": 16, "flags": 4},
+ {"matrix": [1, 12], "x": 202,"y": 16, "flags": 4},
+ {"matrix": [1, 13], "x": 222,"y": 16, "flags": 4},
+
+ {"matrix": [2, 0], "x": 6, "y": 32, "flags": 8},
+ {"matrix": [2, 1], "x": 28, "y": 32, "flags": 4},
+ {"matrix": [2, 2], "x": 44, "y": 32, "flags": 4},
+ {"matrix": [2, 3], "x": 60, "y": 32, "flags": 4},
+ {"matrix": [2, 4], "x": 77, "y": 32, "flags": 4},
+ {"matrix": [2, 5], "x": 93, "y": 32, "flags": 4},
+ {"matrix": [2, 6], "x": 109, "y": 32, "flags": 4},
+ {"matrix": [2, 7], "x": 125, "y": 32, "flags": 4},
+ {"matrix": [2, 8], "x": 141, "y": 32, "flags": 4},
+ {"matrix": [2, 9], "x": 157, "y": 32, "flags": 4},
+ {"matrix": [2, 10], "x": 173, "y": 32, "flags": 4},
+ {"matrix": [2, 11], "x": 189, "y": 32, "flags": 4},
+ {"matrix": [2, 13], "x": 216, "y": 32, "flags": 1},
+
+ {"matrix": [3, 0], "x": 10, "y": 48, "flags": 1},
+ {"matrix": [3, 2], "x": 36, "y": 48, "flags": 4},
+ {"matrix": [3, 3], "x": 52, "y": 48, "flags": 4},
+ {"matrix": [3, 4], "x": 69, "y": 48, "flags": 4},
+ {"matrix": [3, 5], "x": 85, "y": 48, "flags": 4},
+ {"matrix": [3, 6], "x": 101, "y": 48, "flags": 4},
+ {"matrix": [3, 7], "x": 117, "y": 48, "flags": 4},
+ {"matrix": [3, 8], "x": 133, "y": 48, "flags": 4},
+ {"matrix": [3, 9], "x": 149, "y": 48, "flags": 4},
+ {"matrix": [3, 10], "x": 165, "y": 48, "flags": 4},
+ {"matrix": [3, 11], "x": 181, "y": 48, "flags": 4},
+ {"matrix": [3, 13], "x": 212, "y": 48, "flags": 1},
+
+ {"matrix": [4, 0], "x": 2, "y": 64, "flags": 1},
+ {"matrix": [4, 1], "x": 22, "y": 64, "flags": 1},
+ {"matrix": [4, 2], "x": 42, "y": 64, "flags": 1},
+ {"matrix": [4, 6], "x": 103, "y": 64, "flags": 4},
+ {"matrix": [4, 10], "x": 164, "y": 64, "flags": 1},
+ {"matrix": [4, 11], "x": 184, "y": 64, "flags": 1},
+ {"matrix": [4, 12], "x": 204, "y": 64, "flags": 1},
+ {"matrix": [4, 13], "x": 224, "y": 64, "flags": 1}
+
+ ]
+ },
+ "layouts": {
+ "LAYOUT_ansi_61": {
+ "layout": [
+ {"matrix": [0, 0], "x": 0, "y": 0},
+ {"matrix": [0, 1], "x": 1, "y": 0},
+ {"matrix": [0, 2], "x": 2, "y": 0},
+ {"matrix": [0, 3], "x": 3, "y": 0},
+ {"matrix": [0, 4], "x": 4, "y": 0},
+ {"matrix": [0, 5], "x": 5, "y": 0},
+ {"matrix": [0, 6], "x": 6, "y": 0},
+ {"matrix": [0, 7], "x": 7, "y": 0},
+ {"matrix": [0, 8], "x": 8, "y": 0},
+ {"matrix": [0, 9], "x": 9, "y": 0},
+ {"matrix": [0, 10], "x": 10, "y": 0},
+ {"matrix": [0, 11], "x": 11, "y": 0},
+ {"matrix": [0, 12], "x": 12, "y": 0},
+ {"matrix": [0, 13], "x": 13, "y": 0, "w": 2},
+
+ {"matrix": [1, 0], "x": 0, "y": 1, "w": 1.5},
+ {"matrix": [1, 1], "x": 1.5, "y": 1},
+ {"matrix": [1, 2], "x": 2.5, "y": 1},
+ {"matrix": [1, 3], "x": 3.5, "y": 1},
+ {"matrix": [1, 4], "x": 4.5, "y": 1},
+ {"matrix": [1, 5], "x": 5.5, "y": 1},
+ {"matrix": [1, 6], "x": 6.5, "y": 1},
+ {"matrix": [1, 7], "x": 7.5, "y": 1},
+ {"matrix": [1, 8], "x": 8.5, "y": 1},
+ {"matrix": [1, 9], "x": 9.5, "y": 1},
+ {"matrix": [1, 10], "x": 10.5, "y": 1},
+ {"matrix": [1, 11], "x": 11.5, "y": 1},
+ {"matrix": [1, 12], "x": 12.5, "y": 1},
+ {"matrix": [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},
+ {"matrix": [2, 3], "x": 3.75, "y": 2},
+ {"matrix": [2, 4], "x": 4.75, "y": 2},
+ {"matrix": [2, 5], "x": 5.75, "y": 2},
+ {"matrix": [2, 6], "x": 6.75, "y": 2},
+ {"matrix": [2, 7], "x": 7.75, "y": 2},
+ {"matrix": [2, 8], "x": 8.75, "y": 2},
+ {"matrix": [2, 9], "x": 9.75, "y": 2},
+ {"matrix": [2, 10], "x": 10.75, "y": 2},
+ {"matrix": [2, 11], "x": 11.75, "y": 2},
+ {"matrix": [2, 13], "x": 12.75, "y": 2, "w": 2.25},
+
+ {"matrix": [3, 0], "x": 0, "y": 3, "w": 2.25},
+ {"matrix": [3, 2], "x": 2.25, "y": 3},
+ {"matrix": [3, 3], "x": 3.25, "y": 3},
+ {"matrix": [3, 4], "x": 4.25, "y": 3},
+ {"matrix": [3, 5], "x": 5.25, "y": 3},
+ {"matrix": [3, 6], "x": 6.25, "y": 3},
+ {"matrix": [3, 7], "x": 7.25, "y": 3},
+ {"matrix": [3, 8], "x": 8.25, "y": 3},
+ {"matrix": [3, 9], "x": 9.25, "y": 3},
+ {"matrix": [3, 10], "x": 10.25, "y": 3},
+ {"matrix": [3, 11], "x": 11.25, "y": 3},
+ {"matrix": [3, 13], "x": 12.25, "y": 3, "w": 2.75},
+
+ {"matrix": [4, 0], "x": 0, "y": 4, "w": 1.25},
+ {"matrix": [4, 1], "x": 1.25, "y": 4, "w": 1.25},
+ {"matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.25},
+ {"matrix": [4, 6], "x": 3.75, "y": 4, "w": 6.25},
+ {"matrix": [4, 10], "x": 10, "y": 4, "w": 1.25},
+ {"matrix": [4, 11], "x": 11.25, "y": 4, "w": 1.25},
+ {"matrix": [4, 12], "x": 12.5, "y": 4, "w": 1.25},
+ {"matrix": [4, 13], "x": 13.75, "y": 4, "w": 1.25}
+ ]
+ }
+ }
+}
diff --git a/keyboards/keychron/q4/ansi_v1/keymaps/default/keymap.c b/keyboards/keychron/q4/ansi/keymaps/default/keymap.c
index dd8669c3fb..dd8669c3fb 100644
--- a/keyboards/keychron/q4/ansi_v1/keymaps/default/keymap.c
+++ b/keyboards/keychron/q4/ansi/keymaps/default/keymap.c
diff --git a/keyboards/keychron/q4/ansi_v1/keymaps/keychron/keymap.c b/keyboards/keychron/q4/ansi/keymaps/keychron/keymap.c
index d58af0f244..d58af0f244 100644
--- a/keyboards/keychron/q4/ansi_v1/keymaps/keychron/keymap.c
+++ b/keyboards/keychron/q4/ansi/keymaps/keychron/keymap.c
diff --git a/keyboards/keychron/q4/ansi_v1/keymaps/keychron/rules.mk b/keyboards/keychron/q4/ansi/keymaps/keychron/rules.mk
index 1f273de340..1f273de340 100644
--- a/keyboards/keychron/q4/ansi_v1/keymaps/keychron/rules.mk
+++ b/keyboards/keychron/q4/ansi/keymaps/keychron/rules.mk
diff --git a/keyboards/keychron/q4/ansi_v1/keymaps/via/keymap.c b/keyboards/keychron/q4/ansi/keymaps/via/keymap.c
index dd8669c3fb..dd8669c3fb 100644
--- a/keyboards/keychron/q4/ansi_v1/keymaps/via/keymap.c
+++ b/keyboards/keychron/q4/ansi/keymaps/via/keymap.c
diff --git a/keyboards/keychron/q4/ansi_v1/keymaps/via/rules.mk b/keyboards/keychron/q4/ansi/keymaps/via/rules.mk
index 036bd6d1c3..036bd6d1c3 100644
--- a/keyboards/keychron/q4/ansi_v1/keymaps/via/rules.mk
+++ b/keyboards/keychron/q4/ansi/keymaps/via/rules.mk
diff --git a/keyboards/keychron/q4/ansi_v1/readme.md b/keyboards/keychron/q4/ansi/readme.md
index bd2f3fd8a8..bd2f3fd8a8 100644
--- a/keyboards/keychron/q4/ansi_v1/readme.md
+++ b/keyboards/keychron/q4/ansi/readme.md
diff --git a/keyboards/keychron/q4/ansi_v2/config.h b/keyboards/keychron/q4/ansi/v1/config.h
index cc906fed03..2d19c55a66 100644
--- a/keyboards/keychron/q4/ansi_v2/config.h
+++ b/keyboards/keychron/q4/ansi/v1/config.h
@@ -17,15 +17,12 @@
#pragma once
/* RGB Matrix Driver Configuration */
-#define DRIVER_COUNT 1
-#define DRIVER_ADDR_1 0b1110100
+#define SNLED27351_DRIVER_COUNT 2
+#define DRIVER_ADDR_1 SNLED27351_I2C_ADDRESS_VDDIO
+#define DRIVER_ADDR_2 SNLED27351_I2C_ADDRESS_GND
/* RGB Matrix Configuration */
-#define DRIVER_1_LED_TOTAL 61
-#define RGB_MATRIX_LED_COUNT DRIVER_1_LED_TOTAL
+#define RGB_MATRIX_LED_COUNT 61
-#define CKLED2001_CURRENT_TUNE \
- { 0xCA, 0xCA, 0x60, 0xCA, 0xCA, 0x60, 0xCA, 0xCA, 0x60, 0xCA, 0xCA, 0x60 }
-
-/* Enable CapsLcok LED*/
-#define CAPS_LOCK_LED_INDEX 28
+/* Scan phase of led driver set as SNLED27351_MSKPHASE_9CHANNEL(defined as 0x03 in SNLED27351.h) */
+#define SNLED27351_PHASE_CHANNEL SNLED27351_MSKPHASE_9CHANNEL
diff --git a/keyboards/keychron/q4/ansi/v1/rules.mk b/keyboards/keychron/q4/ansi/v1/rules.mk
new file mode 100644
index 0000000000..7ff128fa69
--- /dev/null
+++ b/keyboards/keychron/q4/ansi/v1/rules.mk
@@ -0,0 +1 @@
+# This file intentionally left blank \ No newline at end of file
diff --git a/keyboards/keychron/q4/ansi_v1/ansi_v1.c b/keyboards/keychron/q4/ansi/v1/v1.c
index 88599103ef..6c1fecefec 100644
--- a/keyboards/keychron/q4/ansi_v1/ansi_v1.c
+++ b/keyboards/keychron/q4/ansi/v1/v1.c
@@ -18,8 +18,8 @@
#ifdef RGB_MATRIX_ENABLE
-const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to CKLED manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | R location
* | | G location
@@ -92,33 +92,4 @@ const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
{1, F_14, D_14, E_14},
};
-#define __ NO_LED
-
-led_config_t g_led_config = {
- {
- // Key Matrix to LED Index
- { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 },
- { 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27 },
- { 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, __, 40 },
- { 41, __, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, __, 52 },
- { 53, 54, 55, __, __, __, 56, __, __, __, 57, 58, 59, 60 },
- },
- {
- // LED Index to Physical Position
- {0,0}, {16,0}, {32,0}, {48,0}, {64,0}, {81,0}, {97,0}, {113,0}, {129,0}, {145,0}, {161,0}, {177,0}, {193,0}, {218,0},
- {4,16}, {24,16}, {40,16}, {56,16}, {73,16}, {89,16}, {105,16}, {121,16}, {137,16}, {153,16}, {169,16}, {185,16}, {202,16}, {222,16},
- {6,32}, {28,32}, {44,32}, {60,32}, {77,32}, {93,32}, {109,32}, {125,32}, {141,32}, {157,32}, {173,32}, {189,32}, {216,32},
- {10,48}, {36,48}, {52,48}, {69,48}, {85,48}, {101,48}, {117,48}, {133,48}, {149,48}, {165,48}, {181,48}, {212,48},
- {2,64}, {22,64}, {42,64}, {103,64}, {164,64}, {184,64}, {204,64}, {224,64},
- },
- {
- // RGB LED Index to Flag
- 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
- 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
- 8, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
- 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
- 1, 1, 1, 4, 1, 1, 1, 1,
- }
-};
-
#endif
diff --git a/keyboards/keychron/q4/ansi/v2/config.h b/keyboards/keychron/q4/ansi/v2/config.h
new file mode 100644
index 0000000000..87b8eb401f
--- /dev/null
+++ b/keyboards/keychron/q4/ansi/v2/config.h
@@ -0,0 +1,24 @@
+/* Copyright 2022 @ Keychron (https://www.keychron.com)
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#pragma once
+
+/* RGB Matrix Driver Configuration */
+#define SNLED27351_DRIVER_COUNT 1
+#define DRIVER_ADDR_1 SNLED27351_I2C_ADDRESS_GND
+
+/* RGB Matrix Configuration */
+#define RGB_MATRIX_LED_COUNT 61
diff --git a/keyboards/keychron/q4/ansi/v2/rules.mk b/keyboards/keychron/q4/ansi/v2/rules.mk
new file mode 100644
index 0000000000..7ff128fa69
--- /dev/null
+++ b/keyboards/keychron/q4/ansi/v2/rules.mk
@@ -0,0 +1 @@
+# This file intentionally left blank \ No newline at end of file
diff --git a/keyboards/keychron/q4/ansi_v2/ansi_v2.c b/keyboards/keychron/q4/ansi/v2/v2.c
index d454a796fa..468a87af41 100644
--- a/keyboards/keychron/q4/ansi_v2/ansi_v2.c
+++ b/keyboards/keychron/q4/ansi/v2/v2.c
@@ -18,8 +18,8 @@
#ifdef RGB_MATRIX_ENABLE
-const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to CKLED manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | R location
* | | G location
@@ -92,33 +92,4 @@ const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
{0, F_16, D_16, E_16},
};
-#define __ NO_LED
-
-led_config_t g_led_config = {
- {
- // Key Matrix to LED Index
- { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 },
- { 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27 },
- { 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, __, 40 },
- { 41, __, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, __, 52 },
- { 53, 54, 55, __, __, __, 56, __, __, __, 57, 58, 59, 60 },
- },
- {
- // LED Index to Physical Position
- {0,0}, {16,0}, {32,0}, {48,0}, {64,0}, {81,0}, {97,0}, {113,0}, {129,0}, {145,0}, {161,0}, {177,0}, {193,0}, {218,0},
- {4,16}, {24,16}, {40,16}, {56,16}, {73,16}, {89,16}, {105,16}, {121,16}, {137,16}, {153,16}, {169,16}, {185,16}, {202,16}, {222,16},
- {6,32}, {28,32}, {44,32}, {60,32}, {77,32}, {93,32}, {109,32}, {125,32}, {141,32}, {157,32}, {173,32}, {189,32}, {216,32},
- {10,48}, {36,48}, {52,48}, {69,48}, {85,48}, {101,48}, {117,48}, {133,48}, {149,48}, {165,48}, {181,48}, {212,48},
- {2,64}, {22,64}, {42,64}, {103,64}, {164,64}, {184,64}, {204,64}, {224,64},
- },
- {
- // RGB LED Index to Flag
- 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
- 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
- 8, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
- 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
- 1, 1, 1, 4, 1, 1, 1, 1,
- }
-};
-
#endif
diff --git a/keyboards/keychron/q4/ansi_v1/config.h b/keyboards/keychron/q4/ansi_v1/config.h
deleted file mode 100644
index e11ab12b93..0000000000
--- a/keyboards/keychron/q4/ansi_v1/config.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/* Copyright 2022 @ Keychron (https://www.keychron.com)
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#pragma once
-
-/* RGB Matrix Driver Configuration */
-#define DRIVER_COUNT 2
-#define DRIVER_ADDR_1 0b1110111
-#define DRIVER_ADDR_2 0b1110100
-
-/* RGB Matrix Configuration */
-#define DRIVER_1_LED_TOTAL 31
-#define DRIVER_2_LED_TOTAL 30
-#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
-
-/* Scan phase of led driver set as MSKPHASE_9CHANNEL(defined as 0x03 in CKLED2001.h) */
-#define PHASE_CHANNEL MSKPHASE_9CHANNEL
-#define CKLED2001_CURRENT_TUNE \
- { 0xCA, 0xCA, 0x60, 0xCA, 0xCA, 0x60, 0xCA, 0xCA, 0x60, 0xCA, 0xCA, 0x60 }
-
-/* Enable CapsLcok LED*/
-#define CAPS_LOCK_LED_INDEX 28
diff --git a/keyboards/keychron/q4/ansi_v1/info.json b/keyboards/keychron/q4/ansi_v1/info.json
deleted file mode 100644
index 8ee286c481..0000000000
--- a/keyboards/keychron/q4/ansi_v1/info.json
+++ /dev/null
@@ -1,92 +0,0 @@
-{
- "keyboard_name": "Keychron Q4",
- "manufacturer": "Keychron",
- "url": "https://github.com/Keychron",
- "maintainer": "lalalademaxiya1",
- "usb": {
- "vid": "0x3434",
- "pid": "0x0140",
- "device_version": "1.0.0"
- },
- "rgb_matrix": {
- "driver": "ckled2001"
- },
- "matrix_pins": {
- "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9"],
- "rows": ["B4", "B3", "A15", "A14", "A13"]
- },
- "diode_direction": "ROW2COL",
- "processor": "STM32L432",
- "bootloader": "stm32-dfu",
- "layouts": {
- "LAYOUT_ansi_61": {
- "layout": [
- {"matrix": [0, 0], "x": 0, "y": 0},
- {"matrix": [0, 1], "x": 1, "y": 0},
- {"matrix": [0, 2], "x": 2, "y": 0},
- {"matrix": [0, 3], "x": 3, "y": 0},
- {"matrix": [0, 4], "x": 4, "y": 0},
- {"matrix": [0, 5], "x": 5, "y": 0},
- {"matrix": [0, 6], "x": 6, "y": 0},
- {"matrix": [0, 7], "x": 7, "y": 0},
- {"matrix": [0, 8], "x": 8, "y": 0},
- {"matrix": [0, 9], "x": 9, "y": 0},
- {"matrix": [0, 10], "x": 10, "y": 0},
- {"matrix": [0, 11], "x": 11, "y": 0},
- {"matrix": [0, 12], "x": 12, "y": 0},
- {"matrix": [0, 13], "x": 13, "y": 0, "w": 2},
-
- {"matrix": [1, 0], "x": 0, "y": 1, "w": 1.5},
- {"matrix": [1, 1], "x": 1.5, "y": 1},
- {"matrix": [1, 2], "x": 2.5, "y": 1},
- {"matrix": [1, 3], "x": 3.5, "y": 1},
- {"matrix": [1, 4], "x": 4.5, "y": 1},
- {"matrix": [1, 5], "x": 5.5, "y": 1},
- {"matrix": [1, 6], "x": 6.5, "y": 1},
- {"matrix": [1, 7], "x": 7.5, "y": 1},
- {"matrix": [1, 8], "x": 8.5, "y": 1},
- {"matrix": [1, 9], "x": 9.5, "y": 1},
- {"matrix": [1, 10], "x": 10.5, "y": 1},
- {"matrix": [1, 11], "x": 11.5, "y": 1},
- {"matrix": [1, 12], "x": 12.5, "y": 1},
- {"matrix": [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},
- {"matrix": [2, 3], "x": 3.75, "y": 2},
- {"matrix": [2, 4], "x": 4.75, "y": 2},
- {"matrix": [2, 5], "x": 5.75, "y": 2},
- {"matrix": [2, 6], "x": 6.75, "y": 2},
- {"matrix": [2, 7], "x": 7.75, "y": 2},
- {"matrix": [2, 8], "x": 8.75, "y": 2},
- {"matrix": [2, 9], "x": 9.75, "y": 2},
- {"matrix": [2, 10], "x": 10.75, "y": 2},
- {"matrix": [2, 11], "x": 11.75, "y": 2},
- {"matrix": [2, 13], "x": 12.75, "y": 2, "w": 2.25},
-
- {"matrix": [3, 0], "x": 0, "y": 3, "w": 2.25},
- {"matrix": [3, 2], "x": 2.25, "y": 3},
- {"matrix": [3, 3], "x": 3.25, "y": 3},
- {"matrix": [3, 4], "x": 4.25, "y": 3},
- {"matrix": [3, 5], "x": 5.25, "y": 3},
- {"matrix": [3, 6], "x": 6.25, "y": 3},
- {"matrix": [3, 7], "x": 7.25, "y": 3},
- {"matrix": [3, 8], "x": 8.25, "y": 3},
- {"matrix": [3, 9], "x": 9.25, "y": 3},
- {"matrix": [3, 10], "x": 10.25, "y": 3},
- {"matrix": [3, 11], "x": 11.25, "y": 3},
- {"matrix": [3, 13], "x": 12.25, "y": 3, "w": 2.75},
-
- {"matrix": [4, 0], "x": 0, "y": 4, "w": 1.25},
- {"matrix": [4, 1], "x": 1.25, "y": 4, "w": 1.25},
- {"matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.25},
- {"matrix": [4, 6], "x": 3.75, "y": 4, "w": 6.25},
- {"matrix": [4, 10], "x": 10, "y": 4, "w": 1.25},
- {"matrix": [4, 11], "x": 11.25, "y": 4, "w": 1.25},
- {"matrix": [4, 12], "x": 12.5, "y": 4, "w": 1.25},
- {"matrix": [4, 13], "x": 13.75, "y": 4, "w": 1.25}
- ]
- }
- }
-}
diff --git a/keyboards/keychron/q4/ansi_v1/rules.mk b/keyboards/keychron/q4/ansi_v1/rules.mk
deleted file mode 100644
index cad488b009..0000000000
--- a/keyboards/keychron/q4/ansi_v1/rules.mk
+++ /dev/null
@@ -1,18 +0,0 @@
-# Build Options
-# change yes to no to disable.
-#
-BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
-MOUSEKEY_ENABLE = yes # Mouse keys
-EXTRAKEY_ENABLE = yes # Audio control and System control
-CONSOLE_ENABLE = no # Console for debug
-COMMAND_ENABLE = no # Commands for debug and configuration
-NKRO_ENABLE = yes # Enable USB N-key Rollover
-BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
-RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
-AUDIO_ENABLE = no # Audio output
-DIP_SWITCH_ENABLE = yes
-RGB_MATRIX_ENABLE = yes
-LTO_ENABLE = no
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = embedded_flash
-
diff --git a/keyboards/keychron/q4/ansi_v2/info.json b/keyboards/keychron/q4/ansi_v2/info.json
deleted file mode 100644
index 8ee286c481..0000000000
--- a/keyboards/keychron/q4/ansi_v2/info.json
+++ /dev/null
@@ -1,92 +0,0 @@
-{
- "keyboard_name": "Keychron Q4",
- "manufacturer": "Keychron",
- "url": "https://github.com/Keychron",
- "maintainer": "lalalademaxiya1",
- "usb": {
- "vid": "0x3434",
- "pid": "0x0140",
- "device_version": "1.0.0"
- },
- "rgb_matrix": {
- "driver": "ckled2001"
- },
- "matrix_pins": {
- "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9"],
- "rows": ["B4", "B3", "A15", "A14", "A13"]
- },
- "diode_direction": "ROW2COL",
- "processor": "STM32L432",
- "bootloader": "stm32-dfu",
- "layouts": {
- "LAYOUT_ansi_61": {
- "layout": [
- {"matrix": [0, 0], "x": 0, "y": 0},
- {"matrix": [0, 1], "x": 1, "y": 0},
- {"matrix": [0, 2], "x": 2, "y": 0},
- {"matrix": [0, 3], "x": 3, "y": 0},
- {"matrix": [0, 4], "x": 4, "y": 0},
- {"matrix": [0, 5], "x": 5, "y": 0},
- {"matrix": [0, 6], "x": 6, "y": 0},
- {"matrix": [0, 7], "x": 7, "y": 0},
- {"matrix": [0, 8], "x": 8, "y": 0},
- {"matrix": [0, 9], "x": 9, "y": 0},
- {"matrix": [0, 10], "x": 10, "y": 0},
- {"matrix": [0, 11], "x": 11, "y": 0},
- {"matrix": [0, 12], "x": 12, "y": 0},
- {"matrix": [0, 13], "x": 13, "y": 0, "w": 2},
-
- {"matrix": [1, 0], "x": 0, "y": 1, "w": 1.5},
- {"matrix": [1, 1], "x": 1.5, "y": 1},
- {"matrix": [1, 2], "x": 2.5, "y": 1},
- {"matrix": [1, 3], "x": 3.5, "y": 1},
- {"matrix": [1, 4], "x": 4.5, "y": 1},
- {"matrix": [1, 5], "x": 5.5, "y": 1},
- {"matrix": [1, 6], "x": 6.5, "y": 1},
- {"matrix": [1, 7], "x": 7.5, "y": 1},
- {"matrix": [1, 8], "x": 8.5, "y": 1},
- {"matrix": [1, 9], "x": 9.5, "y": 1},
- {"matrix": [1, 10], "x": 10.5, "y": 1},
- {"matrix": [1, 11], "x": 11.5, "y": 1},
- {"matrix": [1, 12], "x": 12.5, "y": 1},
- {"matrix": [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},
- {"matrix": [2, 3], "x": 3.75, "y": 2},
- {"matrix": [2, 4], "x": 4.75, "y": 2},
- {"matrix": [2, 5], "x": 5.75, "y": 2},
- {"matrix": [2, 6], "x": 6.75, "y": 2},
- {"matrix": [2, 7], "x": 7.75, "y": 2},
- {"matrix": [2, 8], "x": 8.75, "y": 2},
- {"matrix": [2, 9], "x": 9.75, "y": 2},
- {"matrix": [2, 10], "x": 10.75, "y": 2},
- {"matrix": [2, 11], "x": 11.75, "y": 2},
- {"matrix": [2, 13], "x": 12.75, "y": 2, "w": 2.25},
-
- {"matrix": [3, 0], "x": 0, "y": 3, "w": 2.25},
- {"matrix": [3, 2], "x": 2.25, "y": 3},
- {"matrix": [3, 3], "x": 3.25, "y": 3},
- {"matrix": [3, 4], "x": 4.25, "y": 3},
- {"matrix": [3, 5], "x": 5.25, "y": 3},
- {"matrix": [3, 6], "x": 6.25, "y": 3},
- {"matrix": [3, 7], "x": 7.25, "y": 3},
- {"matrix": [3, 8], "x": 8.25, "y": 3},
- {"matrix": [3, 9], "x": 9.25, "y": 3},
- {"matrix": [3, 10], "x": 10.25, "y": 3},
- {"matrix": [3, 11], "x": 11.25, "y": 3},
- {"matrix": [3, 13], "x": 12.25, "y": 3, "w": 2.75},
-
- {"matrix": [4, 0], "x": 0, "y": 4, "w": 1.25},
- {"matrix": [4, 1], "x": 1.25, "y": 4, "w": 1.25},
- {"matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.25},
- {"matrix": [4, 6], "x": 3.75, "y": 4, "w": 6.25},
- {"matrix": [4, 10], "x": 10, "y": 4, "w": 1.25},
- {"matrix": [4, 11], "x": 11.25, "y": 4, "w": 1.25},
- {"matrix": [4, 12], "x": 12.5, "y": 4, "w": 1.25},
- {"matrix": [4, 13], "x": 13.75, "y": 4, "w": 1.25}
- ]
- }
- }
-}
diff --git a/keyboards/keychron/q4/ansi_v2/keymaps/default/keymap.c b/keyboards/keychron/q4/ansi_v2/keymaps/default/keymap.c
deleted file mode 100644
index dd8669c3fb..0000000000
--- a/keyboards/keychron/q4/ansi_v2/keymaps/default/keymap.c
+++ /dev/null
@@ -1,66 +0,0 @@
-/* Copyright 2022 @ Keychron (https://www.keychron.com)
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include QMK_KEYBOARD_H
-
-// clang-format off
-
-enum layers {
- MAC_BASE,
- WIN_BASE,
- _FN1,
- _FN2,
- _FN3
-};
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [MAC_BASE] = LAYOUT_ansi_61(
- KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC,
- KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
- KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
- KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
- KC_LCTL, KC_LOPT, KC_LCMD, KC_SPC, KC_RCMD, MO(_FN1), MO(_FN3), KC_RCTL),
-
- [WIN_BASE] = LAYOUT_ansi_61(
- KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC,
- KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
- KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
- KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
- KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN2), MO(_FN3), KC_RCTL),
-
- [_FN1] = LAYOUT_ansi_61(
- KC_GRV, KC_BRID, KC_BRIU, KC_NO, KC_NO, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, RGB_MOD,
- RGB_TOG, RGB_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, _______, _______, _______, _______, KC_INS, KC_PGUP, KC_HOME, _______,
- _______, RGB_RMOD, RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, _______, _______, KC_UP, KC_NO, KC_PGDN, KC_END, _______,
- _______, _______, _______, _______, _______, _______, NK_TOGG, KC_LEFT, KC_DOWN, KC_RIGHT, KC_DEL, _______,
- _______, _______, _______, _______, _______, _______, _______, _______),
-
- [_FN2] = LAYOUT_ansi_61(
- KC_GRV, KC_BRID, KC_BRIU, KC_NO, KC_NO, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, RGB_MOD,
- RGB_TOG, RGB_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, _______, _______, KC_APP, KC_SCRL, KC_INS, KC_PGUP, KC_HOME, _______,
- _______, RGB_RMOD, RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, _______, _______, KC_UP, KC_PSCR, KC_PGDN, KC_END, _______,
- _______, _______, _______, _______, _______, _______, NK_TOGG, KC_LEFT, KC_DOWN, KC_RIGHT, KC_DEL, _______,
- _______, _______, _______, _______, _______, _______, _______, _______),
-
- [_FN3] = LAYOUT_ansi_61(
- KC_TILD, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______,
- RGB_TOG, RGB_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, RGB_RMOD, RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______)
-};
-
-// clang-format on \ No newline at end of file
diff --git a/keyboards/keychron/q4/ansi_v2/keymaps/keychron/keymap.c b/keyboards/keychron/q4/ansi_v2/keymaps/keychron/keymap.c
deleted file mode 100644
index d58af0f244..0000000000
--- a/keyboards/keychron/q4/ansi_v2/keymaps/keychron/keymap.c
+++ /dev/null
@@ -1,75 +0,0 @@
-/* Copyright 2022 @ Keychron (https://www.keychron.com)
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include QMK_KEYBOARD_H
-#include "keychron_common.h"
-
-// clang-format off
-
-enum layers {
- MAC_BASE,
- WIN_BASE,
- _FN1,
- _FN2,
- _FN3
-};
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [MAC_BASE] = LAYOUT_ansi_61(
- KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC,
- KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
- KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
- KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
- KC_LCTL, KC_LOPT, KC_LCMD, KC_SPC, KC_RCMD, MO(_FN1), MO(_FN3), KC_RCTL),
-
- [WIN_BASE] = LAYOUT_ansi_61(
- KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC,
- KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
- KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
- KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
- KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN2), MO(_FN3), KC_RCTL),
-
- [_FN1] = LAYOUT_ansi_61(
- KC_GRV, KC_BRID, KC_BRIU, KC_NO, KC_NO, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, RGB_MOD,
- RGB_TOG, RGB_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, _______, _______, _______, _______, KC_INS, KC_PGUP, KC_HOME, _______,
- _______, RGB_RMOD, RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, _______, _______, KC_UP, KC_NO, KC_PGDN, KC_END, _______,
- _______, _______, _______, _______, _______, _______, NK_TOGG, KC_LEFT, KC_DOWN, KC_RIGHT, KC_DEL, _______,
- _______, _______, _______, _______, _______, _______, _______, _______),
-
- [_FN2] = LAYOUT_ansi_61(
- KC_GRV, KC_BRID, KC_BRIU, KC_NO, KC_NO, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, RGB_MOD,
- RGB_TOG, RGB_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, _______, _______, KC_APP, KC_SCRL, KC_INS, KC_PGUP, KC_HOME, _______,
- _______, RGB_RMOD, RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, _______, _______, KC_UP, KC_PSCR, KC_PGDN, KC_END, _______,
- _______, _______, _______, _______, _______, _______, NK_TOGG, KC_LEFT, KC_DOWN, KC_RIGHT, KC_DEL, _______,
- _______, _______, _______, _______, _______, _______, _______, _______),
-
- [_FN3] = LAYOUT_ansi_61(
- KC_TILD, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______,
- RGB_TOG, RGB_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, RGB_RMOD, RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______)
-};
-
-// clang-format on
-
-bool process_record_user(uint16_t keycode, keyrecord_t *record) {
- if (!process_record_keychron(keycode, record)) {
- return false;
- }
-
- return true;
-} \ No newline at end of file
diff --git a/keyboards/keychron/q4/ansi_v2/keymaps/keychron/rules.mk b/keyboards/keychron/q4/ansi_v2/keymaps/keychron/rules.mk
deleted file mode 100644
index 1f273de340..0000000000
--- a/keyboards/keychron/q4/ansi_v2/keymaps/keychron/rules.mk
+++ /dev/null
@@ -1,4 +0,0 @@
-VIA_ENABLE = yes
-
-VPATH += keyboards/keychron/common
-SRC += keychron_common.c \ No newline at end of file
diff --git a/keyboards/keychron/q4/ansi_v2/keymaps/via/keymap.c b/keyboards/keychron/q4/ansi_v2/keymaps/via/keymap.c
deleted file mode 100644
index dd8669c3fb..0000000000
--- a/keyboards/keychron/q4/ansi_v2/keymaps/via/keymap.c
+++ /dev/null
@@ -1,66 +0,0 @@
-/* Copyright 2022 @ Keychron (https://www.keychron.com)
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include QMK_KEYBOARD_H
-
-// clang-format off
-
-enum layers {
- MAC_BASE,
- WIN_BASE,
- _FN1,
- _FN2,
- _FN3
-};
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [MAC_BASE] = LAYOUT_ansi_61(
- KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC,
- KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
- KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
- KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
- KC_LCTL, KC_LOPT, KC_LCMD, KC_SPC, KC_RCMD, MO(_FN1), MO(_FN3), KC_RCTL),
-
- [WIN_BASE] = LAYOUT_ansi_61(
- KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC,
- KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
- KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
- KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
- KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN2), MO(_FN3), KC_RCTL),
-
- [_FN1] = LAYOUT_ansi_61(
- KC_GRV, KC_BRID, KC_BRIU, KC_NO, KC_NO, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, RGB_MOD,
- RGB_TOG, RGB_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, _______, _______, _______, _______, KC_INS, KC_PGUP, KC_HOME, _______,
- _______, RGB_RMOD, RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, _______, _______, KC_UP, KC_NO, KC_PGDN, KC_END, _______,
- _______, _______, _______, _______, _______, _______, NK_TOGG, KC_LEFT, KC_DOWN, KC_RIGHT, KC_DEL, _______,
- _______, _______, _______, _______, _______, _______, _______, _______),
-
- [_FN2] = LAYOUT_ansi_61(
- KC_GRV, KC_BRID, KC_BRIU, KC_NO, KC_NO, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, RGB_MOD,
- RGB_TOG, RGB_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, _______, _______, KC_APP, KC_SCRL, KC_INS, KC_PGUP, KC_HOME, _______,
- _______, RGB_RMOD, RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, _______, _______, KC_UP, KC_PSCR, KC_PGDN, KC_END, _______,
- _______, _______, _______, _______, _______, _______, NK_TOGG, KC_LEFT, KC_DOWN, KC_RIGHT, KC_DEL, _______,
- _______, _______, _______, _______, _______, _______, _______, _______),
-
- [_FN3] = LAYOUT_ansi_61(
- KC_TILD, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______,
- RGB_TOG, RGB_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, RGB_RMOD, RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______)
-};
-
-// clang-format on \ No newline at end of file
diff --git a/keyboards/keychron/q4/ansi_v2/keymaps/via/rules.mk b/keyboards/keychron/q4/ansi_v2/keymaps/via/rules.mk
deleted file mode 100644
index 036bd6d1c3..0000000000
--- a/keyboards/keychron/q4/ansi_v2/keymaps/via/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-VIA_ENABLE = yes \ No newline at end of file
diff --git a/keyboards/keychron/q4/ansi_v2/readme.md b/keyboards/keychron/q4/ansi_v2/readme.md
deleted file mode 100644
index bd2f3fd8a8..0000000000
--- a/keyboards/keychron/q4/ansi_v2/readme.md
+++ /dev/null
@@ -1 +0,0 @@
-# The ANSI variant of the Keychron Q4
diff --git a/keyboards/keychron/q4/ansi_v2/rules.mk b/keyboards/keychron/q4/ansi_v2/rules.mk
deleted file mode 100644
index cad488b009..0000000000
--- a/keyboards/keychron/q4/ansi_v2/rules.mk
+++ /dev/null
@@ -1,18 +0,0 @@
-# Build Options
-# change yes to no to disable.
-#
-BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
-MOUSEKEY_ENABLE = yes # Mouse keys
-EXTRAKEY_ENABLE = yes # Audio control and System control
-CONSOLE_ENABLE = no # Console for debug
-COMMAND_ENABLE = no # Commands for debug and configuration
-NKRO_ENABLE = yes # Enable USB N-key Rollover
-BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
-RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
-AUDIO_ENABLE = no # Audio output
-DIP_SWITCH_ENABLE = yes
-RGB_MATRIX_ENABLE = yes
-LTO_ENABLE = no
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = embedded_flash
-
diff --git a/keyboards/keychron/q4/config.h b/keyboards/keychron/q4/config.h
index 940ee44e77..62f8294966 100644
--- a/keyboards/keychron/q4/config.h
+++ b/keyboards/keychron/q4/config.h
@@ -25,60 +25,8 @@
/* turn off effects when suspended */
#define RGB_DISABLE_WHEN_USB_SUSPENDED
-#define DYNAMIC_KEYMAP_LAYER_COUNT 5
-
-/* EEPROM Driver Configuration */
-#define WEAR_LEVELING_LOGICAL_SIZE 2048
-#define WEAR_LEVELING_BACKING_SIZE (WEAR_LEVELING_LOGICAL_SIZE * 2)
-
-// RGB Matrix Animation modes. Explicitly enabled
-// For full list of effects, see:
-// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects
-// #define ENABLE_RGB_MATRIX_ALPHAS_MODS
-// #define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN
-// #define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT
-#define ENABLE_RGB_MATRIX_BREATHING
-// #define ENABLE_RGB_MATRIX_BAND_SAT
-// #define ENABLE_RGB_MATRIX_BAND_VAL
-// #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
-// #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL
-// #define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT
-#define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL
-#define ENABLE_RGB_MATRIX_CYCLE_ALL
-#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
-#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN
-#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
-#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN
-#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
-#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL
-#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL
-#define ENABLE_RGB_MATRIX_DUAL_BEACON
-#define ENABLE_RGB_MATRIX_RAINBOW_BEACON
-// #define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS
-// #define ENABLE_RGB_MATRIX_RAINDROPS
-#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
-// #define ENABLE_RGB_MATRIX_HUE_BREATHING
-// #define ENABLE_RGB_MATRIX_HUE_PENDULUM
-// #define ENABLE_RGB_MATRIX_HUE_WAVE
-#define ENABLE_RGB_MATRIX_PIXEL_RAIN
-// #define ENABLE_RGB_MATRIX_PIXEL_FLOW
-// #define ENABLE_RGB_MATRIX_PIXEL_FRACTAL
-// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined
-#define ENABLE_RGB_MATRIX_TYPING_HEATMAP
-#define ENABLE_RGB_MATRIX_DIGITAL_RAIN
-// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined
-#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
-// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE
-// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
-#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
-// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
-// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
-// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
-#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
-#define ENABLE_RGB_MATRIX_SPLASH
-// #define ENABLE_RGB_MATRIX_MULTISPLASH
-#define ENABLE_RGB_MATRIX_SOLID_SPLASH
-// #define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
+#define SNLED27351_CURRENT_TUNE \
+ { 0xCA, 0xCA, 0x60, 0xCA, 0xCA, 0x60, 0xCA, 0xCA, 0x60, 0xCA, 0xCA, 0x60 }
#define RGB_MATRIX_KEYPRESSES
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS \ No newline at end of file
diff --git a/keyboards/keychron/q4/info.json b/keyboards/keychron/q4/info.json
new file mode 100644
index 0000000000..0a9dcf4957
--- /dev/null
+++ b/keyboards/keychron/q4/info.json
@@ -0,0 +1,62 @@
+{
+ "manufacturer": "Keychron",
+ "keyboard_name": "Keychron Q4",
+ "maintainer": "lalalademaxiya1",
+ "bootloader": "stm32-dfu",
+ "diode_direction": "ROW2COL",
+ "dynamic_keymap": {
+ "layer_count": 5
+ },
+ "eeprom": {
+ "wear_leveling": {
+ "backing_size": 4096
+ }
+ },
+ "features": {
+ "audio": false,
+ "backlight": false,
+ "bootmagic": true,
+ "command": false,
+ "console": false,
+ "extrakey": true,
+ "mousekey": true,
+ "nkro": true,
+ "rgb_matrix": true,
+ "rgblight": false
+ },
+ "matrix_pins": {
+ "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9"],
+ "rows": ["B4", "B3", "A15", "A14", "A13"]
+ },
+ "processor": "STM32L432",
+ "rgb_matrix": {
+ "animations": {
+ "band_spiral_val": true,
+ "breathing": true,
+ "cycle_all": true,
+ "cycle_left_right": 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,
+ "jellybean_raindrops": true,
+ "pixel_rain": true,
+ "rainbow_beacon": true,
+ "rainbow_moving_chevron": true,
+ "solid_reactive_multinexus": true,
+ "solid_reactive_multiwide": true,
+ "solid_reactive_simple": true,
+ "solid_splash": true,
+ "splash": true,
+ "typing_heatmap": true
+ },
+ "driver": "snled27351"
+ },
+ "url": "https://github.com/Keychron",
+ "usb": {
+ "vid": "0x3434"
+ }
+} \ No newline at end of file
diff --git a/keyboards/keychron/q4/iso/config.h b/keyboards/keychron/q4/iso/config.h
index 9e4a1fc3e5..da84fed852 100644
--- a/keyboards/keychron/q4/iso/config.h
+++ b/keyboards/keychron/q4/iso/config.h
@@ -17,15 +17,11 @@
#pragma once
/* RGB Matrix Driver Configuration */
-#define DRIVER_COUNT 1
-#define DRIVER_ADDR_1 0b1110100
+#define SNLED27351_DRIVER_COUNT 1
+#define DRIVER_ADDR_1 SNLED27351_I2C_ADDRESS_GND
/* RGB Matrix Configuration */
-#define DRIVER_1_LED_TOTAL 62
-#define RGB_MATRIX_LED_COUNT DRIVER_1_LED_TOTAL
-
-#define CKLED2001_CURRENT_TUNE \
- { 0xCA, 0xCA, 0x60, 0xCA, 0xCA, 0x60, 0xCA, 0xCA, 0x60, 0xCA, 0xCA, 0x60 }
+#define RGB_MATRIX_LED_COUNT 62
/* Enable CapsLcok LED*/
#define CAPS_LOCK_LED_INDEX 27
diff --git a/keyboards/keychron/q4/iso/info.json b/keyboards/keychron/q4/iso/info.json
index f8945cda61..13b25f74e0 100644
--- a/keyboards/keychron/q4/iso/info.json
+++ b/keyboards/keychron/q4/iso/info.json
@@ -1,23 +1,78 @@
{
- "keyboard_name": "Keychron Q4",
- "manufacturer": "Keychron",
- "url": "https://github.com/Keychron",
- "maintainer": "lalalademaxiya1",
"usb": {
- "vid": "0x3434",
"pid": "0x0142",
"device_version": "1.0.0"
},
"rgb_matrix": {
- "driver": "ckled2001"
- },
- "matrix_pins": {
- "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9"],
- "rows": ["B4", "B3", "A15", "A14", "A13"]
+ "layout": [
+ {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1},
+ {"matrix": [0, 1], "x": 16, "y": 0, "flags": 4},
+ {"matrix": [0, 2], "x": 32, "y": 0, "flags": 4},
+ {"matrix": [0, 3], "x": 48, "y": 0, "flags": 4},
+ {"matrix": [0, 4], "x": 64, "y": 0, "flags": 4},
+ {"matrix": [0, 5], "x": 81, "y": 0, "flags": 4},
+ {"matrix": [0, 6], "x": 97, "y": 0, "flags": 4},
+ {"matrix": [0, 7], "x": 113, "y": 0, "flags": 4},
+ {"matrix": [0, 8], "x": 129, "y": 0, "flags": 4},
+ {"matrix": [0, 9], "x": 145, "y": 0, "flags": 4},
+ {"matrix": [0, 10], "x": 161, "y": 0, "flags": 4},
+ {"matrix": [0, 11], "x": 177, "y": 0, "flags": 4},
+ {"matrix": [0, 12], "x": 193, "y": 0, "flags": 4},
+ {"matrix": [0, 13], "x": 218, "y": 0, "flags": 1},
+
+ {"matrix": [1, 0], "x": 4, "y": 16, "flags": 1},
+ {"matrix": [1, 1], "x": 24, "y": 16, "flags": 4},
+ {"matrix": [1, 2], "x": 40, "y": 16, "flags": 4},
+ {"matrix": [1, 3], "x": 56, "y": 16, "flags": 4},
+ {"matrix": [1, 4], "x": 73, "y": 16, "flags": 4},
+ {"matrix": [1, 5], "x": 89, "y": 16, "flags": 4},
+ {"matrix": [1, 6], "x": 105, "y": 16, "flags": 4},
+ {"matrix": [1, 7], "x": 121, "y": 16, "flags": 4},
+ {"matrix": [1, 8], "x": 137, "y": 16, "flags": 4},
+ {"matrix": [1, 9], "x": 153, "y": 16, "flags": 4},
+ {"matrix": [1, 10], "x": 169, "y": 16, "flags": 4},
+ {"matrix": [1, 11], "x": 185, "y": 16, "flags": 4},
+ {"matrix": [1, 12], "x": 202, "y": 16, "flags": 4},
+
+ {"matrix": [2, 0], "x": 6, "y": 32, "flags": 8},
+ {"matrix": [2, 1], "x": 28, "y": 32, "flags": 4},
+ {"matrix": [2, 2], "x": 44, "y": 32, "flags": 4},
+ {"matrix": [2, 3], "x": 60, "y": 32, "flags": 4},
+ {"matrix": [2, 4], "x": 77, "y": 32, "flags": 4},
+ {"matrix": [2, 5], "x": 93, "y": 32, "flags": 4},
+ {"matrix": [2, 6], "x": 109, "y": 32, "flags": 4},
+ {"matrix": [2, 7], "x": 125, "y": 32, "flags": 4},
+ {"matrix": [2, 8], "x": 141, "y": 32, "flags": 4},
+ {"matrix": [2, 9], "x": 157, "y": 32, "flags": 4},
+ {"matrix": [2, 10], "x": 173, "y": 32, "flags": 4},
+ {"matrix": [2, 11], "x": 189, "y": 32, "flags": 4},
+ {"matrix": [2, 13], "x": 206, "y": 32, "flags": 4},
+ {"matrix": [1, 13], "x": 224, "y": 24, "flags": 1},
+
+ {"matrix": [3, 0], "x": 2, "y": 48, "flags": 1},
+ {"matrix": [3, 1], "x": 20, "y": 48, "flags": 4},
+ {"matrix": [3, 2], "x": 36, "y": 48, "flags": 4},
+ {"matrix": [3, 3], "x": 52, "y": 48, "flags": 4},
+ {"matrix": [3, 4], "x": 69, "y": 48, "flags": 4},
+ {"matrix": [3, 5], "x": 85, "y": 48, "flags": 4},
+ {"matrix": [3, 6], "x": 101, "y": 48, "flags": 4},
+ {"matrix": [3, 7], "x": 117, "y": 48, "flags": 4},
+ {"matrix": [3, 8], "x": 133, "y": 48, "flags": 4},
+ {"matrix": [3, 9], "x": 149, "y": 48, "flags": 4},
+ {"matrix": [3, 10], "x": 165, "y": 48, "flags": 4},
+ {"matrix": [3, 11], "x": 181, "y": 48, "flags": 4},
+ {"matrix": [3, 13], "x": 212, "y": 48, "flags": 1},
+
+ {"matrix": [4, 0], "x": 2, "y": 64, "flags": 1},
+ {"matrix": [4, 1], "x": 22, "y": 64, "flags": 1},
+ {"matrix": [4, 2], "x": 42, "y": 64, "flags": 1},
+ {"matrix": [4, 6], "x": 103, "y": 64, "flags": 4},
+ {"matrix": [4, 10], "x": 164, "y": 64, "flags": 1},
+ {"matrix": [4, 11], "x": 184, "y": 64, "flags": 1},
+ {"matrix": [4, 12], "x": 204, "y": 64, "flags": 1},
+ {"matrix": [4, 13], "x": 224, "y": 64, "flags": 1}
+ ]
},
- "diode_direction": "ROW2COL",
- "processor": "STM32L432",
- "bootloader": "stm32-dfu",
"layouts": {
"LAYOUT_iso_62": {
"layout": [
diff --git a/keyboards/keychron/q4/iso/iso.c b/keyboards/keychron/q4/iso/iso.c
index 24cbcfd745..a808c3ad74 100644
--- a/keyboards/keychron/q4/iso/iso.c
+++ b/keyboards/keychron/q4/iso/iso.c
@@ -18,8 +18,8 @@
#ifdef RGB_MATRIX_ENABLE
-const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to CKLED manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | R location
* | | G location
@@ -93,33 +93,4 @@ const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
{0, F_16, D_16, E_16},
};
-#define __ NO_LED
-
-led_config_t g_led_config = {
- {
- // Key Matrix to LED Index
- { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 },
- { 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 40 },
- { 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, __, 39 },
- { 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, __, 53 },
- { 54, 55, 56, __, __, __, 57, __, __, __, 58, 59, 60, 61 },
- },
- {
- // LED Index to Physical Position
- {0, 0}, {16, 0}, {32, 0}, {48, 0}, {64, 0}, {81, 0}, { 97, 0}, {113, 0}, {129, 0}, {145, 0}, {161, 0}, {177, 0}, {193, 0}, {218, 0},
- {4,16}, {24,16}, {40,16}, {56,16}, {73,16}, {89,16}, {105,16}, {121,16}, {137,16}, {153,16}, {169,16}, {185,16}, {202,16},
- {6,32}, {28,32}, {44,32}, {60,32}, {77,32}, {93,32}, {109,32}, {125,32}, {141,32}, {157,32}, {173,32}, {189,32}, {206,32}, {224,24},
- {2,48}, {20,48}, {36,48}, {52,48}, {69,48}, {85,48}, {101,48}, {117,48}, {133,48}, {149,48}, {165,48}, {181,48}, {212,48},
- {2,64}, {22,64}, {42,64}, {103,64}, {164,64}, {184,64}, {204,64}, {224,64},
- },
- {
- // RGB LED Index to Flag
- 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
- 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
- 8, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
- 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
- 1, 1, 1, 4, 1, 1, 1, 1,
- }
-};
-
#endif
diff --git a/keyboards/keychron/q4/iso/rules.mk b/keyboards/keychron/q4/iso/rules.mk
index cad488b009..7ff128fa69 100644
--- a/keyboards/keychron/q4/iso/rules.mk
+++ b/keyboards/keychron/q4/iso/rules.mk
@@ -1,18 +1 @@
-# Build Options
-# change yes to no to disable.
-#
-BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
-MOUSEKEY_ENABLE = yes # Mouse keys
-EXTRAKEY_ENABLE = yes # Audio control and System control
-CONSOLE_ENABLE = no # Console for debug
-COMMAND_ENABLE = no # Commands for debug and configuration
-NKRO_ENABLE = yes # Enable USB N-key Rollover
-BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
-RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
-AUDIO_ENABLE = no # Audio output
-DIP_SWITCH_ENABLE = yes
-RGB_MATRIX_ENABLE = yes
-LTO_ENABLE = no
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = embedded_flash
-
+# This file intentionally left blank \ No newline at end of file
diff --git a/keyboards/keychron/q4/readme.md b/keyboards/keychron/q4/readme.md
index 2c3d9c8572..711eeadbb4 100644
--- a/keyboards/keychron/q4/readme.md
+++ b/keyboards/keychron/q4/readme.md
@@ -1,18 +1,26 @@
# Keychron Q4
+![Keychron Q4](https://i.imgur.com/daIVjVGh.jpg)
+
A customizable 60% keyboard.
+Q4 Version 1 uses only 2 ICs for CKLED2001 and Q4 Version 2 uses only one IC.
+
* Keyboard Maintainer: [Keychron](https://github.com/keychron)
* Hardware Supported: Keychron Q4
-* Hardware Availability: [Keychron](https://www.keychron.com)
+* Hardware Availability: [Keychron Q4 QMK Custom Mechanical Keyboard](https://www.keychron.com/products/keychron-q4-qmk-via-custom-mechanical-keyboard)
Make example for this keyboard (after setting up your build environment):
- make keychron/q4/ansi_v2:default
+ make keychron/q4/ansi/v1:default
+ make keychron/q4/ansi/v2:default
+ make keychron/q4/iso:default
Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid))
- make keychron/q4/ansi_v2:default:flash
+ make keychron/q4/ansi/v1:default:flash
+ make keychron/q4/ansi/v2:default:flash
+ make keychron/q4/iso:default:flash
**Reset Key**: Hold down the key located at *K00*, commonly programmed as *Esc* while plugging in the keyboard.
diff --git a/keyboards/keychron/q5/ansi/ansi.c b/keyboards/keychron/q5/ansi/ansi.c
index dda563cd79..8c80245fbc 100644
--- a/keyboards/keychron/q5/ansi/ansi.c
+++ b/keyboards/keychron/q5/ansi/ansi.c
@@ -18,8 +18,8 @@
#ifdef RGB_MATRIX_ENABLE
-const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to IS31 manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | R location
* | | G location
diff --git a/keyboards/keychron/q5/ansi/info.json b/keyboards/keychron/q5/ansi/info.json
index 55d7ae0165..8795957c45 100644
--- a/keyboards/keychron/q5/ansi/info.json
+++ b/keyboards/keychron/q5/ansi/info.json
@@ -9,7 +9,7 @@
"device_version": "1.0.0"
},
"rgb_matrix": {
- "driver": "ckled2001"
+ "driver": "snled27351"
},
"processor": "STM32L432",
"bootloader": "stm32-dfu",
diff --git a/keyboards/keychron/q5/ansi/rules.mk b/keyboards/keychron/q5/ansi/rules.mk
index e859eb9c34..465dfa9348 100644
--- a/keyboards/keychron/q5/ansi/rules.mk
+++ b/keyboards/keychron/q5/ansi/rules.mk
@@ -12,8 +12,6 @@ RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
AUDIO_ENABLE = no # Audio output
DIP_SWITCH_ENABLE = yes
RGB_MATRIX_ENABLE = yes
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = embedded_flash
# custom matrix setup
CUSTOM_MATRIX = lite
diff --git a/keyboards/keychron/q5/ansi_encoder/ansi_encoder.c b/keyboards/keychron/q5/ansi_encoder/ansi_encoder.c
index 4d3cc0f036..d5f67f1297 100644
--- a/keyboards/keychron/q5/ansi_encoder/ansi_encoder.c
+++ b/keyboards/keychron/q5/ansi_encoder/ansi_encoder.c
@@ -20,8 +20,8 @@
// clang-format off
-const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to IS31 manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | R location
* | | G location
diff --git a/keyboards/keychron/q5/ansi_encoder/info.json b/keyboards/keychron/q5/ansi_encoder/info.json
index 468261b1e9..ae4a58e55d 100644
--- a/keyboards/keychron/q5/ansi_encoder/info.json
+++ b/keyboards/keychron/q5/ansi_encoder/info.json
@@ -9,7 +9,7 @@
"device_version": "1.0.0"
},
"rgb_matrix": {
- "driver": "ckled2001"
+ "driver": "snled27351"
},
"encoder": {
"rotary": [
diff --git a/keyboards/keychron/q5/ansi_encoder/rules.mk b/keyboards/keychron/q5/ansi_encoder/rules.mk
index 7da353fbd1..4c6e5bebf0 100644
--- a/keyboards/keychron/q5/ansi_encoder/rules.mk
+++ b/keyboards/keychron/q5/ansi_encoder/rules.mk
@@ -13,8 +13,6 @@ AUDIO_ENABLE = no # Audio output
ENCODER_ENABLE = yes # Enable Encoder
DIP_SWITCH_ENABLE = yes
RGB_MATRIX_ENABLE = yes
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = embedded_flash
# custom matrix setup
CUSTOM_MATRIX = lite
diff --git a/keyboards/keychron/q5/config.h b/keyboards/keychron/q5/config.h
index bf25cb7441..49216fba1f 100644
--- a/keyboards/keychron/q5/config.h
+++ b/keyboards/keychron/q5/config.h
@@ -30,11 +30,11 @@
#define DIODE_DIRECTION ROW2COL
/* RGB Matrix Driver Configuration */
-#define DRIVER_COUNT 2
-#define DRIVER_ADDR_1 0b1110111
-#define DRIVER_ADDR_2 0b1110100
+#define SNLED27351_DRIVER_COUNT 2
+#define DRIVER_ADDR_1 SNLED27351_I2C_ADDRESS_VDDIO
+#define DRIVER_ADDR_2 SNLED27351_I2C_ADDRESS_GND
-#define CKLED2001_CURRENT_TUNE \
+#define SNLED27351_CURRENT_TUNE \
{ 0xB6, 0xB6, 0x56, 0xB6, 0xB6, 0x56, 0xB6, 0xB6, 0x56, 0xB6, 0xB6, 0x56 }
/* DIP switch */
diff --git a/keyboards/keychron/q5/iso/info.json b/keyboards/keychron/q5/iso/info.json
index 3b0b2ea1a0..2cc2ce9640 100644
--- a/keyboards/keychron/q5/iso/info.json
+++ b/keyboards/keychron/q5/iso/info.json
@@ -9,7 +9,7 @@
"device_version": "1.0.0"
},
"rgb_matrix": {
- "driver": "ckled2001"
+ "driver": "snled27351"
},
"processor": "STM32L432",
"bootloader": "stm32-dfu",
diff --git a/keyboards/keychron/q5/iso/iso.c b/keyboards/keychron/q5/iso/iso.c
index 65924abd76..8a7cb863ec 100644
--- a/keyboards/keychron/q5/iso/iso.c
+++ b/keyboards/keychron/q5/iso/iso.c
@@ -20,8 +20,8 @@
// clang-format off
-const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to IS31 manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | R location
* | | G location
diff --git a/keyboards/keychron/q5/iso/rules.mk b/keyboards/keychron/q5/iso/rules.mk
index e859eb9c34..465dfa9348 100644
--- a/keyboards/keychron/q5/iso/rules.mk
+++ b/keyboards/keychron/q5/iso/rules.mk
@@ -12,8 +12,6 @@ RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
AUDIO_ENABLE = no # Audio output
DIP_SWITCH_ENABLE = yes
RGB_MATRIX_ENABLE = yes
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = embedded_flash
# custom matrix setup
CUSTOM_MATRIX = lite
diff --git a/keyboards/keychron/q5/iso_encoder/info.json b/keyboards/keychron/q5/iso_encoder/info.json
index eefa6dc693..a425cf3145 100644
--- a/keyboards/keychron/q5/iso_encoder/info.json
+++ b/keyboards/keychron/q5/iso_encoder/info.json
@@ -9,7 +9,7 @@
"device_version": "1.0.0"
},
"rgb_matrix": {
- "driver": "ckled2001"
+ "driver": "snled27351"
},
"encoder": {
"rotary": [
diff --git a/keyboards/keychron/q5/iso_encoder/iso_encoder.c b/keyboards/keychron/q5/iso_encoder/iso_encoder.c
index 22ba9e2d4e..009e8043db 100644
--- a/keyboards/keychron/q5/iso_encoder/iso_encoder.c
+++ b/keyboards/keychron/q5/iso_encoder/iso_encoder.c
@@ -20,8 +20,8 @@
// clang-format off
-const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to IS31 manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | R location
* | | G location
diff --git a/keyboards/keychron/q5/iso_encoder/rules.mk b/keyboards/keychron/q5/iso_encoder/rules.mk
index 7da353fbd1..4c6e5bebf0 100644
--- a/keyboards/keychron/q5/iso_encoder/rules.mk
+++ b/keyboards/keychron/q5/iso_encoder/rules.mk
@@ -13,8 +13,6 @@ AUDIO_ENABLE = no # Audio output
ENCODER_ENABLE = yes # Enable Encoder
DIP_SWITCH_ENABLE = yes
RGB_MATRIX_ENABLE = yes
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = embedded_flash
# custom matrix setup
CUSTOM_MATRIX = lite
diff --git a/keyboards/keychron/q6/ansi/ansi.c b/keyboards/keychron/q6/ansi/ansi.c
index a81d5f9e9f..80eaad02b3 100644
--- a/keyboards/keychron/q6/ansi/ansi.c
+++ b/keyboards/keychron/q6/ansi/ansi.c
@@ -20,8 +20,8 @@
// clang-format off
-const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to IS31 manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | R location
* | | G location
diff --git a/keyboards/keychron/q6/ansi/info.json b/keyboards/keychron/q6/ansi/info.json
index fdec220e80..108cc46379 100644
--- a/keyboards/keychron/q6/ansi/info.json
+++ b/keyboards/keychron/q6/ansi/info.json
@@ -9,7 +9,7 @@
"device_version": "1.0.0"
},
"rgb_matrix": {
- "driver": "ckled2001"
+ "driver": "snled27351"
},
"processor": "STM32L432",
"bootloader": "stm32-dfu",
diff --git a/keyboards/keychron/q6/ansi/rules.mk b/keyboards/keychron/q6/ansi/rules.mk
index ec47b77d0f..9383cc955f 100644
--- a/keyboards/keychron/q6/ansi/rules.mk
+++ b/keyboards/keychron/q6/ansi/rules.mk
@@ -13,8 +13,6 @@ AUDIO_ENABLE = no # Audio output
DIP_SWITCH_ENABLE = yes
RGB_MATRIX_ENABLE = yes
LTO_ENABLE = yes
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = embedded_flash
# custom matrix setup
CUSTOM_MATRIX = lite
diff --git a/keyboards/keychron/q6/ansi_encoder/ansi_encoder.c b/keyboards/keychron/q6/ansi_encoder/ansi_encoder.c
index 6fbece3678..9c88533620 100644
--- a/keyboards/keychron/q6/ansi_encoder/ansi_encoder.c
+++ b/keyboards/keychron/q6/ansi_encoder/ansi_encoder.c
@@ -20,8 +20,8 @@
// clang-format off
-const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to IS31 manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | R location
* | | G location
diff --git a/keyboards/keychron/q6/ansi_encoder/info.json b/keyboards/keychron/q6/ansi_encoder/info.json
index df3902f44a..fc2da19f73 100644
--- a/keyboards/keychron/q6/ansi_encoder/info.json
+++ b/keyboards/keychron/q6/ansi_encoder/info.json
@@ -9,7 +9,7 @@
"device_version": "1.0.0"
},
"rgb_matrix": {
- "driver": "ckled2001"
+ "driver": "snled27351"
},
"encoder": {
"rotary": [
diff --git a/keyboards/keychron/q6/ansi_encoder/rules.mk b/keyboards/keychron/q6/ansi_encoder/rules.mk
index 77b90f2466..929c4532a0 100644
--- a/keyboards/keychron/q6/ansi_encoder/rules.mk
+++ b/keyboards/keychron/q6/ansi_encoder/rules.mk
@@ -14,8 +14,6 @@ ENCODER_ENABLE = yes # Enable Encoder
DIP_SWITCH_ENABLE = yes
RGB_MATRIX_ENABLE = yes
LTO_ENABLE = yes
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = embedded_flash
# custom matrix setup
CUSTOM_MATRIX = lite
diff --git a/keyboards/keychron/q6/config.h b/keyboards/keychron/q6/config.h
index 060804057f..8b26545724 100644
--- a/keyboards/keychron/q6/config.h
+++ b/keyboards/keychron/q6/config.h
@@ -24,11 +24,11 @@
#define DIODE_DIRECTION ROW2COL
/* RGB Matrix Driver Configuration */
-#define DRIVER_COUNT 2
-#define DRIVER_ADDR_1 0b1110111
-#define DRIVER_ADDR_2 0b1110100
+#define SNLED27351_DRIVER_COUNT 2
+#define DRIVER_ADDR_1 SNLED27351_I2C_ADDRESS_VDDIO
+#define DRIVER_ADDR_2 SNLED27351_I2C_ADDRESS_GND
-#define CKLED2001_CURRENT_TUNE \
+#define SNLED27351_CURRENT_TUNE \
{ 0xA4, 0xA4, 0x52, 0xA4, 0xA4, 0x52, 0xA4, 0xA4, 0x52, 0xA4, 0xA4, 0x52 }
/* DIP switch */
diff --git a/keyboards/keychron/q6/iso/info.json b/keyboards/keychron/q6/iso/info.json
index dfaa20aa93..269605ff8b 100644
--- a/keyboards/keychron/q6/iso/info.json
+++ b/keyboards/keychron/q6/iso/info.json
@@ -9,7 +9,7 @@
"device_version": "1.0.0"
},
"rgb_matrix": {
- "driver": "ckled2001"
+ "driver": "snled27351"
},
"processor": "STM32L432",
"bootloader": "stm32-dfu",
diff --git a/keyboards/keychron/q6/iso/iso.c b/keyboards/keychron/q6/iso/iso.c
index f2081177e9..d2aa010c05 100644
--- a/keyboards/keychron/q6/iso/iso.c
+++ b/keyboards/keychron/q6/iso/iso.c
@@ -20,8 +20,8 @@
// clang-format off
-const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to IS31 manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | R location
* | | G location
diff --git a/keyboards/keychron/q6/iso/rules.mk b/keyboards/keychron/q6/iso/rules.mk
index 6548448302..f16a475f61 100644
--- a/keyboards/keychron/q6/iso/rules.mk
+++ b/keyboards/keychron/q6/iso/rules.mk
@@ -14,8 +14,6 @@ DIP_SWITCH_ENABLE = yes
RGB_MATRIX_ENABLE = yes
RAW_ENABLE = yes
LTO_ENABLE = yes
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = embedded_flash
# custom matrix setup
CUSTOM_MATRIX = lite
diff --git a/keyboards/keychron/q6/iso_encoder/info.json b/keyboards/keychron/q6/iso_encoder/info.json
index 4590616831..e5aa0bd8f5 100644
--- a/keyboards/keychron/q6/iso_encoder/info.json
+++ b/keyboards/keychron/q6/iso_encoder/info.json
@@ -9,7 +9,7 @@
"device_version": "1.0.0"
},
"rgb_matrix": {
- "driver": "ckled2001"
+ "driver": "snled27351"
},
"encoder": {
"rotary": [
diff --git a/keyboards/keychron/q6/iso_encoder/iso_encoder.c b/keyboards/keychron/q6/iso_encoder/iso_encoder.c
index e9a6f6edfc..66e066b839 100644
--- a/keyboards/keychron/q6/iso_encoder/iso_encoder.c
+++ b/keyboards/keychron/q6/iso_encoder/iso_encoder.c
@@ -20,8 +20,8 @@
// clang-format off
-const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to IS31 manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | R location
* | | G location
diff --git a/keyboards/keychron/q6/iso_encoder/rules.mk b/keyboards/keychron/q6/iso_encoder/rules.mk
index 548b0d696b..712c2ef1fd 100644
--- a/keyboards/keychron/q6/iso_encoder/rules.mk
+++ b/keyboards/keychron/q6/iso_encoder/rules.mk
@@ -15,8 +15,6 @@ DIP_SWITCH_ENABLE = yes
RGB_MATRIX_ENABLE = yes
RAW_ENABLE = yes
LTO_ENABLE = yes
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = embedded_flash
# custom matrix setup
CUSTOM_MATRIX = lite
diff --git a/keyboards/keychron/q60/ansi/ansi.c b/keyboards/keychron/q60/ansi/ansi.c
index bb3c84b64a..ac72737146 100644
--- a/keyboards/keychron/q60/ansi/ansi.c
+++ b/keyboards/keychron/q60/ansi/ansi.c
@@ -20,8 +20,8 @@
// clang-format off
-const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to CKLED manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | R location
* | | G location
diff --git a/keyboards/keychron/q60/ansi/info.json b/keyboards/keychron/q60/ansi/info.json
index 95b1c4e472..f5832b2d8f 100644
--- a/keyboards/keychron/q60/ansi/info.json
+++ b/keyboards/keychron/q60/ansi/info.json
@@ -9,7 +9,7 @@
"device_version": "1.0.0"
},
"rgb_matrix": {
- "driver": "ckled2001"
+ "driver": "snled27351"
},
"matrix_pins": {
"cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9"],
diff --git a/keyboards/keychron/q60/ansi/rules.mk b/keyboards/keychron/q60/ansi/rules.mk
index 46f5aef144..468ed6fae3 100644
--- a/keyboards/keychron/q60/ansi/rules.mk
+++ b/keyboards/keychron/q60/ansi/rules.mk
@@ -12,6 +12,3 @@ RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
AUDIO_ENABLE = no # Audio output
DIP_SWITCH_ENABLE = yes
RGB_MATRIX_ENABLE = yes
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = embedded_flash
-
diff --git a/keyboards/keychron/q60/config.h b/keyboards/keychron/q60/config.h
index 779feea4ce..9816ff3479 100644
--- a/keyboards/keychron/q60/config.h
+++ b/keyboards/keychron/q60/config.h
@@ -17,8 +17,8 @@
#pragma once
/* RGB Matrix Driver Configuration */
-#define DRIVER_COUNT 1
-#define DRIVER_ADDR_1 0b1110100
+#define SNLED27351_DRIVER_COUNT 1
+#define DRIVER_ADDR_1 SNLED27351_I2C_ADDRESS_GND
/* Increase I2C speed to 1000 KHz */
#define I2C1_TIMINGR_PRESC 0U
@@ -27,7 +27,7 @@
#define I2C1_TIMINGR_SCLH 15U
#define I2C1_TIMINGR_SCLL 51U
-#define CKLED2001_CURRENT_TUNE \
+#define SNLED27351_CURRENT_TUNE \
{ 0xD8, 0xD8, 0x60, 0xD8, 0xD8, 0x60, 0xD8, 0xD8, 0x60, 0xD8, 0xD8, 0x60 }
/* DIP switch */
diff --git a/keyboards/keychron/q65/ansi_encoder/ansi_encoder.c b/keyboards/keychron/q65/ansi_encoder/ansi_encoder.c
index fffa00194d..8e9b37b806 100644
--- a/keyboards/keychron/q65/ansi_encoder/ansi_encoder.c
+++ b/keyboards/keychron/q65/ansi_encoder/ansi_encoder.c
@@ -18,8 +18,8 @@
#ifdef RGB_MATRIX_ENABLE
-const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to CKLED manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | R location
* | | G location
diff --git a/keyboards/keychron/q65/ansi_encoder/info.json b/keyboards/keychron/q65/ansi_encoder/info.json
index 0f7679945a..a42d7d289c 100644
--- a/keyboards/keychron/q65/ansi_encoder/info.json
+++ b/keyboards/keychron/q65/ansi_encoder/info.json
@@ -9,7 +9,7 @@
"device_version": "1.0.0"
},
"rgb_matrix": {
- "driver": "ckled2001"
+ "driver": "snled27351"
},
"encoder": {
"rotary": [
diff --git a/keyboards/keychron/q65/ansi_encoder/rules.mk b/keyboards/keychron/q65/ansi_encoder/rules.mk
index 7da353fbd1..4c6e5bebf0 100644
--- a/keyboards/keychron/q65/ansi_encoder/rules.mk
+++ b/keyboards/keychron/q65/ansi_encoder/rules.mk
@@ -13,8 +13,6 @@ AUDIO_ENABLE = no # Audio output
ENCODER_ENABLE = yes # Enable Encoder
DIP_SWITCH_ENABLE = yes
RGB_MATRIX_ENABLE = yes
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = embedded_flash
# custom matrix setup
CUSTOM_MATRIX = lite
diff --git a/keyboards/keychron/q65/config.h b/keyboards/keychron/q65/config.h
index 148ea9ad14..43b7ef9b04 100644
--- a/keyboards/keychron/q65/config.h
+++ b/keyboards/keychron/q65/config.h
@@ -26,9 +26,9 @@
{ NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, A2, A3, A4, A5, A6, A7, B0, B1 }
/* RGB Matrix Driver Configuration */
-#define DRIVER_COUNT 2
-#define DRIVER_ADDR_1 0b1110111
-#define DRIVER_ADDR_2 0b1110100
+#define SNLED27351_DRIVER_COUNT 2
+#define DRIVER_ADDR_1 SNLED27351_I2C_ADDRESS_VDDIO
+#define DRIVER_ADDR_2 SNLED27351_I2C_ADDRESS_GND
/* Increase I2C speed to 1000 KHz */
#define I2C1_TIMINGR_PRESC 0U
@@ -37,9 +37,8 @@
#define I2C1_TIMINGR_SCLH 15U
#define I2C1_TIMINGR_SCLL 30U
-/* Scan phase of led driver set as MSKPHASE_9CHANNEL(defined as 0x03 in CKLED2001.h) */
-#define PHASE_CHANNEL MSKPHASE_9CHANNEL
-#define CKLED2001_CURRENT_TUNE \
+#define SNLED27351_PHASE_CHANNEL SNLED27351_MSKPHASE_9CHANNEL
+#define SNLED27351_CURRENT_TUNE \
{ 0xB8, 0xB8, 0x58, 0xB8, 0xB8, 0x58, 0xB8, 0xB8, 0x58, 0xB8, 0xB8, 0x58 }
/* Disable DIP switch in matrix data */
diff --git a/keyboards/keychron/q7/ansi/ansi.c b/keyboards/keychron/q7/ansi/ansi.c
index 3dccb8b660..190c110a77 100644
--- a/keyboards/keychron/q7/ansi/ansi.c
+++ b/keyboards/keychron/q7/ansi/ansi.c
@@ -20,8 +20,8 @@
// clang-format off
-const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to CKLED manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | R location
* | | G location
diff --git a/keyboards/keychron/q7/ansi/info.json b/keyboards/keychron/q7/ansi/info.json
index 2549e329f2..717fe357b7 100644
--- a/keyboards/keychron/q7/ansi/info.json
+++ b/keyboards/keychron/q7/ansi/info.json
@@ -9,7 +9,7 @@
"device_version": "1.0.0"
},
"rgb_matrix": {
- "driver": "ckled2001"
+ "driver": "snled27351"
},
"matrix_pins": {
"cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "A10", "B5"],
diff --git a/keyboards/keychron/q7/ansi/rules.mk b/keyboards/keychron/q7/ansi/rules.mk
index c37beecb9e..cf31e094cb 100644
--- a/keyboards/keychron/q7/ansi/rules.mk
+++ b/keyboards/keychron/q7/ansi/rules.mk
@@ -12,6 +12,3 @@ RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
AUDIO_ENABLE = no # Audio output
DIP_SWITCH_ENABLE = yes
RGB_MATRIX_ENABLE = yes
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = embedded_flash
-
diff --git a/keyboards/keychron/q7/config.h b/keyboards/keychron/q7/config.h
index 0ea9ee5f46..9593196149 100644
--- a/keyboards/keychron/q7/config.h
+++ b/keyboards/keychron/q7/config.h
@@ -17,9 +17,9 @@
#pragma once
/* RGB Matrix Driver Configuration */
-#define DRIVER_COUNT 2
-#define DRIVER_ADDR_1 0b1110111
-#define DRIVER_ADDR_2 0b1110100
+#define SNLED27351_DRIVER_COUNT 2
+#define DRIVER_ADDR_1 SNLED27351_I2C_ADDRESS_VDDIO
+#define DRIVER_ADDR_2 SNLED27351_I2C_ADDRESS_GND
/* Increase I2C speed to 1000 KHz */
#define I2C1_TIMINGR_PRESC 0U
@@ -28,9 +28,8 @@
#define I2C1_TIMINGR_SCLH 15U
#define I2C1_TIMINGR_SCLL 51U
-/* Scan phase of led driver set as MSKPHASE_9CHANNEL(defined as 0x03 in CKLED2001.h) */
-#define SCAN_PHASE_CHANNEL MSKPHASE_9CHANNEL
-#define CKLED2001_CURRENT_TUNE \
+#define SNLED27351_PHASE_CHANNEL SNLED27351_MSKPHASE_9CHANNEL
+#define SNLED27351_CURRENT_TUNE \
{ 0xF8, 0xF8, 0x80, 0xF8, 0xF8, 0x80, 0xF8, 0xF8, 0x80, 0xF8, 0xF8, 0x80 }
/* DIP switch */
diff --git a/keyboards/keychron/q7/iso/info.json b/keyboards/keychron/q7/iso/info.json
index 27262eb4f3..d57c5b17b9 100644
--- a/keyboards/keychron/q7/iso/info.json
+++ b/keyboards/keychron/q7/iso/info.json
@@ -9,7 +9,7 @@
"device_version": "1.0.0"
},
"rgb_matrix": {
- "driver": "ckled2001"
+ "driver": "snled27351"
},
"matrix_pins": {
"cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "A10", "B5"],
diff --git a/keyboards/keychron/q7/iso/iso.c b/keyboards/keychron/q7/iso/iso.c
index 039bd13836..13354b9f0b 100644
--- a/keyboards/keychron/q7/iso/iso.c
+++ b/keyboards/keychron/q7/iso/iso.c
@@ -18,8 +18,8 @@
#ifdef RGB_MATRIX_ENABLE
-const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to CKLED manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | R location
* | | G location
diff --git a/keyboards/keychron/q7/iso/rules.mk b/keyboards/keychron/q7/iso/rules.mk
index c37beecb9e..cf31e094cb 100644
--- a/keyboards/keychron/q7/iso/rules.mk
+++ b/keyboards/keychron/q7/iso/rules.mk
@@ -12,6 +12,3 @@ RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
AUDIO_ENABLE = no # Audio output
DIP_SWITCH_ENABLE = yes
RGB_MATRIX_ENABLE = yes
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = embedded_flash
-
diff --git a/keyboards/keychron/q8/ansi/ansi.c b/keyboards/keychron/q8/ansi/ansi.c
index e9c4edeb3e..3bb10b383d 100644
--- a/keyboards/keychron/q8/ansi/ansi.c
+++ b/keyboards/keychron/q8/ansi/ansi.c
@@ -20,8 +20,8 @@
// clang-format off
-const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to CKLED manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | R location
* | | G location
diff --git a/keyboards/keychron/q8/ansi/info.json b/keyboards/keychron/q8/ansi/info.json
index 7ee5b6c21f..f733004270 100644
--- a/keyboards/keychron/q8/ansi/info.json
+++ b/keyboards/keychron/q8/ansi/info.json
@@ -9,7 +9,7 @@
"device_version": "1.0.0"
},
"rgb_matrix": {
- "driver": "ckled2001"
+ "driver": "snled27351"
},
"matrix_pins": {
"cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"],
diff --git a/keyboards/keychron/q8/ansi/rules.mk b/keyboards/keychron/q8/ansi/rules.mk
index c37beecb9e..cf31e094cb 100644
--- a/keyboards/keychron/q8/ansi/rules.mk
+++ b/keyboards/keychron/q8/ansi/rules.mk
@@ -12,6 +12,3 @@ RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
AUDIO_ENABLE = no # Audio output
DIP_SWITCH_ENABLE = yes
RGB_MATRIX_ENABLE = yes
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = embedded_flash
-
diff --git a/keyboards/keychron/q8/ansi_encoder/ansi_encoder.c b/keyboards/keychron/q8/ansi_encoder/ansi_encoder.c
index e9c4edeb3e..3bb10b383d 100644
--- a/keyboards/keychron/q8/ansi_encoder/ansi_encoder.c
+++ b/keyboards/keychron/q8/ansi_encoder/ansi_encoder.c
@@ -20,8 +20,8 @@
// clang-format off
-const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to CKLED manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | R location
* | | G location
diff --git a/keyboards/keychron/q8/ansi_encoder/info.json b/keyboards/keychron/q8/ansi_encoder/info.json
index a4c3ac77e1..ccf9453d53 100644
--- a/keyboards/keychron/q8/ansi_encoder/info.json
+++ b/keyboards/keychron/q8/ansi_encoder/info.json
@@ -9,7 +9,7 @@
"device_version": "1.0.0"
},
"rgb_matrix": {
- "driver": "ckled2001"
+ "driver": "snled27351"
},
"matrix_pins": {
"cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"],
diff --git a/keyboards/keychron/q8/ansi_encoder/rules.mk b/keyboards/keychron/q8/ansi_encoder/rules.mk
index 5091fe9414..5d77f09971 100644
--- a/keyboards/keychron/q8/ansi_encoder/rules.mk
+++ b/keyboards/keychron/q8/ansi_encoder/rules.mk
@@ -13,6 +13,3 @@ AUDIO_ENABLE = no # Audio output
ENCODER_ENABLE = yes # Enable Encoder
DIP_SWITCH_ENABLE = yes
RGB_MATRIX_ENABLE = yes
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = embedded_flash
-
diff --git a/keyboards/keychron/q8/config.h b/keyboards/keychron/q8/config.h
index e0f6c673a5..7b23723f99 100644
--- a/keyboards/keychron/q8/config.h
+++ b/keyboards/keychron/q8/config.h
@@ -20,9 +20,9 @@
// #define MATRIX_UNSELECT_DRIVE_HIGH
/* RGB Matrix Driver Configuration */
-#define DRIVER_COUNT 2
-#define DRIVER_ADDR_1 0b1110111
-#define DRIVER_ADDR_2 0b1110100
+#define SNLED27351_DRIVER_COUNT 2
+#define DRIVER_ADDR_1 SNLED27351_I2C_ADDRESS_VDDIO
+#define DRIVER_ADDR_2 SNLED27351_I2C_ADDRESS_GND
/* Increase I2C speed to 1000 KHz */
#define I2C1_TIMINGR_PRESC 0U
@@ -31,9 +31,8 @@
#define I2C1_TIMINGR_SCLH 15U
#define I2C1_TIMINGR_SCLL 51U
-/* Scan phase of led driver set as MSKPHASE_9CHANNEL(defined as 0x03 in CKLED2001.h) */
-#define PHASE_CHANNEL MSKPHASE_9CHANNEL
-#define CKLED2001_CURRENT_TUNE \
+#define SNLED27351_PHASE_CHANNEL SNLED27351_MSKPHASE_9CHANNEL
+#define SNLED27351_CURRENT_TUNE \
{ 0xC4, 0xC4, 0x60, 0xC4, 0xC4, 0x60, 0xC4, 0xC4, 0x60, 0xC4, 0xC4, 0x60 }
/* DIP switch */
diff --git a/keyboards/keychron/q8/iso/info.json b/keyboards/keychron/q8/iso/info.json
index 03a6cd1fdd..28d586984e 100644
--- a/keyboards/keychron/q8/iso/info.json
+++ b/keyboards/keychron/q8/iso/info.json
@@ -9,7 +9,7 @@
"device_version": "1.0.0"
},
"rgb_matrix": {
- "driver": "ckled2001"
+ "driver": "snled27351"
},
"matrix_pins": {
"cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"],
diff --git a/keyboards/keychron/q8/iso/iso.c b/keyboards/keychron/q8/iso/iso.c
index 205989383e..dbcefd76c0 100644
--- a/keyboards/keychron/q8/iso/iso.c
+++ b/keyboards/keychron/q8/iso/iso.c
@@ -20,8 +20,8 @@
// clang-format off
-const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to CKLED manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | R location
* | | G location
diff --git a/keyboards/keychron/q8/iso/rules.mk b/keyboards/keychron/q8/iso/rules.mk
index c37beecb9e..cf31e094cb 100644
--- a/keyboards/keychron/q8/iso/rules.mk
+++ b/keyboards/keychron/q8/iso/rules.mk
@@ -12,6 +12,3 @@ RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
AUDIO_ENABLE = no # Audio output
DIP_SWITCH_ENABLE = yes
RGB_MATRIX_ENABLE = yes
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = embedded_flash
-
diff --git a/keyboards/keychron/q8/iso_encoder/info.json b/keyboards/keychron/q8/iso_encoder/info.json
index eb9dc22503..0d96f3f193 100644
--- a/keyboards/keychron/q8/iso_encoder/info.json
+++ b/keyboards/keychron/q8/iso_encoder/info.json
@@ -9,7 +9,7 @@
"device_version": "1.0.0"
},
"rgb_matrix": {
- "driver": "ckled2001"
+ "driver": "snled27351"
},
"matrix_pins": {
"cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"],
diff --git a/keyboards/keychron/q8/iso_encoder/iso_encoder.c b/keyboards/keychron/q8/iso_encoder/iso_encoder.c
index 205989383e..dbcefd76c0 100644
--- a/keyboards/keychron/q8/iso_encoder/iso_encoder.c
+++ b/keyboards/keychron/q8/iso_encoder/iso_encoder.c
@@ -20,8 +20,8 @@
// clang-format off
-const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to CKLED manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | R location
* | | G location
diff --git a/keyboards/keychron/q8/iso_encoder/rules.mk b/keyboards/keychron/q8/iso_encoder/rules.mk
index 5091fe9414..5d77f09971 100644
--- a/keyboards/keychron/q8/iso_encoder/rules.mk
+++ b/keyboards/keychron/q8/iso_encoder/rules.mk
@@ -13,6 +13,3 @@ AUDIO_ENABLE = no # Audio output
ENCODER_ENABLE = yes # Enable Encoder
DIP_SWITCH_ENABLE = yes
RGB_MATRIX_ENABLE = yes
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = embedded_flash
-
diff --git a/keyboards/keychron/q9/ansi/ansi.c b/keyboards/keychron/q9/ansi/ansi.c
index b98149a5f8..9178c8dcc7 100644
--- a/keyboards/keychron/q9/ansi/ansi.c
+++ b/keyboards/keychron/q9/ansi/ansi.c
@@ -20,8 +20,8 @@
// clang-format off
-const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to CKLED manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | R location
* | | G location
diff --git a/keyboards/keychron/q9/ansi/info.json b/keyboards/keychron/q9/ansi/info.json
index 952d3158c8..ccb29a749b 100644
--- a/keyboards/keychron/q9/ansi/info.json
+++ b/keyboards/keychron/q9/ansi/info.json
@@ -9,7 +9,7 @@
"device_version": "1.0.0"
},
"rgb_matrix": {
- "driver": "ckled2001"
+ "driver": "snled27351"
},
"matrix_pins": {
"cols": ["A10", "A9", "A8", "B1", "B0", "A7", "A6", "A5", "A4", "A3", "A2", "A1", "A0", "C15", "C14"],
diff --git a/keyboards/keychron/q9/ansi/rules.mk b/keyboards/keychron/q9/ansi/rules.mk
index c37beecb9e..cf31e094cb 100644
--- a/keyboards/keychron/q9/ansi/rules.mk
+++ b/keyboards/keychron/q9/ansi/rules.mk
@@ -12,6 +12,3 @@ RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
AUDIO_ENABLE = no # Audio output
DIP_SWITCH_ENABLE = yes
RGB_MATRIX_ENABLE = yes
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = embedded_flash
-
diff --git a/keyboards/keychron/q9/ansi_encoder/ansi_encoder.c b/keyboards/keychron/q9/ansi_encoder/ansi_encoder.c
index de0eda1c02..58d66e0473 100644
--- a/keyboards/keychron/q9/ansi_encoder/ansi_encoder.c
+++ b/keyboards/keychron/q9/ansi_encoder/ansi_encoder.c
@@ -20,8 +20,8 @@
// clang-format off
-const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to CKLED manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | R location
* | | G location
diff --git a/keyboards/keychron/q9/ansi_encoder/info.json b/keyboards/keychron/q9/ansi_encoder/info.json
index 4fd5352638..3826a1b768 100644
--- a/keyboards/keychron/q9/ansi_encoder/info.json
+++ b/keyboards/keychron/q9/ansi_encoder/info.json
@@ -9,7 +9,7 @@
"device_version": "1.0.0"
},
"rgb_matrix": {
- "driver": "ckled2001"
+ "driver": "snled27351"
},
"matrix_pins": {
"cols": ["A10", "A9", "A8", "B1", "B0", "A7", "A6", "A5", "A4", "A3", "A2", "A1", "A0", "C15", "C14"],
diff --git a/keyboards/keychron/q9/ansi_encoder/rules.mk b/keyboards/keychron/q9/ansi_encoder/rules.mk
index 911c497043..ed8fd33800 100644
--- a/keyboards/keychron/q9/ansi_encoder/rules.mk
+++ b/keyboards/keychron/q9/ansi_encoder/rules.mk
@@ -14,6 +14,3 @@ ENCODER_ENABLE = yes # Enable Encoder
ENCODER_MAP_ENBALE = no
DIP_SWITCH_ENABLE = yes
RGB_MATRIX_ENABLE = yes
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = embedded_flash
-
diff --git a/keyboards/keychron/q9/config.h b/keyboards/keychron/q9/config.h
index 742dde3ff2..e423d962e0 100644
--- a/keyboards/keychron/q9/config.h
+++ b/keyboards/keychron/q9/config.h
@@ -23,8 +23,8 @@
#define DIP_SWITCH_MATRIX_GRID { { 3, 4 } }
/* RGB Matrix Driver Configuration */
-#define DRIVER_COUNT 1
-#define DRIVER_ADDR_1 0b1110100
+#define SNLED27351_DRIVER_COUNT 1
+#define DRIVER_ADDR_1 SNLED27351_I2C_ADDRESS_GND
/* Increase I2C speed to 1000 KHz */
#define I2C1_TIMINGR_PRESC 0U
@@ -33,7 +33,7 @@
#define I2C1_TIMINGR_SCLH 15U
#define I2C1_TIMINGR_SCLL 51U
-#define CKLED2001_CURRENT_TUNE \
+#define SNLED27351_CURRENT_TUNE \
{ 0xF8, 0xF8, 0x70, 0xF8, 0xF8, 0x70, 0xF8, 0xF8, 0x70, 0xF8, 0xF8, 0x70 }
/* turn off effects when suspended */
diff --git a/keyboards/keychron/q9/iso/info.json b/keyboards/keychron/q9/iso/info.json
index 3e9a7690c1..a9586d6d91 100644
--- a/keyboards/keychron/q9/iso/info.json
+++ b/keyboards/keychron/q9/iso/info.json
@@ -9,7 +9,7 @@
"device_version": "1.0.0"
},
"rgb_matrix": {
- "driver": "ckled2001"
+ "driver": "snled27351"
},
"matrix_pins": {
"cols": ["A10", "A9", "A8", "B1", "B0", "A7", "A6", "A5", "A4", "A3", "A2", "A1", "A0", "C15", "C14"],
diff --git a/keyboards/keychron/q9/iso/iso.c b/keyboards/keychron/q9/iso/iso.c
index 0e258e8c63..1917b61f37 100644
--- a/keyboards/keychron/q9/iso/iso.c
+++ b/keyboards/keychron/q9/iso/iso.c
@@ -20,8 +20,8 @@
// clang-format off
-const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to CKLED manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | R location
* | | G location
diff --git a/keyboards/keychron/q9/iso/rules.mk b/keyboards/keychron/q9/iso/rules.mk
index c37beecb9e..cf31e094cb 100644
--- a/keyboards/keychron/q9/iso/rules.mk
+++ b/keyboards/keychron/q9/iso/rules.mk
@@ -12,6 +12,3 @@ RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
AUDIO_ENABLE = no # Audio output
DIP_SWITCH_ENABLE = yes
RGB_MATRIX_ENABLE = yes
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = embedded_flash
-
diff --git a/keyboards/keychron/q9/iso_encoder/info.json b/keyboards/keychron/q9/iso_encoder/info.json
index ecf944744d..1c74566da1 100644
--- a/keyboards/keychron/q9/iso_encoder/info.json
+++ b/keyboards/keychron/q9/iso_encoder/info.json
@@ -9,7 +9,7 @@
"device_version": "1.0.0"
},
"rgb_matrix": {
- "driver": "ckled2001"
+ "driver": "snled27351"
},
"matrix_pins": {
"cols": ["A10", "A9", "A8", "B1", "B0", "A7", "A6", "A5", "A4", "A3", "A2", "A1", "A0", "C15", "C14"],
diff --git a/keyboards/keychron/q9/iso_encoder/iso_encoder.c b/keyboards/keychron/q9/iso_encoder/iso_encoder.c
index 0804f33671..3a161fe9d7 100644
--- a/keyboards/keychron/q9/iso_encoder/iso_encoder.c
+++ b/keyboards/keychron/q9/iso_encoder/iso_encoder.c
@@ -20,8 +20,8 @@
// clang-format off
-const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to CKLED manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | R location
* | | G location
diff --git a/keyboards/keychron/q9/iso_encoder/rules.mk b/keyboards/keychron/q9/iso_encoder/rules.mk
index 911c497043..ed8fd33800 100644
--- a/keyboards/keychron/q9/iso_encoder/rules.mk
+++ b/keyboards/keychron/q9/iso_encoder/rules.mk
@@ -14,6 +14,3 @@ ENCODER_ENABLE = yes # Enable Encoder
ENCODER_MAP_ENBALE = no
DIP_SWITCH_ENABLE = yes
RGB_MATRIX_ENABLE = yes
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = embedded_flash
-
diff --git a/keyboards/keychron/q9_plus/ansi_encoder/ansi_encoder.c b/keyboards/keychron/q9_plus/ansi_encoder/ansi_encoder.c
index c0b4b3a32d..d264334fa0 100755
--- a/keyboards/keychron/q9_plus/ansi_encoder/ansi_encoder.c
+++ b/keyboards/keychron/q9_plus/ansi_encoder/ansi_encoder.c
@@ -17,8 +17,8 @@
#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
-const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to CKLED2001 manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | R location
* | | G location
diff --git a/keyboards/keychron/q9_plus/config.h b/keyboards/keychron/q9_plus/config.h
index a8cba07e90..8416de0d6a 100755
--- a/keyboards/keychron/q9_plus/config.h
+++ b/keyboards/keychron/q9_plus/config.h
@@ -23,8 +23,8 @@
#define DIP_SWITCH_MATRIX_GRID {{ 3, 4 }}
/* RGB Matrix Driver Configuration */
-#define DRIVER_COUNT 1
-#define DRIVER_ADDR_1 0b1110100
+#define SNLED27351_DRIVER_COUNT 1
+#define DRIVER_ADDR_1 SNLED27351_I2C_ADDRESS_GND
/* Increase I2C speed to 1000 KHz */
#define I2C1_TIMINGR_PRESC 0U
@@ -34,7 +34,7 @@
#define I2C1_TIMINGR_SCLL 51U
/* Set LED driver current */
-#define CKLED2001_CURRENT_TUNE \
+#define SNLED27351_CURRENT_TUNE \
{ 0xF8, 0xF8, 0x70, 0xF8, 0xF8, 0x70, 0xF8, 0xF8, 0x70, 0xF8, 0xF8, 0x70 }
/* turn off effects when suspended */
diff --git a/keyboards/keychron/q9_plus/info.json b/keyboards/keychron/q9_plus/info.json
index c56650cb1d..9f8703de37 100755
--- a/keyboards/keychron/q9_plus/info.json
+++ b/keyboards/keychron/q9_plus/info.json
@@ -96,7 +96,7 @@
}
},
"rgb_matrix": {
- "driver": "ckled2001",
+ "driver": "snled27351",
"animations": {
"breathing": true,
"band_spiral_val": true,
diff --git a/keyboards/keychron/s1/ansi/rgb/config.h b/keyboards/keychron/s1/ansi/rgb/config.h
index 9cf8df3b82..21569bd07c 100644
--- a/keyboards/keychron/s1/ansi/rgb/config.h
+++ b/keyboards/keychron/s1/ansi/rgb/config.h
@@ -17,16 +17,15 @@
#pragma once
/* RGB Matrix Driver Configuration */
-#define DRIVER_COUNT 2
-#define DRIVER_ADDR_1 0b1110111
-#define DRIVER_ADDR_2 0b1110100
+#define SNLED27351_DRIVER_COUNT 2
+#define DRIVER_ADDR_1 SNLED27351_I2C_ADDRESS_VDDIO
+#define DRIVER_ADDR_2 SNLED27351_I2C_ADDRESS_GND
#define DRIVER_1_LED_TOTAL 46
#define DRIVER_2_LED_TOTAL 38
#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
-/* Scan phase of led driver set as MSKPHASE_9CHANNEL(defined as 0x03 in CKLED2001.h) */
-#define PHASE_CHANNEL MSKPHASE_9CHANNEL
-#define CKLED2001_CURRENT_TUNE \
+#define SNLED27351_PHASE_CHANNEL SNLED27351_MSKPHASE_9CHANNEL
+#define SNLED27351_CURRENT_TUNE \
{ 0xA0, 0xA0, 0x48, 0xA0, 0xA0, 0x48, 0xA0, 0xA0, 0x48, 0xA0, 0xA0, 0x48 }
/* Disable RGB lighting when PC is in suspend */
diff --git a/keyboards/keychron/s1/ansi/rgb/info.json b/keyboards/keychron/s1/ansi/rgb/info.json
index 3bef5f343c..6b49cb18e0 100644
--- a/keyboards/keychron/s1/ansi/rgb/info.json
+++ b/keyboards/keychron/s1/ansi/rgb/info.json
@@ -9,7 +9,7 @@
"device_version": "1.0.0"
},
"rgb_matrix": {
- "driver": "ckled2001"
+ "driver": "snled27351"
},
"matrix_pins": {
"cols": ["A10", "A9", "A8", "B1", "B0", "A7", "A6", "A5", "A4", "A3", "A2", "A1", "A0", "C15", "C14"],
diff --git a/keyboards/keychron/s1/ansi/rgb/rgb.c b/keyboards/keychron/s1/ansi/rgb/rgb.c
index a0a2d25f94..ca39b0c796 100644
--- a/keyboards/keychron/s1/ansi/rgb/rgb.c
+++ b/keyboards/keychron/s1/ansi/rgb/rgb.c
@@ -20,8 +20,8 @@
// clang-format off
-const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to CKLED2001 manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | R location
* | | G location
diff --git a/keyboards/keychron/s1/ansi/rgb/rules.mk b/keyboards/keychron/s1/ansi/rgb/rules.mk
index c37beecb9e..cf31e094cb 100644
--- a/keyboards/keychron/s1/ansi/rgb/rules.mk
+++ b/keyboards/keychron/s1/ansi/rgb/rules.mk
@@ -12,6 +12,3 @@ RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
AUDIO_ENABLE = no # Audio output
DIP_SWITCH_ENABLE = yes
RGB_MATRIX_ENABLE = yes
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = embedded_flash
-
diff --git a/keyboards/keychron/s1/ansi/white/config.h b/keyboards/keychron/s1/ansi/white/config.h
index 65a79726ca..0ee5470f69 100644
--- a/keyboards/keychron/s1/ansi/white/config.h
+++ b/keyboards/keychron/s1/ansi/white/config.h
@@ -17,14 +17,13 @@
#pragma once
/* LED Matrix Driver Configuration */
-#define DRIVER_COUNT 1
-#define DRIVER_ADDR_1 0b1110100
+#define SNLED27351_DRIVER_COUNT 1
+#define DRIVER_ADDR_1 SNLED27351_I2C_ADDRESS_GND
#define DRIVER_1_LED_TOTAL 84
#define LED_MATRIX_LED_COUNT DRIVER_1_LED_TOTAL
-/* Scan phase of led driver set as MSKPHASE_9CHANNEL(defined as 0x03 in CKLED2001.h) */
-#define PHASE_CHANNEL MSKPHASE_6CHANNEL
-#define CKLED2001_CURRENT_TUNE \
+#define SNLED27351_PHASE_CHANNEL SNLED27351_MSKPHASE_6CHANNEL
+#define SNLED27351_CURRENT_TUNE \
{ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80 } // 250mA
// { 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40 } // 127mA
diff --git a/keyboards/keychron/s1/ansi/white/info.json b/keyboards/keychron/s1/ansi/white/info.json
index ff0a6b69cb..bcd64eea59 100644
--- a/keyboards/keychron/s1/ansi/white/info.json
+++ b/keyboards/keychron/s1/ansi/white/info.json
@@ -9,7 +9,7 @@
"device_version": "1.0.0"
},
"led_matrix": {
- "driver": "ckled2001"
+ "driver": "snled27351"
},
"matrix_pins": {
"cols": ["A10", "A9", "A8", "B1", "B0", "A7", "A6", "A5", "A4", "A3", "A2", "A1", "A0", "C15", "C14"],
diff --git a/keyboards/keychron/s1/ansi/white/rules.mk b/keyboards/keychron/s1/ansi/white/rules.mk
index cb70ced917..afcbe18d62 100644
--- a/keyboards/keychron/s1/ansi/white/rules.mk
+++ b/keyboards/keychron/s1/ansi/white/rules.mk
@@ -12,6 +12,3 @@ RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
AUDIO_ENABLE = no # Audio output
DIP_SWITCH_ENABLE = yes
LED_MATRIX_ENABLE = yes
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = embedded_flash
-
diff --git a/keyboards/keychron/s1/ansi/white/white.c b/keyboards/keychron/s1/ansi/white/white.c
index e41ba06401..b3a49ae9eb 100644
--- a/keyboards/keychron/s1/ansi/white/white.c
+++ b/keyboards/keychron/s1/ansi/white/white.c
@@ -20,8 +20,8 @@
// clang-format off
-const ckled2001_led PROGMEM g_ckled2001_leds[LED_MATRIX_LED_COUNT] = {
-/* Refer to CKLED2001 manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[LED_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | LED address
* | | */
diff --git a/keyboards/keychron/v1/ansi/ansi.c b/keyboards/keychron/v1/ansi/ansi.c
index dc488d1b73..ed8a6ed1af 100644
--- a/keyboards/keychron/v1/ansi/ansi.c
+++ b/keyboards/keychron/v1/ansi/ansi.c
@@ -20,8 +20,8 @@
// clang-format off
-const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to IS31 manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | R location
* | | G location
diff --git a/keyboards/keychron/v1/ansi/config.h b/keyboards/keychron/v1/ansi/config.h
index 143042076d..5d10cae886 100644
--- a/keyboards/keychron/v1/ansi/config.h
+++ b/keyboards/keychron/v1/ansi/config.h
@@ -21,7 +21,7 @@
#define DRIVER_2_LED_TOTAL 37
#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
-#define CKLED2001_CURRENT_TUNE \
+#define SNLED27351_CURRENT_TUNE \
{ 0xA6, 0xA6, 0x50, 0xA6, 0xA6, 0x50, 0xA6, 0xA6, 0x50, 0xA6, 0xA6, 0x50 }
/* Enable caps-lock LED */
diff --git a/keyboards/keychron/v1/ansi/info.json b/keyboards/keychron/v1/ansi/info.json
index f4c526bfdc..34fdd6ac31 100644
--- a/keyboards/keychron/v1/ansi/info.json
+++ b/keyboards/keychron/v1/ansi/info.json
@@ -9,7 +9,7 @@
"device_version": "1.0.0"
},
"rgb_matrix": {
- "driver": "ckled2001"
+ "driver": "snled27351"
},
"processor": "STM32L432",
"bootloader": "stm32-dfu",
diff --git a/keyboards/keychron/v1/ansi/rules.mk b/keyboards/keychron/v1/ansi/rules.mk
index e859eb9c34..465dfa9348 100644
--- a/keyboards/keychron/v1/ansi/rules.mk
+++ b/keyboards/keychron/v1/ansi/rules.mk
@@ -12,8 +12,6 @@ RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
AUDIO_ENABLE = no # Audio output
DIP_SWITCH_ENABLE = yes
RGB_MATRIX_ENABLE = yes
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = embedded_flash
# custom matrix setup
CUSTOM_MATRIX = lite
diff --git a/keyboards/keychron/v1/ansi_encoder/ansi_encoder.c b/keyboards/keychron/v1/ansi_encoder/ansi_encoder.c
index dc488d1b73..ed8a6ed1af 100644
--- a/keyboards/keychron/v1/ansi_encoder/ansi_encoder.c
+++ b/keyboards/keychron/v1/ansi_encoder/ansi_encoder.c
@@ -20,8 +20,8 @@
// clang-format off
-const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to IS31 manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | R location
* | | G location
diff --git a/keyboards/keychron/v1/ansi_encoder/config.h b/keyboards/keychron/v1/ansi_encoder/config.h
index c32e4d104a..ea0733eeaf 100644
--- a/keyboards/keychron/v1/ansi_encoder/config.h
+++ b/keyboards/keychron/v1/ansi_encoder/config.h
@@ -21,7 +21,7 @@
#define DRIVER_2_LED_TOTAL 37
#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
-#define CKLED2001_CURRENT_TUNE \
+#define SNLED27351_CURRENT_TUNE \
{ 0xA6, 0xA6, 0x50, 0xA6, 0xA6, 0x50, 0xA6, 0xA6, 0x50, 0xA6, 0xA6, 0x50 }
/* Encoder Configuration */
diff --git a/keyboards/keychron/v1/ansi_encoder/info.json b/keyboards/keychron/v1/ansi_encoder/info.json
index 9beffb9f6a..43e07609ae 100644
--- a/keyboards/keychron/v1/ansi_encoder/info.json
+++ b/keyboards/keychron/v1/ansi_encoder/info.json
@@ -9,7 +9,7 @@
"device_version": "1.0.0"
},
"rgb_matrix": {
- "driver": "ckled2001"
+ "driver": "snled27351"
},
"encoder": {
"rotary": [
diff --git a/keyboards/keychron/v1/ansi_encoder/rules.mk b/keyboards/keychron/v1/ansi_encoder/rules.mk
index 7da353fbd1..4c6e5bebf0 100644
--- a/keyboards/keychron/v1/ansi_encoder/rules.mk
+++ b/keyboards/keychron/v1/ansi_encoder/rules.mk
@@ -13,8 +13,6 @@ AUDIO_ENABLE = no # Audio output
ENCODER_ENABLE = yes # Enable Encoder
DIP_SWITCH_ENABLE = yes
RGB_MATRIX_ENABLE = yes
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = embedded_flash
# custom matrix setup
CUSTOM_MATRIX = lite
diff --git a/keyboards/keychron/v1/config.h b/keyboards/keychron/v1/config.h
index e5b82a143d..e08a27f1c3 100644
--- a/keyboards/keychron/v1/config.h
+++ b/keyboards/keychron/v1/config.h
@@ -32,9 +32,9 @@
#define DIP_SWITCH_MATRIX_GRID { {5,4} }
/* RGB Matrix Driver Configuration */
-#define DRIVER_COUNT 2
-#define DRIVER_ADDR_1 0b1110111
-#define DRIVER_ADDR_2 0b1110100
+#define SNLED27351_DRIVER_COUNT 2
+#define DRIVER_ADDR_1 SNLED27351_I2C_ADDRESS_VDDIO
+#define DRIVER_ADDR_2 SNLED27351_I2C_ADDRESS_GND
/* Increase I2C speed to 1000 KHz */
#define I2C1_TIMINGR_PRESC 0U
@@ -43,8 +43,7 @@
#define I2C1_TIMINGR_SCLH 15U
#define I2C1_TIMINGR_SCLL 51U
-/* Scan phase of led driver set as MSKPHASE_9CHANNEL(defined as 0x03 in CKLED2001.h) */
-#define PHASE_CHANNEL MSKPHASE_9CHANNEL
+#define SNLED27351_PHASE_CHANNEL SNLED27351_MSKPHASE_9CHANNEL
/* turn off effects when suspended */
#define RGB_DISABLE_WHEN_USB_SUSPENDED
diff --git a/keyboards/keychron/v1/iso/config.h b/keyboards/keychron/v1/iso/config.h
index 13ebd695f3..acb35ac7ac 100644
--- a/keyboards/keychron/v1/iso/config.h
+++ b/keyboards/keychron/v1/iso/config.h
@@ -21,7 +21,7 @@
#define DRIVER_2_LED_TOTAL 38
#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
-#define CKLED2001_CURRENT_TUNE \
+#define SNLED27351_CURRENT_TUNE \
{ 0xA6, 0xA6, 0x50, 0xA6, 0xA6, 0x50, 0xA6, 0xA6, 0x50, 0xA6, 0xA6, 0x50 }
/* Enable caps-lock LED */
diff --git a/keyboards/keychron/v1/iso/info.json b/keyboards/keychron/v1/iso/info.json
index 5a4c74234c..6dbf50a931 100644
--- a/keyboards/keychron/v1/iso/info.json
+++ b/keyboards/keychron/v1/iso/info.json
@@ -9,7 +9,7 @@
"device_version": "1.0.0"
},
"rgb_matrix": {
- "driver": "ckled2001"
+ "driver": "snled27351"
},
"processor": "STM32L432",
"bootloader": "stm32-dfu",
diff --git a/keyboards/keychron/v1/iso/iso.c b/keyboards/keychron/v1/iso/iso.c
index 1d9ef76997..00909c85e3 100644
--- a/keyboards/keychron/v1/iso/iso.c
+++ b/keyboards/keychron/v1/iso/iso.c
@@ -20,8 +20,8 @@
// clang-format off
-const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to IS31 manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | R location
* | | G location
diff --git a/keyboards/keychron/v1/iso/rules.mk b/keyboards/keychron/v1/iso/rules.mk
index e859eb9c34..465dfa9348 100644
--- a/keyboards/keychron/v1/iso/rules.mk
+++ b/keyboards/keychron/v1/iso/rules.mk
@@ -12,8 +12,6 @@ RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
AUDIO_ENABLE = no # Audio output
DIP_SWITCH_ENABLE = yes
RGB_MATRIX_ENABLE = yes
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = embedded_flash
# custom matrix setup
CUSTOM_MATRIX = lite
diff --git a/keyboards/keychron/v1/iso_encoder/config.h b/keyboards/keychron/v1/iso_encoder/config.h
index fd231aa98a..1a928cd9b7 100644
--- a/keyboards/keychron/v1/iso_encoder/config.h
+++ b/keyboards/keychron/v1/iso_encoder/config.h
@@ -21,7 +21,7 @@
#define DRIVER_2_LED_TOTAL 38
#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
-#define CKLED2001_CURRENT_TUNE \
+#define SNLED27351_CURRENT_TUNE \
{ 0xA6, 0xA6, 0x50, 0xA6, 0xA6, 0x50, 0xA6, 0xA6, 0x50, 0xA6, 0xA6, 0x50 }
/* Encoder Configuration */
diff --git a/keyboards/keychron/v1/iso_encoder/info.json b/keyboards/keychron/v1/iso_encoder/info.json
index 106b43b5e7..1f009ac0c7 100644
--- a/keyboards/keychron/v1/iso_encoder/info.json
+++ b/keyboards/keychron/v1/iso_encoder/info.json
@@ -9,7 +9,7 @@
"device_version": "1.0.0"
},
"rgb_matrix": {
- "driver": "ckled2001"
+ "driver": "snled27351"
},
"encoder": {
"rotary": [
diff --git a/keyboards/keychron/v1/iso_encoder/iso_encoder.c b/keyboards/keychron/v1/iso_encoder/iso_encoder.c
index 1d9ef76997..00909c85e3 100644
--- a/keyboards/keychron/v1/iso_encoder/iso_encoder.c
+++ b/keyboards/keychron/v1/iso_encoder/iso_encoder.c
@@ -20,8 +20,8 @@
// clang-format off
-const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to IS31 manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | R location
* | | G location
diff --git a/keyboards/keychron/v1/iso_encoder/rules.mk b/keyboards/keychron/v1/iso_encoder/rules.mk
index 7da353fbd1..4c6e5bebf0 100644
--- a/keyboards/keychron/v1/iso_encoder/rules.mk
+++ b/keyboards/keychron/v1/iso_encoder/rules.mk
@@ -13,8 +13,6 @@ AUDIO_ENABLE = no # Audio output
ENCODER_ENABLE = yes # Enable Encoder
DIP_SWITCH_ENABLE = yes
RGB_MATRIX_ENABLE = yes
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = embedded_flash
# custom matrix setup
CUSTOM_MATRIX = lite
diff --git a/keyboards/keychron/v1/jis/config.h b/keyboards/keychron/v1/jis/config.h
index 300beba867..ef778528fe 100644
--- a/keyboards/keychron/v1/jis/config.h
+++ b/keyboards/keychron/v1/jis/config.h
@@ -16,17 +16,12 @@
#pragma once
-/* RGB Matrix Driver Configuration */
-#define DRIVER_COUNT 2
-#define DRIVER_ADDR_1 0b1110111
-#define DRIVER_ADDR_2 0b1110100
-
/* RGB Matrix Configuration */
#define DRIVER_1_LED_TOTAL 46
#define DRIVER_2_LED_TOTAL 40
#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
-#define CKLED2001_CURRENT_TUNE \
+#define SNLED27351_CURRENT_TUNE \
{ 0xA0, 0xA0, 0x4D, 0xA0, 0xA0, 0x4D, 0xA0, 0xA0, 0x4D, 0xA0, 0xA0, 0x4D }
/* Enable caps-lock LED */
diff --git a/keyboards/keychron/v1/jis/info.json b/keyboards/keychron/v1/jis/info.json
index 16365ccd9e..28425b5b50 100644
--- a/keyboards/keychron/v1/jis/info.json
+++ b/keyboards/keychron/v1/jis/info.json
@@ -9,7 +9,7 @@
"device_version": "1.0.0"
},
"rgb_matrix": {
- "driver": "ckled2001"
+ "driver": "snled27351"
},
"processor": "STM32L432",
"bootloader": "stm32-dfu",
diff --git a/keyboards/keychron/v1/jis/jis.c b/keyboards/keychron/v1/jis/jis.c
index 7f2f02bfa5..6bc647656d 100644
--- a/keyboards/keychron/v1/jis/jis.c
+++ b/keyboards/keychron/v1/jis/jis.c
@@ -20,8 +20,8 @@
// clang-format off
-const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to IS31 manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | R location
* | | G location
diff --git a/keyboards/keychron/v1/jis/rules.mk b/keyboards/keychron/v1/jis/rules.mk
index e859eb9c34..465dfa9348 100644
--- a/keyboards/keychron/v1/jis/rules.mk
+++ b/keyboards/keychron/v1/jis/rules.mk
@@ -12,8 +12,6 @@ RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
AUDIO_ENABLE = no # Audio output
DIP_SWITCH_ENABLE = yes
RGB_MATRIX_ENABLE = yes
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = embedded_flash
# custom matrix setup
CUSTOM_MATRIX = lite
diff --git a/keyboards/keychron/v1/jis_encoder/config.h b/keyboards/keychron/v1/jis_encoder/config.h
index 93d2a72d98..25db44a84c 100644
--- a/keyboards/keychron/v1/jis_encoder/config.h
+++ b/keyboards/keychron/v1/jis_encoder/config.h
@@ -21,7 +21,7 @@
#define DRIVER_2_LED_TOTAL 40
#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
-#define CKLED2001_CURRENT_TUNE \
+#define SNLED27351_CURRENT_TUNE \
{ 0xA0, 0xA0, 0x4D, 0xA0, 0xA0, 0x4D, 0xA0, 0xA0, 0x4D, 0xA0, 0xA0, 0x4D }
/* Encoder Configuration */
diff --git a/keyboards/keychron/v1/jis_encoder/info.json b/keyboards/keychron/v1/jis_encoder/info.json
index 702e579758..018f154537 100644
--- a/keyboards/keychron/v1/jis_encoder/info.json
+++ b/keyboards/keychron/v1/jis_encoder/info.json
@@ -9,7 +9,7 @@
"device_version": "1.0.0"
},
"rgb_matrix": {
- "driver": "ckled2001"
+ "driver": "snled27351"
},
"encoder": {
"rotary": [
diff --git a/keyboards/keychron/v1/jis_encoder/jis_encoder.c b/keyboards/keychron/v1/jis_encoder/jis_encoder.c
index 7f2f02bfa5..6bc647656d 100644
--- a/keyboards/keychron/v1/jis_encoder/jis_encoder.c
+++ b/keyboards/keychron/v1/jis_encoder/jis_encoder.c
@@ -20,8 +20,8 @@
// clang-format off
-const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to IS31 manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | R location
* | | G location
diff --git a/keyboards/keychron/v1/jis_encoder/rules.mk b/keyboards/keychron/v1/jis_encoder/rules.mk
index 7da353fbd1..4c6e5bebf0 100644
--- a/keyboards/keychron/v1/jis_encoder/rules.mk
+++ b/keyboards/keychron/v1/jis_encoder/rules.mk
@@ -13,8 +13,6 @@ AUDIO_ENABLE = no # Audio output
ENCODER_ENABLE = yes # Enable Encoder
DIP_SWITCH_ENABLE = yes
RGB_MATRIX_ENABLE = yes
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = embedded_flash
# custom matrix setup
CUSTOM_MATRIX = lite
diff --git a/keyboards/keychron/v10/ansi_encoder/ansi_encoder.c b/keyboards/keychron/v10/ansi_encoder/ansi_encoder.c
index bada8af6e9..8b787aad18 100644
--- a/keyboards/keychron/v10/ansi_encoder/ansi_encoder.c
+++ b/keyboards/keychron/v10/ansi_encoder/ansi_encoder.c
@@ -20,8 +20,8 @@
// clang-format off
-const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to IS31 manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | R location
* | | G location
diff --git a/keyboards/keychron/v10/ansi_encoder/info.json b/keyboards/keychron/v10/ansi_encoder/info.json
index 2a7dc307cb..a416601d02 100644
--- a/keyboards/keychron/v10/ansi_encoder/info.json
+++ b/keyboards/keychron/v10/ansi_encoder/info.json
@@ -9,7 +9,7 @@
"device_version": "1.0.0"
},
"rgb_matrix": {
- "driver": "ckled2001"
+ "driver": "snled27351"
},
"encoder": {
"rotary": [
diff --git a/keyboards/keychron/v10/ansi_encoder/rules.mk b/keyboards/keychron/v10/ansi_encoder/rules.mk
index 7da353fbd1..4c6e5bebf0 100644
--- a/keyboards/keychron/v10/ansi_encoder/rules.mk
+++ b/keyboards/keychron/v10/ansi_encoder/rules.mk
@@ -13,8 +13,6 @@ AUDIO_ENABLE = no # Audio output
ENCODER_ENABLE = yes # Enable Encoder
DIP_SWITCH_ENABLE = yes
RGB_MATRIX_ENABLE = yes
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = embedded_flash
# custom matrix setup
CUSTOM_MATRIX = lite
diff --git a/keyboards/keychron/v10/config.h b/keyboards/keychron/v10/config.h
index 9bc5d0f559..e711b753dd 100644
--- a/keyboards/keychron/v10/config.h
+++ b/keyboards/keychron/v10/config.h
@@ -31,9 +31,9 @@
#define DIODE_DIRECTION ROW2COL
/* RGB Matrix Driver Configuration */
-#define DRIVER_COUNT 2
-#define DRIVER_ADDR_1 0b1110111
-#define DRIVER_ADDR_2 0b1110100
+#define SNLED27351_DRIVER_COUNT 2
+#define DRIVER_ADDR_1 SNLED27351_I2C_ADDRESS_VDDIO
+#define DRIVER_ADDR_2 SNLED27351_I2C_ADDRESS_GND
/* Increase I2C speed to 1000 KHz */
#define I2C1_TIMINGR_PRESC 0U
@@ -42,9 +42,8 @@
#define I2C1_TIMINGR_SCLH 15U
#define I2C1_TIMINGR_SCLL 51U
-/* Scan phase of led driver set as MSKPHASE_9CHANNEL(defined as 0x03 in CKLED2001.h) */
-#define PHASE_CHANNEL MSKPHASE_9CHANNEL
-#define CKLED2001_CURRENT_TUNE { 0x98, 0x98, 0x4A, 0x98, 0x98, 0x4A, 0x98, 0x98, 0x4A, 0x98, 0x98, 0x4A }
+#define SNLED27351_PHASE_CHANNEL SNLED27351_MSKPHASE_9CHANNEL
+#define SNLED27351_CURRENT_TUNE { 0x98, 0x98, 0x4A, 0x98, 0x98, 0x4A, 0x98, 0x98, 0x4A, 0x98, 0x98, 0x4A }
/* DIP switch */
#define DIP_SWITCH_MATRIX_GRID { {5,5} }
diff --git a/keyboards/keychron/v10/iso_encoder/info.json b/keyboards/keychron/v10/iso_encoder/info.json
index 455b375472..4c6b6580e0 100644
--- a/keyboards/keychron/v10/iso_encoder/info.json
+++ b/keyboards/keychron/v10/iso_encoder/info.json
@@ -9,7 +9,7 @@
"device_version": "1.0.0"
},
"rgb_matrix": {
- "driver": "ckled2001"
+ "driver": "snled27351"
},
"encoder": {
"rotary": [
diff --git a/keyboards/keychron/v10/iso_encoder/iso_encoder.c b/keyboards/keychron/v10/iso_encoder/iso_encoder.c
index 070a01a8a8..f7e0a10470 100644
--- a/keyboards/keychron/v10/iso_encoder/iso_encoder.c
+++ b/keyboards/keychron/v10/iso_encoder/iso_encoder.c
@@ -20,8 +20,8 @@
// clang-format off
-const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to IS31 manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | R location
* | | G location
diff --git a/keyboards/keychron/v10/iso_encoder/rules.mk b/keyboards/keychron/v10/iso_encoder/rules.mk
index 7da353fbd1..4c6e5bebf0 100644
--- a/keyboards/keychron/v10/iso_encoder/rules.mk
+++ b/keyboards/keychron/v10/iso_encoder/rules.mk
@@ -13,8 +13,6 @@ AUDIO_ENABLE = no # Audio output
ENCODER_ENABLE = yes # Enable Encoder
DIP_SWITCH_ENABLE = yes
RGB_MATRIX_ENABLE = yes
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = embedded_flash
# custom matrix setup
CUSTOM_MATRIX = lite
diff --git a/keyboards/keychron/v2/ansi/ansi.c b/keyboards/keychron/v2/ansi/ansi.c
index a2524d36cc..d98a96fdf9 100644
--- a/keyboards/keychron/v2/ansi/ansi.c
+++ b/keyboards/keychron/v2/ansi/ansi.c
@@ -20,8 +20,8 @@
// clang-format off
-const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to CKLED manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | R location
* | | G location
diff --git a/keyboards/keychron/v2/ansi/config.h b/keyboards/keychron/v2/ansi/config.h
index b6c31201a7..094038d5b3 100644
--- a/keyboards/keychron/v2/ansi/config.h
+++ b/keyboards/keychron/v2/ansi/config.h
@@ -21,7 +21,7 @@
#define DRIVER_2_LED_TOTAL 33
#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
-#define CKLED2001_CURRENT_TUNE \
+#define SNLED27351_CURRENT_TUNE \
{ 0xCA, 0xCA, 0x60, 0xCA, 0xCA, 0x60, 0xCA, 0xCA, 0x60, 0xCA, 0xCA, 0x60 }
/* Enable caps-lock LED */
diff --git a/keyboards/keychron/v2/ansi/info.json b/keyboards/keychron/v2/ansi/info.json
index d07fba97b8..3b54b90201 100644
--- a/keyboards/keychron/v2/ansi/info.json
+++ b/keyboards/keychron/v2/ansi/info.json
@@ -9,7 +9,7 @@
"device_version": "1.0.0"
},
"rgb_matrix": {
- "driver": "ckled2001"
+ "driver": "snled27351"
},
"matrix_pins": {
"cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"],
diff --git a/keyboards/keychron/v2/ansi/rules.mk b/keyboards/keychron/v2/ansi/rules.mk
index c37beecb9e..cf31e094cb 100644
--- a/keyboards/keychron/v2/ansi/rules.mk
+++ b/keyboards/keychron/v2/ansi/rules.mk
@@ -12,6 +12,3 @@ RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
AUDIO_ENABLE = no # Audio output
DIP_SWITCH_ENABLE = yes
RGB_MATRIX_ENABLE = yes
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = embedded_flash
-
diff --git a/keyboards/keychron/v2/ansi_encoder/ansi_encoder.c b/keyboards/keychron/v2/ansi_encoder/ansi_encoder.c
index 2c9fe0e8e2..64153d4251 100644
--- a/keyboards/keychron/v2/ansi_encoder/ansi_encoder.c
+++ b/keyboards/keychron/v2/ansi_encoder/ansi_encoder.c
@@ -20,8 +20,8 @@
// clang-format off
-const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to CKLED manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | R location
* | | G location
diff --git a/keyboards/keychron/v2/ansi_encoder/info.json b/keyboards/keychron/v2/ansi_encoder/info.json
index c733b389e6..f1998272e9 100644
--- a/keyboards/keychron/v2/ansi_encoder/info.json
+++ b/keyboards/keychron/v2/ansi_encoder/info.json
@@ -9,7 +9,7 @@
"device_version": "1.0.0"
},
"rgb_matrix": {
- "driver": "ckled2001"
+ "driver": "snled27351"
},
"matrix_pins": {
"cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"],
diff --git a/keyboards/keychron/v2/ansi_encoder/rules.mk b/keyboards/keychron/v2/ansi_encoder/rules.mk
index 5091fe9414..5d77f09971 100644
--- a/keyboards/keychron/v2/ansi_encoder/rules.mk
+++ b/keyboards/keychron/v2/ansi_encoder/rules.mk
@@ -13,6 +13,3 @@ AUDIO_ENABLE = no # Audio output
ENCODER_ENABLE = yes # Enable Encoder
DIP_SWITCH_ENABLE = yes
RGB_MATRIX_ENABLE = yes
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = embedded_flash
-
diff --git a/keyboards/keychron/v2/config.h b/keyboards/keychron/v2/config.h
index 08cc5b8e84..8ac0bea5f0 100644
--- a/keyboards/keychron/v2/config.h
+++ b/keyboards/keychron/v2/config.h
@@ -20,9 +20,9 @@
// #define MATRIX_UNSELECT_DRIVE_HIGH
/* RGB Matrix Driver Configuration */
-#define DRIVER_COUNT 2
-#define DRIVER_ADDR_1 0b1110111
-#define DRIVER_ADDR_2 0b1110100
+#define SNLED27351_DRIVER_COUNT 2
+#define DRIVER_ADDR_1 SNLED27351_I2C_ADDRESS_VDDIO
+#define DRIVER_ADDR_2 SNLED27351_I2C_ADDRESS_GND
/* Increase I2C speed to 1000 KHz */
#define I2C1_TIMINGR_PRESC 0U
@@ -31,8 +31,7 @@
#define I2C1_TIMINGR_SCLH 15U
#define I2C1_TIMINGR_SCLL 51U
-/* Scan phase of led driver set as MSKPHASE_9CHANNEL(defined as 0x03 in CKLED2001.h) */
-#define PHASE_CHANNEL MSKPHASE_9CHANNEL
+#define SNLED27351_PHASE_CHANNEL SNLED27351_MSKPHASE_9CHANNEL
/* Disable DIP switch in matrix data */
#define MATRIX_MASKED
diff --git a/keyboards/keychron/v2/iso/info.json b/keyboards/keychron/v2/iso/info.json
index 0d8376f7b7..cfc5ef3c5b 100644
--- a/keyboards/keychron/v2/iso/info.json
+++ b/keyboards/keychron/v2/iso/info.json
@@ -9,7 +9,7 @@
"device_version": "1.0.0"
},
"rgb_matrix": {
- "driver": "ckled2001"
+ "driver": "snled27351"
},
"matrix_pins": {
"cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"],
diff --git a/keyboards/keychron/v2/iso/iso.c b/keyboards/keychron/v2/iso/iso.c
index 385f566252..37cac7337d 100644
--- a/keyboards/keychron/v2/iso/iso.c
+++ b/keyboards/keychron/v2/iso/iso.c
@@ -20,8 +20,8 @@
// clang-format off
-const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to IS31 manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | R location
* | | G location
diff --git a/keyboards/keychron/v2/iso/rules.mk b/keyboards/keychron/v2/iso/rules.mk
index c37beecb9e..cf31e094cb 100644
--- a/keyboards/keychron/v2/iso/rules.mk
+++ b/keyboards/keychron/v2/iso/rules.mk
@@ -12,6 +12,3 @@ RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
AUDIO_ENABLE = no # Audio output
DIP_SWITCH_ENABLE = yes
RGB_MATRIX_ENABLE = yes
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = embedded_flash
-
diff --git a/keyboards/keychron/v2/iso_encoder/info.json b/keyboards/keychron/v2/iso_encoder/info.json
index 0241cdb21e..d5f630a3c3 100644
--- a/keyboards/keychron/v2/iso_encoder/info.json
+++ b/keyboards/keychron/v2/iso_encoder/info.json
@@ -9,7 +9,7 @@
"device_version": "1.0.0"
},
"rgb_matrix": {
- "driver": "ckled2001"
+ "driver": "snled27351"
},
"matrix_pins": {
"cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"],
diff --git a/keyboards/keychron/v2/iso_encoder/iso_encoder.c b/keyboards/keychron/v2/iso_encoder/iso_encoder.c
index 385f566252..37cac7337d 100644
--- a/keyboards/keychron/v2/iso_encoder/iso_encoder.c
+++ b/keyboards/keychron/v2/iso_encoder/iso_encoder.c
@@ -20,8 +20,8 @@
// clang-format off
-const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to IS31 manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | R location
* | | G location
diff --git a/keyboards/keychron/v2/iso_encoder/rules.mk b/keyboards/keychron/v2/iso_encoder/rules.mk
index 5091fe9414..5d77f09971 100644
--- a/keyboards/keychron/v2/iso_encoder/rules.mk
+++ b/keyboards/keychron/v2/iso_encoder/rules.mk
@@ -13,6 +13,3 @@ AUDIO_ENABLE = no # Audio output
ENCODER_ENABLE = yes # Enable Encoder
DIP_SWITCH_ENABLE = yes
RGB_MATRIX_ENABLE = yes
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = embedded_flash
-
diff --git a/keyboards/keychron/v2/jis/config.h b/keyboards/keychron/v2/jis/config.h
index f258f9edd1..1b3fd5a27a 100644
--- a/keyboards/keychron/v2/jis/config.h
+++ b/keyboards/keychron/v2/jis/config.h
@@ -21,7 +21,7 @@
#define DRIVER_2_LED_TOTAL 36
#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
-#define CKLED2001_CURRENT_TUNE \
+#define SNLED27351_CURRENT_TUNE \
{ 0xBD, 0xBD, 0x5D, 0xBD, 0xBD, 0x5D, 0xBD, 0xBD, 0x5D, 0xBD, 0xBD, 0x5D }
/* Enable caps-lock LED */
diff --git a/keyboards/keychron/v2/jis/info.json b/keyboards/keychron/v2/jis/info.json
index f65e2b51d2..124cb0ecc6 100644
--- a/keyboards/keychron/v2/jis/info.json
+++ b/keyboards/keychron/v2/jis/info.json
@@ -9,7 +9,7 @@
"device_version": "1.0.0"
},
"rgb_matrix": {
- "driver": "ckled2001"
+ "driver": "snled27351"
},
"matrix_pins": {
"cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"],
diff --git a/keyboards/keychron/v2/jis/jis.c b/keyboards/keychron/v2/jis/jis.c
index b9060cafb2..42285e56ca 100644
--- a/keyboards/keychron/v2/jis/jis.c
+++ b/keyboards/keychron/v2/jis/jis.c
@@ -18,8 +18,8 @@
#ifdef RGB_MATRIX_ENABLE
-const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to IS31 manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | R location
* | | G location
diff --git a/keyboards/keychron/v2/jis/rules.mk b/keyboards/keychron/v2/jis/rules.mk
index c37beecb9e..cf31e094cb 100644
--- a/keyboards/keychron/v2/jis/rules.mk
+++ b/keyboards/keychron/v2/jis/rules.mk
@@ -12,6 +12,3 @@ RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
AUDIO_ENABLE = no # Audio output
DIP_SWITCH_ENABLE = yes
RGB_MATRIX_ENABLE = yes
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = embedded_flash
-
diff --git a/keyboards/keychron/v2/jis_encoder/config.h b/keyboards/keychron/v2/jis_encoder/config.h
index a9a3438ab7..aacac818a4 100644
--- a/keyboards/keychron/v2/jis_encoder/config.h
+++ b/keyboards/keychron/v2/jis_encoder/config.h
@@ -21,7 +21,7 @@
#define DRIVER_2_LED_TOTAL 36
#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
-#define CKLED2001_CURRENT_TUNE \
+#define SNLED27351_CURRENT_TUNE \
{ 0xBD, 0xBD, 0x5D, 0xBD, 0xBD, 0x5D, 0xBD, 0xBD, 0x5D, 0xBD, 0xBD, 0x5D }
/* Encoder Configuration */
diff --git a/keyboards/keychron/v2/jis_encoder/info.json b/keyboards/keychron/v2/jis_encoder/info.json
index 263e403167..d3df93819f 100644
--- a/keyboards/keychron/v2/jis_encoder/info.json
+++ b/keyboards/keychron/v2/jis_encoder/info.json
@@ -9,7 +9,7 @@
"device_version": "1.0.0"
},
"rgb_matrix": {
- "driver": "ckled2001"
+ "driver": "snled27351"
},
"matrix_pins": {
"cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"],
diff --git a/keyboards/keychron/v2/jis_encoder/jis_encoder.c b/keyboards/keychron/v2/jis_encoder/jis_encoder.c
index 661ee0c1d6..5ccbb807cb 100644
--- a/keyboards/keychron/v2/jis_encoder/jis_encoder.c
+++ b/keyboards/keychron/v2/jis_encoder/jis_encoder.c
@@ -18,8 +18,8 @@
#ifdef RGB_MATRIX_ENABLE
-const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to IS31 manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | R location
* | | G location
diff --git a/keyboards/keychron/v2/jis_encoder/rules.mk b/keyboards/keychron/v2/jis_encoder/rules.mk
index 5091fe9414..5d77f09971 100644
--- a/keyboards/keychron/v2/jis_encoder/rules.mk
+++ b/keyboards/keychron/v2/jis_encoder/rules.mk
@@ -13,6 +13,3 @@ AUDIO_ENABLE = no # Audio output
ENCODER_ENABLE = yes # Enable Encoder
DIP_SWITCH_ENABLE = yes
RGB_MATRIX_ENABLE = yes
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = embedded_flash
-
diff --git a/keyboards/keychron/v3/ansi/ansi.c b/keyboards/keychron/v3/ansi/ansi.c
index 6d56122c52..16d6b77131 100644
--- a/keyboards/keychron/v3/ansi/ansi.c
+++ b/keyboards/keychron/v3/ansi/ansi.c
@@ -18,8 +18,8 @@
#ifdef RGB_MATRIX_ENABLE
-const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to IS31 manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | R location
* | | G location
diff --git a/keyboards/keychron/v3/ansi/config.h b/keyboards/keychron/v3/ansi/config.h
index ff756dc046..ba64aa96da 100644
--- a/keyboards/keychron/v3/ansi/config.h
+++ b/keyboards/keychron/v3/ansi/config.h
@@ -30,7 +30,7 @@
#define DRIVER_2_LED_TOTAL 39
#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
-#define CKLED2001_CURRENT_TUNE \
+#define SNLED27351_CURRENT_TUNE \
{ 0x95, 0x95, 0x55, 0x95, 0x95, 0x55, 0x95, 0x95, 0x55, 0x95, 0x95, 0x55 }
/* Enable CapsLcok LED */
diff --git a/keyboards/keychron/v3/ansi/info.json b/keyboards/keychron/v3/ansi/info.json
index 6572066329..49792690a7 100644
--- a/keyboards/keychron/v3/ansi/info.json
+++ b/keyboards/keychron/v3/ansi/info.json
@@ -9,7 +9,7 @@
"device_version": "1.0.0"
},
"rgb_matrix": {
- "driver": "ckled2001"
+ "driver": "snled27351"
},
"processor": "STM32L432",
"bootloader": "stm32-dfu",
diff --git a/keyboards/keychron/v3/ansi/rules.mk b/keyboards/keychron/v3/ansi/rules.mk
index c37beecb9e..cf31e094cb 100644
--- a/keyboards/keychron/v3/ansi/rules.mk
+++ b/keyboards/keychron/v3/ansi/rules.mk
@@ -12,6 +12,3 @@ RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
AUDIO_ENABLE = no # Audio output
DIP_SWITCH_ENABLE = yes
RGB_MATRIX_ENABLE = yes
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = embedded_flash
-
diff --git a/keyboards/keychron/v3/ansi_encoder/ansi_encoder.c b/keyboards/keychron/v3/ansi_encoder/ansi_encoder.c
index 5ed38074e3..39fa354539 100644
--- a/keyboards/keychron/v3/ansi_encoder/ansi_encoder.c
+++ b/keyboards/keychron/v3/ansi_encoder/ansi_encoder.c
@@ -18,8 +18,8 @@
#ifdef RGB_MATRIX_ENABLE
-const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to IS31 manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | R location
* | | G location
diff --git a/keyboards/keychron/v3/ansi_encoder/info.json b/keyboards/keychron/v3/ansi_encoder/info.json
index cffbc85158..ad46ae7a62 100644
--- a/keyboards/keychron/v3/ansi_encoder/info.json
+++ b/keyboards/keychron/v3/ansi_encoder/info.json
@@ -9,7 +9,7 @@
"device_version": "1.0.0"
},
"rgb_matrix": {
- "driver": "ckled2001"
+ "driver": "snled27351"
},
"encoder": {
"rotary": [
diff --git a/keyboards/keychron/v3/ansi_encoder/rules.mk b/keyboards/keychron/v3/ansi_encoder/rules.mk
index 7da353fbd1..4c6e5bebf0 100644
--- a/keyboards/keychron/v3/ansi_encoder/rules.mk
+++ b/keyboards/keychron/v3/ansi_encoder/rules.mk
@@ -13,8 +13,6 @@ AUDIO_ENABLE = no # Audio output
ENCODER_ENABLE = yes # Enable Encoder
DIP_SWITCH_ENABLE = yes
RGB_MATRIX_ENABLE = yes
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = embedded_flash
# custom matrix setup
CUSTOM_MATRIX = lite
diff --git a/keyboards/keychron/v3/config.h b/keyboards/keychron/v3/config.h
index 87ab3c8667..a6a6394ffd 100644
--- a/keyboards/keychron/v3/config.h
+++ b/keyboards/keychron/v3/config.h
@@ -20,9 +20,9 @@
#define DIODE_DIRECTION ROW2COL
/* RGB Matrix Driver Configuration */
-#define DRIVER_COUNT 2
-#define DRIVER_ADDR_1 0b1110111
-#define DRIVER_ADDR_2 0b1110100
+#define SNLED27351_DRIVER_COUNT 2
+#define DRIVER_ADDR_1 SNLED27351_I2C_ADDRESS_VDDIO
+#define DRIVER_ADDR_2 SNLED27351_I2C_ADDRESS_GND
/* Increase I2C speed to 1000 KHz */
#define I2C1_TIMINGR_PRESC 0U
@@ -31,8 +31,7 @@
#define I2C1_TIMINGR_SCLH 15U
#define I2C1_TIMINGR_SCLL 51U
-/* Scan phase of led driver set as MSKPHASE_9CHANNEL(defined as 0x03 in CKLED2001.h) */
-#define PHASE_CHANNEL MSKPHASE_9CHANNEL
+#define SNLED27351_PHASE_CHANNEL SNLED27351_MSKPHASE_9CHANNEL
/* DIP switch */
#define DIP_SWITCH_MATRIX_GRID { {5, 4} }
diff --git a/keyboards/keychron/v3/iso/info.json b/keyboards/keychron/v3/iso/info.json
index 18c73a8f58..56796b5eb2 100644
--- a/keyboards/keychron/v3/iso/info.json
+++ b/keyboards/keychron/v3/iso/info.json
@@ -9,7 +9,7 @@
"device_version": "1.0.0"
},
"rgb_matrix": {
- "driver": "ckled2001"
+ "driver": "snled27351"
},
"processor": "STM32L432",
"bootloader": "stm32-dfu",
diff --git a/keyboards/keychron/v3/iso/iso.c b/keyboards/keychron/v3/iso/iso.c
index 95b324d11b..24b406467a 100644
--- a/keyboards/keychron/v3/iso/iso.c
+++ b/keyboards/keychron/v3/iso/iso.c
@@ -18,8 +18,8 @@
#ifdef RGB_MATRIX_ENABLE
-const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to IS31 manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | R location
* | | G location
diff --git a/keyboards/keychron/v3/iso/rules.mk b/keyboards/keychron/v3/iso/rules.mk
index 2eadfbded9..118bf40e5a 100644
--- a/keyboards/keychron/v3/iso/rules.mk
+++ b/keyboards/keychron/v3/iso/rules.mk
@@ -12,6 +12,3 @@ RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
AUDIO_ENABLE = no # Audio output
DIP_SWITCH_ENABLE = yes
RGB_MATRIX_ENABLE = yes
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = embedded_flash
-
diff --git a/keyboards/keychron/v3/iso_encoder/info.json b/keyboards/keychron/v3/iso_encoder/info.json
index 60c56a6b87..057e4a8d7d 100644
--- a/keyboards/keychron/v3/iso_encoder/info.json
+++ b/keyboards/keychron/v3/iso_encoder/info.json
@@ -9,7 +9,7 @@
"device_version": "1.0.0"
},
"rgb_matrix": {
- "driver": "ckled2001"
+ "driver": "snled27351"
},
"encoder": {
"rotary": [
diff --git a/keyboards/keychron/v3/iso_encoder/iso_encoder.c b/keyboards/keychron/v3/iso_encoder/iso_encoder.c
index 6231172fde..53fe99aac0 100644
--- a/keyboards/keychron/v3/iso_encoder/iso_encoder.c
+++ b/keyboards/keychron/v3/iso_encoder/iso_encoder.c
@@ -18,8 +18,8 @@
#ifdef RGB_MATRIX_ENABLE
-const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to IS31 manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | R location
* | | G location
diff --git a/keyboards/keychron/v3/iso_encoder/rules.mk b/keyboards/keychron/v3/iso_encoder/rules.mk
index 7da353fbd1..4c6e5bebf0 100644
--- a/keyboards/keychron/v3/iso_encoder/rules.mk
+++ b/keyboards/keychron/v3/iso_encoder/rules.mk
@@ -13,8 +13,6 @@ AUDIO_ENABLE = no # Audio output
ENCODER_ENABLE = yes # Enable Encoder
DIP_SWITCH_ENABLE = yes
RGB_MATRIX_ENABLE = yes
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = embedded_flash
# custom matrix setup
CUSTOM_MATRIX = lite
diff --git a/keyboards/keychron/v3/jis/config.h b/keyboards/keychron/v3/jis/config.h
index f19e7538c2..10c77c74f0 100644
--- a/keyboards/keychron/v3/jis/config.h
+++ b/keyboards/keychron/v3/jis/config.h
@@ -30,7 +30,7 @@
#define DRIVER_2_LED_TOTAL 43
#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
-#define CKLED2001_CURRENT_TUNE \
+#define SNLED27351_CURRENT_TUNE \
{ 0x94, 0x94, 0x44, 0x94, 0x94, 0x44, 0x94, 0x94, 0x44, 0x94, 0x94, 0x44 }
/* Enable CapsLcok LED */
diff --git a/keyboards/keychron/v3/jis/info.json b/keyboards/keychron/v3/jis/info.json
index 9b97707b2f..d5601a3b34 100644
--- a/keyboards/keychron/v3/jis/info.json
+++ b/keyboards/keychron/v3/jis/info.json
@@ -9,7 +9,7 @@
"device_version": "1.0.0"
},
"rgb_matrix": {
- "driver": "ckled2001"
+ "driver": "snled27351"
},
"processor": "STM32L432",
"bootloader": "stm32-dfu",
diff --git a/keyboards/keychron/v3/jis/jis.c b/keyboards/keychron/v3/jis/jis.c
index 7e05aa4063..70dbf812fa 100644
--- a/keyboards/keychron/v3/jis/jis.c
+++ b/keyboards/keychron/v3/jis/jis.c
@@ -18,8 +18,8 @@
#ifdef RGB_MATRIX_ENABLE
-const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to IS31 manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | R location
* | | G location
diff --git a/keyboards/keychron/v3/jis/rules.mk b/keyboards/keychron/v3/jis/rules.mk
index c37beecb9e..cf31e094cb 100644
--- a/keyboards/keychron/v3/jis/rules.mk
+++ b/keyboards/keychron/v3/jis/rules.mk
@@ -12,6 +12,3 @@ RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
AUDIO_ENABLE = no # Audio output
DIP_SWITCH_ENABLE = yes
RGB_MATRIX_ENABLE = yes
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = embedded_flash
-
diff --git a/keyboards/keychron/v3/jis_encoder/config.h b/keyboards/keychron/v3/jis_encoder/config.h
index 5f67d6a870..27f37cbed4 100644
--- a/keyboards/keychron/v3/jis_encoder/config.h
+++ b/keyboards/keychron/v3/jis_encoder/config.h
@@ -27,7 +27,7 @@
#define DRIVER_2_LED_TOTAL 43
#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
-#define CKLED2001_CURRENT_TUNE \
+#define SNLED27351_CURRENT_TUNE \
{ 0x94, 0x94, 0x44, 0x94, 0x94, 0x44, 0x94, 0x94, 0x44, 0x94, 0x94, 0x44 }
/* Encoder Configuration */
diff --git a/keyboards/keychron/v3/jis_encoder/info.json b/keyboards/keychron/v3/jis_encoder/info.json
index 585cf4519e..968c0396e9 100644
--- a/keyboards/keychron/v3/jis_encoder/info.json
+++ b/keyboards/keychron/v3/jis_encoder/info.json
@@ -9,7 +9,7 @@
"device_version": "1.0.0"
},
"rgb_matrix": {
- "driver": "ckled2001"
+ "driver": "snled27351"
},
"encoder": {
"rotary": [
diff --git a/keyboards/keychron/v3/jis_encoder/jis_encoder.c b/keyboards/keychron/v3/jis_encoder/jis_encoder.c
index 41b1c1e5af..cf1065eed9 100644
--- a/keyboards/keychron/v3/jis_encoder/jis_encoder.c
+++ b/keyboards/keychron/v3/jis_encoder/jis_encoder.c
@@ -18,8 +18,8 @@
#ifdef RGB_MATRIX_ENABLE
-const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to IS31 manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | R location
* | | G location
diff --git a/keyboards/keychron/v3/jis_encoder/rules.mk b/keyboards/keychron/v3/jis_encoder/rules.mk
index 7da353fbd1..4c6e5bebf0 100644
--- a/keyboards/keychron/v3/jis_encoder/rules.mk
+++ b/keyboards/keychron/v3/jis_encoder/rules.mk
@@ -13,8 +13,6 @@ AUDIO_ENABLE = no # Audio output
ENCODER_ENABLE = yes # Enable Encoder
DIP_SWITCH_ENABLE = yes
RGB_MATRIX_ENABLE = yes
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = embedded_flash
# custom matrix setup
CUSTOM_MATRIX = lite
diff --git a/keyboards/keychron/v4/ansi/ansi.c b/keyboards/keychron/v4/ansi/ansi.c
index 44056459f9..6326405380 100644
--- a/keyboards/keychron/v4/ansi/ansi.c
+++ b/keyboards/keychron/v4/ansi/ansi.c
@@ -20,8 +20,8 @@
// clang-format off
-const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to CKLED manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | R location
* | | G location
diff --git a/keyboards/keychron/v4/ansi/info.json b/keyboards/keychron/v4/ansi/info.json
index 812aec53a7..5fad0ca9b1 100644
--- a/keyboards/keychron/v4/ansi/info.json
+++ b/keyboards/keychron/v4/ansi/info.json
@@ -9,7 +9,7 @@
"device_version": "1.0.0"
},
"rgb_matrix": {
- "driver": "ckled2001"
+ "driver": "snled27351"
},
"matrix_pins": {
"cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9"],
diff --git a/keyboards/keychron/v4/ansi/rules.mk b/keyboards/keychron/v4/ansi/rules.mk
index 46f5aef144..468ed6fae3 100644
--- a/keyboards/keychron/v4/ansi/rules.mk
+++ b/keyboards/keychron/v4/ansi/rules.mk
@@ -12,6 +12,3 @@ RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
AUDIO_ENABLE = no # Audio output
DIP_SWITCH_ENABLE = yes
RGB_MATRIX_ENABLE = yes
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = embedded_flash
-
diff --git a/keyboards/keychron/v4/config.h b/keyboards/keychron/v4/config.h
index 8d92219f20..fb0b2cd276 100644
--- a/keyboards/keychron/v4/config.h
+++ b/keyboards/keychron/v4/config.h
@@ -17,8 +17,8 @@
#pragma once
/* RGB Matrix Driver Configuration */
-#define DRIVER_COUNT 1
-#define DRIVER_ADDR_1 0b1110111
+#define SNLED27351_DRIVER_COUNT 1
+#define DRIVER_ADDR_1 SNLED27351_I2C_ADDRESS_VDDIO
/* Increase I2C speed to 1000 KHz */
#define I2C1_TIMINGR_PRESC 0U
@@ -27,7 +27,7 @@
#define I2C1_TIMINGR_SCLH 15U
#define I2C1_TIMINGR_SCLL 51U
-#define CKLED2001_CURRENT_TUNE \
+#define SNLED27351_CURRENT_TUNE \
{ 0xD0, 0xD0, 0x60, 0xD0, 0xD0, 0x60, 0xD0, 0xD0, 0x60, 0xD0, 0xD0, 0x60 }
/* DIP switch */
diff --git a/keyboards/keychron/v4/iso/info.json b/keyboards/keychron/v4/iso/info.json
index 7d4a8eae1d..a53d3ee6a4 100644
--- a/keyboards/keychron/v4/iso/info.json
+++ b/keyboards/keychron/v4/iso/info.json
@@ -9,7 +9,7 @@
"device_version": "1.0.0"
},
"rgb_matrix": {
- "driver": "ckled2001"
+ "driver": "snled27351"
},
"matrix_pins": {
"cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9"],
diff --git a/keyboards/keychron/v4/iso/iso.c b/keyboards/keychron/v4/iso/iso.c
index 8f86aa0498..9116135a4a 100644
--- a/keyboards/keychron/v4/iso/iso.c
+++ b/keyboards/keychron/v4/iso/iso.c
@@ -20,8 +20,8 @@
// clang-format off
-const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to CKLED manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | R location
* | | G location
diff --git a/keyboards/keychron/v4/iso/rules.mk b/keyboards/keychron/v4/iso/rules.mk
index 46f5aef144..468ed6fae3 100644
--- a/keyboards/keychron/v4/iso/rules.mk
+++ b/keyboards/keychron/v4/iso/rules.mk
@@ -12,6 +12,3 @@ RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
AUDIO_ENABLE = no # Audio output
DIP_SWITCH_ENABLE = yes
RGB_MATRIX_ENABLE = yes
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = embedded_flash
-
diff --git a/keyboards/keychron/v5/ansi/ansi.c b/keyboards/keychron/v5/ansi/ansi.c
index f4525dc3dc..073fb0cde0 100644
--- a/keyboards/keychron/v5/ansi/ansi.c
+++ b/keyboards/keychron/v5/ansi/ansi.c
@@ -20,8 +20,8 @@
// clang-format off
-const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to IS31 manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | R location
* | | G location
diff --git a/keyboards/keychron/v5/ansi/info.json b/keyboards/keychron/v5/ansi/info.json
index bc5eec2ca5..eb5cdca90b 100644
--- a/keyboards/keychron/v5/ansi/info.json
+++ b/keyboards/keychron/v5/ansi/info.json
@@ -9,7 +9,7 @@
"device_version": "1.0.0"
},
"rgb_matrix": {
- "driver": "ckled2001"
+ "driver": "snled27351"
},
"processor": "STM32L432",
"bootloader": "stm32-dfu",
diff --git a/keyboards/keychron/v5/ansi/rules.mk b/keyboards/keychron/v5/ansi/rules.mk
index e859eb9c34..465dfa9348 100644
--- a/keyboards/keychron/v5/ansi/rules.mk
+++ b/keyboards/keychron/v5/ansi/rules.mk
@@ -12,8 +12,6 @@ RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
AUDIO_ENABLE = no # Audio output
DIP_SWITCH_ENABLE = yes
RGB_MATRIX_ENABLE = yes
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = embedded_flash
# custom matrix setup
CUSTOM_MATRIX = lite
diff --git a/keyboards/keychron/v5/ansi_encoder/ansi_encoder.c b/keyboards/keychron/v5/ansi_encoder/ansi_encoder.c
index 1e3b303896..62ebc3f7b3 100644
--- a/keyboards/keychron/v5/ansi_encoder/ansi_encoder.c
+++ b/keyboards/keychron/v5/ansi_encoder/ansi_encoder.c
@@ -20,8 +20,8 @@
// clang-format off
-const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to IS31 manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | R location
* | | G location
diff --git a/keyboards/keychron/v5/ansi_encoder/info.json b/keyboards/keychron/v5/ansi_encoder/info.json
index 8a4aec4e36..00079fca47 100644
--- a/keyboards/keychron/v5/ansi_encoder/info.json
+++ b/keyboards/keychron/v5/ansi_encoder/info.json
@@ -9,7 +9,7 @@
"device_version": "1.0.0"
},
"rgb_matrix": {
- "driver": "ckled2001"
+ "driver": "snled27351"
},
"encoder": {
"rotary": [
diff --git a/keyboards/keychron/v5/ansi_encoder/rules.mk b/keyboards/keychron/v5/ansi_encoder/rules.mk
index 7da353fbd1..4c6e5bebf0 100644
--- a/keyboards/keychron/v5/ansi_encoder/rules.mk
+++ b/keyboards/keychron/v5/ansi_encoder/rules.mk
@@ -13,8 +13,6 @@ AUDIO_ENABLE = no # Audio output
ENCODER_ENABLE = yes # Enable Encoder
DIP_SWITCH_ENABLE = yes
RGB_MATRIX_ENABLE = yes
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = embedded_flash
# custom matrix setup
CUSTOM_MATRIX = lite
diff --git a/keyboards/keychron/v5/config.h b/keyboards/keychron/v5/config.h
index 142dfead34..bca7f6d1cf 100644
--- a/keyboards/keychron/v5/config.h
+++ b/keyboards/keychron/v5/config.h
@@ -26,9 +26,9 @@
#define DIODE_DIRECTION ROW2COL
/* RGB Matrix Driver Configuration */
-#define DRIVER_COUNT 2
-#define DRIVER_ADDR_1 0b1110111
-#define DRIVER_ADDR_2 0b1110100
+#define SNLED27351_DRIVER_COUNT 2
+#define DRIVER_ADDR_1 SNLED27351_I2C_ADDRESS_VDDIO
+#define DRIVER_ADDR_2 SNLED27351_I2C_ADDRESS_GND
/* Increase I2C speed to 1000 KHz */
#define I2C1_TIMINGR_PRESC 0U
@@ -37,7 +37,7 @@
#define I2C1_TIMINGR_SCLH 15U
#define I2C1_TIMINGR_SCLL 51U
-#define CKLED2001_CURRENT_TUNE \
+#define SNLED27351_CURRENT_TUNE \
{ 0xB6, 0xB6, 0x56, 0xB6, 0xB6, 0x56, 0xB6, 0xB6, 0x56, 0xB6, 0xB6, 0x56 }
/* DIP switch */
diff --git a/keyboards/keychron/v5/iso/info.json b/keyboards/keychron/v5/iso/info.json
index 02db87e9ac..badac7f49a 100644
--- a/keyboards/keychron/v5/iso/info.json
+++ b/keyboards/keychron/v5/iso/info.json
@@ -9,7 +9,7 @@
"device_version": "1.0.0"
},
"rgb_matrix": {
- "driver": "ckled2001"
+ "driver": "snled27351"
},
"processor": "STM32L432",
"bootloader": "stm32-dfu",
diff --git a/keyboards/keychron/v5/iso/iso.c b/keyboards/keychron/v5/iso/iso.c
index d67be2d530..1552de7d47 100644
--- a/keyboards/keychron/v5/iso/iso.c
+++ b/keyboards/keychron/v5/iso/iso.c
@@ -20,8 +20,8 @@
// clang-format off
-const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to IS31 manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | R location
* | | G location
diff --git a/keyboards/keychron/v5/iso/rules.mk b/keyboards/keychron/v5/iso/rules.mk
index e859eb9c34..465dfa9348 100644
--- a/keyboards/keychron/v5/iso/rules.mk
+++ b/keyboards/keychron/v5/iso/rules.mk
@@ -12,8 +12,6 @@ RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
AUDIO_ENABLE = no # Audio output
DIP_SWITCH_ENABLE = yes
RGB_MATRIX_ENABLE = yes
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = embedded_flash
# custom matrix setup
CUSTOM_MATRIX = lite
diff --git a/keyboards/keychron/v5/iso_encoder/info.json b/keyboards/keychron/v5/iso_encoder/info.json
index b0be43fc50..cbf77fc93a 100644
--- a/keyboards/keychron/v5/iso_encoder/info.json
+++ b/keyboards/keychron/v5/iso_encoder/info.json
@@ -9,7 +9,7 @@
"device_version": "1.0.0"
},
"rgb_matrix": {
- "driver": "ckled2001"
+ "driver": "snled27351"
},
"encoder": {
"rotary": [
diff --git a/keyboards/keychron/v5/iso_encoder/iso_encoder.c b/keyboards/keychron/v5/iso_encoder/iso_encoder.c
index 5719da5e34..95eb62ae1f 100644
--- a/keyboards/keychron/v5/iso_encoder/iso_encoder.c
+++ b/keyboards/keychron/v5/iso_encoder/iso_encoder.c
@@ -20,8 +20,8 @@
// clang-format off
-const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to IS31 manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | R location
* | | G location
diff --git a/keyboards/keychron/v5/iso_encoder/rules.mk b/keyboards/keychron/v5/iso_encoder/rules.mk
index 7da353fbd1..4c6e5bebf0 100644
--- a/keyboards/keychron/v5/iso_encoder/rules.mk
+++ b/keyboards/keychron/v5/iso_encoder/rules.mk
@@ -13,8 +13,6 @@ AUDIO_ENABLE = no # Audio output
ENCODER_ENABLE = yes # Enable Encoder
DIP_SWITCH_ENABLE = yes
RGB_MATRIX_ENABLE = yes
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = embedded_flash
# custom matrix setup
CUSTOM_MATRIX = lite
diff --git a/keyboards/keychron/v6/ansi/ansi.c b/keyboards/keychron/v6/ansi/ansi.c
index 4011529883..a3f1032a1e 100644
--- a/keyboards/keychron/v6/ansi/ansi.c
+++ b/keyboards/keychron/v6/ansi/ansi.c
@@ -18,8 +18,8 @@
#ifdef RGB_MATRIX_ENABLE
-const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to IS31 manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | R location
* | | G location
diff --git a/keyboards/keychron/v6/ansi/info.json b/keyboards/keychron/v6/ansi/info.json
index 3f12305f06..3eee229ea8 100644
--- a/keyboards/keychron/v6/ansi/info.json
+++ b/keyboards/keychron/v6/ansi/info.json
@@ -9,7 +9,7 @@
"device_version": "1.0.0"
},
"rgb_matrix": {
- "driver": "ckled2001"
+ "driver": "snled27351"
},
"processor": "STM32L432",
"bootloader": "stm32-dfu",
diff --git a/keyboards/keychron/v6/ansi/rules.mk b/keyboards/keychron/v6/ansi/rules.mk
index 980311d3f2..eff255ee8c 100644
--- a/keyboards/keychron/v6/ansi/rules.mk
+++ b/keyboards/keychron/v6/ansi/rules.mk
@@ -12,8 +12,6 @@ RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
AUDIO_ENABLE = no # Audio output
DIP_SWITCH_ENABLE = yes
RGB_MATRIX_ENABLE = yes
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = embedded_flash
# custom matrix setup
CUSTOM_MATRIX = lite
diff --git a/keyboards/keychron/v6/ansi_encoder/ansi_encoder.c b/keyboards/keychron/v6/ansi_encoder/ansi_encoder.c
index 91831bf3c1..02e0de0b3d 100644
--- a/keyboards/keychron/v6/ansi_encoder/ansi_encoder.c
+++ b/keyboards/keychron/v6/ansi_encoder/ansi_encoder.c
@@ -20,8 +20,8 @@
#ifdef RGB_MATRIX_ENABLE
-const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to IS31 manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | R location
* | | G location
diff --git a/keyboards/keychron/v6/ansi_encoder/info.json b/keyboards/keychron/v6/ansi_encoder/info.json
index ad0ea78318..86ecc82e35 100644
--- a/keyboards/keychron/v6/ansi_encoder/info.json
+++ b/keyboards/keychron/v6/ansi_encoder/info.json
@@ -9,7 +9,7 @@
"device_version": "1.0.0"
},
"rgb_matrix": {
- "driver": "ckled2001"
+ "driver": "snled27351"
},
"encoder": {
"rotary": [
diff --git a/keyboards/keychron/v6/ansi_encoder/rules.mk b/keyboards/keychron/v6/ansi_encoder/rules.mk
index 80a3f300bd..213c733c9c 100644
--- a/keyboards/keychron/v6/ansi_encoder/rules.mk
+++ b/keyboards/keychron/v6/ansi_encoder/rules.mk
@@ -13,8 +13,6 @@ AUDIO_ENABLE = no # Audio output
ENCODER_ENABLE = yes # Enable Encoder
DIP_SWITCH_ENABLE = yes
RGB_MATRIX_ENABLE = yes
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = embedded_flash
# custom matrix setup
CUSTOM_MATRIX = lite
diff --git a/keyboards/keychron/v6/config.h b/keyboards/keychron/v6/config.h
index 38cff19e6b..2ff53f2a67 100644
--- a/keyboards/keychron/v6/config.h
+++ b/keyboards/keychron/v6/config.h
@@ -20,9 +20,9 @@
#define DIODE_DIRECTION ROW2COL
/* RGB Matrix Driver Configuration */
-#define DRIVER_COUNT 2
-#define DRIVER_ADDR_1 0b1110111
-#define DRIVER_ADDR_2 0b1110100
+#define SNLED27351_DRIVER_COUNT 2
+#define DRIVER_ADDR_1 SNLED27351_I2C_ADDRESS_VDDIO
+#define DRIVER_ADDR_2 SNLED27351_I2C_ADDRESS_GND
/* Increase I2C speed to 1000 KHz */
#define I2C1_TIMINGR_PRESC 0U
@@ -32,7 +32,7 @@
#define I2C1_TIMINGR_SCLL 51U
/* Limit the maximum brigtness current of colour white to 500mA */
-#define CKLED2001_CURRENT_TUNE { 0xA8, 0xA8, 0x48, 0xA8, 0xA8, 0x48, 0xA8, 0xA8, 0x48, 0xA8, 0xA8, 0x48 }
+#define SNLED27351_CURRENT_TUNE { 0xA8, 0xA8, 0x48, 0xA8, 0xA8, 0x48, 0xA8, 0xA8, 0x48, 0xA8, 0xA8, 0x48 }
/* DIP switch */
#define DIP_SWITCH_MATRIX_GRID { {5, 4} }
diff --git a/keyboards/keychron/v6/iso/info.json b/keyboards/keychron/v6/iso/info.json
index 0840ee9cc8..242e904cf0 100644
--- a/keyboards/keychron/v6/iso/info.json
+++ b/keyboards/keychron/v6/iso/info.json
@@ -9,7 +9,7 @@
"device_version": "1.0.0"
},
"rgb_matrix": {
- "driver": "ckled2001"
+ "driver": "snled27351"
},
"processor": "STM32L432",
"bootloader": "stm32-dfu",
diff --git a/keyboards/keychron/v6/iso/iso.c b/keyboards/keychron/v6/iso/iso.c
index 5c0e2fa396..7804ca3600 100644
--- a/keyboards/keychron/v6/iso/iso.c
+++ b/keyboards/keychron/v6/iso/iso.c
@@ -20,8 +20,8 @@
#ifdef RGB_MATRIX_ENABLE
-const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to IS31 manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | R location
* | | G location
diff --git a/keyboards/keychron/v6/iso/rules.mk b/keyboards/keychron/v6/iso/rules.mk
index 980311d3f2..eff255ee8c 100644
--- a/keyboards/keychron/v6/iso/rules.mk
+++ b/keyboards/keychron/v6/iso/rules.mk
@@ -12,8 +12,6 @@ RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
AUDIO_ENABLE = no # Audio output
DIP_SWITCH_ENABLE = yes
RGB_MATRIX_ENABLE = yes
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = embedded_flash
# custom matrix setup
CUSTOM_MATRIX = lite
diff --git a/keyboards/keychron/v6/iso_encoder/info.json b/keyboards/keychron/v6/iso_encoder/info.json
index a40d4d66b6..d4237a69f4 100644
--- a/keyboards/keychron/v6/iso_encoder/info.json
+++ b/keyboards/keychron/v6/iso_encoder/info.json
@@ -9,7 +9,7 @@
"device_version": "1.0.0"
},
"rgb_matrix": {
- "driver": "ckled2001"
+ "driver": "snled27351"
},
"encoder": {
"rotary": [
diff --git a/keyboards/keychron/v6/iso_encoder/iso_encoder.c b/keyboards/keychron/v6/iso_encoder/iso_encoder.c
index 8268e5b0a9..bd9189f8b5 100644
--- a/keyboards/keychron/v6/iso_encoder/iso_encoder.c
+++ b/keyboards/keychron/v6/iso_encoder/iso_encoder.c
@@ -20,8 +20,8 @@
#ifdef RGB_MATRIX_ENABLE
-const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to IS31 manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | R location
* | | G location
diff --git a/keyboards/keychron/v6/iso_encoder/rules.mk b/keyboards/keychron/v6/iso_encoder/rules.mk
index 9867724957..39b0594039 100644
--- a/keyboards/keychron/v6/iso_encoder/rules.mk
+++ b/keyboards/keychron/v6/iso_encoder/rules.mk
@@ -13,8 +13,6 @@ AUDIO_ENABLE = no # Audio output
ENCODER_ENABLE = yes # Enable Encoder
DIP_SWITCH_ENABLE = yes
RGB_MATRIX_ENABLE = yes
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = embedded_flash
# custom matrix setup
CUSTOM_MATRIX = lite
diff --git a/keyboards/keychron/v7/ansi/ansi.c b/keyboards/keychron/v7/ansi/ansi.c
index c0deea7845..07a98622a4 100644
--- a/keyboards/keychron/v7/ansi/ansi.c
+++ b/keyboards/keychron/v7/ansi/ansi.c
@@ -20,8 +20,8 @@
// clang-format off
-const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to CKLED manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | R location
* | | G location
diff --git a/keyboards/keychron/v7/ansi/info.json b/keyboards/keychron/v7/ansi/info.json
index 26f31786b5..4088a20ced 100644
--- a/keyboards/keychron/v7/ansi/info.json
+++ b/keyboards/keychron/v7/ansi/info.json
@@ -9,7 +9,7 @@
"device_version": "1.0.0"
},
"rgb_matrix": {
- "driver": "ckled2001"
+ "driver": "snled27351"
},
"matrix_pins": {
"cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "A10", "B5"],
diff --git a/keyboards/keychron/v7/ansi/rules.mk b/keyboards/keychron/v7/ansi/rules.mk
index 46f5aef144..468ed6fae3 100644
--- a/keyboards/keychron/v7/ansi/rules.mk
+++ b/keyboards/keychron/v7/ansi/rules.mk
@@ -12,6 +12,3 @@ RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
AUDIO_ENABLE = no # Audio output
DIP_SWITCH_ENABLE = yes
RGB_MATRIX_ENABLE = yes
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = embedded_flash
-
diff --git a/keyboards/keychron/v7/config.h b/keyboards/keychron/v7/config.h
index c439a7e366..e66866a33c 100644
--- a/keyboards/keychron/v7/config.h
+++ b/keyboards/keychron/v7/config.h
@@ -17,9 +17,9 @@
#pragma once
/* RGB Matrix Driver Configuration */
-#define DRIVER_COUNT 2
-#define DRIVER_ADDR_1 0b1110111
-#define DRIVER_ADDR_2 0b1110100
+#define SNLED27351_DRIVER_COUNT 2
+#define DRIVER_ADDR_1 SNLED27351_I2C_ADDRESS_VDDIO
+#define DRIVER_ADDR_2 SNLED27351_I2C_ADDRESS_GND
/* Increase I2C speed to 1000 KHz */
#define I2C1_TIMINGR_PRESC 0U
@@ -28,9 +28,8 @@
#define I2C1_TIMINGR_SCLH 15U
#define I2C1_TIMINGR_SCLL 51U
-/* Scan phase of led driver set as MSKPHASE_9CHANNEL(defined as 0x03 in CKLED2001.h) */
-#define SCAN_PHASE_CHANNEL MSKPHASE_9CHANNEL
-#define CKLED2001_CURRENT_TUNE { 0xFC, 0xFC, 0x70, 0xFC, 0xFC, 0x70, 0xFC, 0xFC, 0x70, 0xFC, 0xFC, 0x70 }
+#define SNLED27351_PHASE_CHANNEL SNLED27351_MSKPHASE_9CHANNEL
+#define SNLED27351_CURRENT_TUNE { 0xFC, 0xFC, 0x70, 0xFC, 0xFC, 0x70, 0xFC, 0xFC, 0x70, 0xFC, 0xFC, 0x70 }
/* DIP switch */
#define DIP_SWITCH_MATRIX_GRID { {4,4} }
diff --git a/keyboards/keychron/v7/iso/info.json b/keyboards/keychron/v7/iso/info.json
index f29d9d9a32..97588498ed 100644
--- a/keyboards/keychron/v7/iso/info.json
+++ b/keyboards/keychron/v7/iso/info.json
@@ -9,7 +9,7 @@
"device_version": "1.0.0"
},
"rgb_matrix": {
- "driver": "ckled2001"
+ "driver": "snled27351"
},
"matrix_pins": {
"cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "A10", "B5"],
diff --git a/keyboards/keychron/v7/iso/iso.c b/keyboards/keychron/v7/iso/iso.c
index 4630059be4..a35dcb2092 100644
--- a/keyboards/keychron/v7/iso/iso.c
+++ b/keyboards/keychron/v7/iso/iso.c
@@ -20,8 +20,8 @@
// clang-format off
-const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to CKLED manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | R location
* | | G location
diff --git a/keyboards/keychron/v7/iso/rules.mk b/keyboards/keychron/v7/iso/rules.mk
index 46f5aef144..468ed6fae3 100644
--- a/keyboards/keychron/v7/iso/rules.mk
+++ b/keyboards/keychron/v7/iso/rules.mk
@@ -12,6 +12,3 @@ RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
AUDIO_ENABLE = no # Audio output
DIP_SWITCH_ENABLE = yes
RGB_MATRIX_ENABLE = yes
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = embedded_flash
-
diff --git a/keyboards/keychron/v8/ansi/ansi.c b/keyboards/keychron/v8/ansi/ansi.c
index 670ff2fbdb..bda7ba1d74 100644
--- a/keyboards/keychron/v8/ansi/ansi.c
+++ b/keyboards/keychron/v8/ansi/ansi.c
@@ -20,8 +20,8 @@
// clang-format off
-const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to CKLED manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | R location
* | | G location
diff --git a/keyboards/keychron/v8/ansi/info.json b/keyboards/keychron/v8/ansi/info.json
index 02780ffcde..06a657a5a8 100644
--- a/keyboards/keychron/v8/ansi/info.json
+++ b/keyboards/keychron/v8/ansi/info.json
@@ -9,7 +9,7 @@
"device_version": "1.0.0"
},
"rgb_matrix": {
- "driver": "ckled2001"
+ "driver": "snled27351"
},
"matrix_pins": {
"cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"],
diff --git a/keyboards/keychron/v8/ansi/rules.mk b/keyboards/keychron/v8/ansi/rules.mk
index e506e322d5..08a7658da3 100644
--- a/keyboards/keychron/v8/ansi/rules.mk
+++ b/keyboards/keychron/v8/ansi/rules.mk
@@ -14,6 +14,3 @@ ENCODER_ENABLE = no # Enable Encoder
ENCODER_MAP_ENABLE = no
DIP_SWITCH_ENABLE = yes
RGB_MATRIX_ENABLE = yes
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = embedded_flash
-
diff --git a/keyboards/keychron/v8/ansi_encoder/ansi_encoder.c b/keyboards/keychron/v8/ansi_encoder/ansi_encoder.c
index 670ff2fbdb..bda7ba1d74 100644
--- a/keyboards/keychron/v8/ansi_encoder/ansi_encoder.c
+++ b/keyboards/keychron/v8/ansi_encoder/ansi_encoder.c
@@ -20,8 +20,8 @@
// clang-format off
-const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to CKLED manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | R location
* | | G location
diff --git a/keyboards/keychron/v8/ansi_encoder/info.json b/keyboards/keychron/v8/ansi_encoder/info.json
index c3fc389780..6202a306c5 100644
--- a/keyboards/keychron/v8/ansi_encoder/info.json
+++ b/keyboards/keychron/v8/ansi_encoder/info.json
@@ -9,7 +9,7 @@
"device_version": "1.0.0"
},
"rgb_matrix": {
- "driver": "ckled2001"
+ "driver": "snled27351"
},
"matrix_pins": {
"cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"],
diff --git a/keyboards/keychron/v8/ansi_encoder/rules.mk b/keyboards/keychron/v8/ansi_encoder/rules.mk
index e3b0d8f03f..d53dc0f5d5 100644
--- a/keyboards/keychron/v8/ansi_encoder/rules.mk
+++ b/keyboards/keychron/v8/ansi_encoder/rules.mk
@@ -14,6 +14,3 @@ ENCODER_ENABLE = yes # Enable Encoder
ENCODER_MAP_ENABLE = no
DIP_SWITCH_ENABLE = yes
RGB_MATRIX_ENABLE = yes
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = embedded_flash
-
diff --git a/keyboards/keychron/v8/config.h b/keyboards/keychron/v8/config.h
index 7c6076e199..ed4d98799a 100644
--- a/keyboards/keychron/v8/config.h
+++ b/keyboards/keychron/v8/config.h
@@ -20,9 +20,9 @@
// #define MATRIX_UNSELECT_DRIVE_HIGH
/* RGB Matrix Driver Configuration */
-#define DRIVER_COUNT 2
-#define DRIVER_ADDR_1 0b1110111
-#define DRIVER_ADDR_2 0b1110100
+#define SNLED27351_DRIVER_COUNT 2
+#define DRIVER_ADDR_1 SNLED27351_I2C_ADDRESS_VDDIO
+#define DRIVER_ADDR_2 SNLED27351_I2C_ADDRESS_GND
/* Increase I2C speed to 1000 KHz */
#define I2C1_TIMINGR_PRESC 0U
@@ -31,9 +31,8 @@
#define I2C1_TIMINGR_SCLH 15U
#define I2C1_TIMINGR_SCLL 51U
-/* Scan phase of led driver set as MSKPHASE_9CHANNEL(defined as 0x03 in CKLED2001.h) */
-#define PHASE_CHANNEL MSKPHASE_9CHANNEL
-#define CKLED2001_CURRENT_TUNE { 0xC4, 0xC4, 0x60, 0xC4, 0xC4, 0x60, 0xC4, 0xC4, 0x60, 0xC4, 0xC4, 0x60 }
+#define SNLED27351_PHASE_CHANNEL SNLED27351_MSKPHASE_9CHANNEL
+#define SNLED27351_CURRENT_TUNE { 0xC4, 0xC4, 0x60, 0xC4, 0xC4, 0x60, 0xC4, 0xC4, 0x60, 0xC4, 0xC4, 0x60 }
/* DIP switch */
#define DIP_SWITCH_MATRIX_GRID { {4, 4} }
diff --git a/keyboards/keychron/v8/iso/info.json b/keyboards/keychron/v8/iso/info.json
index 5f30af5b1a..8b40b7d065 100644
--- a/keyboards/keychron/v8/iso/info.json
+++ b/keyboards/keychron/v8/iso/info.json
@@ -9,7 +9,7 @@
"device_version": "1.0.0"
},
"rgb_matrix": {
- "driver": "ckled2001"
+ "driver": "snled27351"
},
"matrix_pins": {
"cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"],
diff --git a/keyboards/keychron/v8/iso/iso.c b/keyboards/keychron/v8/iso/iso.c
index f64d3c4c56..88040c3ab8 100644
--- a/keyboards/keychron/v8/iso/iso.c
+++ b/keyboards/keychron/v8/iso/iso.c
@@ -20,8 +20,8 @@
// clang-format off
-const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to CKLED manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | R location
* | | G location
diff --git a/keyboards/keychron/v8/iso/rules.mk b/keyboards/keychron/v8/iso/rules.mk
index 8edab2465b..4aa9221c24 100644
--- a/keyboards/keychron/v8/iso/rules.mk
+++ b/keyboards/keychron/v8/iso/rules.mk
@@ -13,6 +13,3 @@ AUDIO_ENABLE = no # Audio output
ENCODER_ENABLE = no # Enable Encoder
DIP_SWITCH_ENABLE = yes
RGB_MATRIX_ENABLE = yes
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = embedded_flash
-
diff --git a/keyboards/keychron/v8/iso_encoder/info.json b/keyboards/keychron/v8/iso_encoder/info.json
index e13261a2d6..3d04699651 100644
--- a/keyboards/keychron/v8/iso_encoder/info.json
+++ b/keyboards/keychron/v8/iso_encoder/info.json
@@ -9,7 +9,7 @@
"device_version": "1.0.0"
},
"rgb_matrix": {
- "driver": "ckled2001"
+ "driver": "snled27351"
},
"matrix_pins": {
"cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"],
diff --git a/keyboards/keychron/v8/iso_encoder/iso_encoder.c b/keyboards/keychron/v8/iso_encoder/iso_encoder.c
index f64d3c4c56..88040c3ab8 100644
--- a/keyboards/keychron/v8/iso_encoder/iso_encoder.c
+++ b/keyboards/keychron/v8/iso_encoder/iso_encoder.c
@@ -20,8 +20,8 @@
// clang-format off
-const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to CKLED manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | R location
* | | G location
diff --git a/keyboards/keychron/v8/iso_encoder/rules.mk b/keyboards/keychron/v8/iso_encoder/rules.mk
index e3b0d8f03f..d53dc0f5d5 100644
--- a/keyboards/keychron/v8/iso_encoder/rules.mk
+++ b/keyboards/keychron/v8/iso_encoder/rules.mk
@@ -14,6 +14,3 @@ ENCODER_ENABLE = yes # Enable Encoder
ENCODER_MAP_ENABLE = no
DIP_SWITCH_ENABLE = yes
RGB_MATRIX_ENABLE = yes
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = embedded_flash
-
diff --git a/keyboards/keyhive/honeycomb/rules.mk b/keyboards/keyhive/honeycomb/rules.mk
index 040710a460..bfa5252a03 100755
--- a/keyboards/keyhive/honeycomb/rules.mk
+++ b/keyboards/keyhive/honeycomb/rules.mk
@@ -14,4 +14,4 @@ NKRO_ENABLE = yes # Enable N-Key Rollover
# # project specific files
SRC += matrix.c
-QUANTUM_LIB_SRC += uart.c
+UART_DRIVER_REQUIRED = yes
diff --git a/keyboards/kikoslab/kl90/config.h b/keyboards/kikoslab/kl90/config.h
deleted file mode 100644
index 7f9b0b12d4..0000000000
--- a/keyboards/kikoslab/kl90/config.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
-Copyright 2021 Swiftrax <swiftrax@gmail.com>
-
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#pragma once
-
-/*EEPROM for via*/
-#define DYNAMIC_KEYMAP_LAYER_COUNT 3
diff --git a/keyboards/kingly_keys/ave/ortho/keymaps/default/keymap.c b/keyboards/kingly_keys/ave/ortho/keymaps/default/keymap.c
index c8dbb6c18d..7c0dc92812 100644
--- a/keyboards/kingly_keys/ave/ortho/keymaps/default/keymap.c
+++ b/keyboards/kingly_keys/ave/ortho/keymaps/default/keymap.c
@@ -217,7 +217,7 @@ void keyboard_post_init_user(void) {
rgblight_sethsv_noeeprom(50, 255, 100);
rgblight_mode_noeeprom(RGBLIGHT_EFFECT_BREATHING + 2);
// Init the second LED to a static color:
- setrgb(225, 185, 0, (LED_TYPE *)&led[1]);
+ setrgb(225, 185, 0, (rgb_led_t *)&led[1]);
rgblight_set();
#endif // RGBLIGHT_ENABLE
}
@@ -232,7 +232,7 @@ layer_state_t layer_state_set_user(layer_state_t state){
if (layer_state_cmp(state, 3)) {
led1r = 200;
}
- setrgb(led1r, led1g, led1b, (LED_TYPE *)&led[1]);
+ setrgb(led1r, led1g, led1b, (rgb_led_t *)&led[1]);
rgblight_set();
#endif //RGBLIGHT_ENABLE
return state;
diff --git a/keyboards/kingly_keys/ave/staggered/keymaps/default/keymap.c b/keyboards/kingly_keys/ave/staggered/keymaps/default/keymap.c
index 4a56915ae5..8c5033302c 100644
--- a/keyboards/kingly_keys/ave/staggered/keymaps/default/keymap.c
+++ b/keyboards/kingly_keys/ave/staggered/keymaps/default/keymap.c
@@ -217,7 +217,7 @@ void keyboard_post_init_user(void) {
rgblight_sethsv_noeeprom(50, 255, 100);
rgblight_mode_noeeprom(RGBLIGHT_EFFECT_BREATHING + 2);
// Init the second LED to a static color:
- setrgb(225, 185, 0, (LED_TYPE *)&led[1]);
+ setrgb(225, 185, 0, (rgb_led_t *)&led[1]);
rgblight_set();
#endif // RGBLIGHT_ENABLE
}
@@ -232,7 +232,7 @@ layer_state_t layer_state_set_user(layer_state_t state){
if (layer_state_cmp(state, 3)) {
led1r = 200;
}
- setrgb(led1r, led1g, led1b, (LED_TYPE *)&led[1]);
+ setrgb(led1r, led1g, led1b, (rgb_led_t *)&led[1]);
rgblight_set();
#endif //RGBLIGHT_ENABLE
return state;
diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/wolff_abnt2/config.h b/keyboards/kprepublic/bm40hsrgb/keymaps/wolff_abnt2/config.h
deleted file mode 100755
index 418b182c3b..0000000000
--- a/keyboards/kprepublic/bm40hsrgb/keymaps/wolff_abnt2/config.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/* Copyright 2020 lmlask
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General 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 MOUSEKEY_DELAY 50
-#define MIDI_ADVANCED
-#define TAPPING_TERM 175 //For fast typing
-#define QUICK_TAP_TERM 0 //No autorepeat in tap-hold keys
-#define HOLD_ON_OTHER_KEY_PRESS //For fast typing
-
-// Min 0, max 32
-#define JOYSTICK_BUTTON_COUNT 32
-// Min 0, max 6: X, Y, Z, Rx, Ry, Rz
-#define JOYSTICK_AXIS_COUNT 0
-// Min 8, max 16
-#define JOYSTICK_AXIS_RESOLUTION 8
-
-#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
-
-//#undef ENABLE_RGB_MATRIX_ALPHAS_MODS // Enables RGB_MATRIX_ALPHAS_MODS
-#undef ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN // Enables RGB_MATRIX_GRADIENT_UP_DOWN
-#undef ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT // Enables RGB_MATRIX_GRADIENT_LEFT_RIGHT
-//#undef ENABLE_RGB_MATRIX_BREATHING // Enables RGB_MATRIX_BREATHING
-//#undef ENABLE_RGB_MATRIX_BAND_SAT // Enables RGB_MATRIX_BAND_SAT
-//#undef ENABLE_RGB_MATRIX_BAND_VAL //Enables RGB_MATRIX_BAND_VAL
-#undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT // Enables RGB_MATRIX_BAND_PINWHEEL_SAT
-#undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL // Enables RGB_MATRIX_BAND_PINWHEEL_VAL
-#undef ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT // Enables RGB_MATRIX_BAND_SPIRAL_SAT
-#undef ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL // Enables RGB_MATRIX_BAND_SPIRAL_VAL
-#undef ENABLE_RGB_MATRIX_CYCLE_ALL // Enables RGB_MATRIX_CYCLE_ALL
-#undef ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT // Enables RGB_MATRIX_CYCLE_LEFT_RIGHT
-#undef ENABLE_RGB_MATRIX_CYCLE_UP_DOWN // Enables RGB_MATRIX_CYCLE_UP_DOWN
-#undef ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON // Enables RGB_MATRIX_RAINBOW_MOVING_CHEVRON
-#undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN //Enables RGB_MATRIX_CYCLE_OUT_IN
-#undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL // Enables RGB_MATRIX_CYCLE_OUT_IN_DUAL
-#undef ENABLE_RGB_MATRIX_CYCLE_PINWHEEL // Enables RGB_MATRIX_CYCLE_PINWHEEL
-#undef ENABLE_RGB_MATRIX_CYCLE_SPIRAL // Enables RGB_MATRIX_CYCLE_SPIRAL
-#undef ENABLE_RGB_MATRIX_DUAL_BEACON //Enables RGB_MATRIX_DUAL_BEACON
-#undef ENABLE_RGB_MATRIX_RAINBOW_BEACON// Enables RGB_MATRIX_RAINBOW_BEACON
-#undef ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS // Enables RGB_MATRIX_RAINBOW_PINWHEELS
-#undef ENABLE_RGB_MATRIX_RAINDROPS //Enables RGB_MATRIX_RAINDROPS
-#undef ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS// Enables RGB_MATRIX_JELLYBEAN_RAINDROPS
-//#undef ENABLE_RGB_MATRIX_HUE_BREATHING // Enables RGB_MATRIX_HUE_BREATHING
-#undef ENABLE_RGB_MATRIX_HUE_PENDULUM //Enables RGB_MATRIX_HUE_PENDULUM
-#undef ENABLE_RGB_MATRIX_HUE_WAVE //Enables RGB_MATRIX_HUE_WAVE
-#undef ENABLE_RGB_MATRIX_PIXEL_FRACTAL //Enables RGB_MATRIX_PIXEL_FRACTAL
-#undef ENABLE_RGB_MATRIX_PIXEL_FLOW //Enables RGB_MATRIX_PIXEL_FLOW
-#undef ENABLE_RGB_MATRIX_PIXEL_RAIN //Enables RGB_MATRIX_PIXEL_RAIN
-//#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE // Enables RGB_MATRIX_SOLID_REACTIVE_SIMPLE
-//#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE // Enables RGB_MATRIX_SOLID_REACTIVE
-//#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE //Enables RGB_MATRIX_SOLID_REACTIVE_WIDE
-//#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE // Enables RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
-//#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS // Enables RGB_MATRIX_SOLID_REACTIVE_CROSS
-#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS // Enables RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
-//#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS //Enables RGB_MATRIX_SOLID_REACTIVE_NEXUS
-#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS //Enables RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
-//#undef ENABLE_RGB_MATRIX_SPLASH //Enables RGB_MATRIX_SPLASH
-#undef ENABLE_RGB_MATRIX_MULTISPLASH // Enables RGB_MATRIX_MULTISPLASH
-//#undef ENABLE_RGB_MATRIX_SOLID_SPLASH //Enables RGB_MATRIX_SOLID_SPLASH
-#undef ENABLE_RGB_MATRIX_SOLID_MULTISPLASH // Enables RGB_MATRIX_SOLID_MULTISPLASH
diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/wolff_abnt2/rules.mk b/keyboards/kprepublic/bm40hsrgb/keymaps/wolff_abnt2/rules.mk
deleted file mode 100755
index c69721fa47..0000000000
--- a/keyboards/kprepublic/bm40hsrgb/keymaps/wolff_abnt2/rules.mk
+++ /dev/null
@@ -1,19 +0,0 @@
-LTO_ENABLE = yes
-CONSOLE_ENABLE = no # Console for debug
-COMMAND_ENABLE = no # Commands for debug and configuration
-TERMINAL_ENABLE = no
-
-SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
-SPLIT_KEYBOARD = no
-KEY_LOCK_ENABLE = no
-RGB_MATRIX_ENABLE = yes
-LAYOUTS = planck_mit
-
-MIDI_ENABLE = yes
-JOYSTICK_ENABLE = yes
-JOYSTICK_DRIVER = digital
-MOUSEKEY_ENABLE = yes # Mouse keys
-EXTRAKEY_ENABLE = yes # Audio control and System control
-SWAP_HANDS_ENABLE = yes
-
-STENO_ENABLE = no # Enabling steno requires disabling all options in the previous block.
diff --git a/keyboards/kprepublic/bm40hsrgb/readme.md b/keyboards/kprepublic/bm40hsrgb/readme.md
index 609b3c4184..fd84dfb81b 100644
--- a/keyboards/kprepublic/bm40hsrgb/readme.md
+++ b/keyboards/kprepublic/bm40hsrgb/readme.md
@@ -1,6 +1,6 @@
# bm40hsrgb
-![BM40 RGB](https://rgoulter.com/images/keyboards/bm40rgb/bm40rgb_large.jpg)
+![BM40 RGB](https://i.imgur.com/eOqXMlNh.jpg)
An ortholinear 40% hotswap keyboard with per-key RGB in-switch LEDs and RGB Backlighting, from KP Republic.
@@ -12,10 +12,12 @@ This firmware was originally taken from a kbfirmware.json and manually converted
Make example for this keyboard (after setting up your build environment):
- make kprepublic/bm40hsrgb:default
+ for rev1: make kprepublic/bm40hsrgb/rev1:default
+ for rev2: make kprepublic/bm40hsrgb/rev2:default
Flashing example for this keyboard:
- make kprepublic/bm40hsrgb:default:flash
+ for rev1: make kprepublic/bm40hsrgb/rev1:default:flash
+ for rev2: make kprepublic/bm40hsrgb/rev2:default:flash
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/kprepublic/bm40hsrgb/config.h b/keyboards/kprepublic/bm40hsrgb/rev1/config.h
index ac0261a608..ac0261a608 100755
--- a/keyboards/kprepublic/bm40hsrgb/config.h
+++ b/keyboards/kprepublic/bm40hsrgb/rev1/config.h
diff --git a/keyboards/kprepublic/bm40hsrgb/info.json b/keyboards/kprepublic/bm40hsrgb/rev1/info.json
index c0ba89dbab..c0ba89dbab 100644
--- a/keyboards/kprepublic/bm40hsrgb/info.json
+++ b/keyboards/kprepublic/bm40hsrgb/rev1/info.json
diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/default/keymap.c b/keyboards/kprepublic/bm40hsrgb/rev1/keymaps/default/keymap.c
index 838561269a..838561269a 100755
--- a/keyboards/kprepublic/bm40hsrgb/keymaps/default/keymap.c
+++ b/keyboards/kprepublic/bm40hsrgb/rev1/keymaps/default/keymap.c
diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/default/readme.md b/keyboards/kprepublic/bm40hsrgb/rev1/keymaps/default/readme.md
index 7fc64a7a05..7fc64a7a05 100644
--- a/keyboards/kprepublic/bm40hsrgb/keymaps/default/readme.md
+++ b/keyboards/kprepublic/bm40hsrgb/rev1/keymaps/default/readme.md
diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/gabustoledo/config.h b/keyboards/kprepublic/bm40hsrgb/rev1/keymaps/gabustoledo/config.h
index a669c31c24..a669c31c24 100644
--- a/keyboards/kprepublic/bm40hsrgb/keymaps/gabustoledo/config.h
+++ b/keyboards/kprepublic/bm40hsrgb/rev1/keymaps/gabustoledo/config.h
diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/gabustoledo/keymap.c b/keyboards/kprepublic/bm40hsrgb/rev1/keymaps/gabustoledo/keymap.c
index a08fd535d3..a08fd535d3 100755
--- a/keyboards/kprepublic/bm40hsrgb/keymaps/gabustoledo/keymap.c
+++ b/keyboards/kprepublic/bm40hsrgb/rev1/keymaps/gabustoledo/keymap.c
diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/gabustoledo/readme.md b/keyboards/kprepublic/bm40hsrgb/rev1/keymaps/gabustoledo/readme.md
index 7540bc56bf..7540bc56bf 100644
--- a/keyboards/kprepublic/bm40hsrgb/keymaps/gabustoledo/readme.md
+++ b/keyboards/kprepublic/bm40hsrgb/rev1/keymaps/gabustoledo/readme.md
diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/gabustoledo/rules.mk b/keyboards/kprepublic/bm40hsrgb/rev1/keymaps/gabustoledo/rules.mk
index 6e27e2f523..6e27e2f523 100644
--- a/keyboards/kprepublic/bm40hsrgb/keymaps/gabustoledo/rules.mk
+++ b/keyboards/kprepublic/bm40hsrgb/rev1/keymaps/gabustoledo/rules.mk
diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/signynt/config.h b/keyboards/kprepublic/bm40hsrgb/rev1/keymaps/signynt/config.h
index 40ba18a293..40ba18a293 100644
--- a/keyboards/kprepublic/bm40hsrgb/keymaps/signynt/config.h
+++ b/keyboards/kprepublic/bm40hsrgb/rev1/keymaps/signynt/config.h
diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/signynt/keymap.c b/keyboards/kprepublic/bm40hsrgb/rev1/keymaps/signynt/keymap.c
index eb20a1a25b..eb20a1a25b 100644
--- a/keyboards/kprepublic/bm40hsrgb/keymaps/signynt/keymap.c
+++ b/keyboards/kprepublic/bm40hsrgb/rev1/keymaps/signynt/keymap.c
diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/signynt/readme.md b/keyboards/kprepublic/bm40hsrgb/rev1/keymaps/signynt/readme.md
index 97c09be255..97c09be255 100644
--- a/keyboards/kprepublic/bm40hsrgb/keymaps/signynt/readme.md
+++ b/keyboards/kprepublic/bm40hsrgb/rev1/keymaps/signynt/readme.md
diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/signynt/rules.mk b/keyboards/kprepublic/bm40hsrgb/rev1/keymaps/signynt/rules.mk
index 754f3f1f70..754f3f1f70 100644
--- a/keyboards/kprepublic/bm40hsrgb/keymaps/signynt/rules.mk
+++ b/keyboards/kprepublic/bm40hsrgb/rev1/keymaps/signynt/rules.mk
diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_loud/config.h b/keyboards/kprepublic/bm40hsrgb/rev1/keymaps/signynt_2_loud/config.h
index 508f98c053..508f98c053 100644
--- a/keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_loud/config.h
+++ b/keyboards/kprepublic/bm40hsrgb/rev1/keymaps/signynt_2_loud/config.h
diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_loud/keymap.c b/keyboards/kprepublic/bm40hsrgb/rev1/keymaps/signynt_2_loud/keymap.c
index f53e061843..f53e061843 100644
--- a/keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_loud/keymap.c
+++ b/keyboards/kprepublic/bm40hsrgb/rev1/keymaps/signynt_2_loud/keymap.c
diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_loud/readme.md b/keyboards/kprepublic/bm40hsrgb/rev1/keymaps/signynt_2_loud/readme.md
index 97c09be255..97c09be255 100644
--- a/keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_loud/readme.md
+++ b/keyboards/kprepublic/bm40hsrgb/rev1/keymaps/signynt_2_loud/readme.md
diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_loud/rules.mk b/keyboards/kprepublic/bm40hsrgb/rev1/keymaps/signynt_2_loud/rules.mk
index 754f3f1f70..754f3f1f70 100644
--- a/keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_loud/rules.mk
+++ b/keyboards/kprepublic/bm40hsrgb/rev1/keymaps/signynt_2_loud/rules.mk
diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_quiet/config.h b/keyboards/kprepublic/bm40hsrgb/rev1/keymaps/signynt_2_quiet/config.h
index 70f92bafde..70f92bafde 100644
--- a/keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_quiet/config.h
+++ b/keyboards/kprepublic/bm40hsrgb/rev1/keymaps/signynt_2_quiet/config.h
diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_quiet/keymap.c b/keyboards/kprepublic/bm40hsrgb/rev1/keymaps/signynt_2_quiet/keymap.c
index e958071c20..e958071c20 100644
--- a/keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_quiet/keymap.c
+++ b/keyboards/kprepublic/bm40hsrgb/rev1/keymaps/signynt_2_quiet/keymap.c
diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_quiet/readme.md b/keyboards/kprepublic/bm40hsrgb/rev1/keymaps/signynt_2_quiet/readme.md
index 97c09be255..97c09be255 100644
--- a/keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_quiet/readme.md
+++ b/keyboards/kprepublic/bm40hsrgb/rev1/keymaps/signynt_2_quiet/readme.md
diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_quiet/rules.mk b/keyboards/kprepublic/bm40hsrgb/rev1/keymaps/signynt_2_quiet/rules.mk
index 754f3f1f70..754f3f1f70 100644
--- a/keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_quiet/rules.mk
+++ b/keyboards/kprepublic/bm40hsrgb/rev1/keymaps/signynt_2_quiet/rules.mk
diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/via/keymap.c b/keyboards/kprepublic/bm40hsrgb/rev1/keymaps/via/keymap.c
index 838561269a..838561269a 100644
--- a/keyboards/kprepublic/bm40hsrgb/keymaps/via/keymap.c
+++ b/keyboards/kprepublic/bm40hsrgb/rev1/keymaps/via/keymap.c
diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/via/readme.md b/keyboards/kprepublic/bm40hsrgb/rev1/keymaps/via/readme.md
index bff946f327..bff946f327 100644
--- a/keyboards/kprepublic/bm40hsrgb/keymaps/via/readme.md
+++ b/keyboards/kprepublic/bm40hsrgb/rev1/keymaps/via/readme.md
diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/via/rules.mk b/keyboards/kprepublic/bm40hsrgb/rev1/keymaps/via/rules.mk
index 36b7ba9cbc..36b7ba9cbc 100644
--- a/keyboards/kprepublic/bm40hsrgb/keymaps/via/rules.mk
+++ b/keyboards/kprepublic/bm40hsrgb/rev1/keymaps/via/rules.mk
diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/wolff_abnt2/keymap.c b/keyboards/kprepublic/bm40hsrgb/rev1/keymaps/wolff_abnt2/keymap.c
index 1583392a48..1583392a48 100755
--- a/keyboards/kprepublic/bm40hsrgb/keymaps/wolff_abnt2/keymap.c
+++ b/keyboards/kprepublic/bm40hsrgb/rev1/keymaps/wolff_abnt2/keymap.c
diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/wolff_abnt2/readme.md b/keyboards/kprepublic/bm40hsrgb/rev1/keymaps/wolff_abnt2/readme.md
index 69130dbfec..69130dbfec 100755
--- a/keyboards/kprepublic/bm40hsrgb/keymaps/wolff_abnt2/readme.md
+++ b/keyboards/kprepublic/bm40hsrgb/rev1/keymaps/wolff_abnt2/readme.md
diff --git a/keyboards/kprepublic/bm40hsrgb/rev1/readme.md b/keyboards/kprepublic/bm40hsrgb/rev1/readme.md
new file mode 100644
index 0000000000..00df7b02ad
--- /dev/null
+++ b/keyboards/kprepublic/bm40hsrgb/rev1/readme.md
@@ -0,0 +1,21 @@
+# bm40hsrgb
+
+![BM40 RGB](https://imgur.com/eOqXMlNh.jpeg)
+
+An ortholinear 40% hotswap keyboard with per-key RGB in-switch LEDs and RGB Backlighting, from KP Republic.
+
+This firmware was originally taken from a kbfirmware.json and manually converted. You may find the original `.json` files [here](https://drive.google.com/drive/folders/1tlTHQIFcluK2mjZ4UbbKCsdRLgSRSPw6).
+
+* Keyboard Maintainer: [rgoulter](https://github.com/rgoulter)
+* Hardware Supported: bm40hsrgb PCB
+* Hardware Availability: [KPRepublic](https://www.aliexpress.com/item/4001147779116.html)
+
+Make example for this keyboard (after setting up your build environment):
+
+ make kprepublic/bm40hsrgb/rev1:default
+
+Flashing example for this keyboard:
+
+ make kprepublic/bm40hsrgb/rev1:default:flash
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/kprepublic/bm40hsrgb/bm40hsrgb.c b/keyboards/kprepublic/bm40hsrgb/rev1/rev1.c
index 16e515042d..16e515042d 100755
--- a/keyboards/kprepublic/bm40hsrgb/bm40hsrgb.c
+++ b/keyboards/kprepublic/bm40hsrgb/rev1/rev1.c
diff --git a/keyboards/kprepublic/bm40hsrgb/rules.mk b/keyboards/kprepublic/bm40hsrgb/rev1/rules.mk
index 7e0de4a3e8..7e0de4a3e8 100755
--- a/keyboards/kprepublic/bm40hsrgb/rules.mk
+++ b/keyboards/kprepublic/bm40hsrgb/rev1/rules.mk
diff --git a/keyboards/kprepublic/bm40hsrgb/rev2/config.h b/keyboards/kprepublic/bm40hsrgb/rev2/config.h
new file mode 100755
index 0000000000..84df5017b6
--- /dev/null
+++ b/keyboards/kprepublic/bm40hsrgb/rev2/config.h
@@ -0,0 +1,22 @@
+/* Copyright 2020 tominabox1
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+#pragma once
+
+#define DRIVER_COUNT 1
+#define DRIVER_ADDR_1 0b1010000
+#define RGB_MATRIX_LED_COUNT 47
+#define RGB_MATRIX_KEYPRESSES
+#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
diff --git a/keyboards/kprepublic/bm40hsrgb/rev2/info.json b/keyboards/kprepublic/bm40hsrgb/rev2/info.json
new file mode 100644
index 0000000000..dac848ed52
--- /dev/null
+++ b/keyboards/kprepublic/bm40hsrgb/rev2/info.json
@@ -0,0 +1,197 @@
+{
+ "keyboard_name": "BM40 Hotswap RGB",
+ "manufacturer": "KPRepublic",
+ "url": "",
+ "maintainer": "qmk",
+ "features": {
+ "bootmagic": true,
+ "mousekey": true,
+ "extrakey": true,
+ "rgblight": true,
+ "rgb_matrix": true,
+ "tri_layer": true,
+ "console": false,
+ "command": false,
+ "nkro": false,
+ "backlight": false,
+ "audio": false
+ },
+ "usb": {
+ "vid": "0x4B50",
+ "pid": "0x3430",
+ "device_version": "0.0.2"
+ },
+ "ws2812": {
+ "pin": "B0"
+ },
+ "rgblight": {
+ "led_count": 6,
+ "max_brightness": 150,
+ "animations": {
+ "knight": true,
+ "rainbow_swirl": true
+ }
+ },
+ "rgb_matrix": {
+ "driver": "is31fl3733",
+ "max_brightness": 150,
+ "animations": {
+ "alphas_mods": true,
+ "gradient_up_down": true,
+ "gradient_left_right": true,
+ "breathing": true,
+ "band_sat": true,
+ "band_val": true,
+ "band_pinwheel_sat": true,
+ "band_pinwheel_val": true,
+ "band_spiral_sat": true,
+ "band_spiral_val": true,
+ "cycle_all": true,
+ "cycle_left_right": true,
+ "cycle_up_down": true,
+ "rainbow_moving_chevron": true,
+ "cycle_out_in": true,
+ "cycle_out_in_dual": true,
+ "cycle_pinwheel": true,
+ "cycle_spiral": true,
+ "dual_beacon": true,
+ "rainbow_beacon": true,
+ "rainbow_pinwheels": true,
+ "raindrops": true,
+ "jellybean_raindrops": true,
+ "hue_breathing": true,
+ "hue_pendulum": true,
+ "hue_wave": true,
+ "pixel_rain": true,
+ "pixel_flow": true,
+ "pixel_fractal": true,
+ "typing_heatmap": true,
+ "digital_rain": true,
+ "solid_reactive_simple": true,
+ "solid_reactive": true,
+ "solid_reactive_wide": true,
+ "solid_reactive_multiwide": true,
+ "solid_reactive_cross": true,
+ "solid_reactive_multicross": true,
+ "solid_reactive_nexus": true,
+ "solid_reactive_multinexus": true,
+ "splash": true,
+ "multisplash": true,
+ "solid_splash": true,
+ "solid_multisplash": true
+ },
+ "layout": [
+ {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1},
+ {"matrix": [0, 1], "x": 20, "y": 0, "flags": 4},
+ {"matrix": [0, 2], "x": 40, "y": 0, "flags": 4},
+ {"matrix": [0, 3], "x": 61, "y": 0, "flags": 4},
+ {"matrix": [0, 4], "x": 81, "y": 0, "flags": 4},
+ {"matrix": [0, 5], "x": 101, "y": 0, "flags": 4},
+ {"matrix": [0, 6], "x": 122, "y": 0, "flags": 4},
+ {"matrix": [0, 7], "x": 142, "y": 0, "flags": 4},
+ {"matrix": [0, 8], "x": 162, "y": 0, "flags": 4},
+ {"matrix": [0, 9], "x": 183, "y": 0, "flags": 4},
+ {"matrix": [0, 10], "x": 203, "y": 0, "flags": 4},
+ {"matrix": [0, 11], "x": 224, "y": 0, "flags": 1},
+ {"matrix": [1, 0], "x": 0, "y": 21, "flags": 1},
+ {"matrix": [1, 1], "x": 20, "y": 21, "flags": 4},
+ {"matrix": [1, 2], "x": 40, "y": 21, "flags": 4},
+ {"matrix": [1, 3], "x": 61, "y": 21, "flags": 4},
+ {"matrix": [1, 4], "x": 81, "y": 21, "flags": 4},
+ {"matrix": [1, 5], "x": 101, "y": 21, "flags": 4},
+ {"matrix": [1, 6], "x": 122, "y": 21, "flags": 4},
+ {"matrix": [1, 7], "x": 142, "y": 21, "flags": 4},
+ {"matrix": [1, 8], "x": 162, "y": 21, "flags": 4},
+ {"matrix": [1, 9], "x": 183, "y": 21, "flags": 4},
+ {"matrix": [1, 10], "x": 203, "y": 21, "flags": 4},
+ {"matrix": [1, 11], "x": 224, "y": 21, "flags": 1},
+ {"matrix": [2, 0], "x": 0, "y": 42, "flags": 1},
+ {"matrix": [2, 1], "x": 20, "y": 42, "flags": 4},
+ {"matrix": [2, 2], "x": 40, "y": 42, "flags": 4},
+ {"matrix": [2, 3], "x": 61, "y": 42, "flags": 4},
+ {"matrix": [2, 4], "x": 81, "y": 42, "flags": 4},
+ {"matrix": [2, 5], "x": 101, "y": 42, "flags": 4},
+ {"matrix": [2, 6], "x": 122, "y": 42, "flags": 4},
+ {"matrix": [2, 7], "x": 142, "y": 42, "flags": 4},
+ {"matrix": [2, 8], "x": 162, "y": 42, "flags": 4},
+ {"matrix": [2, 9], "x": 183, "y": 42, "flags": 4},
+ {"matrix": [2, 10], "x": 203, "y": 42, "flags": 4},
+ {"matrix": [2, 11], "x": 224, "y": 42, "flags": 1},
+ {"matrix": [3, 0], "x": 0, "y": 64, "flags": 1},
+ {"matrix": [3, 1], "x": 20, "y": 64, "flags": 1},
+ {"matrix": [3, 2], "x": 40, "y": 64, "flags": 1},
+ {"matrix": [3, 3], "x": 61, "y": 64, "flags": 1},
+ {"matrix": [3, 4], "x": 81, "y": 64, "flags": 1},
+ {"matrix": [3, 5], "x": 111, "y": 64, "flags": 1},
+ {"matrix": [3, 7], "x": 142, "y": 64, "flags": 1},
+ {"matrix": [3, 8], "x": 162, "y": 64, "flags": 1},
+ {"matrix": [3, 9], "x": 183, "y": 64, "flags": 1},
+ {"matrix": [3, 10], "x": 203, "y": 64, "flags": 1},
+ {"matrix": [3, 11], "x": 224, "y": 64, "flags": 1}
+ ]
+ },
+ "matrix_pins": {
+ "cols": ["B2", "B3", "D5", "D3", "D2", "B7", "F0", "B4", "B5", "B6", "C6", "C7"],
+ "rows": ["D7", "F7", "F6", "F5"]
+ },
+ "diode_direction": "ROW2COL",
+ "processor": "atmega32u4",
+ "bootloader": "atmel-dfu",
+ "community_layouts": ["planck_mit"],
+ "layout_aliases": {
+ "LAYOUT_planck_mit": "LAYOUT_ortho_4x12_1x2uC"
+ },
+ "layouts": {
+ "LAYOUT_ortho_4x12_1x2uC": {
+ "layout": [
+ {"label":"K00", "matrix": [0, 0], "x":0, "y":0},
+ {"label":"K01", "matrix": [0, 1], "x":1, "y":0},
+ {"label":"K02", "matrix": [0, 2], "x":2, "y":0},
+ {"label":"K03", "matrix": [0, 3], "x":3, "y":0},
+ {"label":"K04", "matrix": [0, 4], "x":4, "y":0},
+ {"label":"K05", "matrix": [0, 5], "x":5, "y":0},
+ {"label":"K06", "matrix": [0, 6], "x":6, "y":0},
+ {"label":"K07", "matrix": [0, 7], "x":7, "y":0},
+ {"label":"K08", "matrix": [0, 8], "x":8, "y":0},
+ {"label":"K09", "matrix": [0, 9], "x":9, "y":0},
+ {"label":"K0A", "matrix": [0, 10], "x":10, "y":0},
+ {"label":"K0B", "matrix": [0, 11], "x":11, "y":0},
+ {"label":"K10", "matrix": [1, 0], "x":0, "y":1},
+ {"label":"K11", "matrix": [1, 1], "x":1, "y":1},
+ {"label":"K12", "matrix": [1, 2], "x":2, "y":1},
+ {"label":"K13", "matrix": [1, 3], "x":3, "y":1},
+ {"label":"K14", "matrix": [1, 4], "x":4, "y":1},
+ {"label":"K15", "matrix": [1, 5], "x":5, "y":1},
+ {"label":"K16", "matrix": [1, 6], "x":6, "y":1},
+ {"label":"K17", "matrix": [1, 7], "x":7, "y":1},
+ {"label":"K18", "matrix": [1, 8], "x":8, "y":1},
+ {"label":"K19", "matrix": [1, 9], "x":9, "y":1},
+ {"label":"K1A", "matrix": [1, 10], "x":10, "y":1},
+ {"label":"K1B", "matrix": [1, 11], "x":11, "y":1},
+ {"label":"K20", "matrix": [2, 0], "x":0, "y":2},
+ {"label":"K21", "matrix": [2, 1], "x":1, "y":2},
+ {"label":"K22", "matrix": [2, 2], "x":2, "y":2},
+ {"label":"K23", "matrix": [2, 3], "x":3, "y":2},
+ {"label":"K24", "matrix": [2, 4], "x":4, "y":2},
+ {"label":"K25", "matrix": [2, 5], "x":5, "y":2},
+ {"label":"K26", "matrix": [2, 6], "x":6, "y":2},
+ {"label":"K27", "matrix": [2, 7], "x":7, "y":2},
+ {"label":"K28", "matrix": [2, 8], "x":8, "y":2},
+ {"label":"K29", "matrix": [2, 9], "x":9, "y":2},
+ {"label":"K2A", "matrix": [2, 10], "x":10, "y":2},
+ {"label":"K2B", "matrix": [2, 11], "x":11, "y":2},
+ {"label":"K30", "matrix": [3, 0], "x":0, "y":3},
+ {"label":"K31", "matrix": [3, 1], "x":1, "y":3},
+ {"label":"K32", "matrix": [3, 2], "x":2, "y":3},
+ {"label":"K33", "matrix": [3, 3], "x":3, "y":3},
+ {"label":"K34", "matrix": [3, 4], "x":4, "y":3},
+ {"label":"K35", "matrix": [3, 5], "x":5, "y":3, "w":2},
+ {"label":"K37", "matrix": [3, 7], "x":7, "y":3},
+ {"label":"K38", "matrix": [3, 8], "x":8, "y":3},
+ {"label":"K39", "matrix": [3, 9], "x":9, "y":3},
+ {"label":"K3A", "matrix": [3, 10], "x":10, "y":3},
+ {"label":"K3B", "matrix": [3, 11], "x":11, "y":3}
+ ]
+ }
+ }
+}
diff --git a/keyboards/kprepublic/bm40hsrgb/rev2/keymaps/default/keymap.c b/keyboards/kprepublic/bm40hsrgb/rev2/keymaps/default/keymap.c
new file mode 100755
index 0000000000..5f389e4caf
--- /dev/null
+++ b/keyboards/kprepublic/bm40hsrgb/rev2/keymaps/default/keymap.c
@@ -0,0 +1,101 @@
+/* Copyright 2020 tominabox1
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+#include QMK_KEYBOARD_H
+
+enum layers {
+ _QWERTY,
+ _LOWER,
+ _RAISE,
+ _ADJUST
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+/* Qwerty
+ * ,-----------------------------------------------------------------------------------.
+ * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Esc | A | S | D | F | G | H | J | K | L | ; | " |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | BLTog| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_QWERTY] = LAYOUT_ortho_4x12_1x2uC(
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
+ KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT ,
+ RGB_TOG, KC_LCTL, KC_LALT, KC_LGUI, TL_LOWR, KC_SPC, TL_UPPR, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
+
+/* Lower
+ * ,-----------------------------------------------------------------------------------.
+ * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | | | | Next | Vol- | Vol+ | Play |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_LOWER] = LAYOUT_ortho_4x12_1x2uC(
+ KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC,
+ KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
+ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______,
+ _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
+),
+
+/* Raise
+ * ,-----------------------------------------------------------------------------------.
+ * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / |Pg Up |Pg Dn | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | | | | Next | Vol- | Vol+ | Play |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_RAISE] = LAYOUT_ortho_4x12_1x2uC(
+ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
+ KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
+ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______,
+ _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
+),
+
+/* Adjust (Lower + Raise)
+ * v------------------------RGB CONTROL--------------------v
+ * ,-----------------------------------------------------------------------------------.
+ * | | Reset|Debug | RGB |RGBMOD| HUE+ | HUE- | SAT+ | SAT- |BRGTH+|BRGTH-| Del |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | | | | | | | | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | | | | | | | | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | | | | | | | |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_ADJUST] = LAYOUT_ortho_4x12_1x2uC(
+ _______, QK_BOOT, DB_TOGG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL ,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+)
+
+};
+
diff --git a/keyboards/clickety_split/leeloo/keymaps/default/rules.mk b/keyboards/kprepublic/bm40hsrgb/rev2/keymaps/default/rules.mk
index 4da205a168..4da205a168 100644
--- a/keyboards/clickety_split/leeloo/keymaps/default/rules.mk
+++ b/keyboards/kprepublic/bm40hsrgb/rev2/keymaps/default/rules.mk
diff --git a/keyboards/kprepublic/bm40hsrgb/rev2/keymaps/via/keymap.c b/keyboards/kprepublic/bm40hsrgb/rev2/keymaps/via/keymap.c
new file mode 100644
index 0000000000..216d7cb888
--- /dev/null
+++ b/keyboards/kprepublic/bm40hsrgb/rev2/keymaps/via/keymap.c
@@ -0,0 +1,100 @@
+/* Copyright 2020 tominabox1
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+#include QMK_KEYBOARD_H
+
+enum layers {
+ _QWERTY,
+ _LOWER,
+ _RAISE,
+ _ADJUST
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+/* Qwerty
+ * ,-----------------------------------------------------------------------------------.
+ * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Esc | A | S | D | F | G | H | J | K | L | ; | " |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | BLTog| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_QWERTY] = LAYOUT_ortho_4x12_1x2uC(
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
+ KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT ,
+ RGB_TOG, KC_LCTL, KC_LALT, KC_LGUI, TL_LOWR, KC_SPC, TL_UPPR, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
+
+/* Lower
+ * ,-----------------------------------------------------------------------------------.
+ * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | | | | Next | Vol- | Vol+ | Play |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_LOWER] = LAYOUT_ortho_4x12_1x2uC(
+ KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC,
+ KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
+ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______,
+ _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
+),
+
+/* Raise
+ * ,-----------------------------------------------------------------------------------.
+ * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / |Pg Up |Pg Dn | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | | | | Next | Vol- | Vol+ | Play |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_RAISE] = LAYOUT_ortho_4x12_1x2uC(
+ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
+ KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
+ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______,
+ _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
+),
+
+/* Adjust (Lower + Raise)
+ * v------------------------RGB CONTROL--------------------v
+ * ,-----------------------------------------------------------------------------------.
+ * | | Reset|Debug | RGB |RGBMOD| HUE+ | HUE- | SAT+ | SAT- |BRGTH+|BRGTH-| Del |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | | | | | | | | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | | | | | | | | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | | | | | | | |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_ADJUST] = LAYOUT_ortho_4x12_1x2uC(
+ _______, QK_BOOT, DB_TOGG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL ,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+)
+
+};
diff --git a/keyboards/kprepublic/bm40hsrgb/rev2/keymaps/via/rules.mk b/keyboards/kprepublic/bm40hsrgb/rev2/keymaps/via/rules.mk
new file mode 100644
index 0000000000..0cea9288cc
--- /dev/null
+++ b/keyboards/kprepublic/bm40hsrgb/rev2/keymaps/via/rules.mk
@@ -0,0 +1,3 @@
+VIA_ENABLE = yes
+LTO_ENABLE = yes
+RGBLIGHT_ENABLE = no
diff --git a/keyboards/kprepublic/bm40hsrgb/rev2/readme.md b/keyboards/kprepublic/bm40hsrgb/rev2/readme.md
new file mode 100644
index 0000000000..2c2264e4e8
--- /dev/null
+++ b/keyboards/kprepublic/bm40hsrgb/rev2/readme.md
@@ -0,0 +1,29 @@
+# bm40hsrgb
+
+![BM40 RGB](https://i.imgur.com/eOqXMlNh.jpg)
+
+An ortholinear 40% hotswap keyboard with per-key RGB in-switch LEDs and RGB Backlighting, from KP Republic.
+
+This firmware was originally taken from a kbfirmware.json and manually converted. You may find the original `.json` files [here](https://drive.google.com/drive/folders/1tlTHQIFcluK2mjZ4UbbKCsdRLgSRSPw6).
+
+* Keyboard Maintainer: [rgoulter](https://github.com/rgoulter)
+* Hardware Supported: bm40hsrgb PCB
+* Hardware Availability: [KPRepublic](https://www.aliexpress.com/item/4001147779116.html)
+
+Make example for this keyboard (after setting up your build environment):
+
+ make kprepublic/bm40hsrgb/rev2:default
+
+Flashing example for this keyboard:
+
+ make kprepublic/bm40hsrgb/rev2:default:flash
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
+
+## Bootloader
+
+There are multiple ways to enter the bootloader so that firmware can be flashed onto the keyboard:
+
+* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (the top left key) and plug in the keyboard.
+* **Physical reset button**: Briefly press the button labeled 'RST' on the back of the PCB.
+* **Keycode in layout**: Press the key mapped to `RESET` if it is available.
diff --git a/keyboards/kprepublic/bm40hsrgb/rev2/rev2.c b/keyboards/kprepublic/bm40hsrgb/rev2/rev2.c
new file mode 100755
index 0000000000..4bf9168935
--- /dev/null
+++ b/keyboards/kprepublic/bm40hsrgb/rev2/rev2.c
@@ -0,0 +1,73 @@
+/* Copyright 2020 tominabox1, Richard Goulter <richard.goulter@gmail.com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+#include "quantum.h"
+
+#if defined(RGB_MATRIX_ENABLE)
+
+const is31fl3733_led_t PROGMEM g_is31fl3733_leds[RGB_MATRIX_LED_COUNT] = {
+ { 0, B_1, A_1, C_1 },
+ { 0, B_2, A_2, C_2 },
+ { 0, B_3, A_3, C_3 },
+ { 0, B_4, A_4, C_4 },
+ { 0, B_5, A_5, C_5 },
+ { 0, B_6, A_6, C_6 },
+ { 0, B_7, A_7, C_7 },
+ { 0, B_8, A_8, C_8 },
+ { 0, B_9, A_9, C_9 },
+ { 0, B_10, A_10, C_10 },
+ { 0, B_11, A_11, C_11 },
+ { 0, B_12, A_12, C_12 },
+
+ { 0, E_1, D_1, F_1 },
+ { 0, E_2, D_2, F_2 },
+ { 0, E_3, D_3, F_3 },
+ { 0, E_4, D_4, F_4 },
+ { 0, E_5, D_5, F_5 },
+ { 0, E_6, D_6, F_6 },
+ { 0, E_7, D_7, F_7 },
+ { 0, E_8, D_8, F_8 },
+ { 0, E_9, D_9, F_9 },
+ { 0, E_10, D_10, F_10 },
+ { 0, E_11, D_11, F_11 },
+ { 0, E_12, D_12, F_12 },
+
+ { 0, H_1, G_1, I_1 },
+ { 0, H_2, G_2, I_2 },
+ { 0, H_3, G_3, I_3 },
+ { 0, H_4, G_4, I_4 },
+ { 0, H_5, G_5, I_5 },
+ { 0, H_6, G_6, I_6 },
+ { 0, H_7, G_7, I_7 },
+ { 0, H_8, G_8, I_8 },
+ { 0, H_9, G_9, I_9 },
+ { 0, H_10, G_10, I_10 },
+ { 0, H_11, G_11, I_11 },
+ { 0, H_12, G_12, I_12 },
+
+ { 0, K_1, J_1, L_1 },
+ { 0, K_2, J_2, L_2 },
+ { 0, K_3, J_3, L_3 },
+ { 0, K_4, J_4, L_4 },
+ { 0, K_5, J_5, L_5 },
+ { 0, K_6, J_6, L_6 },
+ { 0, K_8, J_8, L_8 },
+ { 0, K_9, J_9, L_9 },
+ { 0, K_10, J_10, L_10 },
+ { 0, K_11, J_11, L_11 },
+ { 0, K_12, J_12, L_12 }
+};
+
+#endif /* RGB_MATRIX_ENABLE */
diff --git a/keyboards/kprepublic/bm40hsrgb/rev2/rules.mk b/keyboards/kprepublic/bm40hsrgb/rev2/rules.mk
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/keyboards/kprepublic/bm40hsrgb/rev2/rules.mk
diff --git a/keyboards/kprepublic/bm60hsrgb/rev2/config.h b/keyboards/kprepublic/bm60hsrgb/rev2/config.h
index 82a3a14e9e..e3f763567c 100644
--- a/keyboards/kprepublic/bm60hsrgb/rev2/config.h
+++ b/keyboards/kprepublic/bm60hsrgb/rev2/config.h
@@ -18,7 +18,7 @@
#define RGBLIGHT_DEFAULT_MODE RGBLIGHT_MODE_RAINBOW_MOOD
#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
-#define DRIVER_ADDR_1 0b1010000
+#define DRIVER_ADDR_1 IS31FL3733_I2C_ADDRESS_GND_GND
#define RGB_MATRIX_KEYPRESSES
// RGB Matrix Animation modes. Explicitly enabled
@@ -64,7 +64,7 @@
#define ENABLE_RGB_MATRIX_SOLID_SPLASH
#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
-#define DRIVER_COUNT 2
+#define IS31FL3733_DRIVER_COUNT 2
#define DRIVER_1_LED_TOTAL 63
//#define RGB_MATRIX_LED_COUNT DRIVER_1_LED_TOTAL
diff --git a/keyboards/kprepublic/bm60hsrgb/rev2/rev2.c b/keyboards/kprepublic/bm60hsrgb/rev2/rev2.c
index bbc3e8db52..a55c88c97b 100644
--- a/keyboards/kprepublic/bm60hsrgb/rev2/rev2.c
+++ b/keyboards/kprepublic/bm60hsrgb/rev2/rev2.c
@@ -22,7 +22,7 @@
# include "is31fl3733.h"
# include "ws2812.h"
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3733_led_t PROGMEM g_is31fl3733_leds[RGB_MATRIX_LED_COUNT] = {
{ 0, B_1, A_1, C_1 },
{ 0, B_2, A_2, C_2 },
{ 0, B_3, A_3, C_3 },
@@ -148,7 +148,7 @@ bool rgb_matrix_indicators_kb(void) {
// ==========================================================================
# if WS2812_LED_TOTAL > 0
-LED_TYPE rgb_matrix_ws2812_array[WS2812_LED_TOTAL];
+rgb_led_t rgb_matrix_ws2812_array[WS2812_LED_TOTAL];
# endif
static void rgb_matrix_driver_init(void) {
diff --git a/keyboards/kprepublic/bm60hsrgb/rev2/rules.mk b/keyboards/kprepublic/bm60hsrgb/rev2/rules.mk
index 534a21dbf3..805593ed5b 100644
--- a/keyboards/kprepublic/bm60hsrgb/rev2/rules.mk
+++ b/keyboards/kprepublic/bm60hsrgb/rev2/rules.mk
@@ -17,4 +17,4 @@ WS2812_DRIVER_REQUIRED = yes
COMMON_VPATH += $(DRIVER_PATH)/led/issi
SRC += is31fl3733.c
-QUANTUM_LIB_SRC += i2c_master.c
+I2C_DRIVER_REQUIRED = yes
diff --git a/keyboards/kprepublic/bm60hsrgb_ec/rev2/config.h b/keyboards/kprepublic/bm60hsrgb_ec/rev2/config.h
index b7e95393e5..0b83af45f5 100644
--- a/keyboards/kprepublic/bm60hsrgb_ec/rev2/config.h
+++ b/keyboards/kprepublic/bm60hsrgb_ec/rev2/config.h
@@ -18,8 +18,8 @@
#define RGBLIGHT_DEFAULT_MODE RGBLIGHT_MODE_RAINBOW_MOOD
# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
-# define DRIVER_ADDR_1 0b1010000
-# define DRIVER_COUNT 2
+# define DRIVER_ADDR_1 IS31FL3733_I2C_ADDRESS_GND_GND
+# define IS31FL3733_DRIVER_COUNT 2
# define DRIVER_1_LED_TOTAL 63
# define RGB_MATRIX_LED_COUNT DRIVER_1_LED_TOTAL
diff --git a/keyboards/kprepublic/bm60hsrgb_ec/rev2/rev2.c b/keyboards/kprepublic/bm60hsrgb_ec/rev2/rev2.c
index e738b47c40..fc40e0fa9a 100644
--- a/keyboards/kprepublic/bm60hsrgb_ec/rev2/rev2.c
+++ b/keyboards/kprepublic/bm60hsrgb_ec/rev2/rev2.c
@@ -15,7 +15,7 @@
#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
-const is31_led g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3733_led_t g_is31fl3733_leds[RGB_MATRIX_LED_COUNT] = {
{ 0, B_1, A_1, C_1 },
{ 0, B_2, A_2, C_2 },
{ 0, B_3, A_3, C_3 },
diff --git a/keyboards/kprepublic/bm60hsrgb_iso/rev2/config.h b/keyboards/kprepublic/bm60hsrgb_iso/rev2/config.h
index 8ad699ed9a..3e049824a7 100644
--- a/keyboards/kprepublic/bm60hsrgb_iso/rev2/config.h
+++ b/keyboards/kprepublic/bm60hsrgb_iso/rev2/config.h
@@ -26,8 +26,8 @@
# define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT
# define DISABLE_RGB_MATRIX_RAINDROPS
# define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
-# define DRIVER_ADDR_1 0b1010000
-# define DRIVER_COUNT 1
+# define DRIVER_ADDR_1 IS31FL3733_I2C_ADDRESS_GND_GND
+# define IS31FL3733_DRIVER_COUNT 1
# define DRIVER_1_LED_TOTAL 64
diff --git a/keyboards/kprepublic/bm60hsrgb_iso/rev2/rev2.c b/keyboards/kprepublic/bm60hsrgb_iso/rev2/rev2.c
index c4ac03e447..4ca2ab8de1 100644
--- a/keyboards/kprepublic/bm60hsrgb_iso/rev2/rev2.c
+++ b/keyboards/kprepublic/bm60hsrgb_iso/rev2/rev2.c
@@ -24,7 +24,7 @@
# include "ws2812.h"
-const PROGMEM is31_led g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const PROGMEM is31fl3733_led_t g_is31fl3733_leds[RGB_MATRIX_LED_COUNT] = {
{ 0, B_1, A_1, C_1 },
{ 0, B_2, A_2, C_2 },
{ 0, B_3, A_3, C_3 },
@@ -148,7 +148,7 @@ bool rgb_matrix_indicators_kb(void) {
// ==========================================================================
# if WS2812_LED_TOTAL > 0
-LED_TYPE rgb_matrix_ws2812_array[WS2812_LED_TOTAL];
+rgb_led_t rgb_matrix_ws2812_array[WS2812_LED_TOTAL];
# endif
static void rgb_matrix_driver_init(void) {
diff --git a/keyboards/kprepublic/bm60hsrgb_iso/rev2/rules.mk b/keyboards/kprepublic/bm60hsrgb_iso/rev2/rules.mk
index b6b9ff1110..d84cbc0bf1 100644
--- a/keyboards/kprepublic/bm60hsrgb_iso/rev2/rules.mk
+++ b/keyboards/kprepublic/bm60hsrgb_iso/rev2/rules.mk
@@ -20,5 +20,5 @@ RGB_MATRIX_ENABLE = yes
# here manually.
COMMON_VPATH += $(DRIVER_PATH)/led/issi
SRC += is31fl3733.c
-QUANTUM_LIB_SRC += i2c_master.c
+I2C_DRIVER_REQUIRED = yes
WS2812_DRIVER_REQUIRED = yes
diff --git a/keyboards/kprepublic/bm60hsrgb_poker/rev2/config.h b/keyboards/kprepublic/bm60hsrgb_poker/rev2/config.h
index 2c0710bfe4..d3222d703e 100644
--- a/keyboards/kprepublic/bm60hsrgb_poker/rev2/config.h
+++ b/keyboards/kprepublic/bm60hsrgb_poker/rev2/config.h
@@ -77,8 +77,8 @@
// are compiled unconditionally).
// Configure the IS31FL3733 driver for per-key RGB LEDs
-#define DRIVER_COUNT 1
-#define DRIVER_ADDR_1 0b1010000
+#define IS31FL3733_DRIVER_COUNT 1
+#define DRIVER_ADDR_1 IS31FL3733_I2C_ADDRESS_GND_GND
#define DRIVER_1_LED_TOTAL 61
#define ISSI_LED_TOTAL DRIVER_1_LED_TOTAL
diff --git a/keyboards/kprepublic/bm60hsrgb_poker/rev2/rev2.c b/keyboards/kprepublic/bm60hsrgb_poker/rev2/rev2.c
index bd976f315a..1f291a85dd 100644
--- a/keyboards/kprepublic/bm60hsrgb_poker/rev2/rev2.c
+++ b/keyboards/kprepublic/bm60hsrgb_poker/rev2/rev2.c
@@ -21,7 +21,7 @@
# include "is31fl3733.h"
# include "ws2812.h"
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3733_led_t PROGMEM g_is31fl3733_leds[RGB_MATRIX_LED_COUNT] = {
{ 0, B_1, A_1, C_1 },
{ 0, B_2, A_2, C_2 },
{ 0, B_3, A_3, C_3 },
@@ -144,7 +144,7 @@ bool rgb_matrix_indicators_kb(void) {
// ==========================================================================
# if WS2812_LED_TOTAL > 0
-LED_TYPE rgb_matrix_ws2812_array[WS2812_LED_TOTAL];
+rgb_led_t rgb_matrix_ws2812_array[WS2812_LED_TOTAL];
# endif
static void rgb_matrix_driver_init(void) {
diff --git a/keyboards/kprepublic/bm60hsrgb_poker/rev2/rules.mk b/keyboards/kprepublic/bm60hsrgb_poker/rev2/rules.mk
index 5db18e7cfa..92b33edc1f 100644
--- a/keyboards/kprepublic/bm60hsrgb_poker/rev2/rules.mk
+++ b/keyboards/kprepublic/bm60hsrgb_poker/rev2/rules.mk
@@ -19,5 +19,5 @@ RGB_MATRIX_ENABLE = yes
# here manually.
COMMON_VPATH += $(DRIVER_PATH)/led/issi
SRC += is31fl3733.c
-QUANTUM_LIB_SRC += i2c_master.c
+I2C_DRIVER_REQUIRED = yes
WS2812_DRIVER_REQUIRED = yes
diff --git a/keyboards/kprepublic/bm68hsrgb/rev2/config.h b/keyboards/kprepublic/bm68hsrgb/rev2/config.h
index 3e74f353f9..b3b1abf137 100644
--- a/keyboards/kprepublic/bm68hsrgb/rev2/config.h
+++ b/keyboards/kprepublic/bm68hsrgb/rev2/config.h
@@ -18,9 +18,9 @@
#define RGBLIGHT_DEFAULT_MODE RGBLIGHT_MODE_RAINBOW_MOOD
-#define DRIVER_ADDR_1 0b0110000
+#define DRIVER_ADDR_1 IS31FL3741_I2C_ADDRESS_GND
-#define DRIVER_COUNT 1
+#define IS31FL3741_DRIVER_COUNT 1
#define DRIVER_1_LED_TOTAL 68
#define RGB_MATRIX_LED_COUNT DRIVER_1_LED_TOTAL
#define DRIVER_INDICATOR_LED_TOTAL 0
diff --git a/keyboards/kprepublic/bm68hsrgb/rev2/rev2.c b/keyboards/kprepublic/bm68hsrgb/rev2/rev2.c
index 7251a24067..057b4669f5 100644
--- a/keyboards/kprepublic/bm68hsrgb/rev2/rev2.c
+++ b/keyboards/kprepublic/bm68hsrgb/rev2/rev2.c
@@ -17,7 +17,7 @@
#ifdef RGB_MATRIX_ENABLE
-const is31_led g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3741_led_t g_is31fl3741_leds[RGB_MATRIX_LED_COUNT] = {
{0, CS6_SW1, CS5_SW1, CS4_SW1},
{0, CS6_SW2, CS5_SW2, CS4_SW2},
{0, CS6_SW3, CS5_SW3, CS4_SW3},
diff --git a/keyboards/kprepublic/bm80v2/bm80v2.c b/keyboards/kprepublic/bm80v2/bm80v2.c
index 7a224c9ad0..13d67cdd56 100644
--- a/keyboards/kprepublic/bm80v2/bm80v2.c
+++ b/keyboards/kprepublic/bm80v2/bm80v2.c
@@ -16,7 +16,7 @@
#ifdef RGB_MATRIX_ENABLE
-const is31_led g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3741_led_t g_is31fl3741_leds[RGB_MATRIX_LED_COUNT] = {
{0, CS6_SW1, CS5_SW1, CS4_SW1},
{0, CS6_SW3, CS5_SW3, CS4_SW3},
{0, CS6_SW4, CS5_SW4, CS4_SW4},
diff --git a/keyboards/kprepublic/bm80v2/config.h b/keyboards/kprepublic/bm80v2/config.h
index 98a784d638..3678c64202 100644
--- a/keyboards/kprepublic/bm80v2/config.h
+++ b/keyboards/kprepublic/bm80v2/config.h
@@ -53,8 +53,8 @@
#define ENABLE_RGB_MATRIX_MULTISPLASH
#define ENABLE_RGB_MATRIX_SOLID_SPLASH
#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
-#define DRIVER_ADDR_1 0b0110000
-#define DRIVER_COUNT 1
+#define DRIVER_ADDR_1 IS31FL3741_I2C_ADDRESS_GND
+#define IS31FL3741_DRIVER_COUNT 1
#define DRIVER_1_LED_TOTAL 87
#define RGB_MATRIX_LED_COUNT DRIVER_1_LED_TOTAL
diff --git a/keyboards/kprepublic/bm80v2_iso/bm80v2_iso.c b/keyboards/kprepublic/bm80v2_iso/bm80v2_iso.c
index dea1a76d78..3b8daf5fee 100644
--- a/keyboards/kprepublic/bm80v2_iso/bm80v2_iso.c
+++ b/keyboards/kprepublic/bm80v2_iso/bm80v2_iso.c
@@ -16,7 +16,7 @@
#ifdef RGB_MATRIX_ENABLE
-const is31_led g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3741_led_t g_is31fl3741_leds[RGB_MATRIX_LED_COUNT] = {
{0, CS6_SW1, CS5_SW1, CS4_SW1},
{0, CS6_SW3, CS5_SW3, CS4_SW3},
{0, CS6_SW4, CS5_SW4, CS4_SW4},
diff --git a/keyboards/kprepublic/bm80v2_iso/config.h b/keyboards/kprepublic/bm80v2_iso/config.h
index 526150acbd..a8fac74218 100644
--- a/keyboards/kprepublic/bm80v2_iso/config.h
+++ b/keyboards/kprepublic/bm80v2_iso/config.h
@@ -54,8 +54,8 @@
#define ENABLE_RGB_MATRIX_MULTISPLASH
#define ENABLE_RGB_MATRIX_SOLID_SPLASH
#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
-#define DRIVER_ADDR_1 0b0110000
-#define DRIVER_COUNT 1
+#define DRIVER_ADDR_1 IS31FL3741_I2C_ADDRESS_GND
+#define IS31FL3741_DRIVER_COUNT 1
#define DRIVER_1_LED_TOTAL 88
#define RGB_MATRIX_LED_COUNT DRIVER_1_LED_TOTAL
diff --git a/keyboards/ktec/ergodone/rules.mk b/keyboards/ktec/ergodone/rules.mk
index 3ec1a7cf43..d9b0148499 100644
--- a/keyboards/ktec/ergodone/rules.mk
+++ b/keyboards/ktec/ergodone/rules.mk
@@ -3,4 +3,4 @@ CUSTOM_MATRIX = lite
VPATH += drivers/gpio
SRC += mcp23018.c matrix.c
-QUANTUM_LIB_SRC += i2c_master.c
+I2C_DRIVER_REQUIRED = yes
diff --git a/keyboards/latincompass/latin17rgb/config.h b/keyboards/latincompass/latin17rgb/config.h
index 7908e4ceca..0ce80e584e 100644
--- a/keyboards/latincompass/latin17rgb/config.h
+++ b/keyboards/latincompass/latin17rgb/config.h
@@ -69,17 +69,10 @@
// # define ENABLE_RGB_MATRIX_SOLID_SPLASH
// # define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
- // This is a 7-bit address, that gets left-shifted and bit 0
- // set to 0 for write, 1 for read (as per I2C protocol)
- // The address will vary depending on your wiring:
- // 0b1110100 AD <-> GND
- // 0b1110111 AD <-> VCC
- // 0b1110101 AD <-> SCL
- // 0b1110110 AD <-> SDA
-# define DRIVER_ADDR_1 0b1110100
-# define DRIVER_ADDR_2 0b1110110
+# define DRIVER_ADDR_1 IS31FL3731_I2C_ADDRESS_GND
+# define DRIVER_ADDR_2 IS31FL3731_I2C_ADDRESS_SDA
-# define DRIVER_COUNT 2
+# define IS31FL3731_DRIVER_COUNT 2
# define DRIVER_1_LED_TOTAL 25
# define DRIVER_2_LED_TOTAL 24
# define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
diff --git a/keyboards/latincompass/latin17rgb/latin17rgb.c b/keyboards/latincompass/latin17rgb/latin17rgb.c
index c758e8eb35..b75a11d965 100644
--- a/keyboards/latincompass/latin17rgb/latin17rgb.c
+++ b/keyboards/latincompass/latin17rgb/latin17rgb.c
@@ -17,7 +17,7 @@
#ifdef RGB_MATRIX_ENABLE
-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/keyboards/latincompass/latin60rgb/config.h b/keyboards/latincompass/latin60rgb/config.h
index 96e8b75a8e..23cfdf24ee 100644
--- a/keyboards/latincompass/latin60rgb/config.h
+++ b/keyboards/latincompass/latin60rgb/config.h
@@ -67,7 +67,7 @@
// # define ENABLE_RGB_MATRIX_MULTISPLASH
// # define ENABLE_RGB_MATRIX_SOLID_SPLASH
// # define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
-# define DRIVER_ADDR_1 0b1010000
-# define DRIVER_COUNT 1
+# define DRIVER_ADDR_1 IS31FL3733_I2C_ADDRESS_GND_GND
+# define IS31FL3733_DRIVER_COUNT 1
# define RGB_MATRIX_LED_COUNT 60
#endif
diff --git a/keyboards/latincompass/latin60rgb/latin60rgb.c b/keyboards/latincompass/latin60rgb/latin60rgb.c
index 26431fa61b..a915bede80 100644
--- a/keyboards/latincompass/latin60rgb/latin60rgb.c
+++ b/keyboards/latincompass/latin60rgb/latin60rgb.c
@@ -16,7 +16,7 @@
#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3733_led_t PROGMEM g_is31fl3733_leds[RGB_MATRIX_LED_COUNT] = {
{ 0, K_13, J_13, L_13 },
{ 0, K_12, J_12, L_12 },
{ 0, K_11, J_11, L_11 },
diff --git a/keyboards/latincompass/latin6rgb/config.h b/keyboards/latincompass/latin6rgb/config.h
index 1a6518c897..424dcd5bef 100644
--- a/keyboards/latincompass/latin6rgb/config.h
+++ b/keyboards/latincompass/latin6rgb/config.h
@@ -70,16 +70,9 @@
// # define ENABLE_RGB_MATRIX_SOLID_SPLASH
// # define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
-// This is a 7-bit address, that gets left-shifted and bit 0
-// set to 0 for write, 1 for read (as per I2C protocol)
-// The address will vary depending on your wiring:
-// 0b1110100 AD <-> GND
-// 0b1110111 AD <-> VCC
-// 0b1110101 AD <-> SCL
-// 0b1110110 AD <-> SDA
-#define DRIVER_ADDR_1 0b1110100
+#define DRIVER_ADDR_1 IS31FL3731_I2C_ADDRESS_GND
-#define DRIVER_COUNT 1
+#define IS31FL3731_DRIVER_COUNT 1
#define RGB_MATRIX_LED_COUNT 6
#endif
diff --git a/keyboards/latincompass/latin6rgb/latin6rgb.c b/keyboards/latincompass/latin6rgb/latin6rgb.c
index b7c05dd4ad..a1eb38b9af 100644
--- a/keyboards/latincompass/latin6rgb/latin6rgb.c
+++ b/keyboards/latincompass/latin6rgb/latin6rgb.c
@@ -17,7 +17,7 @@
#ifdef RGB_MATRIX_ENABLE
-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/keyboards/lfkeyboards/TWIlib.c b/keyboards/lfkeyboards/TWIlib.c
deleted file mode 100644
index 0d52322c64..0000000000
--- a/keyboards/lfkeyboards/TWIlib.c
+++ /dev/null
@@ -1,296 +0,0 @@
-/*
- * TWIlib.c
- *
- * Created: 6/01/2014 10:41:33 PM
- * Author: Chris Herring
- */
-
-#include <avr/io.h>
-#include <avr/interrupt.h>
-#include "TWIlib.h"
-#include <util/delay.h>
-#include "print.h"
-
-// Global transmit buffer
-volatile uint8_t *TWITransmitBuffer;
-// Global receive buffer
-volatile uint8_t TWIReceiveBuffer[RXMAXBUFLEN];
-// Buffer indexes
-volatile int TXBuffIndex; // Index of the transmit buffer. Is volatile, can change at any time.
-int RXBuffIndex; // Current index in the receive buffer
-// Buffer lengths
-int TXBuffLen; // The total length of the transmit buffer
-int RXBuffLen; // The total number of bytes to read (should be less than RXMAXBUFFLEN)
-
-TWIInfoStruct TWIInfo;
-
-void TWIInit(void)
-{
- TWIInfo.mode = Ready;
- TWIInfo.errorCode = 0xFF;
- TWIInfo.repStart = 0;
- // Set pre-scalers (no pre-scaling)
- TWSR = 0;
- // Set bit rate
- TWBR = ((F_CPU / TWI_FREQ) - 16) / 2;
- // Enable TWI and interrupt
- TWCR = (1 << TWIE) | (1 << TWEN);
-}
-
-uint8_t isTWIReady(void)
-{
- if ( (TWIInfo.mode == Ready) | (TWIInfo.mode == RepeatedStartSent) )
- {
- return 1;
- }
- else
- {
- if(TWIInfo.mode == Initializing){
- switch(TWIInfo.errorCode){
- case TWI_SUCCESS:
- case TWI_NO_RELEVANT_INFO:
- break;
- case TWI_LOST_ARBIT:
- case TWI_MT_DATA_NACK:
- // Some kind of I2C error, reset and re-init
- xprintf("I2C init error: %d\n", TWIInfo.errorCode);
- TWCR = (1 << TWINT)|(1 << TWSTO);
- TWIInit();
- break;
- default:
- xprintf("Other i2c init error: %d\n", TWIInfo.errorCode);
- }
- }
- return 0;
- }
-}
-
-
-void TWITransmitData(void *const TXdata, uint8_t dataLen, uint8_t repStart, uint8_t blocking)
-{
- // Wait until ready
- while (!isTWIReady()) {_delay_us(1);}
- // Reset the I2C stuff
- TWCR = (1 << TWINT)|(1 << TWSTO);
- TWIInit();
- // Set repeated start mode
- TWIInfo.repStart = repStart;
- // Copy transmit info to global variables
- TWITransmitBuffer = (uint8_t *)TXdata;
- TXBuffLen = dataLen;
- TXBuffIndex = 0;
-
- // If a repeated start has been sent, then devices are already listening for an address
- // and another start does not need to be sent.
- if (TWIInfo.mode == RepeatedStartSent)
- {
- TWIInfo.mode = Initializing;
- TWDR = TWITransmitBuffer[TXBuffIndex++]; // Load data to transmit buffer
- TWISendTransmit(); // Send the data
- }
- else // Otherwise, just send the normal start signal to begin transmission.
- {
- TWIInfo.mode = Initializing;
- TWISendStart();
- }
- if(blocking){
- // Wait until ready
- while (!isTWIReady()){_delay_us(1);}
- }
-}
-
-
-// uint8_t TWITransmitData(void *const TXdata, uint8_t dataLen, uint8_t repStart)
-// {
-// if (dataLen <= TXMAXBUFLEN)
-// {
-// // Wait until ready
-// while (!isTWIReady()) {_delay_us(1);}
-// // Set repeated start mode
-// TWIInfo.repStart = repStart;
-// // Copy data into the transmit buffer
-// uint8_t *data = (uint8_t *)TXdata;
-// for (int i = 0; i < dataLen; i++)
-// {
-// TWITransmitBuffer[i] = data[i];
-// }
-// // Copy transmit info to global variables
-// TXBuffLen = dataLen;
-// TXBuffIndex = 0;
-
-// // If a repeated start has been sent, then devices are already listening for an address
-// // and another start does not need to be sent.
-// if (TWIInfo.mode == RepeatedStartSent)
-// {
-// TWIInfo.mode = Initializing;
-// TWDR = TWITransmitBuffer[TXBuffIndex++]; // Load data to transmit buffer
-// TWISendTransmit(); // Send the data
-// }
-// else // Otherwise, just send the normal start signal to begin transmission.
-// {
-// TWIInfo.mode = Initializing;
-// TWISendStart();
-// }
-
-// }
-// else
-// {
-// return 1; // return an error if data length is longer than buffer
-// }
-// return 0;
-// }
-
-uint8_t TWIReadData(uint8_t TWIaddr, uint8_t bytesToRead, uint8_t repStart)
-{
- // Check if number of bytes to read can fit in the RXbuffer
- if (bytesToRead < RXMAXBUFLEN)
- {
- // Reset buffer index and set RXBuffLen to the number of bytes to read
- RXBuffIndex = 0;
- RXBuffLen = bytesToRead;
- // Create the one value array for the address to be transmitted
- uint8_t TXdata[1];
- // Shift the address and AND a 1 into the read write bit (set to write mode)
- TXdata[0] = (TWIaddr << 1) | 0x01;
- // Use the TWITransmitData function to initialize the transfer and address the slave
- TWITransmitData(TXdata, 1, repStart, 0);
- }
- else
- {
- return 0;
- }
- return 1;
-}
-
-ISR (TWI_vect)
-{
- switch (TWI_STATUS)
- {
- // ----\/ ---- MASTER TRANSMITTER OR WRITING ADDRESS ----\/ ---- //
- case TWI_MT_SLAW_ACK: // SLA+W transmitted and ACK received
- // Set mode to Master Transmitter
- TWIInfo.mode = MasterTransmitter;
- case TWI_START_SENT: // Start condition has been transmitted
- case TWI_MT_DATA_ACK: // Data byte has been transmitted, ACK received
- if (TXBuffIndex < TXBuffLen) // If there is more data to send
- {
- TWDR = TWITransmitBuffer[TXBuffIndex++]; // Load data to transmit buffer
- TWIInfo.errorCode = TWI_NO_RELEVANT_INFO;
- TWISendTransmit(); // Send the data
- }
- // This transmission is complete however do not release bus yet
- else if (TWIInfo.repStart)
- {
- TWIInfo.errorCode = 0xFF;
- TWISendStart();
- }
- // All transmissions are complete, exit
- else
- {
- TWIInfo.mode = Ready;
- TWIInfo.errorCode = 0xFF;
- TWISendStop();
- }
- break;
-
- // ----\/ ---- MASTER RECEIVER ----\/ ---- //
-
- case TWI_MR_SLAR_ACK: // SLA+R has been transmitted, ACK has been received
- // Switch to Master Receiver mode
- TWIInfo.mode = MasterReceiver;
- // If there is more than one byte to be read, receive data byte and return an ACK
- if (RXBuffIndex < RXBuffLen-1)
- {
- TWIInfo.errorCode = TWI_NO_RELEVANT_INFO;
- TWISendACK();
- }
- // Otherwise when a data byte (the only data byte) is received, return NACK
- else
- {
- TWIInfo.errorCode = TWI_NO_RELEVANT_INFO;
- TWISendNACK();
- }
- break;
-
- case TWI_MR_DATA_ACK: // Data has been received, ACK has been transmitted.
-
- /// -- HANDLE DATA BYTE --- ///
- TWIReceiveBuffer[RXBuffIndex++] = TWDR;
- // If there is more than one byte to be read, receive data byte and return an ACK
- if (RXBuffIndex < RXBuffLen-1)
- {
- TWIInfo.errorCode = TWI_NO_RELEVANT_INFO;
- TWISendACK();
- }
- // Otherwise when a data byte (the only data byte) is received, return NACK
- else
- {
- TWIInfo.errorCode = TWI_NO_RELEVANT_INFO;
- TWISendNACK();
- }
- break;
-
- case TWI_MR_DATA_NACK: // Data byte has been received, NACK has been transmitted. End of transmission.
-
- /// -- HANDLE DATA BYTE --- ///
- TWIReceiveBuffer[RXBuffIndex++] = TWDR;
- // This transmission is complete however do not release bus yet
- if (TWIInfo.repStart)
- {
- TWIInfo.errorCode = 0xFF;
- TWISendStart();
- }
- // All transmissions are complete, exit
- else
- {
- TWIInfo.mode = Ready;
- TWIInfo.errorCode = 0xFF;
- TWISendStop();
- }
- break;
-
- // ----\/ ---- MT and MR common ----\/ ---- //
-
- case TWI_MR_SLAR_NACK: // SLA+R transmitted, NACK received
- case TWI_MT_SLAW_NACK: // SLA+W transmitted, NACK received
- case TWI_MT_DATA_NACK: // Data byte has been transmitted, NACK received
- case TWI_LOST_ARBIT: // Arbitration has been lost
- // Return error and send stop and set mode to ready
- if (TWIInfo.repStart)
- {
- TWIInfo.errorCode = TWI_STATUS;
- TWISendStart();
- }
- // All transmissions are complete, exit
- else
- {
- TWIInfo.mode = Ready;
- TWIInfo.errorCode = TWI_STATUS;
- TWISendStop();
- }
- break;
- case TWI_REP_START_SENT: // Repeated start has been transmitted
- // Set the mode but DO NOT clear TWINT as the next data is not yet ready
- TWIInfo.mode = RepeatedStartSent;
- break;
-
- // ----\/ ---- SLAVE RECEIVER ----\/ ---- //
-
- // TODO IMPLEMENT SLAVE RECEIVER FUNCTIONALITY
-
- // ----\/ ---- SLAVE TRANSMITTER ----\/ ---- //
-
- // TODO IMPLEMENT SLAVE TRANSMITTER FUNCTIONALITY
-
- // ----\/ ---- MISCELLANEOUS STATES ----\/ ---- //
- case TWI_NO_RELEVANT_INFO: // It is not really possible to get into this ISR on this condition
- // Rather, it is there to be manually set between operations
- break;
- case TWI_ILLEGAL_START_STOP: // Illegal START/STOP, abort and return error
- TWIInfo.errorCode = TWI_ILLEGAL_START_STOP;
- TWIInfo.mode = Ready;
- TWISendStop();
- break;
- }
-
-}
diff --git a/keyboards/lfkeyboards/TWIlib.h b/keyboards/lfkeyboards/TWIlib.h
deleted file mode 100644
index 8ba261c6e5..0000000000
--- a/keyboards/lfkeyboards/TWIlib.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * TWIlib.h
- *
- * Created: 6/01/2014 10:38:42 PM
- * Author: Chris Herring
- */
-
-
-#ifndef TWILIB_H_
-#define TWILIB_H_
-// TWI bit rate
-#define TWI_FREQ 400000
-// Get TWI status
-#define TWI_STATUS (TWSR & 0xF8)
-// Transmit buffer length
-#define TXMAXBUFLEN 20
-// Receive buffer length
-#define RXMAXBUFLEN 20
-
-typedef enum {
- Ready,
- Initializing,
- RepeatedStartSent,
- MasterTransmitter,
- MasterReceiver,
- SlaceTransmitter,
- SlaveReciever
- } TWIMode;
-
- typedef struct TWIInfoStruct{
- TWIMode mode;
- uint8_t errorCode;
- uint8_t repStart;
- }TWIInfoStruct;
-
-extern TWIInfoStruct TWIInfo;
-
-// TWI Status Codes
-#define TWI_START_SENT 0x08 // Start sent
-#define TWI_REP_START_SENT 0x10 // Repeated Start sent
-// Master Transmitter Mode
-#define TWI_MT_SLAW_ACK 0x18 // SLA+W sent and ACK received
-#define TWI_MT_SLAW_NACK 0x20 // SLA+W sent and NACK received
-#define TWI_MT_DATA_ACK 0x28 // DATA sent and ACK received
-#define TWI_MT_DATA_NACK 0x30 // DATA sent and NACK received
-// Master Receiver Mode
-#define TWI_MR_SLAR_ACK 0x40 // SLA+R sent, ACK received
-#define TWI_MR_SLAR_NACK 0x48 // SLA+R sent, NACK received
-#define TWI_MR_DATA_ACK 0x50 // Data received, ACK returned
-#define TWI_MR_DATA_NACK 0x58 // Data received, NACK returned
-
-// Miscellaneous States
-#define TWI_LOST_ARBIT 0x38 // Arbitration has been lost
-#define TWI_NO_RELEVANT_INFO 0xF8 // No relevant information available
-#define TWI_ILLEGAL_START_STOP 0x00 // Illegal START or STOP condition has been detected
-#define TWI_SUCCESS 0xFF // Successful transfer, this state is impossible from TWSR as bit2 is 0 and read only
-
-
-#define TWISendStart() (TWCR = (1<<TWINT)|(1<<TWSTA)|(1<<TWEN)|(1<<TWIE)) // Send the START signal, enable interrupts and TWI, clear TWINT flag to resume transfer.
-#define TWISendStop() (TWCR = (1<<TWINT)|(1<<TWSTO)|(1<<TWEN)|(1<<TWIE)) // Send the STOP signal, enable interrupts and TWI, clear TWINT flag.
-#define TWISendTransmit() (TWCR = (1<<TWINT)|(1<<TWEN)|(1<<TWIE)) // Used to resume a transfer, clear TWINT and ensure that TWI and interrupts are enabled.
-#define TWISendACK() (TWCR = (1<<TWINT)|(1<<TWEN)|(1<<TWIE)|(1<<TWEA)) // FOR MR mode. Resume a transfer, ensure that TWI and interrupts are enabled and respond with an ACK if the device is addressed as a slave or after it receives a byte.
-#define TWISendNACK() (TWCR = (1<<TWINT)|(1<<TWEN)|(1<<TWIE)) // FOR MR mode. Resume a transfer, ensure that TWI and interrupts are enabled but DO NOT respond with an ACK if the device is addressed as a slave or after it receives a byte.
-
-// Function declarations
-void TWITransmitData(void *const TXdata, uint8_t dataLen, uint8_t repStart, uint8_t blocking);
-void TWIInit(void);
-uint8_t TWIReadData(uint8_t TWIaddr, uint8_t bytesToRead, uint8_t repStart);
-uint8_t isTWIReady(void);
-
-#endif // TWICOMMS_H_ \ No newline at end of file
diff --git a/keyboards/lfkeyboards/issi.c b/keyboards/lfkeyboards/issi.c
deleted file mode 100644
index e675a59868..0000000000
--- a/keyboards/lfkeyboards/issi.c
+++ /dev/null
@@ -1,244 +0,0 @@
-#ifdef ISSI_ENABLE
-
-#include <stdlib.h>
-#include <stdint.h>
-#include <util/delay.h>
-#include <avr/sfr_defs.h>
-#include <avr/io.h>
-#include <util/twi.h>
-#include "issi.h"
-#include "print.h"
-#include "TWIlib.h"
-
-#define ISSI_ADDR_DEFAULT 0xE8
-
-#define ISSI_REG_CONFIG 0x00
-#define ISSI_REG_CONFIG_PICTUREMODE 0x00
-#define ISSI_REG_CONFIG_AUTOPLAYMODE 0x08
-
-#define ISSI_CONF_PICTUREMODE 0x00
-#define ISSI_CONF_AUTOFRAMEMODE 0x04
-#define ISSI_CONF_AUDIOMODE 0x08
-
-#define ISSI_REG_PICTUREFRAME 0x01
-
-#define ISSI_REG_SHUTDOWN 0x0A
-#define ISSI_REG_AUDIOSYNC 0x06
-
-#define ISSI_COMMANDREGISTER 0xFD
-#define ISSI_BANK_FUNCTIONREG 0x0B // helpfully called 'page nine'
-uint8_t control[8][9] = {
- {0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0},
-};
-ISSIDeviceStruct *issi_devices[4] = {0, 0, 0, 0};
-
-#ifndef cbi
-#define cbi(sfr, bit) (_SFR_BYTE(sfr) &= ~_BV(bit))
-#endif
-
-#ifndef sbi
-#define sbi(sfr, bit) (_SFR_BYTE(sfr) |= _BV(bit))
-#endif
-
-#define I2C_WRITE 0
-#define F_SCL 400000UL // SCL frequency
-#define Prescaler 1
-#define TWBR_val ((((F_CPU / F_SCL) / Prescaler) - 16 ) / 2)
-
-uint8_t i2c_start(uint8_t address)
-{
- // reset TWI control register
- TWCR = 0;
- // transmit START condition
- TWCR = (1<<TWINT) | (1<<TWSTA) | (1<<TWEN);
- // wait for end of transmission
- while( !(TWCR & (1<<TWINT)) );
-
- // check if the start condition was successfully transmitted
- if((TWSR & 0xF8) != TW_START){ return 1; }
-
- // load slave address into data register
- TWDR = address;
- // start transmission of address
- TWCR = (1<<TWINT) | (1<<TWEN);
- // wait for end of transmission
- while( !(TWCR & (1<<TWINT)) );
-
- // check if the device has acknowledged the READ / WRITE mode
- uint8_t twst = TW_STATUS & 0xF8;
- if ( (twst != TW_MT_SLA_ACK) && (twst != TW_MR_SLA_ACK) ) return 1;
-
- return 0;
-}
-
-uint8_t i2c_write(uint8_t data)
-{
- // load data into data register
- TWDR = data;
- // start transmission of data
- TWCR = (1 << TWINT) | (1 << TWEN);
- // wait for end of transmission
- while (!(TWCR & (1 << TWINT)))
- ;
-
- if ((TWSR & 0xF8) != TW_MT_DATA_ACK) {
- return 1;
- }
- return 0;
-}
-
-uint8_t i2c_transmit(uint8_t address, uint8_t* data, uint16_t length)
-{
- TWBR = (uint8_t)TWBR_val;
- if (i2c_start(address | I2C_WRITE))
- return 1;
- for (uint16_t i = 0; i < length; i++) {
- if (i2c_write(data[i]))
- return 1;
- }
- // transmit STOP condition
- TWCR = (1 << TWINT) | (1 << TWEN) | (1 << TWSTO);
- return 0;
-}
-
-void setFrame(uint8_t device, uint8_t frame)
-{
- static uint8_t current_frame = -1;
- if(current_frame != frame){
- uint8_t payload[] = {
- ISSI_ADDR_DEFAULT | device << 1,
- ISSI_COMMANDREGISTER,
- frame
- };
- TWITransmitData(payload, sizeof(payload), 0, 1);
- }
- // static uint8_t current_frame = 0xFF;
- // if(current_frame == frame){
- // // return;
- // }
- // uint8_t payload[2] = { ISSI_COMMANDREGISTER, frame };
- // i2c_transmit(ISSI_ADDR_DEFAULT | device << 1, payload, 2);
- // current_frame = frame;
-}
-
-void writeRegister8(uint8_t device, uint8_t frame, uint8_t reg, uint8_t data)
-{
- // Set the frame
- setFrame(device, frame);
-
- // Write to the register
- uint8_t payload[] = {
- ISSI_ADDR_DEFAULT | device << 1,
- reg,
- data
- };
- TWITransmitData(payload, sizeof(payload), 0, 1);
-}
-
-void activateLED(uint8_t matrix, uint8_t cx, uint8_t cy, uint8_t pwm)
-{
- uint8_t device_addr = (matrix & 0x06) >> 1;
- ISSIDeviceStruct *device = issi_devices[device_addr];
- if(device == 0){
- return;
- }
- // xprintf("activeLED: %02X %02X %02X %02X\n", matrix, cy, cx, pwm);
- uint8_t x = cx - 1; // funciton takes 1 based counts, but we need 0...
- uint8_t y = cy - 1; // creating them once for less confusion
- uint8_t control_reg = (y << 1) | (matrix & 0x01);
- if(pwm == 0){
- cbi(device->led_ctrl[control_reg], x);
- cbi(device->led_blink_ctrl[control_reg], x);
- }else{
- sbi(device->led_ctrl[control_reg], x);
- sbi(device->led_blink_ctrl[control_reg], x);
- }
- uint8_t pwm_reg = 0;
- switch(matrix & 0x01){
- case 0:
- pwm_reg = 0x00;
- break;
- case 1:
- pwm_reg = 0x08;
- break;
- }
- pwm_reg += (y << 4) + x;
- device->led_pwm[pwm_reg] = pwm;
- device->led_dirty = 1;
-}
-
-void update_issi(uint8_t device_addr, uint8_t blocking)
-{
- // This seems to take about 6ms
- ISSIDeviceStruct *device = issi_devices[device_addr];
- if(device != 0){
- if(device->fn_dirty){
- device->fn_dirty = 0;
- setFrame(device_addr, ISSI_BANK_FUNCTIONREG);
- TWITransmitData(&device->fn_device_addr, sizeof(device->fn_registers) + 2, 0, 1);
- }
- if(device->led_dirty){
- device->led_dirty = 0;
- setFrame(device_addr, 0);
- TWITransmitData(&device->led_device_addr, 0xB6, 0, blocking);
- }
- }
-}
-
-void issi_init(void)
-{
- TWIInit();
- for(uint8_t device_addr = 0; device_addr < 4; device_addr++){
- // If this device has been previously allocated, free it
- if(issi_devices[device_addr] != 0){
- free(issi_devices[device_addr]);
- }
- // Try to shutdown the device, if this fails skip this device
- writeRegister8(device_addr, ISSI_BANK_FUNCTIONREG, ISSI_REG_SHUTDOWN, 0x00);
- while (!isTWIReady()){_delay_us(1);}
- if(TWIInfo.errorCode != 0xFF){
- xprintf("ISSI init failed %d %02X %02X\n", device_addr, TWIInfo.mode, TWIInfo.errorCode);
- continue;
- }
- // Allocate the device structure - calloc zeros it for us
- ISSIDeviceStruct *device = (ISSIDeviceStruct *)calloc(sizeof(ISSIDeviceStruct) * 2, 1);
- issi_devices[device_addr] = device;
- device->fn_device_addr = ISSI_ADDR_DEFAULT | device_addr << 1;
- device->fn_register_addr = 0;
- device->led_device_addr = ISSI_ADDR_DEFAULT | device_addr << 1;
- device->led_register_addr = 0;
- // set dirty bits so that all of the buffered data is written out
- device->fn_dirty = 1;
- device->led_dirty = 1;
- update_issi(device_addr, 1);
- // Set the function register to picture mode
- // device->fn_reg[ISSI_REG_CONFIG] = ISSI_REG_CONFIG_PICTUREMODE;
- writeRegister8(device_addr, ISSI_BANK_FUNCTIONREG, ISSI_REG_SHUTDOWN, 0x01);
- }
-
- // Shutdown and set all registers to 0
- // writeRegister8(device_addr, ISSI_BANK_FUNCTIONREG, ISSI_REG_SHUTDOWN, 0x00);
- // for(uint8_t bank = 0; bank <= 7; bank++){
- // for (uint8_t reg = 0x00; reg <= 0xB3; reg++) {
- // writeRegister8(device_addr, bank, reg, 0x00);
- // }
- // }
- // for (uint8_t reg = 0; reg <= 0x0C; reg++) {
- // writeRegister8(device_addr, ISSI_BANK_FUNCTIONREG, reg, 0x00);
- // }
- // writeRegister8(device_addr, ISSI_BANK_FUNCTIONREG, ISSI_REG_CONFIG, ISSI_REG_CONFIG_PICTUREMODE);
- // writeRegister8(device_addr, ISSI_BANK_FUNCTIONREG, ISSI_REG_SHUTDOWN, 0x01);
- // picture mode
- // writeRegister8(ISSI_BANK_FUNCTIONREG, 0x01, 0x01);
-
- //Enable blink
- // writeRegister8(ISSI_BANK_FUNCTIONREG, 0x05, 0x48B);
-
- //Enable Breath
-
-}
-
-#endif \ No newline at end of file
diff --git a/keyboards/lfkeyboards/issi.h b/keyboards/lfkeyboards/issi.h
deleted file mode 100644
index 74379ddbc8..0000000000
--- a/keyboards/lfkeyboards/issi.h
+++ /dev/null
@@ -1,39 +0,0 @@
-#pragma once
-
-#ifdef ISSI_ENABLE
-
-typedef struct ISSIDeviceStruct{
- uint8_t fn_dirty; // function registers need to be resent
- uint8_t fn_device_addr;
- uint8_t fn_register_addr;
- uint8_t fn_registers[13];
- uint8_t led_dirty; // LED data has changed and needs to be resent
- uint8_t led_device_addr;
- uint8_t led_register_addr;
- uint8_t led_ctrl[18];
- uint8_t led_blink_ctrl[18];
- uint8_t led_pwm[144];
-}ISSIDeviceStruct;
-
-extern ISSIDeviceStruct *issi_devices[];
-
-// Low level commands- 'device' is the 2-bit i2c id.
-void issi_init(void);
-void set_shutdown(uint8_t device, uint8_t shutdown);
-void writeRegister8(uint8_t device, uint8_t frame, uint8_t reg, uint8_t data);
-
-// Higher level, no device is given, but it is calculated from 'matrix'
-// Each device has 2 blocks, max of 4 devices:
-// Device | Block = Matrix
-// 0 A 0
-// 0 B 1
-// 1 A 2
-// 1 B 3
-// 2 A 4
-// 2 B 5
-// 3 A 6
-// 3 B 7
-void activateLED(uint8_t matrix, uint8_t cx, uint8_t cy, uint8_t pwm);
-void update_issi(uint8_t device_addr, uint8_t blocking);
-
-#endif
diff --git a/keyboards/lfkeyboards/lfk65_hs/config.h b/keyboards/lfkeyboards/lfk65_hs/config.h
index 221eee1bd4..7bc78f68d6 100644
--- a/keyboards/lfkeyboards/lfk65_hs/config.h
+++ b/keyboards/lfkeyboards/lfk65_hs/config.h
@@ -1,7 +1,5 @@
#pragma once
-#define BACKLIGHT_PWM_MAP {8, 16, 40, 55, 70, 128, 200, 255}
-
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE
/* Locking resynchronize hack */
diff --git a/keyboards/lfkeyboards/lfk65_hs/info.json b/keyboards/lfkeyboards/lfk65_hs/info.json
index ca2e2c695b..0034fced4a 100644
--- a/keyboards/lfkeyboards/lfk65_hs/info.json
+++ b/keyboards/lfkeyboards/lfk65_hs/info.json
@@ -13,28 +13,6 @@
"rows": ["B0", "B3", "B2", "B1", "F5"]
},
"diode_direction": "COL2ROW",
- "backlight": {
- "levels": 8
- },
- "rgblight": {
- "hue_steps": 10,
- "led_count": 20,
- "animations": {
- "breathing": true,
- "rainbow_mood": true,
- "rainbow_swirl": true,
- "snake": true,
- "knight": true,
- "christmas": true,
- "static_gradient": true,
- "rgb_test": true,
- "alternating": true,
- "twinkle": true
- }
- },
- "ws2812": {
- "pin": "C7"
- },
"processor": "atmega32u4",
"bootloader": "atmel-dfu",
"layouts": {
diff --git a/keyboards/lfkeyboards/lfk65_hs/lfk65_hs.c b/keyboards/lfkeyboards/lfk65_hs/lfk65_hs.c
index 47ad655ddc..ee8d8b2e73 100644
--- a/keyboards/lfkeyboards/lfk65_hs/lfk65_hs.c
+++ b/keyboards/lfkeyboards/lfk65_hs/lfk65_hs.c
@@ -1,13 +1,10 @@
-#include <avr/sfr_defs.h>
-#include <avr/timer_avr.h>
-#include <avr/wdt.h>
#include "lfk65_hs.h"
+#include <avr/wdt.h>
bool process_record_kb(uint16_t keycode, keyrecord_t* record)
{
if (keycode == QK_BOOT) {
reset_keyboard_kb();
- } else {
}
return process_record_user(keycode, record);
}
diff --git a/keyboards/lfkeyboards/lfk65_hs/lfk65_hs.h b/keyboards/lfkeyboards/lfk65_hs/lfk65_hs.h
index 2be617b404..90031022d3 100644
--- a/keyboards/lfkeyboards/lfk65_hs/lfk65_hs.h
+++ b/keyboards/lfkeyboards/lfk65_hs/lfk65_hs.h
@@ -1,8 +1,5 @@
#pragma once
#include "quantum.h"
-#include "matrix.h"
-#include <avr/sfr_defs.h>
-#include <stdint.h>
void reset_keyboard_kb(void);
diff --git a/keyboards/lfkeyboards/lfk65_hs/rules.mk b/keyboards/lfkeyboards/lfk65_hs/rules.mk
index 5589209fdd..e69de29bb2 100644
--- a/keyboards/lfkeyboards/lfk65_hs/rules.mk
+++ b/keyboards/lfkeyboards/lfk65_hs/rules.mk
@@ -1,2 +0,0 @@
-# Extra source files for IS3731 lighting
-SRC = TWIlib.c issi.c lighting.c
diff --git a/keyboards/lfkeyboards/lfk78/config.h b/keyboards/lfkeyboards/lfk78/config.h
index 89d9c4b243..99c3904213 100644
--- a/keyboards/lfkeyboards/lfk78/config.h
+++ b/keyboards/lfkeyboards/lfk78/config.h
@@ -17,8 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once
-#define BACKLIGHT_PWM_MAP { 8, 16, 40, 55, 70, 128, 200, 255 }
-
#define AUDIO_PIN C6
#define AUDIO_VOICES
diff --git a/keyboards/lfkeyboards/lfk78/keymaps/ca178858/keymap.c b/keyboards/lfkeyboards/lfk78/keymaps/ca178858/keymap.c
index f4d1e010ee..80e267e458 100644
--- a/keyboards/lfkeyboards/lfk78/keymaps/ca178858/keymap.c
+++ b/keyboards/lfkeyboards/lfk78/keymaps/ca178858/keymap.c
@@ -15,23 +15,6 @@ enum {
bool spam_space = false;
-// {0x00000000, 0xFFFFFFFF, {0x0000, 0x0FFF, 0x0000}}, // base layer - green
-// {0x00000008, 0xFFFFFFF8, {0x07FF, 0x07FF, 0x0000}}, // CSGO layer - orange
-// {0x00000010, 0xFFFFFFF0, {0x0000, 0x0000, 0x0FFF}}, // function layer - blue
-// {0x00000020, 0xFFFFFFE0, {0x0FFF, 0x0000, 0x0FFF}}, // settings layer - magenta
-// {0xFFFFFFFF, 0xFFFFFFFF, {0x0FFF, 0x0FFF, 0x0FFF}}, // unknown layer - REQUIRED - white
-
-// Colors of the layer indicator LED
-// This list needs to define layer 0xFFFFFFFF, it is the end of the list, and the unknown layer
-const Layer_Info layer_info[] = {
- // Layer Mask Red Green Blue
- {0x00000000, 0xFFFFFFFF, {0x0000, 0x0FFF, 0x0000}}, // base layer - green
- {0x00000002, 0xFFFFFFFE, {0x07FF, 0x07FF, 0x0000}}, // CSGO layer - orange
- {0x00000004, 0xFFFFFFFC, {0x0000, 0x0000, 0x0FFF}}, // function layer - blue
- {0x00000008, 0xFFFFFFE8, {0x0FFF, 0x0000, 0x0FFF}}, // settings layer - magenta
- {0xFFFFFFFF, 0xFFFFFFFF, {0x0FFF, 0x0FFF, 0x0FFF}}, // unknown layer - REQUIRED - white
-};
-
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap BASE: (Base Layer) Default Layer
* ,---------. ,------------------------------------------------------------. ,---------.
@@ -55,7 +38,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),
[CS_GO] = LAYOUT_split_rshift(
- _______, _______, QK_GESC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, F(0), _______,
+ _______, _______, QK_GESC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, KC_LCTL, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
diff --git a/keyboards/lfkeyboards/lfk78/keymaps/ca178858/rules.mk b/keyboards/lfkeyboards/lfk78/keymaps/ca178858/rules.mk
index 481ff1407b..732bfcfa8f 100644
--- a/keyboards/lfkeyboards/lfk78/keymaps/ca178858/rules.mk
+++ b/keyboards/lfkeyboards/lfk78/keymaps/ca178858/rules.mk
@@ -1,34 +1,3 @@
-BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite
-MOUSEKEY_ENABLE = no # Mouse keys(+4700)
-EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
-CONSOLE_ENABLE = no # Console for debug(+400)
-COMMAND_ENABLE = no # Commands for debug and configuration
-NKRO_ENABLE = yes
-BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
-MIDI_ENABLE = no # MIDI controls
-AUDIO_ENABLE = no # Audio output on port C6
-UNICODE_ENABLE = no # Unicode
-BLUETOOTH_ENABLE = no # Disable Bluetooth with the Adafruit EZ-Key HID
-RGBLIGHT_ENABLE = no # Enable RGB underlight
-SLEEP_LED_ENABLE = yes
+AUDIO_ENABLE = no
TAP_DANCE_ENABLE = yes
-
-ISSI_ENABLE = yes # If the I2C pullup resistors aren't install this must be disabled
WATCHDOG_ENABLE = yes # Resets keyboard if matrix_scan isn't run every 250ms
-
-
-# # Set the LFK78 hardware version. This is defined in rules.mk, but can be overidden here if desired
-# #
-# # RevB - first public release, uses atmega32u4, has audio, ISSI matrix split between RGB and backlight
-# # RevC/D - at90usb1286, no audio, ISSI device 0 is backlight, 4 is RGB
-# #
-# # Set to B, C or D
-# LFK_REV = D
-
-# ifeq ($(LFK_REV), B)
-# MCU = atmega32u4
-# else
-# MCU = at90usb1286
-# endif
-# OPT_DEFS += -DLFK_REV_$(LFK_REV)
-# OPT_DEFS += -DUSB_PRODUCT=\"LFK_Rev$(LFK_REV)\"
diff --git a/keyboards/lfkeyboards/lfk78/keymaps/default/keymap.c b/keyboards/lfkeyboards/lfk78/keymaps/default/keymap.c
index 4b0a7e2196..d81ed91814 100644
--- a/keyboards/lfkeyboards/lfk78/keymaps/default/keymap.c
+++ b/keyboards/lfkeyboards/lfk78/keymaps/default/keymap.c
@@ -6,16 +6,6 @@ enum keymap_layout {
SETTINGS
};
-// Colors of the layer indicator LED
-// This list needs to define layer 0xFFFFFFFF, it is the end of the list, and the unknown layer
-const Layer_Info layer_info[] = {
- // Layer Mask Red Green Blue
- { 0x00000000, 0xFFFFFFFF, { 0x0000, 0x0FFF, 0x0000 } }, // base layer - green
- { 0x00000002, 0xFFFFFFFE, { 0x0000, 0x0000, 0x0FFF } }, // function layer - blue
- { 0x00000004, 0xFFFFFFFC, { 0x0FFF, 0x0000, 0x0FFF } }, // settings layer - magenta
- { 0xFFFFFFFF, 0xFFFFFFFF, { 0x0FFF, 0x0FFF, 0x0FFF } } // unknown layer - REQUIRED - white
-};
-
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap VANILLA: (Base Layer) Default Layer
* ,---------. ,------------------------------------------------------------. ,---------.
diff --git a/keyboards/lfkeyboards/lfk78/keymaps/iso/keymap.c b/keyboards/lfkeyboards/lfk78/keymaps/iso/keymap.c
index 7db914604d..1f3ef6fc8e 100644
--- a/keyboards/lfkeyboards/lfk78/keymaps/iso/keymap.c
+++ b/keyboards/lfkeyboards/lfk78/keymaps/iso/keymap.c
@@ -6,16 +6,6 @@ enum keymap_layout {
SETTINGS
};
-// Colors of the layer indicator LED
-// This list needs to define layer 0xFFFFFFFF, it is the end of the list, and the unknown layer
-const Layer_Info layer_info[] = {
- // Layer Mask Red Green Blue
- { 0x00000000, 0xFFFFFFFF, { 0x0000, 0x0FFF, 0x0000 } }, // base layer - green
- { 0x00000002, 0xFFFFFFFE, { 0x0000, 0x0000, 0x0FFF } }, // function layer - blue
- { 0x00000004, 0xFFFFFFFC, { 0x0FFF, 0x0000, 0x0FFF } }, // settings layer - magenta
- { 0xFFFFFFFF, 0xFFFFFFFF, { 0x0FFF, 0x0FFF, 0x0FFF } } // unknown layer - REQUIRED - white
-};
-
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap VANILLA: (Base Layer) Default Layer
* ,---------. ,------------------------------------------------------------. ,---------.
diff --git a/keyboards/lfkeyboards/lfk78/keymaps/split_bs_osx/keymap.c b/keyboards/lfkeyboards/lfk78/keymaps/split_bs_osx/keymap.c
index 00e292d61f..041c3cdfd0 100644
--- a/keyboards/lfkeyboards/lfk78/keymaps/split_bs_osx/keymap.c
+++ b/keyboards/lfkeyboards/lfk78/keymaps/split_bs_osx/keymap.c
@@ -6,16 +6,6 @@ enum keymap_layout {
SETTINGS
};
-// Colors of the layer indicator LED
-// This list needs to define layer 0xFFFFFFFF, it is the end of the list, and the unknown layer
-const Layer_Info layer_info[] = {
- // Layer Mask Red Green Blue
- { 0x00000000, 0xFFFFFFFF, { 0x0000, 0x0FFF, 0x0000 } }, // base layer - green
- { 0x00000002, 0xFFFFFFFE, { 0x0000, 0x0000, 0x0FFF } }, // function layer - blue
- { 0x00000004, 0xFFFFFFFC, { 0x0FFF, 0x0000, 0x0FFF } }, // settings layer - magenta
- { 0xFFFFFFFF, 0xFFFFFFFF, { 0x0FFF, 0x0FFF, 0x0FFF } } // unknown layer - REQUIRED - white
-};
-
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap VANILLA: (Base Layer) Default Layer
* ,---------. ,------------------------------------------------------------. ,---------.
diff --git a/keyboards/lfkeyboards/lfk78/lfk78.c b/keyboards/lfkeyboards/lfk78/lfk78.c
index 3a10f51cb6..50f1505050 100644
--- a/keyboards/lfkeyboards/lfk78/lfk78.c
+++ b/keyboards/lfkeyboards/lfk78/lfk78.c
@@ -1,55 +1,19 @@
#include "lfk78.h"
-
-#include <avr/timer_avr.h>
#include <avr/wdt.h>
-#include "issi.h"
-#include "TWIlib.h"
-#include "lighting.h"
-
-#ifdef AUDIO_ENABLE
-# include "audio.h"
-#endif
uint16_t click_hz = CLICK_HZ;
uint16_t click_time = CLICK_MS;
uint8_t click_toggle = CLICK_ENABLED;
-__attribute__((weak))
-const Layer_Info layer_info[] = {
- // Layer Mask Red Green Blue
- { 0x00000000, 0xFFFFFFFF, { 0x0000, 0x0FFF, 0x0000 } }, // base layer - green
- { 0x00000002, 0xFFFFFFFE, { 0x0000, 0x0000, 0x0FFF } }, // function layer - blue
- { 0x00000004, 0xFFFFFFFC, { 0x0FFF, 0x0000, 0x0FFF } }, // settings layer - magenta
- { 0xFFFFFFFF, 0xFFFFFFFF, { 0x0FFF, 0x0FFF, 0x0FFF } } // unknown layer - REQUIRED - white
-};
-
void matrix_init_kb(void) {
matrix_init_user();
- // Configure the Layer LED
- // Set up 16 bit PWM: Fast PWM, mode 14, inverted
- TCCR1A = _BV(COM1A1) | _BV(COM1A0) | _BV(COM1B1) | _BV(COM1B0) | _BV(COM1C1) | _BV(COM1C0) | _BV(WGM11);
- TCCR1B = _BV(WGM13) | _BV(WGM12) | _BV(CS10);
- ICR1 = 0xFFFF;
- // PWM values - 0xFFFF = off, 0x0000 = max
- OCR1A = 0x0FFF; // B5 - Red
- OCR1B = 0x0000; // B6 - Green
- OCR1C = 0x0000; // B7 - Blue
- // Set as output
- setPinOutput(B5);
- setPinOutput(B6);
- setPinOutput(B7);
-
#ifndef AUDIO_ENABLE
// If we're not using the audio pin, drive it low
setPinOutput(C6);
writePinLow(C6);
#endif
-#ifdef ISSI_ENABLE
- issi_init();
-#endif
-
#ifdef WATCHDOG_ENABLE
// This is done after turning the layer LED red, if we're caught in a loop
// we should get a flashing red light
@@ -62,54 +26,6 @@ void matrix_scan_kb(void) {
wdt_reset();
#endif
-#ifdef ISSI_ENABLE
- // switch/underglow lighting update
- static uint32_t issi_device = 0;
- static uint32_t twi_last_ready = 0;
-
- if (twi_last_ready > 1000) {
- // It's been way too long since the last ISSI update, reset the I2C bus and start again
- dprintf("TWI failed to recover, TWI re-init\n");
- twi_last_ready = 0;
- TWIInit();
- force_issi_refresh();
- }
-
- if (isTWIReady()) {
- twi_last_ready = 0;
- // If the i2c bus is available, kick off the issi update, alternate between devices
- update_issi(issi_device, issi_device);
-
- if (issi_device) {
- issi_device = 0;
- } else {
- issi_device = 3;
- }
- } else {
- twi_last_ready++;
- }
-#endif
-
- // Update layer indicator LED
- //
- // Not sure how else to reliably do this... TMK has the 'hook_layer_change'
- // but can't find QMK equiv
- static uint32_t layer_indicator = -1;
-
- if (layer_indicator != layer_state) {
- for (uint32_t i = 0; ; i++) {
- // the layer_info list should end with layer 0xFFFFFFFF
- // it will break this out of the loop and define the unknown layer color
- if ((layer_info[i].layer == (layer_state & layer_info[i].mask)) || (layer_info[i].layer == 0xFFFFFFFF)) {
- OCR1A = layer_info[i].color.red;
- OCR1B = layer_info[i].color.green;
- OCR1C = layer_info[i].color.blue;
- layer_indicator = layer_state;
- break;
- }
- }
- }
-
matrix_scan_user();
}
@@ -144,34 +60,5 @@ void reset_keyboard_kb(void) {
wdt_reset();
#endif
- OCR1A = 0x0000; // B5 - Red
- OCR1B = 0x0FFF; // B6 - Green
- OCR1C = 0x0FFF; // B7 - Blue
-
reset_keyboard();
}
-
-bool led_update_kb(led_t led_state) {
- bool res = led_update_user(led_state);
- if(res) {
-#ifdef ISSI_ENABLE
-# ifdef CAPSLOCK_LED
- if (led_state.caps_lock) {
- activateLED(0, 3, 7, 255);
- } else {
- activateLED(0, 3, 7, 0);
- }
-# endif // CAPSLOCK_LED
-#endif // ISS_ENABLE
-
- }
- return res;
-}
-
-// LFK lighting info
-const uint8_t switch_matrices[] = { 0, 1 };
-const uint8_t rgb_matrices[] = { 6, 7 };
-const uint8_t rgb_sequence[] = {
- 12, 11, 10, 9, 16, 32, 31, 30, 28, 25, 24, 22, 21,
- 20, 19, 18, 17, 1, 2, 3, 4, 5, 6, 7, 8, 14, 13
-};
diff --git a/keyboards/lfkeyboards/lfk78/lfk78.h b/keyboards/lfkeyboards/lfk78/lfk78.h
index 1be53181cd..ee6f8d47e0 100644
--- a/keyboards/lfkeyboards/lfk78/lfk78.h
+++ b/keyboards/lfkeyboards/lfk78/lfk78.h
@@ -2,21 +2,6 @@
#include "quantum.h"
-typedef struct RGB_Color {
- uint16_t red;
- uint16_t green;
- uint16_t blue;
-} RGB_Color;
-
-typedef struct Layer_Info {
- uint32_t layer;
- uint32_t mask;
- RGB_Color color;
-} Layer_Info;
-
-extern const uint32_t layer_count;
-extern const Layer_Info layer_info[];
-
#define CLICK_HZ 500
#define CLICK_MS 2
#define CLICK_ENABLED 0
diff --git a/keyboards/lfkeyboards/lfk78/post_rules.mk b/keyboards/lfkeyboards/lfk78/post_rules.mk
index 817a085f5e..1b087d7e1e 100644
--- a/keyboards/lfkeyboards/lfk78/post_rules.mk
+++ b/keyboards/lfkeyboards/lfk78/post_rules.mk
@@ -1,14 +1,3 @@
-# Extra source files for IS3731 lighting
-SRC += TWIlib.c issi.c lighting.c
-
-ifeq ($(strip $(ISSI_ENABLE)), yes)
- OPT_DEFS += -DISSI_ENABLE
-endif
-
ifeq ($(strip $(WATCHDOG_ENABLE)), yes)
OPT_DEFS += -DWATCHDOG_ENABLE
endif
-
-ifeq ($(strip $(CAPSLOCK_LED)), yes)
- OPT_DEFS += -DCAPSLOCK_LED
-endif
diff --git a/keyboards/lfkeyboards/lfk78/revb/info.json b/keyboards/lfkeyboards/lfk78/revb/info.json
index 1431ce1cc6..ac98455afa 100644
--- a/keyboards/lfkeyboards/lfk78/revb/info.json
+++ b/keyboards/lfkeyboards/lfk78/revb/info.json
@@ -13,30 +13,6 @@
"rows": ["B0", "B1", "B2", "B3", "B4", "F0", "F1", "F4", "F5", "F6"]
},
"diode_direction": "COL2ROW",
- "backlight": {
- "driver": "custom",
- "levels": 8
- },
- "rgblight": {
- "driver": "custom",
- "hue_steps": 10,
- "led_count": 31,
- "animations": {
- "breathing": true,
- "rainbow_mood": true,
- "rainbow_swirl": true,
- "snake": true,
- "knight": true,
- "christmas": true,
- "static_gradient": true,
- "rgb_test": true,
- "alternating": true,
- "twinkle": true
- }
- },
- "ws2812": {
- "pin": "C7"
- },
"processor": "atmega32u4",
"bootloader": "atmel-dfu",
"layouts": {
diff --git a/keyboards/lfkeyboards/lfk78/revb/revb.c b/keyboards/lfkeyboards/lfk78/revb/revb.c
deleted file mode 100644
index d5b6b47b03..0000000000
--- a/keyboards/lfkeyboards/lfk78/revb/revb.c
+++ /dev/null
@@ -1,19 +0,0 @@
-#include "quantum.h"
-
-// Maps switch LEDs from Row/Col to ISSI matrix.
-// Value breakdown:
-// Bit | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
-// / \ ISSI Col | ISSI Row |
-// matrix idx
-const uint8_t switch_leds[MATRIX_ROWS][MATRIX_COLS] = {
- {0x19, 0x18, 0x17, 0x16, 0x15, 0x14, 0x13, 0x12},
- {0x29, 0x28, 0x27, 0x26, 0x25, 0x24, 0x23, 0x22},
- {0x39, 0x38, 0x37, 0x36, 0x35, 0x34, 0x33, 0x32},
- {0x49, 0x48, 0x47, 0x45, 0x44, 0x43, 0x42, 0x41},
- {0x59, 0x58, 0x57, 0x56, 0x55, 0x51, 0xD6, 0xE5},
- {0x11, 0x99, 0x98, 0x97, 0x96, 0x95, 0x94, 0x93},
- {0x21, 0xA9, 0xA8, 0xA7, 0xA6, 0xA5, 0xA4, 0xA3},
- {0x31, 0xB9, 0xB8, 0xB7, 0xB6, 0xB5, 0xB3, 0x00},
- {0xC9, 0xC8, 0xC7, 0xC6, 0xC5, 0xC4, 0xC2, 0x00},
- {0xE4, 0xE3, 0xE2, 0xE1, 0x92, 0x91, 0xA2, 0xA1}
-};
diff --git a/keyboards/lfkeyboards/lfk78/revc/info.json b/keyboards/lfkeyboards/lfk78/revc/info.json
index 980ffafc63..7bfaf8cac6 100644
--- a/keyboards/lfkeyboards/lfk78/revc/info.json
+++ b/keyboards/lfkeyboards/lfk78/revc/info.json
@@ -13,30 +13,6 @@
"rows": ["D2", "D3", "D4", "D5", "D6"]
},
"diode_direction": "COL2ROW",
- "backlight": {
- "driver": "custom",
- "levels": 8
- },
- "rgblight": {
- "driver": "custom",
- "hue_steps": 10,
- "led_count": 27,
- "animations": {
- "breathing": true,
- "rainbow_mood": true,
- "rainbow_swirl": true,
- "snake": true,
- "knight": true,
- "christmas": true,
- "static_gradient": true,
- "rgb_test": true,
- "alternating": true,
- "twinkle": true
- }
- },
- "ws2812": {
- "pin": "C7"
- },
"processor": "at90usb1286",
"bootloader": "atmel-dfu",
"layouts": {
diff --git a/keyboards/lfkeyboards/lfk78/revc/revc.c b/keyboards/lfkeyboards/lfk78/revc/revc.c
deleted file mode 100644
index a31aea365b..0000000000
--- a/keyboards/lfkeyboards/lfk78/revc/revc.c
+++ /dev/null
@@ -1,14 +0,0 @@
-#include "quantum.h"
-
-// Maps switch LEDs from Row/Col to ISSI matrix.
-// Value breakdown:
-// Bit | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
-// / \ ISSI Col | ISSI Row |
-// matrix idx
-const uint8_t switch_leds[MATRIX_ROWS][MATRIX_COLS] = {
- {0x19, 0x18, 0x17, 0x16, 0x15, 0x14, 0x13, 0x12, 0x11, 0x99, 0x98, 0x97, 0x96, 0x95, 0x94, 0x93, 0x92, 0x91},
- {0x29, 0x28, 0x27, 0x26, 0x25, 0x24, 0x23, 0x22, 0x21, 0xA9, 0xA8, 0xA7, 0xA6, 0xA5, 0xA4, 0xA3, 0xA2, 0xA1},
- {0x39, 0x38, 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0xB9, 0xB8, 0xB7, 0xB6, 0xB5, 0xB3, 0x00, 0x00, 0x00},
- {0x49, 0x48, 0x47, 0x00, 0x45, 0x44, 0x43, 0x42, 0x41, 0xC9, 0xC8, 0xC7, 0xC6, 0xC5, 0xC4, 0x00, 0xC2, 0x00},
- {0x59, 0x58, 0x57, 0x56, 0x55, 0x00, 0x00, 0x00, 0x51, 0x00, 0x00, 0x00, 0xD6, 0xE5, 0xE4, 0xE3, 0xE2, 0xE1}
-};
diff --git a/keyboards/lfkeyboards/lfk78/revj/info.json b/keyboards/lfkeyboards/lfk78/revj/info.json
index 5ff7bcbbfd..f99df02ed9 100644
--- a/keyboards/lfkeyboards/lfk78/revj/info.json
+++ b/keyboards/lfkeyboards/lfk78/revj/info.json
@@ -13,30 +13,6 @@
"rows": ["D2", "D3", "D4", "D5", "D6"]
},
"diode_direction": "COL2ROW",
- "backlight": {
- "driver": "custom",
- "levels": 8
- },
- "rgblight": {
- "driver": "custom",
- "hue_steps": 10,
- "led_count": 27,
- "animations": {
- "breathing": true,
- "rainbow_mood": true,
- "rainbow_swirl": true,
- "snake": true,
- "knight": true,
- "christmas": true,
- "static_gradient": true,
- "rgb_test": true,
- "alternating": true,
- "twinkle": true
- }
- },
- "ws2812": {
- "pin": "C7"
- },
"processor": "at90usb646",
"bootloader": "atmel-dfu",
"layouts": {
diff --git a/keyboards/lfkeyboards/lfk78/revj/revj.c b/keyboards/lfkeyboards/lfk78/revj/revj.c
deleted file mode 100644
index a31aea365b..0000000000
--- a/keyboards/lfkeyboards/lfk78/revj/revj.c
+++ /dev/null
@@ -1,14 +0,0 @@
-#include "quantum.h"
-
-// Maps switch LEDs from Row/Col to ISSI matrix.
-// Value breakdown:
-// Bit | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
-// / \ ISSI Col | ISSI Row |
-// matrix idx
-const uint8_t switch_leds[MATRIX_ROWS][MATRIX_COLS] = {
- {0x19, 0x18, 0x17, 0x16, 0x15, 0x14, 0x13, 0x12, 0x11, 0x99, 0x98, 0x97, 0x96, 0x95, 0x94, 0x93, 0x92, 0x91},
- {0x29, 0x28, 0x27, 0x26, 0x25, 0x24, 0x23, 0x22, 0x21, 0xA9, 0xA8, 0xA7, 0xA6, 0xA5, 0xA4, 0xA3, 0xA2, 0xA1},
- {0x39, 0x38, 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0xB9, 0xB8, 0xB7, 0xB6, 0xB5, 0xB3, 0x00, 0x00, 0x00},
- {0x49, 0x48, 0x47, 0x00, 0x45, 0x44, 0x43, 0x42, 0x41, 0xC9, 0xC8, 0xC7, 0xC6, 0xC5, 0xC4, 0x00, 0xC2, 0x00},
- {0x59, 0x58, 0x57, 0x56, 0x55, 0x00, 0x00, 0x00, 0x51, 0x00, 0x00, 0x00, 0xD6, 0xE5, 0xE4, 0xE3, 0xE2, 0xE1}
-};
diff --git a/keyboards/lfkeyboards/lfk78/rules.mk b/keyboards/lfkeyboards/lfk78/rules.mk
index 4e3f7b9256..82ffed96f5 100644
--- a/keyboards/lfkeyboards/lfk78/rules.mk
+++ b/keyboards/lfkeyboards/lfk78/rules.mk
@@ -7,13 +7,7 @@ EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE = no # Console for debug
COMMAND_ENABLE = no # Commands for debug and configuration
NKRO_ENABLE = yes # Enable N-Key Rollover
-BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
AUDIO_ENABLE = no # Audio output
-RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.
-SLEEP_LED_ENABLE = yes
-
-ISSI_ENABLE = yes # If the I2C pullup resistors aren't install this must be disabled
WATCHDOG_ENABLE = no # Resets keyboard if matrix_scan isn't run every 250ms
-CAPSLOCK_LED = no # Toggle back light LED of Caps Lock
DEFAULT_FOLDER = lfkeyboards/lfk78/revj
diff --git a/keyboards/lfkeyboards/lfk87/config.h b/keyboards/lfkeyboards/lfk87/config.h
index 20aba2ad6b..84c2fd11dc 100644
--- a/keyboards/lfkeyboards/lfk87/config.h
+++ b/keyboards/lfkeyboards/lfk87/config.h
@@ -20,8 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define AUDIO_VOICES
#define AUDIO_PIN C6
-#define BACKLIGHT_PWM_MAP {2, 4, 8, 16, 40, 55, 70, 128, 200, 255}
-
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE
/* Locking resynchronize hack */
diff --git a/keyboards/lfkeyboards/lfk87/info.json b/keyboards/lfkeyboards/lfk87/info.json
index 6a2d5eb796..0b53928421 100644
--- a/keyboards/lfkeyboards/lfk87/info.json
+++ b/keyboards/lfkeyboards/lfk87/info.json
@@ -8,15 +8,5 @@
"pid": "0x6060",
"device_version": "0.0.1"
},
- "backlight": {
- "driver": "custom",
- "levels": 10
- },
- "rgblight": {
- "driver": "custom"
- },
- "ws2812": {
- "pin": "F4"
- },
"community_layouts": ["tkl_ansi", "tkl_iso"]
}
diff --git a/keyboards/lfkeyboards/lfk87/keymaps/ca178858/keymap.c b/keyboards/lfkeyboards/lfk87/keymaps/ca178858/keymap.c
index 0dfba1afac..3be46837c1 100644
--- a/keyboards/lfkeyboards/lfk87/keymaps/ca178858/keymap.c
+++ b/keyboards/lfkeyboards/lfk87/keymaps/ca178858/keymap.c
@@ -13,17 +13,6 @@ enum {
TD_ESC_FUNC = 0,
};
-// Colors of the layer indicator LED
-// This list needs to define layer 0xFFFFFFFF, it is the end of the list, and the unknown layer
-const Layer_Info layer_info[] = {
- // Layer Mask Red Green Blue
- {0x00000000, 0xFFFFFFF8, {0x00, 0xFF, 0x00}}, // base layers (VANILLA, DEFAULT_WKL, DEFAULT_OSX) - green
- {0x00000008, 0xFFFFFFF8, {0x07FF, 0x07FF, 0x0000}}, // CSGO layer - orange
- {0x00000010, 0xFFFFFFF0, {0x0000, 0x0000, 0x0FFF}}, // function layer - blue
- {0x00000020, 0xFFFFFFE0, {0x0FFF, 0x0000, 0x0FFF}}, // settings layer - magenta
- {0xFFFFFFFF, 0xFFFFFFFF, {0x0FFF, 0x0FFF, 0x0FFF}}, // unknown layer - REQUIRED - white
-};
-
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap VANILLA: (Base Layer) Default Layer
* ,-----------------------------------------------------------------------------.
diff --git a/keyboards/lfkeyboards/lfk87/keymaps/ca178858/rules.mk b/keyboards/lfkeyboards/lfk87/keymaps/ca178858/rules.mk
index 8d2c18f6dd..eb12c33f4a 100644
--- a/keyboards/lfkeyboards/lfk87/keymaps/ca178858/rules.mk
+++ b/keyboards/lfkeyboards/lfk87/keymaps/ca178858/rules.mk
@@ -1,17 +1,2 @@
-BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite
-MOUSEKEY_ENABLE = no # Mouse keys(+4700)
-EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
-CONSOLE_ENABLE = yes # Console for debug(+400)
-COMMAND_ENABLE = yes # Commands for debug and configuration
-NKRO_ENABLE = yes
-BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
-MIDI_ENABLE = no # MIDI controls
-AUDIO_ENABLE = yes # Audio output on port C6
-UNICODE_ENABLE = no # Unicode
-BLUETOOTH_ENABLE = no # Disable Bluetooth with the Adafruit EZ-Key HID
-RGBLIGHT_ENABLE = yes # Enable RGB underlight
-SLEEP_LED_ENABLE = yes
TAP_DANCE_ENABLE = yes
-
-ISSI_ENABLE = yes # If the I2C pullup resistors aren't install this must be disabled
WATCHDOG_ENABLE = yes # Resets keyboard if matrix_scan isn't run every 250ms
diff --git a/keyboards/lfkeyboards/lfk87/keymaps/default/keymap.c b/keyboards/lfkeyboards/lfk87/keymaps/default/keymap.c
index 2b1860fab3..b9057e9047 100644
--- a/keyboards/lfkeyboards/lfk87/keymaps/default/keymap.c
+++ b/keyboards/lfkeyboards/lfk87/keymaps/default/keymap.c
@@ -6,16 +6,6 @@ enum keymap_layout {
SETTINGS, // 0x10
};
-// Colors of the layer indicator LED
-// This list needs to define layer 0xFFFFFFFF, it is the end of the list, and the unknown layer
-const Layer_Info layer_info[] = {
- // Layer Mask Red Green Blue
- {0x00000000, 0xFFFFFFFF, {0x00, 0xFF, 0x00}}, // base layers - green
- {0x00000002, 0xFFFFFFFE, {0x00, 0x00, 0xFF}}, // function layer - blue
- {0x00000004, 0xFFFFFFFC, {0xFF, 0x00, 0xFF}}, // settings layer - magenta
- {0xFFFFFFFF, 0xFFFFFFFF, {0xFF, 0xFF, 0xFF}}, // unknown layer - REQUIRED - white
-};
-
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap VANILLA: (Base Layer) Default Layer
* ,-----------------------------------------------------------------------------.
diff --git a/keyboards/lfkeyboards/lfk87/keymaps/default/rules.mk b/keyboards/lfkeyboards/lfk87/keymaps/default/rules.mk
index ec4ce1afba..bcd6b23d23 100644
--- a/keyboards/lfkeyboards/lfk87/keymaps/default/rules.mk
+++ b/keyboards/lfkeyboards/lfk87/keymaps/default/rules.mk
@@ -1,13 +1 @@
-BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite
-MOUSEKEY_ENABLE = no # Mouse keys
-EXTRAKEY_ENABLE = yes # Audio control and System control
-CONSOLE_ENABLE = no # Console for debug
-COMMAND_ENABLE = no # Commands for debug and configuration
-NKRO_ENABLE = yes
-BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
-AUDIO_ENABLE = yes # Audio output
-RGBLIGHT_ENABLE = yes # Enable RGB underlight
-SLEEP_LED_ENABLE = yes
-
-ISSI_ENABLE = yes # If the I2C pullup resistors aren't install this must be disabled
WATCHDOG_ENABLE = no # Resets keyboard if matrix_scan isn't run every 250ms
diff --git a/keyboards/lfkeyboards/lfk87/keymaps/gbchk/keymap.c b/keyboards/lfkeyboards/lfk87/keymaps/gbchk/keymap.c
index 48726503ab..0191b3570f 100644
--- a/keyboards/lfkeyboards/lfk87/keymaps/gbchk/keymap.c
+++ b/keyboards/lfkeyboards/lfk87/keymaps/gbchk/keymap.c
@@ -6,16 +6,6 @@ enum keymap_layout {
SETTINGS, // 0x10
};
-// Colors of the layer indicator LED
-// This list needs to define layer 0xFFFFFFFF, it is the end of the list, and the unknown layer
-const Layer_Info layer_info[] = {
- // Layer Mask Red Green Blue
- {0x00000000, 0xFFFFFFFF, {0x00, 0x00, 0x00}}, // base layers - off
- {0x00000002, 0xFFFFFFFE, {0x00, 0x00, 0xFF}}, // function layer - blue
- {0x00000004, 0xFFFFFFFC, {0xFF, 0x00, 0xFF}}, // settings layer - magenta
- {0xFFFFFFFF, 0xFFFFFFFF, {0xFF, 0xFF, 0xFF}}, // unknown layer - REQUIRED - white
-};
-
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap VANILLA: (Base Layer) Default Layer
* ,-----------------------------------------------------------------------------.
diff --git a/keyboards/lfkeyboards/lfk87/keymaps/gbchk/rules.mk b/keyboards/lfkeyboards/lfk87/keymaps/gbchk/rules.mk
index 01b8506d3a..bcd6b23d23 100644
--- a/keyboards/lfkeyboards/lfk87/keymaps/gbchk/rules.mk
+++ b/keyboards/lfkeyboards/lfk87/keymaps/gbchk/rules.mk
@@ -1,16 +1 @@
-BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite
-MOUSEKEY_ENABLE = no # Mouse keys(+4700)
-EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
-CONSOLE_ENABLE = no # Console for debug(+400)
-COMMAND_ENABLE = no # Commands for debug and configuration
-NKRO_ENABLE = yes
-BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
-MIDI_ENABLE = no # MIDI controls
-AUDIO_ENABLE = yes # Audio output on port C6
-UNICODE_ENABLE = no # Unicode
-BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
-RGBLIGHT_ENABLE = yes # Enable RGB underlight
-SLEEP_LED_ENABLE = yes
-
-ISSI_ENABLE = yes # If the I2C pullup resistors aren't install this must be disabled
WATCHDOG_ENABLE = no # Resets keyboard if matrix_scan isn't run every 250ms
diff --git a/keyboards/lfkeyboards/lfk87/keymaps/iso/keymap.c b/keyboards/lfkeyboards/lfk87/keymaps/iso/keymap.c
index 56ca013b0d..510aa6730f 100644
--- a/keyboards/lfkeyboards/lfk87/keymaps/iso/keymap.c
+++ b/keyboards/lfkeyboards/lfk87/keymaps/iso/keymap.c
@@ -6,16 +6,6 @@ enum keymap_layout {
SETTINGS, // 0x04
};
-// Colors of the layer indicator LED
-// This list needs to define layer 0xFFFFFFFF, it is the end of the list, and the unknown layer
-const Layer_Info layer_info[] = {
- // Layer Mask Red Green Blue
- {0x00000000, 0xFFFFFFFF, {0x00, 0x00, 0x00}}, // base layer - off
- {0x00000002, 0xFFFFFFFE, {0x00, 0x00, 0x7F}}, // function layer - blue
- {0x00000004, 0xFFFFFFFC, {0x7F, 0x00, 0x00}}, // settings layer - red
- {0xFFFFFFFF, 0xFFFFFFFF, {0x0F, 0x0F, 0x0F}}, // unknown layer - REQUIRED - white
-};
-
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap VANILLA: (Base Layer) Default Layer
* ,-----------------------------------------------------------------------------.
diff --git a/keyboards/lfkeyboards/lfk87/keymaps/iso/rules.mk b/keyboards/lfkeyboards/lfk87/keymaps/iso/rules.mk
index 7baa40317a..a5f96a8317 100644
--- a/keyboards/lfkeyboards/lfk87/keymaps/iso/rules.mk
+++ b/keyboards/lfkeyboards/lfk87/keymaps/iso/rules.mk
@@ -1,13 +1,2 @@
-BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite
-MOUSEKEY_ENABLE = no # Mouse keys
-EXTRAKEY_ENABLE = yes # Audio control and System control
-CONSOLE_ENABLE = no # Console for debug
-COMMAND_ENABLE = no # Commands for debug and configuration
-NKRO_ENABLE = yes
-BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
-AUDIO_ENABLE = yes # Audio output
-RGBLIGHT_ENABLE = yes # Enable RGB underlight
-SLEEP_LED_ENABLE = yes
-
-ISSI_ENABLE = yes # If the I2C pullup resistors aren't install this must be disabled
+AUDIO_ENABLE = yes
WATCHDOG_ENABLE = no # Resets keyboard if matrix_scan isn't run every 250ms
diff --git a/keyboards/lfkeyboards/lfk87/lfk87.c b/keyboards/lfkeyboards/lfk87/lfk87.c
index 3e95361a33..849f0ebcc5 100644
--- a/keyboards/lfkeyboards/lfk87/lfk87.c
+++ b/keyboards/lfkeyboards/lfk87/lfk87.c
@@ -1,42 +1,20 @@
-
-#include <avr/sfr_defs.h>
-#include <avr/timer_avr.h>
-#include <avr/wdt.h>
#include "lfk87.h"
-#include "issi.h"
-#include "TWIlib.h"
-#include "lighting.h"
-#include "debug.h"
-#include "quantum.h"
+#include <avr/wdt.h>
uint16_t click_hz = CLICK_HZ;
uint16_t click_time = CLICK_MS;
uint8_t click_toggle = CLICK_ENABLED;
-__attribute__((weak))
-const Layer_Info layer_info[] = {
- // Layer Mask Red Green Blue
- {0x00000000, 0xFFFFFFFF, {0x00, 0xFF, 0x00}}, // base layers - green
- {0x00000002, 0xFFFFFFFE, {0x00, 0x00, 0xFF}}, // function layer - blue
- {0x00000004, 0xFFFFFFFC, {0xFF, 0x00, 0xFF}}, // settings layer - magenta
- {0xFFFFFFFF, 0xFFFFFFFF, {0xFF, 0xFF, 0xFF}}, // unknown layer - REQUIRED - white
-};
-
void matrix_init_kb(void)
{
// put your keyboard start-up code here
// runs once when the firmware starts up
matrix_init_user();
- set_rgb(31, 0x00, 0x00, 0x00); // Caps lock
- set_rgb(32, 0xFF, 0x00, 0x00); // Layer indicator, start red
#ifndef AUDIO_ENABLE
// If we're not using the audio pin, drive it low
setPinOutput(C6);
writePinLow(C6);
#endif
-#ifdef ISSI_ENABLE
- issi_init();
-#endif
#ifdef WATCHDOG_ENABLE
// This is done after turning the layer LED red, if we're caught in a loop
// we should get a flashing red light
@@ -49,49 +27,10 @@ void matrix_scan_kb(void)
#ifdef WATCHDOG_ENABLE
wdt_reset();
#endif
-#ifdef ISSI_ENABLE
- // switch/underglow lighting update
- static uint32_t issi_device = 0;
- static uint32_t twi_last_ready = 0;
- if(twi_last_ready > 1000){
- // Its been way too long since the last ISSI update, reset the I2C bus and start again
- twi_last_ready = 0;
- TWIInit();
- force_issi_refresh();
- }
- if(isTWIReady()){
- twi_last_ready = 0;
- // If the i2c bus is available, kick off the issi update, alternate between devices
- update_issi(issi_device, issi_device);
- if(issi_device){
- issi_device = 0;
- }else{
- issi_device = 3;
- }
- }else{
- twi_last_ready++;
- }
-#endif
- // Update layer indicator LED
- //
- // Not sure how else to reliably do this... TMK has the 'hook_layer_change'
- // but can't find QMK equiv
- static uint32_t layer_indicator = -1;
- if(layer_indicator != layer_state){
- for(uint32_t i=0;; i++){
- // the layer_info list should end with layer 0xFFFF
- // it will break this out of the loop and define the unknown layer color
- if((layer_info[i].layer == (layer_state & layer_info[i].mask)) || (layer_info[i].layer == 0xFFFFFFFF)){
- set_rgb(32, layer_info[i].color.red, layer_info[i].color.green, layer_info[i].color.blue);
- layer_indicator = layer_state;
- break;
- }
- }
- }
matrix_scan_user();
}
-void click(uint16_t freq, uint16_t duration){
+void clicking_notes(uint16_t freq, uint16_t duration){
#ifdef AUDIO_ENABLE
if(freq >= 100 && freq <= 20000 && duration < 100){
play_note(freq, 10);
@@ -106,11 +45,10 @@ void click(uint16_t freq, uint16_t duration){
bool process_record_kb(uint16_t keycode, keyrecord_t* record)
{
if (click_toggle && record->event.pressed){
- click(click_hz, click_time);
+ clicking_notes(click_hz, click_time);
}
if (keycode == QK_BOOT) {
reset_keyboard_kb();
- } else {
}
return process_record_user(keycode, record);
}
@@ -121,35 +59,5 @@ void reset_keyboard_kb(void){
wdt_disable();
wdt_reset();
#endif
- set_rgb(31, 0x00, 0xFF, 0xFF);
- set_rgb(32, 0x00, 0xFF, 0xFF);
- force_issi_refresh();
reset_keyboard();
}
-
-bool led_update_kb(led_t led_state) {
- bool res = led_update_user(led_state);
- if(res) {
- // Set capslock LED to Blue
- if (led_state.caps_lock) {
- set_rgb(31, 0x00, 0x00, 0x7F);
- } else{
- set_rgb(31, 0x00, 0x00, 0x00);
- }
- }
- return res;
-}
-
-// Lighting info, see lighting.h for details
-const uint8_t switch_matrices[] = {0, 1};
-const uint8_t rgb_matrices[] = {6, 7};
-
-// RGB Map:
-// 27 29 10 9 8 7 6
-// 26 5
-// 25 4
-// 24 3
-// 23 22 21 20 14 15 11 1 2
-const uint8_t rgb_sequence[] = {
- 27, 29, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 11, 15, 14, 20, 21, 22, 23, 24, 25, 26
-};
diff --git a/keyboards/lfkeyboards/lfk87/lfk87.h b/keyboards/lfkeyboards/lfk87/lfk87.h
index d17c1da26f..ee6f8d47e0 100644
--- a/keyboards/lfkeyboards/lfk87/lfk87.h
+++ b/keyboards/lfkeyboards/lfk87/lfk87.h
@@ -1,27 +1,10 @@
#pragma once
#include "quantum.h"
-#include "matrix.h"
-#include <avr/sfr_defs.h>
-
-typedef struct RGB_Color {
- uint16_t red;
- uint16_t green;
- uint16_t blue;
-} RGB_Color;
-
-typedef struct Layer_Info {
- uint32_t layer;
- uint32_t mask;
- RGB_Color color;
-} Layer_Info;
-
-extern const uint32_t layer_count;
-extern const Layer_Info layer_info[];
#define CLICK_HZ 500
#define CLICK_MS 2
#define CLICK_ENABLED 0
void reset_keyboard_kb(void);
-void click(uint16_t freq, uint16_t duration);
+void clicking_notes(uint16_t freq, uint16_t duration);
diff --git a/keyboards/lfkeyboards/lfk87/post_rules.mk b/keyboards/lfkeyboards/lfk87/post_rules.mk
index 044d9754f1..1b087d7e1e 100644
--- a/keyboards/lfkeyboards/lfk87/post_rules.mk
+++ b/keyboards/lfkeyboards/lfk87/post_rules.mk
@@ -1,7 +1,3 @@
-ifeq ($(strip $(ISSI_ENABLE)), yes)
- OPT_DEFS += -DISSI_ENABLE
-endif
-
ifeq ($(strip $(WATCHDOG_ENABLE)), yes)
OPT_DEFS += -DWATCHDOG_ENABLE
endif
diff --git a/keyboards/lfkeyboards/lfk87/reva/info.json b/keyboards/lfkeyboards/lfk87/reva/info.json
index ad3ad7f877..95b5ff81b7 100644
--- a/keyboards/lfkeyboards/lfk87/reva/info.json
+++ b/keyboards/lfkeyboards/lfk87/reva/info.json
@@ -6,22 +6,6 @@
"rows": ["D2", "D3", "D4", "D5", "D6", "D7"]
},
"diode_direction": "COL2ROW",
- "rgblight": {
- "hue_steps": 10,
- "led_count": 25,
- "animations": {
- "breathing": true,
- "rainbow_mood": true,
- "rainbow_swirl": true,
- "snake": true,
- "knight": true,
- "christmas": true,
- "static_gradient": true,
- "rgb_test": true,
- "alternating": true,
- "twinkle": true
- }
- },
"layouts": {
"LAYOUT_tkl_ansi": {
"layout": [
diff --git a/keyboards/lfkeyboards/lfk87/reva/reva.c b/keyboards/lfkeyboards/lfk87/reva/reva.c
deleted file mode 100644
index 86289c7a01..0000000000
--- a/keyboards/lfkeyboards/lfk87/reva/reva.c
+++ /dev/null
@@ -1,16 +0,0 @@
-#include "quantum.h"
-
-// Maps switch LEDs from Row/Col to ISSI matrix.
-// Value breakdown:
-// Bit | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
-// | | ISSI Col | ISSI Row |
-// / |
-// Device
-const uint8_t switch_leds[MATRIX_ROWS][MATRIX_COLS] = {
- {0x19, 0x00, 0x18, 0x17, 0x16, 0x15, 0x14, 0x13, 0x12, 0x11, 0x99, 0x98, 0x97, 0x96, 0x95, 0x94, 0x93},
- {0x92, 0x91, 0x29, 0x28, 0x27, 0x26, 0x25, 0x24, 0x23, 0x22, 0x21, 0xA9, 0xA8, 0xA7, 0xA6, 0xA5, 0xA4},
- {0xA3, 0xA2, 0xA1, 0x39, 0x38, 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0xB9, 0xB8, 0xB7, 0xB6, 0xB5},
- {0xB3, 0x49, 0x48, 0x47, 0x45, 0x44, 0x43, 0x42, 0x41, 0xC9, 0xC8, 0xC7, 0xC6, 0x00, 0x00, 0x00, 0x00},
- {0xC5, 0x00, 0xC4, 0xC2, 0x59, 0x58, 0x57, 0x56, 0x55, 0x51, 0xD6, 0xE5, 0xE4, 0x00, 0x00, 0xE3, 0x00},
- {0xE2, 0xE1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
-};
diff --git a/keyboards/lfkeyboards/lfk87/revc/info.json b/keyboards/lfkeyboards/lfk87/revc/info.json
index cf627facdf..cf8c74397f 100644
--- a/keyboards/lfkeyboards/lfk87/revc/info.json
+++ b/keyboards/lfkeyboards/lfk87/revc/info.json
@@ -6,22 +6,6 @@
"rows": ["F2", "D7", "D6", "D5", "D4", "D3", "F3"]
},
"diode_direction": "COL2ROW",
- "rgblight": {
- "hue_steps": 10,
- "led_count": 24,
- "animations": {
- "breathing": true,
- "rainbow_mood": true,
- "rainbow_swirl": true,
- "snake": true,
- "knight": true,
- "christmas": true,
- "static_gradient": true,
- "rgb_test": true,
- "alternating": true,
- "twinkle": true
- }
- },
"layouts": {
"LAYOUT_tkl_ansi": {
"layout": [
diff --git a/keyboards/lfkeyboards/lfk87/revc/revc.c b/keyboards/lfkeyboards/lfk87/revc/revc.c
deleted file mode 100644
index f14a1f38e5..0000000000
--- a/keyboards/lfkeyboards/lfk87/revc/revc.c
+++ /dev/null
@@ -1,17 +0,0 @@
-#include "quantum.h"
-
-// Maps switch LEDs from Row/Col to ISSI matrix.
-// Value breakdown:
-// Bit | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
-// | | ISSI Col | ISSI Row |
-// / |
-// Device
-const uint8_t switch_leds[MATRIX_ROWS][MATRIX_COLS] = {
- {0x18, 0x17, 0x16, 0x15, 0x14, 0x13, 0x12, 0x11, 0x99, 0x98, 0x97, 0x96, 0x00, 0x95, 0x94, 0x93},
- {0x29, 0x28, 0x27, 0x26, 0x25, 0x24, 0x23, 0x22, 0x21, 0xA9, 0xA8, 0xA7, 0x00, 0xA6, 0xA5, 0xA4},
- {0xA2, 0xA1, 0x39, 0x38, 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0xB9, 0xB8, 0xB7, 0xB6, 0xB5},
- {0x49, 0x48, 0x47, 0x45, 0x44, 0x43, 0x42, 0x41, 0xC9, 0xC8, 0xC7, 0xC6, 0x00, 0x00, 0x00, 0x00},
- {0x00, 0xC4, 0xC2, 0x59, 0x58, 0x57, 0x56, 0x55, 0x51, 0xD6, 0xE5, 0xE4, 0x00, 0x00, 0xE3, 0x00},
- {0xB3, 0xC5, 0xE2, 0xE1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
- {0x19, 0x92, 0x91, 0xA3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
-};
diff --git a/keyboards/lfkeyboards/lfk87/rules.mk b/keyboards/lfkeyboards/lfk87/rules.mk
index 154e03fe77..3a1399d693 100644
--- a/keyboards/lfkeyboards/lfk87/rules.mk
+++ b/keyboards/lfkeyboards/lfk87/rules.mk
@@ -8,15 +8,7 @@ EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE = no # Console for debug
COMMAND_ENABLE = no # Commands for debug and configuration
NKRO_ENABLE = yes # Enable N-Key Rollover
-BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
AUDIO_ENABLE = yes # Audio output
-RGBLIGHT_ENABLE = yes # Enable RGB underlight
-SLEEP_LED_ENABLE = yes
-
-ISSI_ENABLE = yes # If the I2C pullup resistors aren't install this must be disabled
WATCHDOG_ENABLE = no # Resets keyboard if matrix_scan isn't run every 250ms
-# Extra source files for IS3731 lighting
-SRC += TWIlib.c issi.c lighting.c
-
DEFAULT_FOLDER = lfkeyboards/lfk78/revc
diff --git a/keyboards/lfkeyboards/lfkpad/info.json b/keyboards/lfkeyboards/lfkpad/info.json
index a3910b0df5..0a41696cdc 100644
--- a/keyboards/lfkeyboards/lfkpad/info.json
+++ b/keyboards/lfkeyboards/lfkpad/info.json
@@ -8,26 +8,6 @@
"pid": "0x3231",
"device_version": "0.0.1"
},
- "rgblight": {
- "driver": "custom",
- "hue_steps": 10,
- "led_count": 28,
- "animations": {
- "breathing": true,
- "rainbow_mood": true,
- "rainbow_swirl": true,
- "snake": true,
- "knight": true,
- "christmas": true,
- "static_gradient": true,
- "rgb_test": true,
- "alternating": true,
- "twinkle": true
- }
- },
- "ws2812": {
- "pin": "C7"
- },
"matrix_pins": {
"cols": ["F1", "F0", "D4", "D6"],
"rows": ["D5", "F4", "F6", "F7", "C7", "C6"]
diff --git a/keyboards/lfkeyboards/lfkpad/keymaps/pascalpfeil/keymap.c b/keyboards/lfkeyboards/lfkpad/keymaps/pascalpfeil/keymap.c
index 94f66e78b2..466adfea47 100644
--- a/keyboards/lfkeyboards/lfkpad/keymaps/pascalpfeil/keymap.c
+++ b/keyboards/lfkeyboards/lfkpad/keymaps/pascalpfeil/keymap.c
@@ -56,18 +56,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, _______, _______
),
};
-
-const uint8_t number_leds[] = {8, 9, 10, 11, 12, 13, 15, 16, 17};
-const uint8_t number_leds_size = ARRAY_SIZE(number_leds);
-
-bool led_update_user(led_t led_state) {
- for (uint8_t i = 0; i < number_leds_size; i++)
- if (led_state.num_lock)
- // set to whatever the other leds are doing
- // this is needed so that upon disabling num lock, the leds don't stay red
- rgblight_sethsv_at(rgblight_get_hue(), rgblight_get_sat(), rgblight_get_val(), numer_leds[i]);
- else
- rgblight_setrgb_at(RGB_RED, numer_leds[i]); // set to red
-
- return true;
-}
diff --git a/keyboards/lfkeyboards/lfkpad/lfkpad.c b/keyboards/lfkeyboards/lfkpad/lfkpad.c
index 7d8dd865fb..8769c2c531 100644
--- a/keyboards/lfkeyboards/lfkpad/lfkpad.c
+++ b/keyboards/lfkeyboards/lfkpad/lfkpad.c
@@ -1,18 +1,9 @@
#include "quantum.h"
-
-#include <avr/timer_avr.h>
#include <avr/wdt.h>
-#include "issi.h"
-#include "TWIlib.h"
-#include "lighting.h"
void matrix_init_kb(void) {
matrix_init_user();
-#ifdef ISSI_ENABLE
- issi_init();
-#endif
-
#ifdef WATCHDOG_ENABLE
// This is done after turning the layer LED red, if we're caught in a loop
// we should get a flashing red light
@@ -25,48 +16,5 @@ void matrix_scan_kb(void) {
wdt_reset();
#endif
-#ifdef ISSI_ENABLE
- // switch/underglow lighting update
- static uint32_t issi_device = 0;
- static uint32_t twi_last_ready = 0;
-
- if (twi_last_ready > 1000) {
- // It's been way too long since the last ISSI update, reset the I2C bus and start again
- dprintf("TWI failed to recover, TWI re-init\n");
- twi_last_ready = 0;
- TWIInit();
- force_issi_refresh();
- }
-
- if (isTWIReady()) {
- twi_last_ready = 0;
- // If the i2c bus is available, kick off the issi update, alternate between devices
- update_issi(issi_device, issi_device);
-
- if (issi_device) {
- issi_device = 0;
- } else {
- issi_device = 3;
- }
- } else {
- twi_last_ready++;
- }
-#endif
-
matrix_scan_user();
}
-
-// LFK lighting info
-const uint8_t rgb_matrices[] = { 0, 1 };
-const uint8_t rgb_sequence[] = {
- 32, 1, 2, 3,
- 31, 30, 5, 6,
- 28, 27, 7,
- 17, 18, 9, 8,
- 19, 21, 11,
- 22, 14, 12,
- 16, 26,
- 4, 25,
- 13, 24,
- 20
-};
diff --git a/keyboards/lfkeyboards/lfkpad/post_rules.mk b/keyboards/lfkeyboards/lfkpad/post_rules.mk
index 044d9754f1..1b087d7e1e 100644
--- a/keyboards/lfkeyboards/lfkpad/post_rules.mk
+++ b/keyboards/lfkeyboards/lfkpad/post_rules.mk
@@ -1,7 +1,3 @@
-ifeq ($(strip $(ISSI_ENABLE)), yes)
- OPT_DEFS += -DISSI_ENABLE
-endif
-
ifeq ($(strip $(WATCHDOG_ENABLE)), yes)
OPT_DEFS += -DWATCHDOG_ENABLE
endif
diff --git a/keyboards/lfkeyboards/lfkpad/rules.mk b/keyboards/lfkeyboards/lfkpad/rules.mk
index ec8efa88bf..996d454d74 100644
--- a/keyboards/lfkeyboards/lfkpad/rules.mk
+++ b/keyboards/lfkeyboards/lfkpad/rules.mk
@@ -7,12 +7,5 @@ EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE = no # Console for debug
COMMAND_ENABLE = no # Commands for debug and configuration
NKRO_ENABLE = no # Enable N-Key Rollover
-BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
-RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
AUDIO_ENABLE = no # Audio output
-SLEEP_LED_ENABLE = yes
-
-ISSI_ENABLE = yes # If the I2C pullup resistors aren't installed this must be disabled
WATCHDOG_ENABLE = no # Resets keyboard if matrix_scan() isn't run every 250ms
-
-SRC = TWIlib.c issi.c lighting.c
diff --git a/keyboards/lfkeyboards/lighting.c b/keyboards/lfkeyboards/lighting.c
deleted file mode 100644
index 5f3ab46e46..0000000000
--- a/keyboards/lfkeyboards/lighting.c
+++ /dev/null
@@ -1,158 +0,0 @@
-#ifdef ISSI_ENABLE
-
-
-#include <avr/sfr_defs.h>
-#include <avr/timer_avr.h>
-#include <avr/wdt.h>
-#include "quantum.h"
-// #include "lfk87.h"
-#include "issi.h"
-#include "TWIlib.h"
-#include "lighting.h"
-#include "debug.h"
-#include "rgblight.h"
-
-
-extern rgblight_config_t rgblight_config; // Declared in rgblight.c
-
-#ifdef BACKLIGHT_ENABLE
- const uint8_t backlight_pwm_map[BACKLIGHT_LEVELS] = BACKLIGHT_PWM_MAP;
-#endif
-
-// RGB# to ISSI matrix, this is the same across all revisions
-const uint8_t rgb_leds[][3][2] = {
- {{0, 0}, {0, 0}, {0, 0}},
- {{1, 1}, {2, 3}, {2, 4}}, // RGB1/RGB17
- {{2, 1}, {2, 2}, {3, 4}}, // RGB2/RGB18
- {{3, 1}, {3, 2}, {3, 3}}, // RGB3/RGB19
- {{4, 1}, {4, 2}, {4, 3}}, // RGB4/RGB20
- {{5, 1}, {5, 2}, {5, 3}}, // RGB5/RGB21
- {{6, 1}, {6, 2}, {6, 3}}, // RGB6/RGB22
- {{7, 1}, {7, 2}, {7, 3}}, // RGB6/RGB23
- {{8, 1}, {8, 2}, {8, 3}}, // RGB8/RGB24
- {{1, 9}, {1, 8}, {1, 7}}, // RGB9/RGB25
- {{2, 9}, {2, 8}, {2, 7}}, // RGB10/RGB26
- {{3, 9}, {3, 8}, {3, 7}}, // RGB11/RGB27
- {{4, 9}, {4, 8}, {4, 7}}, // RGB12/RGB28
- {{5, 9}, {5, 8}, {5, 7}}, // RGB13/RGB29
- {{6, 9}, {6, 8}, {6, 7}}, // RGB14/RGB30
- {{7, 9}, {7, 8}, {6, 6}}, // RGB15/RGB31
- {{8, 9}, {7, 7}, {7, 6}} // RGB16/RGB32
- };
-
-void set_rgb(uint8_t rgb_led, uint8_t red, uint8_t green, uint8_t blue){
-#ifdef RGBLIGHT_ENABLE
- uint8_t matrix = rgb_matrices[0];
- if(rgb_led >= 17){
- matrix = rgb_matrices[1];
- rgb_led -= 16;
- }
- if(rgb_leds[rgb_led][0][1] != 0){
- activateLED(matrix, rgb_leds[rgb_led][0][0], rgb_leds[rgb_led][0][1], red);
- }
- if(rgb_leds[rgb_led][1][1] != 0){
- activateLED(matrix, rgb_leds[rgb_led][1][0], rgb_leds[rgb_led][1][1], green);
- }
- if(rgb_leds[rgb_led][2][1] != 0){
- activateLED(matrix, rgb_leds[rgb_led][2][0], rgb_leds[rgb_led][2][1], blue);
- }
-#endif
-}
-
-void backlight_set(uint8_t level){
-#ifdef BACKLIGHT_ENABLE
- uint8_t pwm_value = 0;
- if(level >= BACKLIGHT_LEVELS){
- level = BACKLIGHT_LEVELS;
- }
- if(level > 0){
- pwm_value = backlight_pwm_map[level-1];
- }
- for(int x = 1; x <= 9; x++){
- for(int y = 1; y <= 9; y++){
- activateLED(switch_matrices[0], x, y, pwm_value);
- activateLED(switch_matrices[1], x, y, pwm_value);
- }
- }
-#endif
-}
-
-void set_underglow(uint8_t red, uint8_t green, uint8_t blue){
-#ifdef RGBLIGHT_ENABLE
- for(uint8_t x = 1; x <= 32; x++){
- set_rgb(x, red, green, blue);
- }
-#endif
-}
-
-
-void rgblight_set(void) {
-#ifdef RGBLIGHT_ENABLE
- for(uint8_t i = 0; (i < sizeof(rgb_sequence)) && (i < RGBLED_NUM); i++){
- if(rgblight_config.enable){
- set_rgb(rgb_sequence[i], led[i].r, led[i].g, led[i].b);
- }else{
- set_rgb(rgb_sequence[i], 0, 0, 0);
- }
- }
-#endif
-}
-
-void set_backlight_by_keymap(uint8_t col, uint8_t row){
-#ifdef RGBLIGHT_ENABLE
- uint8_t lookup_value = switch_leds[row][col];
- uint8_t matrix = switch_matrices[0];
- if(lookup_value & 0x80){
- matrix = switch_matrices[1];
- }
- issi_devices[0]->led_dirty = 1;
- uint8_t led_col = (lookup_value & 0x70) >> 4;
- uint8_t led_row = lookup_value & 0x0F;
- activateLED(matrix, led_col, led_row, 255);
-#endif
-}
-
-void force_issi_refresh(void){
-#ifdef ISSI_ENABLE
- issi_devices[0]->led_dirty = true;
- update_issi(0, true);
- issi_devices[3]->led_dirty = true;
- update_issi(3, true);
-#endif
-}
-
-void led_test(void){
-#ifdef ISSI_ENABLE
-#ifdef WATCHDOG_ENABLE
- // This test take a long time to run, disable the WTD until its complete
- wdt_disable();
-#endif
- backlight_set(0);
- set_underglow(0, 0, 0);
- force_issi_refresh();
- set_underglow(0, 0, 0);
- for(uint8_t x = 0; x < sizeof(rgb_sequence); x++){
- set_rgb(rgb_sequence[x], 255, 0, 0);
- force_issi_refresh();
- _delay_ms(250);
- set_rgb(rgb_sequence[x], 0, 255, 0);
- force_issi_refresh();
- _delay_ms(250);
- set_rgb(rgb_sequence[x], 0, 0, 255);
- force_issi_refresh();
- _delay_ms(250);
- set_rgb(rgb_sequence[x], 0, 0, 0);
- force_issi_refresh();
- }
-#ifdef WATCHDOG_ENABLE
- wdt_enable(WDTO_250MS);
-#endif
-#endif
-}
-
-void backlight_init_ports(void){
- issi_init();
-}
-
-#endif
-
diff --git a/keyboards/lfkeyboards/lighting.h b/keyboards/lfkeyboards/lighting.h
deleted file mode 100644
index cb07755c53..0000000000
--- a/keyboards/lfkeyboards/lighting.h
+++ /dev/null
@@ -1,49 +0,0 @@
-#pragma once
-
-// rgb_sequence[RGBLED_NUM]
-//
-// Array used for sequential lighting effects.
-//
-// Example LFK78 RevC+ RGB Map:
-// 27 29 10 9 8 7 6
-// 26 5
-// 25 4
-// 24 3
-// 23 22 21 20 14 15 11 1 2
-//
-// const uint8_t rgb_sequence[] = {
-// 27, 29, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1,
-// 11, 15, 14, 20, 21, 22, 23, 24, 25, 26
-// };
-extern const uint8_t rgb_sequence[RGBLED_NUM];
-
-// switch_matrices[]
-//
-// The ISSI matrices for switch backlighting
-//
-// Example LFK78 RevC+ - ISSI Device 0, banks 0 and 1:
-// switch_matrices[] = {0, 1};
-extern const uint8_t switch_matrices[];
-
-// rgb_matrices[]
-// The ISSI matrices for RGB Underglow
-//
-// Example LFK78 RevC+ - ISSI Device 3, banks 0 and 1:
-// rgb_matrices[] = {6, 7};
-extern const uint8_t rgb_matrices[];
-
-// switch_leds[MATRIX_ROWS][MATRIX_COLS]
-// Maps switch LEDs from Row/Col to ISSI matrix.
-// Value breakdown:
-// Bit | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
-// | | ISSI Col | ISSI Row |
-// | |
-// Device
-extern const uint8_t switch_leds[MATRIX_ROWS][MATRIX_COLS];
-
-void led_test(void);
-void force_issi_refresh(void);
-void set_backlight(uint8_t level);
-void set_underglow(uint8_t red, uint8_t green, uint8_t blue);
-void set_rgb(uint8_t rgb_led, uint8_t red, uint8_t green, uint8_t blue);
-void set_backlight_by_keymap(uint8_t col, uint8_t row);
diff --git a/keyboards/lfkeyboards/mini1800/config.h b/keyboards/lfkeyboards/mini1800/config.h
index 20aba2ad6b..84c2fd11dc 100644
--- a/keyboards/lfkeyboards/mini1800/config.h
+++ b/keyboards/lfkeyboards/mini1800/config.h
@@ -20,8 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define AUDIO_VOICES
#define AUDIO_PIN C6
-#define BACKLIGHT_PWM_MAP {2, 4, 8, 16, 40, 55, 70, 128, 200, 255}
-
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE
/* Locking resynchronize hack */
diff --git a/keyboards/lfkeyboards/mini1800/info.json b/keyboards/lfkeyboards/mini1800/info.json
index 6737c1baca..35bb1c15a8 100644
--- a/keyboards/lfkeyboards/mini1800/info.json
+++ b/keyboards/lfkeyboards/mini1800/info.json
@@ -13,30 +13,6 @@
"rows": ["D7", "E1", "F2", "F0", "F1"]
},
"diode_direction": "COL2ROW",
- "backlight": {
- "driver": "custom",
- "levels": 10
- },
- "rgblight": {
- "driver": "custom",
- "hue_steps": 10,
- "led_count": 26,
- "animations": {
- "breathing": true,
- "rainbow_mood": true,
- "rainbow_swirl": true,
- "snake": true,
- "knight": true,
- "christmas": true,
- "static_gradient": true,
- "rgb_test": true,
- "alternating": true,
- "twinkle": true
- }
- },
- "ws2812": {
- "pin": "F4"
- },
"layouts": {
"LAYOUT": {
"layout": [
diff --git a/keyboards/lfkeyboards/mini1800/keymaps/ca178858/keymap.c b/keyboards/lfkeyboards/mini1800/keymaps/ca178858/keymap.c
index 75abdc258c..9e3927f545 100644
--- a/keyboards/lfkeyboards/mini1800/keymaps/ca178858/keymap.c
+++ b/keyboards/lfkeyboards/mini1800/keymaps/ca178858/keymap.c
@@ -12,16 +12,6 @@ enum {
TD_SPC_SPAM
};
-// Colors of the layer indicator LED
-// This list needs to define layer 0xFFFFFFFF, it is the end of the list, and the unknown layer
-const Layer_Info layer_info[] = {
- // Layer Mask Red Green Blue
- {0x00000000, 0xFFFFFFFF, {0x00, 0xFF, 0x00}}, // base layers - green
- {0x00000002, 0xFFFFFFFE, {0x00, 0x00, 0xFF}}, // function layer - blue
- {0x00000004, 0xFFFFFFFC, {0xFF, 0x00, 0xFF}}, // settings layer - magenta
- {0xFFFFFFFF, 0xFFFFFFFF, {0xFF, 0xFF, 0xFF}}, // unknown layer - REQUIRED - white
-};
-
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap VANILLA: (Base Layer) Default Layer
* ,-----------------------------------------------------------------------------.
diff --git a/keyboards/lfkeyboards/mini1800/keymaps/default/keymap.c b/keyboards/lfkeyboards/mini1800/keymaps/default/keymap.c
index 7341bdc053..c2abd12843 100644
--- a/keyboards/lfkeyboards/mini1800/keymaps/default/keymap.c
+++ b/keyboards/lfkeyboards/mini1800/keymaps/default/keymap.c
@@ -6,16 +6,6 @@ enum keymap_layout {
SETTINGS, // 0x10
};
-// Colors of the layer indicator LED
-// This list needs to define layer 0xFFFFFFFF, it is the end of the list, and the unknown layer
-const Layer_Info layer_info[] = {
- // Layer Mask Red Green Blue
- {0x00000000, 0xFFFFFFFF, {0x00, 0xFF, 0x00}}, // base layers - green
- {0x00000002, 0xFFFFFFFE, {0x00, 0x00, 0xFF}}, // function layer - blue
- {0x00000004, 0xFFFFFFFC, {0xFF, 0x00, 0xFF}}, // settings layer - magenta
- {0xFFFFFFFF, 0xFFFFFFFF, {0xFF, 0xFF, 0xFF}}, // unknown layer - REQUIRED - white
-};
-
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap VANILLA: (Base Layer) Default Layer
* ,-----------------------------------------------------------------------------.
diff --git a/keyboards/lfkeyboards/mini1800/mini1800.c b/keyboards/lfkeyboards/mini1800/mini1800.c
index e1fa3a988d..2ca87cfdb6 100644
--- a/keyboards/lfkeyboards/mini1800/mini1800.c
+++ b/keyboards/lfkeyboards/mini1800/mini1800.c
@@ -1,47 +1,22 @@
-
-#include <avr/sfr_defs.h>
-#include <avr/timer_avr.h>
-#include <avr/wdt.h>
#include "mini1800.h"
-#include "issi.h"
-#include "TWIlib.h"
-#include "lighting.h"
-#include "debug.h"
-
-#include "quantum.h"
+#include <avr/wdt.h>
uint16_t click_hz = CLICK_HZ;
uint16_t click_time = CLICK_MS;
uint8_t click_toggle = CLICK_ENABLED;
float my_song[][2] = SONG(ZELDA_PUZZLE);
-// Colors of the layer indicator LED
-// This list needs to define layer 0xFFFFFFFF, it is the end of the list, and the unknown layer
-__attribute__((weak))
-const Layer_Info layer_info[] = {
- // Layer Mask Red Green Blue
- {0x00000000, 0xFFFFFFFF, {0x00, 0xFF, 0x00}}, // base layers - green
- {0x00000002, 0xFFFFFFFE, {0x00, 0x00, 0xFF}}, // function layer - blue
- {0x00000004, 0xFFFFFFFC, {0xFF, 0x00, 0xFF}}, // settings layer - magenta
- {0xFFFFFFFF, 0xFFFFFFFF, {0xFF, 0xFF, 0xFF}}, // unknown layer - REQUIRED - white
-};
-
void matrix_init_kb(void)
{
// put your keyboard start-up code here
// runs once when the firmware starts up
matrix_init_user();
- set_rgb(31, 0x00, 0x00, 0x00); // Caps lock
- set_rgb(32, 0xFF, 0x00, 0x00); // Layer indicator, start red
#ifndef AUDIO_ENABLE
// If we're not using the audio pin, drive it low
setPinOutput(C6);
writePinLow(C6);
#endif
_delay_ms(500);
-#ifdef ISSI_ENABLE
- issi_init();
-#endif
#ifdef WATCHDOG_ENABLE
// This is done after turning the layer LED red, if we're caught in a loop
// we should get a flashing red light
@@ -54,45 +29,6 @@ void matrix_scan_kb(void)
#ifdef WATCHDOG_ENABLE
wdt_reset();
#endif
-#ifdef ISSI_ENABLE
- // switch/underglow lighting update
- static uint32_t issi_device = 0;
- static uint32_t twi_last_ready = 0;
- if(twi_last_ready > 1000){
- // Its been way too long since the last ISSI update, reset the I2C bus and start again
- twi_last_ready = 0;
- TWIInit();
- force_issi_refresh();
- }
- if(isTWIReady()){
- twi_last_ready = 0;
- // If the i2c bus is available, kick off the issi update, alternate between devices
- update_issi(issi_device, issi_device);
- if(issi_device){
- issi_device = 0;
- }else{
- issi_device = 3;
- }
- }else{
- twi_last_ready++;
- }
-#endif
- // Update layer indicator LED
- //
- // Not sure how else to reliably do this... TMK has the 'hook_layer_change'
- // but can't find QMK equiv
- static uint32_t layer_indicator = -1;
- if(layer_indicator != layer_state){
- for(uint32_t i=0;; i++){
- // the layer_info list should end with layer 0xFFFF
- // it will break this out of the loop and define the unknown layer color
- if((layer_info[i].layer == (layer_state & layer_info[i].mask)) || (layer_info[i].layer == 0xFFFFFFFF)){
- set_rgb(32, layer_info[i].color.red, layer_info[i].color.green, layer_info[i].color.blue);
- layer_indicator = layer_state;
- break;
- }
- }
- }
matrix_scan_user();
}
@@ -115,7 +51,6 @@ bool process_record_kb(uint16_t keycode, keyrecord_t* record)
}
if (keycode == QK_BOOT) {
reset_keyboard_kb();
- } else {
}
return process_record_user(keycode, record);
}
@@ -126,49 +61,5 @@ void reset_keyboard_kb(void){
wdt_disable();
wdt_reset();
#endif
- set_rgb(31, 0x00, 0xFF, 0xFF);
- set_rgb(32, 0x00, 0xFF, 0xFF);
- force_issi_refresh();
reset_keyboard();
}
-
-bool led_update_kb(led_t led_state) {
- bool res = led_update_user(led_state);
- if(res) {
- // Set capslock LED to Blue
- if (led_state.caps_lock) {
- set_rgb(31, 0x00, 0x00, 0x7F);
- } else{
- set_rgb(31, 0x00, 0x00, 0x00);
- }
- }
- return res;
-}
-
-// Lighting info, see lighting.h for details
-const uint8_t switch_matrices[] = {0, 1};
-const uint8_t rgb_matrices[] = {6, 7};
-
-// RGB Map:
-// 27 29 10 9 8 7 6
-// 26 5
-// 25 4
-// 24 3
-// 23 22 21 20 14 15 11 1 2
-const uint8_t rgb_sequence[] = {
- 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 1, 2, 3, 4, 5, 6, 7, 8, 13, 14, 15, 16
-};
-
-// Maps switch LEDs from Row/Col to ISSI matrix.
-// Value breakdown:
-// Bit | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
-// | | ISSI Col | ISSI Row |
-// / |
-// Device
-const uint8_t switch_leds[MATRIX_ROWS][MATRIX_COLS] = {
- {0x19, 0x18, 0x17, 0x16, 0x15, 0x14, 0x13, 0x12, 0x11, 0x99, 0x98, 0x97, 0x96, 0x00, 0x95, 0x94, 0x93, 0x92, 0x91},
- {0x29, 0x28, 0x27, 0x26, 0x25, 0x24, 0x23, 0x22, 0x21, 0xA9, 0xA8, 0xA7, 0xA6, 0xA5, 0xB6, 0xA4, 0xA3, 0xA2, 0xA1},
- {0x39, 0x38, 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0xB9, 0xB8, 0xB7, 0x00, 0x00, 0x00, 0xB5, 0xB3, 0x49, 0x48},
- {0x47, 0x00, 0x45, 0x44, 0x43, 0x42, 0x41, 0xC9, 0xC8, 0xC7, 0xC6, 0xC5, 0xC4, 0x00, 0xC2, 0x59, 0x58, 0x57, 0x56},
- {0x55, 0x51, 0xD6, 0x00, 0x00, 0xE5, 0x00, 0x00, 0x00, 0x00, 0xE4, 0xE3, 0xE2, 0x00, 0xE1, 0x00, 0x00, 0x00, 0x00}
-};
diff --git a/keyboards/lfkeyboards/mini1800/mini1800.h b/keyboards/lfkeyboards/mini1800/mini1800.h
index c412058096..36797efd8f 100644
--- a/keyboards/lfkeyboards/mini1800/mini1800.h
+++ b/keyboards/lfkeyboards/mini1800/mini1800.h
@@ -1,22 +1,6 @@
#pragma once
-#include "matrix.h"
-#include <avr/sfr_defs.h>
-
-typedef struct RGB_Color {
- uint16_t red;
- uint16_t green;
- uint16_t blue;
-} RGB_Color;
-
-typedef struct Layer_Info {
- uint32_t layer;
- uint32_t mask;
- RGB_Color color;
-} Layer_Info;
-
-extern const uint32_t layer_count;
-extern const Layer_Info layer_info[];
+#include "quantum.h"
#define CLICK_HZ 500
#define CLICK_MS 2
diff --git a/keyboards/lfkeyboards/mini1800/reva/post_rules.mk b/keyboards/lfkeyboards/mini1800/reva/post_rules.mk
index 044d9754f1..1b087d7e1e 100644
--- a/keyboards/lfkeyboards/mini1800/reva/post_rules.mk
+++ b/keyboards/lfkeyboards/mini1800/reva/post_rules.mk
@@ -1,7 +1,3 @@
-ifeq ($(strip $(ISSI_ENABLE)), yes)
- OPT_DEFS += -DISSI_ENABLE
-endif
-
ifeq ($(strip $(WATCHDOG_ENABLE)), yes)
OPT_DEFS += -DWATCHDOG_ENABLE
endif
diff --git a/keyboards/lfkeyboards/mini1800/reva/rules.mk b/keyboards/lfkeyboards/mini1800/reva/rules.mk
index 473bcb10ae..fa0a6ab5b7 100644
--- a/keyboards/lfkeyboards/mini1800/reva/rules.mk
+++ b/keyboards/lfkeyboards/mini1800/reva/rules.mk
@@ -7,13 +7,5 @@ EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE = no # Console for debug
COMMAND_ENABLE = no # Commands for debug and configuration
NKRO_ENABLE = yes # Enable N-Key Rollover
-BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
-RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
AUDIO_ENABLE = yes # Audio output
-SLEEP_LED_ENABLE = yes
-
-ISSI_ENABLE = yes # If the I2C pullup resistors aren't install this must be disabled
WATCHDOG_ENABLE = yes # Resets keyboard if matrix_scan isn't run every 250ms
-
-# Extra source files for IS3731 lighting
-SRC = TWIlib.c issi.c lighting.c
diff --git a/keyboards/lfkeyboards/mini1800/revc/post_rules.mk b/keyboards/lfkeyboards/mini1800/revc/post_rules.mk
index 044d9754f1..1b087d7e1e 100644
--- a/keyboards/lfkeyboards/mini1800/revc/post_rules.mk
+++ b/keyboards/lfkeyboards/mini1800/revc/post_rules.mk
@@ -1,7 +1,3 @@
-ifeq ($(strip $(ISSI_ENABLE)), yes)
- OPT_DEFS += -DISSI_ENABLE
-endif
-
ifeq ($(strip $(WATCHDOG_ENABLE)), yes)
OPT_DEFS += -DWATCHDOG_ENABLE
endif
diff --git a/keyboards/lfkeyboards/mini1800/revc/rules.mk b/keyboards/lfkeyboards/mini1800/revc/rules.mk
index 473bcb10ae..fa0a6ab5b7 100644
--- a/keyboards/lfkeyboards/mini1800/revc/rules.mk
+++ b/keyboards/lfkeyboards/mini1800/revc/rules.mk
@@ -7,13 +7,5 @@ EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE = no # Console for debug
COMMAND_ENABLE = no # Commands for debug and configuration
NKRO_ENABLE = yes # Enable N-Key Rollover
-BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
-RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
AUDIO_ENABLE = yes # Audio output
-SLEEP_LED_ENABLE = yes
-
-ISSI_ENABLE = yes # If the I2C pullup resistors aren't install this must be disabled
WATCHDOG_ENABLE = yes # Resets keyboard if matrix_scan isn't run every 250ms
-
-# Extra source files for IS3731 lighting
-SRC = TWIlib.c issi.c lighting.c
diff --git a/keyboards/lfkeyboards/smk65/keymaps/default/rules.mk b/keyboards/lfkeyboards/smk65/keymaps/default/rules.mk
deleted file mode 100644
index 1f0147bd38..0000000000
--- a/keyboards/lfkeyboards/smk65/keymaps/default/rules.mk
+++ /dev/null
@@ -1,8 +0,0 @@
-# Build Options
-# change yes to no to disable
-#
-AUDIO_ENABLE = no # Audio output
-RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
-
-ISSI_ENABLE = no # If the I2C pullup resistors aren't install this must be disabled
-WATCHDOG_ENABLE = no # Resets keyboard if matrix_scan isn't run every 250ms
diff --git a/keyboards/lfkeyboards/smk65/keymaps/iso/rules.mk b/keyboards/lfkeyboards/smk65/keymaps/iso/rules.mk
deleted file mode 100644
index 1f0147bd38..0000000000
--- a/keyboards/lfkeyboards/smk65/keymaps/iso/rules.mk
+++ /dev/null
@@ -1,8 +0,0 @@
-# Build Options
-# change yes to no to disable
-#
-AUDIO_ENABLE = no # Audio output
-RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
-
-ISSI_ENABLE = no # If the I2C pullup resistors aren't install this must be disabled
-WATCHDOG_ENABLE = no # Resets keyboard if matrix_scan isn't run every 250ms
diff --git a/keyboards/lfkeyboards/smk65/post_rules.mk b/keyboards/lfkeyboards/smk65/post_rules.mk
index 044d9754f1..1b087d7e1e 100644
--- a/keyboards/lfkeyboards/smk65/post_rules.mk
+++ b/keyboards/lfkeyboards/smk65/post_rules.mk
@@ -1,7 +1,3 @@
-ifeq ($(strip $(ISSI_ENABLE)), yes)
- OPT_DEFS += -DISSI_ENABLE
-endif
-
ifeq ($(strip $(WATCHDOG_ENABLE)), yes)
OPT_DEFS += -DWATCHDOG_ENABLE
endif
diff --git a/keyboards/lfkeyboards/smk65/revb/config.h b/keyboards/lfkeyboards/smk65/revb/config.h
index c758caa92c..38b0529178 100644
--- a/keyboards/lfkeyboards/smk65/revb/config.h
+++ b/keyboards/lfkeyboards/smk65/revb/config.h
@@ -30,8 +30,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define AUDIO_VOICES
#define AUDIO_PIN C6
-#define BACKLIGHT_PWM_MAP {8, 16, 40, 55, 70, 128, 200, 255}
-
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE
/* Locking resynchronize hack */
diff --git a/keyboards/lfkeyboards/smk65/revb/info.json b/keyboards/lfkeyboards/smk65/revb/info.json
index 39df87cc23..148465d27d 100644
--- a/keyboards/lfkeyboards/smk65/revb/info.json
+++ b/keyboards/lfkeyboards/smk65/revb/info.json
@@ -2,29 +2,6 @@
"usb": {
"pid": "0x565B"
},
- "backlight": {
- "levels": 8
- },
- "rgblight": {
- "driver": "custom",
- "hue_steps": 10,
- "led_count": 20,
- "animations": {
- "breathing": true,
- "rainbow_mood": true,
- "rainbow_swirl": true,
- "snake": true,
- "knight": true,
- "christmas": true,
- "static_gradient": true,
- "rgb_test": true,
- "alternating": true,
- "twinkle": true
- }
- },
- "ws2812": {
- "pin": "C7"
- },
"processor": "at90usb646",
"bootloader": "atmel-dfu",
"layout_aliases": {
diff --git a/keyboards/lfkeyboards/smk65/revb/revb.c b/keyboards/lfkeyboards/smk65/revb/revb.c
index 32dbce8fd5..8eb9b9afe2 100644
--- a/keyboards/lfkeyboards/smk65/revb/revb.c
+++ b/keyboards/lfkeyboards/smk65/revb/revb.c
@@ -12,14 +12,8 @@ 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 <avr/sfr_defs.h>
-#include <avr/timer_avr.h>
-#include <avr/wdt.h>
#include "revb.h"
-#include "debug.h"
-#include "issi.h"
-#include "TWIlib.h"
-#include "lighting.h"
+#include <avr/wdt.h>
uint16_t click_hz = CLICK_HZ;
uint16_t click_time = CLICK_MS;
@@ -40,10 +34,6 @@ void matrix_init_kb(void)
setPinOutput(C6);
writePinLow(C6);
#endif
-
-#ifdef ISSI_ENABLE
- issi_init();
-#endif
}
void matrix_scan_kb(void)
@@ -75,7 +65,6 @@ bool process_record_kb(uint16_t keycode, keyrecord_t* record)
}
if (keycode == QK_BOOT) {
reset_keyboard_kb();
- } else {
}
return process_record_user(keycode, record);
}
@@ -88,27 +77,3 @@ void reset_keyboard_kb(void){
#endif
reset_keyboard();
}
-
-// LFK lighting info
-const uint8_t switch_matrices[] = {0, 1};
-const uint8_t rgb_matrices[] = {6, 7};
-// const uint8_t rgb_sequence[] = {
-// 14, 24, 23, 22, 21, 20, 19, 18, 26, 25, 28, 29,
-// 30, 31, 32, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13
-// };
-const uint8_t rgb_sequence[] = {
- 25, 28, 29,
- 30, 31, 32, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14
-};
-// Maps switch LEDs from Row/Col to ISSI matrix.
-// Value breakdown:
-// Bit | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
-// / \ ISSI Col | ISSI Row |
-// matrix idx
-// const uint8_t switch_leds[MATRIX_ROWS][MATRIX_COLS] =
-// KEYMAP(
-// 0x19, 0x18, 0x17, 0x16, 0x15, 0x14, 0x13, 0x12, 0x11, 0x99, 0x98, 0x97, 0x96, 0x95, 0x94, 0x93, 0x92, 0x91,
-// 0x29, 0x28, 0x27, 0x26, 0x25, 0x24, 0x23, 0x22, 0x21, 0xA9, 0xA8, 0xA7, 0xA6, 0xA5, 0xA4, 0xA3, 0xA2, 0xA1,
-// 0x39, 0x38, 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0xB9, 0xB8, 0xB7, 0xB6, 0xB5, 0xB3,
-// 0x49, 0x48, 0x47, 0x45, 0x44, 0x43, 0x42, 0x41, 0xC9, 0xC8, 0xC7, 0xC6, 0xC5, 0xC4, 0xC2,
-// 0x59, 0x58, 0x57, 0x56, 0x55, 0x51, 0xD6, 0xE5, 0xE4, 0xE3, 0xE2, 0xE1);
diff --git a/keyboards/lfkeyboards/smk65/revb/revb.h b/keyboards/lfkeyboards/smk65/revb/revb.h
index 6b63eb7944..61973b0b9d 100644
--- a/keyboards/lfkeyboards/smk65/revb/revb.h
+++ b/keyboards/lfkeyboards/smk65/revb/revb.h
@@ -15,23 +15,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once
#include "quantum.h"
-#include "matrix.h"
-#include <avr/sfr_defs.h>
-
-typedef struct RGB_Color {
- uint16_t red;
- uint16_t green;
- uint16_t blue;
-} RGB_Color;
-
-typedef struct Layer_Info {
- uint32_t layer;
- uint32_t mask;
- RGB_Color color;
-} Layer_Info;
-
-extern const uint32_t layer_count;
-extern const Layer_Info layer_info[];
#define CLICK_HZ 500
#define CLICK_MS 2
diff --git a/keyboards/lfkeyboards/smk65/revb/rules.mk b/keyboards/lfkeyboards/smk65/revb/rules.mk
index 1bd6ebc6a6..e69de29bb2 100644
--- a/keyboards/lfkeyboards/smk65/revb/rules.mk
+++ b/keyboards/lfkeyboards/smk65/revb/rules.mk
@@ -1,9 +0,0 @@
-# Build Options
-# change yes to no to disable
-#
-BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
-RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
-AUDIO_ENABLE = no # Audio output
-
-# Extra source files for IS3731 lighting
-SRC += TWIlib.c issi.c lighting.c
diff --git a/keyboards/lfkeyboards/smk65/revf/info.json b/keyboards/lfkeyboards/smk65/revf/info.json
index 50c039b76c..63e9d0abc7 100644
--- a/keyboards/lfkeyboards/smk65/revf/info.json
+++ b/keyboards/lfkeyboards/smk65/revf/info.json
@@ -4,10 +4,6 @@
},
"processor": "atmega32u4",
"bootloader": "halfkay",
- "rgblight": {
- "driver": "custom",
- "led_count": 28
- },
"layouts": {
"LAYOUT_65_ansi": {
"layout": [
diff --git a/keyboards/lfkeyboards/smk65/revf/rules.mk b/keyboards/lfkeyboards/smk65/revf/rules.mk
index e372473a50..e69de29bb2 100644
--- a/keyboards/lfkeyboards/smk65/revf/rules.mk
+++ b/keyboards/lfkeyboards/smk65/revf/rules.mk
@@ -1,4 +0,0 @@
-# Build Options
-# change yes to no to disable
-#
-RGBLIGHT_ENABLE = no # TODO: Enable keyboard RGB underglow
diff --git a/keyboards/manyboard/macro/keymaps/default/keymap.c b/keyboards/manyboard/macro/keymaps/default/keymap.c
index 0b9d2ac927..d068fa8d3d 100644
--- a/keyboards/manyboard/macro/keymaps/default/keymap.c
+++ b/keyboards/manyboard/macro/keymaps/default/keymap.c
@@ -41,15 +41,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
layer_state_t layer_state_set_user(layer_state_t state) {
switch (get_highest_layer(state)) {
case 0:
- sethsv(HSV_WHITE, (LED_TYPE *)&led[0]);
+ sethsv(HSV_WHITE, (rgb_led_t *)&led[0]);
rgblight_set();
break;
case 1:
- sethsv(HSV_GREEN, (LED_TYPE *)&led[0]);
+ sethsv(HSV_GREEN, (rgb_led_t *)&led[0]);
rgblight_set();
break;
case 2:
- sethsv(HSV_BLUE, (LED_TYPE *)&led[0]);
+ sethsv(HSV_BLUE, (rgb_led_t *)&led[0]);
rgblight_set();
break;
}
diff --git a/keyboards/manyboard/macro/keymaps/via/keymap.c b/keyboards/manyboard/macro/keymaps/via/keymap.c
index 0b9d2ac927..d068fa8d3d 100644
--- a/keyboards/manyboard/macro/keymaps/via/keymap.c
+++ b/keyboards/manyboard/macro/keymaps/via/keymap.c
@@ -41,15 +41,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
layer_state_t layer_state_set_user(layer_state_t state) {
switch (get_highest_layer(state)) {
case 0:
- sethsv(HSV_WHITE, (LED_TYPE *)&led[0]);
+ sethsv(HSV_WHITE, (rgb_led_t *)&led[0]);
rgblight_set();
break;
case 1:
- sethsv(HSV_GREEN, (LED_TYPE *)&led[0]);
+ sethsv(HSV_GREEN, (rgb_led_t *)&led[0]);
rgblight_set();
break;
case 2:
- sethsv(HSV_BLUE, (LED_TYPE *)&led[0]);
+ sethsv(HSV_BLUE, (rgb_led_t *)&led[0]);
rgblight_set();
break;
}
diff --git a/keyboards/matrix/abelx/abelx.c b/keyboards/matrix/abelx/abelx.c
index 9585948e0c..ea3e57aeaf 100644
--- a/keyboards/matrix/abelx/abelx.c
+++ b/keyboards/matrix/abelx/abelx.c
@@ -66,7 +66,7 @@ const aw9523b_led g_aw9523b_leds[AW9523B_RGB_NUM] = {
{AW9523B_P07_PWM, AW9523B_P06_PWM, AW9523B_P05_PWM},
};
-void rgblight_call_driver(LED_TYPE *start_led, uint8_t num_leds)
+void rgblight_call_driver(rgb_led_t *start_led, uint8_t num_leds)
{
uint8_t num = num_leds < AW9523B_RGB_NUM ? num_leds : AW9523B_RGB_NUM;
diff --git a/keyboards/matrix/abelx/rules.mk b/keyboards/matrix/abelx/rules.mk
index 7a5d01e5cb..1c2fc05ffe 100644
--- a/keyboards/matrix/abelx/rules.mk
+++ b/keyboards/matrix/abelx/rules.mk
@@ -45,4 +45,4 @@ NO_USB_STARTUP_CHECK = yes # Disable initialization only when usb is plugged in
CUSTOM_MATRIX = lite
# project specific files
SRC += matrix.c tca6424.c aw9523b.c
-QUANTUM_LIB_SRC += i2c_master.c
+I2C_DRIVER_REQUIRED = yes
diff --git a/keyboards/matrix/m20add/config.h b/keyboards/matrix/m20add/config.h
index 8d4c69bb9c..048796c793 100644
--- a/keyboards/matrix/m20add/config.h
+++ b/keyboards/matrix/m20add/config.h
@@ -78,6 +78,6 @@
#define I2C1_CLOCK_SPEED 400000
#define I2C1_DUTY_CYCLE FAST_DUTY_CYCLE_2
-#define DRIVER_ADDR_1 0b1110100
-#define DRIVER_COUNT 1
+#define DRIVER_ADDR_1 IS31FL3731_I2C_ADDRESS_GND
+#define IS31FL3731_DRIVER_COUNT 1
#define RGB_MATRIX_LED_COUNT 20
diff --git a/keyboards/matrix/m20add/rgb_ring.c b/keyboards/matrix/m20add/rgb_ring.c
index 4567f0348d..81bd5e5407 100644
--- a/keyboards/matrix/m20add/rgb_ring.c
+++ b/keyboards/matrix/m20add/rgb_ring.c
@@ -30,7 +30,7 @@
#endif
// rgb ring leds setting
-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
@@ -357,7 +357,7 @@ static void custom_effects(void)
effect_funcs[rgb_ring.effect]();
}
-void rgblight_call_driver(LED_TYPE *start_led, uint8_t num_leds)
+void rgblight_call_driver(rgb_led_t *start_led, uint8_t num_leds)
{
if (rgb_ring.state != RING_STATE_QMK) {
return;
diff --git a/keyboards/matrix/m20add/rules.mk b/keyboards/matrix/m20add/rules.mk
index 86bd6b9371..1b005b8c17 100644
--- a/keyboards/matrix/m20add/rules.mk
+++ b/keyboards/matrix/m20add/rules.mk
@@ -29,4 +29,4 @@ RGBLIGHT_ENABLE = yes
CUSTOM_MATRIX = lite
# project specific files
SRC += matrix.c tca6424.c rgb_ring.c drivers/led/issi/is31fl3731.c
-QUANTUM_LIB_SRC += i2c_master.c
+I2C_DRIVER_REQUIRED = yes
diff --git a/keyboards/matrix/noah/config.h b/keyboards/matrix/noah/config.h
index 452fef4cee..428fe98d2e 100644
--- a/keyboards/matrix/noah/config.h
+++ b/keyboards/matrix/noah/config.h
@@ -19,9 +19,9 @@
#define PAL_MODE_STM32_ALTERNATE_OPENDRAIN (PAL_MODE_ALTERNATE(4) | PAL_STM32_OTYPE_OPENDRAIN)
// rgb matrix setting
-#define DRIVER_ADDR_1 0b1110100
-#define DRIVER_ADDR_2 0b1110110
-#define DRIVER_COUNT 2
+#define DRIVER_ADDR_1 IS31FL3731_I2C_ADDRESS_GND
+#define DRIVER_ADDR_2 IS31FL3731_I2C_ADDRESS_SDA
+#define IS31FL3731_DRIVER_COUNT 2
#define DRIVER_1_LED_TOTAL 36
#define DRIVER_2_LED_TOTAL 36
#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
diff --git a/keyboards/matrix/noah/noah.c b/keyboards/matrix/noah/noah.c
index 0969998fa9..8246da809c 100644
--- a/keyboards/matrix/noah/noah.c
+++ b/keyboards/matrix/noah/noah.c
@@ -20,7 +20,7 @@ extern rgblight_config_t rgblight_config;
#if RGBLED_NUM < 7
#error "MUST set the RGBLED_NUM bigger than 7"
#endif
-LED_TYPE noah_leds[RGBLED_NUM];
+rgb_led_t noah_leds[RGBLED_NUM];
static bool noah_led_mode = false;
void rgblight_set(void) {
memset(&noah_leds[0], 0, sizeof(noah_leds));
@@ -63,7 +63,7 @@ void matrix_scan_kb(void) {
}
#ifdef RGB_MATRIX_ENABLE
-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/keyboards/mechlovin/adelais/rgb_led/rev2/config.h b/keyboards/mechlovin/adelais/rgb_led/rev2/config.h
index d4b34ff48e..7e1bd43012 100644
--- a/keyboards/mechlovin/adelais/rgb_led/rev2/config.h
+++ b/keyboards/mechlovin/adelais/rgb_led/rev2/config.h
@@ -1,16 +1,9 @@
#pragma once
//rgb matrix setting
-// This is a 7-bit address, that gets left-shifted and bit 0
-// set to 0 for write, 1 for read (as per I2C protocol)
-// The address will vary depending on your wiring:
-// 0b1110100 AD <-> GND
-// 0b1110111 AD <-> VCC
-// 0b1110101 AD <-> SCL
-// 0b1110110 AD <-> SDA
-#define DRIVER_ADDR_1 0b1110100
-#define DRIVER_ADDR_2 0b1110110
-#define DRIVER_COUNT 2
+#define DRIVER_ADDR_1 IS31FL3731_I2C_ADDRESS_GND
+#define DRIVER_ADDR_2 IS31FL3731_I2C_ADDRESS_SDA
+#define IS31FL3731_DRIVER_COUNT 2
#define DRIVER_1_LED_TOTAL 32
#define DRIVER_2_LED_TOTAL 36
#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
diff --git a/keyboards/mechlovin/adelais/rgb_led/rev2/rev2.c b/keyboards/mechlovin/adelais/rgb_led/rev2/rev2.c
index e51e92ed6f..9e5fe11895 100644
--- a/keyboards/mechlovin/adelais/rgb_led/rev2/rev2.c
+++ b/keyboards/mechlovin/adelais/rgb_led/rev2/rev2.c
@@ -17,7 +17,7 @@
#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3731_led_t PROGMEM g_is31fl3731_leds[RGB_MATRIX_LED_COUNT] = {
{0, C2_1, C3_1, C4_1}, //D102-A0-0
{0, C5_1, C6_1, C7_1}, //D108-A1-1
diff --git a/keyboards/mechlovin/adelais/rgb_led/rev3/config.h b/keyboards/mechlovin/adelais/rgb_led/rev3/config.h
index c4961c6492..039f3ffe81 100644
--- a/keyboards/mechlovin/adelais/rgb_led/rev3/config.h
+++ b/keyboards/mechlovin/adelais/rgb_led/rev3/config.h
@@ -17,20 +17,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once
-#define WS2812_SPI SPID1 // default: SPID1
+#define WS2812_SPI_DRIVER SPID1 // default: SPID1
#define WS2812_SPI_MOSI_PAL_MODE 5 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 5
#ifdef RGB_MATRIX_ENABLE
//rgb matrix setting
-// This is a 7-bit address, that gets left-shifted and bit 0
-// set to 0 for write, 1 for read (as per I2C protocol)
-// The address will vary depending on your wiring:
-// 0b1110100 AD <-> GND
-// 0b1110111 AD <-> VCC
-// 0b1110101 AD <-> SCL
-// 0b1110110 AD <-> SDA
-#define DRIVER_ADDR_1 0b0110010
-#define DRIVER_COUNT 1
+#define DRIVER_ADDR_1 IS31FL3741_I2C_ADDRESS_SDA
+#define IS31FL3741_DRIVER_COUNT 1
#define RGB_MATRIX_LED_COUNT 66
#define RGB_MATRIX_KEYPRESSES // reacts to keypresses
diff --git a/keyboards/mechlovin/adelais/rgb_led/rev3/rev3.c b/keyboards/mechlovin/adelais/rgb_led/rev3/rev3.c
index b7e03d0f1e..b13f223a1c 100644
--- a/keyboards/mechlovin/adelais/rgb_led/rev3/rev3.c
+++ b/keyboards/mechlovin/adelais/rgb_led/rev3/rev3.c
@@ -17,7 +17,7 @@
#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3741_led_t PROGMEM g_is31fl3741_leds[RGB_MATRIX_LED_COUNT] = {
{0, CS3_SW5, CS2_SW5, CS1_SW5}, /* D9-K31-00 */
{0, CS6_SW5, CS5_SW5, CS4_SW5}, /* D46-K00-01 */
{0, CS6_SW9, CS5_SW9, CS4_SW9}, /* D59-K01-02 */
diff --git a/keyboards/mechlovin/delphine/rgb_led/config.h b/keyboards/mechlovin/delphine/rgb_led/config.h
index 9498e8914f..66455e1158 100644
--- a/keyboards/mechlovin/delphine/rgb_led/config.h
+++ b/keyboards/mechlovin/delphine/rgb_led/config.h
@@ -1,14 +1,8 @@
#pragma once
-//rgb matrix setting// This is a 7-bit address, that gets left-shifted and bit 0
-// set to 0 for write, 1 for read (as per I2C protocol)
-// The address will vary depending on your wiring:
-// 0b1110100 AD <-> GND
-// 0b1110111 AD <-> VCC
-// 0b1110101 AD <-> SCL
-// 0b1110110 AD <-> SDA
-#define DRIVER_ADDR_1 0b1110110
-#define DRIVER_COUNT 1
+//rgb matrix setting
+#define DRIVER_ADDR_1 IS31FL3731_I2C_ADDRESS_SDA
+#define IS31FL3731_DRIVER_COUNT 1
#define RGB_MATRIX_LED_COUNT 25
#define RGB_MATRIX_KEYPRESSES // reacts to keypresses
#define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses)
diff --git a/keyboards/mechlovin/delphine/rgb_led/rgb_led.c b/keyboards/mechlovin/delphine/rgb_led/rgb_led.c
index 02a011ba4b..a55143f2e1 100644
--- a/keyboards/mechlovin/delphine/rgb_led/rgb_led.c
+++ b/keyboards/mechlovin/delphine/rgb_led/rgb_led.c
@@ -18,7 +18,7 @@
#ifdef RGB_MATRIX_ENABLE
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3731_led_t PROGMEM g_is31fl3731_leds[RGB_MATRIX_LED_COUNT] = {
// left CA
{0, C5_2, C6_2, C7_2}, //D2-0
{0, C1_1, C3_2, C4_2}, //D20-1
diff --git a/keyboards/mechlovin/hannah60rgb/rev2/config.h b/keyboards/mechlovin/hannah60rgb/rev2/config.h
index 7e9a918493..5c7bb7abfe 100644
--- a/keyboards/mechlovin/hannah60rgb/rev2/config.h
+++ b/keyboards/mechlovin/hannah60rgb/rev2/config.h
@@ -1,15 +1,9 @@
#pragma once
-//rgb matrix setting// This is a 7-bit address, that gets left-shifted and bit 0
-// set to 0 for write, 1 for read (as per I2C protocol)
-// The address will vary depending on your wiring:
-// 0b1110100 AD <-> GND
-// 0b1110111 AD <-> VCC
-// 0b1110101 AD <-> SCL
-// 0b1110110 AD <-> SDA
-#define DRIVER_ADDR_1 0b1110100
-#define DRIVER_ADDR_2 0b1110110
-#define DRIVER_COUNT 2
+//rgb matrix setting
+#define DRIVER_ADDR_1 IS31FL3731_I2C_ADDRESS_GND
+#define DRIVER_ADDR_2 IS31FL3731_I2C_ADDRESS_SDA
+#define IS31FL3731_DRIVER_COUNT 2
#define DRIVER_1_LED_TOTAL 44
#define DRIVER_2_LED_TOTAL 34
#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
diff --git a/keyboards/mechlovin/hannah60rgb/rev2/rev2.c b/keyboards/mechlovin/hannah60rgb/rev2/rev2.c
index 246caa2963..2e3c8d0090 100644
--- a/keyboards/mechlovin/hannah60rgb/rev2/rev2.c
+++ b/keyboards/mechlovin/hannah60rgb/rev2/rev2.c
@@ -17,7 +17,7 @@
#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
-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/keyboards/mechlovin/hex6c/config.h b/keyboards/mechlovin/hex6c/config.h
index 4cfcaebcde..e74e7939c4 100644
--- a/keyboards/mechlovin/hex6c/config.h
+++ b/keyboards/mechlovin/hex6c/config.h
@@ -18,6 +18,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once
#define BACKLIGHT_PWM_DRIVER PWMD3
-
-#define WEAR_LEVELING_BACKING_SIZE 4096
-#define WEAR_LEVELING_LOGICAL_SIZE 2048
diff --git a/keyboards/mechlovin/hex6c/info.json b/keyboards/mechlovin/hex6c/info.json
index dfeb91e0ba..483566e7f4 100644
--- a/keyboards/mechlovin/hex6c/info.json
+++ b/keyboards/mechlovin/hex6c/info.json
@@ -13,6 +13,11 @@
"rows": ["A10", "B13", "B12", "B11", "C14", "C15"]
},
"diode_direction": "COL2ROW",
+ "eeprom": {
+ "wear_leveling": {
+ "backing_size": 4096
+ }
+ },
"encoder": {
"rotary": [
{"pin_a": "A15", "pin_b": "A2"}
diff --git a/keyboards/mechlovin/infinity87/rgb_rev1/config.h b/keyboards/mechlovin/infinity87/rgb_rev1/config.h
index 10fc42f830..9777e290bb 100644
--- a/keyboards/mechlovin/infinity87/rgb_rev1/config.h
+++ b/keyboards/mechlovin/infinity87/rgb_rev1/config.h
@@ -17,13 +17,6 @@
#pragma once
//rgb matrix setting
-// This is a 7-bit address, that gets left-shifted and bit 0
-// set to 0 for write, 1 for read (as per I2C protocol)
-// The address will vary depending on your wiring:
-// 0b0110000 AD <-> GND
-// 0b0110011 AD <-> VCC
-// 0b0110001 AD <-> SCL
-// 0b0110010 AD <-> SDA
#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
#define RGB_MATRIX_KEYPRESSES
#undef ENABLE_RGB_MATRIX_SPLASH
@@ -80,7 +73,7 @@
//#define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_SOLID_COLOR
#define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_CYCLE_ALL
//#define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_SOLID_REACTIVE_SIMPLE
-#define DRIVER_ADDR_1 0b0110010
-#define DRIVER_COUNT 1
+#define DRIVER_ADDR_1 IS31FL3741_I2C_ADDRESS_SDA
+#define IS31FL3741_DRIVER_COUNT 1
#define RGB_MATRIX_LED_COUNT 91
#define DRIVER_INDICATOR_LED_TOTAL 0
diff --git a/keyboards/mechlovin/infinity87/rgb_rev1/rgb_rev1.c b/keyboards/mechlovin/infinity87/rgb_rev1/rgb_rev1.c
index c10d47d191..5649f80712 100644
--- a/keyboards/mechlovin/infinity87/rgb_rev1/rgb_rev1.c
+++ b/keyboards/mechlovin/infinity87/rgb_rev1/rgb_rev1.c
@@ -17,7 +17,7 @@
#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3741_led_t PROGMEM g_is31fl3741_leds[RGB_MATRIX_LED_COUNT] = {
{0, CS34_SW1, CS35_SW1, CS36_SW1}, //D92-K00-0
{0, CS37_SW1, CS38_SW1, CS39_SW1}, //D94-K01-1
{0, CS31_SW1, CS32_SW1, CS33_SW1}, //D96-K02-2
diff --git a/keyboards/mechlovin/olly/octagon/config.h b/keyboards/mechlovin/olly/octagon/config.h
index 4e502b6154..573a11f88f 100644
--- a/keyboards/mechlovin/olly/octagon/config.h
+++ b/keyboards/mechlovin/olly/octagon/config.h
@@ -18,18 +18,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once
#ifdef LED_MATRIX_ENABLE
-// This is a 7-bit address, that gets left-shifted and bit 0
-// set to 0 for write, 1 for read (as per I2C protocol)
-// The address will vary depending on your wiring:
-// 0b1110100 AD <-> GND
-// 0b1110111 AD <-> VCC
-// 0b1110101 AD <-> SCL
-// 0b1110110 AD <-> SDA
-#define LED_DRIVER_ADDR_1 0b1110110
+#define LED_DRIVER_ADDR_1 IS31FL3731_I2C_ADDRESS_SDA
#define I2C_DRIVER I2CD2
#define I2C1_SCL_PIN B10
#define I2C1_SDA_PIN B11
-#define LED_DRIVER_COUNT 1
+#define IS31FL3731_DRIVER_COUNT 1
#define LED_MATRIX_LED_COUNT 94
#define LED_MATRIX_KEYPRESSES // reacts to keypresses
#define LED_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses)
diff --git a/keyboards/mechlovin/olly/octagon/octagon.c b/keyboards/mechlovin/olly/octagon/octagon.c
index 41f9dbb438..b5eb828bc8 100644
--- a/keyboards/mechlovin/olly/octagon/octagon.c
+++ b/keyboards/mechlovin/olly/octagon/octagon.c
@@ -16,7 +16,7 @@
#include "quantum.h"
-const is31_led PROGMEM g_is31_leds[LED_MATRIX_LED_COUNT] = {
+const is31fl3731_led_t PROGMEM g_is31fl3731_leds[LED_MATRIX_LED_COUNT] = {
/* Refer to IS31 manual for these locations
* driver
* | LED address
diff --git a/keyboards/mechlovin/zed60/config.h b/keyboards/mechlovin/zed60/config.h
index cdbbd6dd0e..13e17a7bb6 100644
--- a/keyboards/mechlovin/zed60/config.h
+++ b/keyboards/mechlovin/zed60/config.h
@@ -17,5 +17,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once
-#define WS2812_SPI SPID1 // default: SPID1
+#define WS2812_SPI_DRIVER SPID1 // default: SPID1
#define WS2812_SPI_MOSI_PAL_MODE 6 // MOSI pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 5
diff --git a/keyboards/mechlovin/zed65/910/config.h b/keyboards/mechlovin/zed65/910/config.h
index a5902fa9c1..f21653f5af 100644
--- a/keyboards/mechlovin/zed65/910/config.h
+++ b/keyboards/mechlovin/zed65/910/config.h
@@ -17,5 +17,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once
-#define WS2812_SPI SPID1 // default: SPID1
+#define WS2812_SPI_DRIVER SPID1 // default: SPID1
#define WS2812_SPI_MOSI_PAL_MODE 6 // MOSI pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 5
diff --git a/keyboards/mechlovin/zed65/mono_led/config.h b/keyboards/mechlovin/zed65/mono_led/config.h
index 1ec1746456..65f9ba2a94 100644
--- a/keyboards/mechlovin/zed65/mono_led/config.h
+++ b/keyboards/mechlovin/zed65/mono_led/config.h
@@ -18,18 +18,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once
#ifdef LED_MATRIX_ENABLE
-// This is a 7-bit address, that gets left-shifted and bit 0
-// set to 0 for write, 1 for read (as per I2C protocol)
-// The address will vary depending on your wiring:
-// 0b1110100 AD <-> GND
-// 0b1110111 AD <-> VCC
-// 0b1110101 AD <-> SCL
-// 0b1110110 AD <-> SDA
-#define LED_DRIVER_ADDR_1 0b1110110
+#define LED_DRIVER_ADDR_1 IS31FL3731_I2C_ADDRESS_SDA
#define I2C_DRIVER I2CD2
#define I2C1_SCL_PIN B10
#define I2C1_SDA_PIN B11
-#define LED_DRIVER_COUNT 1
+#define IS31FL3731_DRIVER_COUNT 1
#define LED_MATRIX_LED_COUNT 70
#define LED_MATRIX_KEYPRESSES // reacts to keypresses
#define LED_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses)
diff --git a/keyboards/mechlovin/zed65/mono_led/mono_led.c b/keyboards/mechlovin/zed65/mono_led/mono_led.c
index e618d41489..f66c4b1359 100644
--- a/keyboards/mechlovin/zed65/mono_led/mono_led.c
+++ b/keyboards/mechlovin/zed65/mono_led/mono_led.c
@@ -19,7 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
-const is31_led PROGMEM g_is31_leds[LED_MATRIX_LED_COUNT] = {
+const is31fl3731_led_t PROGMEM g_is31fl3731_leds[LED_MATRIX_LED_COUNT] = {
/* Refer to IS31 manual for these locations
* driver
* | LED address
diff --git a/keyboards/mechlovin/zed65/no_backlight/wearhaus66/config.h b/keyboards/mechlovin/zed65/no_backlight/wearhaus66/config.h
index 5cb2a00b88..3bec308941 100644
--- a/keyboards/mechlovin/zed65/no_backlight/wearhaus66/config.h
+++ b/keyboards/mechlovin/zed65/no_backlight/wearhaus66/config.h
@@ -17,5 +17,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once
-#define WS2812_SPI SPID2 // default: SPID1
+#define WS2812_SPI_DRIVER SPID2 // default: SPID1
#define WS2812_SPI_MOSI_PAL_MODE 0 // MOSI pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 5
diff --git a/keyboards/mechlovin/zed65/rev1/config.h b/keyboards/mechlovin/zed65/rev1/config.h
index 24efedfffb..4ed1992992 100644
--- a/keyboards/mechlovin/zed65/rev1/config.h
+++ b/keyboards/mechlovin/zed65/rev1/config.h
@@ -18,7 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once
#ifdef RGBLIGHT_ENABLE
-#define WS2812_SPI SPID1 // default: SPID1
+#define WS2812_SPI_DRIVER SPID1 // default: SPID1
#define WS2812_SPI_MOSI_PAL_MODE 6 // MOSI pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 5
#define WS2812_SPI_USE_CIRCULAR_BUFFER
#endif
diff --git a/keyboards/mechwild/sugarglider/config.h b/keyboards/mechwild/sugarglider/config.h
index 75aa26956c..f078cf34cc 100644
--- a/keyboards/mechwild/sugarglider/config.h
+++ b/keyboards/mechwild/sugarglider/config.h
@@ -3,8 +3,6 @@
#pragma once
-#define DYNAMIC_KEYMAP_LAYER_COUNT 5
-
/* Matrix COL and ROW definitions */
#define MATRIX_ROWS 9
#define MATRIX_COLS 6
diff --git a/keyboards/mechwild/sugarglider/info.json b/keyboards/mechwild/sugarglider/info.json
index f8439dde11..7448ae2854 100644
--- a/keyboards/mechwild/sugarglider/info.json
+++ b/keyboards/mechwild/sugarglider/info.json
@@ -23,6 +23,9 @@
"force_nkro": true
},
"diode_direction": "COL2ROW",
+ "dynamic_keymap": {
+ "layer_count": 5
+ },
"rgblight": {
"led_count": 10,
"max_brightness": 255,
diff --git a/keyboards/mechwild/sugarglider/rules.mk b/keyboards/mechwild/sugarglider/rules.mk
index 9cfa6b7797..6fd0836a73 100644
--- a/keyboards/mechwild/sugarglider/rules.mk
+++ b/keyboards/mechwild/sugarglider/rules.mk
@@ -13,7 +13,7 @@ CUSTOM_MATRIX = lite
VPATH += drivers/gpio
SRC += mcp23018.c matrix.c
-QUANTUM_LIB_SRC += i2c_master.c
+I2C_DRIVER_REQUIRED = yes
DEFAULT_FOLDER = mechwild/sugarglider/wide_oled
diff --git a/keyboards/melgeek/mach80/config.h b/keyboards/melgeek/mach80/config.h
index f73ab7345c..000b81eef9 100755
--- a/keyboards/melgeek/mach80/config.h
+++ b/keyboards/melgeek/mach80/config.h
@@ -25,8 +25,8 @@
#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH
//#define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_SOLID_COLOR
#define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_CYCLE_ALL
-#define DRIVER_ADDR_1 0b0110000
-#define DRIVER_COUNT 1
+#define DRIVER_ADDR_1 IS31FL3741_I2C_ADDRESS_GND
+#define IS31FL3741_DRIVER_COUNT 1
#define ENABLE_RGB_MATRIX_ALPHAS_MODS
#define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN
diff --git a/keyboards/melgeek/mach80/rev1/rev1.c b/keyboards/melgeek/mach80/rev1/rev1.c
index da4c6b73d8..19075b7605 100755
--- a/keyboards/melgeek/mach80/rev1/rev1.c
+++ b/keyboards/melgeek/mach80/rev1/rev1.c
@@ -19,7 +19,7 @@
#ifdef RGB_MATRIX_ENABLE
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3741_led_t PROGMEM g_is31fl3741_leds[RGB_MATRIX_LED_COUNT] = {
{0, CS9_SW1, CS8_SW1, CS7_SW1}, /* RGB1 */
{0, CS9_SW2, CS8_SW2, CS7_SW2}, /* RGB2 */
{0, CS9_SW3, CS8_SW3, CS7_SW3}, /* RGB3 */
@@ -144,7 +144,7 @@ led_config_t g_led_config = {
}
};
-const is31_led g_is31_indicator_leds[3] = {
+const is31fl3741_led_t g_is31_indicator_leds[3] = {
{0, CS6_SW1, CS5_SW1, CS4_SW1}, /* RGB107 */
{0, CS6_SW2, CS5_SW2, CS4_SW2}, /* RGB108 */
{0, CS6_SW3, CS5_SW3, CS4_SW3}, /* RGB109 */
@@ -175,7 +175,7 @@ bool led_update_kb(led_t led_state) {
void matrix_init_kb(void) {
for (int i = 0; i < DRIVER_INDICATOR_LED_TOTAL; ++i) {
- is31_led led = g_is31_indicator_leds[i];
+ is31fl3741_led_t led = g_is31_indicator_leds[i];
is31fl3741_set_scaling_registers(&led, 0xFF, 0xFF, 0xFF);
}
diff --git a/keyboards/melgeek/mach80/rev2/rev2.c b/keyboards/melgeek/mach80/rev2/rev2.c
index 632466376d..38b23955c6 100755
--- a/keyboards/melgeek/mach80/rev2/rev2.c
+++ b/keyboards/melgeek/mach80/rev2/rev2.c
@@ -19,7 +19,7 @@
#ifdef RGB_MATRIX_ENABLE
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3741_led_t PROGMEM g_is31fl3741_leds[RGB_MATRIX_LED_COUNT] = {
{0, CS9_SW1, CS8_SW1, CS7_SW1}, /* RGB1 */
{0, CS9_SW2, CS8_SW2, CS7_SW2}, /* RGB2 */
{0, CS9_SW3, CS8_SW3, CS7_SW3}, /* RGB3 */
@@ -142,7 +142,7 @@ led_config_t g_led_config = {
}
};
-const is31_led g_is31_indicator_leds[3] = {
+const is31fl3741_led_t g_is31_indicator_leds[3] = {
{0, CS6_SW1, CS5_SW1, CS4_SW1}, /* RGB107 */
{0, CS6_SW2, CS5_SW2, CS4_SW2}, /* RGB108 */
{0, CS6_SW3, CS5_SW3, CS4_SW3}, /* RGB109 */
@@ -173,7 +173,7 @@ bool led_update_kb(led_t led_state) {
void matrix_init_kb(void) {
for (int i = 0; i < DRIVER_INDICATOR_LED_TOTAL; ++i) {
- is31_led led = g_is31_indicator_leds[i];
+ is31fl3741_led_t led = g_is31_indicator_leds[i];
is31fl3741_set_scaling_registers(&led, 0xFF, 0xFF, 0xFF);
}
diff --git a/keyboards/melgeek/mj61/config.h b/keyboards/melgeek/mj61/config.h
index af2393e5ec..e07d2078cd 100644
--- a/keyboards/melgeek/mj61/config.h
+++ b/keyboards/melgeek/mj61/config.h
@@ -70,5 +70,5 @@
// # define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
//#define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_SOLID_COLOR
#define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_CYCLE_ALL
-#define DRIVER_ADDR_1 0b0110000
-#define DRIVER_COUNT 1
+#define DRIVER_ADDR_1 IS31FL3741_I2C_ADDRESS_GND
+#define IS31FL3741_DRIVER_COUNT 1
diff --git a/keyboards/melgeek/mj61/rev1/rev1.c b/keyboards/melgeek/mj61/rev1/rev1.c
index 8f8b48b017..76fcb64c37 100644
--- a/keyboards/melgeek/mj61/rev1/rev1.c
+++ b/keyboards/melgeek/mj61/rev1/rev1.c
@@ -17,7 +17,7 @@
#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3741_led_t PROGMEM g_is31fl3741_leds[RGB_MATRIX_LED_COUNT] = {
{0, CS12_SW1, CS11_SW1, CS10_SW1}, /* RGB1 */
{0, CS12_SW2, CS11_SW2, CS10_SW2}, /* RGB2 */
{0, CS12_SW3, CS11_SW3, CS10_SW3}, /* RGB3 */
diff --git a/keyboards/melgeek/mj61/rev2/rev2.c b/keyboards/melgeek/mj61/rev2/rev2.c
index 448fa0bb18..9d13d52ebc 100644
--- a/keyboards/melgeek/mj61/rev2/rev2.c
+++ b/keyboards/melgeek/mj61/rev2/rev2.c
@@ -19,7 +19,7 @@
#ifdef RGB_MATRIX_ENABLE
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3741_led_t PROGMEM g_is31fl3741_leds[RGB_MATRIX_LED_COUNT] = {
{0, CS9_SW1, CS8_SW1, CS7_SW1}, /* RGB1 */
{0, CS9_SW2, CS8_SW2, CS7_SW2}, /* RGB3 */
{0, CS9_SW3, CS8_SW3, CS7_SW3}, /* RGB4 */
diff --git a/keyboards/melgeek/mj63/config.h b/keyboards/melgeek/mj63/config.h
index af2393e5ec..e07d2078cd 100644
--- a/keyboards/melgeek/mj63/config.h
+++ b/keyboards/melgeek/mj63/config.h
@@ -70,5 +70,5 @@
// # define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
//#define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_SOLID_COLOR
#define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_CYCLE_ALL
-#define DRIVER_ADDR_1 0b0110000
-#define DRIVER_COUNT 1
+#define DRIVER_ADDR_1 IS31FL3741_I2C_ADDRESS_GND
+#define IS31FL3741_DRIVER_COUNT 1
diff --git a/keyboards/melgeek/mj63/rev1/rev1.c b/keyboards/melgeek/mj63/rev1/rev1.c
index a0a9ac13cd..69e7ab5da6 100644
--- a/keyboards/melgeek/mj63/rev1/rev1.c
+++ b/keyboards/melgeek/mj63/rev1/rev1.c
@@ -19,7 +19,7 @@
#ifdef RGB_MATRIX_ENABLE
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3741_led_t PROGMEM g_is31fl3741_leds[RGB_MATRIX_LED_COUNT] = {
{0, CS9_SW1, CS8_SW1, CS7_SW1}, /* RGB1 */
{0, CS9_SW2, CS8_SW2, CS7_SW2}, /* RGB2 */
{0, CS9_SW3, CS8_SW3, CS7_SW3}, /* RGB3 */
diff --git a/keyboards/melgeek/mj63/rev2/rev2.c b/keyboards/melgeek/mj63/rev2/rev2.c
index 2d6768e2aa..5ab9cdb65a 100644
--- a/keyboards/melgeek/mj63/rev2/rev2.c
+++ b/keyboards/melgeek/mj63/rev2/rev2.c
@@ -19,7 +19,7 @@
#ifdef RGB_MATRIX_ENABLE
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3741_led_t PROGMEM g_is31fl3741_leds[RGB_MATRIX_LED_COUNT] = {
{0, CS9_SW1, CS8_SW1, CS7_SW1}, /* RGB1 */
{0, CS9_SW2, CS8_SW2, CS7_SW2}, /* RGB3 */
{0, CS9_SW3, CS8_SW3, CS7_SW3}, /* RGB4 */
diff --git a/keyboards/melgeek/mj64/config.h b/keyboards/melgeek/mj64/config.h
index af2393e5ec..e07d2078cd 100644
--- a/keyboards/melgeek/mj64/config.h
+++ b/keyboards/melgeek/mj64/config.h
@@ -70,5 +70,5 @@
// # define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
//#define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_SOLID_COLOR
#define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_CYCLE_ALL
-#define DRIVER_ADDR_1 0b0110000
-#define DRIVER_COUNT 1
+#define DRIVER_ADDR_1 IS31FL3741_I2C_ADDRESS_GND
+#define IS31FL3741_DRIVER_COUNT 1
diff --git a/keyboards/melgeek/mj64/rev1/rev1.c b/keyboards/melgeek/mj64/rev1/rev1.c
index 0369d6b0da..fff946b20a 100644
--- a/keyboards/melgeek/mj64/rev1/rev1.c
+++ b/keyboards/melgeek/mj64/rev1/rev1.c
@@ -18,7 +18,7 @@
#ifdef RGB_MATRIX_ENABLE
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3741_led_t PROGMEM g_is31fl3741_leds[RGB_MATRIX_LED_COUNT] = {
{0, CS9_SW1, CS8_SW1, CS7_SW1}, /* RGB1 */
{0, CS9_SW2, CS8_SW2, CS7_SW2}, /* RGB2 */
{0, CS9_SW3, CS8_SW3, CS7_SW3}, /* RGB3 */
diff --git a/keyboards/melgeek/mj64/rev2/rev2.c b/keyboards/melgeek/mj64/rev2/rev2.c
index bf3dc4cf86..35da35b2e4 100644
--- a/keyboards/melgeek/mj64/rev2/rev2.c
+++ b/keyboards/melgeek/mj64/rev2/rev2.c
@@ -18,7 +18,7 @@
#ifdef RGB_MATRIX_ENABLE
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3741_led_t PROGMEM g_is31fl3741_leds[RGB_MATRIX_LED_COUNT] = {
{0, CS9_SW1, CS8_SW1, CS7_SW1}, /* RGB1 */
{0, CS9_SW2, CS8_SW2, CS7_SW2}, /* RGB2 */
{0, CS9_SW3, CS8_SW3, CS7_SW3}, /* RGB3 */
diff --git a/keyboards/melgeek/mj64/rev3/rev3.c b/keyboards/melgeek/mj64/rev3/rev3.c
index 4b28bb8b44..942bda1487 100644
--- a/keyboards/melgeek/mj64/rev3/rev3.c
+++ b/keyboards/melgeek/mj64/rev3/rev3.c
@@ -18,7 +18,7 @@
#ifdef RGB_MATRIX_ENABLE
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3741_led_t PROGMEM g_is31fl3741_leds[RGB_MATRIX_LED_COUNT] = {
{0, CS9_SW1, CS8_SW1, CS7_SW1}, /* RGB1 */
{0, CS9_SW2, CS8_SW2, CS7_SW2}, /* RGB3 */
{0, CS9_SW3, CS8_SW3, CS7_SW3}, /* RGB4 */
diff --git a/keyboards/melgeek/mj65/config.h b/keyboards/melgeek/mj65/config.h
index af2393e5ec..e07d2078cd 100644
--- a/keyboards/melgeek/mj65/config.h
+++ b/keyboards/melgeek/mj65/config.h
@@ -70,5 +70,5 @@
// # define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
//#define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_SOLID_COLOR
#define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_CYCLE_ALL
-#define DRIVER_ADDR_1 0b0110000
-#define DRIVER_COUNT 1
+#define DRIVER_ADDR_1 IS31FL3741_I2C_ADDRESS_GND
+#define IS31FL3741_DRIVER_COUNT 1
diff --git a/keyboards/melgeek/mj65/rev3/rev3.c b/keyboards/melgeek/mj65/rev3/rev3.c
index f44c412659..6d851aa847 100644
--- a/keyboards/melgeek/mj65/rev3/rev3.c
+++ b/keyboards/melgeek/mj65/rev3/rev3.c
@@ -18,7 +18,7 @@
#ifdef RGB_MATRIX_ENABLE
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3741_led_t PROGMEM g_is31fl3741_leds[RGB_MATRIX_LED_COUNT] = {
{0, CS9_SW1, CS8_SW1, CS7_SW1}, /* RGB1 */
{0, CS9_SW2, CS8_SW2, CS7_SW2}, /* RGB2 */
{0, CS9_SW3, CS8_SW3, CS7_SW3}, /* RGB3 */
diff --git a/keyboards/melgeek/mojo68/config.h b/keyboards/melgeek/mojo68/config.h
index b5f846ae78..b7bcb36c2d 100755
--- a/keyboards/melgeek/mojo68/config.h
+++ b/keyboards/melgeek/mojo68/config.h
@@ -69,5 +69,5 @@
// # define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
//#define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_SOLID_COLOR
#define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_CYCLE_ALL
-#define DRIVER_ADDR_1 0b0110000
-#define DRIVER_COUNT 1
+#define DRIVER_ADDR_1 IS31FL3741_I2C_ADDRESS_GND
+#define IS31FL3741_DRIVER_COUNT 1
diff --git a/keyboards/melgeek/mojo68/rev1/rev1.c b/keyboards/melgeek/mojo68/rev1/rev1.c
index bea523c84e..bf4dad659b 100755
--- a/keyboards/melgeek/mojo68/rev1/rev1.c
+++ b/keyboards/melgeek/mojo68/rev1/rev1.c
@@ -18,7 +18,7 @@
#ifdef RGB_MATRIX_ENABLE
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3741_led_t PROGMEM g_is31fl3741_leds[RGB_MATRIX_LED_COUNT] = {
{0, CS9_SW1, CS8_SW1, CS7_SW1}, /* RGB1 */
{0, CS9_SW2, CS8_SW2, CS7_SW2}, /* RGB2 */
{0, CS9_SW3, CS8_SW3, CS7_SW3}, /* RGB3 */
@@ -112,7 +112,7 @@ led_config_t g_led_config = {
}
};
-const is31_led g_is31_indicator_leds[3] = {
+const is31fl3741_led_t g_is31_indicator_leds[3] = {
{0, CS6_SW1, CS5_SW1, CS4_SW1}, /* RGB124 */
{0, CS6_SW2, CS5_SW2, CS4_SW2}, /* RGB125 */
{0, CS6_SW3, CS5_SW3, CS4_SW3}, /* RGB126 */
@@ -143,7 +143,7 @@ bool led_update_kb(led_t led_state) {
void matrix_init_kb(void) {
for (int i = 0; i < DRIVER_INDICATOR_LED_TOTAL; ++i) {
- is31_led led = g_is31_indicator_leds[i];
+ is31fl3741_led_t led = g_is31_indicator_leds[i];
is31fl3741_set_scaling_registers(&led, 0xFF, 0xFF, 0xFF);
}
diff --git a/keyboards/melgeek/mojo75/config.h b/keyboards/melgeek/mojo75/config.h
index bdee36b66b..77d27fe2c3 100644
--- a/keyboards/melgeek/mojo75/config.h
+++ b/keyboards/melgeek/mojo75/config.h
@@ -71,5 +71,5 @@
//#define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_SOLID_COLOR
#define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_CYCLE_ALL
//#define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_SOLID_REACTIVE_SIMPLE
-#define DRIVER_ADDR_1 0b0110000
-#define DRIVER_COUNT 1
+#define DRIVER_ADDR_1 IS31FL3741_I2C_ADDRESS_GND
+#define IS31FL3741_DRIVER_COUNT 1
diff --git a/keyboards/melgeek/mojo75/rev1/rev1.c b/keyboards/melgeek/mojo75/rev1/rev1.c
index a313a25cfe..e64c163c78 100644
--- a/keyboards/melgeek/mojo75/rev1/rev1.c
+++ b/keyboards/melgeek/mojo75/rev1/rev1.c
@@ -18,7 +18,7 @@
#ifdef RGB_MATRIX_ENABLE
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3741_led_t PROGMEM g_is31fl3741_leds[RGB_MATRIX_LED_COUNT] = {
{0, CS6_SW1, CS5_SW1, CS4_SW1}, /* RGB1 */
{0, CS6_SW2, CS5_SW2, CS4_SW2}, /* RGB2 */
{0, CS6_SW3, CS5_SW3, CS4_SW3}, /* RGB3 */
diff --git a/keyboards/melgeek/tegic/config.h b/keyboards/melgeek/tegic/config.h
index e371af9552..5e4087dcc5 100755
--- a/keyboards/melgeek/tegic/config.h
+++ b/keyboards/melgeek/tegic/config.h
@@ -22,8 +22,8 @@
#define RGB_MATRIX_LED_FLUSH_LIMIT 26
//#define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_SOLID_COLOR
#define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_CYCLE_ALL
-#define DRIVER_ADDR_1 0b0110000
-#define DRIVER_COUNT 1
+#define DRIVER_ADDR_1 IS31FL3741_I2C_ADDRESS_GND
+#define IS31FL3741_DRIVER_COUNT 1
#define ENABLE_RGB_MATRIX_ALPHAS_MODS
#define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN
diff --git a/keyboards/melgeek/tegic/rev1/rev1.c b/keyboards/melgeek/tegic/rev1/rev1.c
index 24c7fd6cb7..6dc2e8d180 100755
--- a/keyboards/melgeek/tegic/rev1/rev1.c
+++ b/keyboards/melgeek/tegic/rev1/rev1.c
@@ -19,7 +19,7 @@
#ifdef RGB_MATRIX_ENABLE
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3741_led_t PROGMEM g_is31fl3741_leds[RGB_MATRIX_LED_COUNT] = {
{0, CS9_SW1, CS8_SW1, CS7_SW1}, /* RGB1 */
{0, CS9_SW2, CS8_SW2, CS7_SW2}, /* RGB2 */
{0, CS9_SW3, CS8_SW3, CS7_SW3}, /* RGB3 */
diff --git a/keyboards/melgeek/z70ultra/config.h b/keyboards/melgeek/z70ultra/config.h
index 3c19a6f93c..3ae466044c 100644
--- a/keyboards/melgeek/z70ultra/config.h
+++ b/keyboards/melgeek/z70ultra/config.h
@@ -70,7 +70,7 @@
// # define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
//#define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_SOLID_COLOR
#define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_CYCLE_ALL
-#define DRIVER_ADDR_1 0b0110000
-#define DRIVER_COUNT 1
+#define DRIVER_ADDR_1 IS31FL3741_I2C_ADDRESS_GND
+#define IS31FL3741_DRIVER_COUNT 1
#define RGB_MATRIX_LED_COUNT 69
#define DRIVER_INDICATOR_LED_TOTAL 6
diff --git a/keyboards/melgeek/z70ultra/z70ultra.c b/keyboards/melgeek/z70ultra/z70ultra.c
index d0b23c3bf8..4afe7376b9 100644
--- a/keyboards/melgeek/z70ultra/z70ultra.c
+++ b/keyboards/melgeek/z70ultra/z70ultra.c
@@ -18,7 +18,7 @@
#ifdef RGB_MATRIX_ENABLE
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3741_led_t PROGMEM g_is31fl3741_leds[RGB_MATRIX_LED_COUNT] = {
{0, CS28_SW1, CS30_SW1, CS29_SW1}, /* RGB10 */
{0, CS28_SW2, CS30_SW2, CS29_SW2}, /* RGB11 */
{0, CS28_SW3, CS30_SW3, CS29_SW3}, /* RGB12 */
@@ -117,7 +117,7 @@ led_config_t g_led_config = {
}
};
-const is31_led g_is31_indicator_leds[6] = {
+const is31fl3741_led_t g_is31_indicator_leds[6] = {
{0, CS5_SW1, CS3_SW1, CS4_SW1}, /* RGB71 */
{0, CS5_SW2, CS3_SW2, CS4_SW2}, /* RGB72 */
{0, CS5_SW3, CS3_SW3, CS4_SW3}, /* RGB73 */
@@ -157,7 +157,7 @@ bool led_update_kb(led_t led_state) {
void matrix_init_kb(void) {
for (int i = 0; i < DRIVER_INDICATOR_LED_TOTAL; ++i) {
- is31_led led = g_is31_indicator_leds[i];
+ is31fl3741_led_t led = g_is31_indicator_leds[i];
is31fl3741_set_scaling_registers(&led, 0xFF, 0xFF, 0xFF);
}
diff --git a/keyboards/miller/gm862/config.h b/keyboards/miller/gm862/config.h
index 4bd9748ab5..7378c18290 100644
--- a/keyboards/miller/gm862/config.h
+++ b/keyboards/miller/gm862/config.h
@@ -53,7 +53,7 @@
// # define ENABLE_RGB_MATRIX_SOLID_SPLASH
// # define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
-# define DRIVER_ADDR_1 0b1010000
-# define DRIVER_COUNT 1
+# define DRIVER_ADDR_1 IS31FL3733_I2C_ADDRESS_GND_GND
+# define IS31FL3733_DRIVER_COUNT 1
# define RGB_MATRIX_LED_COUNT 62
#endif
diff --git a/keyboards/miller/gm862/gm862.c b/keyboards/miller/gm862/gm862.c
index 73d1323cfb..b677ae3be4 100644
--- a/keyboards/miller/gm862/gm862.c
+++ b/keyboards/miller/gm862/gm862.c
@@ -1,7 +1,7 @@
#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3733_led_t PROGMEM g_is31fl3733_leds[RGB_MATRIX_LED_COUNT] = {
{0, B_1, A_1, C_1},
{0, B_2, A_2, C_2},
{0, B_3, A_3, C_3},
diff --git a/keyboards/mitosis/rules.mk b/keyboards/mitosis/rules.mk
index 6b1876f87c..539a2d1004 100644
--- a/keyboards/mitosis/rules.mk
+++ b/keyboards/mitosis/rules.mk
@@ -15,4 +15,4 @@ CUSTOM_MATRIX = lite
# project specific files
SRC += matrix.c
-QUANTUM_LIB_SRC += uart.c
+UART_DRIVER_REQUIRED = yes
diff --git a/keyboards/mlego/m65/config.h b/keyboards/mlego/m65/config.h
deleted file mode 100644
index bdb0c16621..0000000000
--- a/keyboards/mlego/m65/config.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
-Copyright 2021-2022 Alin M Elena <alinm.elena@gmail.com>
-
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#pragma once
-
-#define LOCKING_SUPPORT_ENABLE
-#define LOCKING_RESYNC_ENABLE
diff --git a/keyboards/mlego/m65/info.json b/keyboards/mlego/m65/info.json
deleted file mode 100644
index c032cda3fe..0000000000
--- a/keyboards/mlego/m65/info.json
+++ /dev/null
@@ -1,84 +0,0 @@
-{
- "keyboard_name": "m65",
- "manufacturer": "Alin Elena",
- "url": "https://gitlab.com/m-lego/m65",
- "maintainer": "alin elena",
- "usb": {
- "vid": "0xBABA"
- },
- "layouts": {
- "LAYOUT_ortho_5x13": {
- "layout": [
- {"matrix": [0, 0], "x": 0, "y": 0},
- {"matrix": [0, 1], "x": 1, "y": 0},
- {"matrix": [0, 2], "x": 2, "y": 0},
- {"matrix": [0, 3], "x": 3, "y": 0},
- {"matrix": [0, 4], "x": 4, "y": 0},
- {"matrix": [0, 5], "x": 5, "y": 0},
- {"matrix": [0, 6], "x": 6, "y": 0},
- {"matrix": [0, 7], "x": 7, "y": 0},
- {"matrix": [0, 8], "x": 8, "y": 0},
- {"matrix": [0, 9], "x": 9, "y": 0},
- {"matrix": [0, 10], "x": 10, "y": 0},
- {"matrix": [0, 11], "x": 11, "y": 0},
- {"matrix": [0, 12], "x": 12, "y": 0},
-
- {"matrix": [1, 0], "x": 0, "y": 1},
- {"matrix": [1, 1], "x": 1, "y": 1},
- {"matrix": [1, 2], "x": 2, "y": 1},
- {"matrix": [1, 3], "x": 3, "y": 1},
- {"matrix": [1, 4], "x": 4, "y": 1},
- {"matrix": [1, 5], "x": 5, "y": 1},
- {"matrix": [1, 6], "x": 6, "y": 1},
- {"matrix": [1, 7], "x": 7, "y": 1},
- {"matrix": [1, 8], "x": 8, "y": 1},
- {"matrix": [1, 9], "x": 9, "y": 1},
- {"matrix": [1, 10], "x": 10, "y": 1},
- {"matrix": [1, 11], "x": 11, "y": 1},
- {"matrix": [1, 12], "x": 12, "y": 1},
-
- {"matrix": [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": [2, 6], "x": 6, "y": 2},
- {"matrix": [2, 7], "x": 7, "y": 2},
- {"matrix": [2, 8], "x": 8, "y": 2},
- {"matrix": [2, 9], "x": 9, "y": 2},
- {"matrix": [2, 10], "x": 10, "y": 2},
- {"matrix": [2, 11], "x": 11, "y": 2},
- {"matrix": [2, 12], "x": 12, "y": 2},
-
- {"matrix": [3, 0], "x": 0, "y": 3},
- {"matrix": [3, 1], "x": 1, "y": 3},
- {"matrix": [3, 2], "x": 2, "y": 3},
- {"matrix": [3, 3], "x": 3, "y": 3},
- {"matrix": [3, 4], "x": 4, "y": 3},
- {"matrix": [3, 5], "x": 5, "y": 3},
- {"matrix": [3, 6], "x": 6, "y": 3},
- {"matrix": [3, 7], "x": 7, "y": 3},
- {"matrix": [3, 8], "x": 8, "y": 3},
- {"matrix": [3, 9], "x": 9, "y": 3},
- {"matrix": [3, 10], "x": 10, "y": 3},
- {"matrix": [3, 11], "x": 11, "y": 3},
- {"matrix": [3, 12], "x": 12, "y": 3},
-
- {"matrix": [4, 0], "x": 0, "y": 4},
- {"matrix": [4, 1], "x": 1, "y": 4},
- {"matrix": [4, 2], "x": 2, "y": 4},
- {"matrix": [4, 3], "x": 3, "y": 4},
- {"matrix": [4, 4], "x": 4, "y": 4},
- {"matrix": [4, 5], "x": 5, "y": 4},
- {"matrix": [4, 6], "x": 6, "y": 4},
- {"matrix": [4, 7], "x": 7, "y": 4},
- {"matrix": [4, 8], "x": 8, "y": 4},
- {"matrix": [4, 9], "x": 9, "y": 4},
- {"matrix": [4, 10], "x": 10, "y": 4},
- {"matrix": [4, 11], "x": 11, "y": 4},
- {"matrix": [4, 12], "x": 12, "y": 4}
- ]
- }
- }
-}
diff --git a/keyboards/mlego/m65/keymaps/default/config.h b/keyboards/mlego/m65/keymaps/default/config.h
index 637c0a8faf..dba9c658ae 100644
--- a/keyboards/mlego/m65/keymaps/default/config.h
+++ b/keyboards/mlego/m65/keymaps/default/config.h
@@ -1,19 +1,5 @@
-/*
-Copyright 2021-2022 Alin M Elena <alinm.elena@gmail.com>
-
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
+// Copyright 2020-2023 alin m elena (@alinelena)
+// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
diff --git a/keyboards/mlego/m65/keymaps/default/keymap.c b/keyboards/mlego/m65/keymaps/default/keymap.c
index 00e144e221..d7421f659c 100644
--- a/keyboards/mlego/m65/keymaps/default/keymap.c
+++ b/keyboards/mlego/m65/keymaps/default/keymap.c
@@ -1,19 +1,5 @@
-/*
-Copyright 2021-2022 Alin M Elena <alinm.elena@gmail.com>
-
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
+// Copyright 2020-2023 alin m elena (@alinelena)
+// SPDX-License-Identifier: GPL-2.0-or-later
#include QMK_KEYBOARD_H
@@ -51,69 +37,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
// clang-format on
-bool led_update_user(led_t led_state) {
- // Disable the default LED update code, so that lock LEDs could be reused to show layer status.
- return false;
-}
-
-void matrix_scan_user(void) {
-
- toggle_leds();
-
-}
-
-bool process_record_user(uint16_t keycode, keyrecord_t* record) {
- switch (keycode) {
- case (TT(_LWR)):
- if (!record->event.pressed && record->tap.count == TAPPING_TOGGLE) {
- // This runs before the TT() handler toggles the layer state, so the current layer state is the opposite of the final one after toggle.
- set_led_toggle(_LWR, !layer_state_is(_LWR));
- }
- return true;
- break;
- case (TT(_RSE)):
- if (record->event.pressed && record->tap.count == TAPPING_TOGGLE) {
- set_led_toggle(_RSE, !layer_state_is(_RSE));
- }
- return true;
- break;
- default:
- return true;
- }
-}
-
-layer_state_t layer_state_set_user(layer_state_t state) {
-
-#ifdef RGBLIGHT_ENABLE
-
- set_rgb_layers(state);
-
+#if defined(ENCODER_MAP_ENABLE)
+const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
+ [_QW] = {ENCODER_CCW_CW(KC_VOLD, KC_VOLU)},
+#if defined(RGBLIGHT_ENABLE)
+ [_LWR] = {ENCODER_CCW_CW(RGB_HUD, RGB_HUI)},
+ [_RSE] = {ENCODER_CCW_CW(RGB_VAD, RGB_VAI)},
+ [_ADJ] = {ENCODER_CCW_CW(RGB_RMOD, RGB_MOD)},
+# else
+ [_LWR] = {ENCODER_CCW_CW(KC_MNXT, KC_MPRV)},
+ [_RSE] = {ENCODER_CCW_CW(KC_MFFD, KC_MRWD)},
+ [_ADJ] = {ENCODER_CCW_CW(KC_PGDN, KC_PGUP)},
#endif
-
- return update_tri_layer_state(state, _LWR, _RSE, _ADJ);
-}
-
-#ifdef RGBLIGHT_ENABLE
-
-layer_state_t default_layer_state_set_user(layer_state_t state) {
- set_default_rgb_layers(state);
- return state;
-}
-
-#endif
-
-void keyboard_post_init_user(void) {
-
-#ifdef RGBLIGHT_ENABLE
-
- // Enable the LED layers
- rgblight_layers = my_rgb();
-
-#endif
-
-#ifdef OLED_ENABLE
-
- init_timer();
-
+};
#endif
-}
diff --git a/keyboards/mlego/m65/keymaps/default/rules.mk b/keyboards/mlego/m65/keymaps/default/rules.mk
new file mode 100644
index 0000000000..ee32568148
--- /dev/null
+++ b/keyboards/mlego/m65/keymaps/default/rules.mk
@@ -0,0 +1 @@
+ENCODER_MAP_ENABLE = yes
diff --git a/keyboards/mlego/m65/keymaps/dk/config.h b/keyboards/mlego/m65/keymaps/dk/config.h
deleted file mode 100644
index 637c0a8faf..0000000000
--- a/keyboards/mlego/m65/keymaps/dk/config.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
-Copyright 2021-2022 Alin M Elena <alinm.elena@gmail.com>
-
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#pragma once
-
-#define TAPPING_TOGGLE 2
diff --git a/keyboards/mlego/m65/keymaps/dk/keymap.c b/keyboards/mlego/m65/keymaps/dk/keymap.c
deleted file mode 100644
index 2bf20bf2f6..0000000000
--- a/keyboards/mlego/m65/keymaps/dk/keymap.c
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
-Copyright 2021-2022 Alin M Elena <alinm.elena@gmail.com>
-
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include QMK_KEYBOARD_H
-#include "keymap_danish.h"
-
-// clang-format off
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-
- [_QW] = LAYOUT_ortho_5x13(
- KC_ESC, DK_1 , DK_2 , DK_3 , DK_4 , DK_5 , DK_6 , DK_7 , DK_8 , DK_9 , DK_0 , DK_PLUS, KC_BSPC ,
- KC_TAB, DK_Q , DK_W , DK_E , DK_R , DK_T , DK_Y , DK_U , DK_I , DK_O , DK_P , DK_ARNG, DK_DIAE ,
- DK_QUOT, DK_A , DK_S , DK_D , DK_F , DK_G , DK_H , DK_J , DK_K , DK_L , DK_AE , DK_OSTR, KC_ENT ,
- SC_LSPO, DK_LABK, DK_Z , DK_X , DK_C , DK_V , DK_B , DK_N , DK_M , DK_COMM, DK_DOT , KC_UP , DK_MINS ,
- KC_LCTL, KC_LGUI, TT(_LWR), KC_LALT, TT(_RSE), KC_SPC, KC_SPC, KC_SPC, KC_RALT, SC_RSPC, KC_LEFT, KC_DOWN, KC_RGHT),
-
- [_LWR] = LAYOUT_ortho_5x13(
- DK_HALF, KC_MUTE, KC_VOLU, KC_VOLD, KC_MPRV, KC_MPLY, KC_MNXT, G(KC_P), KC_SLEP, KC_WAKE, KC_PSCR, KC_DEL , DK_ACUT ,
- KC_BTN3, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ,
- KC_BTN2, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ,
- _______, KC_BTN1, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MS_U, _______ ,
- _______, KC_BTN4, _______, _______, _______, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R),
-
- [_RSE] = LAYOUT_ortho_5x13(
- KC_ESC , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 ,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ,
- KC_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_WH_U, _______ ,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_WH_L, KC_WH_D, KC_WH_R),
-
- [_ADJ] = LAYOUT_ortho_5x13(
- RGB_MOD,RGB_RMOD, A(KC_F2), _______, _______, _______, _______, _______, _______, _______, _______, RGB_M_T, RGB_M_SW ,
- RGB_HUI, RGB_HUD, RGB_M_P , _______, QK_BOOT, _______, _______, _______, _______, _______, _______, _______, RGB_M_SN ,
- RGB_SAI, RGB_SAD, RGB_M_B , _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_M_K ,
- RGB_VAI, RGB_VAD, RGB_M_R , _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_M_X ,
- RGB_TOG, _______, _______ , _______, _______, _______, _______, _______, _______, _______, _______, RGB_M_TW, RGB_M_G),
-
-};
-// clang-format on
-
-bool led_update_user(led_t led_state) {
- // Disable the default LED update code, so that lock LEDs could be reused to show layer status.
- return false;
-}
-
-void matrix_scan_user(void) {
-
- toggle_leds();
-
-}
-
-bool process_record_user(uint16_t keycode, keyrecord_t* record) {
- switch (keycode) {
- case (TT(_LWR)):
- if (!record->event.pressed && record->tap.count == TAPPING_TOGGLE) {
- // This runs before the TT() handler toggles the layer state, so the current layer state is the opposite of the final one after toggle.
- set_led_toggle(_LWR, !layer_state_is(_LWR));
- }
- return true;
- break;
- case (TT(_RSE)):
- if (record->event.pressed && record->tap.count == TAPPING_TOGGLE) {
- set_led_toggle(_RSE, !layer_state_is(_RSE));
- }
- return true;
- break;
- default:
- return true;
- }
-}
-
-layer_state_t layer_state_set_user(layer_state_t state) {
-
-#ifdef RGBLIGHT_ENABLE
-
- set_rgb_layers(state);
-
-#endif
-
- return update_tri_layer_state(state, _LWR, _RSE, _ADJ);
-}
-
-#ifdef RGBLIGHT_ENABLE
-
-layer_state_t default_layer_state_set_user(layer_state_t state) {
- set_default_rgb_layers(state);
- return state;
-}
-
-#endif
-
-void keyboard_post_init_user(void) {
-
-#ifdef RGBLIGHT_ENABLE
-
- // Enable the LED layers
- rgblight_layers = my_rgb();
-
-#endif
-
-#ifdef OLED_ENABLE
-
- init_timer();
-
-#endif
-
-}
diff --git a/keyboards/mlego/m65/keymaps/dk/readme.md b/keyboards/mlego/m65/keymaps/dk/readme.md
deleted file mode 100644
index 76ecd8c139..0000000000
--- a/keyboards/mlego/m65/keymaps/dk/readme.md
+++ /dev/null
@@ -1,13 +0,0 @@
-![M65 Layout Image](https://i.imgur.com/RQqsM4gh.png)
-
-# Default M65 Layout
-
-This is the Danish keymap for M65. For the most part it's a straightforward and easy to follow layout inspired by ISO with a DK
-turn. The only unusual key is the key in the upper left, which sends Escape normally, but Grave when in layer 1 aka LWR. Similarly
-number row in layer 1 give the usual audio KC_GRV, KC_AUDIO_MUTE, KC_AUDIO_VOL_UP, KC_AUDIO_VOL_DOWN, KC_MEDIA_PREV_TRACK,
-KC_MEDIA_PLAY_PAUSE, KC_MEDIA_NEXT_TRACK, M_EXTDISP, KC_SYSTEM_SLEEP, KC_SYSTEM_WAKE, KC_PRINT_SCREEN, KC_DEL, DK_ACUT in layer 2 aka
-RSE one gets F1-F12 mouse emulation can be used in layer 1 and 2.
-
-flashing is done by LWR+RSE+r
-
-full layout below see in keymap.c
diff --git a/keyboards/mlego/m65/keymaps/uk/config.h b/keyboards/mlego/m65/keymaps/uk/config.h
index b0c6cfd639..c1f9816c99 100644
--- a/keyboards/mlego/m65/keymaps/uk/config.h
+++ b/keyboards/mlego/m65/keymaps/uk/config.h
@@ -1,29 +1,14 @@
-/*
-Copyright 2021-2022 Alin M Elena <alinm.elena@gmail.com>
-
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
+// Copyright 2020-2023 alin m elena (@alinelena)
+// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#define TAPPING_TOGGLE 2
-#define UNICODE_SELECTED_MODES UNICODE_MODE_LINUX
-//#define UNICODE_SELECTED_MODES UNICODE_MODE_LINUX, UNICODE_MODE_MACOS, UNICODE_MODE_WINCOMPOSE
+#define UNICODE_SELECTED_MODES UNICODE_MODE_LINUX, UNICODE_MODE_MACOS, UNICODE_MODE_WINDOWS, UNICODE_MODE_WINCOMPOSE
#ifdef WPM_ENABLE
-#define WPM_SAMPLE_SECONDS 10
-#define WPM_SAMPLE_PERIODS 100
-#define WPM_ALLOW_COUNT_REGRESSION
+# define WPM_SAMPLE_SECONDS 10
+# define WPM_SAMPLE_PERIODS 100
+# define WPM_ALLOW_COUNT_REGRESSION
#endif
diff --git a/keyboards/mlego/m65/keymaps/uk/keymap.c b/keyboards/mlego/m65/keymaps/uk/keymap.c
index ee48872433..e021756cdd 100644
--- a/keyboards/mlego/m65/keymaps/uk/keymap.c
+++ b/keyboards/mlego/m65/keymaps/uk/keymap.c
@@ -1,106 +1,101 @@
-/*
-Copyright 2021-2022 Alin M Elena <alinm.elena@gmail.com>
-
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
+// Copyright 2020-2023 alin m elena (@alinelena)
+// SPDX-License-Identifier: GPL-2.0-or-later
#include QMK_KEYBOARD_H
#include "keymap_uk.h"
-#ifdef CONSOLE_ENABLE
-
-#include "print.h"
-
-#endif
-
const uint32_t unicode_map[] PROGMEM = {
- [la] = 0x03B1 , // α
- [lA] = 0x0391 , // Α
- [lb] = 0x03B2 , // β
- [lB] = 0x0392 , // Β
- [lc] = 0x03C7 , // χ
- [lC] = 0x0307 , //
- [ld] = 0x03B4 , // δ
- [lD] = 0x2202 , // ∂
- [le] = 0x03B5 , // ε
- [lE] = 0x2107 , // ℇ
- [lf] = 0x03C6 , // φ
- [lF] = 0x03C8 , // ψ
- [lg] = 0x03B3 , // γ
- [lG] = 0x0393 , // Γ
- [lh] = 0x210F , // ℏ
- [lH] = 0x1D4D7, // 𝓗
- [li] = 0x222B , // ∫
- [lI] = 0x222E , // ∮
- [lj] = 0x2208 , // ∈
- [lJ] = 0x2209 , // ∉
- [lk] = 0x03F0 , // ϰ
- [lK] = 0x2206 , // ∆
- [ll] = 0x03BB , // λ
- [lL] = 0x039B , // Λ
- [lm] = 0x03BC , // μ
- [lM] = 0x2218 , // ∘
- [ln] = 0x03B7 , // η
- [lN] = 0x222A , // ∪
- [lo] = 0x221E , // ∞
- [lO] = 0x2297 , // ⊗
- [lp] = 0x03C0 , // π
- [lP] = 0x220F , // ∏
- [lq] = 0x03C3 , // σ
- [lQ] = 0x03D5 , // ϕ
- [lr] = 0x03C1 , // ρ
- [lR] = 0x2207 , // ∇
- [ls] = 0x2211 , // ∑
- [lS] = 0x2A0B , // ⨋
- [lt] = 0x03D1 , // ϑ
- [lT] = 0x03B8 , // θ
- [lu] = 0x03C4 , // τ
- [lU] = 0x2102 , // ℂ
- [lv] = 0x03BD , // χ
- [lV] = 0x039D , // Ν
- [lw] = 0x03C9 , // ω
- [lW] = 0x03A9 , // Ω
- [lx] = 0x03BE , // ξ
- [lX] = 0x039E , // Ξ
- [ly] = 0x211d , // ℝ
- [lY] = 0x2124 , // ℤ
- [lz] = 0x03B6 , // ζ
- [lZ] = 0x2221 , // ∡
- [lc1] = 0x224A , // ≊
- [lC1] = 0x2248 , // ≈
- [lp1] = 0x00B1 , // ±
- [lP1] = 0x2213 , // ∓
- [lq1] = 0x00D7 , // ×
- [lQ1] = 0x22C5 , // ⋅
- [ll1] = 0x1D53C, // 𝔼
- [lL1] = 0x212b , // Å
- [lk1] = 0x221D , // ∝
- [lK1] = 0x2112 , // ℒ
- [ra] = 0x0103 , // ă
- [rA] = 0x0102 , // Ă
- [ra1] = 0x00E2 , // â
- [rA1] = 0x00C2 , // Â
- [rc] = 0x00E7 , // ç
- [rC] = 0x00C7 , // Ç
- [ri] = 0x00EE , // î
- [rI] = 0x00CE , // Î
- [rs] = 0x0219 , // ș
- [rS] = 0x0218 , // Ș
- [rt] = 0x021B , // ț
- [rT] = 0x021A , // Ț
+ [la] = 0x03B1, // α
+ [lA] = 0x0307, //
+ [lb] = 0x03B2, // β
+ [lB] = 0x2229, // ∩
+ [lc] = 0x03C7, // χ
+ [lC] = 0x2282, // ⊂
+ [ld] = 0x03B4, // δ
+ [lD] = 0x2202, // ∂
+ [le] = 0x03B5, // ε
+ [lE] = 0x2107, // ℇ
+ [lf] = 0x03C6, // φ
+ [lF] = 0x03C8, // ψ
+ [lg] = 0x03B3, // γ
+ [lG] = 0x0393, // Γ
+ [lh] = 0x210F, // ℏ
+ [lH] = 0x1D4D7, // 𝓗
+ [li] = 0x222B, // ∫
+ [lI] = 0x222E, // ∮
+ [lj] = 0x2208, // ∈
+ [lJ] = 0x2209, // ∉
+ [lk] = 0x03F0, // ϰ
+ [lK] = 0x2206, // ∆
+ [ll] = 0x03BB, // λ
+ [lL] = 0x039B, // Λ
+ [lm] = 0x03BC, // μ
+ [lM] = 0x2218, // ∘
+ [ln] = 0x03B7, // η
+ [lN] = 0x222A, // ∪
+ [lo] = 0x221E, // ∞
+ [lO] = 0x2297, // ⊗
+ [lp] = 0x03C0, // π
+ [lP] = 0x220F, // ∏
+ [lq] = 0x03C3, // σ
+ [lQ] = 0x03D5, // ϕ
+ [lr] = 0x03C1, // ρ
+ [lR] = 0x2207, // ∇
+ [ls] = 0x2211, // ∑
+ [lS] = 0x2A0B, // ⨋
+ [lt] = 0x03D1, // ϑ
+ [lT] = 0x03B8, // θ
+ [lu] = 0x03C4, // τ
+ [lU] = 0x2102, // ℂ
+ [lv] = 0x03BD, // χ
+ [lV] = 0x2283, // ⊃
+ [lw] = 0x03C9, // ω
+ [lW] = 0x03A9, // Ω
+ [lx] = 0x03BE, // ξ
+ [lX] = 0x039E, // Ξ
+ [ly] = 0x211d, // ℝ
+ [lY] = 0x2124, // ℤ
+ [lz] = 0x03B6, // ζ
+ [lZ] = 0x2221, // ∡
+ [lc1] = 0x2248, // ≈
+ [lC1] = 0x2249, // ≉
+ [lp1] = 0x00B1, // ±
+ [lP1] = 0x2213, // ∓
+ [lq1] = 0x00D7, // ×
+ [lQ1] = 0x22C5, // ⋅
+ [ll1] = 0x1D53C, // 𝔼
+ [lL1] = 0x212b, // Å
+ [lk1] = 0x221D, // ∝
+ [lK1] = 0x2112, // ℒ
+ [lbo1] = 0x22DC, // ⋜
+ [lbo2] = 0x2260, // ≠
+ [lbc1] = 0x22DD, // ⋝
+ [lbc2] = 0x2245, // ≅
+ [ls1] = 0x2261, // ≡
+ [ls2] = 0x2262, // ≢
+ [ra] = 0x0103, // ă
+ [rA] = 0x0102, // Ă
+ [ra1] = 0x00E2, // â
+ [rA1] = 0x00C2, // Â
+ [rx] = 0x00E7, // ç
+ [rX] = 0x00C7, // Ç
+ [ri] = 0x00EE, // î
+ [rI] = 0x00CE, // Î
+ [rs] = 0x0219, // ș⊄
+ [rS] = 0x0218, // Ș
+ [rt] = 0x021B, // ț
+ [rT] = 0x021A, // Ț
+ [rc] = 0x2284, // ⊄
+ [rC] = 0x2286, // ⊆
+ [rv] = 0x2285, // ⊅
+ [rV] = 0x2287, // ⊇
+ [rb] = 0x2227, // ∧
+ [rB] = 0x22BC, // ⊼
+ [rn] = 0x2228, // ∨
+ [rN] = 0x22BB, // ⊻
};
+
// clang-format off
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/*
@@ -161,29 +156,29 @@ altgr shift symbols
KC_LCTL, KC_LGUI, TT(_LWR), KC_LALT, TT(_RSE), KC_SPC, KC_SPC, KC_SPC, KC_RALT, SC_RSPC, KC_LEFT, KC_DOWN, KC_RGHT),
/*
-lower layer
+raise layer
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
* │ ` │MUT│Vup│Vdn│prv│ply│nxt│EXT│SLP│WAK│PSC│ ⌫ │ = │
* ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤
- * │ │ σ │ ω │ ε │ ρ │ ϑ │ ℝ │ τ │ ∫ │ ∞ │ π │ [ │ ] │
+ * │ │ σ │ ω │ ε │ ρ │ ϑ │ ℝ │ τ │ ∫ │ ∞ │ π │ ⋜ │ ⋝ │
* ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤
* │ │ α │ ∑ │ δ │ φ │ γ │ ℏ │ ∈ │ ϰ │ λ │ 𝔼 │ ∝ │ ⏎ │
* ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤
- * │ ⇧(│ │ ζ │ ξ │ χ │ ν │ β │ η │ μ │ ≊ │ ± │ │ × │
+ * │ ⇧(│ ≡ │ ζ │ ξ │ χ │ ν │ β │ η │ μ │ ≈ │ ± │ │ × │
* ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤
- * │ ⎈ │ │lwr│⎇ │rse│ │ │ │⎇ │ ⇧)│ │ │ │
+ * │ │ │lwr│⎇ │rse│ │ │ │⎇ │ ⇧)│ │ │ │
* └───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┘
-lower layer shifted
+raise layer shifted
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
- * │ ¬ │ │ │ │ │ │ │ │ │ │ │ ⌫ │ = │
+ * │ ¬ │ │ │ │ │ │ │ │ │ │ │ ⌫ │ + │
* ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤
- * │MB3│ ϕ │ Ω │ ℇ │ ∇ │ θ │ ℤ │ ℂ │ ∮ │ ⊗ │ ∏ │ { │ } │
+ * │MB3│ ϕ │ Ω │ ℇ │ ∇ │ θ │ ℤ │ ℂ │ ∮ │ ⊗ │ ∏ │ ≠ │ ≅ │
* ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤
- * │MB2│ Α │ ⨋ │ ∂ │ ψ │ Γ │ 𝓗 │ ∉ │ ∆ │ Λ │ Å │ ℒ │ ⏎ │
+ * │MB2│ ̇ │ ⨋ │ ∂ │ ψ │ Γ │ 𝓗 │ ∉ │ ∆ │ Λ │ Å │ ℒ │ ⏎ │
* ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤
- * │ ⇧(│MB1│ ∡ │ Ξ │ ̇ │ Ν │ Β │ ∪ │ ∘ │ ≈ │ ∓ │MSU│ ⋅ │
+ * │ ⇧(│ ≢ │ ∡ │ Ξ │ ⊂ │ ⊃ │ ∩ │ ∪ │ ∘ │ ≉ │ ∓ │MSU│ ⋅ │
* ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤
- * │ ⎈ │MB4│lwr│⎇ │rse│ │ │ │⎇ │ ⇧)│MSL│MSD│MSR│
+ * │MB1│MB4│lwr│⎇ │rse│ │ │ │⎇ │ ⇧)│MSL│MSD│MSR│
* └───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┘
MB - mouse buttons
MS - mouse directions
@@ -196,7 +191,7 @@ MS - mouse directions
_______, KC_BTN4, _______, _______, _______, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R),
/*
-raise layer
+lower layer
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
* │ ⎋ │ F1│ F2│ F3│ F4│ F5│ F6│ F7│ F8│ F9│F10│F11│F12│
* ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤
@@ -204,7 +199,7 @@ raise layer
* ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤
* │ ⇪ │ ă │ ș │ │ │ │ │ │ │ │ │ │ │
* ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤
- * │ │ │ │ │ ç │ │ │ │ │ │ │MWU│ │
+ * │ │ │ │ ç │ ⊄ │ ⊅ │ ∧ │ ∨ │ │ │ │MWU│ │
* ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤
* │ │ │ │ │ │ │ │ │ │ │MWL│MWD│MWR│
* └───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┘
@@ -217,7 +212,7 @@ raise layer shifted
* ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤
* │ │ Ă │ Ș │ │ │ │ │ │ │ │ │ │ │
* ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤
- * │ │ │ │ │ Ç │ │ │ │ │ │ │ │ │
+ * │ │ │ │ Ç │ ⊆ │ ⊇ │ ⊼ │ ⊻ │ │ │ │ │ │
* ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤
* │ │ │ │ │ │ │ │ │ │ │ │ │ │
* └───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┘
@@ -245,90 +240,23 @@ adj layer
[_ADJ] = LAYOUT_ortho_5x13(
RGB_MOD, RGB_RMOD, A(KC_F2), _______, _______, _______, _______, _______, _______, _______, _______, RGB_M_T , RGB_M_SW,
RGB_HUI, RGB_HUD , RGB_M_P , _______, QK_BOOT, _______, _______, _______, _______, _______, _______, _______ , RGB_M_SN,
- RGB_SAI, RGB_SAD , RGB_M_B , _______, _______, _______, _______, _______, _______, _______, _______, _______ , RGB_M_K ,
- RGB_VAI, RGB_VAD , RGB_M_R , _______, _______, _______, _______, _______, _______, _______, _______, _______ , RGB_M_X ,
+ RGB_SAI, RGB_SAD , RGB_M_B , _______, UC_NEXT, _______, _______, _______, _______, _______, _______, _______ , RGB_M_K ,
+ RGB_VAI, RGB_VAD , RGB_M_R , _______, UC_PREV, UC_LINX, UC_WIN, UC_WINC, UC_MAC, UC_EMAC, _______, _______ , RGB_M_X ,
RGB_TOG, _______ , _______ , _______, _______, _______, _______, _______, _______, _______, _______, RGB_M_TW, RGB_M_G),
};
// clang-format on
-bool led_update_user(led_t led_state) {
- // Disable the default LED update code, so that lock LEDs could be reused to show layer status.
- return false;
-}
-
-void matrix_scan_user(void) {
-
- toggle_leds();
-
-}
-
-bool process_record_user(uint16_t keycode, keyrecord_t* record) {
-
-#ifdef CONSOLE_ENABLE
-
- uprintf("KL: kc: 0x%04X, col: %u, row: %u, pressed: %b, time: %u, interrupt: %b, count: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed, record->event.time, record->tap.interrupted, record->tap.count);
-
-#endif
-
- switch (keycode) {
- case (TT(_LWR)):
- if (!record->event.pressed && record->tap.count == TAPPING_TOGGLE) {
- // This runs before the TT() handler toggles the layer state, so the current layer state is the opposite of the final one after toggle.
- set_led_toggle(_LWR, !layer_state_is(_LWR));
- }
- return true;
- break;
- case (TT(_RSE)):
- if (record->event.pressed && record->tap.count == TAPPING_TOGGLE) {
- set_led_toggle(_RSE, !layer_state_is(_RSE));
- }
- return true;
- break;
- default:
- return true;
- }
-}
-
-layer_state_t layer_state_set_user(layer_state_t state) {
-
-#ifdef RGBLIGHT_ENABLE
-
- set_rgb_layers(state);
-
-#endif
-
- return update_tri_layer_state(state, _LWR, _RSE, _ADJ);
-}
-
-#ifdef RGBLIGHT_ENABLE
-
-layer_state_t default_layer_state_set_user(layer_state_t state) {
-
- set_default_rgb_layers(state);
- return state;
-}
-
+#if defined(ENCODER_MAP_ENABLE)
+const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
+ [_QW] = {ENCODER_CCW_CW(KC_VOLD, KC_VOLU)},
+#if defined(RGBLIGHT_ENABLE)
+ [_LWR] = {ENCODER_CCW_CW(RGB_HUD, RGB_HUI)},
+ [_RSE] = {ENCODER_CCW_CW(RGB_VAD, RGB_VAI)},
+ [_ADJ] = {ENCODER_CCW_CW(RGB_RMOD, RGB_MOD)},
+#else
+ [_LWR] = {ENCODER_CCW_CW(KC_MNXT, KC_MPRV)},
+ [_RSE] = {ENCODER_CCW_CW(KC_MFFD, KC_MRWD)},
+ [_ADJ] = {ENCODER_CCW_CW(KC_PGDN, KC_PGUP)},
#endif
-
-void keyboard_post_init_user(void) {
-#ifdef RGBLIGHT_ENABLE
-
- // Enable the LED layers
- rgblight_layers = my_rgb();
-
-#endif
-
-#ifdef OLED_ENABLE
-
- init_timer();
-
-#endif
-
-#ifdef CONSOLE_ENABLE
-
- debug_enable = true;
- debug_matrix = true;
- debug_keyboard = true;
-
+};
#endif
-}
diff --git a/keyboards/mlego/m65/keymaps/uk/rules.mk b/keyboards/mlego/m65/keymaps/uk/rules.mk
index 502b2def76..846f3443f6 100644
--- a/keyboards/mlego/m65/keymaps/uk/rules.mk
+++ b/keyboards/mlego/m65/keymaps/uk/rules.mk
@@ -1 +1,2 @@
UNICODEMAP_ENABLE = yes
+ENCODER_MAP_ENABLE = yes
diff --git a/keyboards/mlego/m65/keymaps/via/config.h b/keyboards/mlego/m65/keymaps/via/config.h
deleted file mode 100644
index 637c0a8faf..0000000000
--- a/keyboards/mlego/m65/keymaps/via/config.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
-Copyright 2021-2022 Alin M Elena <alinm.elena@gmail.com>
-
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#pragma once
-
-#define TAPPING_TOGGLE 2
diff --git a/keyboards/mlego/m65/keymaps/via/keymap.c b/keyboards/mlego/m65/keymaps/via/keymap.c
deleted file mode 100644
index bfdcacc039..0000000000
--- a/keyboards/mlego/m65/keymaps/via/keymap.c
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
-Copyright 2021-2022 Alin M Elena <alinm.elena@gmail.com>
-
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include QMK_KEYBOARD_H
-
-// clang-format off
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-
- [_QW] = LAYOUT_ortho_5x13(
- KC_ESC, KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_MINS, KC_BSPC ,
- KC_TAB, KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_LBRC, KC_RBRC ,
- KC_NUHS, KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN, KC_QUOT, KC_ENT ,
- SC_LSPO, KC_NUBS, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_UP , KC_SLSH ,
- KC_LCTL, KC_LGUI, TT(_LWR), KC_LALT, TT(_RSE), KC_SPC, KC_SPC, KC_SPC, KC_RALT, SC_RSPC, KC_LEFT, KC_DOWN, KC_RGHT),
-
- [_LWR] = LAYOUT_ortho_5x13(
- KC_GRV , KC_MUTE, KC_VOLU, KC_VOLD, KC_MPRV, KC_MPLY, KC_MNXT, G(KC_P), KC_SLEP, KC_WAKE, KC_PSCR, KC_DEL , KC_EQL ,
- KC_BTN3, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ,
- KC_BTN2, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ,
- _______, KC_BTN1, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MS_U, _______ ,
- _______, KC_BTN4, _______, _______, _______, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R),
-
- [_RSE] = LAYOUT_ortho_5x13(
- KC_ESC , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 ,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ,
- KC_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_WH_U, _______ ,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_WH_L, KC_WH_D, KC_WH_R),
-
- [_ADJ] = LAYOUT_ortho_5x13(
- RGB_MOD, RGB_RMOD, A(KC_F2), _______, _______, _______, _______, _______, _______, _______, _______, RGB_M_T , RGB_M_SW,
- RGB_HUI, RGB_HUD , RGB_M_P , _______, QK_BOOT , _______, _______, _______, _______, _______, _______, _______ , RGB_M_SN,
- RGB_SAI, RGB_SAD , RGB_M_B , _______, _______, _______, _______, _______, _______, _______, _______, _______ , RGB_M_K ,
- RGB_VAI, RGB_VAD , RGB_M_R , _______, _______, _______, _______, _______, _______, _______, _______, _______ , RGB_M_X ,
- RGB_TOG, _______ , _______ , _______, _______, _______, _______, _______, _______, _______, _______, RGB_M_TW, RGB_M_G),
-};
-// clang-format on
-
-bool led_update_user(led_t led_state) {
- // Disable the default LED update code, so that lock LEDs could be reused to show layer status.
- return false;
-}
-
-void matrix_scan_user(void) {
-
- toggle_leds();
-
-}
-
-bool process_record_user(uint16_t keycode, keyrecord_t* record) {
- switch (keycode) {
- case (TT(_LWR)):
- if (!record->event.pressed && record->tap.count == TAPPING_TOGGLE) {
- // This runs before the TT() handler toggles the layer state, so the current layer state is the opposite of the final one after toggle.
- set_led_toggle(_LWR, !layer_state_is(_LWR));
- }
- return true;
- break;
- case (TT(_RSE)):
- if (record->event.pressed && record->tap.count == TAPPING_TOGGLE) {
- set_led_toggle(_RSE, !layer_state_is(_RSE));
- }
- return true;
- break;
- default:
- return true;
- }
-}
-
-layer_state_t layer_state_set_user(layer_state_t state) {
-
-#ifdef RGBLIGHT_ENABLE
-
- set_rgb_layers(state);
-
-#endif
-
- return update_tri_layer_state(state, _LWR, _RSE, _ADJ);
-}
-
-#ifdef RGBLIGHT_ENABLE
-
-layer_state_t default_layer_state_set_user(layer_state_t state) {
- set_default_rgb_layers(state);
- return state;
-}
-
-#endif
-
-void keyboard_post_init_user(void) {
-
-#ifdef RGBLIGHT_ENABLE
-
- // Enable the LED layers
- rgblight_layers = my_rgb();
-
-#endif
-
-#ifdef OLED_ENABLE
-
- init_timer();
-
-#endif
-}
diff --git a/keyboards/mlego/m65/lib/glcdfont.c b/keyboards/mlego/m65/lib/glcdfont.c
index 4b354756b6..3f64f032cf 100644
--- a/keyboards/mlego/m65/lib/glcdfont.c
+++ b/keyboards/mlego/m65/lib/glcdfont.c
@@ -4,228 +4,13 @@
#include "progmem.h"
static const unsigned char PROGMEM font[] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00,
- 0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x00,
- 0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x00,
- 0x18, 0x3C, 0x7E, 0x3C, 0x18, 0x00,
- 0x1C, 0x57, 0x7D, 0x57, 0x1C, 0x00,
- 0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00,
- 0x00, 0x18, 0x3C, 0x18, 0x00, 0x00,
- 0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00,
- 0x00, 0x18, 0x24, 0x18, 0x00, 0x00,
- 0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x00,
- 0x30, 0x48, 0x3A, 0x06, 0x0E, 0x00,
- 0x26, 0x29, 0x79, 0x29, 0x26, 0x00,
- 0x40, 0x7F, 0x05, 0x05, 0x07, 0x00,
- 0x40, 0x7F, 0x05, 0x25, 0x3F, 0x00,
- 0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 0x00,
- 0x7F, 0x3E, 0x1C, 0x1C, 0x08, 0x00,
- 0x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x00,
- 0x14, 0x22, 0x7F, 0x22, 0x14, 0x00,
- 0x5F, 0x5F, 0x00, 0x5F, 0x5F, 0x00,
- 0x06, 0x09, 0x7F, 0x01, 0x7F, 0x00,
- 0x00, 0x66, 0x89, 0x95, 0x6A, 0x00,
- 0x60, 0x60, 0x60, 0x60, 0x60, 0x00,
- 0x94, 0xA2, 0xFF, 0xA2, 0x94, 0x00,
- 0x08, 0x04, 0x7E, 0x04, 0x08, 0x00,
- 0x10, 0x20, 0x7E, 0x20, 0x10, 0x00,
- 0x08, 0x08, 0x2A, 0x1C, 0x08, 0x00,
- 0x08, 0x1C, 0x2A, 0x08, 0x08, 0x00,
- 0x1E, 0x10, 0x10, 0x10, 0x10, 0x00,
- 0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x00,
- 0x30, 0x38, 0x3E, 0x38, 0x30, 0x00,
- 0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x5F, 0x00, 0x00, 0x00,
- 0x00, 0x07, 0x00, 0x07, 0x00, 0x00,
- 0x14, 0x7F, 0x14, 0x7F, 0x14, 0x00,
- 0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x00,
- 0x23, 0x13, 0x08, 0x64, 0x62, 0x00,
- 0x36, 0x49, 0x56, 0x20, 0x50, 0x00,
- 0x00, 0x08, 0x07, 0x03, 0x00, 0x00,
- 0x00, 0x1C, 0x22, 0x41, 0x00, 0x00,
- 0x00, 0x41, 0x22, 0x1C, 0x00, 0x00,
- 0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x00,
- 0x08, 0x08, 0x3E, 0x08, 0x08, 0x00,
- 0x00, 0x80, 0x70, 0x30, 0x00, 0x00,
- 0x08, 0x08, 0x08, 0x08, 0x08, 0x00,
- 0x00, 0x00, 0x60, 0x60, 0x00, 0x00,
- 0x20, 0x10, 0x08, 0x04, 0x02, 0x00,
- 0x3E, 0x51, 0x49, 0x45, 0x3E, 0x00,
- 0x00, 0x42, 0x7F, 0x40, 0x00, 0x00,
- 0x72, 0x49, 0x49, 0x49, 0x46, 0x00,
- 0x21, 0x41, 0x49, 0x4D, 0x33, 0x00,
- 0x18, 0x14, 0x12, 0x7F, 0x10, 0x00,
- 0x27, 0x45, 0x45, 0x45, 0x39, 0x00,
- 0x3C, 0x4A, 0x49, 0x49, 0x31, 0x00,
- 0x41, 0x21, 0x11, 0x09, 0x07, 0x00,
- 0x36, 0x49, 0x49, 0x49, 0x36, 0x00,
- 0x46, 0x49, 0x49, 0x29, 0x1E, 0x00,
- 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
- 0x00, 0x40, 0x34, 0x00, 0x00, 0x00,
- 0x00, 0x08, 0x14, 0x22, 0x41, 0x00,
- 0x14, 0x14, 0x14, 0x14, 0x14, 0x00,
- 0x00, 0x41, 0x22, 0x14, 0x08, 0x00,
- 0x02, 0x01, 0x59, 0x09, 0x06, 0x00,
- 0x3E, 0x41, 0x5D, 0x59, 0x4E, 0x00,
- 0x7C, 0x12, 0x11, 0x12, 0x7C, 0x00,
- 0x7F, 0x49, 0x49, 0x49, 0x36, 0x00,
- 0x3E, 0x41, 0x41, 0x41, 0x22, 0x00,
- 0x7F, 0x41, 0x41, 0x41, 0x3E, 0x00,
- 0x7F, 0x49, 0x49, 0x49, 0x41, 0x00,
- 0x7F, 0x09, 0x09, 0x09, 0x01, 0x00,
- 0x3E, 0x41, 0x41, 0x51, 0x73, 0x00,
- 0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00,
- 0x00, 0x41, 0x7F, 0x41, 0x00, 0x00,
- 0x20, 0x40, 0x41, 0x3F, 0x01, 0x00,
- 0x7F, 0x08, 0x14, 0x22, 0x41, 0x00,
- 0x7F, 0x40, 0x40, 0x40, 0x40, 0x00,
- 0x7F, 0x02, 0x1C, 0x02, 0x7F, 0x00,
- 0x7F, 0x04, 0x08, 0x10, 0x7F, 0x00,
- 0x3E, 0x41, 0x41, 0x41, 0x3E, 0x00,
- 0x7F, 0x09, 0x09, 0x09, 0x06, 0x00,
- 0x3E, 0x41, 0x51, 0x21, 0x5E, 0x00,
- 0x7F, 0x09, 0x19, 0x29, 0x46, 0x00,
- 0x26, 0x49, 0x49, 0x49, 0x32, 0x00,
- 0x03, 0x01, 0x7F, 0x01, 0x03, 0x00,
- 0x3F, 0x40, 0x40, 0x40, 0x3F, 0x00,
- 0x1F, 0x20, 0x40, 0x20, 0x1F, 0x00,
- 0x3F, 0x40, 0x38, 0x40, 0x3F, 0x00,
- 0x63, 0x14, 0x08, 0x14, 0x63, 0x00,
- 0x03, 0x04, 0x78, 0x04, 0x03, 0x00,
- 0x61, 0x59, 0x49, 0x4D, 0x43, 0x00,
- 0x00, 0x7F, 0x41, 0x41, 0x41, 0x00,
- 0x02, 0x04, 0x08, 0x10, 0x20, 0x00,
- 0x00, 0x41, 0x41, 0x41, 0x7F, 0x00,
- 0x04, 0x02, 0x01, 0x02, 0x04, 0x00,
- 0x40, 0x40, 0x40, 0x40, 0x40, 0x00,
- 0x00, 0x03, 0x07, 0x08, 0x00, 0x00,
- 0x20, 0x54, 0x54, 0x78, 0x40, 0x00,
- 0x7F, 0x28, 0x44, 0x44, 0x38, 0x00,
- 0x38, 0x44, 0x44, 0x44, 0x28, 0x00,
- 0x38, 0x44, 0x44, 0x28, 0x7F, 0x00,
- 0x38, 0x54, 0x54, 0x54, 0x18, 0x00,
- 0x00, 0x08, 0x7E, 0x09, 0x02, 0x00,
- 0x18, 0x24, 0x24, 0x1C, 0x78, 0x00,
- 0x7F, 0x08, 0x04, 0x04, 0x78, 0x00,
- 0x00, 0x44, 0x7D, 0x40, 0x00, 0x00,
- 0x20, 0x40, 0x40, 0x3D, 0x00, 0x00,
- 0x7F, 0x10, 0x28, 0x44, 0x00, 0x00,
- 0x00, 0x41, 0x7F, 0x40, 0x00, 0x00,
- 0x7C, 0x04, 0x78, 0x04, 0x78, 0x00,
- 0x7C, 0x08, 0x04, 0x04, 0x78, 0x00,
- 0x38, 0x44, 0x44, 0x44, 0x38, 0x00,
- 0x7C, 0x18, 0x24, 0x24, 0x18, 0x00,
- 0x18, 0x24, 0x24, 0x18, 0x7C, 0x00,
- 0x7C, 0x08, 0x04, 0x04, 0x08, 0x00,
- 0x48, 0x54, 0x54, 0x54, 0x24, 0x00,
- 0x04, 0x04, 0x3F, 0x44, 0x24, 0x00,
- 0x3C, 0x40, 0x40, 0x20, 0x7C, 0x00,
- 0x1C, 0x20, 0x40, 0x20, 0x1C, 0x00,
- 0x3C, 0x40, 0x30, 0x40, 0x3C, 0x00,
- 0x44, 0x28, 0x10, 0x28, 0x44, 0x00,
- 0x4C, 0x90, 0x90, 0x90, 0x7C, 0x00,
- 0x44, 0x64, 0x54, 0x4C, 0x44, 0x00,
- 0x00, 0x08, 0x36, 0x41, 0x00, 0x00,
- 0x00, 0x00, 0x77, 0x00, 0x00, 0x00,
- 0x00, 0x41, 0x36, 0x08, 0x00, 0x00,
- 0x02, 0x01, 0x02, 0x04, 0x02, 0x00,
- 0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0xE0, 0x18, 0x02,
- 0x00, 0x3C, 0x1E, 0x06, 0x0E, 0x0A,
- 0x1A, 0x0E, 0x26, 0xFF, 0xBF, 0x0D,
- 0x00, 0x80, 0x80, 0x81, 0xFF, 0xFE,
- 0xF8, 0x01, 0x01, 0x03, 0x03, 0x03,
- 0x03, 0x05, 0x05, 0x02, 0x02, 0x0A,
- 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A,
- 0x0C, 0x04, 0x10, 0x18, 0x20, 0xC0,
- 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0xD0, 0x58, 0x78,
- 0x68, 0x2C, 0x24, 0x34, 0xF4, 0xF4,
- 0x3C, 0x3C, 0xFC, 0xF8, 0xF8, 0x70,
- 0xF0, 0xE0, 0xE0, 0xC0, 0xC0, 0x80,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0xC0, 0x7C, 0x07, 0x80, 0xE0,
- 0x60, 0x64, 0xE2, 0x60, 0x10, 0x10,
- 0x20, 0x22, 0x12, 0x17, 0x3F, 0x0B,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x21,
- 0x6F, 0xFC, 0xE0, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x40,
- 0x60, 0x60, 0x70, 0x70, 0xF0, 0xF0,
- 0xD0, 0xD0, 0xD0, 0xD0, 0x50, 0x50,
- 0x50, 0x70, 0x78, 0x78, 0x78, 0x7C,
- 0x7F, 0x7D, 0x7C, 0x5E, 0x4F, 0x44,
- 0x40, 0x40, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x38, 0x30, 0x30, 0x30, 0x30,
- 0x30, 0x30, 0x58, 0x46, 0x47, 0x41,
- 0x41, 0x01, 0x01, 0x03, 0x03, 0x42,
- 0x42, 0x42, 0x46, 0x46, 0x46, 0x46,
- 0x42, 0x43, 0x43, 0x73, 0x77, 0x72,
- 0x70, 0x60, 0x60, 0x60, 0x60, 0x60,
- 0x60, 0x61, 0x67, 0x6F, 0x7E, 0x78,
- 0x78, 0x70, 0x70, 0x70, 0x70, 0x70,
- 0x60, 0x60, 0x60, 0x60, 0x60, 0x60,
- 0x60, 0x60, 0x60, 0x60, 0x60, 0x60,
- 0x60, 0x60, 0x60, 0x60, 0x60, 0x60,
- 0x40, 0x40, 0x40, 0x48, 0x58, 0x58,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00, 0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x00, 0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x00, 0x18, 0x3C, 0x7E, 0x3C, 0x18, 0x00, 0x1C, 0x57, 0x7D, 0x57, 0x1C, 0x00, 0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00, 0x00, 0x18, 0x3C, 0x18, 0x00, 0x00, 0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00, 0x00, 0x18, 0x24, 0x18, 0x00, 0x00, 0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x00, 0x30, 0x48, 0x3A, 0x06, 0x0E, 0x00, 0x26, 0x29, 0x79, 0x29, 0x26, 0x00, 0x40, 0x7F, 0x05, 0x05, 0x07, 0x00, 0x40, 0x7F, 0x05, 0x25, 0x3F, 0x00, 0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 0x00, 0x7F, 0x3E, 0x1C, 0x1C, 0x08, 0x00, 0x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x00, 0x14, 0x22, 0x7F, 0x22, 0x14, 0x00, 0x5F, 0x5F, 0x00, 0x5F, 0x5F, 0x00, 0x06, 0x09, 0x7F, 0x01, 0x7F, 0x00, 0x00, 0x66, 0x89, 0x95, 0x6A, 0x00, 0x60, 0x60, 0x60, 0x60, 0x60, 0x00, 0x94, 0xA2, 0xFF, 0xA2, 0x94, 0x00, 0x08, 0x04, 0x7E, 0x04, 0x08, 0x00,
+ 0x10, 0x20, 0x7E, 0x20, 0x10, 0x00, 0x08, 0x08, 0x2A, 0x1C, 0x08, 0x00, 0x08, 0x1C, 0x2A, 0x08, 0x08, 0x00, 0x1E, 0x10, 0x10, 0x10, 0x10, 0x00, 0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x00, 0x30, 0x38, 0x3E, 0x38, 0x30, 0x00, 0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x07, 0x00, 0x00, 0x14, 0x7F, 0x14, 0x7F, 0x14, 0x00, 0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x00, 0x23, 0x13, 0x08, 0x64, 0x62, 0x00, 0x36, 0x49, 0x56, 0x20, 0x50, 0x00, 0x00, 0x08, 0x07, 0x03, 0x00, 0x00, 0x00, 0x1C, 0x22, 0x41, 0x00, 0x00, 0x00, 0x41, 0x22, 0x1C, 0x00, 0x00, 0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x00, 0x08, 0x08, 0x3E, 0x08, 0x08, 0x00, 0x00, 0x80, 0x70, 0x30, 0x00, 0x00, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x20, 0x10, 0x08, 0x04, 0x02, 0x00, 0x3E, 0x51, 0x49, 0x45, 0x3E, 0x00, 0x00, 0x42, 0x7F, 0x40, 0x00, 0x00,
+ 0x72, 0x49, 0x49, 0x49, 0x46, 0x00, 0x21, 0x41, 0x49, 0x4D, 0x33, 0x00, 0x18, 0x14, 0x12, 0x7F, 0x10, 0x00, 0x27, 0x45, 0x45, 0x45, 0x39, 0x00, 0x3C, 0x4A, 0x49, 0x49, 0x31, 0x00, 0x41, 0x21, 0x11, 0x09, 0x07, 0x00, 0x36, 0x49, 0x49, 0x49, 0x36, 0x00, 0x46, 0x49, 0x49, 0x29, 0x1E, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x40, 0x34, 0x00, 0x00, 0x00, 0x00, 0x08, 0x14, 0x22, 0x41, 0x00, 0x14, 0x14, 0x14, 0x14, 0x14, 0x00, 0x00, 0x41, 0x22, 0x14, 0x08, 0x00, 0x02, 0x01, 0x59, 0x09, 0x06, 0x00, 0x3E, 0x41, 0x5D, 0x59, 0x4E, 0x00, 0x7C, 0x12, 0x11, 0x12, 0x7C, 0x00, 0x7F, 0x49, 0x49, 0x49, 0x36, 0x00, 0x3E, 0x41, 0x41, 0x41, 0x22, 0x00, 0x7F, 0x41, 0x41, 0x41, 0x3E, 0x00, 0x7F, 0x49, 0x49, 0x49, 0x41, 0x00, 0x7F, 0x09, 0x09, 0x09, 0x01, 0x00, 0x3E, 0x41, 0x41, 0x51, 0x73, 0x00, 0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00, 0x00, 0x41, 0x7F, 0x41, 0x00, 0x00, 0x20, 0x40, 0x41, 0x3F, 0x01, 0x00,
+ 0x7F, 0x08, 0x14, 0x22, 0x41, 0x00, 0x7F, 0x40, 0x40, 0x40, 0x40, 0x00, 0x7F, 0x02, 0x1C, 0x02, 0x7F, 0x00, 0x7F, 0x04, 0x08, 0x10, 0x7F, 0x00, 0x3E, 0x41, 0x41, 0x41, 0x3E, 0x00, 0x7F, 0x09, 0x09, 0x09, 0x06, 0x00, 0x3E, 0x41, 0x51, 0x21, 0x5E, 0x00, 0x7F, 0x09, 0x19, 0x29, 0x46, 0x00, 0x26, 0x49, 0x49, 0x49, 0x32, 0x00, 0x03, 0x01, 0x7F, 0x01, 0x03, 0x00, 0x3F, 0x40, 0x40, 0x40, 0x3F, 0x00, 0x1F, 0x20, 0x40, 0x20, 0x1F, 0x00, 0x3F, 0x40, 0x38, 0x40, 0x3F, 0x00, 0x63, 0x14, 0x08, 0x14, 0x63, 0x00, 0x03, 0x04, 0x78, 0x04, 0x03, 0x00, 0x61, 0x59, 0x49, 0x4D, 0x43, 0x00, 0x00, 0x7F, 0x41, 0x41, 0x41, 0x00, 0x02, 0x04, 0x08, 0x10, 0x20, 0x00, 0x00, 0x41, 0x41, 0x41, 0x7F, 0x00, 0x04, 0x02, 0x01, 0x02, 0x04, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x03, 0x07, 0x08, 0x00, 0x00, 0x20, 0x54, 0x54, 0x78, 0x40, 0x00, 0x7F, 0x28, 0x44, 0x44, 0x38, 0x00, 0x38, 0x44, 0x44, 0x44, 0x28, 0x00,
+ 0x38, 0x44, 0x44, 0x28, 0x7F, 0x00, 0x38, 0x54, 0x54, 0x54, 0x18, 0x00, 0x00, 0x08, 0x7E, 0x09, 0x02, 0x00, 0x18, 0x24, 0x24, 0x1C, 0x78, 0x00, 0x7F, 0x08, 0x04, 0x04, 0x78, 0x00, 0x00, 0x44, 0x7D, 0x40, 0x00, 0x00, 0x20, 0x40, 0x40, 0x3D, 0x00, 0x00, 0x7F, 0x10, 0x28, 0x44, 0x00, 0x00, 0x00, 0x41, 0x7F, 0x40, 0x00, 0x00, 0x7C, 0x04, 0x78, 0x04, 0x78, 0x00, 0x7C, 0x08, 0x04, 0x04, 0x78, 0x00, 0x38, 0x44, 0x44, 0x44, 0x38, 0x00, 0x7C, 0x18, 0x24, 0x24, 0x18, 0x00, 0x18, 0x24, 0x24, 0x18, 0x7C, 0x00, 0x7C, 0x08, 0x04, 0x04, 0x08, 0x00, 0x48, 0x54, 0x54, 0x54, 0x24, 0x00, 0x04, 0x04, 0x3F, 0x44, 0x24, 0x00, 0x3C, 0x40, 0x40, 0x20, 0x7C, 0x00, 0x1C, 0x20, 0x40, 0x20, 0x1C, 0x00, 0x3C, 0x40, 0x30, 0x40, 0x3C, 0x00, 0x44, 0x28, 0x10, 0x28, 0x44, 0x00, 0x4C, 0x90, 0x90, 0x90, 0x7C, 0x00, 0x44, 0x64, 0x54, 0x4C, 0x44, 0x00, 0x00, 0x08, 0x36, 0x41, 0x00, 0x00, 0x00, 0x00, 0x77, 0x00, 0x00, 0x00,
+ 0x00, 0x41, 0x36, 0x08, 0x00, 0x00, 0x02, 0x01, 0x02, 0x04, 0x02, 0x00, 0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x18, 0x02, 0x00, 0x3C, 0x1E, 0x06, 0x0E, 0x0A, 0x1A, 0x0E, 0x26, 0xFF, 0xBF, 0x0D, 0x00, 0x80, 0x80, 0x81, 0xFF, 0xFE, 0xF8, 0x01, 0x01, 0x03, 0x03, 0x03, 0x03, 0x05, 0x05, 0x02, 0x02, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0C, 0x04, 0x10, 0x18, 0x20, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xD0, 0x58, 0x78, 0x68, 0x2C, 0x24, 0x34, 0xF4, 0xF4, 0x3C, 0x3C, 0xFC, 0xF8, 0xF8, 0x70, 0xF0, 0xE0, 0xE0, 0xC0, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x7C, 0x07, 0x80, 0xE0, 0x60, 0x64, 0xE2, 0x60, 0x10, 0x10, 0x20, 0x22, 0x12, 0x17, 0x3F, 0x0B, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x6F, 0xFC, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x60, 0x70, 0x70, 0xF0, 0xF0, 0xD0, 0xD0, 0xD0, 0xD0, 0x50, 0x50, 0x50, 0x70, 0x78, 0x78, 0x78, 0x7C, 0x7F, 0x7D, 0x7C, 0x5E, 0x4F, 0x44, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x30, 0x30, 0x30, 0x30,
+ 0x30, 0x30, 0x58, 0x46, 0x47, 0x41, 0x41, 0x01, 0x01, 0x03, 0x03, 0x42, 0x42, 0x42, 0x46, 0x46, 0x46, 0x46, 0x42, 0x43, 0x43, 0x73, 0x77, 0x72, 0x70, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x61, 0x67, 0x6F, 0x7E, 0x78, 0x78, 0x70, 0x70, 0x70, 0x70, 0x70, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x40, 0x40, 0x40, 0x48, 0x58, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
diff --git a/keyboards/mlego/m65/m65.c b/keyboards/mlego/m65/m65.c
index 3f71a27790..12ea866f1e 100644
--- a/keyboards/mlego/m65/m65.c
+++ b/keyboards/mlego/m65/m65.c
@@ -1,139 +1,74 @@
-/*
-Copyright 2021-2022 Alin M Elena <alinm.elena@gmail.com>
+// Copyright 2020-2023 alin m elena (@alinelena)
+// SPDX-License-Identifier: GPL-2.0-or-later
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General 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 "m65.h"
+#include QMK_KEYBOARD_H
// let us assume we start with both layers off
static bool toggle_lwr = false;
static bool toggle_rse = false;
-#ifdef RGBLIGHT_ENABLE
+#if defined(RGBLIGHT_ENABLE)
-const rgblight_segment_t PROGMEM my_qwerty_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, RGBLED_NUM, HSV_PURPLE});
-const rgblight_segment_t PROGMEM my_lwr_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, RGBLED_NUM, HSV_CYAN});
-const rgblight_segment_t PROGMEM my_rse_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, RGBLED_NUM, HSV_RED});
-const rgblight_segment_t PROGMEM my_adj_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, RGBLED_NUM, HSV_GREEN});
+const rgblight_segment_t PROGMEM my_qwerty_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, RGBLED_NUM, HSV_OFF});
+const rgblight_segment_t PROGMEM my_lwr_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, RGBLED_NUM, HSV_AZURE});
+const rgblight_segment_t PROGMEM my_rse_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, RGBLED_NUM, HSV_CORAL});
+const rgblight_segment_t PROGMEM my_adj_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, RGBLED_NUM, HSV_RED});
const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST(my_qwerty_layer, my_lwr_layer, my_rse_layer, my_adj_layer);
#endif
-#ifdef OLED_ENABLE
-
-static uint32_t oled_logo_timer = 0;
-static bool clear_logo = true;
-static const char PROGMEM m65_logo[] = {
- 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5,
- 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94,
- 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4,
- 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1, 0xd2, 0xd3, 0xd4,
- 0};
-
+#if defined(OLED_ENABLE)
+static uint32_t oled_logo_timer = 0;
+static bool clear_logo = true;
+static const char PROGMEM m65_logo[] = {0x92, 0x92, 0x93, 0x94, 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x8D, 0x8E, 0x8F, 0x90, 0x92, 0x92, 0x93, 0x94, 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7, 0xA8, 0xA9, 0xAA, 0xAB, 0xAC, 0xAD, 0xAE, 0xAF, 0xB0, 0xB2, 0x92, 0xB3, 0xB4, 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF, 0xD0, 0};
#endif
-#ifdef RGBLIGHT_ENABLE
-
-void set_rgb_layers(layer_state_t state){
+#if defined(RGBLIGHT_ENABLE)
+void set_rgb_layers(layer_state_t state) {
rgblight_set_layer_state(0, layer_state_cmp(state, _QW));
rgblight_set_layer_state(1, layer_state_cmp(state, _LWR));
rgblight_set_layer_state(2, layer_state_cmp(state, _RSE));
rgblight_set_layer_state(3, layer_state_cmp(state, _ADJ));
-
}
-void set_default_rgb_layers(layer_state_t state){
+void set_default_rgb_layers(layer_state_t state) {
rgblight_set_layer_state(0, layer_state_cmp(state, _QW));
}
-const rgblight_segment_t * const* my_rgb(void){
+const rgblight_segment_t* const* my_rgb(void) {
return my_rgb_layers;
}
#endif
-void set_led_toggle(const uint8_t layer, const bool state){
-
+void set_led_toggle(const uint8_t layer, const bool state) {
switch (layer) {
case _LWR:
- toggle_lwr = state;
- break;
+ toggle_lwr = state;
+ break;
case _RSE:
- toggle_rse = state;
- break;
+ toggle_rse = state;
+ break;
default:
- break;
+ break;
}
}
-void toggle_leds(void){
-
+void toggle_leds(const bool toggle_lwr, const bool toggle_rse) {
led_lwr(toggle_lwr);
led_rse(toggle_rse);
- led_t led_state = host_keyboard_led_state();
- led_caps(led_state.caps_lock);
if (layer_state_is(_ADJ)) {
led_lwr(true);
led_rse(true);
}
-
}
-#ifdef ENCODER_ENABLE
-
-# define MEDIA_KEY_DELAY 10
+#if defined(OLED_ENABLE)
-void my_encoders(const uint8_t index, const bool clockwise) {
- if (index == 0) { /* First encoder */
- if (IS_LAYER_ON(_LWR)) {
- if (clockwise) {
- rgblight_decrease_val_noeeprom();
- } else {
- rgblight_increase_val_noeeprom();
- }
- } else if (IS_LAYER_ON(_RSE)) {
- if (clockwise) {
- rgblight_decrease_hue_noeeprom();
- } else {
- rgblight_increase_hue_noeeprom();
- }
-
- } else {
- if (clockwise) {
- tap_code_delay(KC_VOLD, MEDIA_KEY_DELAY);
- } else {
- tap_code_delay(KC_VOLU, MEDIA_KEY_DELAY);
- }
- }
- }
-}
-
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) { return false; }
- my_encoders(index, clockwise);
- return false;
-}
-
-#endif
-
-#ifdef OLED_ENABLE
-
-void init_timer(void){
- oled_logo_timer = timer_read32();
+void init_timer(void) {
+ oled_logo_timer = timer_read32();
};
void user_oled_magic(void) {
@@ -163,11 +98,38 @@ void user_oled_magic(void) {
oled_write_P(led_state.num_lock ? PSTR("Lower ") : PSTR(" "), false);
oled_write_P(led_state.scroll_lock ? PSTR("Raise ") : PSTR(" "), false);
oled_write_P(led_state.caps_lock ? PSTR("CapsLock ") : PSTR(" "), false);
-#ifdef WPM_ENABLE
+
+# if defined(UNICODE_COMMON_ENABLE)
+ oled_write_P(PSTR("\nunicode: "), false);
+ switch (get_unicode_input_mode()) {
+ case UNICODE_MODE_LINUX:
+ oled_write_P(PSTR("Linux"), false);
+ break;
+ case UNICODE_MODE_MACOS:
+ oled_write_P(PSTR("apple"), false);
+ break;
+ case UNICODE_MODE_WINDOWS:
+ oled_write_P(PSTR("windows"), false);
+ break;
+ case UNICODE_MODE_WINCOMPOSE:
+ oled_write_P(PSTR("windows c"), false);
+ break;
+ case UNICODE_MODE_BSD:
+ oled_write_P(PSTR("bsd"), false);
+ break;
+ case UNICODE_MODE_EMACS:
+ oled_write_P(PSTR("emacs"), false);
+ break;
+ default:
+ oled_write_ln_P(PSTR("not supported"), false);
+ }
+# endif
+
+# if defined(WPM_ENABLE)
oled_write_P(PSTR("\nwpm: "), false);
uint8_t wpm = get_current_wpm();
- oled_write_P(wpm != 0 ? get_u8_str(wpm,' ') : PSTR(" "), false);
-#endif
+ oled_write_P(wpm != 0 ? get_u8_str(wpm, ' ') : PSTR(" "), false);
+# endif
}
void render_logo(void) {
@@ -175,13 +137,13 @@ void render_logo(void) {
}
void clear_screen(void) {
- if (clear_logo){
- for (uint8_t i = 0; i < OLED_DISPLAY_HEIGHT; ++i) {
- for (uint8_t j = 0; j < OLED_DISPLAY_WIDTH; ++j) {
- oled_write_raw_byte(0x0, i*OLED_DISPLAY_WIDTH + j);
+ if (clear_logo) {
+ for (uint8_t i = 0; i < OLED_DISPLAY_HEIGHT; ++i) {
+ for (uint8_t j = 0; j < OLED_DISPLAY_WIDTH; ++j) {
+ oled_write_raw_byte(0x0, i * OLED_DISPLAY_WIDTH + j);
+ }
}
- }
- clear_logo = false;
+ clear_logo = false;
}
}
@@ -191,14 +153,91 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) {
# define SHOW_LOGO 5000
bool oled_task_kb(void) {
- if (!oled_task_user()) { return false; }
- if ((timer_elapsed32(oled_logo_timer) < SHOW_LOGO)){
+ if (!oled_task_user()) {
+ return false;
+ }
+ if ((timer_elapsed32(oled_logo_timer) < SHOW_LOGO)) {
render_logo();
- }else{
- clear_screen();
- user_oled_magic();
+ } else {
+ clear_screen();
+ user_oled_magic();
}
return false;
}
#endif
+
+void matrix_scan_kb(void) {
+ matrix_scan_user();
+ toggle_leds(toggle_lwr, toggle_rse);
+}
+
+bool process_record_kb(uint16_t keycode, keyrecord_t* record) {
+#if defined(CONSOLE_ENABLE)
+ uprintf("KL: kc: 0x%04X, col: %2u, row: %2u, pressed: %u, time: %5u, int: %u, count: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed, record->event.time, record->tap.interrupted, record->tap.count);
+#endif
+
+ switch (keycode) {
+ case (TT(_LWR)):
+ if (!record->event.pressed && record->tap.count == TAPPING_TOGGLE) {
+ // This runs before the TT() handler toggles the layer state, so the current layer state is the opposite of the final one after toggle.
+ set_led_toggle(_LWR, !layer_state_is(_LWR));
+ }
+ return true;
+ break;
+ case (TT(_RSE)):
+ if (record->event.pressed && record->tap.count == TAPPING_TOGGLE) {
+ set_led_toggle(_RSE, !layer_state_is(_RSE));
+ }
+ return true;
+ break;
+ default:
+ return true;
+ }
+ return process_record_user(keycode, record);
+}
+
+layer_state_t layer_state_set_kb(layer_state_t state) {
+ state = layer_state_set_user(state);
+
+#if defined(RGBLIGHT_ENABLE)
+
+ set_rgb_layers(state);
+
+#endif
+
+ return update_tri_layer_state(state, _LWR, _RSE, _ADJ);
+}
+
+#if defined(RGBLIGHT_ENABLE)
+
+layer_state_t default_layer_state_set_kb(layer_state_t state) {
+ state = default_layer_state_set_user(state);
+
+ set_default_rgb_layers(state);
+
+ return state;
+}
+
+#endif
+
+void keyboard_post_init_kb(void) {
+ init_lwr_rse_led();
+
+#if defined(RGBLIGHT_ENABLE)
+ // Enable the LED layers
+ rgblight_layers = my_rgb();
+#endif
+
+#if defined(OLED_ENABLE)
+ init_timer();
+#endif
+
+#if defined(CONSOLE_ENABLE)
+ debug_enable = true;
+ debug_matrix = true;
+ debug_keyboard = true;
+#endif
+
+ keyboard_post_init_user();
+}
diff --git a/keyboards/mlego/m65/m65.h b/keyboards/mlego/m65/m65.h
index 0c3f3b5ba6..1c5589c111 100644
--- a/keyboards/mlego/m65/m65.h
+++ b/keyboards/mlego/m65/m65.h
@@ -1,154 +1,65 @@
-/*
-Copyright 2021-2022 Alin M Elena <alinm.elena@gmail.com>
-
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
+// Copyright 2020-2023 alin m elena (@alinelena)
+// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#include "quantum.h"
-enum unicode_names {
- la = 0,
- lA,
- lb,
- lB,
- lc,
- lC,
- ld,
- lD,
- le,
- lE,
- lf,
- lF,
- lg,
- lG,
- lh,
- lH,
- li,
- lI,
- lj,
- lJ,
- lk,
- lK,
- ll,
- lL,
- lm,
- lM,
- ln,
- lN,
- lo,
- lO,
- lp,
- lP,
- lq,
- lQ,
- lr,
- lR,
- ls,
- lS,
- lt,
- lT,
- lu,
- lU,
- lv,
- lV,
- lw,
- lW,
- lx,
- lX,
- ly,
- lY,
- lz,
- lZ,
- lc1,
- lC1,
- lp1,
- lP1,
- lq1,
- lQ1,
- ll1,
- lL1,
- lk1,
- lK1,
- ra,
- rA,
- ra1,
- rA1,
- rc,
- rC,
- ri,
- rI,
- rs,
- rS,
- rt,
- rT,
- ro,
- rO,
- ra2,
- rA2,
- ra3,
- rA3
-};
+#if defined(UNICODEMAP_ENABLE)
+enum unicode_names { la = 0, lA, lb, lB, lc, lC, ld, lD, le, lE, lf, lF, lg, lG, lh, lH, li, lI, lj, lJ, lk, lK, ll, lL, lm, lM, ln, lN, lo, lO, lp, lP, lq, lQ, lr, lR, ls, lS, lt, lT, lu, lU, lv, lV, lw, lW, lx, lX, ly, lY, lz, lZ, lc1, lC1, lp1, lP1, lq1, lQ1, ll1, lL1, lk1, lK1, lbo1, lbo2, lbc1, lbc2, ls1, ls2, ra, rA, ra1, rA1, rc, rC, ri, rI, rs, rS, rt, rT, ro, rO, ra2, rA2, ra3, rA3, rx, rX, rv, rV, rb, rB, rn, rN };
+#endif
+enum layer_names { _QW = 0, _LWR, _RSE, _ADJ };
-enum layer_names {
- _QW = 0,
- _LWR,
- _RSE,
- _ADJ
-};
-#ifdef OLED_ENABLE
+#if defined(OLED_ENABLE)
void user_oled_magic(void);
void render_logo(void);
void clear_screen(void);
void init_timer(void);
#endif
-#ifdef ENCODER_ENABLE
-void my_encoders(const uint8_t, const bool);
-bool encoder_update_user(uint8_t, bool);
+#if defined(RGBLIGHT_ENABLE)
+void set_rgb_layers(layer_state_t);
+const rgblight_segment_t* const* my_rgb(void);
+void set_default_rgb_layers(layer_state_t);
#endif
-#ifdef RGBLIGHT_ENABLE
-void set_rgb_layers(layer_state_t);
-const rgblight_segment_t * const* my_rgb(void);
-void set_default_rgb_layers(layer_state_t);
-#endif
+void toggle_leds(const bool, const bool);
+void set_led_toggle(const uint8_t, const bool);
+static inline void init_lwr_rse_led(void) {
+#if defined(LED_LWR_PIN)
+ setPinOutput(LED_LWR_PIN);
+ writePin(LED_LWR_PIN, false);
+ wait_ms(30);
+#endif
-void toggle_leds(void);
-void set_led_toggle(const uint8_t, const bool);
+#if defined(LED_RSE_PIN)
+ setPinOutput(LED_RSE_PIN);
+ writePin(LED_RSE_PIN, false);
+ wait_ms(30);
+#endif
+}
static inline void led_lwr(const bool on) {
-#ifdef LED_NUM_LOCK_PIN
- writePin(LED_NUM_LOCK_PIN, on);
+#if defined(LED_LWR_PIN)
+ if ((PRODUCT_ID == 0x6064) || (PRODUCT_ID == 0x6065) ||
+ (PRODUCT_ID == 0x6066) || (PRODUCT_ID == 0x6067)) {
+ writePin(LED_LWR_PIN, !on);
+ }else{
+ writePin(LED_LWR_PIN, on);
+ }
#endif
}
static inline void led_rse(const bool on) {
-#ifdef LED_SCROLL_LOCK_PIN
- writePin(LED_SCROLL_LOCK_PIN, on);
-#endif
-}
-static inline void led_caps(const bool on) {
-#ifdef LED_CAPS_LOCK_PIN
- if ((PRODUCT_ID == 0x6061) && (DEVICE_VER == 0x0002)) {
- writePin(LED_CAPS_LOCK_PIN, on);
- } else {
- writePin(LED_CAPS_LOCK_PIN, !on);
+#if defined(LED_RSE_PIN)
+ if ((PRODUCT_ID == 0x6064) || (PRODUCT_ID == 0x6065) ||
+ (PRODUCT_ID == 0x6066) || (PRODUCT_ID == 0x6067)) {
+ writePin(LED_RSE_PIN, !on);
+ }else{
+ writePin(LED_RSE_PIN, on);
}
#endif
}
diff --git a/keyboards/mlego/m65/readme.md b/keyboards/mlego/m65/readme.md
index 8076697a2b..d53475fd57 100644
--- a/keyboards/mlego/m65/readme.md
+++ b/keyboards/mlego/m65/readme.md
@@ -7,7 +7,7 @@ A (13x5) ortholinear keyboard that can be hand wired or using a pcb.
* Keyboard Maintainer: [Alin Elena](https://github.com/alinelena) ([@drFaustroll on GitLab](https://gitlab.com/drFaustroll))
* Hardware Supported: custom pcb [see](https://gitlab.com/m-lego/m65) STM/APM32F103C8T6, aka Black Pill (rev1),
GD32F303CCT6 from we act aka Blue Pill Plus (rev2), STM32F401 from we act (rev3,rev4) STM32F411 can also be used just ask
-* Hardware Availability: [custom how to](https://alin.elena.space/blog/keeblego/)
+* Hardware Availability: [custom how to](https://mlego.elena.space/m65)
Make example for this keyboard (after setting up your build environment):
diff --git a/keyboards/mlego/m65/rev1/config.h b/keyboards/mlego/m65/rev1/config.h
index 847dd11823..e832af8fee 100644
--- a/keyboards/mlego/m65/rev1/config.h
+++ b/keyboards/mlego/m65/rev1/config.h
@@ -1,20 +1,7 @@
-/*
-Copyright 2021-2022 Alin M Elena <alinm.elena@gmail.com>
-
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
+// Copyright 2020-2023 alin m elena (@alinelena)
+// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
-#define RGBLIGHT_LAYERS
+#define LED_RSE_PIN B13
+#define LED_LWR_PIN B12
diff --git a/keyboards/mlego/m65/rev1/info.json b/keyboards/mlego/m65/rev1/info.json
index 960b9325c8..d8bb91de30 100644
--- a/keyboards/mlego/m65/rev1/info.json
+++ b/keyboards/mlego/m65/rev1/info.json
@@ -1,42 +1,134 @@
{
- "usb": {
- "pid": "0x6061",
- "device_version": "0.0.1"
- },
- "matrix_pins": {
- "cols": ["A10", "A15", "B3", "B4", "B5", "B9", "B8", "B7", "B6", "C15", "A0", "A7", "B10"],
- "rows": ["B11", "B0", "B1", "A2", "A3"]
- },
+ "manufacturer": "Alin Elena",
+ "keyboard_name": "mlego/m65 rev1",
+ "maintainer": "alin elena",
+ "bootloader": "stm32duino",
+ "debounce": 5,
"diode_direction": "COL2ROW",
"encoder": {
"rotary": [
{"pin_a": "A8", "pin_b": "A9"}
]
},
+ "features": {
+ "audio": false,
+ "backlight": false,
+ "bootmagic": true,
+ "command": false,
+ "console": false,
+ "encoder": true,
+ "extrakey": true,
+ "mousekey": true,
+ "nkro": true,
+ "rgblight": true
+ },
"indicators": {
"caps_lock": "C13",
- "num_lock": "B12",
- "scroll_lock": "B13"
+ "on_state": 0
},
+ "matrix_pins": {
+ "cols": ["A10", "A15", "B3", "B4", "B5", "B9", "B8", "B7", "B6", "C15", "A0", "A7", "B10"],
+ "rows": ["B11", "B0", "B1", "A2", "A3"]
+ },
+ "processor": "STM32F103",
"rgblight": {
- "saturation_steps": 8,
- "led_count": 20,
"animations": {
+ "alternating": true,
"breathing": true,
+ "christmas": true,
+ "knight": true,
"rainbow_mood": true,
"rainbow_swirl": true,
+ "rgb_test": true,
"snake": true,
- "knight": true,
- "christmas": true,
"static_gradient": true,
- "rgb_test": true,
- "alternating": true,
"twinkle": true
- }
+ },
+ "hue_steps": 8,
+ "layers": {
+ "enabled": true
+ },
+ "led_count": 20,
+ "saturation_steps": 8
+ },
+ "url": "https://gitlab.com/m-lego/m65",
+ "usb": {
+ "device_version": "0.0.1",
+ "pid": "0x6061",
+ "vid": "0xBABA"
},
"ws2812": {
"pin": "B15"
},
- "processor": "STM32F103",
- "bootloader": "stm32duino"
+ "layouts": {
+ "LAYOUT_ortho_5x13": {
+ "layout": [
+ {"label": "Esc", "matrix": [0, 0], "x": 0, "y": 0},
+ {"label": "1", "matrix": [0, 1], "x": 1, "y": 0},
+ {"label": "2", "matrix": [0, 2], "x": 2, "y": 0},
+ {"label": "3", "matrix": [0, 3], "x": 3, "y": 0},
+ {"label": "4", "matrix": [0, 4], "x": 4, "y": 0},
+ {"label": "5", "matrix": [0, 5], "x": 5, "y": 0},
+ {"label": "6", "matrix": [0, 6], "x": 6, "y": 0},
+ {"label": "7", "matrix": [0, 7], "x": 7, "y": 0},
+ {"label": "8", "matrix": [0, 8], "x": 8, "y": 0},
+ {"label": "9", "matrix": [0, 9], "x": 9, "y": 0},
+ {"label": "0", "matrix": [0, 10], "x": 10, "y": 0},
+ {"label": "-", "matrix": [0, 11], "x": 11, "y": 0},
+ {"label": "Backspace", "matrix": [0, 12], "x": 12, "y": 0},
+ {"label": "Tab", "matrix": [1, 0], "x": 0, "y": 1},
+ {"label": "q", "matrix": [1, 1], "x": 1, "y": 1},
+ {"label": "w", "matrix": [1, 2], "x": 2, "y": 1},
+ {"label": "e", "matrix": [1, 3], "x": 3, "y": 1},
+ {"label": "r", "matrix": [1, 4], "x": 4, "y": 1},
+ {"label": "t", "matrix": [1, 5], "x": 5, "y": 1},
+ {"label": "y", "matrix": [1, 6], "x": 6, "y": 1},
+ {"label": "u", "matrix": [1, 7], "x": 7, "y": 1},
+ {"label": "i", "matrix": [1, 8], "x": 8, "y": 1},
+ {"label": "o", "matrix": [1, 9], "x": 9, "y": 1},
+ {"label": "p", "matrix": [1, 10], "x": 10, "y": 1},
+ {"label": "[", "matrix": [1, 11], "x": 11, "y": 1},
+ {"label": "]", "matrix": [1, 12], "x": 12, "y": 1},
+ {"label": "#", "matrix": [2, 0], "x": 0, "y": 2},
+ {"label": "a", "matrix": [2, 1], "x": 1, "y": 2},
+ {"label": "s", "matrix": [2, 2], "x": 2, "y": 2},
+ {"label": "d", "matrix": [2, 3], "x": 3, "y": 2},
+ {"label": "f", "matrix": [2, 4], "x": 4, "y": 2},
+ {"label": "g", "matrix": [2, 5], "x": 5, "y": 2},
+ {"label": "h", "matrix": [2, 6], "x": 6, "y": 2},
+ {"label": "j", "matrix": [2, 7], "x": 7, "y": 2},
+ {"label": "k", "matrix": [2, 8], "x": 8, "y": 2},
+ {"label": "l", "matrix": [2, 9], "x": 9, "y": 2},
+ {"label": ";", "matrix": [2, 10], "x": 10, "y": 2},
+ {"label": "'", "matrix": [2, 11], "x": 11, "y": 2},
+ {"label": "Enter", "matrix": [2, 12], "x": 12, "y": 2},
+ {"label": "Left Shift", "matrix": [3, 0], "x": 0, "y": 3},
+ {"label": "\\", "matrix": [3, 1], "x": 1, "y": 3},
+ {"label": "z", "matrix": [3, 2], "x": 2, "y": 3},
+ {"label": "x", "matrix": [3, 3], "x": 3, "y": 3},
+ {"label": "c", "matrix": [3, 4], "x": 4, "y": 3},
+ {"label": "v", "matrix": [3, 5], "x": 5, "y": 3},
+ {"label": "b", "matrix": [3, 6], "x": 6, "y": 3},
+ {"label": "n", "matrix": [3, 7], "x": 7, "y": 3},
+ {"label": "m", "matrix": [3, 8], "x": 8, "y": 3},
+ {"label": ",", "matrix": [3, 9], "x": 9, "y": 3},
+ {"label": ".", "matrix": [3, 10], "x": 10, "y": 3},
+ {"label": "Up", "matrix": [3, 11], "x": 11, "y": 3},
+ {"label": "/", "matrix": [3, 12], "x": 12, "y": 3},
+ {"label": "Ctrl", "matrix": [4, 0], "x": 0, "y": 4},
+ {"label": "Menu", "matrix": [4, 1], "x": 1, "y": 4},
+ {"label": "Lower", "matrix": [4, 2], "x": 2, "y": 4},
+ {"label": "Alt", "matrix": [4, 3], "x": 3, "y": 4},
+ {"label": "Raise", "matrix": [4, 4], "x": 4, "y": 4},
+ {"label": "Space", "matrix": [4, 5], "x": 5, "y": 4},
+ {"label": "Space", "matrix": [4, 6], "x": 6, "y": 4},
+ {"label": "Space", "matrix": [4, 7], "x": 7, "y": 4},
+ {"label": "Alt Gr", "matrix": [4, 8], "x": 8, "y": 4},
+ {"label": "Right Shift", "matrix": [4, 9], "x": 9, "y": 4},
+ {"label": "Left", "matrix": [4, 10], "x": 10, "y": 4},
+ {"label": "Down", "matrix": [4, 11], "x": 11, "y": 4},
+ {"label": "Right", "matrix": [4, 12], "x": 12, "y": 4}
+ ]
+ }
+ }
}
diff --git a/keyboards/mlego/m65/rev1/mcuconf.h b/keyboards/mlego/m65/rev1/mcuconf.h
index 6ba4f72b40..a8e4fbb319 100644
--- a/keyboards/mlego/m65/rev1/mcuconf.h
+++ b/keyboards/mlego/m65/rev1/mcuconf.h
@@ -1,23 +1,5 @@
-/* Copyright 2021-2022 QMK
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/*
- * This file was auto-generated by:
- * `qmk chibios-confmigrate -i keyboards/m65/rev1/mcuconf.h -r platforms/chibios/STM32_F103_STM32DUINO/configs/mcuconf.h`
- */
+// Copyright 2020-2022 alin m elena (@alinelena)
+// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
diff --git a/keyboards/mlego/m65/rev1/rules.mk b/keyboards/mlego/m65/rev1/rules.mk
index fa351eadba..48c755b14e 100644
--- a/keyboards/mlego/m65/rev1/rules.mk
+++ b/keyboards/mlego/m65/rev1/rules.mk
@@ -1,13 +1 @@
-# Build Options
-# change yes to no to disable
-#
-BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
-MOUSEKEY_ENABLE = yes # Mouse keys
-EXTRAKEY_ENABLE = yes # Audio control and System control
-CONSOLE_ENABLE = no # Console for debug
-COMMAND_ENABLE = no # Commands for debug and configuration
-NKRO_ENABLE = yes # Enable N-Key Rollover
-BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
-RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
-AUDIO_ENABLE = no # Audio output
-ENCODER_ENABLE = yes # Enable encoder
+#intentionally blanck
diff --git a/keyboards/mlego/m65/rev2/board.h b/keyboards/mlego/m65/rev2/board.h
index e0d0865776..15ec270599 100644
--- a/keyboards/mlego/m65/rev2/board.h
+++ b/keyboards/mlego/m65/rev2/board.h
@@ -1,18 +1,5 @@
-/* Copyright 2021-2022 Alin M Elena <alinm.elena@gmail.com>
-
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
+// Copyright 2020-2022 alin m elena (@alinelena)
+// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#include_next <board.h>
diff --git a/keyboards/mlego/m65/rev2/config.h b/keyboards/mlego/m65/rev2/config.h
index 666d296ede..32f7b4eca3 100644
--- a/keyboards/mlego/m65/rev2/config.h
+++ b/keyboards/mlego/m65/rev2/config.h
@@ -1,23 +1,10 @@
-/*
-Copyright 2021-2022 Alin M Elena <alinm.elena@gmail.com>
-
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
+// Copyright 2020-2023 alin m elena (@alinelena)
+// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
-#define RGBLIGHT_LAYERS
+#define LED_RSE_PIN B13
+#define LED_LWR_PIN B12
#define EEPROM_PAGE_SIZE
#define FEE_PAGE_SIZE 0x800
diff --git a/keyboards/mlego/m65/rev2/info.json b/keyboards/mlego/m65/rev2/info.json
index 8d822ae4e7..e8575e23e8 100644
--- a/keyboards/mlego/m65/rev2/info.json
+++ b/keyboards/mlego/m65/rev2/info.json
@@ -1,42 +1,133 @@
{
- "usb": {
- "pid": "0x6061",
- "device_version": "0.0.2"
- },
- "matrix_pins": {
- "cols": ["A10", "A15", "B3", "B4", "B5", "B9", "B8", "B7", "B6", "C15", "A0", "A7", "B10"],
- "rows": ["B11", "B0", "B1", "A2", "A3"]
- },
+ "manufacturer": "Alin Elena",
+ "keyboard_name": "mlego/m65 rev2",
+ "maintainer": "alin elena",
+ "bootloader": "stm32duino",
"diode_direction": "COL2ROW",
"encoder": {
"rotary": [
{"pin_a": "A8", "pin_b": "A9"}
]
},
+ "features": {
+ "audio": false,
+ "backlight": false,
+ "bootmagic": true,
+ "command": true,
+ "console": false,
+ "encoder": true,
+ "extrakey": true,
+ "mousekey": true,
+ "nkro": true,
+ "rgblight": true
+ },
"indicators": {
"caps_lock": "B2",
- "num_lock": "B12",
- "scroll_lock": "B13"
+ "on_state": 0
},
+ "matrix_pins": {
+ "cols": ["A10", "A15", "B3", "B4", "B5", "B9", "B8", "B7", "B6", "C15", "A0", "A7", "B10"],
+ "rows": ["B11", "B0", "B1", "A2", "A3"]
+ },
+ "processor": "STM32F103",
"rgblight": {
- "saturation_steps": 8,
- "led_count": 20,
"animations": {
+ "alternating": true,
"breathing": true,
+ "christmas": true,
+ "knight": true,
"rainbow_mood": true,
"rainbow_swirl": true,
+ "rgb_test": true,
"snake": true,
- "knight": true,
- "christmas": true,
"static_gradient": true,
- "rgb_test": true,
- "alternating": true,
"twinkle": true
- }
+ },
+ "hue_steps": 8,
+ "layers": {
+ "enabled": true
+ },
+ "led_count": 20,
+ "saturation_steps": 8
+ },
+ "url": "https://gitlab.com/m-lego/m65",
+ "usb": {
+ "device_version": "0.0.2",
+ "pid": "0x6061",
+ "vid": "0xBABA"
},
"ws2812": {
"pin": "B15"
},
- "processor": "STM32F103", // GD32F303CCT6
- "bootloader": "stm32duino"
+ "layouts": {
+ "LAYOUT_ortho_5x13": {
+ "layout": [
+ {"label": "Esc", "matrix": [0, 0], "x": 0, "y": 0},
+ {"label": "1", "matrix": [0, 1], "x": 1, "y": 0},
+ {"label": "2", "matrix": [0, 2], "x": 2, "y": 0},
+ {"label": "3", "matrix": [0, 3], "x": 3, "y": 0},
+ {"label": "4", "matrix": [0, 4], "x": 4, "y": 0},
+ {"label": "5", "matrix": [0, 5], "x": 5, "y": 0},
+ {"label": "6", "matrix": [0, 6], "x": 6, "y": 0},
+ {"label": "7", "matrix": [0, 7], "x": 7, "y": 0},
+ {"label": "8", "matrix": [0, 8], "x": 8, "y": 0},
+ {"label": "9", "matrix": [0, 9], "x": 9, "y": 0},
+ {"label": "0", "matrix": [0, 10], "x": 10, "y": 0},
+ {"label": "-", "matrix": [0, 11], "x": 11, "y": 0},
+ {"label": "Backspace", "matrix": [0, 12], "x": 12, "y": 0},
+ {"label": "Tab", "matrix": [1, 0], "x": 0, "y": 1},
+ {"label": "q", "matrix": [1, 1], "x": 1, "y": 1},
+ {"label": "w", "matrix": [1, 2], "x": 2, "y": 1},
+ {"label": "e", "matrix": [1, 3], "x": 3, "y": 1},
+ {"label": "r", "matrix": [1, 4], "x": 4, "y": 1},
+ {"label": "t", "matrix": [1, 5], "x": 5, "y": 1},
+ {"label": "y", "matrix": [1, 6], "x": 6, "y": 1},
+ {"label": "u", "matrix": [1, 7], "x": 7, "y": 1},
+ {"label": "i", "matrix": [1, 8], "x": 8, "y": 1},
+ {"label": "o", "matrix": [1, 9], "x": 9, "y": 1},
+ {"label": "p", "matrix": [1, 10], "x": 10, "y": 1},
+ {"label": "[", "matrix": [1, 11], "x": 11, "y": 1},
+ {"label": "]", "matrix": [1, 12], "x": 12, "y": 1},
+ {"label": "#", "matrix": [2, 0], "x": 0, "y": 2},
+ {"label": "a", "matrix": [2, 1], "x": 1, "y": 2},
+ {"label": "s", "matrix": [2, 2], "x": 2, "y": 2},
+ {"label": "d", "matrix": [2, 3], "x": 3, "y": 2},
+ {"label": "f", "matrix": [2, 4], "x": 4, "y": 2},
+ {"label": "g", "matrix": [2, 5], "x": 5, "y": 2},
+ {"label": "h", "matrix": [2, 6], "x": 6, "y": 2},
+ {"label": "j", "matrix": [2, 7], "x": 7, "y": 2},
+ {"label": "k", "matrix": [2, 8], "x": 8, "y": 2},
+ {"label": "l", "matrix": [2, 9], "x": 9, "y": 2},
+ {"label": ";", "matrix": [2, 10], "x": 10, "y": 2},
+ {"label": "'", "matrix": [2, 11], "x": 11, "y": 2},
+ {"label": "Enter", "matrix": [2, 12], "x": 12, "y": 2},
+ {"label": "Left Shift", "matrix": [3, 0], "x": 0, "y": 3},
+ {"label": "\\", "matrix": [3, 1], "x": 1, "y": 3},
+ {"label": "z", "matrix": [3, 2], "x": 2, "y": 3},
+ {"label": "x", "matrix": [3, 3], "x": 3, "y": 3},
+ {"label": "c", "matrix": [3, 4], "x": 4, "y": 3},
+ {"label": "v", "matrix": [3, 5], "x": 5, "y": 3},
+ {"label": "b", "matrix": [3, 6], "x": 6, "y": 3},
+ {"label": "n", "matrix": [3, 7], "x": 7, "y": 3},
+ {"label": "m", "matrix": [3, 8], "x": 8, "y": 3},
+ {"label": ",", "matrix": [3, 9], "x": 9, "y": 3},
+ {"label": ".", "matrix": [3, 10], "x": 10, "y": 3},
+ {"label": "Up", "matrix": [3, 11], "x": 11, "y": 3},
+ {"label": "/", "matrix": [3, 12], "x": 12, "y": 3},
+ {"label": "Ctrl", "matrix": [4, 0], "x": 0, "y": 4},
+ {"label": "Menu", "matrix": [4, 1], "x": 1, "y": 4},
+ {"label": "Lower", "matrix": [4, 2], "x": 2, "y": 4},
+ {"label": "Alt", "matrix": [4, 3], "x": 3, "y": 4},
+ {"label": "Raise", "matrix": [4, 4], "x": 4, "y": 4},
+ {"label": "Space", "matrix": [4, 5], "x": 5, "y": 4},
+ {"label": "Space", "matrix": [4, 6], "x": 6, "y": 4},
+ {"label": "Space", "matrix": [4, 7], "x": 7, "y": 4},
+ {"label": "Alt Gr", "matrix": [4, 8], "x": 8, "y": 4},
+ {"label": "Right Shift", "matrix": [4, 9], "x": 9, "y": 4},
+ {"label": "Left", "matrix": [4, 10], "x": 10, "y": 4},
+ {"label": "Down", "matrix": [4, 11], "x": 11, "y": 4},
+ {"label": "Right", "matrix": [4, 12], "x": 12, "y": 4}
+ ]
+ }
+ }
}
diff --git a/keyboards/mlego/m65/rev2/mcuconf.h b/keyboards/mlego/m65/rev2/mcuconf.h
index 6ba4f72b40..a8e4fbb319 100644
--- a/keyboards/mlego/m65/rev2/mcuconf.h
+++ b/keyboards/mlego/m65/rev2/mcuconf.h
@@ -1,23 +1,5 @@
-/* Copyright 2021-2022 QMK
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/*
- * This file was auto-generated by:
- * `qmk chibios-confmigrate -i keyboards/m65/rev1/mcuconf.h -r platforms/chibios/STM32_F103_STM32DUINO/configs/mcuconf.h`
- */
+// Copyright 2020-2022 alin m elena (@alinelena)
+// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
diff --git a/keyboards/mlego/m65/rev2/rules.mk b/keyboards/mlego/m65/rev2/rules.mk
index 51070f9718..9a795b953e 100644
--- a/keyboards/mlego/m65/rev2/rules.mk
+++ b/keyboards/mlego/m65/rev2/rules.mk
@@ -1,13 +1 @@
-# Build Options
-# change yes to no to disable
-#
-BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
-MOUSEKEY_ENABLE = yes # Mouse keys
-EXTRAKEY_ENABLE = yes # Audio control and System control
-CONSOLE_ENABLE = yes # Console for debug
-COMMAND_ENABLE = yes # Commands for debug and configuration
-NKRO_ENABLE = yes # Enable N-Key Rollover
-BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
-RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
-AUDIO_ENABLE = no # Audio output
-ENCODER_ENABLE = yes # Enable encoder
+#blank purpose
diff --git a/keyboards/mlego/m65/rev3/config.h b/keyboards/mlego/m65/rev3/config.h
index 847dd11823..1b351c540a 100644
--- a/keyboards/mlego/m65/rev3/config.h
+++ b/keyboards/mlego/m65/rev3/config.h
@@ -1,20 +1,7 @@
-/*
-Copyright 2021-2022 Alin M Elena <alinm.elena@gmail.com>
-
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
+// Copyright 2021-2023 alin m elena (@alinelena)
+// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
-#define RGBLIGHT_LAYERS
+#define LED_RSE_PIN B13
+#define LED_LWR_PIN B12
diff --git a/keyboards/mlego/m65/rev3/halconf.h b/keyboards/mlego/m65/rev3/halconf.h
index 89815e23b7..decadcb011 100644
--- a/keyboards/mlego/m65/rev3/halconf.h
+++ b/keyboards/mlego/m65/rev3/halconf.h
@@ -1,23 +1,5 @@
-/* Copyright 2020 QMK
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/*
- * This file was auto-generated by:
- * `qmk chibios-confmigrate -i keyboards/zvecr/zv48/f401/halconf.h -r platforms/chibios/common/configs/halconf.h`
- */
+// Copyright 2020-2022 alin m elena (@alinelena)
+// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
diff --git a/keyboards/mlego/m65/rev3/info.json b/keyboards/mlego/m65/rev3/info.json
index 4f9b866565..d48d52d9d9 100644
--- a/keyboards/mlego/m65/rev3/info.json
+++ b/keyboards/mlego/m65/rev3/info.json
@@ -1,43 +1,134 @@
{
- "usb": {
- "pid": "0x6062",
- "device_version": "0.0.1"
- },
- "matrix_pins": {
- "cols": ["A10", "A15", "B3", "B4", "B5", "B9", "B8", "B7", "A1", "A2", "A3", "A4", "B1"],
- "rows": ["B10", "A5", "A6", "A7", "B0"]
- },
+ "manufacturer": "Alin Elena",
+ "keyboard_name": "mlego/m65 rev3",
+ "maintainer": "alin elena",
+ "board": "BLACKPILL_STM32_F401",
+ "bootloader": "tinyuf2",
"diode_direction": "COL2ROW",
"encoder": {
"rotary": [
{"pin_a": "A0", "pin_b": "B6"}
]
},
+ "features": {
+ "audio": false,
+ "backlight": false,
+ "bootmagic": true,
+ "command": false,
+ "console": false,
+ "encoder": true,
+ "extrakey": true,
+ "mousekey": true,
+ "nkro": true,
+ "rgblight": true
+ },
"indicators": {
"caps_lock": "C13",
- "num_lock": "B12",
- "scroll_lock": "B13"
+ "on_state": 0
+ },
+ "matrix_pins": {
+ "cols": ["A10", "A15", "B3", "B4", "B5", "B9", "B8", "B7", "A1", "A2", "A3", "A4", "B1"],
+ "rows": ["B10", "A5", "A6", "A7", "B0"]
},
+ "processor": "STM32F401",
"rgblight": {
- "saturation_steps": 8,
- "led_count": 20,
"animations": {
+ "alternating": true,
"breathing": true,
+ "christmas": true,
+ "knight": true,
"rainbow_mood": true,
"rainbow_swirl": true,
+ "rgb_test": true,
"snake": true,
- "knight": true,
- "christmas": true,
"static_gradient": true,
- "rgb_test": true,
- "alternating": true,
"twinkle": true
- }
+ },
+ "hue_steps": 8,
+ "layers": {
+ "enabled": true
+ },
+ "led_count": 20,
+ "saturation_steps": 8
+ },
+ "url": "https://gitlab.com/m-lego/m65",
+ "usb": {
+ "device_version": "0.0.1",
+ "pid": "0x6062",
+ "vid": "0xBABA"
},
"ws2812": {
"pin": "B15"
},
- "processor": "STM32F401",
- "bootloader": "tinyuf2",
- "board": "BLACKPILL_STM32_F401"
+ "layouts": {
+ "LAYOUT_ortho_5x13": {
+ "layout": [
+ {"label": "Esc", "matrix": [0, 0], "x": 0, "y": 0},
+ {"label": "1", "matrix": [0, 1], "x": 1, "y": 0},
+ {"label": "2", "matrix": [0, 2], "x": 2, "y": 0},
+ {"label": "3", "matrix": [0, 3], "x": 3, "y": 0},
+ {"label": "4", "matrix": [0, 4], "x": 4, "y": 0},
+ {"label": "5", "matrix": [0, 5], "x": 5, "y": 0},
+ {"label": "6", "matrix": [0, 6], "x": 6, "y": 0},
+ {"label": "7", "matrix": [0, 7], "x": 7, "y": 0},
+ {"label": "8", "matrix": [0, 8], "x": 8, "y": 0},
+ {"label": "9", "matrix": [0, 9], "x": 9, "y": 0},
+ {"label": "0", "matrix": [0, 10], "x": 10, "y": 0},
+ {"label": "-", "matrix": [0, 11], "x": 11, "y": 0},
+ {"label": "Backspace", "matrix": [0, 12], "x": 12, "y": 0},
+ {"label": "Tab", "matrix": [1, 0], "x": 0, "y": 1},
+ {"label": "q", "matrix": [1, 1], "x": 1, "y": 1},
+ {"label": "w", "matrix": [1, 2], "x": 2, "y": 1},
+ {"label": "e", "matrix": [1, 3], "x": 3, "y": 1},
+ {"label": "r", "matrix": [1, 4], "x": 4, "y": 1},
+ {"label": "t", "matrix": [1, 5], "x": 5, "y": 1},
+ {"label": "y", "matrix": [1, 6], "x": 6, "y": 1},
+ {"label": "u", "matrix": [1, 7], "x": 7, "y": 1},
+ {"label": "i", "matrix": [1, 8], "x": 8, "y": 1},
+ {"label": "o", "matrix": [1, 9], "x": 9, "y": 1},
+ {"label": "p", "matrix": [1, 10], "x": 10, "y": 1},
+ {"label": "[", "matrix": [1, 11], "x": 11, "y": 1},
+ {"label": "]", "matrix": [1, 12], "x": 12, "y": 1},
+ {"label": "#", "matrix": [2, 0], "x": 0, "y": 2},
+ {"label": "a", "matrix": [2, 1], "x": 1, "y": 2},
+ {"label": "s", "matrix": [2, 2], "x": 2, "y": 2},
+ {"label": "d", "matrix": [2, 3], "x": 3, "y": 2},
+ {"label": "f", "matrix": [2, 4], "x": 4, "y": 2},
+ {"label": "g", "matrix": [2, 5], "x": 5, "y": 2},
+ {"label": "h", "matrix": [2, 6], "x": 6, "y": 2},
+ {"label": "j", "matrix": [2, 7], "x": 7, "y": 2},
+ {"label": "k", "matrix": [2, 8], "x": 8, "y": 2},
+ {"label": "l", "matrix": [2, 9], "x": 9, "y": 2},
+ {"label": ";", "matrix": [2, 10], "x": 10, "y": 2},
+ {"label": "'", "matrix": [2, 11], "x": 11, "y": 2},
+ {"label": "Enter", "matrix": [2, 12], "x": 12, "y": 2},
+ {"label": "Left Shift", "matrix": [3, 0], "x": 0, "y": 3},
+ {"label": "\\", "matrix": [3, 1], "x": 1, "y": 3},
+ {"label": "z", "matrix": [3, 2], "x": 2, "y": 3},
+ {"label": "x", "matrix": [3, 3], "x": 3, "y": 3},
+ {"label": "c", "matrix": [3, 4], "x": 4, "y": 3},
+ {"label": "v", "matrix": [3, 5], "x": 5, "y": 3},
+ {"label": "b", "matrix": [3, 6], "x": 6, "y": 3},
+ {"label": "n", "matrix": [3, 7], "x": 7, "y": 3},
+ {"label": "m", "matrix": [3, 8], "x": 8, "y": 3},
+ {"label": ",", "matrix": [3, 9], "x": 9, "y": 3},
+ {"label": ".", "matrix": [3, 10], "x": 10, "y": 3},
+ {"label": "Up", "matrix": [3, 11], "x": 11, "y": 3},
+ {"label": "/", "matrix": [3, 12], "x": 12, "y": 3},
+ {"label": "Ctrl", "matrix": [4, 0], "x": 0, "y": 4},
+ {"label": "Menu", "matrix": [4, 1], "x": 1, "y": 4},
+ {"label": "Lower", "matrix": [4, 2], "x": 2, "y": 4},
+ {"label": "Alt", "matrix": [4, 3], "x": 3, "y": 4},
+ {"label": "Raise", "matrix": [4, 4], "x": 4, "y": 4},
+ {"label": "Space", "matrix": [4, 5], "x": 5, "y": 4},
+ {"label": "Space", "matrix": [4, 6], "x": 6, "y": 4},
+ {"label": "Space", "matrix": [4, 7], "x": 7, "y": 4},
+ {"label": "Alt Gr", "matrix": [4, 8], "x": 8, "y": 4},
+ {"label": "Right Shift", "matrix": [4, 9], "x": 9, "y": 4},
+ {"label": "Left", "matrix": [4, 10], "x": 10, "y": 4},
+ {"label": "Down", "matrix": [4, 11], "x": 11, "y": 4},
+ {"label": "Right", "matrix": [4, 12], "x": 12, "y": 4}
+ ]
+ }
+ }
}
diff --git a/keyboards/mlego/m65/rev3/mcuconf.h b/keyboards/mlego/m65/rev3/mcuconf.h
index 4d90ec07ea..05c6656170 100644
--- a/keyboards/mlego/m65/rev3/mcuconf.h
+++ b/keyboards/mlego/m65/rev3/mcuconf.h
@@ -1,23 +1,5 @@
-/* Copyright 2020 QMK
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/*
- * This file was auto-generated by:
- * `qmk chibios-confmigrate -i keyboards/zvecr/zv48/f401/mcuconf.h -r platforms/chibios/BLACKPILL_STM32_F401/configs/mcuconf.h`
- */
+// Copyright 2020-2022 alin m elena (@alinelena)
+// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
diff --git a/keyboards/mlego/m65/rev3/rules.mk b/keyboards/mlego/m65/rev3/rules.mk
index fa351eadba..8b4c953989 100644
--- a/keyboards/mlego/m65/rev3/rules.mk
+++ b/keyboards/mlego/m65/rev3/rules.mk
@@ -1,13 +1 @@
-# Build Options
-# change yes to no to disable
-#
-BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
-MOUSEKEY_ENABLE = yes # Mouse keys
-EXTRAKEY_ENABLE = yes # Audio control and System control
-CONSOLE_ENABLE = no # Console for debug
-COMMAND_ENABLE = no # Commands for debug and configuration
-NKRO_ENABLE = yes # Enable N-Key Rollover
-BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
-RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
-AUDIO_ENABLE = no # Audio output
-ENCODER_ENABLE = yes # Enable encoder
+#blank on purpose
diff --git a/keyboards/mlego/m65/rev4/config.h b/keyboards/mlego/m65/rev4/config.h
index d0475aabaf..181ebc565a 100644
--- a/keyboards/mlego/m65/rev4/config.h
+++ b/keyboards/mlego/m65/rev4/config.h
@@ -1,28 +1,14 @@
-/*
-Copyright 2021-2022 Alin M Elena <alinm.elena@gmail.com>
-
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
+// Copyright 2021-2023 alin m elena (@alinelena)
+// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
-#define RGBLIGHT_LAYERS
+#define LED_RSE_PIN B13
+#define LED_LWR_PIN B12
#ifdef OLED_ENABLE
-# define OLED_DISPLAY_128X32
-#define I2C1_SCL_PIN B9
-#define I2C1_SDA_PIN B8
-#define OLED_BRIGHTNESS 128
-#define OLED_FONT_H "keyboards/mlego/m65/lib/glcdfont.c"
+# define I2C1_SCL_PIN B9
+# define I2C1_SDA_PIN B8
+# define OLED_BRIGHTNESS 128
+# define OLED_FONT_H "keyboards/mlego/m65/lib/glcdfont.c"
#endif
diff --git a/keyboards/mlego/m65/rev4/halconf.h b/keyboards/mlego/m65/rev4/halconf.h
index c1a060ad71..99f8ae4bf1 100644
--- a/keyboards/mlego/m65/rev4/halconf.h
+++ b/keyboards/mlego/m65/rev4/halconf.h
@@ -1,23 +1,5 @@
-/* Copyright 2020 QMK
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/*
- * This file was auto-generated by:
- * `qmk chibios-confmigrate -i keyboards/zvecr/zv48/f401/halconf.h -r platforms/chibios/common/configs/halconf.h`
- */
+// Copyright 2021-2022 alin m elena (@alinelena)
+// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
diff --git a/keyboards/mlego/m65/rev4/info.json b/keyboards/mlego/m65/rev4/info.json
index a97c734ff8..56fed15317 100644
--- a/keyboards/mlego/m65/rev4/info.json
+++ b/keyboards/mlego/m65/rev4/info.json
@@ -1,43 +1,136 @@
{
- "usb": {
- "pid": "0x6062",
- "device_version": "0.0.2"
- },
- "matrix_pins": {
- "cols": ["B14", "A8", "A10", "A15", "B3", "B4", "B5", "B7", "A1", "A2", "A3", "A4", "B1"],
- "rows": ["B10", "A5", "A6", "A7", "B0"]
- },
+ "manufacturer": "Alin Elena",
+ "keyboard_name": "mlego/m65 rev4",
+ "maintainer": "alin elena",
+ "board": "BLACKPILL_STM32_F401",
+ "bootloader": "tinyuf2",
"diode_direction": "COL2ROW",
"encoder": {
"rotary": [
{"pin_a": "A0", "pin_b": "B6"}
]
},
+ "features": {
+ "audio": false,
+ "backlight": false,
+ "bootmagic": true,
+ "command": false,
+ "console": true,
+ "encoder": true,
+ "extrakey": true,
+ "mousekey": true,
+ "nkro": true,
+ "oled": true,
+ "rgblight": true,
+ "wpm": true
+ },
"indicators": {
"caps_lock": "C13",
- "num_lock": "B12",
- "scroll_lock": "B13"
+ "on_state": 0
+ },
+ "matrix_pins": {
+ "cols": ["B14", "A8", "A10", "A15", "B3", "B4", "B5", "B7", "A1", "A2", "A3", "A4", "B1"],
+ "rows": ["B10", "A5", "A6", "A7", "B0"]
},
+ "processor": "STM32F401",
"rgblight": {
- "saturation_steps": 8,
- "led_count": 20,
"animations": {
+ "alternating": true,
"breathing": true,
+ "christmas": true,
+ "knight": true,
"rainbow_mood": true,
"rainbow_swirl": true,
+ "rgb_test": true,
"snake": true,
- "knight": true,
- "christmas": true,
"static_gradient": true,
- "rgb_test": true,
- "alternating": true,
"twinkle": true
- }
+ },
+ "hue_steps": 8,
+ "layers": {
+ "enabled": true
+ },
+ "led_count": 20,
+ "saturation_steps": 8
+ },
+ "url": "https://gitlab.com/m-lego/m65",
+ "usb": {
+ "device_version": "0.0.2",
+ "pid": "0x6062",
+ "vid": "0xBABA"
},
"ws2812": {
"pin": "B15"
},
- "processor": "STM32F401",
- "bootloader": "tinyuf2",
- "board": "BLACKPILL_STM32_F401"
+ "layouts": {
+ "LAYOUT_ortho_5x13": {
+ "layout": [
+ {"label": "Esc", "matrix": [0, 0], "x": 0, "y": 0},
+ {"label": "1", "matrix": [0, 1], "x": 1, "y": 0},
+ {"label": "2", "matrix": [0, 2], "x": 2, "y": 0},
+ {"label": "3", "matrix": [0, 3], "x": 3, "y": 0},
+ {"label": "4", "matrix": [0, 4], "x": 4, "y": 0},
+ {"label": "5", "matrix": [0, 5], "x": 5, "y": 0},
+ {"label": "6", "matrix": [0, 6], "x": 6, "y": 0},
+ {"label": "7", "matrix": [0, 7], "x": 7, "y": 0},
+ {"label": "8", "matrix": [0, 8], "x": 8, "y": 0},
+ {"label": "9", "matrix": [0, 9], "x": 9, "y": 0},
+ {"label": "0", "matrix": [0, 10], "x": 10, "y": 0},
+ {"label": "-", "matrix": [0, 11], "x": 11, "y": 0},
+ {"label": "Backspace", "matrix": [0, 12], "x": 12, "y": 0},
+ {"label": "Tab", "matrix": [1, 0], "x": 0, "y": 1},
+ {"label": "q", "matrix": [1, 1], "x": 1, "y": 1},
+ {"label": "w", "matrix": [1, 2], "x": 2, "y": 1},
+ {"label": "e", "matrix": [1, 3], "x": 3, "y": 1},
+ {"label": "r", "matrix": [1, 4], "x": 4, "y": 1},
+ {"label": "t", "matrix": [1, 5], "x": 5, "y": 1},
+ {"label": "y", "matrix": [1, 6], "x": 6, "y": 1},
+ {"label": "u", "matrix": [1, 7], "x": 7, "y": 1},
+ {"label": "i", "matrix": [1, 8], "x": 8, "y": 1},
+ {"label": "o", "matrix": [1, 9], "x": 9, "y": 1},
+ {"label": "p", "matrix": [1, 10], "x": 10, "y": 1},
+ {"label": "[", "matrix": [1, 11], "x": 11, "y": 1},
+ {"label": "]", "matrix": [1, 12], "x": 12, "y": 1},
+ {"label": "#", "matrix": [2, 0], "x": 0, "y": 2},
+ {"label": "a", "matrix": [2, 1], "x": 1, "y": 2},
+ {"label": "s", "matrix": [2, 2], "x": 2, "y": 2},
+ {"label": "d", "matrix": [2, 3], "x": 3, "y": 2},
+ {"label": "f", "matrix": [2, 4], "x": 4, "y": 2},
+ {"label": "g", "matrix": [2, 5], "x": 5, "y": 2},
+ {"label": "h", "matrix": [2, 6], "x": 6, "y": 2},
+ {"label": "j", "matrix": [2, 7], "x": 7, "y": 2},
+ {"label": "k", "matrix": [2, 8], "x": 8, "y": 2},
+ {"label": "l", "matrix": [2, 9], "x": 9, "y": 2},
+ {"label": ";", "matrix": [2, 10], "x": 10, "y": 2},
+ {"label": "'", "matrix": [2, 11], "x": 11, "y": 2},
+ {"label": "Enter", "matrix": [2, 12], "x": 12, "y": 2},
+ {"label": "Left Shift", "matrix": [3, 0], "x": 0, "y": 3},
+ {"label": "\\", "matrix": [3, 1], "x": 1, "y": 3},
+ {"label": "z", "matrix": [3, 2], "x": 2, "y": 3},
+ {"label": "x", "matrix": [3, 3], "x": 3, "y": 3},
+ {"label": "c", "matrix": [3, 4], "x": 4, "y": 3},
+ {"label": "v", "matrix": [3, 5], "x": 5, "y": 3},
+ {"label": "b", "matrix": [3, 6], "x": 6, "y": 3},
+ {"label": "n", "matrix": [3, 7], "x": 7, "y": 3},
+ {"label": "m", "matrix": [3, 8], "x": 8, "y": 3},
+ {"label": ",", "matrix": [3, 9], "x": 9, "y": 3},
+ {"label": ".", "matrix": [3, 10], "x": 10, "y": 3},
+ {"label": "Up", "matrix": [3, 11], "x": 11, "y": 3},
+ {"label": "/", "matrix": [3, 12], "x": 12, "y": 3},
+ {"label": "Ctrl", "matrix": [4, 0], "x": 0, "y": 4},
+ {"label": "Menu", "matrix": [4, 1], "x": 1, "y": 4},
+ {"label": "Lower", "matrix": [4, 2], "x": 2, "y": 4},
+ {"label": "Alt", "matrix": [4, 3], "x": 3, "y": 4},
+ {"label": "Raise", "matrix": [4, 4], "x": 4, "y": 4},
+ {"label": "Space", "matrix": [4, 5], "x": 5, "y": 4},
+ {"label": "Space", "matrix": [4, 6], "x": 6, "y": 4},
+ {"label": "Space", "matrix": [4, 7], "x": 7, "y": 4},
+ {"label": "Alt Gr", "matrix": [4, 8], "x": 8, "y": 4},
+ {"label": "Right Shift", "matrix": [4, 9], "x": 9, "y": 4},
+ {"label": "Left", "matrix": [4, 10], "x": 10, "y": 4},
+ {"label": "Down", "matrix": [4, 11], "x": 11, "y": 4},
+ {"label": "Right", "matrix": [4, 12], "x": 12, "y": 4}
+ ]
+ }
+ }
}
diff --git a/keyboards/mlego/m65/rev4/mcuconf.h b/keyboards/mlego/m65/rev4/mcuconf.h
index ba1cd32fd3..abae5f94bd 100644
--- a/keyboards/mlego/m65/rev4/mcuconf.h
+++ b/keyboards/mlego/m65/rev4/mcuconf.h
@@ -1,23 +1,5 @@
-/* Copyright 2020 QMK
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/*
- * This file was auto-generated by:
- * `qmk chibios-confmigrate -i keyboards/zvecr/zv48/f401/mcuconf.h -r platforms/chibios/BLACKPILL_STM32_F401/configs/mcuconf.h`
- */
+// Copyright 2021-2022 alin m elena (@alinelena)
+// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
diff --git a/keyboards/mlego/m65/rev4/rules.mk b/keyboards/mlego/m65/rev4/rules.mk
index 3e44c80fe0..e69de29bb2 100644
--- a/keyboards/mlego/m65/rev4/rules.mk
+++ b/keyboards/mlego/m65/rev4/rules.mk
@@ -1,15 +0,0 @@
-# Build Options
-# change yes to no to disable
-#
-BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
-MOUSEKEY_ENABLE = yes # Mouse keys
-EXTRAKEY_ENABLE = yes # Audio control and System control
-CONSOLE_ENABLE = no # Console for debug
-COMMAND_ENABLE = no # Commands for debug and configuration
-NKRO_ENABLE = yes # Enable N-Key Rollover
-BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
-RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
-AUDIO_ENABLE = no # Audio output
-ENCODER_ENABLE = yes # Enable encoder
-OLED_ENABLE = yes # Enable OLED
-WPM_ENABLE = yes # Enable WPM Counter
diff --git a/keyboards/mode/m65ha_alpha/info.json b/keyboards/mode/m65ha_alpha/info.json
index a7afd10663..3332182127 100644
--- a/keyboards/mode/m65ha_alpha/info.json
+++ b/keyboards/mode/m65ha_alpha/info.json
@@ -13,6 +13,9 @@
"rows": ["A7", "A10", "D2", "C12", "B1", "C11"]
},
"diode_direction": "COL2ROW",
+ "eeprom": {
+ "driver": "i2c"
+ },
"indicators": {
"caps_lock": "A6"
},
diff --git a/keyboards/mode/m65ha_alpha/rules.mk b/keyboards/mode/m65ha_alpha/rules.mk
index da4b493847..942e6c1061 100644
--- a/keyboards/mode/m65ha_alpha/rules.mk
+++ b/keyboards/mode/m65ha_alpha/rules.mk
@@ -10,5 +10,3 @@ NKRO_ENABLE = no # Enable N-Key Rollover
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
AUDIO_ENABLE = no # Audio output
-EEPROM_DRIVER = i2c
-
diff --git a/keyboards/mode/m65hi_alpha/info.json b/keyboards/mode/m65hi_alpha/info.json
index 1899284f8c..a2a4416efe 100644
--- a/keyboards/mode/m65hi_alpha/info.json
+++ b/keyboards/mode/m65hi_alpha/info.json
@@ -13,6 +13,9 @@
"rows": ["A7", "A10", "D2", "C12", "B1", "C11"]
},
"diode_direction": "COL2ROW",
+ "eeprom": {
+ "driver": "i2c"
+ },
"indicators": {
"caps_lock": "A6"
},
diff --git a/keyboards/mode/m65hi_alpha/rules.mk b/keyboards/mode/m65hi_alpha/rules.mk
index da4b493847..942e6c1061 100644
--- a/keyboards/mode/m65hi_alpha/rules.mk
+++ b/keyboards/mode/m65hi_alpha/rules.mk
@@ -10,5 +10,3 @@ NKRO_ENABLE = no # Enable N-Key Rollover
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
AUDIO_ENABLE = no # Audio output
-EEPROM_DRIVER = i2c
-
diff --git a/keyboards/mode/m65s/info.json b/keyboards/mode/m65s/info.json
index 0a0c93f3f8..b187502736 100644
--- a/keyboards/mode/m65s/info.json
+++ b/keyboards/mode/m65s/info.json
@@ -16,6 +16,9 @@
"rows": ["A3", "B14", "B15", "C9", "C6", "C11"]
},
"diode_direction": "COL2ROW",
+ "eeprom": {
+ "driver": "i2c"
+ },
"indicators": {
"caps_lock": "C8"
},
diff --git a/keyboards/mode/m65s/rules.mk b/keyboards/mode/m65s/rules.mk
index 5dd8d547ab..4d827a4254 100644
--- a/keyboards/mode/m65s/rules.mk
+++ b/keyboards/mode/m65s/rules.mk
@@ -10,5 +10,3 @@ NKRO_ENABLE = no # Enable N-Key Rollover
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
AUDIO_ENABLE = no # Audio output
-EEPROM_DRIVER = i2c
-
diff --git a/keyboards/mode/m75h/config.h b/keyboards/mode/m75h/config.h
deleted file mode 100644
index c6d7d037ec..0000000000
--- a/keyboards/mode/m75h/config.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- Copyright 2020 Álvaro "Gondolindrim" Volpato <alvaro.volpato@usp.br>
-
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General 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 WEAR_LEVELING_LOGICAL_SIZE 2048
-#define WEAR_LEVELING_BACKING_SIZE 4096
diff --git a/keyboards/mode/m75h/info.json b/keyboards/mode/m75h/info.json
index f57aac383e..8314dbf99d 100644
--- a/keyboards/mode/m75h/info.json
+++ b/keyboards/mode/m75h/info.json
@@ -13,6 +13,11 @@
"rows": ["C5", "B0", "B14", "B15", "A8", "C9", "A15"]
},
"diode_direction": "COL2ROW",
+ "eeprom": {
+ "wear_leveling": {
+ "backing_size": 4096
+ }
+ },
"processor": "STM32F401",
"bootloader": "stm32-dfu",
"layout_aliases": {
diff --git a/keyboards/mode/m75s/config.h b/keyboards/mode/m75s/config.h
index 7fdb18d26a..4d3a7d5ca4 100644
--- a/keyboards/mode/m75s/config.h
+++ b/keyboards/mode/m75s/config.h
@@ -20,6 +20,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define BACKLIGHT_DEFAULT_LEVEL 20
#define BACKLIGHT_PWM_DRIVER PWMD3
#define BACKLIGHT_PWM_CHANNEL 1
-
-#define WEAR_LEVELING_LOGICAL_SIZE 2048
-#define WEAR_LEVELING_BACKING_SIZE 4096
diff --git a/keyboards/mode/m75s/info.json b/keyboards/mode/m75s/info.json
index bf60aebd56..df4d1ab451 100644
--- a/keyboards/mode/m75s/info.json
+++ b/keyboards/mode/m75s/info.json
@@ -13,6 +13,11 @@
"rows": ["C5", "B0", "B14", "B15", "C7", "C9", "A15"]
},
"diode_direction": "COL2ROW",
+ "eeprom": {
+ "wear_leveling": {
+ "backing_size": 4096
+ }
+ },
"backlight": {
"pin": "C6",
"levels": 20,
diff --git a/keyboards/molecule/rules.mk b/keyboards/molecule/rules.mk
index 35280e22e3..06a8f490ee 100755
--- a/keyboards/molecule/rules.mk
+++ b/keyboards/molecule/rules.mk
@@ -15,4 +15,4 @@ AUDIO_ENABLE = no # Audio output
POINTING_DEVICE_ENABLE = yes
POINTING_DEVICE_DRIVER = custom
SRC += adns.c
-QUANTUM_LIB_SRC += spi_master.c
+SPI_DRIVER_REQUIRED = yes
diff --git a/keyboards/monsgeek/m1/config.h b/keyboards/monsgeek/m1/config.h
index 3e44e815fa..9c25c9f21c 100644
--- a/keyboards/monsgeek/m1/config.h
+++ b/keyboards/monsgeek/m1/config.h
@@ -16,9 +16,6 @@
#pragma once
-/* Use 6 dynamic keymap layers */
-#define DYNAMIC_KEYMAP_LAYER_COUNT 6
-
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE
/* Locking resynchronize hack */
@@ -34,12 +31,11 @@
#define SPI_MOSI_PAL_MODE 5
#define EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN C12
-#define WEAR_LEVELING_BACKING_SIZE (8 * 1024)
/* I2C Config for LED Driver */
-#define DRIVER_COUNT 2
-#define DRIVER_ADDR_1 0b1110100
-#define DRIVER_ADDR_2 0b1110111
+#define SNLED27351_DRIVER_COUNT 2
+#define DRIVER_ADDR_1 SNLED27351_I2C_ADDRESS_GND
+#define DRIVER_ADDR_2 SNLED27351_I2C_ADDRESS_VDDIO
#define I2C1_OPMODE OPMODE_I2C
#define I2C1_CLOCK_SPEED 400000 /* 400000 */
diff --git a/keyboards/monsgeek/m1/info.json b/keyboards/monsgeek/m1/info.json
index 4de1803818..23d3d714c6 100644
--- a/keyboards/monsgeek/m1/info.json
+++ b/keyboards/monsgeek/m1/info.json
@@ -26,13 +26,23 @@
"rows": ["B15", "C6", "C7", "C8", "C9", "A8"]
},
"diode_direction": "ROW2COL",
+ "dynamic_keymap": {
+ "layer_count": 6
+ },
+ "eeprom": {
+ "driver": "wear_leveling",
+ "wear_leveling": {
+ "driver": "spi_flash",
+ "backing_size": 8192
+ }
+ },
"encoder": {
"rotary": [
{"pin_a": "B14", "pin_b": "B13"}
]
},
"rgb_matrix": {
- "driver": "is31fl3733",
+ "driver": "snled27351",
"max_brightness": 200,
"val_steps": 20,
"animations": {
diff --git a/keyboards/monsgeek/m1/m1.c b/keyboards/monsgeek/m1/m1.c
index ac00bb4e2b..b85adbc0bf 100644
--- a/keyboards/monsgeek/m1/m1.c
+++ b/keyboards/monsgeek/m1/m1.c
@@ -17,8 +17,8 @@
#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to IS31 manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | R location
* | | G location
diff --git a/keyboards/monsgeek/m1/rules.mk b/keyboards/monsgeek/m1/rules.mk
index b753f0682e..6e7633bfe0 100644
--- a/keyboards/monsgeek/m1/rules.mk
+++ b/keyboards/monsgeek/m1/rules.mk
@@ -1,6 +1 @@
-# Build Options
-# change yes to no to disable
-#
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = spi_flash
-
+# This file intentionally left blank
diff --git a/keyboards/monsgeek/m5/config.h b/keyboards/monsgeek/m5/config.h
index 6d43bd4f26..ddb700870b 100644
--- a/keyboards/monsgeek/m5/config.h
+++ b/keyboards/monsgeek/m5/config.h
@@ -16,9 +16,6 @@
#pragma once
-/* Use 5 dynamic keymap layers */
-#define DYNAMIC_KEYMAP_LAYER_COUNT 6
-
/* LED Indicators */
#define LED_WIN_LOCK_PIN C11
@@ -35,12 +32,11 @@
#define SPI_MOSI_PAL_MODE 5
#define EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN C12
-#define WEAR_LEVELING_BACKING_SIZE (8 * 1024)
/* I2C Config for LED Driver */
-#define DRIVER_COUNT 2
-#define DRIVER_ADDR_1 0b1110100
-#define DRIVER_ADDR_2 0b1110111
+#define SNLED27351_DRIVER_COUNT 2
+#define DRIVER_ADDR_1 SNLED27351_I2C_ADDRESS_GND
+#define DRIVER_ADDR_2 SNLED27351_I2C_ADDRESS_VDDIO
#define I2C1_OPMODE OPMODE_I2C
#define I2C1_CLOCK_SPEED 400000 /* 400000 */
#define I2C1_SCL_PAL_MODE 4
diff --git a/keyboards/monsgeek/m5/info.json b/keyboards/monsgeek/m5/info.json
index 4e504b8663..e4ecba91ce 100644
--- a/keyboards/monsgeek/m5/info.json
+++ b/keyboards/monsgeek/m5/info.json
@@ -25,12 +25,22 @@
"rows": ["B15", "C6", "C7", "C8", "C9", "A8"]
},
"diode_direction": "ROW2COL",
+ "dynamic_keymap": {
+ "layer_count": 6
+ },
+ "eeprom": {
+ "driver": "wear_leveling",
+ "wear_leveling": {
+ "driver": "spi_flash",
+ "backing_size": 8192
+ }
+ },
"indicators": {
"num_lock":"A15",
"caps_lock": "C10"
},
"rgb_matrix": {
- "driver": "is31fl3733",
+ "driver": "snled27351",
"max_brightness": 180,
"animations": {
"breathing": true,
diff --git a/keyboards/monsgeek/m5/m5.c b/keyboards/monsgeek/m5/m5.c
index 7dbc3111bf..83dd4b6b79 100644
--- a/keyboards/monsgeek/m5/m5.c
+++ b/keyboards/monsgeek/m5/m5.c
@@ -17,8 +17,8 @@
#include "quantum.h"
// clang-format off
#ifdef RGB_MATRIX_ENABLE
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to IS31 manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | R location
* | | G location
diff --git a/keyboards/monsgeek/m5/rules.mk b/keyboards/monsgeek/m5/rules.mk
index 24d5f6f52e..6e7633bfe0 100644
--- a/keyboards/monsgeek/m5/rules.mk
+++ b/keyboards/monsgeek/m5/rules.mk
@@ -1,2 +1 @@
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = spi_flash
+# This file intentionally left blank
diff --git a/keyboards/monsgeek/m6/config.h b/keyboards/monsgeek/m6/config.h
index 5fcd897429..b10220db17 100644
--- a/keyboards/monsgeek/m6/config.h
+++ b/keyboards/monsgeek/m6/config.h
@@ -16,9 +16,6 @@
#pragma once
-/* Use 6 dynamic keymap layers */
-#define DYNAMIC_KEYMAP_LAYER_COUNT 6
-
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE
/* Locking resynchronize hack */
@@ -32,12 +29,11 @@
#define SPI_MOSI_PAL_MODE 5
#define EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN C12
-#define WEAR_LEVELING_BACKING_SIZE (8 * 1024)
/* I2C Config for LED Driver */
-#define DRIVER_COUNT 2
-#define DRIVER_ADDR_1 0b1110100
-#define DRIVER_ADDR_2 0b1110111
+#define SNLED27351_DRIVER_COUNT 2
+#define DRIVER_ADDR_1 SNLED27351_I2C_ADDRESS_GND
+#define DRIVER_ADDR_2 SNLED27351_I2C_ADDRESS_VDDIO
#define I2C1_SCL_PAL_MODE 4
#define I2C1_OPMODE OPMODE_I2C
#define I2C1_CLOCK_SPEED 400000 /* 400000 */
diff --git a/keyboards/monsgeek/m6/info.json b/keyboards/monsgeek/m6/info.json
index d23d2f8322..3ec89cc497 100644
--- a/keyboards/monsgeek/m6/info.json
+++ b/keyboards/monsgeek/m6/info.json
@@ -25,8 +25,18 @@
"rows": ["C6", "C7", "C8", "C9", "A8"]
},
"diode_direction": "ROW2COL",
+ "dynamic_keymap": {
+ "layer_count": 6
+ },
+ "eeprom": {
+ "driver": "wear_leveling",
+ "wear_leveling": {
+ "driver": "spi_flash",
+ "backing_size": 8192
+ }
+ },
"rgb_matrix": {
- "driver": "is31fl3733",
+ "driver": "snled27351",
"max_brightness": 200,
"val_steps": 20,
"animations": {
diff --git a/keyboards/monsgeek/m6/m6.c b/keyboards/monsgeek/m6/m6.c
index 1823d865cc..dc20a9916f 100644
--- a/keyboards/monsgeek/m6/m6.c
+++ b/keyboards/monsgeek/m6/m6.c
@@ -17,8 +17,8 @@
#include "quantum.h"
// clang-format off
#ifdef RGB_MATRIX_ENABLE
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to IS31 manual for these locations
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
* driver
* | R location
* | | G location
diff --git a/keyboards/monsgeek/m6/rules.mk b/keyboards/monsgeek/m6/rules.mk
index 24d5f6f52e..6e7633bfe0 100644
--- a/keyboards/monsgeek/m6/rules.mk
+++ b/keyboards/monsgeek/m6/rules.mk
@@ -1,2 +1 @@
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = spi_flash
+# This file intentionally left blank
diff --git a/keyboards/moon/rules.mk b/keyboards/moon/rules.mk
index 804580d1f9..676f0971a2 100644
--- a/keyboards/moon/rules.mk
+++ b/keyboards/moon/rules.mk
@@ -16,4 +16,4 @@ CUSTOM_MATRIX = yes
VPATH += drivers/gpio
SRC += pca9555.c matrix.c
-QUANTUM_LIB_SRC += i2c_master.c
+I2C_DRIVER_REQUIRED = yes
diff --git a/keyboards/moonlander/config.h b/keyboards/moonlander/config.h
index 389f97d696..7c20260162 100644
--- a/keyboards/moonlander/config.h
+++ b/keyboards/moonlander/config.h
@@ -65,10 +65,10 @@
//#define NO_ACTION_TAPPING
//#define NO_ACTION_ONESHOT
-#define DRIVER_ADDR_1 0b1110100
-#define DRIVER_ADDR_2 0b1110111
+#define DRIVER_ADDR_1 IS31FL3731_I2C_ADDRESS_GND
+#define DRIVER_ADDR_2 IS31FL3731_I2C_ADDRESS_VCC
-#define DRIVER_COUNT 2
+#define IS31FL3731_DRIVER_COUNT 2
#define DRIVER_1_LED_TOTAL 36
#define DRIVER_2_LED_TOTAL 36
#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
@@ -142,10 +142,6 @@
#define FIRMWARE_VERSION_SIZE 17
#define DYNAMIC_KEYMAP_EEPROM_ADDR (EECONFIG_SIZE + FIRMWARE_VERSION_SIZE)
-#ifdef EEPROM_I2C
-# define DYNAMIC_KEYMAP_EEPROM_MAX_ADDR 16383
-# define DYNAMIC_KEYMAP_LAYER_COUNT 8
-#endif
#define AUDIO_PIN A5
#define AUDIO_PIN_ALT A4
diff --git a/keyboards/moonlander/info.json b/keyboards/moonlander/info.json
index acbb278a33..1a7982ed57 100644
--- a/keyboards/moonlander/info.json
+++ b/keyboards/moonlander/info.json
@@ -8,13 +8,22 @@
"pid": "0x1969",
"device_version": "0.0.1"
},
+ "dynamic_keymap": {
+ "layer_count": 8
+ },
+ "eeprom": {
+ "driver": "i2c"
+ },
"rgb_matrix": {
"driver": "is31fl3731"
},
"processor": "STM32F303",
"bootloader": "stm32-dfu",
+ "layout_aliases": {
+ "LAYOUT_moonlander": "LAYOUT"
+ },
"layouts": {
- "LAYOUT_moonlander": {
+ "LAYOUT": {
"layout": [
{"matrix": [0, 0], "x": 0, "y": 0.375},
{"matrix": [0, 1], "x": 1, "y": 0.375},
diff --git a/keyboards/moonlander/keymaps/default/keymap.c b/keyboards/moonlander/keymaps/default/keymap.c
index 754227262f..ad7705eff8 100644
--- a/keyboards/moonlander/keymaps/default/keymap.c
+++ b/keyboards/moonlander/keymaps/default/keymap.c
@@ -33,7 +33,7 @@ enum custom_keycodes {
// clang-format off
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [BASE] = LAYOUT_moonlander(
+ [BASE] = LAYOUT(
KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
KC_DEL, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_HYPR, KC_MEH, KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN), LGUI_T(KC_QUOT),
@@ -42,7 +42,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_SPC, KC_BSPC, KC_LGUI, KC_LALT, KC_TAB, KC_ENT
),
- [SYMB] = LAYOUT_moonlander(
+ [SYMB] = LAYOUT(
VRSN, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
_______, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, _______, _______, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12,
_______, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRV, _______, _______, KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, _______,
@@ -51,7 +51,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
RGB_HUD, RGB_VAD, RGB_HUI, TOGGLE_LAYER_COLOR,_______, _______
),
- [MDIA] = LAYOUT_moonlander(
+ [MDIA] = LAYOUT(
LED_LEVEL,_______,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, QK_BOOT,
_______, _______, _______, KC_MS_U, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY,
diff --git a/keyboards/moonlander/keymaps/via/keymap.c b/keyboards/moonlander/keymaps/via/keymap.c
index 91ad0d1bf7..4b1e4c83e7 100644
--- a/keyboards/moonlander/keymaps/via/keymap.c
+++ b/keyboards/moonlander/keymaps/via/keymap.c
@@ -29,7 +29,7 @@ enum layers {
// clang-format off
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [BASE] = LAYOUT_moonlander(
+ [BASE] = LAYOUT(
KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
KC_DEL, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_HYPR, KC_MEH, KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN), LGUI_T(KC_QUOT),
@@ -38,7 +38,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_SPC, KC_BSPC, KC_LGUI, KC_LALT, KC_TAB, KC_ENT
),
- [SYMB] = LAYOUT_moonlander(
+ [SYMB] = LAYOUT(
QK_KB_0, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
_______, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, _______, _______, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12,
_______, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRV, _______, _______, KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, _______,
@@ -47,7 +47,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
RGB_HUD, RGB_VAD, RGB_HUI, _______, _______, _______
),
- [MDIA] = LAYOUT_moonlander(
+ [MDIA] = LAYOUT(
QK_KB_1, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, QK_BOOT,
_______, _______, _______, KC_MS_U, _______, _______, _______, _______, _______, _______, _______, _______, _______, EE_CLR,
_______, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY,
@@ -55,7 +55,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, _______, _______, KC_BTN1, KC_BTN2, _______, _______, KC_VOLU, KC_VOLD, KC_MUTE, _______, _______,
_______, _______, _______, _______, _______, _______
),
- [3] = LAYOUT_moonlander(
+ [3] = LAYOUT(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
@@ -63,7 +63,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______
),
- [4] = LAYOUT_moonlander(
+ [4] = LAYOUT(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
@@ -71,7 +71,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______
),
- [5] = LAYOUT_moonlander(
+ [5] = LAYOUT(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
@@ -79,7 +79,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______
),
- [6] = LAYOUT_moonlander(
+ [6] = LAYOUT(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
@@ -87,7 +87,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______
),
- [7] = LAYOUT_moonlander(
+ [7] = LAYOUT(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
diff --git a/keyboards/moonlander/moonlander.c b/keyboards/moonlander/moonlander.c
index 4146fc7afb..5b52ba7031 100644
--- a/keyboards/moonlander/moonlander.c
+++ b/keyboards/moonlander/moonlander.c
@@ -172,7 +172,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/keyboards/moonlander/rules.mk b/keyboards/moonlander/rules.mk
index 12987afdac..204c5940e4 100644
--- a/keyboards/moonlander/rules.mk
+++ b/keyboards/moonlander/rules.mk
@@ -14,10 +14,9 @@ AUDIO_DRIVER = dac_additive
CUSTOM_MATRIX = lite
SWAP_HANDS_ENABLE = yes
RGB_MATRIX_ENABLE = yes
-EEPROM_DRIVER = i2c
#project specific files
SRC += matrix.c
-QUANTUM_LIB_SRC += i2c_master.c
+I2C_DRIVER_REQUIRED = yes
MOUSE_SHARED_EP = no
diff --git a/keyboards/mt/mt64rgb/config.h b/keyboards/mt/mt64rgb/config.h
index 0d877306e3..d13942461f 100644
--- a/keyboards/mt/mt64rgb/config.h
+++ b/keyboards/mt/mt64rgb/config.h
@@ -22,9 +22,9 @@
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 160
#define RGB_MATRIX_LED_PROCESS_LIMIT 20
#define RGB_MATRIX_LED_FLUSH_LIMIT 26
-#define DRIVER_ADDR_1 0b1010000
+#define DRIVER_ADDR_1 IS31FL3733_I2C_ADDRESS_GND_GND
-#define DRIVER_COUNT 1
+#define IS31FL3733_DRIVER_COUNT 1
#define RGB_MATRIX_LED_COUNT 64
diff --git a/keyboards/mt/mt64rgb/mt64rgb.c b/keyboards/mt/mt64rgb/mt64rgb.c
index 9fb25fb168..7a6831f6d0 100644
--- a/keyboards/mt/mt64rgb/mt64rgb.c
+++ b/keyboards/mt/mt64rgb/mt64rgb.c
@@ -16,7 +16,7 @@
#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3733_led_t PROGMEM g_is31fl3733_leds[RGB_MATRIX_LED_COUNT] = {
/* Refer to IS31 manual for these locations
* driver
* | R location
diff --git a/keyboards/mt/mt84/config.h b/keyboards/mt/mt84/config.h
index 67aae9a1fd..d76fdd262e 100644
--- a/keyboards/mt/mt84/config.h
+++ b/keyboards/mt/mt84/config.h
@@ -22,12 +22,12 @@
#define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_CYCLE_ALL
#define RGB_MATRIX_LED_PROCESS_LIMIT 20
#define RGB_MATRIX_LED_FLUSH_LIMIT 26
- #define DRIVER_ADDR_1 0b1010000
- #define DRIVER_ADDR_2 0b1011111
+ #define DRIVER_ADDR_1 IS31FL3737_I2C_ADDRESS_GND
+ #define DRIVER_ADDR_2 IS31FL3737_I2C_ADDRESS_VCC
- #define DRIVER_COUNT 2
+ #define IS31FL3737_DRIVER_COUNT 2
#define DRIVER_1_LED_TOTAL 44
#define DRIVER_2_LED_TOTAL 40
#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
diff --git a/keyboards/mt/mt84/mt84.c b/keyboards/mt/mt84/mt84.c
index fcbf65cf46..fd4811e63a 100644
--- a/keyboards/mt/mt84/mt84.c
+++ b/keyboards/mt/mt84/mt84.c
@@ -16,7 +16,7 @@
#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3737_led_t PROGMEM g_is31fl3737_leds[RGB_MATRIX_LED_COUNT] = {
/* Refer to IS31 manual for these locations
* driver
* | R location
diff --git a/keyboards/mt/split75/rules.mk b/keyboards/mt/split75/rules.mk
index f616b9400e..b0c02543b1 100644
--- a/keyboards/mt/split75/rules.mk
+++ b/keyboards/mt/split75/rules.mk
@@ -12,4 +12,4 @@ RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
# custom matrix setup
CUSTOM_MATRIX = lite
SRC = matrix.c
-QUANTUM_LIB_SRC += i2c_master.c
+I2C_DRIVER_REQUIRED = yes
diff --git a/keyboards/mxss/config.h b/keyboards/mxss/config.h
index bfa2338678..704da3911a 100644
--- a/keyboards/mxss/config.h
+++ b/keyboards/mxss/config.h
@@ -21,6 +21,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define LOCKING_SUPPORT_ENABLE
/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE
-
-// FLED config takes up 1 byte, stored color count takes 1, stored colors take up to 8
-#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 10
diff --git a/keyboards/mxss/info.json b/keyboards/mxss/info.json
index 7b24c46717..0846157457 100644
--- a/keyboards/mxss/info.json
+++ b/keyboards/mxss/info.json
@@ -8,6 +8,15 @@
"pid": "0x5353",
"device_version": "0.0.1"
},
+ "features": {
+ "bootmagic": true,
+ "command": false,
+ "console": false,
+ "extrakey": true,
+ "mousekey": true,
+ "nkro": false,
+ "rgblight": true
+ },
"rgblight": {
"saturation_steps": 8,
"brightness_steps": 8,
diff --git a/keyboards/mxss/keymaps/default/keymap.c b/keyboards/mxss/keymaps/default/keymap.c
index 06e73f4688..8f7c2bd2a5 100644
--- a/keyboards/mxss/keymaps/default/keymap.c
+++ b/keyboards/mxss/keymaps/default/keymap.c
@@ -14,21 +14,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include QMK_KEYBOARD_H
-#include "mxss_frontled.h"
-
-hs_set caps_color = { .hue = 0, .sat = 255 };
-
-// Colors for layers
-// Format: {hue, saturation}
-// {0, 0} to turn off the LED
-// Add additional rows to handle more layers
-hs_set layer_colors[4] = {
- [0] = {.hue = 0, .sat = 0}, // Color for Layer 0
- [1] = {.hue = 86, .sat = 255}, // Color for Layer 1
- [2] = {.hue = 36, .sat = 255}, // Color for Layer 2
- [3] = {.hue = 185, .sat = 255}, // Color for Layer 3
-};
-size_t lc_size = ARRAY_SIZE(layer_colors);
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
LAYOUT( /* Base */
@@ -41,7 +26,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
LAYOUT( /* L1 */
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL,
- KC_TRNS, KC_MPLY, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PSCR, FLED_VAD, FLED_VAI, FLED_MOD, RGB_VAI,
+ KC_TRNS, KC_MPLY, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PSCR, KC_TRNS, KC_TRNS, KC_TRNS, RGB_VAI,
QK_BOOT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_TRNS, KC_TRNS, KC_TRNS, RGB_VAD,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, RGB_MOD, RGB_SAI, RGB_TOG,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_HUD, RGB_SAD, RGB_HUI
diff --git a/keyboards/mxss/keymaps/via/keymap.c b/keyboards/mxss/keymaps/via/keymap.c
index 3591f4d3f9..a9ce5f5bd1 100644
--- a/keyboards/mxss/keymaps/via/keymap.c
+++ b/keyboards/mxss/keymaps/via/keymap.c
@@ -14,7 +14,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include QMK_KEYBOARD_H
-#include "mxss_frontled.h"
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
LAYOUT_all( /* L0 */
@@ -26,7 +25,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),
LAYOUT_all( /* L1 */
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_MPLY, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PSCR, FLED_VAD, FLED_VAI, FLED_MOD, RGB_VAI,
+ KC_TRNS, KC_MPLY, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PSCR, KC_TRNS, KC_TRNS, KC_TRNS, RGB_VAI,
QK_BOOT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_VAD,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, RGB_MOD, RGB_SAI, RGB_TOG,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_HUD, RGB_SAD, RGB_HUI
diff --git a/keyboards/mxss/mxss.c b/keyboards/mxss/mxss.c
deleted file mode 100644
index 021eb1de4e..0000000000
--- a/keyboards/mxss/mxss.c
+++ /dev/null
@@ -1,73 +0,0 @@
-/* Copyright 2020 Jumail Mundekkat / MxBlue
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- * EEPROM management code from ../cannonkeys/stm32f072/keyboard.c
- */
-
-#include "quantum.h"
-#include "eeprom.h"
-#include "mxss_frontled.h"
-#include "version.h" // for QMK_BUILDDATE used in EEPROM magic
-
-void via_init_kb(void) {
- fled_init();
-}
-
-void matrix_init_kb(void) {
- // If VIA is disabled, we still need to load settings
- // Call via_init_kb() the same way as via_init(), with setting
- // EEPROM valid afterwards.
-#ifndef VIA_ENABLE
- fled_init();
- via_eeprom_set_valid(true);
-#endif // VIA_ENABLE
-
- matrix_init_user();
-}
-
-bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
- // Handle custom keycodes for front LED operation
- process_record_fled(keycode, record);
- return process_record_user(keycode, record);
-}
-
-bool led_update_kb(led_t led_state) {
- fled_lock_update(led_state);
- return led_update_user(led_state);
-}
-
-layer_state_t layer_state_set_kb(layer_state_t state) {
- fled_layer_update(state);
- return layer_state_set_user(state);
-}
-
-// Fallback eeprom functions if VIA is not enabled
-#ifndef VIA_ENABLE
-
-// Sets VIA/keyboard level usage of EEPROM to valid/invalid
-// Keyboard level code (eg. via_init_kb()) should not call this
-void via_eeprom_set_valid(bool valid)
-{
- char *p = QMK_BUILDDATE; // e.g. "2019-11-05-11:29:54"
- uint8_t magic0 = ( ( p[2] & 0x0F ) << 4 ) | ( p[3] & 0x0F );
- uint8_t magic1 = ( ( p[5] & 0x0F ) << 4 ) | ( p[6] & 0x0F );
- uint8_t magic2 = ( ( p[8] & 0x0F ) << 4 ) | ( p[9] & 0x0F );
-
- eeprom_update_byte( (void*)VIA_EEPROM_MAGIC_ADDR+0, valid ? magic0 : 0xFF);
- eeprom_update_byte( (void*)VIA_EEPROM_MAGIC_ADDR+1, valid ? magic1 : 0xFF);
- eeprom_update_byte( (void*)VIA_EEPROM_MAGIC_ADDR+2, valid ? magic2 : 0xFF);
-}
-
-#endif
diff --git a/keyboards/mxss/mxss_frontled.c b/keyboards/mxss/mxss_frontled.c
deleted file mode 100644
index 2ab9a27bea..0000000000
--- a/keyboards/mxss/mxss_frontled.c
+++ /dev/null
@@ -1,278 +0,0 @@
-/* Copyright 2020 Jumail Mundekkat / MxBlue
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- * Extended from the work done by fcoury: https://github.com/qmk/qmk_firmware/pull/4915
- */
-
-#include "mxss_frontled.h"
-#include "eeprom.h"
-#include "rgblight.h"
-#include "via.h"
-#include "version.h" // for QMK_BUILDDATE used in EEPROM magic
-
-// Variables for controlling front LED application
-uint8_t fled_mode; // Mode for front LEDs
-uint8_t fled_val; // Brightness for front leds (0 - 255)
-LED_TYPE fleds[2]; // Front LED rgb values for indicator mode use
-
-// Layer indicator colors
-__attribute__ ((weak))
-hs_set layer_colors[FRONTLED_COLOR_MAXCNT];
-
-// Caps lock indicator color
-__attribute__ ((weak))
-hs_set caps_color;
-
-__attribute__ ((weak))
-size_t lc_size = ARRAY_SIZE(layer_colors);
-
-void fled_init(void) {
- // This checks both an EEPROM reset (from bootmagic lite, keycodes)
- // and also firmware build date (from via_eeprom_is_valid())
- if (eeconfig_is_enabled()) {
- fled_load_conf();
- // Else, default config
- } else {
- // Default mode/brightness
- fled_mode = FLED_RGB;
- fled_val = 10 * FLED_VAL_STEP;
-
- // Default colors
- caps_color.hue = 0;
- caps_color.sat = 255;
- layer_colors[0].hue = 0;
- layer_colors[0].sat = 0;
- layer_colors[1].hue = 86;
- layer_colors[1].sat = 255;
- layer_colors[2].hue = 36;
- layer_colors[2].sat = 255;
- layer_colors[3].hue = 185;
- layer_colors[3].sat = 255;
-
- fled_update_conf(); // Store default config to EEPROM
- }
-
- // Set default values for leds
- setrgb(0, 0, 0, &fleds[0]);
- setrgb(0, 0, 0, &fleds[1]);
-
- // Handle lighting for indicator mode
- if (fled_mode == FLED_INDI) {
- fled_lock_update(host_keyboard_led_state());
- fled_layer_update(layer_state);
- }
-}
-
-void process_record_fled(uint16_t keycode, keyrecord_t *record) {
- // Handle custom keycodes for front LED operation
- switch (keycode) {
- case FLED_MOD: // Change between front LED operation modes (off, indicator, RGB)
- if (record->event.pressed)
- fled_mode_cycle();
- break;
-
- case FLED_VAI: // Increase the brightness of the front LEDs by FLED_VAL_STEP
- if (record->event.pressed)
- fled_val_increase();
- break;
-
- case FLED_VAD: // Decrease the brightness of the front LEDs by FLED_VAL_STEP
- if (record->event.pressed)
- fled_val_decrease();
- break;
-
- default:
- break; // Process all other keycodes normally
- }
-
- return;
-}
-
-void fled_load_conf(void) {
- // Load config
- fled_config fled_conf;
- fled_conf.raw = eeprom_read_byte(FRONTLED_CONF_ADDR);
- fled_mode = fled_conf.mode;
- fled_val = fled_conf.val * FLED_VAL_STEP;
-
- // Load color data
- uint8_t stored_cnt = eeprom_read_byte(FRONTLED_COLOR_CNT_ADDR);
- uint16_t *color_ptr = FRONTLED_COLOR_ADDR;
- caps_color.raw = eeprom_read_word(color_ptr); // Should always store at least 1 color
- for (uint8_t i = 1; i < stored_cnt; i++) {
- if (i == lc_size) // Can't load more layers than we have available
- break;
- layer_colors[i].raw = eeprom_read_word(&color_ptr[i]);
- }
- layer_colors[0].raw = 0; // hue = sat = 0 for layer 0
-}
-
-// Store current front led config in EEPROM
-void fled_update_conf(void)
-{
- // Create storage struct and set values
- fled_config conf;
- conf.mode = fled_mode;
-
- // Small hack to ensure max value is stored correctly
- if (fled_val == 255)
- conf.val = 256 / FLED_VAL_STEP;
- else
- conf.val = fled_val / FLED_VAL_STEP;
-
- // Store config
- eeprom_update_byte(FRONTLED_CONF_ADDR, conf.raw);
-
- // Store color data
- uint16_t *color_ptr = FRONTLED_COLOR_ADDR;
- eeprom_update_word(color_ptr, caps_color.raw);
- // Start from 1, layer 0 is not modifiable and therefore not persisted
- uint8_t i = 1;
- for (; i < lc_size; i++) {
- if (i == FRONTLED_COLOR_MAXCNT) // Can't store more than the EEPROM we have available
- break;
- eeprom_update_word(&color_ptr[i], layer_colors[i].raw);
- }
- eeprom_update_byte(FRONTLED_COLOR_CNT_ADDR, i); // For safety, store the count of colors stored
-}
-
-// Custom keycode functions
-
-void fled_mode_cycle(void)
-{
- // FLED -> FLED_RGB -> FLED_INDI
- switch (fled_mode) {
- case FLED_OFF:
- fled_mode = FLED_RGB;
- rgblight_timer_enable();
- break;
-
- case FLED_RGB:
- fled_mode = FLED_INDI;
- break;
-
- case FLED_INDI:
- fled_mode = FLED_OFF;
- break;
- }
-
- // Update stored config
- fled_update_conf();
- rgblight_set();
-}
-
-void fled_val_increase(void)
-{
- // Increase val by FLED_VAL_STEP, handling the upper edge case
- if (fled_val + FLED_VAL_STEP > 255)
- fled_val = 255;
- else
- fled_val += FLED_VAL_STEP;
-
- // Update stored config
- fled_update_conf();
-
- // Update and set LED state
- if (fled_mode == FLED_INDI) {
- fled_layer_update(layer_state);
- fled_lock_update(host_keyboard_led_state());
- } else {
- rgblight_set();
- }
-}
-
-void fled_val_decrease(void)
-{
- // Decrease val by FLED_VAL_STEP, handling the lower edge case
- if (fled_val - FLED_VAL_STEP > 255)
- fled_val = 255;
- else
- fled_val -= FLED_VAL_STEP;
-
- // Update stored config
- fled_update_conf();
-
- // Update and set LED state
- if (fled_mode == FLED_INDI) {
- fled_layer_update(layer_state);
- fled_lock_update(host_keyboard_led_state());
- } else {
- rgblight_set();
- }
-}
-
-void fled_layer_update(layer_state_t state) {
- // Determine and set colour of layer LED according to current layer
- // if hue = sat = 0, leave LED off
- uint8_t layer = get_highest_layer(state);
-
- if (layer < lc_size && !(layer_colors[layer].hue == 0 && layer_colors[layer].sat == 0)) {
- sethsv(layer_colors[layer].hue, layer_colors[layer].sat, fled_val, &fleds[1]);
- } else {
- setrgb(0, 0, 0, &fleds[1]);
- }
-}
-
-void fled_lock_update(led_t led_state) {
- // Set indicator LED appropriately, whether it is used or not
- if (led_state.caps_lock) {
- sethsv(caps_color.hue, caps_color.sat, fled_val, &fleds[0]);
- } else {
- setrgb(0, 0, 0, &fleds[0]);
- }
-
- rgblight_set();
-}
-
-void set_fled_layer_color(uint8_t layer, hs_set hs) {
- // Update layer colors and refresh LEDs
- layer_colors[layer] = hs;
- fled_layer_update(layer_state);
- fled_update_conf();
-}
-
-hs_set get_fled_layer_color(uint8_t layer) {
- return layer_colors[layer];
-}
-
-void set_fled_caps_color(hs_set hs) {
- // Update caplock color and refresh LEDs
- caps_color = hs;
- fled_lock_update(host_keyboard_led_state());
- fled_update_conf();
-}
-
-hs_set get_fled_caps_color(void) {
- return caps_color;
-}
-
-// Fallback eeprom functions if VIA is not enabled
-#ifndef VIA_ENABLE
-
-// Can be called in an overriding via_init_kb() to test if keyboard level code usage of
-// EEPROM is invalid and use/save defaults.
-bool via_eeprom_is_valid(void)
-{
- char *p = QMK_BUILDDATE; // e.g. "2019-11-05-11:29:54"
- uint8_t magic0 = ( ( p[2] & 0x0F ) << 4 ) | ( p[3] & 0x0F );
- uint8_t magic1 = ( ( p[5] & 0x0F ) << 4 ) | ( p[6] & 0x0F );
- uint8_t magic2 = ( ( p[8] & 0x0F ) << 4 ) | ( p[9] & 0x0F );
-
- return (eeprom_read_byte( (void*)VIA_EEPROM_MAGIC_ADDR+0 ) == magic0 &&
- eeprom_read_byte( (void*)VIA_EEPROM_MAGIC_ADDR+1 ) == magic1 &&
- eeprom_read_byte( (void*)VIA_EEPROM_MAGIC_ADDR+2 ) == magic2 );
-}
-
-#endif
diff --git a/keyboards/mxss/mxss_frontled.h b/keyboards/mxss/mxss_frontled.h
deleted file mode 100644
index c8d4199d47..0000000000
--- a/keyboards/mxss/mxss_frontled.h
+++ /dev/null
@@ -1,87 +0,0 @@
-/* Copyright 2020 Jumail Mundekkat / MxBlue
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-// EEPROM management code taken from Wilba6582
-// https://github.com/Wilba6582/qmk_firmware/blob/zeal60/keyboards/zeal60/zeal_eeprom.h
-
-#pragma once
-
-#include "quantum.h"
-#include "quantum_keycodes.h"
-#include "via.h"
-
-// RGBLED index for front LEDs
-#define RGBLIGHT_FLED1 14
-#define RGBLIGHT_FLED2 15
-
-// Brightness increase step for front LEDs
-#define FLED_VAL_STEP 8
-
-// Front LED settings
-#define FRONTLED_CONF_ADDR ((uint8_t*) VIA_EEPROM_CUSTOM_CONFIG_ADDR)
-#define FRONTLED_COLOR_CNT_ADDR (FRONTLED_CONF_ADDR + 1)
-#define FRONTLED_COLOR_ADDR ((uint16_t*)(FRONTLED_COLOR_CNT_ADDR + 1))
-
-// No point persisting more 4, VIA only allows editing of 3 + 1 for caps
-#define FRONTLED_COLOR_MAXCNT 4
-
-// Modes for front LEDs
-#define FLED_OFF 0b00
-#define FLED_INDI 0b01
-#define FLED_RGB 0b10
-#define FLED_UNDEF 0b11
-
-// Config storage format for EEPROM
-typedef union {
- uint8_t raw;
- struct {
- uint8_t mode :2;
- uint8_t val :6;
- };
-} fled_config;
-
-// Structure to store hue and saturation values
-typedef union {
- uint16_t raw;
- struct {
- uint8_t hue;
- uint8_t sat;
- };
-} hs_set;
-
-// Custom keycodes for front LED control
-enum fled_keycodes {
- FLED_MOD = QK_KB_0, // QK_KB_0 = VIA custom keycode start
- FLED_VAI,
- FLED_VAD,
-};
-
-void fled_init(void); // Run init functions for front LEDs
-void process_record_fled(uint16_t keycode, keyrecord_t* record); // Process keycodes for front LEDs
-void fled_load_conf(void); // Load front LED config from EEPROM
-void fled_update_conf(void); // Store current front LED config to EEPROM
-
-void fled_mode_cycle(void); // Cycle between the 3 modes for the front LEDs
-void fled_val_increase(void); // Increase the brightness of the front LEDs
-void fled_val_decrease(void); // Decrease the brightness of the front LEDs
-
-void fled_layer_update(layer_state_t state); // Process layer update for front LEDs
-void fled_lock_update(led_t led_state); // Process lock update for front LEDs
-
-void set_fled_layer_color(uint8_t layer, hs_set hs); // Set color for a given layer
-void set_fled_caps_color(hs_set hs); // Set color for the capslock indicator
-hs_set get_fled_caps_color(void); // Get color for the capslock indicator
-hs_set get_fled_layer_color(uint8_t layer); // Get color for a given layer
diff --git a/keyboards/mxss/readme.md b/keyboards/mxss/readme.md
index 17343be526..e22fe256ed 100644
--- a/keyboards/mxss/readme.md
+++ b/keyboards/mxss/readme.md
@@ -2,11 +2,6 @@
![MxSS - Polycarb 65% Kit for MX/SMK](https://i.imgur.com/WDTWcmU.jpg)
-### Important Note:
-**This PCB supports the VIA configurator, and this is the recommended way to configure the keymap on this keyboard. Building the firmware should only be necessary if you would like to change the colours of the front LEDs in indicator mode.**
-
-**For more information about the VIA configurator, [see here](https://caniusevia.com/).**
-
### Information:
- Case: Frosted Polycarbonate, CNC milled
@@ -24,32 +19,23 @@
- RGB underglow
- 1.5kg with plate and weight
-Keyboard Maintainer: [MxBlue](https://github.com/mxblu)
-
-Hardware Supported: Custom PCB, ATMega32u4
-
-Hardware Availability: https://geekhack.org/index.php?topic=94986.0
+* Keyboard Maintainer: [MxBlue](https://github.com/mxblu)
+* Hardware Supported: Custom PCB, ATMega32u4
+* Hardware Availability: https://geekhack.org/index.php?topic=94986.0
Make example for this keyboard (after setting up your build environment):
make mxss:default
-See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information.
-
-# Front LED Operation
+Flashing example for this keyboard:
-The MxSS PCB has 2 front RGB LEDs which has a separate brightness and mode of operation to the rest of the RGB LEDs. These are controlled through the supplied custom keycodes.
+ make mxss:default:flash
-There are 3 modes of operation:
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
- - FLED_OFF - Front LEDs stay off
- - FLED_RGB - Front LEDs are part of the standard RGB LED modes, only works correctly with rainbow modes (will fix on request)
- - FLED_INDI - Top front LED represents Caps Lock status, bottom LED represents current layer
-
-Colors for FLED_INDI mode are hardcoded as hue/saturation values, the caps lock color can be found in mxss_frontled.h, the layer colors are defined in keymap.c (see default/keymap.c for example).
+## Bootloader
-## Custom Keycodes
+Enter the bootloader in 2 ways:
- - FLED_MOD - Cycle between the 3 modes (FLED_OFF -> FLED_RGB -> FLED_INDI)
- - FLED_VAI - Increase front LED brightness
- - FLED_VAD - Decrease front LED brightness
+* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard
+* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available
diff --git a/keyboards/mxss/rgblight.c b/keyboards/mxss/rgblight.c
deleted file mode 100644
index 94f6b1dfe8..0000000000
--- a/keyboards/mxss/rgblight.c
+++ /dev/null
@@ -1,1392 +0,0 @@
-/* Copyright 2016-2017 Yang Liu
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-#include <math.h>
-#include <string.h>
-#include <stdlib.h>
-#ifdef __AVR__
-# include <avr/eeprom.h>
-# include <avr/interrupt.h>
-#endif
-#ifdef EEPROM_ENABLE
-# include "eeprom.h"
-#endif
-#include "wait.h"
-#include "progmem.h"
-#include "timer.h"
-#include "rgblight.h"
-#include "color.h"
-#include "debug.h"
-#include "led_tables.h"
-#include <lib/lib8tion/lib8tion.h>
-#ifdef VELOCIKEY_ENABLE
-# include "velocikey.h"
-#endif
-// MxSS custom
-#include "mxss_frontled.h"
-
-#ifndef MIN
-# define MIN(a, b) (((a) < (b)) ? (a) : (b))
-#endif
-
-#ifdef RGBLIGHT_SPLIT
-/* for split keyboard */
-# define RGBLIGHT_SPLIT_SET_CHANGE_MODE rgblight_status.change_flags |= RGBLIGHT_STATUS_CHANGE_MODE
-# define RGBLIGHT_SPLIT_SET_CHANGE_HSVS rgblight_status.change_flags |= RGBLIGHT_STATUS_CHANGE_HSVS
-# define RGBLIGHT_SPLIT_SET_CHANGE_MODEHSVS rgblight_status.change_flags |= (RGBLIGHT_STATUS_CHANGE_MODE | RGBLIGHT_STATUS_CHANGE_HSVS)
-# define RGBLIGHT_SPLIT_SET_CHANGE_LAYERS rgblight_status.change_flags |= RGBLIGHT_STATUS_CHANGE_LAYERS
-# define RGBLIGHT_SPLIT_SET_CHANGE_TIMER_ENABLE rgblight_status.change_flags |= RGBLIGHT_STATUS_CHANGE_TIMER
-# define RGBLIGHT_SPLIT_ANIMATION_TICK rgblight_status.change_flags |= RGBLIGHT_STATUS_ANIMATION_TICK
-#else
-# define RGBLIGHT_SPLIT_SET_CHANGE_MODE
-# define RGBLIGHT_SPLIT_SET_CHANGE_HSVS
-# define RGBLIGHT_SPLIT_SET_CHANGE_MODEHSVS
-# define RGBLIGHT_SPLIT_SET_CHANGE_LAYERS
-# define RGBLIGHT_SPLIT_SET_CHANGE_TIMER_ENABLE
-# define RGBLIGHT_SPLIT_ANIMATION_TICK
-#endif
-
-#define _RGBM_SINGLE_STATIC(sym) RGBLIGHT_MODE_##sym,
-#define _RGBM_SINGLE_DYNAMIC(sym)
-#define _RGBM_MULTI_STATIC(sym) RGBLIGHT_MODE_##sym,
-#define _RGBM_MULTI_DYNAMIC(sym)
-#define _RGBM_TMP_STATIC(sym, msym) RGBLIGHT_MODE_##sym,
-#define _RGBM_TMP_DYNAMIC(sym, msym)
-static uint8_t static_effect_table[] = {
-#include "rgblight_modes.h"
-};
-
-#define _RGBM_SINGLE_STATIC(sym) RGBLIGHT_MODE_##sym,
-#define _RGBM_SINGLE_DYNAMIC(sym) RGBLIGHT_MODE_##sym,
-#define _RGBM_MULTI_STATIC(sym) RGBLIGHT_MODE_##sym,
-#define _RGBM_MULTI_DYNAMIC(sym) RGBLIGHT_MODE_##sym,
-#define _RGBM_TMP_STATIC(sym, msym) RGBLIGHT_MODE_##msym,
-#define _RGBM_TMP_DYNAMIC(sym, msym) RGBLIGHT_MODE_##msym,
-static uint8_t mode_base_table[] = {
- 0, // RGBLIGHT_MODE_zero
-#include "rgblight_modes.h"
-};
-
-static inline int is_static_effect(uint8_t mode) { return memchr(static_effect_table, mode, sizeof(static_effect_table)) != NULL; }
-
-#ifdef RGBLIGHT_LED_MAP
-const uint8_t led_map[] PROGMEM = RGBLIGHT_LED_MAP;
-#endif
-
-#ifdef RGBLIGHT_EFFECT_STATIC_GRADIENT
-__attribute__((weak)) const uint8_t RGBLED_GRADIENT_RANGES[] PROGMEM = {255, 170, 127, 85, 64};
-#endif
-
-rgblight_config_t rgblight_config;
-rgblight_status_t rgblight_status = {.timer_enabled = false};
-bool is_rgblight_initialized = false;
-
-#ifdef RGBLIGHT_USE_TIMER
-animation_status_t animation_status = {};
-#endif
-
-#ifndef LED_ARRAY
-LED_TYPE led[RGBLED_NUM];
-# define LED_ARRAY led
-#endif
-
-#ifdef RGBLIGHT_LAYERS
-rgblight_segment_t const *const *rgblight_layers = NULL;
-#endif
-
-rgblight_ranges_t rgblight_ranges = {0, RGBLED_NUM, 0, RGBLED_NUM, RGBLED_NUM};
-
-// MxSS custom
-extern uint8_t fled_mode;
-extern uint8_t fled_val;
-extern LED_TYPE fleds[2];
-hs_set fled_hs[2];
-
-void copyrgb(LED_TYPE *src, LED_TYPE *dst) {
- dst->r = src->r;
- dst->g = src->g;
- dst->b = src->b;
-}
-
-void rgblight_set_clipping_range(uint8_t start_pos, uint8_t num_leds) {
- rgblight_ranges.clipping_start_pos = start_pos;
- rgblight_ranges.clipping_num_leds = num_leds;
-}
-
-void rgblight_set_effect_range(uint8_t start_pos, uint8_t num_leds) {
- if (start_pos >= RGBLED_NUM) return;
- if (start_pos + num_leds > RGBLED_NUM) return;
- rgblight_ranges.effect_start_pos = start_pos;
- rgblight_ranges.effect_end_pos = start_pos + num_leds;
- rgblight_ranges.effect_num_leds = num_leds;
-}
-
-__attribute__((weak)) RGB rgblight_hsv_to_rgb(HSV hsv) { return hsv_to_rgb(hsv); }
-
-void sethsv_raw(uint8_t hue, uint8_t sat, uint8_t val, LED_TYPE *led1) {
- HSV hsv = {hue, sat, val};
- // MxSS custom
- // if led is front leds, cache the hue and sat values
- if (led1 == &led[RGBLIGHT_FLED1]) {
- fled_hs[0].hue = hue;
- fled_hs[0].sat = sat;
- } else if (led1 == &led[RGBLIGHT_FLED2]) {
- fled_hs[1].hue = hue;
- fled_hs[1].sat = sat;
- }
- RGB rgb = rgblight_hsv_to_rgb(hsv);
- setrgb(rgb.r, rgb.g, rgb.b, led1);
-}
-
-void sethsv(uint8_t hue, uint8_t sat, uint8_t val, LED_TYPE *led1) { sethsv_raw(hue, sat, val > RGBLIGHT_LIMIT_VAL ? RGBLIGHT_LIMIT_VAL : val, led1); }
-
-void setrgb(uint8_t r, uint8_t g, uint8_t b, LED_TYPE *led1) {
- led1->r = r;
- led1->g = g;
- led1->b = b;
-#ifdef RGBW
- led1->w = 0;
-#endif
-}
-
-void rgblight_check_config(void) {
- /* Add some out of bound checks for RGB light config */
-
- if (rgblight_config.mode < RGBLIGHT_MODE_STATIC_LIGHT) {
- rgblight_config.mode = RGBLIGHT_MODE_STATIC_LIGHT;
- } else if (rgblight_config.mode > RGBLIGHT_MODES) {
- rgblight_config.mode = RGBLIGHT_MODES;
- }
-
- if (rgblight_config.val > RGBLIGHT_LIMIT_VAL) {
- rgblight_config.val = RGBLIGHT_LIMIT_VAL;
- }
-}
-
-uint64_t eeconfig_read_rgblight(void) {
-#ifdef EEPROM_ENABLE
- return (uint64_t)((eeprom_read_dword(EECONFIG_RGBLIGHT)) | ((uint64_t)eeprom_read_byte(EECONFIG_RGBLIGHT_EXTENDED) << 32));
-#else
- return 0;
-#endif
-}
-
-void eeconfig_update_rgblight(uint64_t val) {
-#ifdef EEPROM_ENABLE
- rgblight_check_config();
- eeprom_update_dword(EECONFIG_RGBLIGHT, val & 0xFFFFFFFF);
- eeprom_update_byte(EECONFIG_RGBLIGHT_EXTENDED, (val >> 32) & 0xFF);
-#endif
-}
-
-void eeconfig_update_rgblight_current(void) { eeconfig_update_rgblight(rgblight_config.raw); }
-
-void eeconfig_update_rgblight_default(void) {
- rgblight_config.enable = 1;
- rgblight_config.mode = RGBLIGHT_MODE_STATIC_LIGHT;
- rgblight_config.hue = 0;
- rgblight_config.sat = UINT8_MAX;
- rgblight_config.val = RGBLIGHT_LIMIT_VAL;
- rgblight_config.speed = 0;
- RGBLIGHT_SPLIT_SET_CHANGE_MODEHSVS;
- eeconfig_update_rgblight(rgblight_config.raw);
-}
-
-void eeconfig_debug_rgblight(void) {
- dprintf("rgblight_config EEPROM:\n");
- dprintf("rgblight_config.enable = %d\n", rgblight_config.enable);
- dprintf("rghlight_config.mode = %d\n", rgblight_config.mode);
- dprintf("rgblight_config.hue = %d\n", rgblight_config.hue);
- dprintf("rgblight_config.sat = %d\n", rgblight_config.sat);
- dprintf("rgblight_config.val = %d\n", rgblight_config.val);
- dprintf("rgblight_config.speed = %d\n", rgblight_config.speed);
-}
-
-void rgblight_init(void) {
- /* if already initialized, don't do it again.
- If you must do it again, extern this and set to false, first.
- This is a dirty, dirty hack until proper hooks can be added for keyboard startup. */
- if (is_rgblight_initialized) {
- return;
- }
-
- dprintf("rgblight_init called.\n");
- dprintf("rgblight_init start!\n");
- if (!eeconfig_is_enabled()) {
- dprintf("rgblight_init eeconfig is not enabled.\n");
- eeconfig_init();
- eeconfig_update_rgblight_default();
- }
- rgblight_config.raw = eeconfig_read_rgblight();
- RGBLIGHT_SPLIT_SET_CHANGE_MODEHSVS;
- if (!rgblight_config.mode) {
- dprintf("rgblight_init rgblight_config.mode = 0. Write default values to EEPROM.\n");
- eeconfig_update_rgblight_default();
- rgblight_config.raw = eeconfig_read_rgblight();
- }
- rgblight_check_config();
-
- eeconfig_debug_rgblight(); // display current eeprom values
-
- rgblight_timer_init(); // setup the timer
-
- if (rgblight_config.enable) {
- rgblight_mode_noeeprom(rgblight_config.mode);
- }
-
- is_rgblight_initialized = true;
-}
-
-uint32_t rgblight_read_dword(void) { return rgblight_config.raw; }
-
-void rgblight_update_dword(uint32_t dword) {
- RGBLIGHT_SPLIT_SET_CHANGE_MODEHSVS;
- rgblight_config.raw = dword;
- if (rgblight_config.enable)
- rgblight_mode_noeeprom(rgblight_config.mode);
- else {
- rgblight_timer_disable();
- rgblight_set();
- }
-}
-
-void rgblight_increase(void) {
- uint8_t mode = 0;
- if (rgblight_config.mode < RGBLIGHT_MODES) {
- mode = rgblight_config.mode + 1;
- }
- rgblight_mode(mode);
-}
-void rgblight_decrease(void) {
- uint8_t mode = 0;
- // Mode will never be < 1. If it ever is, eeprom needs to be initialized.
- if (rgblight_config.mode > RGBLIGHT_MODE_STATIC_LIGHT) {
- mode = rgblight_config.mode - 1;
- }
- rgblight_mode(mode);
-}
-void rgblight_step_helper(bool write_to_eeprom) {
- uint8_t mode = 0;
- mode = rgblight_config.mode + 1;
- if (mode > RGBLIGHT_MODES) {
- mode = 1;
- }
- rgblight_mode_eeprom_helper(mode, write_to_eeprom);
-}
-void rgblight_step_noeeprom(void) { rgblight_step_helper(false); }
-void rgblight_step(void) { rgblight_step_helper(true); }
-void rgblight_step_reverse_helper(bool write_to_eeprom) {
- uint8_t mode = 0;
- mode = rgblight_config.mode - 1;
- if (mode < 1) {
- mode = RGBLIGHT_MODES;
- }
- rgblight_mode_eeprom_helper(mode, write_to_eeprom);
-}
-void rgblight_step_reverse_noeeprom(void) { rgblight_step_reverse_helper(false); }
-void rgblight_step_reverse(void) { rgblight_step_reverse_helper(true); }
-
-uint8_t rgblight_get_mode(void) {
- if (!rgblight_config.enable) {
- return false;
- }
-
- return rgblight_config.mode;
-}
-
-void rgblight_mode_eeprom_helper(uint8_t mode, bool write_to_eeprom) {
- if (!rgblight_config.enable) {
- return;
- }
- if (mode < RGBLIGHT_MODE_STATIC_LIGHT) {
- rgblight_config.mode = RGBLIGHT_MODE_STATIC_LIGHT;
- } else if (mode > RGBLIGHT_MODES) {
- rgblight_config.mode = RGBLIGHT_MODES;
- } else {
- rgblight_config.mode = mode;
- }
- RGBLIGHT_SPLIT_SET_CHANGE_MODE;
- if (write_to_eeprom) {
- eeconfig_update_rgblight(rgblight_config.raw);
- dprintf("rgblight mode [EEPROM]: %u\n", rgblight_config.mode);
- } else {
- dprintf("rgblight mode [NOEEPROM]: %u\n", rgblight_config.mode);
- }
- if (is_static_effect(rgblight_config.mode)) {
- rgblight_timer_disable();
- } else {
- rgblight_timer_enable();
- }
-#ifdef RGBLIGHT_USE_TIMER
- animation_status.restart = true;
-#endif
- rgblight_sethsv_noeeprom(rgblight_config.hue, rgblight_config.sat, rgblight_config.val);
-}
-
-void rgblight_mode(uint8_t mode) { rgblight_mode_eeprom_helper(mode, true); }
-
-void rgblight_mode_noeeprom(uint8_t mode) { rgblight_mode_eeprom_helper(mode, false); }
-
-void rgblight_toggle(void) {
- dprintf("rgblight toggle [EEPROM]: rgblight_config.enable = %u\n", !rgblight_config.enable);
- if (rgblight_config.enable) {
- rgblight_disable();
- } else {
- rgblight_enable();
- }
-}
-
-void rgblight_toggle_noeeprom(void) {
- dprintf("rgblight toggle [NOEEPROM]: rgblight_config.enable = %u\n", !rgblight_config.enable);
- if (rgblight_config.enable) {
- rgblight_disable_noeeprom();
- } else {
- rgblight_enable_noeeprom();
- }
-}
-
-void rgblight_enable(void) {
- rgblight_config.enable = 1;
- // No need to update EEPROM here. rgblight_mode() will do that, actually
- // eeconfig_update_rgblight(rgblight_config.raw);
- dprintf("rgblight enable [EEPROM]: rgblight_config.enable = %u\n", rgblight_config.enable);
- rgblight_mode(rgblight_config.mode);
-}
-
-void rgblight_enable_noeeprom(void) {
- rgblight_config.enable = 1;
- dprintf("rgblight enable [NOEEPROM]: rgblight_config.enable = %u\n", rgblight_config.enable);
- rgblight_mode_noeeprom(rgblight_config.mode);
-}
-
-void rgblight_disable(void) {
- rgblight_config.enable = 0;
- eeconfig_update_rgblight(rgblight_config.raw);
- dprintf("rgblight disable [EEPROM]: rgblight_config.enable = %u\n", rgblight_config.enable);
- rgblight_timer_disable();
- RGBLIGHT_SPLIT_SET_CHANGE_MODE;
- wait_ms(50);
- rgblight_set();
-}
-
-void rgblight_disable_noeeprom(void) {
- rgblight_config.enable = 0;
- dprintf("rgblight disable [NOEEPROM]: rgblight_config.enable = %u\n", rgblight_config.enable);
- rgblight_timer_disable();
- RGBLIGHT_SPLIT_SET_CHANGE_MODE;
- wait_ms(50);
- rgblight_set();
-}
-
-bool rgblight_is_enabled(void) { return rgblight_config.enable; }
-
-void rgblight_increase_hue_helper(bool write_to_eeprom) {
- uint8_t hue = rgblight_config.hue + RGBLIGHT_HUE_STEP;
- rgblight_sethsv_eeprom_helper(hue, rgblight_config.sat, rgblight_config.val, write_to_eeprom);
-}
-void rgblight_increase_hue_noeeprom(void) { rgblight_increase_hue_helper(false); }
-void rgblight_increase_hue(void) { rgblight_increase_hue_helper(true); }
-void rgblight_decrease_hue_helper(bool write_to_eeprom) {
- uint8_t hue = rgblight_config.hue - RGBLIGHT_HUE_STEP;
- rgblight_sethsv_eeprom_helper(hue, rgblight_config.sat, rgblight_config.val, write_to_eeprom);
-}
-void rgblight_decrease_hue_noeeprom(void) { rgblight_decrease_hue_helper(false); }
-void rgblight_decrease_hue(void) { rgblight_decrease_hue_helper(true); }
-void rgblight_increase_sat_helper(bool write_to_eeprom) {
- uint8_t sat = qadd8(rgblight_config.sat, RGBLIGHT_SAT_STEP);
- rgblight_sethsv_eeprom_helper(rgblight_config.hue, sat, rgblight_config.val, write_to_eeprom);
-}
-void rgblight_increase_sat_noeeprom(void) { rgblight_increase_sat_helper(false); }
-void rgblight_increase_sat(void) { rgblight_increase_sat_helper(true); }
-void rgblight_decrease_sat_helper(bool write_to_eeprom) {
- uint8_t sat = qsub8(rgblight_config.sat, RGBLIGHT_SAT_STEP);
- rgblight_sethsv_eeprom_helper(rgblight_config.hue, sat, rgblight_config.val, write_to_eeprom);
-}
-void rgblight_decrease_sat_noeeprom(void) { rgblight_decrease_sat_helper(false); }
-void rgblight_decrease_sat(void) { rgblight_decrease_sat_helper(true); }
-void rgblight_increase_val_helper(bool write_to_eeprom) {
- uint8_t val = qadd8(rgblight_config.val, RGBLIGHT_VAL_STEP);
- rgblight_sethsv_eeprom_helper(rgblight_config.hue, rgblight_config.sat, val, write_to_eeprom);
-}
-void rgblight_increase_val_noeeprom(void) { rgblight_increase_val_helper(false); }
-void rgblight_increase_val(void) { rgblight_increase_val_helper(true); }
-void rgblight_decrease_val_helper(bool write_to_eeprom) {
- uint8_t val = qsub8(rgblight_config.val, RGBLIGHT_VAL_STEP);
- rgblight_sethsv_eeprom_helper(rgblight_config.hue, rgblight_config.sat, val, write_to_eeprom);
-}
-void rgblight_decrease_val_noeeprom(void) { rgblight_decrease_val_helper(false); }
-void rgblight_decrease_val(void) { rgblight_decrease_val_helper(true); }
-
-void rgblight_increase_speed_helper(bool write_to_eeprom) {
- if (rgblight_config.speed < 3) rgblight_config.speed++;
- // RGBLIGHT_SPLIT_SET_CHANGE_HSVS; // NEED?
- if (write_to_eeprom) {
- eeconfig_update_rgblight(rgblight_config.raw); // EECONFIG needs to be increased to support this
- }
-}
-void rgblight_increase_speed(void) { rgblight_increase_speed_helper(true); }
-void rgblight_increase_speed_noeeprom(void) { rgblight_increase_speed_helper(false); }
-void rgblight_decrease_speed_helper(bool write_to_eeprom) {
- if (rgblight_config.speed > 0) rgblight_config.speed--;
- // RGBLIGHT_SPLIT_SET_CHANGE_HSVS; // NEED??
- if (write_to_eeprom) {
- eeconfig_update_rgblight(rgblight_config.raw); // EECONFIG needs to be increased to support this
- }
-}
-void rgblight_decrease_speed(void) { rgblight_decrease_speed_helper(true); }
-void rgblight_decrease_speed_noeeprom(void) { rgblight_decrease_speed_helper(false); }
-
-void rgblight_sethsv_noeeprom_old(uint8_t hue, uint8_t sat, uint8_t val) {
- if (rgblight_config.enable) {
- // MxSS custom code
- fled_hs[0].hue = fled_hs[1].hue = hue;
- fled_hs[0].sat = fled_hs[1].sat = sat;
-
- LED_TYPE tmp_led;
- sethsv(hue, sat, val, &tmp_led);
- rgblight_setrgb(tmp_led.r, tmp_led.g, tmp_led.b);
- }
-}
-
-void rgblight_sethsv_eeprom_helper(uint8_t hue, uint8_t sat, uint8_t val, bool write_to_eeprom) {
- if (rgblight_config.enable) {
- rgblight_status.base_mode = mode_base_table[rgblight_config.mode];
- if (rgblight_config.mode == RGBLIGHT_MODE_STATIC_LIGHT) {
- // same static color
- LED_TYPE tmp_led;
- sethsv(hue, sat, val, &tmp_led);
-
- // MxSS custom
- // Cache hue/sat for rgb
- fled_hs[0].hue = fled_hs[1].hue = hue;
- fled_hs[0].sat = fled_hs[1].sat = sat;
-
- rgblight_setrgb(tmp_led.r, tmp_led.g, tmp_led.b);
- } else {
- // all LEDs in same color
- if (1 == 0) { // dummy
- }
-#ifdef RGBLIGHT_EFFECT_BREATHING
- else if (rgblight_status.base_mode == RGBLIGHT_MODE_BREATHING) {
- // breathing mode, ignore the change of val, use in memory value instead
- val = rgblight_config.val;
- }
-#endif
-#ifdef RGBLIGHT_EFFECT_RAINBOW_MOOD
- else if (rgblight_status.base_mode == RGBLIGHT_MODE_RAINBOW_MOOD) {
- // rainbow mood, ignore the change of hue
- hue = rgblight_config.hue;
- }
-#endif
-#ifdef RGBLIGHT_EFFECT_RAINBOW_SWIRL
- else if (rgblight_status.base_mode == RGBLIGHT_MODE_RAINBOW_SWIRL) {
- // rainbow swirl, ignore the change of hue
- hue = rgblight_config.hue;
- }
-#endif
-#ifdef RGBLIGHT_EFFECT_STATIC_GRADIENT
- else if (rgblight_status.base_mode == RGBLIGHT_MODE_STATIC_GRADIENT) {
- // static gradient
- uint8_t delta = rgblight_config.mode - rgblight_status.base_mode;
- bool direction = (delta % 2) == 0;
-# ifdef __AVR__
- // probably due to how pgm_read_word is defined for ARM, but the ARM compiler really hates this line
- uint8_t range = pgm_read_word(&RGBLED_GRADIENT_RANGES[delta / 2]);
-# else
- uint8_t range = RGBLED_GRADIENT_RANGES[delta / 2];
-# endif
- for (uint8_t i = 0; i < rgblight_ranges.effect_num_leds; i++) {
- uint8_t _hue = ((uint16_t)i * (uint16_t)range) / rgblight_ranges.effect_num_leds;
- if (direction) {
- _hue = hue + _hue;
- } else {
- _hue = hue - _hue;
- }
- dprintf("rgblight rainbow set hsv: %d,%d,%d,%u\n", i, _hue, direction, range);
- sethsv(_hue, sat, val, (LED_TYPE *)&led[i + rgblight_ranges.effect_start_pos]);
- }
- rgblight_set();
- }
-#endif
- }
-#ifdef RGBLIGHT_SPLIT
- if (rgblight_config.hue != hue || rgblight_config.sat != sat || rgblight_config.val != val) {
- RGBLIGHT_SPLIT_SET_CHANGE_HSVS;
- }
-#endif
- rgblight_config.hue = hue;
- rgblight_config.sat = sat;
- rgblight_config.val = val;
- if (write_to_eeprom) {
- eeconfig_update_rgblight(rgblight_config.raw);
- dprintf("rgblight set hsv [EEPROM]: %u,%u,%u\n", rgblight_config.hue, rgblight_config.sat, rgblight_config.val);
- } else {
- dprintf("rgblight set hsv [NOEEPROM]: %u,%u,%u\n", rgblight_config.hue, rgblight_config.sat, rgblight_config.val);
- }
- }
-}
-
-void rgblight_sethsv(uint8_t hue, uint8_t sat, uint8_t val) { rgblight_sethsv_eeprom_helper(hue, sat, val, true); }
-
-void rgblight_sethsv_noeeprom(uint8_t hue, uint8_t sat, uint8_t val) { rgblight_sethsv_eeprom_helper(hue, sat, val, false); }
-
-uint8_t rgblight_get_speed(void) { return rgblight_config.speed; }
-
-void rgblight_set_speed_eeprom_helper(uint8_t speed, bool write_to_eeprom) {
- rgblight_config.speed = speed;
- if (write_to_eeprom) {
- eeconfig_update_rgblight(rgblight_config.raw); // EECONFIG needs to be increased to support this
- dprintf("rgblight set speed [EEPROM]: %u\n", rgblight_config.speed);
- } else {
- dprintf("rgblight set speed [NOEEPROM]: %u\n", rgblight_config.speed);
- }
-}
-
-void rgblight_set_speed(uint8_t speed) { rgblight_set_speed_eeprom_helper(speed, true); }
-
-void rgblight_set_speed_noeeprom(uint8_t speed) { rgblight_set_speed_eeprom_helper(speed, false); }
-
-uint8_t rgblight_get_hue(void) { return rgblight_config.hue; }
-
-uint8_t rgblight_get_sat(void) { return rgblight_config.sat; }
-
-uint8_t rgblight_get_val(void) { return rgblight_config.val; }
-
-HSV rgblight_get_hsv(void) { return (HSV){rgblight_config.hue, rgblight_config.sat, rgblight_config.val}; }
-
-void rgblight_setrgb(uint8_t r, uint8_t g, uint8_t b) {
- if (!rgblight_config.enable) {
- return;
- }
-
- for (uint8_t i = rgblight_ranges.effect_start_pos; i < rgblight_ranges.effect_end_pos; i++) {
- led[i].r = r;
- led[i].g = g;
- led[i].b = b;
-#ifdef RGBW
- led[i].w = 0;
-#endif
- }
- rgblight_set();
-}
-
-void rgblight_setrgb_at(uint8_t r, uint8_t g, uint8_t b, uint8_t index) {
- if (!rgblight_config.enable || index >= RGBLED_NUM) {
- return;
- }
-
- led[index].r = r;
- led[index].g = g;
- led[index].b = b;
-#ifdef RGBW
- led[index].w = 0;
-#endif
- rgblight_set();
-}
-
-void rgblight_sethsv_at(uint8_t hue, uint8_t sat, uint8_t val, uint8_t index) {
- if (!rgblight_config.enable) {
- return;
- }
-
- LED_TYPE tmp_led;
- sethsv(hue, sat, val, &tmp_led);
- rgblight_setrgb_at(tmp_led.r, tmp_led.g, tmp_led.b, index);
-}
-
-#if defined(RGBLIGHT_EFFECT_BREATHING) || defined(RGBLIGHT_EFFECT_RAINBOW_MOOD) || defined(RGBLIGHT_EFFECT_RAINBOW_SWIRL) || defined(RGBLIGHT_EFFECT_SNAKE) || defined(RGBLIGHT_EFFECT_KNIGHT) || defined(RGBLIGHT_EFFECT_TWINKLE)
-
-static uint8_t get_interval_time(const uint8_t *default_interval_address, uint8_t velocikey_min, uint8_t velocikey_max) {
- return
-# ifdef VELOCIKEY_ENABLE
- velocikey_enabled() ? velocikey_match_speed(velocikey_min, velocikey_max) :
-# endif
- pgm_read_byte(default_interval_address);
-}
-
-#endif
-
-void rgblight_setrgb_range(uint8_t r, uint8_t g, uint8_t b, uint8_t start, uint8_t end) {
- if (!rgblight_config.enable || start < 0 || start >= end || end > RGBLED_NUM) {
- return;
- }
-
- for (uint8_t i = start; i < end; i++) {
- led[i].r = r;
- led[i].g = g;
- led[i].b = b;
-#ifdef RGBW
- led[i].w = 0;
-#endif
- }
- rgblight_set();
- wait_ms(1);
-}
-
-void rgblight_sethsv_range(uint8_t hue, uint8_t sat, uint8_t val, uint8_t start, uint8_t end) {
- if (!rgblight_config.enable) {
- return;
- }
-
- LED_TYPE tmp_led;
- sethsv(hue, sat, val, &tmp_led);
- rgblight_setrgb_range(tmp_led.r, tmp_led.g, tmp_led.b, start, end);
-}
-
-#ifndef RGBLIGHT_SPLIT
-void rgblight_setrgb_master(uint8_t r, uint8_t g, uint8_t b) { rgblight_setrgb_range(r, g, b, 0, (uint8_t)RGBLED_NUM / 2); }
-
-void rgblight_setrgb_slave(uint8_t r, uint8_t g, uint8_t b) { rgblight_setrgb_range(r, g, b, (uint8_t)RGBLED_NUM / 2, (uint8_t)RGBLED_NUM); }
-
-void rgblight_sethsv_master(uint8_t hue, uint8_t sat, uint8_t val) { rgblight_sethsv_range(hue, sat, val, 0, (uint8_t)RGBLED_NUM / 2); }
-
-void rgblight_sethsv_slave(uint8_t hue, uint8_t sat, uint8_t val) { rgblight_sethsv_range(hue, sat, val, (uint8_t)RGBLED_NUM / 2, (uint8_t)RGBLED_NUM); }
-#endif // ifndef RGBLIGHT_SPLIT
-
-#ifdef RGBLIGHT_LAYERS
-void rgblight_set_layer_state(uint8_t layer, bool enabled) {
- rgblight_layer_mask_t mask = 1 << layer;
- if (enabled) {
- rgblight_status.enabled_layer_mask |= mask;
- } else {
- rgblight_status.enabled_layer_mask &= ~mask;
- }
- RGBLIGHT_SPLIT_SET_CHANGE_LAYERS;
- // Static modes don't have a ticker running to update the LEDs
- if (rgblight_status.timer_enabled == false) {
- rgblight_mode_noeeprom(rgblight_config.mode);
- }
-
-# ifdef RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF
- // If not enabled, then nothing else will actually set the LEDs...
- if (!rgblight_config.enable) {
- rgblight_set();
- }
-# endif
-}
-
-bool rgblight_get_layer_state(uint8_t layer) {
- rgblight_layer_mask_t mask = 1 << layer;
- return (rgblight_status.enabled_layer_mask & mask) != 0;
-}
-
-// Write any enabled LED layers into the buffer
-static void rgblight_layers_write(void) {
- uint8_t i = 0;
- // For each layer
- for (const rgblight_segment_t *const *layer_ptr = rgblight_layers; i < RGBLIGHT_MAX_LAYERS; layer_ptr++, i++) {
- if (!rgblight_get_layer_state(i)) {
- continue; // Layer is disabled
- }
- const rgblight_segment_t *segment_ptr = pgm_read_ptr(layer_ptr);
- if (segment_ptr == NULL) {
- break; // No more layers
- }
- // For each segment
- while (1) {
- rgblight_segment_t segment;
- memcpy_P(&segment, segment_ptr, sizeof(rgblight_segment_t));
- if (segment.index == RGBLIGHT_END_SEGMENT_INDEX) {
- break; // No more segments
- }
- // Write segment.count LEDs
- LED_TYPE *const limit = &led[MIN(segment.index + segment.count, RGBLED_NUM)];
- for (LED_TYPE *led_ptr = &led[segment.index]; led_ptr < limit; led_ptr++) {
- sethsv(segment.hue, segment.sat, segment.val, led_ptr);
- }
- segment_ptr++;
- }
- }
-}
-
-# ifdef RGBLIGHT_LAYER_BLINK
-rgblight_layer_mask_t _blinked_layer_mask = 0;
-uint16_t _blink_duration = 0;
-static uint16_t _blink_timer;
-
-void rgblight_blink_layer(uint8_t layer, uint16_t duration_ms) {
- rgblight_set_layer_state(layer, true);
- _blinked_layer_mask |= 1 << layer;
- _blink_timer = timer_read();
- _blink_duration = duration_ms;
-}
-
-void rgblight_unblink_layers(void) {
- if (_blinked_layer_mask != 0 && timer_elapsed(_blink_timer) > _blink_duration) {
- for (uint8_t layer = 0; layer < RGBLIGHT_MAX_LAYERS; layer++) {
- if ((_blinked_layer_mask & 1 << layer) != 0) {
- rgblight_set_layer_state(layer, false);
- }
- }
- _blinked_layer_mask = 0;
- }
-}
-# endif
-
-#endif
-
-__attribute__((weak)) void rgblight_call_driver(LED_TYPE *start_led, uint8_t num_leds) { ws2812_setleds(start_led, num_leds); }
-
-#ifndef RGBLIGHT_CUSTOM_DRIVER
-void rgblight_set(void) {
- LED_TYPE *start_led;
- uint8_t num_leds = rgblight_ranges.clipping_num_leds;
-
- if (!rgblight_config.enable) {
- for (uint8_t i = rgblight_ranges.effect_start_pos; i < rgblight_ranges.effect_end_pos; i++) {
- if (i == RGBLIGHT_FLED1 && i == RGBLIGHT_FLED2)
- continue;
-
- led[i].r = 0;
- led[i].g = 0;
- led[i].b = 0;
-# ifdef RGBW
- led[i].w = 0;
-# endif
- }
- }
-
-# ifdef RGBLIGHT_LAYERS
- if (rgblight_layers != NULL
-# ifndef RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF
- && rgblight_config.enable
-# endif
- ) {
- rgblight_layers_write();
- }
-# endif
-
-# ifdef RGBLIGHT_LED_MAP
- LED_TYPE led0[RGBLED_NUM];
- for (uint8_t i = 0; i < RGBLED_NUM; i++) {
- led0[i] = led[pgm_read_byte(&led_map[i])];
- }
- start_led = led0 + rgblight_ranges.clipping_start_pos;
-# else
- start_led = led + rgblight_ranges.clipping_start_pos;
-# endif
-
-# ifdef RGBW
- for (uint8_t i = 0; i < num_leds; i++) {
- convert_rgb_to_rgbw(&start_led[i]);
- }
-# endif
- // MxSS custom
- switch (fled_mode) {
- case FLED_OFF:
- setrgb(0, 0, 0, &led[RGBLIGHT_FLED1]);
- setrgb(0, 0, 0, &led[RGBLIGHT_FLED2]);
- break;
-
- case FLED_INDI:
- copyrgb(&fleds[0], &led[RGBLIGHT_FLED1]);
- copyrgb(&fleds[1], &led[RGBLIGHT_FLED2]);
- break;
-
- case FLED_RGB:
- if (fled_hs[0].hue == 0 && fled_hs[0].hue == 0 &&
- (rgblight_status.base_mode == RGBLIGHT_MODE_SNAKE ||
- rgblight_status.base_mode == RGBLIGHT_MODE_KNIGHT))
- setrgb(0, 0, 0, &led[RGBLIGHT_FLED1]);
- else
- sethsv(fled_hs[0].hue, fled_hs[0].sat, fled_val, &led[RGBLIGHT_FLED1]);
-
- if (fled_hs[1].hue == 0 && fled_hs[1].hue == 0 &&
- (rgblight_status.base_mode == RGBLIGHT_MODE_SNAKE ||
- rgblight_status.base_mode == RGBLIGHT_MODE_KNIGHT))
- setrgb(0, 0, 0, &led[RGBLIGHT_FLED2]);
- else
- sethsv(fled_hs[1].hue, fled_hs[1].sat, fled_val, &led[RGBLIGHT_FLED2]);
- break;
- default:
- break;
- }
-
- rgblight_call_driver(start_led, num_leds);
-}
-#endif
-
-#ifdef RGBLIGHT_SPLIT
-/* for split keyboard master side */
-uint8_t rgblight_get_change_flags(void) { return rgblight_status.change_flags; }
-
-void rgblight_clear_change_flags(void) { rgblight_status.change_flags = 0; }
-
-void rgblight_get_syncinfo(rgblight_syncinfo_t *syncinfo) {
- syncinfo->config = rgblight_config;
- syncinfo->status = rgblight_status;
-}
-
-/* for split keyboard slave side */
-void rgblight_update_sync(rgblight_syncinfo_t *syncinfo, bool write_to_eeprom) {
-# ifdef RGBLIGHT_LAYERS
- if (syncinfo->status.change_flags & RGBLIGHT_STATUS_CHANGE_LAYERS) {
- rgblight_status.enabled_layer_mask = syncinfo->status.enabled_layer_mask;
- }
-# endif
- if (syncinfo->status.change_flags & RGBLIGHT_STATUS_CHANGE_MODE) {
- if (syncinfo->config.enable) {
- rgblight_config.enable = 1; // == rgblight_enable_noeeprom();
- rgblight_mode_eeprom_helper(syncinfo->config.mode, write_to_eeprom);
- } else {
- rgblight_disable_noeeprom();
- }
- }
- if (syncinfo->status.change_flags & RGBLIGHT_STATUS_CHANGE_HSVS) {
- rgblight_sethsv_eeprom_helper(syncinfo->config.hue, syncinfo->config.sat, syncinfo->config.val, write_to_eeprom);
- // rgblight_config.speed = config->speed; // NEED???
- }
-# ifdef RGBLIGHT_USE_TIMER
- if (syncinfo->status.change_flags & RGBLIGHT_STATUS_CHANGE_TIMER) {
- if (syncinfo->status.timer_enabled) {
- rgblight_timer_enable();
- } else {
- rgblight_timer_disable();
- }
- }
-# ifndef RGBLIGHT_SPLIT_NO_ANIMATION_SYNC
- if (syncinfo->status.change_flags & RGBLIGHT_STATUS_ANIMATION_TICK) {
- animation_status.restart = true;
- }
-# endif /* RGBLIGHT_SPLIT_NO_ANIMATION_SYNC */
-# endif /* RGBLIGHT_USE_TIMER */
-}
-#endif /* RGBLIGHT_SPLIT */
-
-#ifdef RGBLIGHT_USE_TIMER
-
-typedef void (*effect_func_t)(animation_status_t *anim);
-
-// Animation timer -- use system timer (AVR Timer0)
-void rgblight_timer_init(void) {
- // OLD!!!! Animation timer -- AVR Timer3
- // static uint8_t rgblight_timer_is_init = 0;
- // if (rgblight_timer_is_init) {
- // return;
- // }
- // rgblight_timer_is_init = 1;
- // /* Timer 3 setup */
- // TCCR3B = _BV(WGM32) // CTC mode OCR3A as TOP
- // | _BV(CS30); // Clock selelct: clk/1
- // /* Set TOP value */
- // uint8_t sreg = SREG;
- // cli();
- // OCR3AH = (RGBLED_TIMER_TOP >> 8) & 0xff;
- // OCR3AL = RGBLED_TIMER_TOP & 0xff;
- // SREG = sreg;
-
- rgblight_status.timer_enabled = false;
- RGBLIGHT_SPLIT_SET_CHANGE_TIMER_ENABLE;
-}
-void rgblight_timer_enable(void) {
- if (!is_static_effect(rgblight_config.mode)) {
- rgblight_status.timer_enabled = true;
- }
- animation_status.last_timer = timer_read();
- RGBLIGHT_SPLIT_SET_CHANGE_TIMER_ENABLE;
- dprintf("rgblight timer enabled.\n");
-}
-void rgblight_timer_disable(void) {
- // MxSS custom code
- if (fled_mode != FLED_RGB) {
- rgblight_status.timer_enabled = false;
- RGBLIGHT_SPLIT_SET_CHANGE_TIMER_ENABLE;
- dprintf("rgblight timer disable.\n");
- }
-}
-void rgblight_timer_toggle(void) {
- dprintf("rgblight timer toggle.\n");
- if (rgblight_status.timer_enabled) {
- rgblight_timer_disable();
- } else {
- rgblight_timer_enable();
- }
-}
-
-void rgblight_show_solid_color(uint8_t r, uint8_t g, uint8_t b) {
- rgblight_enable();
- rgblight_mode(RGBLIGHT_MODE_STATIC_LIGHT);
- rgblight_setrgb(r, g, b);
-}
-
-static void rgblight_effect_dummy(animation_status_t *anim) {
- // do nothing
- /********
- dprintf("rgblight_task() what happened?\n");
- dprintf("is_static_effect %d\n", is_static_effect(rgblight_config.mode));
- dprintf("mode = %d, base_mode = %d, timer_enabled %d, ",
- rgblight_config.mode, rgblight_status.base_mode,
- rgblight_status.timer_enabled);
- dprintf("last_timer = %d\n",anim->last_timer);
- **/
-}
-
-void rgblight_task(void) {
- if (rgblight_status.timer_enabled) {
- effect_func_t effect_func = rgblight_effect_dummy;
- uint16_t interval_time = 2000; // dummy interval
- uint8_t delta = rgblight_config.mode - rgblight_status.base_mode;
- animation_status.delta = delta;
-
- // static light mode, do nothing here
- if (1 == 0) { // dummy
- }
-# ifdef RGBLIGHT_EFFECT_BREATHING
- else if (rgblight_status.base_mode == RGBLIGHT_MODE_BREATHING) {
- // breathing mode
- interval_time = get_interval_time(&RGBLED_BREATHING_INTERVALS[delta], 1, 100);
- effect_func = rgblight_effect_breathing;
- }
-# endif
-# ifdef RGBLIGHT_EFFECT_RAINBOW_MOOD
- else if (rgblight_status.base_mode == RGBLIGHT_MODE_RAINBOW_MOOD) {
- // rainbow mood mode
- interval_time = get_interval_time(&RGBLED_RAINBOW_MOOD_INTERVALS[delta], 5, 100);
- effect_func = rgblight_effect_rainbow_mood;
- }
-# endif
-# ifdef RGBLIGHT_EFFECT_RAINBOW_SWIRL
- else if (rgblight_status.base_mode == RGBLIGHT_MODE_RAINBOW_SWIRL) {
- // rainbow swirl mode
- interval_time = get_interval_time(&RGBLED_RAINBOW_SWIRL_INTERVALS[delta / 2], 1, 100);
- effect_func = rgblight_effect_rainbow_swirl;
- }
-# endif
-# ifdef RGBLIGHT_EFFECT_SNAKE
- else if (rgblight_status.base_mode == RGBLIGHT_MODE_SNAKE) {
- // snake mode
- interval_time = get_interval_time(&RGBLED_SNAKE_INTERVALS[delta / 2], 1, 200);
- effect_func = rgblight_effect_snake;
- }
-# endif
-# ifdef RGBLIGHT_EFFECT_KNIGHT
- else if (rgblight_status.base_mode == RGBLIGHT_MODE_KNIGHT) {
- // knight mode
- interval_time = get_interval_time(&RGBLED_KNIGHT_INTERVALS[delta], 5, 100);
- effect_func = rgblight_effect_knight;
- }
-# endif
-# ifdef RGBLIGHT_EFFECT_CHRISTMAS
- else if (rgblight_status.base_mode == RGBLIGHT_MODE_CHRISTMAS) {
- // christmas mode
- interval_time = RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL;
- effect_func = (effect_func_t)rgblight_effect_christmas;
- }
-# endif
-# ifdef RGBLIGHT_EFFECT_RGB_TEST
- else if (rgblight_status.base_mode == RGBLIGHT_MODE_RGB_TEST) {
- // RGB test mode
- interval_time = pgm_read_word(&RGBLED_RGBTEST_INTERVALS[0]);
- effect_func = (effect_func_t)rgblight_effect_rgbtest;
- }
-# endif
-# ifdef RGBLIGHT_EFFECT_ALTERNATING
- else if (rgblight_status.base_mode == RGBLIGHT_MODE_ALTERNATING) {
- interval_time = 500;
- effect_func = (effect_func_t)rgblight_effect_alternating;
- }
-# endif
-# ifdef RGBLIGHT_EFFECT_TWINKLE
- else if (rgblight_status.base_mode == RGBLIGHT_MODE_TWINKLE) {
- interval_time = get_interval_time(&RGBLED_TWINKLE_INTERVALS[delta % 3], 5, 50);
- effect_func = (effect_func_t)rgblight_effect_twinkle;
- }
-# endif
- if (animation_status.restart) {
- animation_status.restart = false;
- animation_status.last_timer = timer_read() - interval_time - 1;
- animation_status.pos16 = 0; // restart signal to local each effect
- }
- if (timer_elapsed(animation_status.last_timer) >= interval_time) {
-# if defined(RGBLIGHT_SPLIT) && !defined(RGBLIGHT_SPLIT_NO_ANIMATION_SYNC)
- static uint16_t report_last_timer = 0;
- static bool tick_flag = false;
- uint16_t oldpos16;
- if (tick_flag) {
- tick_flag = false;
- if (timer_elapsed(report_last_timer) >= 30000) {
- report_last_timer = timer_read();
- dprintf("rgblight animation tick report to slave\n");
- RGBLIGHT_SPLIT_ANIMATION_TICK;
- }
- }
- oldpos16 = animation_status.pos16;
-# endif
- animation_status.last_timer += interval_time;
- effect_func(&animation_status);
-# if defined(RGBLIGHT_SPLIT) && !defined(RGBLIGHT_SPLIT_NO_ANIMATION_SYNC)
- if (animation_status.pos16 == 0 && oldpos16 != 0) {
- tick_flag = true;
- }
-# endif
- }
- }
-
-# ifdef RGBLIGHT_LAYER_BLINK
- rgblight_unblink_layers();
-# endif
-}
-
-#endif /* RGBLIGHT_USE_TIMER */
-
-// Effects
-#ifdef RGBLIGHT_EFFECT_BREATHING
-
-# ifndef RGBLIGHT_EFFECT_BREATHE_CENTER
-# ifndef RGBLIGHT_BREATHE_TABLE_SIZE
-# define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256 or 128 or 64
-# endif
-# include <rgblight_breathe_table.h>
-# endif
-
-__attribute__((weak)) const uint8_t RGBLED_BREATHING_INTERVALS[] PROGMEM = {30, 20, 10, 5};
-
-void rgblight_effect_breathing(animation_status_t *anim) {
- float val;
-
- // http://sean.voisen.org/blog/2011/10/breathing-led-with-arduino/
-# ifdef RGBLIGHT_EFFECT_BREATHE_TABLE
- val = pgm_read_byte(&rgblight_effect_breathe_table[anim->pos / table_scale]);
-# else
- val = (exp(sin((anim->pos / 255.0) * M_PI)) - RGBLIGHT_EFFECT_BREATHE_CENTER / M_E) * (RGBLIGHT_EFFECT_BREATHE_MAX / (M_E - 1 / M_E));
-# endif
- rgblight_sethsv_noeeprom_old(rgblight_config.hue, rgblight_config.sat, val);
- anim->pos = (anim->pos + 1);
-}
-#endif
-
-#ifdef RGBLIGHT_EFFECT_RAINBOW_MOOD
-__attribute__((weak)) const uint8_t RGBLED_RAINBOW_MOOD_INTERVALS[] PROGMEM = {120, 60, 30};
-
-void rgblight_effect_rainbow_mood(animation_status_t *anim) {
- rgblight_sethsv_noeeprom_old(anim->current_hue, rgblight_config.sat, rgblight_config.val);
- anim->current_hue++;
-}
-#endif
-
-#ifdef RGBLIGHT_EFFECT_RAINBOW_SWIRL
-# ifndef RGBLIGHT_RAINBOW_SWIRL_RANGE
-# define RGBLIGHT_RAINBOW_SWIRL_RANGE 255
-# endif
-
-__attribute__((weak)) const uint8_t RGBLED_RAINBOW_SWIRL_INTERVALS[] PROGMEM = {100, 50, 20};
-
-void rgblight_effect_rainbow_swirl(animation_status_t *anim) {
- uint8_t hue;
- uint8_t i;
-
- for (i = 0; i < rgblight_ranges.effect_num_leds; i++) {
- hue = (RGBLIGHT_RAINBOW_SWIRL_RANGE / rgblight_ranges.effect_num_leds * i + anim->current_hue);
- sethsv(hue, rgblight_config.sat, rgblight_config.val, (LED_TYPE *)&led[i + rgblight_ranges.effect_start_pos]);
- }
- rgblight_set();
-
- if (anim->delta % 2) {
- anim->current_hue++;
- } else {
- anim->current_hue--;
- }
-}
-#endif
-
-#ifdef RGBLIGHT_EFFECT_SNAKE
-__attribute__((weak)) const uint8_t RGBLED_SNAKE_INTERVALS[] PROGMEM = {100, 50, 20};
-
-void rgblight_effect_snake(animation_status_t *anim) {
- static uint8_t pos = 0;
- uint8_t i, j;
- int8_t k;
- int8_t increment = 1;
-
- if (anim->delta % 2) {
- increment = -1;
- }
-
-# if defined(RGBLIGHT_SPLIT) && !defined(RGBLIGHT_SPLIT_NO_ANIMATION_SYNC)
- if (anim->pos == 0) { // restart signal
- if (increment == 1) {
- pos = rgblight_ranges.effect_num_leds - 1;
- } else {
- pos = 0;
- }
- anim->pos = 1;
- }
-# endif
-
- // MxSS custom
- fled_hs[0].hue = fled_hs[1].hue = 0;
- fled_hs[0].sat = fled_hs[1].sat = 0;
-
- for (i = 0; i < rgblight_ranges.effect_num_leds; i++) {
- LED_TYPE *ledp = led + i + rgblight_ranges.effect_start_pos;
- ledp->r = 0;
- ledp->g = 0;
- ledp->b = 0;
-# ifdef RGBW
- ledp->w = 0;
-# endif
- for (j = 0; j < RGBLIGHT_EFFECT_SNAKE_LENGTH; j++) {
- k = pos + j * increment;
- if (k > RGBLED_NUM) {
- k = k % RGBLED_NUM;
- }
- if (k < 0) {
- k = k + rgblight_ranges.effect_num_leds;
- }
- if (i == k) {
- sethsv(rgblight_config.hue, rgblight_config.sat, (uint8_t)(rgblight_config.val * (RGBLIGHT_EFFECT_SNAKE_LENGTH - j) / RGBLIGHT_EFFECT_SNAKE_LENGTH), ledp);
- }
- }
- }
- rgblight_set();
- if (increment == 1) {
- if (pos - 1 < 0) {
- pos = rgblight_ranges.effect_num_leds - 1;
-# if defined(RGBLIGHT_SPLIT) && !defined(RGBLIGHT_SPLIT_NO_ANIMATION_SYNC)
- anim->pos = 0;
-# endif
- } else {
- pos -= 1;
-# if defined(RGBLIGHT_SPLIT) && !defined(RGBLIGHT_SPLIT_NO_ANIMATION_SYNC)
- anim->pos = 1;
-# endif
- }
- } else {
- pos = (pos + 1) % rgblight_ranges.effect_num_leds;
-# if defined(RGBLIGHT_SPLIT) && !defined(RGBLIGHT_SPLIT_NO_ANIMATION_SYNC)
- anim->pos = pos;
-# endif
- }
-}
-#endif
-
-#ifdef RGBLIGHT_EFFECT_KNIGHT
-__attribute__((weak)) const uint8_t RGBLED_KNIGHT_INTERVALS[] PROGMEM = {127, 63, 31};
-
-void rgblight_effect_knight(animation_status_t *anim) {
- static int8_t low_bound = 0;
- static int8_t high_bound = RGBLIGHT_EFFECT_KNIGHT_LENGTH - 1;
- static int8_t increment = 1;
- uint8_t i, cur;
-
-# if defined(RGBLIGHT_SPLIT) && !defined(RGBLIGHT_SPLIT_NO_ANIMATION_SYNC)
- if (anim->pos == 0) { // restart signal
- anim->pos = 1;
- low_bound = 0;
- high_bound = RGBLIGHT_EFFECT_KNIGHT_LENGTH - 1;
- increment = 1;
- }
-# endif
- // Set all the LEDs to 0
- for (i = rgblight_ranges.effect_start_pos; i < rgblight_ranges.effect_end_pos; i++) {
- led[i].r = 0;
- led[i].g = 0;
- led[i].b = 0;
-# ifdef RGBW
- led[i].w = 0;
-# endif
- }
- // Determine which LEDs should be lit up
- for (i = 0; i < RGBLIGHT_EFFECT_KNIGHT_LED_NUM; i++) {
- cur = (i + RGBLIGHT_EFFECT_KNIGHT_OFFSET) % rgblight_ranges.effect_num_leds + rgblight_ranges.effect_start_pos;
-
- if (i >= low_bound && i <= high_bound) {
- sethsv(rgblight_config.hue, rgblight_config.sat, rgblight_config.val, (LED_TYPE *)&led[cur]);
- } else {
- // MxSS custom code
- if (cur == RGBLIGHT_FLED1) {
- fled_hs[0].hue = fled_hs[0].sat = 0;
- } else if (cur == RGBLIGHT_FLED2) {
- fled_hs[1].hue = fled_hs[1].sat = 0;
- }
-
- led[cur].r = 0;
- led[cur].g = 0;
- led[cur].b = 0;
-# ifdef RGBW
- led[cur].w = 0;
-# endif
- }
- }
- rgblight_set();
-
- // Move from low_bound to high_bound changing the direction we increment each
- // time a boundary is hit.
- low_bound += increment;
- high_bound += increment;
-
- if (high_bound <= 0 || low_bound >= RGBLIGHT_EFFECT_KNIGHT_LED_NUM - 1) {
- increment = -increment;
-# if defined(RGBLIGHT_SPLIT) && !defined(RGBLIGHT_SPLIT_NO_ANIMATION_SYNC)
- if (increment == 1) {
- anim->pos = 0;
- }
-# endif
- }
-}
-#endif
-
-#ifdef RGBLIGHT_EFFECT_CHRISTMAS
-# define CUBED(x) ((x) * (x) * (x))
-
-/**
- * Christmas lights effect, with a smooth animation between red & green.
- */
-void rgblight_effect_christmas(animation_status_t *anim) {
- static int8_t increment = 1;
- const uint8_t max_pos = 32;
- const uint8_t hue_green = 85;
-
- uint32_t xa;
- uint8_t hue, val;
- uint8_t i;
-
- // The effect works by animating anim->pos from 0 to 32 and back to 0.
- // The pos is used in a cubic bezier formula to ease-in-out between red and green, leaving the interpolated colors visible as short as possible.
- xa = CUBED((uint32_t)anim->pos);
- hue = ((uint32_t)hue_green) * xa / (xa + CUBED((uint32_t)(max_pos - anim->pos)));
- // Additionally, these interpolated colors get shown with a slightly darker value, to make them less prominent than the main colors.
- val = 255 - (3 * (hue < hue_green / 2 ? hue : hue_green - hue) / 2);
-
- for (i = 0; i < rgblight_ranges.effect_num_leds; i++) {
- uint8_t local_hue = (i / RGBLIGHT_EFFECT_CHRISTMAS_STEP) % 2 ? hue : hue_green - hue;
- sethsv(local_hue, rgblight_config.sat, val, (LED_TYPE *)&led[i + rgblight_ranges.effect_start_pos]);
- }
- rgblight_set();
-
- if (anim->pos == 0) {
- increment = 1;
- } else if (anim->pos == max_pos) {
- increment = -1;
- }
- anim->pos += increment;
-}
-#endif
-
-#ifdef RGBLIGHT_EFFECT_RGB_TEST
-__attribute__((weak)) const uint16_t RGBLED_RGBTEST_INTERVALS[] PROGMEM = {1024};
-
-void rgblight_effect_rgbtest(animation_status_t *anim) {
- static uint8_t maxval = 0;
- uint8_t g;
- uint8_t r;
- uint8_t b;
-
- if (maxval == 0) {
- LED_TYPE tmp_led;
- sethsv(0, 255, RGBLIGHT_LIMIT_VAL, &tmp_led);
- maxval = tmp_led.r;
- }
- g = r = b = 0;
- switch (anim->pos) {
- // MxSS custom code
- case 0:
- r = maxval;
- fled_hs[0].hue = 0;
- fled_hs[0].sat = 255;
- fled_hs[1].hue = 0;
- fled_hs[1].sat = 255;
- break;
- case 1:
- g = maxval;
- fled_hs[0].hue = 85;
- fled_hs[0].sat = 255;
- fled_hs[1].hue = 85;
- fled_hs[1].sat = 255;
- break;
- case 2:
- b = maxval;
- fled_hs[0].hue = 170;
- fled_hs[0].sat = 255;
- fled_hs[1].hue = 170;
- fled_hs[1].sat = 255;
- break;
- }
- rgblight_setrgb(r, g, b);
- anim->pos = (anim->pos + 1) % 3;
-}
-#endif
-
-#ifdef RGBLIGHT_EFFECT_ALTERNATING
-void rgblight_effect_alternating(animation_status_t *anim) {
- for (int i = 0; i < rgblight_ranges.effect_num_leds; i++) {
- LED_TYPE *ledp = led + i + rgblight_ranges.effect_start_pos;
- if (i < rgblight_ranges.effect_num_leds / 2 && anim->pos) {
- sethsv(rgblight_config.hue, rgblight_config.sat, rgblight_config.val, ledp);
- } else if (i >= rgblight_ranges.effect_num_leds / 2 && !anim->pos) {
- sethsv(rgblight_config.hue, rgblight_config.sat, rgblight_config.val, ledp);
- } else {
- sethsv(rgblight_config.hue, rgblight_config.sat, 0, ledp);
- }
- }
- rgblight_set();
- anim->pos = (anim->pos + 1) % 2;
-}
-#endif
-
-#ifdef RGBLIGHT_EFFECT_TWINKLE
-__attribute__((weak)) const uint8_t RGBLED_TWINKLE_INTERVALS[] PROGMEM = {50, 25, 10};
-
-typedef struct PACKED {
- HSV hsv;
- uint8_t life;
- bool up;
-} TwinkleState;
-
-static TwinkleState led_twinkle_state[RGBLED_NUM];
-
-void rgblight_effect_twinkle(animation_status_t *anim) {
- bool random_color = anim->delta / 3;
- bool restart = anim->pos == 0;
- anim->pos = 1;
-
- for (uint8_t i = 0; i < rgblight_ranges.effect_num_leds; i++) {
- TwinkleState *t = &(led_twinkle_state[i]);
- HSV * c = &(t->hsv);
- if (restart) {
- // Restart
- t->life = 0;
- t->hsv.v = 0;
- } else if (t->life) {
- // This LED is already on, either brightening or dimming
- t->life--;
- uint8_t on = t->up ? RGBLIGHT_EFFECT_TWINKLE_LIFE - t->life : t->life;
- c->v = (uint16_t)rgblight_config.val * on / RGBLIGHT_EFFECT_TWINKLE_LIFE;
- if (t->life == 0 && t->up) {
- t->up = false;
- t->life = RGBLIGHT_EFFECT_TWINKLE_LIFE;
- }
- if (!random_color) {
- c->h = rgblight_config.hue;
- c->s = rgblight_config.sat;
- }
- } else if (rand() < RAND_MAX * RGBLIGHT_EFFECT_TWINKLE_PROBABILITY) {
- // This LED is off, but was randomly selected to start brightening
- c->h = random_color ? rand() % 0xFF : rgblight_config.hue;
- c->s = random_color ? (rand() % (rgblight_config.sat / 2)) + (rgblight_config.sat / 2) : rgblight_config.sat;
- c->v = 0;
- t->life = RGBLIGHT_EFFECT_TWINKLE_LIFE;
- t->up = true;
- } else {
- // This LED is off, and was NOT selected to start brightening
- }
-
- LED_TYPE *ledp = led + i + rgblight_ranges.effect_start_pos;
- sethsv(c->h, c->s, c->v, ledp);
- }
-
- rgblight_set();
-}
-#endif
diff --git a/keyboards/mxss/rules.mk b/keyboards/mxss/rules.mk
index cc4f0ca926..6e7633bfe0 100644
--- a/keyboards/mxss/rules.mk
+++ b/keyboards/mxss/rules.mk
@@ -1,22 +1 @@
-# Build Options
-# change yes to no to disable
-#
-BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
-MOUSEKEY_ENABLE = yes # Mouse keys
-EXTRAKEY_ENABLE = yes # Audio control and System control
-CONSOLE_ENABLE = no # Console for debug
-COMMAND_ENABLE = yes # Commands for debug and configuration
-NKRO_ENABLE = no # Enable N-Key Rollover
-BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
-AUDIO_ENABLE = no # Audio output
-
-SRC += mxss_frontled.c
-
-# Remove the common RGB light code and use my iteration instead
-COMMON_VPATH += $(QUANTUM_DIR)/rgblight
-OPT_DEFS += -DRGBLIGHT_ENABLE
-SRC += rgblight.c
-SRC += $(QUANTUM_DIR)/color.c
-WS2812_DRIVER_REQUIRED = yes
-CIE1931_CURVE = yes
-RGB_KEYCODES_ENABLE = yes
+# This file intentionally left blank
diff --git a/keyboards/mxss/templates/keymap.c b/keyboards/mxss/templates/keymap.c
deleted file mode 100644
index e16cf44293..0000000000
--- a/keyboards/mxss/templates/keymap.c
+++ /dev/null
@@ -1,35 +0,0 @@
-/* Copyright 2018 REPLACE_WITH_YOUR_NAME
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-#include QMK_KEYBOARD_H
-#include "mxss_frontled.h"
-
-hs_set caps_color = { .hue = 0, .sat = 255 };
-
-// Colors for layers
-// Format: {hue, saturation}
-// {0, 0} to turn off the LED
-// Add additional rows to handle more layers
-hs_set layer_colors[4] = {
- [0] = {.hue = 0, .sat = 0}, // Color for Layer 0
- [1] = {.hue = 86, .sat = 255}, // Color for Layer 1
- [2] = {.hue = 36, .sat = 255}, // Color for Layer 2
- [3] = {.hue = 185, .sat = 255}, // Color for Layer 3
-};
-size_t lc_size = ARRAY_SIZE(layer_colors);
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-__KEYMAP_GOES_HERE__
-};
diff --git a/keyboards/nack/config.h b/keyboards/nack/config.h
index adb2cf5d87..8ac70be2dc 100644
--- a/keyboards/nack/config.h
+++ b/keyboards/nack/config.h
@@ -18,7 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once
#ifdef RGB_MATRIX_ENABLE
- #define WS2812_SPI SPID1
+ #define WS2812_SPI_DRIVER SPID1
#define WS2812_SPI_MOSI_PAL_MODE 5
#define RGB_MATRIX_LED_COUNT 52
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 128 // Max brightness of LEDs
diff --git a/keyboards/neson_design/700e/700e.c b/keyboards/neson_design/700e/700e.c
index cf31b6b72b..7d28dba2bb 100644
--- a/keyboards/neson_design/700e/700e.c
+++ b/keyboards/neson_design/700e/700e.c
@@ -207,7 +207,7 @@ static void self_testing(void)
update_ticks();
}
-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
@@ -322,7 +322,7 @@ void housekeeping_task_kb(void)
} else if (rgb_state.state == CAPS_ALERT) {
if (rgb_state.alert) {
is31fl3731_set_color_all(ALERM_LED_R, ALERM_LED_G, ALERM_LED_B);
- LED_TYPE leds[4];
+ rgb_led_t leds[4];
for (int i = 0; i < 4; i++) {
leds[i].r = ALERM_LED_G;
leds[i].g = ALERM_LED_R;
@@ -331,7 +331,7 @@ void housekeeping_task_kb(void)
ws2812_setleds(leds, 4);
} else {
is31fl3731_set_color_all(0, 0, 0);
- LED_TYPE leds[4] = {0};
+ rgb_led_t leds[4] = {0};
ws2812_setleds(leds, 4);
}
@@ -349,14 +349,14 @@ void housekeeping_task_kb(void)
housekeeping_task_user();
}
-void rgblight_call_driver(LED_TYPE *start_led, uint8_t num_leds)
+void rgblight_call_driver(rgb_led_t *start_led, uint8_t num_leds)
{
if (rgb_state.state != NORMAL) return;
for (uint8_t i = 0; i < RGB_MATRIX_LED_COUNT; i++) {
is31fl3731_set_color(i, start_led[i].r, start_led[i].g, start_led[i].b);
}
- LED_TYPE leds[4];
+ rgb_led_t leds[4];
for (int i = 0; i < 4; i++) {
leds[i].r = start_led[RGB_MATRIX_LED_COUNT+i].g;
leds[i].g = start_led[RGB_MATRIX_LED_COUNT+i].r;
diff --git a/keyboards/neson_design/700e/config.h b/keyboards/neson_design/700e/config.h
index cf89616aa8..64af470bac 100644
--- a/keyboards/neson_design/700e/config.h
+++ b/keyboards/neson_design/700e/config.h
@@ -32,9 +32,9 @@
#define DRIVER_1_LED_TOTAL 32
#define DRIVER_2_LED_TOTAL 32
-#define DRIVER_ADDR_1 0b1110100
-#define DRIVER_ADDR_2 0b1110111
-#define DRIVER_COUNT 2
+#define DRIVER_ADDR_1 IS31FL3731_I2C_ADDRESS_GND
+#define DRIVER_ADDR_2 IS31FL3731_I2C_ADDRESS_VCC
+#define IS31FL3731_DRIVER_COUNT 2
#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL+DRIVER_2_LED_TOTAL)
#define USB_SUSPEND_WAKEUP_DELAY 1000
diff --git a/keyboards/neson_design/700e/rules.mk b/keyboards/neson_design/700e/rules.mk
index 6e1439f1f5..5650ed1fee 100644
--- a/keyboards/neson_design/700e/rules.mk
+++ b/keyboards/neson_design/700e/rules.mk
@@ -11,4 +11,5 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
NO_USB_STARTUP_CHECK = yes
-QUANTUM_LIB_SRC += i2c_master.c drivers/led/issi/is31fl3731.c
+QUANTUM_LIB_SRC += drivers/led/issi/is31fl3731.c
+I2C_DRIVER_REQUIRED = yes
diff --git a/keyboards/neson_design/n6/config.h b/keyboards/neson_design/n6/config.h
index 91d96c6a4d..50eda4e586 100644
--- a/keyboards/neson_design/n6/config.h
+++ b/keyboards/neson_design/n6/config.h
@@ -32,7 +32,7 @@
#define DRIVER_1_LED_TOTAL 32
#define DRIVER_2_LED_TOTAL 32
-#define DRIVER_ADDR_1 0b1110100
-#define DRIVER_ADDR_2 0b1110111
-#define DRIVER_COUNT 2
+#define DRIVER_ADDR_1 IS31FL3731_I2C_ADDRESS_GND
+#define DRIVER_ADDR_2 IS31FL3731_I2C_ADDRESS_VCC
+#define IS31FL3731_DRIVER_COUNT 2
#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL+DRIVER_2_LED_TOTAL)
diff --git a/keyboards/neson_design/n6/n6.c b/keyboards/neson_design/n6/n6.c
index cf99404641..4d655453cb 100644
--- a/keyboards/neson_design/n6/n6.c
+++ b/keyboards/neson_design/n6/n6.c
@@ -211,7 +211,7 @@ static void self_testing(void)
update_ticks();
}
-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
@@ -320,7 +320,7 @@ void housekeeping_task_kb(void)
self_testing();
} else if (rgb_state.state == CAPS_ALERT) {
//gold 0xFF, 0xD9, 0x00
- LED_TYPE led = {
+ rgb_led_t led = {
.r = 0xFF,
//.g = 0xD9,
.g = 0xA5,
@@ -351,7 +351,7 @@ void housekeeping_task_kb(void)
housekeeping_task_user();
}
-void rgblight_call_driver(LED_TYPE *start_led, uint8_t num_leds)
+void rgblight_call_driver(rgb_led_t *start_led, uint8_t num_leds)
{
if (rgb_state.state != NORMAL) return;
diff --git a/keyboards/neson_design/n6/rules.mk b/keyboards/neson_design/n6/rules.mk
index 5d8397653e..a3e4abe6cd 100644
--- a/keyboards/neson_design/n6/rules.mk
+++ b/keyboards/neson_design/n6/rules.mk
@@ -10,4 +10,5 @@ NKRO_ENABLE = yes # Enable N-Key Rollover
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
-QUANTUM_LIB_SRC += i2c_master.c drivers/led/issi/is31fl3731.c
+QUANTUM_LIB_SRC += drivers/led/issi/is31fl3731.c
+I2C_DRIVER_REQUIRED = yes
diff --git a/keyboards/neson_design/nico/nico.c b/keyboards/neson_design/nico/nico.c
index 63f08b8639..b4d15777b7 100644
--- a/keyboards/neson_design/nico/nico.c
+++ b/keyboards/neson_design/nico/nico.c
@@ -22,7 +22,7 @@
static bool alert = false;
static bool backup = false;
-static LED_TYPE caps_led;
+static rgb_led_t caps_led;
static uint16_t last_ticks = 0;
#define ALERT_INTERVAL 500
@@ -66,7 +66,7 @@ void housekeeping_task_kb(void)
housekeeping_task_user();
}
-void rgblight_call_driver(LED_TYPE *start_led, uint8_t num_leds)
+void rgblight_call_driver(rgb_led_t *start_led, uint8_t num_leds)
{
start_led[2].r = start_led[0].r;
start_led[2].g = start_led[0].g;
diff --git a/keyboards/novelkeys/nk65/config.h b/keyboards/novelkeys/nk65/config.h
index 1afa3fe95b..80327af491 100755
--- a/keyboards/novelkeys/nk65/config.h
+++ b/keyboards/novelkeys/nk65/config.h
@@ -50,7 +50,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 }
#define RGB_BACKLIGHT_COLOR_2 { .h = 127, .s = 255 }
-#define DRIVER_COUNT 2
+#define IS31FL3733_DRIVER_COUNT 2
#define RGB_MATRIX_LED_COUNT 128
// These define which keys in the matrix are alphas/mods
diff --git a/keyboards/novelkeys/nk65/rules.mk b/keyboards/novelkeys/nk65/rules.mk
index e9036ebb61..d71d9a6c4e 100755
--- a/keyboards/novelkeys/nk65/rules.mk
+++ b/keyboards/novelkeys/nk65/rules.mk
@@ -22,7 +22,7 @@ CIE1931_CURVE = yes
SRC = keyboards/wilba_tech/wt_main.c \
keyboards/wilba_tech/wt_rgb_backlight.c \
drivers/led/issi/is31fl3733.c \
- quantum/color.c \
- i2c_master.c
+ quantum/color.c
+I2C_DRIVER_REQUIRED = yes
DEFAULT_FOLDER = novelkeys/nk65/base
diff --git a/keyboards/novelkeys/nk87/config.h b/keyboards/novelkeys/nk87/config.h
index d0e973bb43..d2949ef6d3 100755
--- a/keyboards/novelkeys/nk87/config.h
+++ b/keyboards/novelkeys/nk87/config.h
@@ -50,7 +50,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 }
#define RGB_BACKLIGHT_COLOR_2 { .h = 127, .s = 255 }
-#define DRIVER_COUNT 2
+#define IS31FL3733_DRIVER_COUNT 2
#define RGB_MATRIX_LED_COUNT 128
// These define which keys in the matrix are alphas/mods
diff --git a/keyboards/novelkeys/nk87/rules.mk b/keyboards/novelkeys/nk87/rules.mk
index 288d802054..a0a09c1dab 100755
--- a/keyboards/novelkeys/nk87/rules.mk
+++ b/keyboards/novelkeys/nk87/rules.mk
@@ -22,5 +22,5 @@ CIE1931_CURVE = yes
SRC = keyboards/wilba_tech/wt_main.c \
keyboards/wilba_tech/wt_rgb_backlight.c \
drivers/led/issi/is31fl3733.c \
- quantum/color.c \
- i2c_master.c
+ quantum/color.c
+I2C_DRIVER_REQUIRED = yes
diff --git a/keyboards/novelkeys/nk_plus/info.json b/keyboards/novelkeys/nk_plus/info.json
index f6fad60b01..51a23057c4 100755
--- a/keyboards/novelkeys/nk_plus/info.json
+++ b/keyboards/novelkeys/nk_plus/info.json
@@ -109,6 +109,7 @@
"max_brightness": 120
},
"ws2812": {
+ "driver": "pwm",
"pin": "B4"
},
"layout_aliases": {
diff --git a/keyboards/novelkeys/nk_plus/rules.mk b/keyboards/novelkeys/nk_plus/rules.mk
index 928a45cfae..0ab54aaaf7 100644
--- a/keyboards/novelkeys/nk_plus/rules.mk
+++ b/keyboards/novelkeys/nk_plus/rules.mk
@@ -1,7 +1,2 @@
# Wildcard to allow APM32 MCU
DFU_SUFFIX_ARGS = -v FFFF -p FFFF
-
-# Build Options
-# change yes to no to disable
-#
-WS2812_DRIVER = pwm # Per-key RGB MCU Driver
diff --git a/keyboards/nullbitsco/nibble/rules.mk b/keyboards/nullbitsco/nibble/rules.mk
index 0d5d3e2aac..5a1714cc9d 100644
--- a/keyboards/nullbitsco/nibble/rules.mk
+++ b/keyboards/nullbitsco/nibble/rules.mk
@@ -19,4 +19,4 @@ SRC += matrix.c \
common/bitc_led.c \
big_led.c \
common/remote_kb.c
-QUANTUM_LIB_SRC += uart.c
+UART_DRIVER_REQUIRED = yes
diff --git a/keyboards/nullbitsco/snap/rules.mk b/keyboards/nullbitsco/snap/rules.mk
index 79ba7d6eb6..2ad88b97c0 100644
--- a/keyboards/nullbitsco/snap/rules.mk
+++ b/keyboards/nullbitsco/snap/rules.mk
@@ -19,5 +19,5 @@ CUSTOM_MATRIX = lite # Split custom matrix
# Project specific files
SRC += common/bitc_led.c \
common/remote_kb.c \
- matrix.c \
- uart.c
+ matrix.c
+UART_DRIVER_REQUIRED = yes
diff --git a/keyboards/nullbitsco/tidbit/rules.mk b/keyboards/nullbitsco/tidbit/rules.mk
index 3b7ff078bb..b4a06216bb 100644
--- a/keyboards/nullbitsco/tidbit/rules.mk
+++ b/keyboards/nullbitsco/tidbit/rules.mk
@@ -16,5 +16,5 @@ LTO_ENABLE = yes
# Project specific files
SRC += common/bitc_led.c \
common/remote_kb.c
-QUANTUM_LIB_SRC += i2c_master.c \
- uart.c
+I2C_DRIVER_REQUIRED = yes
+UART_DRIVER_REQUIRED = yes
diff --git a/keyboards/oddforge/vea/rules.mk b/keyboards/oddforge/vea/rules.mk
index f616b9400e..b0c02543b1 100644
--- a/keyboards/oddforge/vea/rules.mk
+++ b/keyboards/oddforge/vea/rules.mk
@@ -12,4 +12,4 @@ RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
# custom matrix setup
CUSTOM_MATRIX = lite
SRC = matrix.c
-QUANTUM_LIB_SRC += i2c_master.c
+I2C_DRIVER_REQUIRED = yes
diff --git a/keyboards/oddforge/vea/ws2812_custom.c b/keyboards/oddforge/vea/ws2812_custom.c
index 0dc5a2d0f1..f52c8d06a8 100644
--- a/keyboards/oddforge/vea/ws2812_custom.c
+++ b/keyboards/oddforge/vea/ws2812_custom.c
@@ -22,13 +22,13 @@ void ws2812_init(void) {
}
// Setleds for standard RGB
-void ws2812_setleds(LED_TYPE *ledarray, uint16_t leds) {
+void ws2812_setleds(rgb_led_t *ledarray, uint16_t leds) {
static bool s_init = false;
if (!s_init) {
ws2812_init();
s_init = true;
}
- i2c_transmit(WS2812_I2C_ADDRESS, (uint8_t *)ledarray, sizeof(LED_TYPE) * (leds >> 1), WS2812_I2C_TIMEOUT);
- i2c_transmit(WS2812_I2C_ADDRESS_RIGHT, (uint8_t *)ledarray+(sizeof(LED_TYPE) * (leds >> 1)), sizeof(LED_TYPE) * (leds - (leds >> 1)), WS2812_I2C_TIMEOUT);
+ i2c_transmit(WS2812_I2C_ADDRESS, (uint8_t *)ledarray, sizeof(rgb_led_t) * (leds >> 1), WS2812_I2C_TIMEOUT);
+ i2c_transmit(WS2812_I2C_ADDRESS_RIGHT, (uint8_t *)ledarray+(sizeof(rgb_led_t) * (leds >> 1)), sizeof(rgb_led_t) * (leds - (leds >> 1)), WS2812_I2C_TIMEOUT);
}
diff --git a/keyboards/onekeyco/dango40/config.h b/keyboards/onekeyco/dango40/config.h
deleted file mode 100644
index b7488fcb75..0000000000
--- a/keyboards/onekeyco/dango40/config.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
-Copyright 2021 Swiftrax <swiftrax@gmail.com>
-
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#pragma once
-
-/*EEPROM for via*/
-#define DYNAMIC_KEYMAP_LAYER_COUNT 5 \ No newline at end of file
diff --git a/keyboards/onekeyco/dango40/info.json b/keyboards/onekeyco/dango40/info.json
index eba683dafc..c9087c630a 100644
--- a/keyboards/onekeyco/dango40/info.json
+++ b/keyboards/onekeyco/dango40/info.json
@@ -13,6 +13,9 @@
"rows": ["F4", "F1", "F0", "C6"]
},
"diode_direction": "COL2ROW",
+ "dynamic_keymap": {
+ "layer_count": 5
+ },
"encoder": {
"rotary": [
{"pin_a": "D2", "pin_b": "D1"}
diff --git a/keyboards/opendeck/32/rev1/config.h b/keyboards/opendeck/32/rev1/config.h
index a85a3db8b9..2857ef04b1 100644
--- a/keyboards/opendeck/32/rev1/config.h
+++ b/keyboards/opendeck/32/rev1/config.h
@@ -16,8 +16,8 @@
#pragma once
// RGB matrix
-#define DRIVER_ADDR_1 0b1110100
-#define DRIVER_COUNT 1
+#define DRIVER_ADDR_1 IS31FL3731_I2C_ADDRESS_GND
+#define IS31FL3731_DRIVER_COUNT 1
#define RGB_MATRIX_LED_COUNT (4 * 8 * 3)
#define RGB_DISABLE_WHEN_USB_SUSPENDED
#define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_CYCLE_SPIRAL
diff --git a/keyboards/opendeck/32/rev1/rev1.c b/keyboards/opendeck/32/rev1/rev1.c
index 5d546afb29..0b062ecd38 100644
--- a/keyboards/opendeck/32/rev1/rev1.c
+++ b/keyboards/opendeck/32/rev1/rev1.c
@@ -17,7 +17,7 @@
#include "rev1.h"
#ifdef RGB_MATRIX_ENABLE
-const is31_led 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/keyboards/owlab/voice65/hotswap/config.h b/keyboards/owlab/voice65/hotswap/config.h
index 04bd741d77..50876e8302 100644
--- a/keyboards/owlab/voice65/hotswap/config.h
+++ b/keyboards/owlab/voice65/hotswap/config.h
@@ -29,8 +29,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
# define RGB_MATRIX_LED_FLUSH_LIMIT 26
# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200
# define RGB_MATRIX_DEFAULT_VAL 128
-# define DRIVER_ADDR_1 0b0110000
-# define DRIVER_COUNT 1
+# define DRIVER_ADDR_1 IS31FL3741_I2C_ADDRESS_GND
+# define IS31FL3741_DRIVER_COUNT 1
# define RGB_MATRIX_LED_COUNT 67
// RGB Matrix Animation modes. Explicitly enabled
// For full list of effects, see:
diff --git a/keyboards/owlab/voice65/hotswap/hotswap.c b/keyboards/owlab/voice65/hotswap/hotswap.c
index 65c0ee7eed..b4c0c02c32 100644
--- a/keyboards/owlab/voice65/hotswap/hotswap.c
+++ b/keyboards/owlab/voice65/hotswap/hotswap.c
@@ -17,7 +17,7 @@
#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
-const is31_led g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3741_led_t g_is31fl3741_leds[RGB_MATRIX_LED_COUNT] = {
{0, CS3_SW1, CS2_SW1, CS1_SW1}, /* RGB0-ESC ROW0*/
{0, CS6_SW1, CS5_SW1, CS4_SW1}, /* RGB1-1 */
{0, CS9_SW1, CS8_SW1, CS7_SW1}, /* RGB2-2 */
diff --git a/keyboards/owlab/voice65/soldered/config.h b/keyboards/owlab/voice65/soldered/config.h
index 66e412effb..ab66f4368d 100644
--- a/keyboards/owlab/voice65/soldered/config.h
+++ b/keyboards/owlab/voice65/soldered/config.h
@@ -29,8 +29,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
# define RGB_MATRIX_LED_FLUSH_LIMIT 26
# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200
# define RGB_MATRIX_DEFAULT_VAL 128
-# define DRIVER_ADDR_1 0b0110000
-# define DRIVER_COUNT 1
+# define DRIVER_ADDR_1 IS31FL3741_I2C_ADDRESS_GND
+# define IS31FL3741_DRIVER_COUNT 1
# define RGB_MATRIX_LED_COUNT 71
// RGB Matrix Animation modes. Explicitly enabled
diff --git a/keyboards/owlab/voice65/soldered/soldered.c b/keyboards/owlab/voice65/soldered/soldered.c
index 1444b05864..301a5adc59 100644
--- a/keyboards/owlab/voice65/soldered/soldered.c
+++ b/keyboards/owlab/voice65/soldered/soldered.c
@@ -17,7 +17,7 @@
#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
-const is31_led g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3741_led_t g_is31fl3741_leds[RGB_MATRIX_LED_COUNT] = {
{0, CS3_SW1, CS2_SW1, CS1_SW1}, /* RGB0-ESC ROW0*/
{0, CS6_SW1, CS5_SW1, CS4_SW1}, /* RGB1-1 */
{0, CS9_SW1, CS8_SW1, CS7_SW1}, /* RGB2-2 */
diff --git a/keyboards/phage_studio/pila87/rules.mk b/keyboards/phage_studio/pila87/rules.mk
index cd96ec2c2c..25fb7ed8c0 100644
--- a/keyboards/phage_studio/pila87/rules.mk
+++ b/keyboards/phage_studio/pila87/rules.mk
@@ -16,7 +16,3 @@ AUDIO_ENABLE = no # Audio output
# RGB Matrix enabled
RGB_MATRIX_ENABLE = yes
-
-# Wear-levelling driver
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = embedded_flash
diff --git a/keyboards/phoenix/config.h b/keyboards/phoenix/config.h
index 76ac0edf2c..9241950731 100644
--- a/keyboards/phoenix/config.h
+++ b/keyboards/phoenix/config.h
@@ -26,7 +26,6 @@
/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE
-#define HAL_USE_SERIAL TRUE
#define SPLIT_HAND_PIN B9
#define SERIAL_USART_DRIVER SD1
#define SERIAL_USART_TX_PAL_MODE 7
diff --git a/keyboards/phoenix/halconf.h b/keyboards/phoenix/halconf.h
index 2527d38940..95bd6c565f 100644
--- a/keyboards/phoenix/halconf.h
+++ b/keyboards/phoenix/halconf.h
@@ -21,6 +21,8 @@
#pragma once
+#define HAL_USE_SERIAL TRUE
+
#define SERIAL_USB_BUFFERS_SIZE 256
#include_next <halconf.h>
diff --git a/keyboards/planck/ez/config.h b/keyboards/planck/ez/config.h
index 7cfc65d509..f4998282e6 100644
--- a/keyboards/planck/ez/config.h
+++ b/keyboards/planck/ez/config.h
@@ -50,9 +50,9 @@
//#define WS2812_DMA_CHANNEL 7 // DMA channel for TIMx_UP
//#define WS2812_EXTERNAL_PULLUP
-#define DRIVER_ADDR_1 0b1010000
+#define DRIVER_ADDR_1 IS31FL3737_I2C_ADDRESS_GND
-#define DRIVER_COUNT 1
+#define IS31FL3737_DRIVER_COUNT 1
#define RGB_MATRIX_LED_COUNT 47
#define RGB_MATRIX_KEYPRESSES
diff --git a/keyboards/planck/ez/ez.c b/keyboards/planck/ez/ez.c
index e6bd217520..dfadb820ae 100644
--- a/keyboards/planck/ez/ez.c
+++ b/keyboards/planck/ez/ez.c
@@ -21,7 +21,7 @@
keyboard_config_t keyboard_config;
#ifdef RGB_MATRIX_ENABLE
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3737_led_t PROGMEM g_is31fl3737_leds[RGB_MATRIX_LED_COUNT] = {
/* Refer to IS31 manual for these locations
* driver
* | R location
diff --git a/keyboards/planck/light/config.h b/keyboards/planck/light/config.h
index d4001dd80b..20c729ec51 100644
--- a/keyboards/planck/light/config.h
+++ b/keyboards/planck/light/config.h
@@ -7,17 +7,10 @@
#define PLANCK_MIT_LAYOUT
-// This is a 7-bit address, that gets left-shifted and bit 0
-// set to 0 for write, 1 for read (as per I2C protocol)
-// The address will vary depending on your wiring:
-// 0b1110100 AD <-> GND
-// 0b1110111 AD <-> VCC
-// 0b1110101 AD <-> SCL
-// 0b1110110 AD <-> SDA
-#define DRIVER_ADDR_1 0b1110100
-#define DRIVER_ADDR_2 0b1110110
+#define DRIVER_ADDR_1 IS31FL3731_I2C_ADDRESS_GND
+#define DRIVER_ADDR_2 IS31FL3731_I2C_ADDRESS_SDA
-#define DRIVER_COUNT 2
+#define IS31FL3731_DRIVER_COUNT 2
#define DRIVER_1_LED_TOTAL 25
#define DRIVER_2_LED_TOTAL 24
#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
diff --git a/keyboards/planck/light/light.c b/keyboards/planck/light/light.c
index 1fc6a65c0c..828319c66d 100644
--- a/keyboards/planck/light/light.c
+++ b/keyboards/planck/light/light.c
@@ -16,7 +16,7 @@
#include "quantum.h"
-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/keyboards/playkbtw/pk64rgb/config.h b/keyboards/playkbtw/pk64rgb/config.h
index bb28749d94..bd4d53d0b5 100644
--- a/keyboards/playkbtw/pk64rgb/config.h
+++ b/keyboards/playkbtw/pk64rgb/config.h
@@ -23,8 +23,8 @@
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 160
#define RGB_MATRIX_LED_PROCESS_LIMIT 20
#define RGB_MATRIX_LED_FLUSH_LIMIT 26
- #define DRIVER_ADDR_1 0b1010000
- #define DRIVER_COUNT 1
+ #define DRIVER_ADDR_1 IS31FL3733_I2C_ADDRESS_GND_GND
+ #define IS31FL3733_DRIVER_COUNT 1
#define RGB_MATRIX_LED_COUNT 64
diff --git a/keyboards/playkbtw/pk64rgb/pk64rgb.c b/keyboards/playkbtw/pk64rgb/pk64rgb.c
index d4c6702472..427d1cf04e 100644
--- a/keyboards/playkbtw/pk64rgb/pk64rgb.c
+++ b/keyboards/playkbtw/pk64rgb/pk64rgb.c
@@ -17,7 +17,7 @@
#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3733_led_t PROGMEM g_is31fl3733_leds[RGB_MATRIX_LED_COUNT] = {
/* Refer to IS31 manual for these locations
* driver
* | R location
diff --git a/keyboards/plywrks/ply8x/config.h b/keyboards/plywrks/ply8x/config.h
index 2180b9887f..cccedf8e23 100644
--- a/keyboards/plywrks/ply8x/config.h
+++ b/keyboards/plywrks/ply8x/config.h
@@ -4,7 +4,7 @@
#pragma once
/* RGB */
-#define WS2812_SPI SPID2
+#define WS2812_SPI_DRIVER SPID2
#define WS2812_SPI_MOSI_PAL_MODE 0
#define WS2812_SPI_SCK_PIN B13
#define WS2812_SPI_SCK_PAL_MODE 0
diff --git a/keyboards/primekb/meridian/config.h b/keyboards/primekb/meridian/config.h
index 3bb4f22006..8593536eec 100644
--- a/keyboards/primekb/meridian/config.h
+++ b/keyboards/primekb/meridian/config.h
@@ -17,7 +17,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once
-#define WS2812_SPI SPID2
+#define WS2812_SPI_DRIVER SPID2
#define WS2812_SPI_MOSI_PAL_MODE 0
#define WS2812_SPI_SCK_PAL_MODE 0
#define WS2812_SPI_SCK_PIN B13
diff --git a/keyboards/primekb/meridian/ws2812/config.h b/keyboards/primekb/meridian/ws2812/config.h
index 3bb4f22006..8593536eec 100644
--- a/keyboards/primekb/meridian/ws2812/config.h
+++ b/keyboards/primekb/meridian/ws2812/config.h
@@ -17,7 +17,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once
-#define WS2812_SPI SPID2
+#define WS2812_SPI_DRIVER SPID2
#define WS2812_SPI_MOSI_PAL_MODE 0
#define WS2812_SPI_SCK_PAL_MODE 0
#define WS2812_SPI_SCK_PIN B13
diff --git a/keyboards/primekb/prime_e/config.h b/keyboards/primekb/prime_e/config.h
index e3e1572d99..6c8ce4c0ea 100644
--- a/keyboards/primekb/prime_e/config.h
+++ b/keyboards/primekb/prime_e/config.h
@@ -21,5 +21,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define LOCKING_SUPPORT_ENABLE
/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE
-
-#define DYNAMIC_KEYMAP_LAYER_COUNT 8
diff --git a/keyboards/primekb/prime_e/info.json b/keyboards/primekb/prime_e/info.json
index f94271be6c..dee7a23e02 100644
--- a/keyboards/primekb/prime_e/info.json
+++ b/keyboards/primekb/prime_e/info.json
@@ -10,6 +10,9 @@
"rows": ["E6", "C7", "B5", "B4"]
},
"diode_direction": "COL2ROW",
+ "dynamic_keymap": {
+ "layer_count": 8
+ },
"processor": "atmega32u4",
"bootloader": "atmel-dfu",
"layouts": {
diff --git a/keyboards/projectd/65/projectd_65_ansi/config.h b/keyboards/projectd/65/projectd_65_ansi/config.h
index 312a72979f..4d1dc100d8 100644
--- a/keyboards/projectd/65/projectd_65_ansi/config.h
+++ b/keyboards/projectd/65/projectd_65_ansi/config.h
@@ -25,7 +25,6 @@
/* External spi flash */
#define EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN B14
-#define WEAR_LEVELING_BACKING_SIZE (4 * 1024)
/* SPI Config for LED Driver */
#define SPI_DRIVER SPIDQ
@@ -33,10 +32,10 @@
#define SPI_MOSI_PIN A7
#define SPI_MISO_PIN A6
-#define DRIVER_1_CS A15
-#define DRIVER_2_CS B15
-#define DRIVER_1_EN C13
-#define DRIVER_2_EN C13
+#define AW20216S_DRIVER_1_CS A15
+#define AW20216S_DRIVER_2_CS B15
+#define AW20216S_DRIVER_1_EN C13
+#define AW20216S_DRIVER_2_EN C13
-#define DRIVER_COUNT 1
+#define AW20216S_DRIVER_COUNT 1
#define RGB_MATRIX_LED_COUNT 71
diff --git a/keyboards/projectd/65/projectd_65_ansi/info.json b/keyboards/projectd/65/projectd_65_ansi/info.json
index 0c8b9585bb..861e3792db 100644
--- a/keyboards/projectd/65/projectd_65_ansi/info.json
+++ b/keyboards/projectd/65/projectd_65_ansi/info.json
@@ -10,6 +10,13 @@
"dynamic_keymap": {
"layer_count": 13
},
+ "eeprom": {
+ "driver": "wear_leveling",
+ "wear_leveling": {
+ "driver": "spi_flash",
+ "backing_size": 4096
+ }
+ },
"features": {
"bootmagic": true,
"command": false,
@@ -74,7 +81,7 @@
"solid_multisplash": true
},
"center_point": [76, 25],
- "driver": "aw20216",
+ "driver": "aw20216s",
"layout": [
{ "flags": 4, "matrix": [1, 3], "x": 0, "y": 0 },
{ "flags": 4, "matrix": [1, 7], "x": 10, "y": 0 },
diff --git a/keyboards/projectd/65/projectd_65_ansi/projectd_65_ansi.c b/keyboards/projectd/65/projectd_65_ansi/projectd_65_ansi.c
index 6027128a96..0d6123ac01 100644
--- a/keyboards/projectd/65/projectd_65_ansi/projectd_65_ansi.c
+++ b/keyboards/projectd/65/projectd_65_ansi/projectd_65_ansi.c
@@ -18,8 +18,8 @@
#ifdef RGB_MATRIX_ENABLE
-const aw_led g_aw_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to IS31 manual for these locations
+const aw20216s_led_t g_aw20216s_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to AW20216S manual for these locations
* driver
* | R location
* | | G location
diff --git a/keyboards/projectd/65/projectd_65_ansi/rules.mk b/keyboards/projectd/65/projectd_65_ansi/rules.mk
index 24d5f6f52e..6e7633bfe0 100644
--- a/keyboards/projectd/65/projectd_65_ansi/rules.mk
+++ b/keyboards/projectd/65/projectd_65_ansi/rules.mk
@@ -1,2 +1 @@
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = spi_flash
+# This file intentionally left blank
diff --git a/keyboards/projectkb/alice/rev1/config.h b/keyboards/projectkb/alice/rev1/config.h
index 2692965fbf..dca7542513 100644
--- a/keyboards/projectkb/alice/rev1/config.h
+++ b/keyboards/projectkb/alice/rev1/config.h
@@ -26,7 +26,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE
-#define WS2812_SPI SPID2
+#define WS2812_SPI_DRIVER SPID2
#define WS2812_SPI_MOSI_PAL_MODE 0
#define WS2812_SPI_SCK_PAL_MODE 0
#define WS2812_SPI_SCK_PIN B13
diff --git a/keyboards/projectkb/alice/rev2/config.h b/keyboards/projectkb/alice/rev2/config.h
index 8bb661f90b..f5d9ca0c3e 100644
--- a/keyboards/projectkb/alice/rev2/config.h
+++ b/keyboards/projectkb/alice/rev2/config.h
@@ -26,7 +26,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE
-#define WS2812_SPI SPID2
+#define WS2812_SPI_DRIVER SPID2
#define WS2812_SPI_MOSI_PAL_MODE 0
#define WS2812_SPI_SCK_PAL_MODE 0
#define WS2812_SPI_SCK_PIN B13
diff --git a/keyboards/pteron36/config.h b/keyboards/pteron36/config.h
index 1148463200..72b4ea84e7 100644
--- a/keyboards/pteron36/config.h
+++ b/keyboards/pteron36/config.h
@@ -37,6 +37,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
//#define NO_ACTION_LAYER
//#define NO_ACTION_TAPPING
//#define NO_ACTION_ONESHOT
-
-// for via
-#define DYNAMIC_KEYMAP_LAYER_COUNT 7
diff --git a/keyboards/pteron36/info.json b/keyboards/pteron36/info.json
index 418ca0f6b8..76b6e59647 100644
--- a/keyboards/pteron36/info.json
+++ b/keyboards/pteron36/info.json
@@ -13,6 +13,9 @@
"rows": ["E6", "D7", "B4", "B5"]
},
"diode_direction": "ROW2COL",
+ "dynamic_keymap": {
+ "layer_count": 7
+ },
"encoder": {
"rotary": [
{"pin_a": "F5", "pin_b": "F4"}
diff --git a/keyboards/qvex/lynepad2/config.h b/keyboards/qvex/lynepad2/config.h
index 7b9d3ce306..9e1f70b38b 100644
--- a/keyboards/qvex/lynepad2/config.h
+++ b/keyboards/qvex/lynepad2/config.h
@@ -16,8 +16,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once
-#define DYNAMIC_KEYMAP_LAYER_COUNT 5
-
//Digital joystick (4-way switch + encoder)
#define PIN_JU D4
#define PIN_JD B6
diff --git a/keyboards/qvex/lynepad2/info.json b/keyboards/qvex/lynepad2/info.json
index 4230fd63e0..7919c2adc2 100644
--- a/keyboards/qvex/lynepad2/info.json
+++ b/keyboards/qvex/lynepad2/info.json
@@ -15,6 +15,9 @@
"vid": "0x04D8",
"pid": "0xE678"
},
+ "dynamic_keymap": {
+ "layer_count": 5
+ },
"encoder": {
"rotary": [
{"pin_a": "D6", "pin_b": "B5", "resolution": 2},
diff --git a/keyboards/rart/rartlice/config.h b/keyboards/rart/rartlice/config.h
index 9673097c38..116f8d544b 100644
--- a/keyboards/rart/rartlice/config.h
+++ b/keyboards/rart/rartlice/config.h
@@ -22,7 +22,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE
-#define WS2812_SPI SPID2
+#define WS2812_SPI_DRIVER SPID2
/*
* Feature disable options
diff --git a/keyboards/redox_w/rules.mk b/keyboards/redox_w/rules.mk
index 32eca4db31..f543b5fd9a 100644
--- a/keyboards/redox_w/rules.mk
+++ b/keyboards/redox_w/rules.mk
@@ -14,4 +14,4 @@ CUSTOM_MATRIX = lite
# project specific files
SRC += matrix.c
-QUANTUM_LIB_SRC += uart.c
+UART_DRIVER_REQUIRED = yes
diff --git a/keyboards/redragon/k667/config.h b/keyboards/redragon/k667/config.h
index e17865a403..938befa8fc 100644
--- a/keyboards/redragon/k667/config.h
+++ b/keyboards/redragon/k667/config.h
@@ -17,10 +17,10 @@
#pragma once
-#define DRIVER_ADDR_1 0b1010000
-#define DRIVER_ADDR_2 0b1010011
+#define DRIVER_ADDR_1 IS31FL3733_I2C_ADDRESS_GND_GND
+#define DRIVER_ADDR_2 IS31FL3733_I2C_ADDRESS_GND_VCC
-#define DRIVER_COUNT 2
+#define IS31FL3733_DRIVER_COUNT 2
#define DRIVER_1_LED_TOTAL 45
#define DRIVER_2_LED_TOTAL 45
diff --git a/keyboards/redragon/k667/k667.c b/keyboards/redragon/k667/k667.c
index 81aeef4494..629e120b7b 100644
--- a/keyboards/redragon/k667/k667.c
+++ b/keyboards/redragon/k667/k667.c
@@ -17,7 +17,7 @@
#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3733_led_t PROGMEM g_is31fl3733_leds[RGB_MATRIX_LED_COUNT] = {
{0, G_1, I_1, H_1},
{0, G_3, I_3, H_3},
{0, G_4, I_4, H_4},
diff --git a/keyboards/rgbkb/mun/config.h b/keyboards/rgbkb/mun/config.h
index fd2e366614..baf495b534 100644
--- a/keyboards/rgbkb/mun/config.h
+++ b/keyboards/rgbkb/mun/config.h
@@ -119,6 +119,3 @@
#define TOUCH_UPDATE_INTERVAL 33
#define OLED_UPDATE_INTERVAL 33
-
-#define WEAR_LEVELING_BACKING_SIZE 4096
-#define WEAR_LEVELING_LOGICAL_SIZE 2048
diff --git a/keyboards/rgbkb/mun/rev1/info.json b/keyboards/rgbkb/mun/rev1/info.json
index 5d380de5c7..91b60e76c3 100644
--- a/keyboards/rgbkb/mun/rev1/info.json
+++ b/keyboards/rgbkb/mun/rev1/info.json
@@ -37,6 +37,11 @@
"io_delay": 5
},
"diode_direction": "COL2ROW",
+ "eeprom": {
+ "wear_leveling": {
+ "backing_size": 4096
+ }
+ },
"encoder": {
"rotary": [
{"pin_a": "B8", "pin_b": "A14"},
diff --git a/keyboards/rgbkb/mun/rules.mk b/keyboards/rgbkb/mun/rules.mk
index 18dfc8edf7..4269e3b0a1 100644
--- a/keyboards/rgbkb/mun/rules.mk
+++ b/keyboards/rgbkb/mun/rules.mk
@@ -2,7 +2,7 @@
VPATH += keyboards/rgbkb/common
SRC += touch_encoder.c
SRC += common_oled.c
-QUANTUM_LIB_SRC += i2c_master.c
+I2C_DRIVER_REQUIRED = yes
# Build Options
# change yes to no to disable
diff --git a/keyboards/rgbkb/pan/pan.c b/keyboards/rgbkb/pan/pan.c
index 023c766de6..d175be3641 100644
--- a/keyboards/rgbkb/pan/pan.c
+++ b/keyboards/rgbkb/pan/pan.c
@@ -22,7 +22,7 @@
# include "ws2812.h"
// LED color buffer
-LED_TYPE rgb_matrix_ws2812_array[RGB_MATRIX_LED_COUNT];
+rgb_led_t rgb_matrix_ws2812_array[RGB_MATRIX_LED_COUNT];
static void init(void) {}
diff --git a/keyboards/rgbkb/sol3/config.h b/keyboards/rgbkb/sol3/config.h
index 3a0b61bfd5..575e5bcd95 100644
--- a/keyboards/rgbkb/sol3/config.h
+++ b/keyboards/rgbkb/sol3/config.h
@@ -125,6 +125,3 @@
#define AUDIO_CLICKY
#define AUDIO_DAC_SAMPLE_WAVEFORM_SQUARE
#define AUDIO_DAC_OFF_VALUE 0
-
-#define WEAR_LEVELING_BACKING_SIZE 4096
-#define WEAR_LEVELING_LOGICAL_SIZE 2048
diff --git a/keyboards/rgbkb/sol3/rev1/info.json b/keyboards/rgbkb/sol3/rev1/info.json
index b80161995f..7d3db933a8 100644
--- a/keyboards/rgbkb/sol3/rev1/info.json
+++ b/keyboards/rgbkb/sol3/rev1/info.json
@@ -37,6 +37,11 @@
"io_delay": 5
},
"diode_direction": "COL2ROW",
+ "eeprom": {
+ "wear_leveling": {
+ "backing_size": 4096
+ }
+ },
"encoder": {
"rotary": [
{"pin_a": "A1", "pin_b": "A2"},
diff --git a/keyboards/rgbkb/sol3/rules.mk b/keyboards/rgbkb/sol3/rules.mk
index 9cb54cfa15..227219e302 100644
--- a/keyboards/rgbkb/sol3/rules.mk
+++ b/keyboards/rgbkb/sol3/rules.mk
@@ -2,7 +2,7 @@
VPATH += keyboards/rgbkb/common
SRC += touch_encoder.c
SRC += common_oled.c
-QUANTUM_LIB_SRC += i2c_master.c
+I2C_DRIVER_REQUIRED = yes
# Build Options
# change yes to no to disable
diff --git a/keyboards/riot_pad/config.h b/keyboards/riot_pad/config.h
index 97dcb1de3c..4c5de878dc 100644
--- a/keyboards/riot_pad/config.h
+++ b/keyboards/riot_pad/config.h
@@ -2,7 +2,7 @@
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
-#define WS2812_SPI SPID1
+#define WS2812_SPI_DRIVER SPID1
#define WS2812_SPI_MOSI_PAL_MODE 0
#define WS2812_SPI_SCK_PAL_MODE 0
#define WS2812_SPI_SCK_PIN A5
diff --git a/keyboards/satt/comet46/rules.mk b/keyboards/satt/comet46/rules.mk
index fe692cc5c3..0db5166ffa 100644
--- a/keyboards/satt/comet46/rules.mk
+++ b/keyboards/satt/comet46/rules.mk
@@ -14,4 +14,4 @@ CUSTOM_MATRIX = lite
# project specific files
SRC += matrix.c
-QUANTUM_LIB_SRC += uart.c
+UART_DRIVER_REQUIRED = yes
diff --git a/keyboards/sawnsprojects/okayu/stm32f072/config.h b/keyboards/sawnsprojects/okayu/stm32f072/config.h
index c47f1928c8..41bb0d1fdb 100644
--- a/keyboards/sawnsprojects/okayu/stm32f072/config.h
+++ b/keyboards/sawnsprojects/okayu/stm32f072/config.h
@@ -2,7 +2,7 @@
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
-#define WS2812_SPI SPID1
+#define WS2812_SPI_DRIVER SPID1
#define WS2812_SPI_MOSI_PAL_MODE 5
#define WS2812_SPI_SCK_PIN B13
#define WS2812_SPI_SCK_PAL_MODE 5 \ No newline at end of file
diff --git a/keyboards/sawnsprojects/okayu/stm32f103/config.h b/keyboards/sawnsprojects/okayu/stm32f103/config.h
index eff3605470..9024616477 100644
--- a/keyboards/sawnsprojects/okayu/stm32f103/config.h
+++ b/keyboards/sawnsprojects/okayu/stm32f103/config.h
@@ -2,7 +2,7 @@
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
-#define WS2812_SPI SPID2
+#define WS2812_SPI_DRIVER SPID2
#define WS2812_SPI_MOSI_PAL_MODE 5
#define WS2812_SPI_SCK_PIN B13
#define WS2812_SPI_SCK_PAL_MODE 5 \ No newline at end of file
diff --git a/keyboards/sawnsprojects/okayu/stm32f303/config.h b/keyboards/sawnsprojects/okayu/stm32f303/config.h
index c47f1928c8..41bb0d1fdb 100644
--- a/keyboards/sawnsprojects/okayu/stm32f303/config.h
+++ b/keyboards/sawnsprojects/okayu/stm32f303/config.h
@@ -2,7 +2,7 @@
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
-#define WS2812_SPI SPID1
+#define WS2812_SPI_DRIVER SPID1
#define WS2812_SPI_MOSI_PAL_MODE 5
#define WS2812_SPI_SCK_PIN B13
#define WS2812_SPI_SCK_PAL_MODE 5 \ No newline at end of file
diff --git a/keyboards/sirius/uni660/rev1/config.h b/keyboards/sirius/uni660/rev1/config.h
index 0cd138a95c..b9e511d9a3 100644
--- a/keyboards/sirius/uni660/rev1/config.h
+++ b/keyboards/sirius/uni660/rev1/config.h
@@ -39,5 +39,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
//#define NO_ACTION_LAYER
//#define NO_ACTION_TAPPING
//#define NO_ACTION_ONESHOT
-
-#define DYNAMIC_KEYMAP_LAYER_COUNT 4
diff --git a/keyboards/sirius/uni660/rev1/rules.mk b/keyboards/sirius/uni660/rev1/rules.mk
index d44567105e..7ac7507269 100644
--- a/keyboards/sirius/uni660/rev1/rules.mk
+++ b/keyboards/sirius/uni660/rev1/rules.mk
@@ -15,4 +15,4 @@ CUSTOM_MATRIX = lite
# project specific files
SRC += matrix.c
-QUANTUM_LIB_SRC += uart.c
+UART_DRIVER_REQUIRED = yes
diff --git a/keyboards/sirius/uni660/rev2/ansi/config.h b/keyboards/sirius/uni660/rev2/ansi/config.h
index 0cd138a95c..b9e511d9a3 100644
--- a/keyboards/sirius/uni660/rev2/ansi/config.h
+++ b/keyboards/sirius/uni660/rev2/ansi/config.h
@@ -39,5 +39,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
//#define NO_ACTION_LAYER
//#define NO_ACTION_TAPPING
//#define NO_ACTION_ONESHOT
-
-#define DYNAMIC_KEYMAP_LAYER_COUNT 4
diff --git a/keyboards/sirius/uni660/rev2/iso/config.h b/keyboards/sirius/uni660/rev2/iso/config.h
index 0cd138a95c..b9e511d9a3 100644
--- a/keyboards/sirius/uni660/rev2/iso/config.h
+++ b/keyboards/sirius/uni660/rev2/iso/config.h
@@ -39,5 +39,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
//#define NO_ACTION_LAYER
//#define NO_ACTION_TAPPING
//#define NO_ACTION_ONESHOT
-
-#define DYNAMIC_KEYMAP_LAYER_COUNT 4
diff --git a/keyboards/sirius/uni660/rev2/rules.mk b/keyboards/sirius/uni660/rev2/rules.mk
index b41206636d..791fa054c8 100644
--- a/keyboards/sirius/uni660/rev2/rules.mk
+++ b/keyboards/sirius/uni660/rev2/rules.mk
@@ -15,6 +15,6 @@ CUSTOM_MATRIX = lite
# project specific files
SRC += matrix.c
-QUANTUM_LIB_SRC += uart.c
+UART_DRIVER_REQUIRED = yes
DEFAULT_FOLDER = sirius/uni660/rev2/ansi
diff --git a/keyboards/skyloong/gk61/pro/config.h b/keyboards/skyloong/gk61/pro/config.h
new file mode 100644
index 0000000000..4d180bb662
--- /dev/null
+++ b/keyboards/skyloong/gk61/pro/config.h
@@ -0,0 +1,21 @@
+// Copyright 2023 linlin012 (@linlin012)
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#pragma once
+
+
+#define DRIVER_COUNT 1
+#define RGB_MATRIX_LED_COUNT 64
+#define CAPS_LOCK_INDEX 28
+#define WIN_MOD_INDEX 16
+#define MAC_MOD_INDEX 17
+#define WIN_LOCK_INDEX 54
+#define SDB C1 //RGB matrix Power control PIN
+
+/* RGB Matrix Animation modes. Explicitly enabled
+ * For full list of effects, see:
+ * https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects
+ */
+
+#define RGB_MATRIX_KEYPRESSES
+#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
diff --git a/keyboards/skyloong/gk61/pro/halconf.h b/keyboards/skyloong/gk61/pro/halconf.h
new file mode 100644
index 0000000000..5ac56913fc
--- /dev/null
+++ b/keyboards/skyloong/gk61/pro/halconf.h
@@ -0,0 +1,7 @@
+// Copyright 2023 linlin012 (@linlin012)
+// SPDX-License-Identifier: GPL-2.0-or-later
+#pragma once
+
+#define HAL_USE_I2C TRUE
+
+#include_next <halconf.h>
diff --git a/keyboards/skyloong/gk61/pro/info.json b/keyboards/skyloong/gk61/pro/info.json
new file mode 100644
index 0000000000..7d507f1e8c
--- /dev/null
+++ b/keyboards/skyloong/gk61/pro/info.json
@@ -0,0 +1,338 @@
+{
+ "manufacturer": "skyloong",
+ "keyboard_name": "gk61 pro",
+ "maintainer": "linlin012",
+ "bootloader": "stm32duino",
+
+ "diode_direction": "ROW2COL",
+ "encoder": {
+ "rotary": [
+ {"pin_a": "C5", "pin_b": "C4", "resolution": 2}
+ ]
+ },
+ "features": {
+ "bootmagic": true,
+ "command": true,
+ "console": false,
+ "encoder": true,
+ "extrakey": true,
+ "mousekey": true,
+ "nkro": true,
+ "rgb_matrix": true
+ },
+ "build": {
+ "debounce_type": "asym_eager_defer_pk"
+ },
+ "matrix_pins": {
+ "cols": ["B11", "C6", "C7", "B12", "B13", "B14", "B15", "B10", "B1", "B0", "D2", "B3", "B4", "B5"],
+ "rows": ["A15", "C10", "C11", "C12", "A3"]
+ },
+ "processor": "STM32F103",
+ "rgb_matrix": {
+ "animations": {
+ "breathing": true,
+ "band_spiral_val": true,
+ "cycle_all": true,
+ "cycle_left_right": true,
+ "cycle_up_down": true,
+ "cycle_out_in": true,
+ "cycle_out_in_dual": true,
+ "rainbow_moving_chevron": true,
+ "cycle_pinwheel": true,
+ "cycle_spiral": true,
+ "dual_beacon": true,
+ "raindrops": true,
+ "jellybean_raindrops": true,
+ "pixel_rain": true,
+ "typing_heatmap":true,
+ "digital_rain": true,
+ "solid_reactive_simple": true,
+ "solid_reactive_multiwide": true,
+ "solid_reactive_multinexus": true,
+ "splash": true,
+ "solid_splash": true
+ },
+ "driver": "is31fl3743a",
+ "layout": [
+ {"matrix": [0, 0], "x": 0, "y": 0, "flags": 4},
+ {"matrix": [0, 1], "x": 16, "y": 0, "flags": 4},
+ {"matrix": [0, 2], "x": 32, "y": 0, "flags": 4},
+ {"matrix": [0, 3], "x": 49, "y": 0, "flags": 4},
+ {"matrix": [0, 4], "x": 65, "y": 0, "flags": 4},
+ {"matrix": [0, 5], "x": 81, "y": 0, "flags": 4},
+ {"matrix": [0, 6], "x": 97, "y": 0, "flags": 4},
+ {"matrix": [0, 7], "x": 113, "y": 0, "flags": 4},
+ {"matrix": [0, 8], "x": 129, "y": 0, "flags": 4},
+ {"matrix": [0, 9], "x": 145, "y": 0, "flags": 4},
+ {"matrix": [0, 10], "x": 162, "y": 0, "flags": 4},
+ {"matrix": [0, 11], "x": 178, "y": 0, "flags": 4},
+ {"matrix": [0, 12], "x": 194, "y": 0, "flags": 4},
+ {"matrix": [0, 13], "x": 218, "y": 0, "flags": 4},
+ {"matrix": [1, 0], "x": 4, "y": 13, "flags": 4},
+ {"matrix": [1, 1], "x": 24, "y": 13, "flags": 4},
+ {"matrix": [1, 2], "x": 40, "y": 13, "flags": 4},
+ {"matrix": [1, 3], "x": 57, "y": 13, "flags": 4},
+ {"matrix": [1, 4], "x": 73, "y": 13, "flags": 4},
+ {"matrix": [1, 5], "x": 89, "y": 13, "flags": 4},
+ {"matrix": [1, 6], "x": 105, "y": 13, "flags": 4},
+ {"matrix": [1, 7], "x": 121, "y": 13, "flags": 4},
+ {"matrix": [1, 8], "x": 137, "y": 13, "flags": 4},
+ {"matrix": [1, 9], "x": 153, "y": 13, "flags": 4},
+ {"matrix": [1, 10], "x": 170, "y": 13, "flags": 4},
+ {"matrix": [1, 11], "x": 186, "y": 13, "flags": 4},
+ {"matrix": [1, 12], "x": 202, "y": 13, "flags": 4},
+ {"matrix": [1, 13], "x": 222, "y": 13, "flags": 4},
+ {"matrix": [2, 0], "x": 6, "y": 26, "flags": 4},
+ {"matrix": [2, 1], "x": 28, "y": 26, "flags": 4},
+ {"matrix": [2, 2], "x": 44, "y": 26, "flags": 4},
+ {"matrix": [2, 3], "x": 61, "y": 26, "flags": 4},
+ {"matrix": [2, 4], "x": 77, "y": 26, "flags": 4},
+ {"matrix": [2, 5], "x": 93, "y": 26, "flags": 4},
+ {"matrix": [2, 6], "x": 109, "y": 26, "flags": 4},
+ {"matrix": [2, 7], "x": 125, "y": 26, "flags": 4},
+ {"matrix": [2, 8], "x": 141, "y": 26, "flags": 4},
+ {"matrix": [2, 9], "x": 157, "y": 26, "flags": 4},
+ {"matrix": [2, 10], "x": 174, "y": 26, "flags": 4},
+ {"matrix": [2, 11], "x": 190, "y": 26, "flags": 4},
+ {"matrix": [2, 13], "x": 216, "y": 26, "flags": 4},
+ {"matrix": [3, 0], "x": 10, "y": 51, "flags": 4},
+ {"matrix": [3, 1], "x": 36, "y": 51, "flags": 4},
+ {"matrix": [3, 2], "x": 53, "y": 51, "flags": 4},
+ {"matrix": [3, 3], "x": 69, "y": 51, "flags": 4},
+ {"matrix": [3, 4], "x": 85, "y": 51, "flags": 4},
+ {"matrix": [3, 5], "x": 101, "y": 51, "flags": 4},
+ {"matrix": [3, 6], "x": 117, "y": 51, "flags": 4},
+ {"matrix": [3, 7], "x": 133, "y": 51, "flags": 4},
+ {"matrix": [3, 8], "x": 149, "y": 51, "flags": 4},
+ {"matrix": [3, 9], "x": 166, "y": 51, "flags": 4},
+ {"matrix": [3, 10], "x": 182, "y": 51, "flags": 4},
+ {"matrix": [3, 12], "x": 212, "y": 51, "flags": 4},
+ {"matrix": [4, 0], "x": 2, "y": 64, "flags": 4},
+ {"matrix": [4, 1], "x": 22, "y": 64, "flags": 4},
+ {"matrix": [4, 2], "x": 42, "y": 64, "flags": 4},
+ {"matrix": [4, 4], "x": 75, "y": 64, "flags": 4},
+ {"matrix": [4, 5], "x": 103, "y": 64, "flags": 4},
+ {"matrix": [4, 6], "x": 103, "y": 64, "flags": 4},
+ {"matrix": [4, 8], "x": 131, "y": 64, "flags": 4},
+ {"matrix": [4, 9], "x": 163, "y": 64, "flags": 4},
+ {"matrix": [4, 10], "x": 184, "y": 64, "flags": 4},
+ {"matrix": [4, 11], "x": 204, "y": 64, "flags": 4},
+ {"matrix": [4, 13], "x": 224, "y": 64, "flags": 4}
+ ],
+ "max_brightness": 200,
+ "hue_steps": 20,
+ "sat_steps": 20,
+ "speed_steps": 20,
+ "val_steps": 20
+ },
+ "url": "https://github.com/JZ-Skyloong",
+ "usb": {
+ "device_version": "1.0.0",
+ "pid": "0x6A61",
+ "vid": "0x1EA7",
+ "max_power": 380
+ },
+ "community_layouts": ["60_ansi"],
+ "layouts": {
+ "LAYOUT_all": {
+ "layout": [
+ {"matrix": [0, 0], "x": 0, "y": 0, "w": 1},
+ {"matrix": [0, 1], "x": 1, "y": 0},
+ {"matrix": [0, 2], "x": 2, "y": 0},
+ {"matrix": [0, 3], "x": 3, "y": 0},
+ {"matrix": [0, 4], "x": 4, "y": 0},
+ {"matrix": [0, 5], "x": 5, "y": 0},
+ {"matrix": [0, 6], "x": 6, "y": 0},
+ {"matrix": [0, 7], "x": 7, "y": 0},
+ {"matrix": [0, 8], "x": 8, "y": 0},
+ {"matrix": [0, 9], "x": 9, "y": 0},
+ {"matrix": [0, 10], "x": 10, "y": 0},
+ {"matrix": [0, 11], "x": 11, "y": 0},
+ {"matrix": [0, 12], "x": 12, "y": 0},
+ {"matrix": [0, 13], "x": 13, "y": 0, "w": 2},
+ {"matrix": [1, 0], "x": 0, "y": 1, "w": 1.5},
+ {"matrix": [1, 1], "x": 1.5, "y": 1},
+ {"matrix": [1, 2], "x": 2.5, "y": 1},
+ {"matrix": [1, 3], "x": 3.5, "y": 1},
+ {"matrix": [1, 4], "x": 4.5, "y": 1},
+ {"matrix": [1, 5], "x": 5.5, "y": 1},
+ {"matrix": [1, 6], "x": 6.5, "y": 1},
+ {"matrix": [1, 7], "x": 7.5, "y": 1},
+ {"matrix": [1, 8], "x": 8.5, "y": 1},
+ {"matrix": [1, 9], "x": 9.5, "y": 1},
+ {"matrix": [1, 10], "x": 10.5, "y": 1},
+ {"matrix": [1, 11], "x": 11.5, "y": 1},
+ {"matrix": [1, 12], "x": 12.5, "y": 1},
+ {"matrix": [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},
+ {"matrix": [2, 3], "x": 3.75, "y": 2},
+ {"matrix": [2, 4], "x": 4.75, "y": 2},
+ {"matrix": [2, 5], "x": 5.75, "y": 2},
+ {"matrix": [2, 6], "x": 6.75, "y": 2},
+ {"matrix": [2, 7], "x": 7.75, "y": 2},
+ {"matrix": [2, 8], "x": 8.75, "y": 2},
+ {"matrix": [2, 9], "x": 9.75, "y": 2},
+ {"matrix": [2, 10], "x": 10.75, "y": 2},
+ {"matrix": [2, 11], "x": 11.75, "y": 2},
+ {"matrix": [2, 13], "x": 12.75, "y": 2, "w": 2.25},
+ {"matrix": [3, 0], "x": 0, "y": 3, "w": 2.25},
+ {"matrix": [3, 1], "x": 2.25, "y": 3},
+ {"matrix": [3, 2], "x": 3.25, "y": 3},
+ {"matrix": [3, 3], "x": 4.25, "y": 3},
+ {"matrix": [3, 4], "x": 5.25, "y": 3},
+ {"matrix": [3, 5], "x": 6.25, "y": 3},
+ {"matrix": [3, 6], "x": 7.25, "y": 3},
+ {"matrix": [3, 7], "x": 8.25, "y": 3},
+ {"matrix": [3, 8], "x": 9.25, "y": 3},
+ {"matrix": [3, 9], "x": 10.25, "y": 3},
+ {"matrix": [3, 10], "x": 11.25, "y": 3},
+ {"matrix": [3, 12], "x": 12.25, "y": 3, "w": 2.75},
+ {"matrix": [4, 0], "x": 0, "y": 4, "w": 1.25},
+ {"matrix": [4, 1], "x": 1.25, "y": 4, "w": 1.25},
+ {"matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.25},
+ {"matrix": [4, 4], "x": 3.75, "y": 4.5, "h": 0.5, "w": 2.5},
+ {"matrix": [4, 5], "x": 3.75, "y": 4, "h": 0.5, "w":6.25},
+ {"matrix": [4, 6], "x": 6.25, "y": 4.5, "h": 0.5, "w":1.25},
+ {"matrix": [4, 8], "x": 7.5, "y": 4.5, "h": 0.5, "w": 2.5},
+ {"matrix": [4, 9], "x": 10, "y": 4, "w": 1.25},
+ {"matrix": [4, 10], "x": 11.25, "y": 4, "w": 1.25},
+ {"matrix": [4, 11], "x": 12.5, "y": 4, "w": 1.25},
+ {"matrix": [4, 13], "x": 13.75, "y": 4, "w": 1.25}
+ ]
+ },
+ "LAYOUT_60_ansi": {
+ "layout": [
+ {"matrix": [0, 0], "x": 0, "y": 0, "w": 1},
+ {"matrix": [0, 1], "x": 1, "y": 0},
+ {"matrix": [0, 2], "x": 2, "y": 0},
+ {"matrix": [0, 3], "x": 3, "y": 0},
+ {"matrix": [0, 4], "x": 4, "y": 0},
+ {"matrix": [0, 5], "x": 5, "y": 0},
+ {"matrix": [0, 6], "x": 6, "y": 0},
+ {"matrix": [0, 7], "x": 7, "y": 0},
+ {"matrix": [0, 8], "x": 8, "y": 0},
+ {"matrix": [0, 9], "x": 9, "y": 0},
+ {"matrix": [0, 10], "x": 10, "y": 0},
+ {"matrix": [0, 11], "x": 11, "y": 0},
+ {"matrix": [0, 12], "x": 12, "y": 0},
+ {"matrix": [0, 13], "x": 13, "y": 0, "w": 2},
+ {"matrix": [1, 0], "x": 0, "y": 1, "w": 1.5},
+ {"matrix": [1, 1], "x": 1.5, "y": 1},
+ {"matrix": [1, 2], "x": 2.5, "y": 1},
+ {"matrix": [1, 3], "x": 3.5, "y": 1},
+ {"matrix": [1, 4], "x": 4.5, "y": 1},
+ {"matrix": [1, 5], "x": 5.5, "y": 1},
+ {"matrix": [1, 6], "x": 6.5, "y": 1},
+ {"matrix": [1, 7], "x": 7.5, "y": 1},
+ {"matrix": [1, 8], "x": 8.5, "y": 1},
+ {"matrix": [1, 9], "x": 9.5, "y": 1},
+ {"matrix": [1, 10], "x": 10.5, "y": 1},
+ {"matrix": [1, 11], "x": 11.5, "y": 1},
+ {"matrix": [1, 12], "x": 12.5, "y": 1},
+ {"matrix": [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},
+ {"matrix": [2, 3], "x": 3.75, "y": 2},
+ {"matrix": [2, 4], "x": 4.75, "y": 2},
+ {"matrix": [2, 5], "x": 5.75, "y": 2},
+ {"matrix": [2, 6], "x": 6.75, "y": 2},
+ {"matrix": [2, 7], "x": 7.75, "y": 2},
+ {"matrix": [2, 8], "x": 8.75, "y": 2},
+ {"matrix": [2, 9], "x": 9.75, "y": 2},
+ {"matrix": [2, 10], "x": 10.75, "y": 2},
+ {"matrix": [2, 11], "x": 11.75, "y": 2},
+ {"matrix": [2, 13], "x": 12.75, "y": 2, "w": 2.25},
+ {"matrix": [3, 0], "x": 0, "y": 3, "w": 2.25},
+ {"matrix": [3, 1], "x": 2.25, "y": 3},
+ {"matrix": [3, 2], "x": 3.25, "y": 3},
+ {"matrix": [3, 3], "x": 4.25, "y": 3},
+ {"matrix": [3, 4], "x": 5.25, "y": 3},
+ {"matrix": [3, 5], "x": 6.25, "y": 3},
+ {"matrix": [3, 6], "x": 7.25, "y": 3},
+ {"matrix": [3, 7], "x": 8.25, "y": 3},
+ {"matrix": [3, 8], "x": 9.25, "y": 3},
+ {"matrix": [3, 9], "x": 10.25, "y": 3},
+ {"matrix": [3, 10], "x": 11.25, "y": 3},
+ {"matrix": [3, 12], "x": 12.25, "y": 3, "w": 2.75},
+ {"matrix": [4, 0], "x": 0, "y": 4, "w": 1.25},
+ {"matrix": [4, 1], "x": 1.25, "y": 4, "w": 1.25},
+ {"matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.25},
+ {"matrix": [4, 5], "x": 3.75, "y": 4, "w": 6.25},
+ {"matrix": [4, 9], "x": 10, "y": 4, "w": 1.25},
+ {"matrix": [4, 10], "x": 11.25, "y": 4, "w": 1.25},
+ {"matrix": [4, 11], "x": 12.5, "y": 4, "w": 1.25},
+ {"matrix": [4, 13], "x": 13.75, "y": 4, "w": 1.25}
+ ]
+ },
+ "LAYOUT_60_ansi_split_space": {
+ "layout": [
+ {"matrix": [0, 0], "x": 0, "y": 0, "w": 1},
+ {"matrix": [0, 1], "x": 1, "y": 0},
+ {"matrix": [0, 2], "x": 2, "y": 0},
+ {"matrix": [0, 3], "x": 3, "y": 0},
+ {"matrix": [0, 4], "x": 4, "y": 0},
+ {"matrix": [0, 5], "x": 5, "y": 0},
+ {"matrix": [0, 6], "x": 6, "y": 0},
+ {"matrix": [0, 7], "x": 7, "y": 0},
+ {"matrix": [0, 8], "x": 8, "y": 0},
+ {"matrix": [0, 9], "x": 9, "y": 0},
+ {"matrix": [0, 10], "x": 10, "y": 0},
+ {"matrix": [0, 11], "x": 11, "y": 0},
+ {"matrix": [0, 12], "x": 12, "y": 0},
+ {"matrix": [0, 13], "x": 13, "y": 0, "w": 2},
+ {"matrix": [1, 0], "x": 0, "y": 1, "w": 1.5},
+ {"matrix": [1, 1], "x": 1.5, "y": 1},
+ {"matrix": [1, 2], "x": 2.5, "y": 1},
+ {"matrix": [1, 3], "x": 3.5, "y": 1},
+ {"matrix": [1, 4], "x": 4.5, "y": 1},
+ {"matrix": [1, 5], "x": 5.5, "y": 1},
+ {"matrix": [1, 6], "x": 6.5, "y": 1},
+ {"matrix": [1, 7], "x": 7.5, "y": 1},
+ {"matrix": [1, 8], "x": 8.5, "y": 1},
+ {"matrix": [1, 9], "x": 9.5, "y": 1},
+ {"matrix": [1, 10], "x": 10.5, "y": 1},
+ {"matrix": [1, 11], "x": 11.5, "y": 1},
+ {"matrix": [1, 12], "x": 12.5, "y": 1},
+ {"matrix": [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},
+ {"matrix": [2, 3], "x": 3.75, "y": 2},
+ {"matrix": [2, 4], "x": 4.75, "y": 2},
+ {"matrix": [2, 5], "x": 5.75, "y": 2},
+ {"matrix": [2, 6], "x": 6.75, "y": 2},
+ {"matrix": [2, 7], "x": 7.75, "y": 2},
+ {"matrix": [2, 8], "x": 8.75, "y": 2},
+ {"matrix": [2, 9], "x": 9.75, "y": 2},
+ {"matrix": [2, 10], "x": 10.75, "y": 2},
+ {"matrix": [2, 11], "x": 11.75, "y": 2},
+ {"matrix": [2, 13], "x": 12.75, "y": 2, "w": 2.25},
+ {"matrix": [3, 0], "x": 0, "y": 3, "w": 2.25},
+ {"matrix": [3, 1], "x": 2.25, "y": 3},
+ {"matrix": [3, 2], "x": 3.25, "y": 3},
+ {"matrix": [3, 3], "x": 4.25, "y": 3},
+ {"matrix": [3, 4], "x": 5.25, "y": 3},
+ {"matrix": [3, 5], "x": 6.25, "y": 3},
+ {"matrix": [3, 6], "x": 7.25, "y": 3},
+ {"matrix": [3, 7], "x": 8.25, "y": 3},
+ {"matrix": [3, 8], "x": 9.25, "y": 3},
+ {"matrix": [3, 9], "x": 10.25, "y": 3},
+ {"matrix": [3, 10], "x": 11.25, "y": 3},
+ {"matrix": [3, 12], "x": 12.25, "y": 3, "w": 2.75},
+ {"matrix": [4, 0], "x": 0, "y": 4, "w": 1.25},
+ {"matrix": [4, 1], "x": 1.25, "y": 4, "w": 1.25},
+ {"matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.25},
+ {"matrix": [4, 4], "x": 3.75, "y": 4, "w": 2.5},
+ {"matrix": [4, 6], "x": 6.25, "y": 4, "w": 1.25},
+ {"matrix": [4, 8], "x": 7.5, "y": 4, "w": 2.5},
+ {"matrix": [4, 9], "x": 10, "y": 4, "w": 1.25},
+ {"matrix": [4, 10], "x": 11.25, "y": 4, "w": 1.25},
+ {"matrix": [4, 11], "x": 12.5, "y": 4, "w": 1.25},
+ {"matrix": [4, 13], "x": 13.75, "y": 4, "w": 1.25}
+ ]
+ }
+ }
+}
diff --git a/keyboards/skyloong/gk61/pro/keymaps/default/keymap.c b/keyboards/skyloong/gk61/pro/keymaps/default/keymap.c
new file mode 100644
index 0000000000..9534f25d80
--- /dev/null
+++ b/keyboards/skyloong/gk61/pro/keymaps/default/keymap.c
@@ -0,0 +1,44 @@
+// Copyright 2021 JZ-Skyloong (@JZ-Skyloong)
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#include QMK_KEYBOARD_H
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ /*
+ * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
+ * │Esc│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │Bsp│
+ * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤
+ * │Tab│ Q │ W │ E | R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │
+ * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤
+ * │Cap│ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ |Ent│
+ * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤
+ * │Sft│ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ |Sft| │
+ * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤
+ * │Ctl│GUI│Alt│ │Spc│Mut│ │ |Spc|Alt│App│Ctl│ │Mo1|
+ * └───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┘
+ */
+ [0] = LAYOUT_all(
+ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC,
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
+ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_MUTE, KC_SPC, KC_RALT, KC_APP, KC_RCTL, MO(1)
+ ),
+
+ [1] = LAYOUT_all(
+ KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______,
+ _______, RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+ )
+
+};
+
+#if defined(ENCODER_MAP_ENABLE)
+const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
+ [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
+ [1] = { ENCODER_CCW_CW(RGB_HUD, RGB_HUI) }
+};
+#endif
+
diff --git a/keyboards/skyloong/gk61/pro/keymaps/default/rules.mk b/keyboards/skyloong/gk61/pro/keymaps/default/rules.mk
new file mode 100644
index 0000000000..ee32568148
--- /dev/null
+++ b/keyboards/skyloong/gk61/pro/keymaps/default/rules.mk
@@ -0,0 +1 @@
+ENCODER_MAP_ENABLE = yes
diff --git a/keyboards/skyloong/gk61/pro/keymaps/via/keymap.c b/keyboards/skyloong/gk61/pro/keymaps/via/keymap.c
new file mode 100644
index 0000000000..e16bcc7105
--- /dev/null
+++ b/keyboards/skyloong/gk61/pro/keymaps/via/keymap.c
@@ -0,0 +1,67 @@
+// Copyright 2021 JZ-Skyloong (@JZ-Skyloong)
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#include QMK_KEYBOARD_H
+
+enum layer_names {
+ _WIN,
+ _MAC,
+ _WIN_INDEX,
+ _MAC_INDEX
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ /*
+ * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
+ * │Esc│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │Bsp│
+ * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤
+ * │Tab│ Q │ W │ E | R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │
+ * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤
+ * │Cap│ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ |Ent│
+ * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤
+ * │Sft│ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ |Sft| │
+ * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤
+ * │Ctl│GUI│Alt│ │Spc│Spc│Mut│ |Spc|Alt│App│Ctl│ │Mo3|
+ * └───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┘
+ */
+ [_WIN] = LAYOUT_all(
+ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC,
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
+ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_MUTE, KC_SPC, KC_RALT, KC_APP, KC_RCTL, MO(_WIN_INDEX)
+ ),
+
+ [_MAC] = LAYOUT_all(
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, KC_LALT, KC_LGUI, _______, _______, _______, _______, KC_RGUI, KC_RALT, _______, MO(_MAC_INDEX)
+ ),
+
+ [_WIN_INDEX] = 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,
+ _______, _______, TO(0), TO(1), _______, _______, _______, _______, _______, _______, RGB_M_P, RGB_RMOD, RGB_RMOD, RGB_TOG,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SPD, RGB_SPI, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAD, RGB_VAI, KC_UP, _______,
+ _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______
+ ),
+
+ [_MAC_INDEX] = LAYOUT_all(
+ KC_GRV , KC_F14, KC_F15, C(KC_UP), G(KC_D), G(KC_SPC), LSG(KC_4), KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_DEL,
+ _______, _______, TO(0), TO(1), _______, _______, _______, _______, _______, _______, RGB_M_P, RGB_RMOD, RGB_RMOD, RGB_TOG,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SPD, RGB_SPI, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAD, RGB_VAI, KC_UP, _______,
+ _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______
+ )
+};
+
+#if defined(ENCODER_MAP_ENABLE)
+const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
+ [_WIN] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
+ [_MAC] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS) },
+ [_WIN_INDEX] = { ENCODER_CCW_CW(RGB_HUD, RGB_HUI) },
+ [_MAC_INDEX] = { ENCODER_CCW_CW(RGB_HUD, RGB_HUI) }
+};
+#endif
diff --git a/keyboards/skyloong/gk61/pro/keymaps/via/rules.mk b/keyboards/skyloong/gk61/pro/keymaps/via/rules.mk
new file mode 100644
index 0000000000..f1adcab005
--- /dev/null
+++ b/keyboards/skyloong/gk61/pro/keymaps/via/rules.mk
@@ -0,0 +1,2 @@
+VIA_ENABLE = yes
+ENCODER_MAP_ENABLE = yes
diff --git a/keyboards/skyloong/gk61/pro/mcuconf.h b/keyboards/skyloong/gk61/pro/mcuconf.h
new file mode 100644
index 0000000000..91dde6cc42
--- /dev/null
+++ b/keyboards/skyloong/gk61/pro/mcuconf.h
@@ -0,0 +1,11 @@
+// Copyright 2023 linlin012 (@linlin012)
+// SPDX-License-Identifier: GPL-2.0-or-later
+#pragma once
+
+#include_next <mcuconf.h>
+
+#undef STM32_I2C_USE_I2C1
+#define STM32_I2C_USE_I2C1 TRUE
+
+#undef STM32_I2C_USE_DMA
+#define STM32_I2C_USE_DMA TRUE
diff --git a/keyboards/skyloong/gk61/pro/pro.c b/keyboards/skyloong/gk61/pro/pro.c
new file mode 100644
index 0000000000..1936964b32
--- /dev/null
+++ b/keyboards/skyloong/gk61/pro/pro.c
@@ -0,0 +1,235 @@
+// 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;
+
+const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to IS31 manual for these locations
+ * driver
+ * | R location
+ * | | G location
+ * | | | B location
+ * | | | | */
+ {0, CS1_SW1, CS2_SW1, CS3_SW1},
+ {0, CS1_SW2, CS2_SW2, CS3_SW2},
+ {0, CS1_SW3, CS2_SW3, CS3_SW3},
+ {0, CS1_SW4, CS2_SW4, CS3_SW4},
+ {0, CS1_SW5, CS2_SW5, CS3_SW5},
+ {0, CS1_SW6, CS2_SW6, CS3_SW6},
+ {0, CS1_SW7, CS2_SW7, CS3_SW7},
+ {0, CS1_SW8, CS2_SW8, CS3_SW8},
+ {0, CS1_SW9, CS2_SW9, CS3_SW9},
+ {0, CS1_SW10, CS2_SW10, CS3_SW10},
+ {0, CS1_SW11, CS2_SW11, CS3_SW11},
+ {0, CS16_SW1, CS17_SW1, CS18_SW1},
+ {0, CS16_SW2, CS17_SW2, CS18_SW2},
+ {0, CS16_SW3, CS17_SW3, CS18_SW3},
+
+ {0, CS4_SW1, CS5_SW1, CS6_SW1},
+ {0, CS4_SW2, CS5_SW2, CS6_SW2},
+ {0, CS4_SW3, CS5_SW3, CS6_SW3},
+ {0, CS4_SW4, CS5_SW4, CS6_SW4},
+ {0, CS4_SW5, CS5_SW5, CS6_SW5},
+ {0, CS4_SW6, CS5_SW6, CS6_SW6},
+ {0, CS4_SW7, CS5_SW7, CS6_SW7},
+ {0, CS4_SW8, CS5_SW8, CS6_SW8},
+ {0, CS4_SW9, CS5_SW9, CS6_SW9},
+ {0, CS4_SW10, CS5_SW10, CS6_SW10},
+ {0, CS4_SW11, CS5_SW11, CS6_SW11},
+ {0, CS16_SW4, CS17_SW4, CS18_SW4},
+ {0, CS16_SW5, CS17_SW5, CS18_SW5},
+ {0, CS16_SW6, CS17_SW6, CS18_SW6},
+
+ {0, CS7_SW1, CS8_SW1, CS9_SW1},
+ {0, CS7_SW2, CS8_SW2, CS9_SW2},
+ {0, CS7_SW3, CS8_SW3, CS9_SW3},
+ {0, CS7_SW4, CS8_SW4, CS9_SW4},
+ {0, CS7_SW5, CS8_SW5, CS9_SW5},
+ {0, CS7_SW6, CS8_SW6, CS9_SW6},
+ {0, CS7_SW7, CS8_SW7, CS9_SW7},
+ {0, CS7_SW8, CS8_SW8, CS9_SW8},
+ {0, CS7_SW9, CS8_SW9, CS9_SW9},
+ {0, CS7_SW10, CS8_SW10, CS9_SW10},
+ {0, CS7_SW11, CS8_SW11, CS9_SW11},
+ {0, CS16_SW7, CS17_SW7, CS18_SW7},
+ {0, CS16_SW8, CS17_SW8, CS18_SW8},
+
+ {0, CS10_SW1, CS11_SW1, CS12_SW1},
+ {0, CS10_SW2, CS11_SW2, CS12_SW2},
+ {0, CS10_SW3, CS11_SW3, CS12_SW3},
+ {0, CS10_SW4, CS11_SW4, CS12_SW4},
+ {0, CS10_SW5, CS11_SW5, CS12_SW5},
+ {0, CS10_SW6, CS11_SW6, CS12_SW6},
+ {0, CS10_SW7, CS11_SW7, CS12_SW7},
+ {0, CS10_SW8, CS11_SW8, CS12_SW8},
+ {0, CS10_SW9, CS11_SW9, CS12_SW9},
+ {0, CS10_SW10, CS11_SW10, CS12_SW10},
+ {0, CS10_SW11, CS11_SW11, CS12_SW11},
+ {0, CS16_SW9, CS17_SW9, CS18_SW9},
+
+ {0, CS13_SW1, CS14_SW1, CS15_SW1},
+ {0, CS13_SW2, CS14_SW2, CS15_SW2},
+ {0, CS13_SW3, CS14_SW3, CS15_SW3},
+ {0, CS13_SW4, CS14_SW4, CS15_SW4},
+ {0, CS13_SW5, CS14_SW5, CS15_SW5},
+ {0, CS13_SW5, CS14_SW5, CS15_SW5},
+ {0, CS13_SW6, CS14_SW6, CS15_SW6},
+ {0, CS13_SW7, CS14_SW7, CS15_SW7},
+ {0, CS13_SW8, CS14_SW8, CS15_SW8},
+ {0, CS13_SW9, CS14_SW9, CS15_SW9},
+ {0, CS13_SW10, CS14_SW10, CS15_SW10}
+};
+
+#if defined(RGB_MATRIX_ENABLE) /*&& defined(CAPS_LOCK_INDEX)*/
+
+bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
+ if (!process_record_user(keycode, record)) {
+ return false;
+ }
+ switch (keycode) {
+# ifdef RGB_MATRIX_ENABLE
+ case RGB_TOG:
+ if (record->event.pressed) {
+ switch (rgb_matrix_get_flags()) {
+ case LED_FLAG_ALL: {
+ rgb_matrix_set_flags(LED_FLAG_NONE);
+ rgb_matrix_set_color_all(0, 0, 0);
+ } break;
+ default: {
+ rgb_matrix_set_flags(LED_FLAG_ALL);
+ } break;
+ }
+ }
+ 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
+ writePinLow(SDB);
+# endif
+ suspend_power_down_user();
+}
+
+void suspend_wakeup_init_kb() {
+# ifdef RGB_MATRIX_ENABLE
+ writePinHigh(SDB);
+# endif
+ suspend_wakeup_init_user();
+}
+
+void board_init(void) {
+ // JTAG-DP Disabled and SW-DP Disabled
+ AFIO->MAPR = (AFIO->MAPR & ~AFIO_MAPR_SWJ_CFG_Msk) | AFIO_MAPR_SWJ_CFG_DISABLE;
+# ifdef RGB_MATRIX_ENABLE
+ setPinOutput(SDB);
+ writePinHigh(SDB);
+# endif
+}
diff --git a/keyboards/skyloong/gk61/pro/readme.md b/keyboards/skyloong/gk61/pro/readme.md
new file mode 100644
index 0000000000..529f6f32c4
--- /dev/null
+++ b/keyboards/skyloong/gk61/pro/readme.md
@@ -0,0 +1,33 @@
+# GK61 PRO
+
+![GK61 PRO](https://i.imgur.com/DTetyVLh.jpg)
+
+## The PCB features:
+* QMK & VIA compatibility
+* RGB Matrix backlight
+* The space bar position switch can be interchanged with encoder module.
+
+
+The following is the QMK Firmware for the Destop 60% keylayout - designed in Dongguan Jizhi Electronic Technology Co., Ltd
+
+* Keyboard Maintainer: [linlin012](https://github.com/linlin012)
+* Hardware Supported: DestopPCB for Skyloong keylayout 60%, STM32F103R8T6
+* Hardware Availability: http://www.skyloong.com.cn https://skyloong.vip
+
+Make example for this keyboard (after setting up your build environment):
+
+ make skyloong/gk61/pro:default
+
+Flashing example for this keyboard:
+
+ make skyloong/gk61/pro: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 - some may have pads you must short instead
+* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available
diff --git a/keyboards/skyloong/gk61/pro/rules.mk b/keyboards/skyloong/gk61/pro/rules.mk
new file mode 100644
index 0000000000..3bbd261429
--- /dev/null
+++ b/keyboards/skyloong/gk61/pro/rules.mk
@@ -0,0 +1 @@
+# File intentionally blank
diff --git a/keyboards/skyloong/gk61/pro_48/config.h b/keyboards/skyloong/gk61/pro_48/config.h
new file mode 100644
index 0000000000..dc31521627
--- /dev/null
+++ b/keyboards/skyloong/gk61/pro_48/config.h
@@ -0,0 +1,18 @@
+// Copyright 2023 linlin012 (@linlin012)
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#pragma once
+
+
+#define DRIVER_COUNT 1
+#define RGB_MATRIX_LED_COUNT 64
+#define CAPS_LOCK_INDEX 28
+#define WIN_MOD_INDEX 16
+#define MAC_MOD_INDEX 17
+#define SDB A4
+
+#define RGB_DISABLE_WHEN_USB_SUSPENDED
+#define RGB_MATRIX_KEYPRESSES
+#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
+
+#define g_suspend_state rgb_matrix_get_suspend_state()
diff --git a/keyboards/skyloong/gk61/pro_48/halconf.h b/keyboards/skyloong/gk61/pro_48/halconf.h
new file mode 100644
index 0000000000..5ac56913fc
--- /dev/null
+++ b/keyboards/skyloong/gk61/pro_48/halconf.h
@@ -0,0 +1,7 @@
+// Copyright 2023 linlin012 (@linlin012)
+// SPDX-License-Identifier: GPL-2.0-or-later
+#pragma once
+
+#define HAL_USE_I2C TRUE
+
+#include_next <halconf.h>
diff --git a/keyboards/skyloong/gk61/pro_48/info.json b/keyboards/skyloong/gk61/pro_48/info.json
new file mode 100644
index 0000000000..0e49e005aa
--- /dev/null
+++ b/keyboards/skyloong/gk61/pro_48/info.json
@@ -0,0 +1,338 @@
+{
+ "manufacturer": "skyloong",
+ "keyboard_name": "gk61 pro 48",
+ "maintainer": "NaturalZh",
+ "bootloader": "stm32duino",
+
+ "diode_direction": "ROW2COL",
+ "encoder": {
+ "rotary": [
+ {"pin_a": "A2", "pin_b": "A3", "resolution": 2}
+ ]
+ },
+ "features": {
+ "bootmagic": true,
+ "command": true,
+ "console": false,
+ "encoder": true,
+ "extrakey": true,
+ "mousekey": true,
+ "nkro": true,
+ "rgb_matrix": true
+ },
+ "build": {
+ "debounce_type": "asym_eager_defer_pk"
+ },
+ "matrix_pins": {
+ "cols": ["B13", "A0", "A1", "B14", "B15", "A8", "A9", "A10", "A15", "B3", "B4", "B5", "B8", "B9"],
+ "rows": ["B10", "B1", "B0", "A7", "A6"]
+ },
+ "processor": "STM32F103",
+ "rgb_matrix": {
+ "animations": {
+ "breathing": true,
+ "band_spiral_val": true,
+ "cycle_all": true,
+ "cycle_left_right": true,
+ "cycle_up_down": true,
+ "cycle_out_in": true,
+ "cycle_out_in_dual": true,
+ "rainbow_moving_chevron": true,
+ "cycle_pinwheel": true,
+ "cycle_spiral": true,
+ "dual_beacon": true,
+ "raindrops": true,
+ "jellybean_raindrops": true,
+ "pixel_rain": true,
+ "typing_heatmap":true,
+ "digital_rain": true,
+ "solid_reactive_simple": true,
+ "solid_reactive_multiwide": true,
+ "solid_reactive_multinexus": true,
+ "splash": true,
+ "solid_splash": true
+ },
+ "driver": "is31fl3743a",
+ "layout": [
+ {"matrix": [0, 0], "x": 0, "y": 0, "flags": 4},
+ {"matrix": [0, 1], "x": 16, "y": 0, "flags": 4},
+ {"matrix": [0, 2], "x": 32, "y": 0, "flags": 4},
+ {"matrix": [0, 3], "x": 49, "y": 0, "flags": 4},
+ {"matrix": [0, 4], "x": 65, "y": 0, "flags": 4},
+ {"matrix": [0, 5], "x": 81, "y": 0, "flags": 4},
+ {"matrix": [0, 6], "x": 97, "y": 0, "flags": 4},
+ {"matrix": [0, 7], "x": 113, "y": 0, "flags": 4},
+ {"matrix": [0, 8], "x": 129, "y": 0, "flags": 4},
+ {"matrix": [0, 9], "x": 145, "y": 0, "flags": 4},
+ {"matrix": [0, 10], "x": 162, "y": 0, "flags": 4},
+ {"matrix": [0, 11], "x": 178, "y": 0, "flags": 4},
+ {"matrix": [0, 12], "x": 194, "y": 0, "flags": 4},
+ {"matrix": [0, 13], "x": 218, "y": 0, "flags": 4},
+ {"matrix": [1, 0], "x": 4, "y": 13, "flags": 4},
+ {"matrix": [1, 1], "x": 24, "y": 13, "flags": 4},
+ {"matrix": [1, 2], "x": 40, "y": 13, "flags": 4},
+ {"matrix": [1, 3], "x": 57, "y": 13, "flags": 4},
+ {"matrix": [1, 4], "x": 73, "y": 13, "flags": 4},
+ {"matrix": [1, 5], "x": 89, "y": 13, "flags": 4},
+ {"matrix": [1, 6], "x": 105, "y": 13, "flags": 4},
+ {"matrix": [1, 7], "x": 121, "y": 13, "flags": 4},
+ {"matrix": [1, 8], "x": 137, "y": 13, "flags": 4},
+ {"matrix": [1, 9], "x": 153, "y": 13, "flags": 4},
+ {"matrix": [1, 10], "x": 170, "y": 13, "flags": 4},
+ {"matrix": [1, 11], "x": 186, "y": 13, "flags": 4},
+ {"matrix": [1, 12], "x": 202, "y": 13, "flags": 4},
+ {"matrix": [1, 13], "x": 222, "y": 13, "flags": 4},
+ {"matrix": [2, 0], "x": 6, "y": 26, "flags": 4},
+ {"matrix": [2, 1], "x": 28, "y": 26, "flags": 4},
+ {"matrix": [2, 2], "x": 44, "y": 26, "flags": 4},
+ {"matrix": [2, 3], "x": 61, "y": 26, "flags": 4},
+ {"matrix": [2, 4], "x": 77, "y": 26, "flags": 4},
+ {"matrix": [2, 5], "x": 93, "y": 26, "flags": 4},
+ {"matrix": [2, 6], "x": 109, "y": 26, "flags": 4},
+ {"matrix": [2, 7], "x": 125, "y": 26, "flags": 4},
+ {"matrix": [2, 8], "x": 141, "y": 26, "flags": 4},
+ {"matrix": [2, 9], "x": 157, "y": 26, "flags": 4},
+ {"matrix": [2, 10], "x": 174, "y": 26, "flags": 4},
+ {"matrix": [2, 11], "x": 190, "y": 26, "flags": 4},
+ {"matrix": [2, 13], "x": 216, "y": 26, "flags": 4},
+ {"matrix": [3, 0], "x": 10, "y": 51, "flags": 4},
+ {"matrix": [3, 1], "x": 36, "y": 51, "flags": 4},
+ {"matrix": [3, 2], "x": 53, "y": 51, "flags": 4},
+ {"matrix": [3, 3], "x": 69, "y": 51, "flags": 4},
+ {"matrix": [3, 4], "x": 85, "y": 51, "flags": 4},
+ {"matrix": [3, 5], "x": 101, "y": 51, "flags": 4},
+ {"matrix": [3, 6], "x": 117, "y": 51, "flags": 4},
+ {"matrix": [3, 7], "x": 133, "y": 51, "flags": 4},
+ {"matrix": [3, 8], "x": 149, "y": 51, "flags": 4},
+ {"matrix": [3, 9], "x": 166, "y": 51, "flags": 4},
+ {"matrix": [3, 10], "x": 182, "y": 51, "flags": 4},
+ {"matrix": [3, 12], "x": 212, "y": 51, "flags": 4},
+ {"matrix": [4, 0], "x": 2, "y": 64, "flags": 4},
+ {"matrix": [4, 1], "x": 22, "y": 64, "flags": 4},
+ {"matrix": [4, 2], "x": 42, "y": 64, "flags": 4},
+ {"matrix": [4, 4], "x": 75, "y": 64, "flags": 4},
+ {"matrix": [4, 5], "x": 103, "y": 64, "flags": 4},
+ {"matrix": [4, 6], "x": 103, "y": 64, "flags": 4},
+ {"matrix": [4, 8], "x": 131, "y": 64, "flags": 4},
+ {"matrix": [4, 9], "x": 163, "y": 64, "flags": 4},
+ {"matrix": [4, 10], "x": 184, "y": 64, "flags": 4},
+ {"matrix": [4, 11], "x": 204, "y": 64, "flags": 4},
+ {"matrix": [4, 13], "x": 224, "y": 64, "flags": 4}
+ ],
+ "max_brightness": 200,
+ "hue_steps": 20,
+ "sat_steps": 20,
+ "speed_steps": 20,
+ "val_steps": 20
+ },
+ "url": "https://github.com/JZ-Skyloong",
+ "usb": {
+ "device_version": "1.0.0",
+ "pid": "0x6A62",
+ "vid": "0x1EA7",
+ "max_power": 380
+ },
+ "community_layouts": ["60_ansi"],
+ "layouts": {
+ "LAYOUT_all": {
+ "layout": [
+ {"matrix": [0, 0], "x": 0, "y": 0, "w": 1},
+ {"matrix": [0, 1], "x": 1, "y": 0},
+ {"matrix": [0, 2], "x": 2, "y": 0},
+ {"matrix": [0, 3], "x": 3, "y": 0},
+ {"matrix": [0, 4], "x": 4, "y": 0},
+ {"matrix": [0, 5], "x": 5, "y": 0},
+ {"matrix": [0, 6], "x": 6, "y": 0},
+ {"matrix": [0, 7], "x": 7, "y": 0},
+ {"matrix": [0, 8], "x": 8, "y": 0},
+ {"matrix": [0, 9], "x": 9, "y": 0},
+ {"matrix": [0, 10], "x": 10, "y": 0},
+ {"matrix": [0, 11], "x": 11, "y": 0},
+ {"matrix": [0, 12], "x": 12, "y": 0},
+ {"matrix": [0, 13], "x": 13, "y": 0, "w": 2},
+ {"matrix": [1, 0], "x": 0, "y": 1, "w": 1.5},
+ {"matrix": [1, 1], "x": 1.5, "y": 1},
+ {"matrix": [1, 2], "x": 2.5, "y": 1},
+ {"matrix": [1, 3], "x": 3.5, "y": 1},
+ {"matrix": [1, 4], "x": 4.5, "y": 1},
+ {"matrix": [1, 5], "x": 5.5, "y": 1},
+ {"matrix": [1, 6], "x": 6.5, "y": 1},
+ {"matrix": [1, 7], "x": 7.5, "y": 1},
+ {"matrix": [1, 8], "x": 8.5, "y": 1},
+ {"matrix": [1, 9], "x": 9.5, "y": 1},
+ {"matrix": [1, 10], "x": 10.5, "y": 1},
+ {"matrix": [1, 11], "x": 11.5, "y": 1},
+ {"matrix": [1, 12], "x": 12.5, "y": 1},
+ {"matrix": [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},
+ {"matrix": [2, 3], "x": 3.75, "y": 2},
+ {"matrix": [2, 4], "x": 4.75, "y": 2},
+ {"matrix": [2, 5], "x": 5.75, "y": 2},
+ {"matrix": [2, 6], "x": 6.75, "y": 2},
+ {"matrix": [2, 7], "x": 7.75, "y": 2},
+ {"matrix": [2, 8], "x": 8.75, "y": 2},
+ {"matrix": [2, 9], "x": 9.75, "y": 2},
+ {"matrix": [2, 10], "x": 10.75, "y": 2},
+ {"matrix": [2, 11], "x": 11.75, "y": 2},
+ {"matrix": [2, 13], "x": 12.75, "y": 2, "w": 2.25},
+ {"matrix": [3, 0], "x": 0, "y": 3, "w": 2.25},
+ {"matrix": [3, 1], "x": 2.25, "y": 3},
+ {"matrix": [3, 2], "x": 3.25, "y": 3},
+ {"matrix": [3, 3], "x": 4.25, "y": 3},
+ {"matrix": [3, 4], "x": 5.25, "y": 3},
+ {"matrix": [3, 5], "x": 6.25, "y": 3},
+ {"matrix": [3, 6], "x": 7.25, "y": 3},
+ {"matrix": [3, 7], "x": 8.25, "y": 3},
+ {"matrix": [3, 8], "x": 9.25, "y": 3},
+ {"matrix": [3, 9], "x": 10.25, "y": 3},
+ {"matrix": [3, 10], "x": 11.25, "y": 3},
+ {"matrix": [3, 12], "x": 12.25, "y": 3, "w": 2.75},
+ {"matrix": [4, 0], "x": 0, "y": 4, "w": 1.25},
+ {"matrix": [4, 1], "x": 1.25, "y": 4, "w": 1.25},
+ {"matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.25},
+ {"matrix": [4, 4], "x": 3.75, "y": 4.5, "w": 2.5, "h": 0.5},
+ {"matrix": [4, 5], "x": 3.75, "y": 4, "h": 0.5, "w":6.25},
+ {"matrix": [4, 6], "x": 6.25, "y": 4.5, "h": 0.5, "w":1.25},
+ {"matrix": [4, 8], "x": 7.5, "y": 4.5, "w": 2.5, "h": 0.5},
+ {"matrix": [4, 9], "x": 10, "y": 4, "w": 1.25},
+ {"matrix": [4, 10], "x": 11.25, "y": 4, "w": 1.25},
+ {"matrix": [4, 11], "x": 12.5, "y": 4, "w": 1.25},
+ {"matrix": [4, 13], "x": 13.75, "y": 4, "w": 1.25}
+ ]
+ },
+ "LAYOUT_60_ansi": {
+ "layout": [
+ {"matrix": [0, 0], "x": 0, "y": 0, "w": 1},
+ {"matrix": [0, 1], "x": 1, "y": 0},
+ {"matrix": [0, 2], "x": 2, "y": 0},
+ {"matrix": [0, 3], "x": 3, "y": 0},
+ {"matrix": [0, 4], "x": 4, "y": 0},
+ {"matrix": [0, 5], "x": 5, "y": 0},
+ {"matrix": [0, 6], "x": 6, "y": 0},
+ {"matrix": [0, 7], "x": 7, "y": 0},
+ {"matrix": [0, 8], "x": 8, "y": 0},
+ {"matrix": [0, 9], "x": 9, "y": 0},
+ {"matrix": [0, 10], "x": 10, "y": 0},
+ {"matrix": [0, 11], "x": 11, "y": 0},
+ {"matrix": [0, 12], "x": 12, "y": 0},
+ {"matrix": [0, 13], "x": 13, "y": 0, "w": 2},
+ {"matrix": [1, 0], "x": 0, "y": 1, "w": 1.5},
+ {"matrix": [1, 1], "x": 1.5, "y": 1},
+ {"matrix": [1, 2], "x": 2.5, "y": 1},
+ {"matrix": [1, 3], "x": 3.5, "y": 1},
+ {"matrix": [1, 4], "x": 4.5, "y": 1},
+ {"matrix": [1, 5], "x": 5.5, "y": 1},
+ {"matrix": [1, 6], "x": 6.5, "y": 1},
+ {"matrix": [1, 7], "x": 7.5, "y": 1},
+ {"matrix": [1, 8], "x": 8.5, "y": 1},
+ {"matrix": [1, 9], "x": 9.5, "y": 1},
+ {"matrix": [1, 10], "x": 10.5, "y": 1},
+ {"matrix": [1, 11], "x": 11.5, "y": 1},
+ {"matrix": [1, 12], "x": 12.5, "y": 1},
+ {"matrix": [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},
+ {"matrix": [2, 3], "x": 3.75, "y": 2},
+ {"matrix": [2, 4], "x": 4.75, "y": 2},
+ {"matrix": [2, 5], "x": 5.75, "y": 2},
+ {"matrix": [2, 6], "x": 6.75, "y": 2},
+ {"matrix": [2, 7], "x": 7.75, "y": 2},
+ {"matrix": [2, 8], "x": 8.75, "y": 2},
+ {"matrix": [2, 9], "x": 9.75, "y": 2},
+ {"matrix": [2, 10], "x": 10.75, "y": 2},
+ {"matrix": [2, 11], "x": 11.75, "y": 2},
+ {"matrix": [2, 13], "x": 12.75, "y": 2, "w": 2.25},
+ {"matrix": [3, 0], "x": 0, "y": 3, "w": 2.25},
+ {"matrix": [3, 1], "x": 2.25, "y": 3},
+ {"matrix": [3, 2], "x": 3.25, "y": 3},
+ {"matrix": [3, 3], "x": 4.25, "y": 3},
+ {"matrix": [3, 4], "x": 5.25, "y": 3},
+ {"matrix": [3, 5], "x": 6.25, "y": 3},
+ {"matrix": [3, 6], "x": 7.25, "y": 3},
+ {"matrix": [3, 7], "x": 8.25, "y": 3},
+ {"matrix": [3, 8], "x": 9.25, "y": 3},
+ {"matrix": [3, 9], "x": 10.25, "y": 3},
+ {"matrix": [3, 10], "x": 11.25, "y": 3},
+ {"matrix": [3, 12], "x": 12.25, "y": 3, "w": 2.75},
+ {"matrix": [4, 0], "x": 0, "y": 4, "w": 1.25},
+ {"matrix": [4, 1], "x": 1.25, "y": 4, "w": 1.25},
+ {"matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.25},
+ {"matrix": [4, 5], "x": 3.75, "y": 4, "w": 6.25},
+ {"matrix": [4, 9], "x": 10, "y": 4, "w": 1.25},
+ {"matrix": [4, 10], "x": 11.25, "y": 4, "w": 1.25},
+ {"matrix": [4, 11], "x": 12.5, "y": 4, "w": 1.25},
+ {"matrix": [4, 13], "x": 13.75, "y": 4, "w": 1.25}
+ ]
+ },
+ "LAYOUT_60_ansi_split_space": {
+ "layout": [
+ {"matrix": [0, 0], "x": 0, "y": 0, "w": 1},
+ {"matrix": [0, 1], "x": 1, "y": 0},
+ {"matrix": [0, 2], "x": 2, "y": 0},
+ {"matrix": [0, 3], "x": 3, "y": 0},
+ {"matrix": [0, 4], "x": 4, "y": 0},
+ {"matrix": [0, 5], "x": 5, "y": 0},
+ {"matrix": [0, 6], "x": 6, "y": 0},
+ {"matrix": [0, 7], "x": 7, "y": 0},
+ {"matrix": [0, 8], "x": 8, "y": 0},
+ {"matrix": [0, 9], "x": 9, "y": 0},
+ {"matrix": [0, 10], "x": 10, "y": 0},
+ {"matrix": [0, 11], "x": 11, "y": 0},
+ {"matrix": [0, 12], "x": 12, "y": 0},
+ {"matrix": [0, 13], "x": 13, "y": 0, "w": 2},
+ {"matrix": [1, 0], "x": 0, "y": 1, "w": 1.5},
+ {"matrix": [1, 1], "x": 1.5, "y": 1},
+ {"matrix": [1, 2], "x": 2.5, "y": 1},
+ {"matrix": [1, 3], "x": 3.5, "y": 1},
+ {"matrix": [1, 4], "x": 4.5, "y": 1},
+ {"matrix": [1, 5], "x": 5.5, "y": 1},
+ {"matrix": [1, 6], "x": 6.5, "y": 1},
+ {"matrix": [1, 7], "x": 7.5, "y": 1},
+ {"matrix": [1, 8], "x": 8.5, "y": 1},
+ {"matrix": [1, 9], "x": 9.5, "y": 1},
+ {"matrix": [1, 10], "x": 10.5, "y": 1},
+ {"matrix": [1, 11], "x": 11.5, "y": 1},
+ {"matrix": [1, 12], "x": 12.5, "y": 1},
+ {"matrix": [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},
+ {"matrix": [2, 3], "x": 3.75, "y": 2},
+ {"matrix": [2, 4], "x": 4.75, "y": 2},
+ {"matrix": [2, 5], "x": 5.75, "y": 2},
+ {"matrix": [2, 6], "x": 6.75, "y": 2},
+ {"matrix": [2, 7], "x": 7.75, "y": 2},
+ {"matrix": [2, 8], "x": 8.75, "y": 2},
+ {"matrix": [2, 9], "x": 9.75, "y": 2},
+ {"matrix": [2, 10], "x": 10.75, "y": 2},
+ {"matrix": [2, 11], "x": 11.75, "y": 2},
+ {"matrix": [2, 13], "x": 12.75, "y": 2, "w": 2.25},
+ {"matrix": [3, 0], "x": 0, "y": 3, "w": 2.25},
+ {"matrix": [3, 1], "x": 2.25, "y": 3},
+ {"matrix": [3, 2], "x": 3.25, "y": 3},
+ {"matrix": [3, 3], "x": 4.25, "y": 3},
+ {"matrix": [3, 4], "x": 5.25, "y": 3},
+ {"matrix": [3, 5], "x": 6.25, "y": 3},
+ {"matrix": [3, 6], "x": 7.25, "y": 3},
+ {"matrix": [3, 7], "x": 8.25, "y": 3},
+ {"matrix": [3, 8], "x": 9.25, "y": 3},
+ {"matrix": [3, 9], "x": 10.25, "y": 3},
+ {"matrix": [3, 10], "x": 11.25, "y": 3},
+ {"matrix": [3, 12], "x": 12.25, "y": 3, "w": 2.75},
+ {"matrix": [4, 0], "x": 0, "y": 4, "w": 1.25},
+ {"matrix": [4, 1], "x": 1.25, "y": 4, "w": 1.25},
+ {"matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.25},
+ {"matrix": [4, 4], "x": 3.75, "y": 4, "w": 2.5},
+ {"matrix": [4, 6], "x": 6.25, "y": 4, "w": 1.25},
+ {"matrix": [4, 8], "x": 7.5, "y": 4, "w": 2.5},
+ {"matrix": [4, 9], "x": 10, "y": 4, "w": 1.25},
+ {"matrix": [4, 10], "x": 11.25, "y": 4, "w": 1.25},
+ {"matrix": [4, 11], "x": 12.5, "y": 4, "w": 1.25},
+ {"matrix": [4, 13], "x": 13.75, "y": 4, "w": 1.25}
+ ]
+ }
+ }
+}
diff --git a/keyboards/skyloong/gk61/pro_48/keymaps/default/keymap.c b/keyboards/skyloong/gk61/pro_48/keymaps/default/keymap.c
new file mode 100644
index 0000000000..9534f25d80
--- /dev/null
+++ b/keyboards/skyloong/gk61/pro_48/keymaps/default/keymap.c
@@ -0,0 +1,44 @@
+// Copyright 2021 JZ-Skyloong (@JZ-Skyloong)
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#include QMK_KEYBOARD_H
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ /*
+ * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
+ * │Esc│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │Bsp│
+ * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤
+ * │Tab│ Q │ W │ E | R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │
+ * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤
+ * │Cap│ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ |Ent│
+ * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤
+ * │Sft│ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ |Sft| │
+ * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤
+ * │Ctl│GUI│Alt│ │Spc│Mut│ │ |Spc|Alt│App│Ctl│ │Mo1|
+ * └───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┘
+ */
+ [0] = LAYOUT_all(
+ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC,
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
+ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_MUTE, KC_SPC, KC_RALT, KC_APP, KC_RCTL, MO(1)
+ ),
+
+ [1] = LAYOUT_all(
+ KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______,
+ _______, RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+ )
+
+};
+
+#if defined(ENCODER_MAP_ENABLE)
+const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
+ [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
+ [1] = { ENCODER_CCW_CW(RGB_HUD, RGB_HUI) }
+};
+#endif
+
diff --git a/keyboards/skyloong/gk61/pro_48/keymaps/default/rules.mk b/keyboards/skyloong/gk61/pro_48/keymaps/default/rules.mk
new file mode 100644
index 0000000000..ee32568148
--- /dev/null
+++ b/keyboards/skyloong/gk61/pro_48/keymaps/default/rules.mk
@@ -0,0 +1 @@
+ENCODER_MAP_ENABLE = yes
diff --git a/keyboards/skyloong/gk61/pro_48/keymaps/via/keymap.c b/keyboards/skyloong/gk61/pro_48/keymaps/via/keymap.c
new file mode 100644
index 0000000000..e63830f519
--- /dev/null
+++ b/keyboards/skyloong/gk61/pro_48/keymaps/via/keymap.c
@@ -0,0 +1,68 @@
+// Copyright 2021 JZ-Skyloong (@JZ-Skyloong)
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#include QMK_KEYBOARD_H
+
+enum layer_names {
+ _WIN,
+ _MAC,
+ _WIN_INDEX,
+ _MAC_INDEX
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ /*
+ * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
+ * │Esc│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │Bsp│
+ * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤
+ * │Tab│ Q │ W │ E | R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │
+ * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤
+ * │Cap│ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ |Ent│
+ * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤
+ * │Sft│ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ |Sft| │
+ * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤
+ * │Ctl│GUI│Alt│ │Spc│Spc│Mut│ |Spc|Alt│App│Ctl│ │Mox|
+ * └───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┘
+ */
+ [_WIN] = LAYOUT_all(
+ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC,
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
+ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_MUTE, KC_SPC, KC_RALT, KC_APP, KC_RCTL, MO(_WIN_INDEX)
+ ),
+
+ [_MAC] = LAYOUT_all(
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, KC_LALT, KC_LGUI, _______, _______, _______, _______, KC_RGUI, KC_RALT, _______, MO(_MAC_INDEX)
+ ),
+
+ [_WIN_INDEX] = 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,
+ _______, _______, TO(0), TO(1), _______, _______, _______, _______, _______, _______, RGB_M_P, RGB_RMOD, RGB_RMOD, RGB_TOG,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SPD, RGB_SPI, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAD, RGB_VAI, KC_UP, _______,
+ _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______
+ ),
+
+ [_MAC_INDEX] = LAYOUT_all(
+ KC_GRV , KC_F14, KC_F15, C(KC_UP), G(KC_D), G(KC_SPC), LSG(KC_4), KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_DEL,
+ _______, _______, TO(0), TO(1), _______, _______, _______, _______, _______, _______, RGB_M_P, RGB_RMOD, RGB_RMOD, RGB_TOG,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SPD, RGB_SPI, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAD, RGB_VAI, KC_UP, _______,
+ _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______
+ )
+};
+
+#if defined(ENCODER_MAP_ENABLE)
+const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
+ [_WIN] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
+ [_MAC] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS) },
+ [_WIN_INDEX] = { ENCODER_CCW_CW(RGB_HUD, RGB_HUI) },
+ [_MAC_INDEX] = { ENCODER_CCW_CW(RGB_HUD, RGB_HUI) }
+};
+#endif
+
diff --git a/keyboards/skyloong/gk61/pro_48/keymaps/via/rules.mk b/keyboards/skyloong/gk61/pro_48/keymaps/via/rules.mk
new file mode 100644
index 0000000000..f1adcab005
--- /dev/null
+++ b/keyboards/skyloong/gk61/pro_48/keymaps/via/rules.mk
@@ -0,0 +1,2 @@
+VIA_ENABLE = yes
+ENCODER_MAP_ENABLE = yes
diff --git a/keyboards/skyloong/gk61/pro_48/mcuconf.h b/keyboards/skyloong/gk61/pro_48/mcuconf.h
new file mode 100644
index 0000000000..91dde6cc42
--- /dev/null
+++ b/keyboards/skyloong/gk61/pro_48/mcuconf.h
@@ -0,0 +1,11 @@
+// Copyright 2023 linlin012 (@linlin012)
+// SPDX-License-Identifier: GPL-2.0-or-later
+#pragma once
+
+#include_next <mcuconf.h>
+
+#undef STM32_I2C_USE_I2C1
+#define STM32_I2C_USE_I2C1 TRUE
+
+#undef STM32_I2C_USE_DMA
+#define STM32_I2C_USE_DMA TRUE
diff --git a/keyboards/skyloong/gk61/pro_48/pro_48.c b/keyboards/skyloong/gk61/pro_48/pro_48.c
new file mode 100644
index 0000000000..e4f64c022f
--- /dev/null
+++ b/keyboards/skyloong/gk61/pro_48/pro_48.c
@@ -0,0 +1,227 @@
+// 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)*/
+const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to IS31 manual for these locations
+ * driver
+ * | R location
+ * | | G location
+ * | | | B location
+ * | | | | */
+ {0, CS1_SW1, CS2_SW1, CS3_SW1},
+ {0, CS1_SW2, CS2_SW2, CS3_SW2},
+ {0, CS1_SW3, CS2_SW3, CS3_SW3},
+ {0, CS1_SW4, CS2_SW4, CS3_SW4},
+ {0, CS1_SW5, CS2_SW5, CS3_SW5},
+ {0, CS1_SW6, CS2_SW6, CS3_SW6},
+ {0, CS1_SW7, CS2_SW7, CS3_SW7},
+ {0, CS1_SW8, CS2_SW8, CS3_SW8},
+ {0, CS1_SW9, CS2_SW9, CS3_SW9},
+ {0, CS1_SW10, CS2_SW10, CS3_SW10},
+ {0, CS1_SW11, CS2_SW11, CS3_SW11},
+ {0, CS16_SW1, CS17_SW1, CS18_SW1},
+ {0, CS16_SW2, CS17_SW2, CS18_SW2},
+ {0, CS16_SW3, CS17_SW3, CS18_SW3},
+
+ {0, CS4_SW1, CS5_SW1, CS6_SW1},
+ {0, CS4_SW2, CS5_SW2, CS6_SW2},
+ {0, CS4_SW3, CS5_SW3, CS6_SW3},
+ {0, CS4_SW4, CS5_SW4, CS6_SW4},
+ {0, CS4_SW5, CS5_SW5, CS6_SW5},
+ {0, CS4_SW6, CS5_SW6, CS6_SW6},
+ {0, CS4_SW7, CS5_SW7, CS6_SW7},
+ {0, CS4_SW8, CS5_SW8, CS6_SW8},
+ {0, CS4_SW9, CS5_SW9, CS6_SW9},
+ {0, CS4_SW10, CS5_SW10, CS6_SW10},
+ {0, CS4_SW11, CS5_SW11, CS6_SW11},
+ {0, CS16_SW4, CS17_SW4, CS18_SW4},
+ {0, CS16_SW5, CS17_SW5, CS18_SW5},
+ {0, CS16_SW6, CS17_SW6, CS18_SW6},
+
+ {0, CS7_SW1, CS8_SW1, CS9_SW1},
+ {0, CS7_SW2, CS8_SW2, CS9_SW2},
+ {0, CS7_SW3, CS8_SW3, CS9_SW3},
+ {0, CS7_SW4, CS8_SW4, CS9_SW4},
+ {0, CS7_SW5, CS8_SW5, CS9_SW5},
+ {0, CS7_SW6, CS8_SW6, CS9_SW6},
+ {0, CS7_SW7, CS8_SW7, CS9_SW7},
+ {0, CS7_SW8, CS8_SW8, CS9_SW8},
+ {0, CS7_SW9, CS8_SW9, CS9_SW9},
+ {0, CS7_SW10, CS8_SW10, CS9_SW10},
+ {0, CS7_SW11, CS8_SW11, CS9_SW11},
+ {0, CS16_SW7, CS17_SW7, CS18_SW7},
+ {0, CS16_SW8, CS17_SW8, CS18_SW8},
+
+ {0, CS10_SW1, CS11_SW1, CS12_SW1},
+ {0, CS10_SW2, CS11_SW2, CS12_SW2},
+ {0, CS10_SW3, CS11_SW3, CS12_SW3},
+ {0, CS10_SW4, CS11_SW4, CS12_SW4},
+ {0, CS10_SW5, CS11_SW5, CS12_SW5},
+ {0, CS10_SW6, CS11_SW6, CS12_SW6},
+ {0, CS10_SW7, CS11_SW7, CS12_SW7},
+ {0, CS10_SW8, CS11_SW8, CS12_SW8},
+ {0, CS10_SW9, CS11_SW9, CS12_SW9},
+ {0, CS10_SW10, CS11_SW10, CS12_SW10},
+ {0, CS10_SW11, CS11_SW11, CS12_SW11},
+ {0, CS16_SW9, CS17_SW9, CS18_SW9},
+
+ {0, CS13_SW1, CS14_SW1, CS15_SW1},
+ {0, CS13_SW2, CS14_SW2, CS15_SW2},
+ {0, CS13_SW3, CS14_SW3, CS15_SW3},
+ {0, CS13_SW4, CS14_SW4, CS15_SW4},
+ {0, CS13_SW5, CS14_SW5, CS15_SW5},
+ {0, CS13_SW5, CS14_SW5, CS15_SW5},
+ {0, CS13_SW6, CS14_SW6, CS15_SW6},
+ {0, CS13_SW7, CS14_SW7, CS15_SW7},
+ {0, CS13_SW8, CS14_SW8, CS15_SW8},
+ {0, CS13_SW9, CS14_SW9, CS15_SW9},
+ {0, CS13_SW10, CS14_SW10, CS15_SW10}
+};
+
+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 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) {
+ writePinLow(SDB);
+ suspend_power_down_user();
+}
+
+void suspend_wakeup_init_kb(void) {
+ writePinHigh(SDB);
+ suspend_wakeup_init_user();
+}
+#endif
+
+bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
+ if (!process_record_user(keycode, record)) {
+ return false;
+ }
+ switch (keycode) {
+# ifdef RGB_MATRIX_ENABLE
+ case RGB_TOG:
+ if (record->event.pressed) {
+ switch (rgb_matrix_get_flags()) {
+ case LED_FLAG_ALL: {
+ rgb_matrix_set_flags(LED_FLAG_NONE);
+ rgb_matrix_set_color_all(0, 0, 0);
+ } break;
+ default: {
+ rgb_matrix_set_flags(LED_FLAG_ALL);
+ } break;
+ }
+ }
+ 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;
+ }
+}
+
+void board_init(void) {
+ // JTAG-DP Disabled and SW-DP Disabled
+ AFIO->MAPR = (AFIO->MAPR & ~AFIO_MAPR_SWJ_CFG_Msk) | AFIO_MAPR_SWJ_CFG_DISABLE;
+# ifdef RGB_MATRIX_ENABLE
+ setPinOutput(SDB);
+ writePinHigh(SDB);
+# endif
+}
diff --git a/keyboards/skyloong/gk61/pro_48/readme.md b/keyboards/skyloong/gk61/pro_48/readme.md
new file mode 100644
index 0000000000..babfec4a3b
--- /dev/null
+++ b/keyboards/skyloong/gk61/pro_48/readme.md
@@ -0,0 +1,33 @@
+# GK61 PRO 48
+
+![GK61 PRO](https://i.imgur.com/DTetyVLh.jpg)
+
+## The PCB features:
+* QMK & VIA compatibility
+* RGB Matrix backlight
+* The space bar position switch can be interchanged with encoder module.
+
+
+The following is the QMK Firmware for the Destop 60% keylayout - designed in Dongguan Jizhi Electronic Technology Co., Ltd
+
+* Keyboard Maintainer: [NaturalZh](https://github.com/NaturalZh)
+* Hardware Supported: DestopPCB for Skyloong keylayout 60%, STM32F103C8T6
+* Hardware Availability: http://www.skyloong.com.cn https://skyloong.vip
+
+Make example for this keyboard (after setting up your build environment):
+
+ make skyloong/gk61/pro_48:default
+
+Flashing example for this keyboard:
+
+ make skyloong/gk61/pro_48: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 - some may have pads you must short instead
+* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available
diff --git a/keyboards/skyloong/gk61/pro_48/rules.mk b/keyboards/skyloong/gk61/pro_48/rules.mk
new file mode 100644
index 0000000000..3bbd261429
--- /dev/null
+++ b/keyboards/skyloong/gk61/pro_48/rules.mk
@@ -0,0 +1 @@
+# File intentionally blank
diff --git a/keyboards/skyloong/gk61/v1/config.h b/keyboards/skyloong/gk61/v1/config.h
new file mode 100644
index 0000000000..153bd8d0eb
--- /dev/null
+++ b/keyboards/skyloong/gk61/v1/config.h
@@ -0,0 +1,26 @@
+/* Copyright 2021 JZ-Skyloong (@JZ-Skyloong)
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General 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 DRIVER_ADDR_1 SNLED27351_I2C_ADDRESS_GND
+
+#define SNLED27351_DRIVER_COUNT 1
+#define RGB_MATRIX_LED_COUNT 64
+
+#define RGB_MATRIX_FRAMEBUFFER_EFFECTS //Enable frame effects
+#define RGB_MATRIX_KEYPRESSES //Reacts to keypress
+#define RGB_DISABLE_WHEN_USB_SUSPENDED //turn off effects when suspended
+#define SDB C1
diff --git a/keyboards/skyloong/gk61/v1/halconf.h b/keyboards/skyloong/gk61/v1/halconf.h
new file mode 100644
index 0000000000..74dddca8a5
--- /dev/null
+++ b/keyboards/skyloong/gk61/v1/halconf.h
@@ -0,0 +1,21 @@
+/* Copyright 2021 JZ-Skyloong (@JZ-Skyloong)
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General 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 HAL_USE_I2C TRUE
+
+#include_next <halconf.h>
+
diff --git a/keyboards/skyloong/gk61/v1/info.json b/keyboards/skyloong/gk61/v1/info.json
new file mode 100644
index 0000000000..6015efa12c
--- /dev/null
+++ b/keyboards/skyloong/gk61/v1/info.json
@@ -0,0 +1,331 @@
+{
+ "manufacturer": "JZ-Skyloong",
+ "keyboard_name": "GK61",
+ "maintainer": "JZ-Skyloong",
+ "bootloader": "stm32duino",
+ "diode_direction": "ROW2COL",
+ "features": {
+ "bootmagic": true,
+ "extrakey": true,
+ "mousekey": true,
+ "nkro": true,
+ "command": false,
+ "console": false,
+ "rgb_matrix": true
+ },
+ "processor": "STM32F103",
+ "matrix_pins": {
+ "cols": ["B11", "C6", "C7", "B12", "B13", "B14", "B15", "B10", "B2", "B1", "D2", "B3", "B4", "B5"],
+ "rows": ["A15", "C10", "C11", "C12", "A3"]
+ },
+ "rgb_matrix": {
+ "animations": {
+ "breathing": true,
+ "band_spiral_val": true,
+ "cycle_all": true,
+ "cycle_left_right": true,
+ "cycle_up_down": true,
+ "cycle_out_in": true,
+ "cycle_out_in_dual": true,
+ "rainbow_moving_chevron": true,
+ "cycle_pinwheel": true,
+ "cycle_spiral": true,
+ "dual_beacon": true,
+ "raindrops": true,
+ "jellybean_raindrops": true,
+ "pixel_rain": true,
+ "typing_heatmap": true,
+ "digital_rain": true,
+ "solid_reactive_simple": true,
+ "solid_reactive_multiwide": true,
+ "solid_reactive_multinexus": true,
+ "splash": true,
+ "solid_splash": true
+ },
+ "driver": "snled27351",
+ "hue_steps": 20,
+ "layout": [
+ {"matrix": [0, 0], "x": 0, "y": 0, "flags": 4},
+ {"matrix": [0, 1], "x": 15, "y": 0, "flags": 4},
+ {"matrix": [0, 2], "x": 30, "y": 0, "flags": 4},
+ {"matrix": [0, 3], "x": 45, "y": 0, "flags": 4},
+ {"matrix": [0, 4], "x": 60, "y": 0, "flags": 4},
+ {"matrix": [0, 5], "x": 75, "y": 0, "flags": 4},
+ {"matrix": [0, 6], "x": 89, "y": 0, "flags": 4},
+ {"matrix": [0, 7], "x": 104, "y": 0, "flags": 4},
+ {"matrix": [0, 8], "x": 119, "y": 0, "flags": 4},
+ {"matrix": [0, 9], "x": 134, "y": 0, "flags": 4},
+ {"matrix": [0, 10], "x": 149, "y": 0, "flags": 4},
+ {"matrix": [0, 11], "x": 164, "y": 0, "flags": 4},
+ {"matrix": [0, 12], "x": 179, "y": 0, "flags": 4},
+ {"matrix": [0, 13], "x": 209, "y": 0, "flags": 4},
+ {"matrix": [1, 0], "x": 0, "y": 16, "flags": 4},
+ {"matrix": [1, 1], "x": 22, "y": 16, "flags": 4},
+ {"matrix": [1, 2], "x": 37, "y": 16, "flags": 4},
+ {"matrix": [1, 3], "x": 52, "y": 16, "flags": 4},
+ {"matrix": [1, 4], "x": 67, "y": 16, "flags": 4},
+ {"matrix": [1, 5], "x": 82, "y": 16, "flags": 4},
+ {"matrix": [1, 6], "x": 97, "y": 16, "flags": 4},
+ {"matrix": [1, 7], "x": 112, "y": 16, "flags": 4},
+ {"matrix": [1, 8], "x": 127, "y": 16, "flags": 4},
+ {"matrix": [1, 9], "x": 142, "y": 16, "flags": 4},
+ {"matrix": [1, 10], "x": 156, "y": 16, "flags": 4},
+ {"matrix": [1, 11], "x": 171, "y": 16, "flags": 4},
+ {"matrix": [1, 12], "x": 186, "y": 16, "flags": 4},
+ {"matrix": [1, 13], "x":216, "y": 16, "flags": 4},
+ {"matrix": [2, 0], "x": 0, "y": 32, "flags": 4},
+ {"matrix": [2, 1], "x": 26, "y": 32, "flags": 4},
+ {"matrix": [2, 2], "x": 41, "y": 32, "flags": 4},
+ {"matrix": [2, 3], "x": 56, "y": 32, "flags": 4},
+ {"matrix": [2, 4], "x": 71, "y": 32, "flags": 4},
+ {"matrix": [2, 5], "x": 86, "y": 32, "flags": 4},
+ {"matrix": [2, 6], "x": 101, "y": 32, "flags": 4},
+ {"matrix": [2, 7], "x": 115, "y": 32, "flags": 4},
+ {"matrix": [2, 8], "x": 130, "y": 32, "flags": 4},
+ {"matrix": [2, 9], "x": 145, "y": 32, "flags": 4},
+ {"matrix": [2, 10], "x": 160, "y": 32, "flags": 4},
+ {"matrix": [2, 11], "x": 175, "y": 32, "flags": 4},
+ {"matrix": [2, 13], "x": 208, "y": 32, "flags": 4},
+ {"matrix": [3, 0], "x": 0, "y": 48, "flags": 4},
+ {"matrix": [3, 1], "x": 34, "y": 48, "flags": 4},
+ {"matrix": [3, 2], "x": 48, "y": 48, "flags": 4},
+ {"matrix": [3, 3], "x": 63, "y": 48, "flags": 4},
+ {"matrix": [3, 4], "x": 78, "y": 48, "flags": 4},
+ {"matrix": [3, 6], "x": 93, "y": 48, "flags": 4},
+ {"matrix": [4, 6], "x": 108, "y": 48, "flags": 4},
+ {"matrix": [3, 7], "x": 123, "y": 48, "flags": 4},
+ {"matrix": [3, 8], "x": 138, "y": 48, "flags": 4},
+ {"matrix": [3, 9], "x": 153, "y": 48, "flags": 4},
+ {"matrix": [3, 10], "x": 168, "y": 48, "flags": 4},
+ {"matrix": [3, 12], "x": 205, "y": 48, "flags": 4},
+ {"matrix": [4, 0], "x": 0, "y": 64, "flags": 4},
+ {"matrix": [4, 1], "x": 19, "y": 64, "flags": 4},
+ {"matrix": [4, 2], "x": 37, "y": 64, "flags": 4},
+ {"matrix": [4, 4], "x": 56, "y": 64, "flags": 4},
+ {"matrix": [4, 5], "x":95, "y": 64, "flags": 4},
+ {"matrix": [3, 5], "x": 107, "y": 64, "flags": 4},
+ {"matrix": [4, 8], "x": 130, "y": 64, "flags": 4},
+ {"matrix": [4, 9], "x": 149, "y": 64, "flags": 4},
+ {"matrix": [4, 10], "x": 175, "y": 64, "flags": 4},
+ {"matrix": [4, 11], "x": 198, "y": 64, "flags": 4},
+ {"matrix": [4, 13], "x": 220, "y": 64, "flags": 4}
+ ],
+ "max_brightness": 200,
+ "sat_steps": 20,
+ "speed_steps": 20,
+ "val_steps": 20
+ },
+ "url": "https://github.com/JZ-Skyloong",
+ "usb": {
+ "vid": "0x1EA7",
+ "device_version": "1.0.0",
+ "pid": "0x6061",
+ "max_power": 380,
+ "force_nkro": true
+ },
+ "community_layouts": ["60_ansi"],
+ "layouts": {
+ "LAYOUT_all": {
+ "layout": [
+ {"matrix": [0, 0], "x": 0, "y": 0, "w": 1},
+ {"matrix": [0, 1], "x": 1, "y": 0},
+ {"matrix": [0, 2], "x": 2, "y": 0},
+ {"matrix": [0, 3], "x": 3, "y": 0},
+ {"matrix": [0, 4], "x": 4, "y": 0},
+ {"matrix": [0, 5], "x": 5, "y": 0},
+ {"matrix": [0, 6], "x": 6, "y": 0},
+ {"matrix": [0, 7], "x": 7, "y": 0},
+ {"matrix": [0, 8], "x": 8, "y": 0},
+ {"matrix": [0, 9], "x": 9, "y": 0},
+ {"matrix": [0, 10], "x": 10, "y": 0},
+ {"matrix": [0, 11], "x": 11, "y": 0},
+ {"matrix": [0, 12], "x": 12, "y": 0},
+ {"matrix": [0, 13], "x": 13, "y": 0, "w": 2},
+ {"matrix": [1, 0], "x": 0, "y": 1, "w": 1.5},
+ {"matrix": [1, 1], "x": 1.5, "y": 1},
+ {"matrix": [1, 2], "x": 2.5, "y": 1},
+ {"matrix": [1, 3], "x": 3.5, "y": 1},
+ {"matrix": [1, 4], "x": 4.5, "y": 1},
+ {"matrix": [1, 5], "x": 5.5, "y": 1},
+ {"matrix": [1, 6], "x": 6.5, "y": 1},
+ {"matrix": [1, 7], "x": 7.5, "y": 1},
+ {"matrix": [1, 8], "x": 8.5, "y": 1},
+ {"matrix": [1, 9], "x": 9.5, "y": 1},
+ {"matrix": [1, 10], "x": 10.5, "y": 1},
+ {"matrix": [1, 11], "x": 11.5, "y": 1},
+ {"matrix": [1, 12], "x": 12.5, "y": 1},
+ {"matrix": [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},
+ {"matrix": [2, 3], "x": 3.75, "y": 2},
+ {"matrix": [2, 4], "x": 4.75, "y": 2},
+ {"matrix": [2, 5], "x": 5.75, "y": 2},
+ {"matrix": [2, 6], "x": 6.75, "y": 2},
+ {"matrix": [2, 7], "x": 7.75, "y": 2},
+ {"matrix": [2, 8], "x": 8.75, "y": 2},
+ {"matrix": [2, 9], "x": 9.75, "y": 2},
+ {"matrix": [2, 10], "x": 10.75, "y": 2},
+ {"matrix": [2, 11], "x": 11.75, "y": 2},
+ {"matrix": [2, 13], "x": 12.75, "y": 2, "w": 2.25},
+ {"matrix": [3, 0], "x": 0, "y": 3, "w": 2.25},
+ {"matrix": [3, 1], "x": 2.25, "y": 3},
+ {"matrix": [3, 2], "x": 3.25, "y": 3},
+ {"matrix": [3, 3], "x": 4.25, "y": 3},
+ {"matrix": [3, 4], "x": 5.25, "y": 3},
+ {"matrix": [3, 6], "x": 6.25, "y": 3},
+ {"matrix": [4, 6], "x": 7.25, "y": 3},
+ {"matrix": [3, 7], "x": 8.25, "y": 3},
+ {"matrix": [3, 8], "x": 9.25, "y": 3},
+ {"matrix": [3, 9], "x": 10.25, "y": 3},
+ {"matrix": [3, 10], "x": 11.25, "y": 3},
+ {"matrix": [3, 12], "x": 12.25, "y": 3, "w": 2.75},
+ {"matrix": [4, 0], "x": 0, "y": 4, "w": 1.25},
+ {"matrix": [4, 1], "x": 1.25, "y": 4, "w": 1.25},
+ {"matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.25},
+ {"matrix": [4, 4], "x": 3.75, "y": 4, "w": 2.6},
+ {"matrix": [4, 5], "x": 6.35, "y": 4, "w": 0.7},
+ {"matrix": [3, 5], "x": 7.15, "y": 4, "w": 1.5},
+ {"matrix": [4, 8], "x": 8.75, "y": 4, "w": 1.25},
+ {"matrix": [4, 9], "x": 10, "y": 4, "w": 1.25},
+ {"matrix": [4, 10], "x": 11.25, "y": 4, "w": 1.25},
+ {"matrix": [4, 11], "x": 12.5, "y": 4, "w": 1.25},
+ {"matrix": [4, 13], "x": 13.75, "y": 4, "w": 1.25}
+ ]
+ },
+ "LAYOUT_60_ansi": {
+ "layout": [
+ {"matrix": [0, 0], "x": 0, "y": 0, "w": 1},
+ {"matrix": [0, 1], "x": 1, "y": 0},
+ {"matrix": [0, 2], "x": 2, "y": 0},
+ {"matrix": [0, 3], "x": 3, "y": 0},
+ {"matrix": [0, 4], "x": 4, "y": 0},
+ {"matrix": [0, 5], "x": 5, "y": 0},
+ {"matrix": [0, 6], "x": 6, "y": 0},
+ {"matrix": [0, 7], "x": 7, "y": 0},
+ {"matrix": [0, 8], "x": 8, "y": 0},
+ {"matrix": [0, 9], "x": 9, "y": 0},
+ {"matrix": [0, 10], "x": 10, "y": 0},
+ {"matrix": [0, 11], "x": 11, "y": 0},
+ {"matrix": [0, 12], "x": 12, "y": 0},
+ {"matrix": [0, 13], "x": 13, "y": 0, "w": 2},
+ {"matrix": [1, 0], "x": 0, "y": 1, "w": 1.5},
+ {"matrix": [1, 1], "x": 1.5, "y": 1},
+ {"matrix": [1, 2], "x": 2.5, "y": 1},
+ {"matrix": [1, 3], "x": 3.5, "y": 1},
+ {"matrix": [1, 4], "x": 4.5, "y": 1},
+ {"matrix": [1, 5], "x": 5.5, "y": 1},
+ {"matrix": [1, 6], "x": 6.5, "y": 1},
+ {"matrix": [1, 7], "x": 7.5, "y": 1},
+ {"matrix": [1, 8], "x": 8.5, "y": 1},
+ {"matrix": [1, 9], "x": 9.5, "y": 1},
+ {"matrix": [1, 10], "x": 10.5, "y": 1},
+ {"matrix": [1, 11], "x": 11.5, "y": 1},
+ {"matrix": [1, 12], "x": 12.5, "y": 1},
+ {"matrix": [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},
+ {"matrix": [2, 3], "x": 3.75, "y": 2},
+ {"matrix": [2, 4], "x": 4.75, "y": 2},
+ {"matrix": [2, 5], "x": 5.75, "y": 2},
+ {"matrix": [2, 6], "x": 6.75, "y": 2},
+ {"matrix": [2, 7], "x": 7.75, "y": 2},
+ {"matrix": [2, 8], "x": 8.75, "y": 2},
+ {"matrix": [2, 9], "x": 9.75, "y": 2},
+ {"matrix": [2, 10], "x": 10.75, "y": 2},
+ {"matrix": [2, 11], "x": 11.75, "y": 2},
+ {"matrix": [2, 13], "x": 12.75, "y": 2, "w": 2.25},
+ {"matrix": [3, 0], "x": 0, "y": 3, "w": 2.25},
+ {"matrix": [3, 1], "x": 2.25, "y": 3},
+ {"matrix": [3, 2], "x": 3.25, "y": 3},
+ {"matrix": [3, 3], "x": 4.25, "y": 3},
+ {"matrix": [3, 4], "x": 5.25, "y": 3},
+ {"matrix": [3, 6], "x": 6.25, "y": 3},
+ {"matrix": [4, 6], "x": 7.25, "y": 3},
+ {"matrix": [3, 7], "x": 8.25, "y": 3},
+ {"matrix": [3, 8], "x": 9.25, "y": 3},
+ {"matrix": [3, 9], "x": 10.25, "y": 3},
+ {"matrix": [3, 10], "x": 11.25, "y": 3},
+ {"matrix": [3, 12], "x": 12.25, "y": 3, "w": 2.75},
+ {"matrix": [4, 0], "x": 0, "y": 4, "w": 1.25},
+ {"matrix": [4, 1], "x": 1.25, "y": 4, "w": 1.25},
+ {"matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.25},
+ {"matrix": [4, 5], "x": 3.75, "y": 4, "w": 6.25},
+ {"matrix": [4, 9], "x": 10, "y": 4, "w": 1.25},
+ {"matrix": [4, 10], "x": 11.25, "y": 4, "w": 1.25},
+ {"matrix": [4, 11], "x": 12.5, "y": 4, "w": 1.25},
+ {"matrix": [4, 13], "x": 13.75, "y": 4, "w": 1.25}
+ ]
+ },
+ "LAYOUT_60_ansi_split_space": {
+ "layout": [
+ {"matrix": [0, 0], "x": 0, "y": 0, "w": 1},
+ {"matrix": [0, 1], "x": 1, "y": 0},
+ {"matrix": [0, 2], "x": 2, "y": 0},
+ {"matrix": [0, 3], "x": 3, "y": 0},
+ {"matrix": [0, 4], "x": 4, "y": 0},
+ {"matrix": [0, 5], "x": 5, "y": 0},
+ {"matrix": [0, 6], "x": 6, "y": 0},
+ {"matrix": [0, 7], "x": 7, "y": 0},
+ {"matrix": [0, 8], "x": 8, "y": 0},
+ {"matrix": [0, 9], "x": 9, "y": 0},
+ {"matrix": [0, 10], "x": 10, "y": 0},
+ {"matrix": [0, 11], "x": 11, "y": 0},
+ {"matrix": [0, 12], "x": 12, "y": 0},
+ {"matrix": [0, 13], "x": 13, "y": 0, "w": 2},
+ {"matrix": [1, 0], "x": 0, "y": 1, "w": 1.5},
+ {"matrix": [1, 1], "x": 1.5, "y": 1},
+ {"matrix": [1, 2], "x": 2.5, "y": 1},
+ {"matrix": [1, 3], "x": 3.5, "y": 1},
+ {"matrix": [1, 4], "x": 4.5, "y": 1},
+ {"matrix": [1, 5], "x": 5.5, "y": 1},
+ {"matrix": [1, 6], "x": 6.5, "y": 1},
+ {"matrix": [1, 7], "x": 7.5, "y": 1},
+ {"matrix": [1, 8], "x": 8.5, "y": 1},
+ {"matrix": [1, 9], "x": 9.5, "y": 1},
+ {"matrix": [1, 10], "x": 10.5, "y": 1},
+ {"matrix": [1, 11], "x": 11.5, "y": 1},
+ {"matrix": [1, 12], "x": 12.5, "y": 1},
+ {"matrix": [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},
+ {"matrix": [2, 3], "x": 3.75, "y": 2},
+ {"matrix": [2, 4], "x": 4.75, "y": 2},
+ {"matrix": [2, 5], "x": 5.75, "y": 2},
+ {"matrix": [2, 6], "x": 6.75, "y": 2},
+ {"matrix": [2, 7], "x": 7.75, "y": 2},
+ {"matrix": [2, 8], "x": 8.75, "y": 2},
+ {"matrix": [2, 9], "x": 9.75, "y": 2},
+ {"matrix": [2, 10], "x": 10.75, "y": 2},
+ {"matrix": [2, 11], "x": 11.75, "y": 2},
+ {"matrix": [2, 13], "x": 12.75, "y": 2, "w": 2.25},
+ {"matrix": [3, 0], "x": 0, "y": 3, "w": 2.25},
+ {"matrix": [3, 1], "x": 2.25, "y": 3},
+ {"matrix": [3, 2], "x": 3.25, "y": 3},
+ {"matrix": [3, 3], "x": 4.25, "y": 3},
+ {"matrix": [3, 4], "x": 5.25, "y": 3},
+ {"matrix": [3, 6], "x": 6.25, "y": 3},
+ {"matrix": [4, 6], "x": 7.25, "y": 3},
+ {"matrix": [3, 7], "x": 8.25, "y": 3},
+ {"matrix": [3, 8], "x": 9.25, "y": 3},
+ {"matrix": [3, 9], "x": 10.25, "y": 3},
+ {"matrix": [3, 10], "x": 11.25, "y": 3},
+ {"matrix": [3, 12], "x": 12.25, "y": 3, "w": 2.75},
+ {"matrix": [4, 0], "x": 0, "y": 4, "w": 1.25},
+ {"matrix": [4, 1], "x": 1.25, "y": 4, "w": 1.25},
+ {"matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.25},
+ {"matrix": [4, 4], "x": 3.75, "y": 4, "w": 2.5},
+ {"matrix": [3, 5], "x": 6.25, "y": 4, "w": 2.5},
+ {"matrix": [4, 8], "x": 8.75, "y": 4, "w": 1.25},
+ {"matrix": [4, 9], "x": 10, "y": 4, "w": 1.25},
+ {"matrix": [4, 10], "x": 11.25, "y": 4, "w": 1.25},
+ {"matrix": [4, 11], "x": 12.5, "y": 4, "w": 1.25},
+ {"matrix": [4, 13], "x": 13.75, "y": 4, "w": 1.25}
+ ]
+ }
+ }
+
+}
+
diff --git a/keyboards/skyloong/gk61/v1/keymaps/default/keymap.c b/keyboards/skyloong/gk61/v1/keymaps/default/keymap.c
new file mode 100644
index 0000000000..4ddb35f6f4
--- /dev/null
+++ b/keyboards/skyloong/gk61/v1/keymaps/default/keymap.c
@@ -0,0 +1,47 @@
+/* Copyright 2021 JZ-Skyloong (@JZ-Skyloong)
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+
+#include QMK_KEYBOARD_H
+
+// Defines names for use in layer keycodes and the keymap
+enum layer_names {
+ _BASE,
+ _FN,
+};
+
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ /* Base */
+ [_BASE] = LAYOUT_all(
+ KC_GRAVE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, KC_EQUAL, KC_BSPC,
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
+ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM , KC_DOT, KC_SLASH, KC_RSFT,
+ KC_LCTL, KC_LWIN, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_APP, KC_RCTL, MO(1)
+ ),
+ /* Fn+ */
+ [_FN] = LAYOUT_all(
+ KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR,
+ RGB_TOG, RGB_VAD, RGB_VAI, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_VOLD, KC_VOLU, KC_MUTE,
+ RGB_MOD, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MPRV, KC_MNXT, KC_MPLY,
+ KC_LSFT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_UP, KC_UP, KC_RSFT,
+ KC_CALC, KC_MAIL, KC_NO, KC_SPC, KC_SPC, KC_SPC, KC_LEFT, KC_LEFT, KC_DOWN, KC_RGHT, KC_NO
+ ),
+
+};
+
+
diff --git a/keyboards/skyloong/gk61/v1/keymaps/via/keymap.c b/keyboards/skyloong/gk61/v1/keymaps/via/keymap.c
new file mode 100644
index 0000000000..4ddb35f6f4
--- /dev/null
+++ b/keyboards/skyloong/gk61/v1/keymaps/via/keymap.c
@@ -0,0 +1,47 @@
+/* Copyright 2021 JZ-Skyloong (@JZ-Skyloong)
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+
+#include QMK_KEYBOARD_H
+
+// Defines names for use in layer keycodes and the keymap
+enum layer_names {
+ _BASE,
+ _FN,
+};
+
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ /* Base */
+ [_BASE] = LAYOUT_all(
+ KC_GRAVE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, KC_EQUAL, KC_BSPC,
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
+ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM , KC_DOT, KC_SLASH, KC_RSFT,
+ KC_LCTL, KC_LWIN, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_APP, KC_RCTL, MO(1)
+ ),
+ /* Fn+ */
+ [_FN] = LAYOUT_all(
+ KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR,
+ RGB_TOG, RGB_VAD, RGB_VAI, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_VOLD, KC_VOLU, KC_MUTE,
+ RGB_MOD, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MPRV, KC_MNXT, KC_MPLY,
+ KC_LSFT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_UP, KC_UP, KC_RSFT,
+ KC_CALC, KC_MAIL, KC_NO, KC_SPC, KC_SPC, KC_SPC, KC_LEFT, KC_LEFT, KC_DOWN, KC_RGHT, KC_NO
+ ),
+
+};
+
+
diff --git a/keyboards/mlego/m65/keymaps/via/rules.mk b/keyboards/skyloong/gk61/v1/keymaps/via/rules.mk
index 1e5b99807c..1e5b99807c 100644
--- a/keyboards/mlego/m65/keymaps/via/rules.mk
+++ b/keyboards/skyloong/gk61/v1/keymaps/via/rules.mk
diff --git a/keyboards/skyloong/gk61/v1/mcuconf.h b/keyboards/skyloong/gk61/v1/mcuconf.h
new file mode 100644
index 0000000000..92905e0b11
--- /dev/null
+++ b/keyboards/skyloong/gk61/v1/mcuconf.h
@@ -0,0 +1,21 @@
+/* Copyright 2021 JZ-Skyloong (@JZ-Skyloong)
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General 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_next <mcuconf.h>
+
+#undef STM32_I2C_USE_I2C1
+#define STM32_I2C_USE_I2C1 TRUE
diff --git a/keyboards/skyloong/gk61/v1/readme.md b/keyboards/skyloong/gk61/v1/readme.md
new file mode 100644
index 0000000000..95917ad957
--- /dev/null
+++ b/keyboards/skyloong/gk61/v1/readme.md
@@ -0,0 +1,33 @@
+# GK61
+
+![GK61](https://i.imgur.com/hEufouph.jpg)
+
+## The PCB features:
+* QMK & VIA compatibility
+* RGB Matrix backlight
+
+
+The following is the QMK Firmware for the Destop 60% keylayout - designed in Dongguan Jizhi Electronic Technology Co., Ltd
+* Keyboard Maintainer: [JZ-Skyloong](https://github.com/JZ-Skyloong)
+* Hardware Supported: DestopPCB for Skyloong keylayout 60%, STM32F103C8T6
+* Hardware Availability: http://www.skyloong.com.cn
+
+Make example for this keyboard (after setting up your build environment):
+
+ make skyloong/gk61/v1:default
+ make skyloong/gk61/v1:via
+
+Flashing example for this keyboard:
+
+ make skyloong/gk61/v1:default:flash
+ make skyloong/gk61/v1:via: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 - some may have pads you must short instead
+* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available
diff --git a/keyboards/skyloong/gk61/v1/rules.mk b/keyboards/skyloong/gk61/v1/rules.mk
new file mode 100644
index 0000000000..6e7633bfe0
--- /dev/null
+++ b/keyboards/skyloong/gk61/v1/rules.mk
@@ -0,0 +1 @@
+# This file intentionally left blank
diff --git a/keyboards/skyloong/gk61/v1/v1.c b/keyboards/skyloong/gk61/v1/v1.c
new file mode 100644
index 0000000000..cb3772f6b4
--- /dev/null
+++ b/keyboards/skyloong/gk61/v1/v1.c
@@ -0,0 +1,119 @@
+/* Copyright 2021 JZ-Skyloong (@JZ-Skyloong)
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+#include "quantum.h"
+
+#ifdef RGB_MATRIX_ENABLE
+
+const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to SNLED27351 manual for these locations
+ * driver
+ * | R location
+ * | | G location
+ * | | | B location
+ * | | | | */
+ {0, C_1, B_1, A_1},
+ {0, C_2, B_2, A_2},
+ {0, C_3, B_3, A_3},
+ {0, C_4, B_4, A_4},
+ {0, C_5, B_5, A_5},
+ {0, C_6, B_6, A_6},
+ {0, C_7, B_7, A_7},
+ {0, C_8, B_8, A_8},
+ {0, C_9, B_9, A_9},
+ {0, C_10, B_10, A_10},
+ {0, C_11, B_11, A_11},
+ {0, C_12, B_12, A_12},
+ {0, C_13, B_13, A_13},
+ {0, C_14, B_14, A_14},
+
+
+ {0, F_1, E_1, D_1},
+ {0, F_2, E_2, D_2},
+ {0, F_3, E_3, D_3},
+ {0, F_4, E_4, D_4},
+ {0, F_5, E_5, D_5},
+ {0, F_6, E_6, D_6},
+ {0, F_7, E_7, D_7},
+ {0, F_8, E_8, D_8},
+ {0, F_9, E_9, D_9},
+ {0, F_10, E_10, D_10},
+ {0, F_11, E_11, D_11},
+ {0, F_12, E_12, D_12},
+ {0, F_13, E_13, D_13},
+ {0, F_14, E_14, D_14},
+
+
+ {0, I_1, H_1, G_1},
+ {0, I_2, H_2, G_2},
+ {0, I_3, H_3, G_3},
+ {0, I_4, H_4, G_4},
+ {0, I_5, H_5, G_5},
+ {0, I_6, H_6, G_6},
+ {0, I_7, H_7, G_7},
+ {0, I_8, H_8, G_8},
+ {0, I_9, H_9, G_9},
+ {0, I_10, H_10, G_10},
+ {0, I_11, H_11, G_11},
+ {0, I_12, H_12, G_12},
+ {0, I_13, H_13, G_13},
+
+
+
+ {0, L_1, K_1, J_1},
+ {0, L_2, K_2, J_2},
+ {0, L_3, K_3, J_3},
+ {0, L_4, K_4, J_4},
+ {0, L_5, K_5, J_5},
+ {0, L_6, K_6, J_6},
+ {0, L_7, K_7, J_7},
+ {0, L_8, K_8, J_8},
+ {0, L_9, K_9, J_9},
+ {0, L_10, K_10, J_10},
+ {0, L_11, K_11, J_11},
+ {0, L_13, K_13, J_13},
+
+ {0, L_15, K_15, J_15},
+ {0, L_16, K_16, J_16},
+ {0, I_15, H_15, G_15},
+ {0, I_16, H_16, G_16},
+ {0, F_15, E_15, D_15},
+ {0, F_16, E_16, D_16},
+ {0, C_15, B_15, A_15},
+ {0, C_16, B_16, A_16},
+ {0, I_14, H_14, G_14},
+ {0, L_12, K_12, J_12},
+ {0, L_14, K_14, J_14},
+
+
+};
+#endif // RGB_MATRIX_ENABLE
+
+void suspend_power_down_kb() {
+ writePinLow(SDB);
+
+ suspend_power_down_user();
+}
+
+void suspend_wakeup_init_kb() {
+ writePinHigh(SDB);
+
+ suspend_wakeup_init_user();
+}
+
+void board_init(void) {
+ setPinOutput(SDB);
+ writePinHigh(SDB);
+}
diff --git a/keyboards/skyloong/qk21/v1/config.h b/keyboards/skyloong/qk21/v1/config.h
new file mode 100644
index 0000000000..c74d5cce78
--- /dev/null
+++ b/keyboards/skyloong/qk21/v1/config.h
@@ -0,0 +1,12 @@
+// Copyright 2021 JZ-Skyloong (@JZ-Skyloong)
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#pragma once
+
+/* Enable num-lock LED */
+#define NUM_LOCK_INDEX 13
+
+#define RGB_MATRIX_LED_COUNT 21
+#define RGB_MATRIX_FRAMEBUFFER_EFFECTS //Enable frame effects
+#define RGB_MATRIX_KEYPRESSES //Reacts to keypress
+#define RGB_DISABLE_WHEN_USB_SUSPENDED //turn off effects when suspended
diff --git a/keyboards/skyloong/qk21/v1/info.json b/keyboards/skyloong/qk21/v1/info.json
new file mode 100644
index 0000000000..d5aa5e8be9
--- /dev/null
+++ b/keyboards/skyloong/qk21/v1/info.json
@@ -0,0 +1,129 @@
+{
+ "manufacturer": "JZ-Skyloong",
+ "keyboard_name": "qk21",
+ "maintainer": "linlin012",
+ "bootloader": "atmel-dfu",
+ "diode_direction": "ROW2COL",
+ "features": {
+ "bootmagic": true,
+ "command": false,
+ "console": false,
+ "extrakey": true,
+ "mousekey": true,
+ "nkro": true,
+ "rgb_matrix": true
+ },
+ "matrix_pins": {
+ "cols": ["F7", "E6", "C7", "D5"],
+ "rows": ["F0", "F1", "F4", "F5", "F6", "B4"]
+ },
+ "processor": "atmega32u4",
+ "ws2812": {
+ "pin": "B7"
+ },
+ "rgb_matrix":{
+ "driver": "ws2812",
+ "animations": {
+ "alphas_mods": false,
+ "band_pinwheel_sat": false,
+ "band_pinwheel_val": false,
+ "band_sat": false,
+ "band_spiral_sat": false,
+ "band_spiral_val": false,
+ "breathing": true,
+ "cycle_all": true,
+ "cycle_left_right": false,
+ "cycle_out_in": false,
+ "cycle_out_in_dual": false,
+ "cycle_pinwheel": true,
+ "cycle_spiral": true,
+ "cycle_up_down": true,
+ "dual_beacom": false,
+ "gradient_left_right": false,
+ "gradient_up_down": false,
+ "hue_breathing": false,
+ "hue_pendulum": false,
+ "hue_wave": false,
+ "jellybean_raindrops": true,
+ "pixel_fractal": false,
+ "pixel_rain": true,
+ "rainbow_moving_chevron":false,
+ "rainbow_pinwheels": true,
+ "raindrops": true,
+ "ranbow_beacon": true,
+ "typing_heatmap": true,
+ "solid_reactive_simple": true,
+ "solid_reactive_cross": true,
+ "splash": true
+ },
+ "layout": [
+ {"matrix": [5, 0], "x": 37, "y": 64, "flags": 4},
+ {"matrix": [5, 2], "x": 149, "y": 64, "flags": 4},
+ {"matrix": [5, 3], "x": 224, "y": 58, "flags": 4},
+
+ {"matrix": [4, 0], "x": 0, "y": 51, "flags": 4},
+ {"matrix": [4, 1], "x": 75, "y": 51, "flags": 4},
+ {"matrix": [4, 2], "x": 149, "y": 51, "flags": 4},
+
+ {"matrix": [3, 0], "x": 0, "y": 38, "flags": 4},
+ {"matrix": [3, 1], "x": 75, "y": 38, "flags": 4},
+ {"matrix": [3, 2], "x": 149, "y": 38, "flags": 4},
+ {"matrix": [3, 3], "x": 224, "y": 31, "flags": 4},
+
+ {"matrix": [2, 0], "x": 0, "y": 25, "flags": 4},
+ {"matrix": [2, 1], "x": 75, "y": 25, "flags": 4},
+ {"matrix": [2, 2], "x": 149, "y": 25, "flags": 4},
+
+ {"matrix": [1, 0], "x": 0, "y": 12, "flags": 8},
+ {"matrix": [1, 1], "x": 75, "y": 12, "flags": 4},
+ {"matrix": [1, 2], "x": 149, "y": 12, "flags": 4},
+ {"matrix": [1, 3], "x": 224, "y": 12, "flags": 4},
+
+ {"matrix": [0, 0], "x": 0, "y": 0, "flags": 4},
+ {"matrix": [0, 1], "x": 75, "y": 0, "flags": 4},
+ {"matrix": [0, 2], "x": 149, "y": 0, "flags": 4},
+ {"matrix": [0, 3], "x": 224, "y": 0, "flags": 4}
+
+ ],
+ "hue_steps": 20,
+ "max_brightness": 200,
+ "sat_steps": 20,
+ "speed_steps": 20,
+ "val_steps": 20
+ },
+ "url": "https://github.com/JZ-Skyloong",
+ "usb": {
+ "device_version": "1.0.0",
+ "pid": "0x6021",
+ "vid": "0x1EA7",
+ "max_power": 250
+ },
+ "community_layouts": ["numpad_6x4"],
+ "layouts": {
+ "LAYOUT_numpad_6x4": {
+ "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": [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": [2, 0], "x": 0, "y": 2 },
+ { "matrix": [2, 1], "x": 1, "y": 2 },
+ { "matrix": [2, 2], "x": 2, "y": 2 },
+ { "matrix": [3, 0], "x": 0, "y": 3 },
+ { "matrix": [3, 1], "x": 1, "y": 3 },
+ { "matrix": [3, 2], "x": 2, "y": 3 },
+ { "matrix": [3, 3], "x": 3, "y": 2, "h": 2 },
+ { "matrix": [4, 0], "x": 0, "y": 4 },
+ { "matrix": [4, 1], "x": 1, "y": 4 },
+ { "matrix": [4, 2], "x": 2, "y": 4 },
+ { "matrix": [5, 0], "x": 0, "y": 5, "w": 2 },
+ { "matrix": [5, 2], "x": 2, "y": 5 },
+ { "matrix": [5, 3], "x": 3, "y": 4, "h": 2 }
+ ]
+ }
+ }
+}
diff --git a/keyboards/skyloong/qk21/v1/keymaps/default/keymap.c b/keyboards/skyloong/qk21/v1/keymaps/default/keymap.c
new file mode 100644
index 0000000000..8cb1d20085
--- /dev/null
+++ b/keyboards/skyloong/qk21/v1/keymaps/default/keymap.c
@@ -0,0 +1,54 @@
+// Copyright 2023 QMK
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#include QMK_KEYBOARD_H
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ /*
+ * ┌───┬───┬───┬───┐
+ * │Esc│Tab│MO1│Bsp│
+ * ├───┼───┼───┼───┤
+ * │Num│ / │ * │ - │
+ * ├───┼───┼───┼───┤
+ * │ 7 │ 8 │ 9 │ │
+ * ├───┼───┼───┤ + │
+ * │ 4 │ 5 │ 6 │ │
+ * ├───┼───┼───┼───┤
+ * │ 1 │ 2 │ 3 │ │
+ * ├───┴───┼───┤Ent│
+ * │ 0 │ . │ │
+ * └───────┴───┴───┘
+ */
+ [0] = LAYOUT_numpad_6x4(
+ KC_ESC, KC_TAB, MO(1), KC_BSPC,
+ KC_NUM, KC_PSLS, KC_PAST, KC_PMNS,
+ KC_P7, KC_P8, KC_P9,
+ KC_P4, KC_P5, KC_P6, KC_PPLS,
+ KC_P1, KC_P2, KC_P3,
+ KC_P0, KC_PDOT, KC_PENT
+ ),
+
+ /*
+ * ┌───┐───┬───┬───┐
+ * │Rst│MOD│MO1│Bsp│
+ * └───┘───┼───┼───┤
+ * │Num│HUD│HUI│VAD│
+ * ┌───┬───┬───┐───┤
+ * │Hom│ ↑ │PgU│ │
+ * ├───┼───┼───┤VAI│
+ * │ ← │ │ → │ │
+ * ├───┼───┼───┤───┤
+ * │End│ ↓ │PgD│ │
+ * ├───┴───┼───┤TOG│
+ * │Insert │Del│ │
+ * └───────┴───┘───┘
+ */
+ [1] = LAYOUT_numpad_6x4(
+ QK_BOOT, RGB_MOD, _______, _______,
+ _______, RGB_HUD, RGB_HUI, RGB_VAD,
+ KC_HOME, KC_UP, KC_PGUP,
+ KC_LEFT, RGB_M_SW, KC_RGHT, RGB_VAI,
+ KC_END, KC_DOWN, KC_PGDN,
+ KC_INS, KC_DEL, RGB_TOG
+ )
+};
diff --git a/keyboards/skyloong/qk21/v1/keymaps/via/keymap.c b/keyboards/skyloong/qk21/v1/keymaps/via/keymap.c
new file mode 100644
index 0000000000..8cb1d20085
--- /dev/null
+++ b/keyboards/skyloong/qk21/v1/keymaps/via/keymap.c
@@ -0,0 +1,54 @@
+// Copyright 2023 QMK
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#include QMK_KEYBOARD_H
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ /*
+ * ┌───┬───┬───┬───┐
+ * │Esc│Tab│MO1│Bsp│
+ * ├───┼───┼───┼───┤
+ * │Num│ / │ * │ - │
+ * ├───┼───┼───┼───┤
+ * │ 7 │ 8 │ 9 │ │
+ * ├───┼───┼───┤ + │
+ * │ 4 │ 5 │ 6 │ │
+ * ├───┼───┼───┼───┤
+ * │ 1 │ 2 │ 3 │ │
+ * ├───┴───┼───┤Ent│
+ * │ 0 │ . │ │
+ * └───────┴───┴───┘
+ */
+ [0] = LAYOUT_numpad_6x4(
+ KC_ESC, KC_TAB, MO(1), KC_BSPC,
+ KC_NUM, KC_PSLS, KC_PAST, KC_PMNS,
+ KC_P7, KC_P8, KC_P9,
+ KC_P4, KC_P5, KC_P6, KC_PPLS,
+ KC_P1, KC_P2, KC_P3,
+ KC_P0, KC_PDOT, KC_PENT
+ ),
+
+ /*
+ * ┌───┐───┬───┬───┐
+ * │Rst│MOD│MO1│Bsp│
+ * └───┘───┼───┼───┤
+ * │Num│HUD│HUI│VAD│
+ * ┌───┬───┬───┐───┤
+ * │Hom│ ↑ │PgU│ │
+ * ├───┼───┼───┤VAI│
+ * │ ← │ │ → │ │
+ * ├───┼───┼───┤───┤
+ * │End│ ↓ │PgD│ │
+ * ├───┴───┼───┤TOG│
+ * │Insert │Del│ │
+ * └───────┴───┘───┘
+ */
+ [1] = LAYOUT_numpad_6x4(
+ QK_BOOT, RGB_MOD, _______, _______,
+ _______, RGB_HUD, RGB_HUI, RGB_VAD,
+ KC_HOME, KC_UP, KC_PGUP,
+ KC_LEFT, RGB_M_SW, KC_RGHT, RGB_VAI,
+ KC_END, KC_DOWN, KC_PGDN,
+ KC_INS, KC_DEL, RGB_TOG
+ )
+};
diff --git a/keyboards/skyloong/qk21/v1/keymaps/via/rules.mk b/keyboards/skyloong/qk21/v1/keymaps/via/rules.mk
new file mode 100644
index 0000000000..1e5b99807c
--- /dev/null
+++ b/keyboards/skyloong/qk21/v1/keymaps/via/rules.mk
@@ -0,0 +1 @@
+VIA_ENABLE = yes
diff --git a/keyboards/skyloong/qk21/v1/readme.md b/keyboards/skyloong/qk21/v1/readme.md
new file mode 100644
index 0000000000..871a819f66
--- /dev/null
+++ b/keyboards/skyloong/qk21/v1/readme.md
@@ -0,0 +1,27 @@
+# qk21_V1
+
+![qk21](https://i.imgur.com/d65CJC5h.jpg)
+
+The following is the QMK Firmware for the number pad 6x4 keylayout - designed in Dongguan Jizhi Electronic Technology Co., Ltd
+
+* Keyboard Maintainer: [linlin012](https://github.com/linlin012)
+* Hardware Supported: JK172-RGB(4028)-U PCBs, MEGA32U4-MU
+* Hardware Availability: http://www.skyloong.com.cn
+
+Make example for this keyboard (after setting up your build environment):
+
+ make skyloong/qk21/v1:default
+
+Flashing example for this keyboard:
+
+ make skyloong/qk21/v1:default:flash
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
+
+## 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 - some may have pads you must short instead
+* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available
diff --git a/keyboards/skyloong/qk21/v1/rules.mk b/keyboards/skyloong/qk21/v1/rules.mk
new file mode 100644
index 0000000000..6e7633bfe0
--- /dev/null
+++ b/keyboards/skyloong/qk21/v1/rules.mk
@@ -0,0 +1 @@
+# This file intentionally left blank
diff --git a/keyboards/skyloong/qk21/v1/v1.c b/keyboards/skyloong/qk21/v1/v1.c
new file mode 100644
index 0000000000..9630d3e223
--- /dev/null
+++ b/keyboards/skyloong/qk21/v1/v1.c
@@ -0,0 +1,49 @@
+// Copyright 2021 JZ-Skyloong (@JZ-Skyloong)
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#include "quantum.h"
+
+#if defined(RGB_MATRIX_ENABLE) && defined(NUM_LOCK_INDEX)
+
+bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
+ if (!process_record_user(keycode, record)) {
+ return false;
+ }
+ switch (keycode) {
+# ifdef RGB_MATRIX_ENABLE
+ case RGB_TOG:
+ if (record->event.pressed) {
+ switch (rgb_matrix_get_flags()) {
+ case LED_FLAG_ALL: {
+ rgb_matrix_set_flags(LED_FLAG_NONE);
+ rgb_matrix_set_color_all(0, 0, 0);
+ } break;
+ default: {
+ rgb_matrix_set_flags(LED_FLAG_ALL);
+ } break;
+ }
+ }
+ return false;
+# endif
+ }
+ 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;
+ }
+ // RGB_MATRIX_INDICATOR_SET_COLOR(index, red, green, blue);
+
+ if (host_keyboard_led_state().num_lock) {
+ RGB_MATRIX_INDICATOR_SET_COLOR(NUM_LOCK_INDEX, 255, 255, 255);
+ } else {
+ if (!rgb_matrix_get_flags()) {
+ RGB_MATRIX_INDICATOR_SET_COLOR(NUM_LOCK_INDEX, 0, 0, 0);
+ }
+ }
+ return true;
+}
+
+#endif // NUM_LOCK_INDEX
+
diff --git a/keyboards/smallkeyboard/config.h b/keyboards/smallkeyboard/config.h
index 4bee1c3663..784aece469 100644
--- a/keyboards/smallkeyboard/config.h
+++ b/keyboards/smallkeyboard/config.h
@@ -66,15 +66,8 @@
// #define ENABLE_RGB_MATRIX_SOLID_SPLASH
// #define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
-// This is a 7-bit address, that gets left-shifted and bit 0
-// set to 0 for write, 1 for read (as per I2C protocol)
-// The address will vary depending on your wiring:
-// 0b1110100 AD <-> GND
-// 0b1110111 AD <-> VCC
-// 0b1110101 AD <-> SCL
-// 0b1110110 AD <-> SDA
-#define DRIVER_ADDR_1 0b1110100
+#define DRIVER_ADDR_1 IS31FL3731_I2C_ADDRESS_GND
-#define DRIVER_COUNT 1
+#define IS31FL3731_DRIVER_COUNT 1
#define RGB_MATRIX_LED_COUNT 6
#endif
diff --git a/keyboards/smallkeyboard/smallkeyboard.c b/keyboards/smallkeyboard/smallkeyboard.c
index 7ea6f2c40a..ce79c7df5d 100644
--- a/keyboards/smallkeyboard/smallkeyboard.c
+++ b/keyboards/smallkeyboard/smallkeyboard.c
@@ -17,7 +17,7 @@
#ifdef RGB_MATRIX_ENABLE
-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/keyboards/smithrune/iron165r2/f411/info.json b/keyboards/smithrune/iron165r2/f411/info.json
index c499958255..72547e955e 100644
--- a/keyboards/smithrune/iron165r2/f411/info.json
+++ b/keyboards/smithrune/iron165r2/f411/info.json
@@ -1,4 +1,7 @@
{
+ "eeprom": {
+ "driver": "i2c"
+ },
"backlight": {
"pin": "A6",
"levels": 20,
diff --git a/keyboards/smithrune/iron165r2/f411/rules.mk b/keyboards/smithrune/iron165r2/f411/rules.mk
index e38a7a71b3..f5a58ab0cb 100644
--- a/keyboards/smithrune/iron165r2/f411/rules.mk
+++ b/keyboards/smithrune/iron165r2/f411/rules.mk
@@ -11,6 +11,4 @@ RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
AUDIO_ENABLE = no # Audio output
LTO_ENABLE = no
ENCODER_ENABLE = no
-EEPROM_DRIVER = i2c
BACKLIGHT_ENABLE = yes
-
diff --git a/keyboards/spaceholdings/nebula12/config.h b/keyboards/spaceholdings/nebula12/config.h
index 3853ebcff6..d6e8f0e196 100755
--- a/keyboards/spaceholdings/nebula12/config.h
+++ b/keyboards/spaceholdings/nebula12/config.h
@@ -35,7 +35,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define I2C1_TIMINGR_SCLH 3U
#define I2C1_TIMINGR_SCLL 9U
-#define WS2812_SPI SPID2 // default: SPID1
+#define WS2812_SPI_DRIVER SPID2 // default: SPID1
#define WS2812_SPI_MOSI_PAL_MODE 0 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 5
#define WS2812_SPI_SCK_PAL_MODE 0
#define WS2812_SPI_SCK_PIN B13
@@ -73,7 +73,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 }
#define RGB_BACKLIGHT_COLOR_2 { .h = 127, .s = 255 }
-#define DRIVER_COUNT 1
+#define IS31FL3731_DRIVER_COUNT 1
#define RGB_MATRIX_LED_COUNT 16
// These define which keys in the matrix are alphas/mods
diff --git a/keyboards/spaceholdings/nebula12/rules.mk b/keyboards/spaceholdings/nebula12/rules.mk
index 1c8b41fea7..191a1c0a1b 100755
--- a/keyboards/spaceholdings/nebula12/rules.mk
+++ b/keyboards/spaceholdings/nebula12/rules.mk
@@ -24,4 +24,4 @@ SRC += keyboards/wilba_tech/wt_main.c \
keyboards/wilba_tech/wt_rgb_backlight.c \
drivers/led/issi/is31fl3731.c \
quantum/color.c
-QUANTUM_LIB_SRC += i2c_master.c
+I2C_DRIVER_REQUIRED = yes
diff --git a/keyboards/spaceholdings/nebula68/config.h b/keyboards/spaceholdings/nebula68/config.h
index 43dc7b0d86..f6df627592 100755
--- a/keyboards/spaceholdings/nebula68/config.h
+++ b/keyboards/spaceholdings/nebula68/config.h
@@ -56,7 +56,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 }
#define RGB_BACKLIGHT_COLOR_2 { .h = 127, .s = 255 }
-#define DRIVER_COUNT 2
+#define IS31FL3733_DRIVER_COUNT 2
#define RGB_MATRIX_LED_COUNT 128
// These define which keys in the matrix are alphas/mods
diff --git a/keyboards/spaceholdings/nebula68/rules.mk b/keyboards/spaceholdings/nebula68/rules.mk
index 7880744fff..627f82784e 100755
--- a/keyboards/spaceholdings/nebula68/rules.mk
+++ b/keyboards/spaceholdings/nebula68/rules.mk
@@ -24,4 +24,4 @@ SRC += keyboards/wilba_tech/wt_main.c \
keyboards/wilba_tech/wt_rgb_backlight.c \
drivers/led/issi/is31fl3733.c \
quantum/color.c
-QUANTUM_LIB_SRC += i2c_master.c
+I2C_DRIVER_REQUIRED = yes
diff --git a/keyboards/spiderisland/split78/rules.mk b/keyboards/spiderisland/split78/rules.mk
index edddf67abc..db8262a763 100644
--- a/keyboards/spiderisland/split78/rules.mk
+++ b/keyboards/spiderisland/split78/rules.mk
@@ -12,4 +12,4 @@ RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
# custom matrix setup
CUSTOM_MATRIX = lite
SRC += matrix.c
-QUANTUM_LIB_SRC += i2c_master.c
+I2C_DRIVER_REQUIRED = yes
diff --git a/keyboards/sporewoh/banime40/config.h b/keyboards/sporewoh/banime40/config.h
deleted file mode 100644
index 75882003aa..0000000000
--- a/keyboards/sporewoh/banime40/config.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
-Copyright 2022 sporewoh
-
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General 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 DYNAMIC_KEYMAP_LAYER_COUNT 10
diff --git a/keyboards/sporewoh/banime40/info.json b/keyboards/sporewoh/banime40/info.json
index 3390b8a334..857daf8ec7 100644
--- a/keyboards/sporewoh/banime40/info.json
+++ b/keyboards/sporewoh/banime40/info.json
@@ -13,6 +13,9 @@
"rows": ["E6", "D7", "C6", "D4"]
},
"diode_direction": "COL2ROW",
+ "dynamic_keymap": {
+ "layer_count": 10
+ },
"processor": "atmega32u4",
"bootloader": "caterina",
"community_layouts": ["ortho_4x10"],
diff --git a/keyboards/stront/info.json b/keyboards/stront/info.json
index c3435b1f5d..cd418aa246 100644
--- a/keyboards/stront/info.json
+++ b/keyboards/stront/info.json
@@ -86,6 +86,7 @@
"pin": "GP14"
},
"ws2812": {
+ "driver": "vendor",
"pin": "GP29"
},
"rgblight": {
diff --git a/keyboards/stront/rules.mk b/keyboards/stront/rules.mk
index 940a592d11..c6cdeb5bfc 100644
--- a/keyboards/stront/rules.mk
+++ b/keyboards/stront/rules.mk
@@ -1,5 +1,4 @@
SERIAL_DRIVER = vendor
-WS2812_DRIVER = vendor
POINTING_DEVICE_ENABLE = yes
POINTING_DEVICE_DRIVER = cirque_pinnacle_spi
diff --git a/keyboards/swiftrax/retropad/config.h b/keyboards/swiftrax/retropad/config.h
deleted file mode 100644
index 092f2ba0e9..0000000000
--- a/keyboards/swiftrax/retropad/config.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
-Copyright 2020 Swiftrax <swiftrax@gmail.com>
-
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#pragma once
-
-/*EEPROM for via*/
-#define DYNAMIC_KEYMAP_LAYER_COUNT 3
diff --git a/keyboards/switchplate/southpaw_65/rules.mk b/keyboards/switchplate/southpaw_65/rules.mk
index c6c7f4ef93..89d05c5487 100644
--- a/keyboards/switchplate/southpaw_65/rules.mk
+++ b/keyboards/switchplate/southpaw_65/rules.mk
@@ -17,4 +17,4 @@ CUSTOM_MATRIX = lite
VPATH += drivers/gpio
SRC += pca9555.c matrix.c
-QUANTUM_LIB_SRC += i2c_master.c
+I2C_DRIVER_REQUIRED = yes
diff --git a/keyboards/sx60/rules.mk b/keyboards/sx60/rules.mk
index a18361a0cd..2f0d22e49f 100755
--- a/keyboards/sx60/rules.mk
+++ b/keyboards/sx60/rules.mk
@@ -13,5 +13,5 @@ RGBLIGHT_ENABLE = no
CUSTOM_MATRIX = yes
# project specific files
-QUANTUM_LIB_SRC += i2c_master.c
+I2C_DRIVER_REQUIRED = yes
SRC += matrix.c
diff --git a/keyboards/system76/launch_1/rules.mk b/keyboards/system76/launch_1/rules.mk
index 7dbc07ced0..181976b2dd 100644
--- a/keyboards/system76/launch_1/rules.mk
+++ b/keyboards/system76/launch_1/rules.mk
@@ -23,4 +23,4 @@ LTO_ENABLE = yes # Link-time optimization for smaller binary
# Add System76 EC command interface as well as I2C and USB mux drivers
SRC += system76_ec.c usb_mux.c
-QUANTUM_LIB_SRC += i2c_master.c
+I2C_DRIVER_REQUIRED = yes
diff --git a/keyboards/teleport/native/ansi/keymaps/default/keymap.c b/keyboards/teleport/native/ansi/keymaps/default/keymap.c
index fcea5c41f3..2780fdda7d 100644
--- a/keyboards/teleport/native/ansi/keymaps/default/keymap.c
+++ b/keyboards/teleport/native/ansi/keymaps/default/keymap.c
@@ -53,11 +53,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* RGB matrix indicator code
It reads the current matrix color, offsets the hue by 30,
-and sets val to either 255 or, if defined, RGB_MATRIX_MAXIMUM_BRIGHTNESS
+and sets val to RGB_MATRIX_MAXIMUM_BRIGHTNESS (by default, 255)
This is applied to both caps lock, and other indicator keys for layer 1 */
bool rgb_matrix_indicators_user(void) {
- HSV hsv_ind = {rgb_matrix_get_hue()+30,255,INDICATOR_MAX_BRIGHTNESS};
+ HSV hsv_ind = {rgb_matrix_get_hue()+30,255,RGB_MATRIX_MAXIMUM_BRIGHTNESS};
RGB rgb_ind = hsv_to_rgb(hsv_ind);
/* Sets Caps to different color as indicator. If RGB mode is rain, and caps indicator is off, the LED will always be off.
@@ -70,7 +70,7 @@ bool rgb_matrix_indicators_user(void) {
/* Sets W, A, S, D, LGUI to a different color as layer indicator */
if(IS_LAYER_ON(1)) {
- HSV hsv_ind = {rgb_matrix_get_hue()+30,255,INDICATOR_MAX_BRIGHTNESS};
+ HSV hsv_ind = {rgb_matrix_get_hue()+30,255,RGB_MATRIX_MAXIMUM_BRIGHTNESS};
RGB rgb_ind = hsv_to_rgb(hsv_ind);
rgb_matrix_set_color(W_LED_INDEX, rgb_ind.r, rgb_ind.g, rgb_ind.b);
diff --git a/keyboards/teleport/native/ansi/keymaps/perfmode/keymap.c b/keyboards/teleport/native/ansi/keymaps/perfmode/keymap.c
index abe6188ccf..e34f0f9d16 100644
--- a/keyboards/teleport/native/ansi/keymaps/perfmode/keymap.c
+++ b/keyboards/teleport/native/ansi/keymaps/perfmode/keymap.c
@@ -147,13 +147,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* RGB matrix indicator code
It reads the current matrix color, offsets the hue by 30,
-and sets val to either 255 or, if defined, RGB_MATRIX_MAXIMUM_BRIGHTNESS
+and sets val to RGB_MATRIX_MAXIMUM_BRIGHTNESS (by default, 255)
This is applied to both caps lock, and other indicator keys for layer 1 */
bool rgb_matrix_indicators_user(void) {
/* Layer 2 (perf mode on this keymap) is not supposed to have LED refreshes, hence excluded */
if (!IS_LAYER_ON(2)) {
- HSV hsv_ind = {rgb_matrix_get_hue()+30,255,INDICATOR_MAX_BRIGHTNESS};
+ HSV hsv_ind = {rgb_matrix_get_hue()+30,255,RGB_MATRIX_MAXIMUM_BRIGHTNESS};
RGB rgb_ind = hsv_to_rgb(hsv_ind);
/* Sets Caps to different color as indicator. If RGB mode is rain, and caps indicator is off, the LED will always be off.
@@ -166,7 +166,7 @@ bool rgb_matrix_indicators_user(void) {
/* Sets W, A, S, D, LGUI to a different color as layer indicator */
if(IS_LAYER_ON(1)) {
- HSV hsv_ind = {rgb_matrix_get_hue()+30,255,INDICATOR_MAX_BRIGHTNESS};
+ HSV hsv_ind = {rgb_matrix_get_hue()+30,255,RGB_MATRIX_MAXIMUM_BRIGHTNESS};
RGB rgb_ind = hsv_to_rgb(hsv_ind);
rgb_matrix_set_color(W_LED_INDEX, rgb_ind.r, rgb_ind.g, rgb_ind.b);
diff --git a/keyboards/teleport/native/ansi/keymaps/via/keymap.c b/keyboards/teleport/native/ansi/keymaps/via/keymap.c
index e1fbd285ec..95a5bc58b1 100644
--- a/keyboards/teleport/native/ansi/keymaps/via/keymap.c
+++ b/keyboards/teleport/native/ansi/keymaps/via/keymap.c
@@ -53,11 +53,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* RGB matrix indicator code
It reads the current matrix color, offsets the hue by 30,
-and sets val to either 255 or, if defined, RGB_MATRIX_MAXIMUM_BRIGHTNESS
+and sets val to RGB_MATRIX_MAXIMUM_BRIGHTNESS (by default, 255)
This is applied to both caps lock, and other indicator keys for layer 1 */
bool rgb_matrix_indicators_user(void) {
- HSV hsv_ind = {rgb_matrix_get_hue()+30,255,INDICATOR_MAX_BRIGHTNESS};
+ HSV hsv_ind = {rgb_matrix_get_hue()+30,255,RGB_MATRIX_MAXIMUM_BRIGHTNESS};
RGB rgb_ind = hsv_to_rgb(hsv_ind);
/* Sets Caps to different color as indicator. If RGB mode is rain, and caps indicator is off, the LED will always be off.
@@ -70,7 +70,7 @@ bool rgb_matrix_indicators_user(void) {
/* Sets W, A, S, D, LGUI to a different color as layer indicator */
if(IS_LAYER_ON(1)) {
- HSV hsv_ind = {rgb_matrix_get_hue()+30,255,INDICATOR_MAX_BRIGHTNESS};
+ HSV hsv_ind = {rgb_matrix_get_hue()+30,255,RGB_MATRIX_MAXIMUM_BRIGHTNESS};
RGB rgb_ind = hsv_to_rgb(hsv_ind);
rgb_matrix_set_color(W_LED_INDEX, rgb_ind.r, rgb_ind.g, rgb_ind.b);
diff --git a/keyboards/teleport/native/config.h b/keyboards/teleport/native/config.h
index 1453bfdc94..c607aa0afe 100644
--- a/keyboards/teleport/native/config.h
+++ b/keyboards/teleport/native/config.h
@@ -29,9 +29,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* RGB Matrix driver config */
-#define DRIVER_COUNT 2
-#define DRIVER_ADDR_1 0b1010000
-#define DRIVER_ADDR_2 0b1010011
+#define IS31FL3733_DRIVER_COUNT 2
+#define DRIVER_ADDR_1 IS31FL3733_I2C_ADDRESS_GND_GND
+#define DRIVER_ADDR_2 IS31FL3733_I2C_ADDRESS_GND_VCC
#define DRIVER_1_LED_TOTAL 46
#define DRIVER_2_LED_TOTAL 39
#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
@@ -61,13 +61,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define ENABLE_RGB_MATRIX_CUSTOM_SINGLE_COLOR_RAINDROPS // 0 Single color raindrops, random keys lighting up at randomized intensity
#define ENABLE_RGB_MATRIX_CUSTOM_STATIC_GAME_MODE // - Game mode sets the entire matrix (static) once, then stops LED refreshes
-#define INDICATOR_MAX_BRIGHTNESS 255
-#ifdef RGB_MATRIX_MAXIMUM_BRIGHTNESS
- #undef INDICATOR_MAX_BRIGHTNESS
- #define INDICATOR_MAX_BRIGHTNESS RGB_MATRIX_MAXIMUM_BRIGHTNESS
-#endif
-
-
/* Define indicator LED indices, used for lighting effects */
#define W_LED_INDEX 33
#define A_LED_INDEX 47
diff --git a/keyboards/teleport/native/iso/keymaps/default/keymap.c b/keyboards/teleport/native/iso/keymaps/default/keymap.c
index c1ed3cd4f4..b6f2e7ab82 100644
--- a/keyboards/teleport/native/iso/keymaps/default/keymap.c
+++ b/keyboards/teleport/native/iso/keymaps/default/keymap.c
@@ -53,11 +53,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* RGB matrix indicator code
It reads the current matrix color, offsets the hue by 30,
-and sets val to either 255 or, if defined, RGB_MATRIX_MAXIMUM_BRIGHTNESS
+and sets val to RGB_MATRIX_MAXIMUM_BRIGHTNESS (by default, 255)
This is applied to both caps lock, and other indicator keys for layer 1 */
bool rgb_matrix_indicators_user(void) {
- HSV hsv_ind = {rgb_matrix_get_hue()+30,255,INDICATOR_MAX_BRIGHTNESS};
+ HSV hsv_ind = {rgb_matrix_get_hue()+30,255,RGB_MATRIX_MAXIMUM_BRIGHTNESS};
RGB rgb_ind = hsv_to_rgb(hsv_ind);
/* Sets Caps to different color as indicator. If RGB mode is rain, and caps indicator is off, the LED will always be off.
@@ -70,7 +70,7 @@ bool rgb_matrix_indicators_user(void) {
/* Sets W, A, S, D, LGUI to a different color as layer indicator */
if(IS_LAYER_ON(1)) {
- HSV hsv_ind = {rgb_matrix_get_hue()+30,255,INDICATOR_MAX_BRIGHTNESS};
+ HSV hsv_ind = {rgb_matrix_get_hue()+30,255,RGB_MATRIX_MAXIMUM_BRIGHTNESS};
RGB rgb_ind = hsv_to_rgb(hsv_ind);
rgb_matrix_set_color(W_LED_INDEX, rgb_ind.r, rgb_ind.g, rgb_ind.b);
diff --git a/keyboards/teleport/native/iso/keymaps/perfmode/keymap.c b/keyboards/teleport/native/iso/keymaps/perfmode/keymap.c
index 96e9925fd5..ca311edf5e 100644
--- a/keyboards/teleport/native/iso/keymaps/perfmode/keymap.c
+++ b/keyboards/teleport/native/iso/keymaps/perfmode/keymap.c
@@ -147,13 +147,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* RGB matrix indicator code
It reads the current matrix color, offsets the hue by 30,
-and sets val to either 255 or, if defined, RGB_MATRIX_MAXIMUM_BRIGHTNESS
+and sets val to RGB_MATRIX_MAXIMUM_BRIGHTNESS (by default, 255)
This is applied to both caps lock, and other indicator keys for layer 1 */
bool rgb_matrix_indicators_user(void) {
/* Layer 2 (perf mode on this keymap) is not supposed to have LED refreshes, hence excluded */
if (!IS_LAYER_ON(2)) {
- HSV hsv_ind = {rgb_matrix_get_hue()+30,255,INDICATOR_MAX_BRIGHTNESS};
+ HSV hsv_ind = {rgb_matrix_get_hue()+30,255,RGB_MATRIX_MAXIMUM_BRIGHTNESS};
RGB rgb_ind = hsv_to_rgb(hsv_ind);
/* Sets Caps to different color as indicator. If RGB mode is rain, and caps indicator is off, the LED will always be off.
@@ -166,7 +166,7 @@ bool rgb_matrix_indicators_user(void) {
/* Sets W, A, S, D, LGUI to a different color as layer indicator */
if(IS_LAYER_ON(1)) {
- HSV hsv_ind = {rgb_matrix_get_hue()+30,255,INDICATOR_MAX_BRIGHTNESS};
+ HSV hsv_ind = {rgb_matrix_get_hue()+30,255,RGB_MATRIX_MAXIMUM_BRIGHTNESS};
RGB rgb_ind = hsv_to_rgb(hsv_ind);
rgb_matrix_set_color(W_LED_INDEX, rgb_ind.r, rgb_ind.g, rgb_ind.b);
diff --git a/keyboards/teleport/native/iso/keymaps/via/keymap.c b/keyboards/teleport/native/iso/keymaps/via/keymap.c
index c1ed3cd4f4..b6f2e7ab82 100644
--- a/keyboards/teleport/native/iso/keymaps/via/keymap.c
+++ b/keyboards/teleport/native/iso/keymaps/via/keymap.c
@@ -53,11 +53,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* RGB matrix indicator code
It reads the current matrix color, offsets the hue by 30,
-and sets val to either 255 or, if defined, RGB_MATRIX_MAXIMUM_BRIGHTNESS
+and sets val to RGB_MATRIX_MAXIMUM_BRIGHTNESS (by default, 255)
This is applied to both caps lock, and other indicator keys for layer 1 */
bool rgb_matrix_indicators_user(void) {
- HSV hsv_ind = {rgb_matrix_get_hue()+30,255,INDICATOR_MAX_BRIGHTNESS};
+ HSV hsv_ind = {rgb_matrix_get_hue()+30,255,RGB_MATRIX_MAXIMUM_BRIGHTNESS};
RGB rgb_ind = hsv_to_rgb(hsv_ind);
/* Sets Caps to different color as indicator. If RGB mode is rain, and caps indicator is off, the LED will always be off.
@@ -70,7 +70,7 @@ bool rgb_matrix_indicators_user(void) {
/* Sets W, A, S, D, LGUI to a different color as layer indicator */
if(IS_LAYER_ON(1)) {
- HSV hsv_ind = {rgb_matrix_get_hue()+30,255,INDICATOR_MAX_BRIGHTNESS};
+ HSV hsv_ind = {rgb_matrix_get_hue()+30,255,RGB_MATRIX_MAXIMUM_BRIGHTNESS};
RGB rgb_ind = hsv_to_rgb(hsv_ind);
rgb_matrix_set_color(W_LED_INDEX, rgb_ind.r, rgb_ind.g, rgb_ind.b);
diff --git a/keyboards/teleport/native/native.c b/keyboards/teleport/native/native.c
index c3cac80c22..ab6d588de7 100644
--- a/keyboards/teleport/native/native.c
+++ b/keyboards/teleport/native/native.c
@@ -25,7 +25,7 @@ void keyboard_post_init_kb(void) {
}
#ifdef RGB_MATRIX_ENABLE
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3733_led_t PROGMEM g_is31fl3733_leds[RGB_MATRIX_LED_COUNT] = {
/* Refer to IS31 manual for these locations
* driver
* | R location
diff --git a/keyboards/telophase/rules.mk b/keyboards/telophase/rules.mk
index 1ee3fc58f9..706d610653 100644
--- a/keyboards/telophase/rules.mk
+++ b/keyboards/telophase/rules.mk
@@ -14,7 +14,7 @@ CUSTOM_MATRIX = lite
# project specific files
SRC += matrix.c
-QUANTUM_LIB_SRC += uart.c
+UART_DRIVER_REQUIRED = yes
# Disable unsupported hardware
RGBLIGHT_SUPPORTED = no
diff --git a/keyboards/terrazzo/config.h b/keyboards/terrazzo/config.h
index 0c7a09033d..6ad8c363a3 100644
--- a/keyboards/terrazzo/config.h
+++ b/keyboards/terrazzo/config.h
@@ -17,8 +17,8 @@
#ifdef LED_MATRIX_ENABLE
-#define LED_DRIVER_ADDR_1 0x74
-#define LED_DRIVER_COUNT 1
+#define LED_DRIVER_ADDR_1 IS31FL3731_I2C_ADDRESS_GND
+#define IS31FL3731_DRIVER_COUNT 1
#define LED_MATRIX_LED_COUNT 105
#define LED_MATRIX_ROWS 15
#define LED_MATRIX_COLS 7
diff --git a/keyboards/terrazzo/terrazzo.c b/keyboards/terrazzo/terrazzo.c
index cc62225de7..7717b36e65 100644
--- a/keyboards/terrazzo/terrazzo.c
+++ b/keyboards/terrazzo/terrazzo.c
@@ -21,7 +21,7 @@
#include "print.h"
#include "quantum.h"
-const is31_led PROGMEM g_is31_leds[LED_MATRIX_LED_COUNT] = {
+const is31fl3731_led_t PROGMEM g_is31fl3731_leds[LED_MATRIX_LED_COUNT] = {
/* Refer to IS31 manual for these locations
* https://cdn-learn.adafruit.com/downloads/pdf/adafruit-15x7-7x15-charlieplex-led-matrix-charliewing-featherwing.pdf
*/
diff --git a/keyboards/tetris/keymaps/default/keymap.c b/keyboards/tetris/keymaps/default/keymap.c
index 9e2a96ffc3..057e19d987 100755
--- a/keyboards/tetris/keymaps/default/keymap.c
+++ b/keyboards/tetris/keymaps/default/keymap.c
@@ -94,40 +94,40 @@ void matrix_scan_user(void) {
uint16_t kc = keymap_key_to_keycode(layer, (keypos_t) {.row = 0, .col = i
});
if (kc == KC_TRNS) {
- setrgb(5, 5, 5, (LED_TYPE * ) & led[j]); /* TRNS color 0-255*/
+ setrgb(5, 5, 5, (rgb_led_t * ) & led[j]); /* TRNS color 0-255*/
} else if (kc == KC_NO) {
- setrgb(0, 0, 0, (LED_TYPE * ) & led[j]); /* NO color 0-255*/
+ setrgb(0, 0, 0, (rgb_led_t * ) & led[j]); /* NO color 0-255*/
} else {
if (layer == 1) {
- setrgb(128, 64, 0, (LED_TYPE * ) & led[j]); /* 1 layer 0-255*/
+ setrgb(128, 64, 0, (rgb_led_t * ) & led[j]); /* 1 layer 0-255*/
} else if (layer == 2) {
- setrgb(0, 64, 128, (LED_TYPE * ) & led[j]); /* 2*/
+ setrgb(0, 64, 128, (rgb_led_t * ) & led[j]); /* 2*/
} else if (layer == 3) {
- setrgb(64, 128, 0, (LED_TYPE * ) & led[j]); /* 3*/
+ setrgb(64, 128, 0, (rgb_led_t * ) & led[j]); /* 3*/
} else if (layer == 4) {
- setrgb(0, 128, 64, (LED_TYPE * ) & led[j]); /* 4*/
+ setrgb(0, 128, 64, (rgb_led_t * ) & led[j]); /* 4*/
} else if (layer == 5) {
- setrgb(128, 0, 128, (LED_TYPE * ) & led[j]); /* 5*/
+ setrgb(128, 0, 128, (rgb_led_t * ) & led[j]); /* 5*/
} else if (layer == 6) {
- setrgb(128, 0, 128, (LED_TYPE * ) & led[j]); /* 6*/
+ setrgb(128, 0, 128, (rgb_led_t * ) & led[j]); /* 6*/
} else if (layer == 7) {
- setrgb(128, 128, 0, (LED_TYPE * ) & led[j]); /* 7*/
+ setrgb(128, 128, 0, (rgb_led_t * ) & led[j]); /* 7*/
} else if (layer == 8) {
- setrgb(0, 128, 128, (LED_TYPE * ) & led[j]); /* 8*/
+ setrgb(0, 128, 128, (rgb_led_t * ) & led[j]); /* 8*/
} else if (layer == 9) {
- setrgb(128, 192, 64, (LED_TYPE * ) & led[j]); /* 9*/
+ setrgb(128, 192, 64, (rgb_led_t * ) & led[j]); /* 9*/
} else if (layer == 10) {
- setrgb(64, 192, 128, (LED_TYPE * ) & led[j]); /* 10*/
+ setrgb(64, 192, 128, (rgb_led_t * ) & led[j]); /* 10*/
} else if (layer == 11) {
- setrgb(128, 64, 192, (LED_TYPE * ) & led[j]); /* 11*/
+ setrgb(128, 64, 192, (rgb_led_t * ) & led[j]); /* 11*/
} else if (layer == 12) {
- setrgb(64, 128, 192, (LED_TYPE * ) & led[j]); /* 12*/
+ setrgb(64, 128, 192, (rgb_led_t * ) & led[j]); /* 12*/
} else if (layer == 13) {
- setrgb(128, 192, 0, (LED_TYPE * ) & led[j]); /* 13*/
+ setrgb(128, 192, 0, (rgb_led_t * ) & led[j]); /* 13*/
} else if (layer == 14) {
- setrgb(192, 0, 128, (LED_TYPE * ) & led[j]); /* 14*/
+ setrgb(192, 0, 128, (rgb_led_t * ) & led[j]); /* 14*/
} else if (layer == 15) {
- setrgb(0, 192, 128, (LED_TYPE * ) & led[j]); /* 15*/
+ setrgb(0, 192, 128, (rgb_led_t * ) & led[j]); /* 15*/
}
}
}
diff --git a/keyboards/thevankeyboards/minivan/keymaps/halvves/keymap.c b/keyboards/thevankeyboards/minivan/keymaps/halvves/keymap.c
index 6ef5ecc2c6..ece72f3319 100644
--- a/keyboards/thevankeyboards/minivan/keymaps/halvves/keymap.c
+++ b/keyboards/thevankeyboards/minivan/keymaps/halvves/keymap.c
@@ -180,8 +180,8 @@ void keyboard_post_init_user(void) {
rgblight_mode_noeeprom(RGBLIGHT_EFFECT_BREATHING + 2);
// set other led's to off
- setrgb(0, 0, 0, (LED_TYPE *)&led[0]);
- setrgb(0, 0, 0, (LED_TYPE *)&led[1]);
+ setrgb(0, 0, 0, (rgb_led_t *)&led[0]);
+ setrgb(0, 0, 0, (rgb_led_t *)&led[1]);
rgblight_set();
#endif
}
@@ -190,23 +190,23 @@ layer_state_t layer_state_set_user(layer_state_t state) {
state = update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
#ifdef RGBLIGHT_ENABLE
if (layer_state_cmp(state, _ADJUST)) {
- setrgb(70, 255, 200, (LED_TYPE *)&led[0]);
- setrgb(255, 70, 100, (LED_TYPE *)&led[1]);
+ setrgb(70, 255, 200, (rgb_led_t *)&led[0]);
+ setrgb(255, 70, 100, (rgb_led_t *)&led[1]);
} else if (layer_state_cmp(state, _LOWER)) {
- setrgb(70, 255, 200, (LED_TYPE *)&led[0]);
- setrgb(0, 0, 0, (LED_TYPE *)&led[1]);
+ setrgb(70, 255, 200, (rgb_led_t *)&led[0]);
+ setrgb(0, 0, 0, (rgb_led_t *)&led[1]);
} else if (layer_state_cmp(state, _RAISE)) {
- setrgb(0, 0, 0, (LED_TYPE *)&led[0]);
- setrgb(255, 70, 100, (LED_TYPE *)&led[1]);
+ setrgb(0, 0, 0, (rgb_led_t *)&led[0]);
+ setrgb(255, 70, 100, (rgb_led_t *)&led[1]);
} else if (layer_state_cmp(state, _UTIL)) {
- setrgb(200, 70, 225, (LED_TYPE *)&led[0]);
- setrgb(200, 70, 225, (LED_TYPE *)&led[1]);
+ setrgb(200, 70, 225, (rgb_led_t *)&led[0]);
+ setrgb(200, 70, 225, (rgb_led_t *)&led[1]);
} else if (layer_state_cmp(state, _MOUSE)) {
- setrgb(255, 145, 5, (LED_TYPE *)&led[0]);
- setrgb(255, 145, 5, (LED_TYPE *)&led[1]);
+ setrgb(255, 145, 5, (rgb_led_t *)&led[0]);
+ setrgb(255, 145, 5, (rgb_led_t *)&led[1]);
} else {
- setrgb(0, 0, 0, (LED_TYPE *)&led[0]);
- setrgb(0, 0, 0, (LED_TYPE *)&led[1]);
+ setrgb(0, 0, 0, (rgb_led_t *)&led[0]);
+ setrgb(0, 0, 0, (rgb_led_t *)&led[1]);
}
rgblight_set();
diff --git a/keyboards/thevankeyboards/minivan/keymaps/jetpacktuxedo/keymap.c b/keyboards/thevankeyboards/minivan/keymaps/jetpacktuxedo/keymap.c
index ae3619859a..0999c9490c 100644
--- a/keyboards/thevankeyboards/minivan/keymaps/jetpacktuxedo/keymap.c
+++ b/keyboards/thevankeyboards/minivan/keymaps/jetpacktuxedo/keymap.c
@@ -50,8 +50,8 @@ void keyboard_post_init_user(void) {
rgblight_mode_noeeprom(RGBLIGHT_EFFECT_BREATHING + 2);
// Init the first two LEDs to a static color
- setrgb(0, 0, 0, (LED_TYPE *)&led[0]);
- setrgb(0, 0, 0, (LED_TYPE *)&led[1]);
+ setrgb(0, 0, 0, (rgb_led_t *)&led[0]);
+ setrgb(0, 0, 0, (rgb_led_t *)&led[1]);
rgblight_set();
#endif //RGBLIGHT_ENABLE
}
@@ -75,8 +75,8 @@ layer_state_t layer_state_set_user(layer_state_t state){
led1r = 255;
}
- setrgb(led0r, led0g, led0b, (LED_TYPE *)&led[0]);
- setrgb(led1r, led1g, led1b, (LED_TYPE *)&led[1]);
+ setrgb(led0r, led0g, led0b, (rgb_led_t *)&led[0]);
+ setrgb(led1r, led1g, led1b, (rgb_led_t *)&led[1]);
rgblight_set();
#endif //RGBLIGHT_ENABLE
return state;
diff --git a/keyboards/thevankeyboards/minivan/keymaps/josjoha/keymap.c b/keyboards/thevankeyboards/minivan/keymaps/josjoha/keymap.c
index 145da6b2a5..39eb45e15e 100644
--- a/keyboards/thevankeyboards/minivan/keymaps/josjoha/keymap.c
+++ b/keyboards/thevankeyboards/minivan/keymaps/josjoha/keymap.c
@@ -192,8 +192,8 @@ void keyboard_post_init_user (void) {
rgblight_mode_noeeprom (RGBLIGHT_EFFECT_BREATHING + 2);
// Init the first and last LEDs to a static color.
- setrgb (0, 0, 0, (LED_TYPE *)&led[0]); // Led[0] is led 0
- setrgb (0, 0, 0, (LED_TYPE *)&led[2]); // 2nd led
+ setrgb (0, 0, 0, (rgb_led_t *)&led[0]); // Led[0] is led 0
+ setrgb (0, 0, 0, (rgb_led_t *)&led[2]); // 2nd led
// The logic seems to be to establish the effect first, and then toggle it on/off.
# ifdef STARTUP_MID_LED_OFF
@@ -301,8 +301,8 @@ void isolate_rgblight_set (void) {
led2r = 0;
led2g = 0;
led2b = 0;
- setrgb(led0r, led0g, led0b, (LED_TYPE *)&led[0]); // Led 0
- setrgb(led2r, led2g, led2b, (LED_TYPE *)&led[2]); // Led 2
+ setrgb(led0r, led0g, led0b, (rgb_led_t *)&led[0]); // Led 0
+ setrgb(led2r, led2g, led2b, (rgb_led_t *)&led[2]); // Led 2
}
rgblight_set ();
# endif
@@ -326,8 +326,8 @@ void indicate_fun_stay (void) {
led0g = 50; //
led2r = 255; // red
}
- setrgb(led0r, led0g, led0b, (LED_TYPE *)&led[0]); // Led 0
- setrgb(led2r, led2g, led2b, (LED_TYPE *)&led[2]); // Led 2
+ setrgb(led0r, led0g, led0b, (rgb_led_t *)&led[0]); // Led 0
+ setrgb(led2r, led2g, led2b, (rgb_led_t *)&led[2]); // Led 2
isolate_rgblight_set ();
# endif //RGBLIGHT_ENABLE
@@ -369,8 +369,8 @@ void indicate_base (void) {
led2g = 255;
led2b = 255;
}
- setrgb(led0r, led0g, led0b, (LED_TYPE *)&led[0]); // Led 0
- setrgb(led2r, led2g, led2b, (LED_TYPE *)&led[2]); // Led 2
+ setrgb(led0r, led0g, led0b, (rgb_led_t *)&led[0]); // Led 0
+ setrgb(led2r, led2g, led2b, (rgb_led_t *)&led[2]); // Led 2
isolate_rgblight_set ();
# endif //RGBLIGHT_ENABLE
@@ -535,8 +535,8 @@ void set_led_colors_ (layer_state_t state) {
//---
// pushes the configuration
- setrgb (led0r, led0g, led0b, (LED_TYPE *)&led[0]); // Led 0
- setrgb (led2r, led2g, led2b, (LED_TYPE *)&led[2]); // Led 2
+ setrgb (led0r, led0g, led0b, (rgb_led_t *)&led[0]); // Led 0
+ setrgb (led2r, led2g, led2b, (rgb_led_t *)&led[2]); // Led 2
isolate_rgblight_set (); // Activates the led color change, after on/off check.
diff --git a/keyboards/tkc/portico/config.h b/keyboards/tkc/portico/config.h
index c9a25e843c..442a0900b2 100644
--- a/keyboards/tkc/portico/config.h
+++ b/keyboards/tkc/portico/config.h
@@ -39,16 +39,16 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
# undef ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
# undef ENABLE_RGB_MATRIX_DIGITAL_RAIN
# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200
-# define DRIVER_ADDR_1 0x74
-# define DRIVER_ADDR_2 0x77
-# define DRIVER_COUNT 2
+# define DRIVER_ADDR_1 IS31FL3731_I2C_ADDRESS_GND
+# define DRIVER_ADDR_2 IS31FL3731_I2C_ADDRESS_VCC
+# define IS31FL3731_DRIVER_COUNT 2
# define DRIVER_1_LED_TOTAL 36
# define DRIVER_2_LED_TOTAL 31
# define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
#else
// IS31FL3731 driver
-#define DRIVER_COUNT 2
+#define IS31FL3731_DRIVER_COUNT 2
#define RGB_MATRIX_LED_COUNT 67
#define RGB_BACKLIGHT_ENABLED 1
diff --git a/keyboards/tkc/portico/portico.c b/keyboards/tkc/portico/portico.c
index e41de1c232..bbb09ef8f6 100644
--- a/keyboards/tkc/portico/portico.c
+++ b/keyboards/tkc/portico/portico.c
@@ -19,7 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifdef RGB_MATRIX_ENABLE
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3731_led_t PROGMEM g_is31fl3731_leds[RGB_MATRIX_LED_COUNT] = {
{ 0, C2_1, C3_1, C4_1 },
{ 0, C1_1, C3_2, C4_2 },
{ 0, C1_2, C2_2, C4_3 },
diff --git a/keyboards/tkc/portico/rules.mk b/keyboards/tkc/portico/rules.mk
index 4e382541f4..6bc05372af 100644
--- a/keyboards/tkc/portico/rules.mk
+++ b/keyboards/tkc/portico/rules.mk
@@ -19,4 +19,4 @@ SRC += keyboards/wilba_tech/wt_main.c \
quantum/color.c \
drivers/led/issi/is31fl3731.c
-QUANTUM_LIB_SRC += i2c_master.c
+I2C_DRIVER_REQUIRED = yes
diff --git a/keyboards/tkc/portico68v2/config.h b/keyboards/tkc/portico68v2/config.h
index fd0191d101..f350af712b 100644
--- a/keyboards/tkc/portico68v2/config.h
+++ b/keyboards/tkc/portico68v2/config.h
@@ -17,8 +17,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once
-#define DRIVER_ADDR_1 0b0110000
-#define DRIVER_COUNT 1
+#define DRIVER_ADDR_1 IS31FL3741_I2C_ADDRESS_GND
+#define IS31FL3741_DRIVER_COUNT 1
#define DRIVER_1_LED_TOTAL 82
#define RGB_MATRIX_LED_COUNT DRIVER_1_LED_TOTAL
#define DRIVER_INDICATOR_LED_TOTAL 0
diff --git a/keyboards/tkc/portico68v2/portico68v2.c b/keyboards/tkc/portico68v2/portico68v2.c
index 83a365f7c0..90d8c12fca 100644
--- a/keyboards/tkc/portico68v2/portico68v2.c
+++ b/keyboards/tkc/portico68v2/portico68v2.c
@@ -18,7 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
-const is31_led g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3741_led_t g_is31fl3741_leds[RGB_MATRIX_LED_COUNT] = {
{0, CS18_SW1, CS17_SW1, CS16_SW1}, /* RGB1 */
{0, CS18_SW2, CS17_SW2, CS16_SW2}, /* RGB2 */
{0, CS18_SW3, CS17_SW3, CS16_SW3}, /* RGB3 */
diff --git a/keyboards/tkc/portico75/config.h b/keyboards/tkc/portico75/config.h
index e72c95981b..d512608f9c 100644
--- a/keyboards/tkc/portico75/config.h
+++ b/keyboards/tkc/portico75/config.h
@@ -72,14 +72,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// # define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200
-# define DRIVER_ADDR_1 0b0110000
-# define DRIVER_COUNT 1
+# define DRIVER_ADDR_1 IS31FL3741_I2C_ADDRESS_GND
+# define IS31FL3741_DRIVER_COUNT 1
# define DRIVER_1_LED_TOTAL 98
# define RGB_MATRIX_LED_COUNT DRIVER_1_LED_TOTAL
# define DRIVER_INDICATOR_LED_TOTAL 0
#else
// WT_RGB IS31FL3741 driver code
-# define DRIVER_COUNT 1
+# define IS31FL3741_DRIVER_COUNT 1
# define RGB_MATRIX_LED_COUNT 98
# define RGB_BACKLIGHT_ENABLED 1
diff --git a/keyboards/tkc/portico75/keymaps/via/rules.mk b/keyboards/tkc/portico75/keymaps/via/rules.mk
index 3e4e4a229d..1706771222 100644
--- a/keyboards/tkc/portico75/keymaps/via/rules.mk
+++ b/keyboards/tkc/portico75/keymaps/via/rules.mk
@@ -9,4 +9,4 @@ SRC += keyboards/wilba_tech/wt_main.c \
quantum/color.c \
drivers/led/issi/is31fl3741.c
-QUANTUM_LIB_SRC += i2c_master.c
+I2C_DRIVER_REQUIRED = yes
diff --git a/keyboards/tkc/portico75/portico75.c b/keyboards/tkc/portico75/portico75.c
index 568f75901f..69d6256071 100644
--- a/keyboards/tkc/portico75/portico75.c
+++ b/keyboards/tkc/portico75/portico75.c
@@ -20,7 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifdef RGB_MATRIX_ENABLE
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3741_led_t PROGMEM g_is31fl3741_leds[RGB_MATRIX_LED_COUNT] = {
{0, CS18_SW1, CS17_SW1, CS16_SW1},
{0, CS18_SW2, CS17_SW2, CS16_SW2},
{0, CS18_SW3, CS17_SW3, CS16_SW3},
diff --git a/keyboards/tkw/grandiceps/rev2/info.json b/keyboards/tkw/grandiceps/rev2/info.json
index 786f381c4f..cd80948196 100644
--- a/keyboards/tkw/grandiceps/rev2/info.json
+++ b/keyboards/tkw/grandiceps/rev2/info.json
@@ -2,5 +2,8 @@
"keyboard_name": "Grandiceps Split rev2",
"usb": {
"device_version": "0.0.2"
+ },
+ "eeprom": {
+ "driver": "i2c"
}
}
diff --git a/keyboards/tkw/grandiceps/rev2/rules.mk b/keyboards/tkw/grandiceps/rev2/rules.mk
index 3e82c4507e..20f2871924 100644
--- a/keyboards/tkw/grandiceps/rev2/rules.mk
+++ b/keyboards/tkw/grandiceps/rev2/rules.mk
@@ -1,4 +1,2 @@
-EEPROM_DRIVER = i2c
-
POINTING_DEVICE_ENABLE = yes
POINTING_DEVICE_DRIVER = pimoroni_trackball
diff --git a/keyboards/tominabox1/le_chiffre/keymaps/default/keymap.c b/keyboards/tominabox1/le_chiffre/keymaps/default/keymap.c
index 7008550f2b..8b981c6d75 100644
--- a/keyboards/tominabox1/le_chiffre/keymaps/default/keymap.c
+++ b/keyboards/tominabox1/le_chiffre/keymaps/default/keymap.c
@@ -88,115 +88,68 @@ combo_t key_combos[] = {
};
#endif
-#ifdef OLED_ENABLE // Special thanks to Sickbabies for this great OLED widget!
-oled_rotation_t oled_init_user(oled_rotation_t rotation) {
- return OLED_ROTATION_90; // rotates for proper orientation
-}
-
-void render_lechiffre_logo(void) {
- static const char PROGMEM lechiffre_logo[] = {
- // 'lechiffre_logo', 32x20px
- 0x00, 0x3e, 0x20, 0x20, 0x00, 0x18, 0x2c, 0xa8, 0x80, 0x00, 0x1c, 0x22, 0x22, 0x00, 0x3e, 0x08,
- 0x30, 0x00, 0x34, 0x00, 0x3c, 0x0a, 0x00, 0xbc, 0x8a, 0x00, 0x38, 0x08, 0x00, 0x18, 0x2c, 0x28,
- 0x00, 0xb6, 0xb6, 0x00, 0xdb, 0xdb, 0x00, 0x6d, 0x6d, 0x00, 0xdb, 0xdb, 0x00, 0xdb, 0xdb, 0x00,
- 0x00, 0xdb, 0xdb, 0x00, 0xdb, 0xdb, 0x00, 0x6d, 0x6d, 0x00, 0xdb, 0xdb, 0x00, 0xb6, 0xb6, 0x00,
- 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x06, 0x06, 0x06, 0x00, 0x06, 0x06, 0x06, 0x06, 0x06, 0x00,
- 0x00, 0x06, 0x06, 0x06, 0x06, 0x06, 0x00, 0x06, 0x06, 0x06, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00};
-
- oled_write_raw_P(lechiffre_logo, sizeof(lechiffre_logo));
-}
-
-static void render_layer_status(void) {
- oled_write_P(PSTR("-----"), false);
- switch (get_highest_layer(layer_state)) {
- case _BASE:
- oled_write_ln_P(PSTR("BASE"), false);
- break;
- case _NUM_SYM:
- oled_write_ln_P(PSTR(" SYM"), false);
- break;
- case _NAV:
- oled_write_ln_P(PSTR(" NAV"), false);
- break;
- default:
- oled_write_ln_P(PSTR("?????"), false);
- }
-}
-
-# define KEYLOG_LEN 11
-char keylog_str[KEYLOG_LEN] = {};
-uint8_t keylogs_str_idx = 0;
-uint16_t log_timer = 0;
-
-const char code_to_name[60] = {
- ' ', ' ', ' ', ' ', 'a', 'b', 'c', 'd', 'e', 'f',
- 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p',
- 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',
- '1', '2', '3', '4', '5', '6', '7', '8', '9', '0',
- 'R', 'E', 'B', 'T', '_', '-', '=', '[', ']', '\\',
- '#', ';', '\'', '`', ',', '.', '/', ' ', ' ', ' '};
-
-void add_keylog(uint16_t keycode) {
- if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX)) {
- keycode = keycode & 0xFF;
- }
-
- for (uint8_t i = KEYLOG_LEN - 1; i > 0; i--) {
- keylog_str[i] = keylog_str[i - 1];
- }
- if (keycode < 60) {
- keylog_str[0] = code_to_name[keycode];
- }
- keylog_str[KEYLOG_LEN - 1] = 0;
-
- log_timer = timer_read();
-}
-
-void update_log(void) {
- if (timer_elapsed(log_timer) > 750) {
- add_keylog(0);
- }
-}
-
-// Text only renders
-void render_keylogger_status(void) {
- oled_write_P(PSTR("-----"), false);
- oled_write(keylog_str, false);
-}
-
-void render_keylock_status(led_t led_state) {
- oled_write_P(PSTR("-----"), false);
- oled_write_P(PSTR("C"), led_state.caps_lock);
- oled_write_P(PSTR(" "), false);
- oled_write_P(PSTR("N"), led_state.num_lock);
- oled_write_P(PSTR(" "), false);
- oled_write_P(PSTR("S"), led_state.scroll_lock);
- // oled_write_ln_P(PSTR(" "), false);
-}
+#ifdef OLED_ENABLE
+
+// Add additional layer names here if desired. Only first 5 characters will be copied to display.
+const char PROGMEM layer_base[] = "BASE";
+const char PROGMEM layer_num_sym[] = " SYM";
+const char PROGMEM layer_nav[] = " NAV";
+// Add layer name variables to array here. Make sure these are in order.
+const char* const PROGMEM layer_names[] = {
+ layer_base,
+ layer_num_sym,
+ layer_nav
+};
-void render_mod_status(uint8_t modifiers) {
- oled_write_P(PSTR("-----"), false);
- oled_write_ln_P(PSTR("SHFT"), (modifiers & MOD_MASK_SHIFT));
- oled_write_ln_P(PSTR("ALT"), (modifiers & MOD_MASK_ALT));
- oled_write_ln_P(PSTR("CTRL"), (modifiers & MOD_MASK_CTRL));
- oled_write_ln_P(PSTR("GUI"), (modifiers & MOD_MASK_GUI));
-}
+static char oled_layer_buf[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
+static layer_state_t top_layer_cache;
+/* BEGIN STANDARD QMK FUNCTIONS */
bool oled_task_user(void) {
- render_lechiffre_logo();
+ oled_write_raw_P(lechiffre_logo, sizeof(lechiffre_logo));
+ // Renders the current keyboard state (layer, lock, caps, scroll, etc);
oled_set_cursor(0, 3);
- render_layer_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc)
+ oled_write_P(oled_section_break, false);
+ render_layer_status(oled_layer_buf);
+ oled_write_P(oled_section_break, false);
render_mod_status(get_mods() | get_oneshot_mods());
+ oled_write_P(oled_section_break, false);
render_keylock_status(host_keyboard_led_state());
+ oled_write_P(oled_section_break, false);
render_keylogger_status();
return false;
}
-bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+bool process_record_user(uint16_t keycode, keyrecord_t* record) {
if (record->event.pressed) {
- add_keylog(keycode);
+ add_keylog(keycode, record);
}
+
return true;
}
+
+// If we don't force an update during initialization, the layer name buffer will start out blank.
+layer_state_t default_layer_state_set_user(layer_state_t state) {
+ update_layer_namebuf(get_highest_layer(state), true);
+ return state;
+}
+layer_state_t layer_state_set_user(layer_state_t state) {
+ update_layer_namebuf(get_highest_layer(state | default_layer_state), false);
+ return state;
+}
+
+/* END STANDARD QMK FUNCTIONS */
+/* BEGIN CUSTOM HELPER FUNCTION FOR OLED */
+// Avoid excessive copying by only updating the layer name buffer when the layer changes
+void update_layer_namebuf(layer_state_t layer, bool force_update) {
+ if (force_update || layer != top_layer_cache) {
+ top_layer_cache = layer;
+ if (layer < ARRAY_SIZE(layer_names)) {
+ memcpy_P(oled_layer_buf, pgm_read_ptr(&layer_names[layer]), ARRAY_SIZE(oled_layer_buf) - 1);
+ } else {
+ memcpy(oled_layer_buf, get_u8_str(layer, ' '), ARRAY_SIZE(oled_layer_buf) - 1);
+ }
+ }
+}
#endif
diff --git a/keyboards/tominabox1/le_chiffre/keymaps/via/keymap.c b/keyboards/tominabox1/le_chiffre/keymaps/via/keymap.c
index 2592ee5dc1..54d4f38c71 100644
--- a/keyboards/tominabox1/le_chiffre/keymaps/via/keymap.c
+++ b/keyboards/tominabox1/le_chiffre/keymaps/via/keymap.c
@@ -32,106 +32,17 @@ const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
};
#endif
-#ifdef OLED_ENABLE // Special thanks to Sickbabies for this great OLED widget!
-oled_rotation_t oled_init_user(oled_rotation_t rotation) {
- return OLED_ROTATION_90; // rotates for proper orientation
-}
-
-void render_lechiffre_logo(void) {
- static const char PROGMEM lechiffre_logo[] = {
- // 'lechiffre_logo', 32x20px
- 0x00, 0x3e, 0x20, 0x20, 0x00, 0x18, 0x2c, 0xa8, 0x80, 0x00, 0x1c, 0x22, 0x22, 0x00, 0x3e, 0x08,
- 0x30, 0x00, 0x34, 0x00, 0x3c, 0x0a, 0x00, 0xbc, 0x8a, 0x00, 0x38, 0x08, 0x00, 0x18, 0x2c, 0x28,
- 0x00, 0xb6, 0xb6, 0x00, 0xdb, 0xdb, 0x00, 0x6d, 0x6d, 0x00, 0xdb, 0xdb, 0x00, 0xdb, 0xdb, 0x00,
- 0x00, 0xdb, 0xdb, 0x00, 0xdb, 0xdb, 0x00, 0x6d, 0x6d, 0x00, 0xdb, 0xdb, 0x00, 0xb6, 0xb6, 0x00,
- 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x06, 0x06, 0x06, 0x00, 0x06, 0x06, 0x06, 0x06, 0x06, 0x00,
- 0x00, 0x06, 0x06, 0x06, 0x06, 0x06, 0x00, 0x06, 0x06, 0x06, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00};
-
- oled_write_raw_P(lechiffre_logo, sizeof(lechiffre_logo));
-}
-
-// static void render_layer_status(void) {
-// oled_write_P(PSTR("-----"), false);
-// switch (get_highest_layer(layer_state)) {
-// case _BASE:
-// oled_write_ln_P(PSTR("BASE"), false);
-// break;
-// case _NUM_SYM:
-// oled_write_ln_P(PSTR(" SYM"), false);
-// break;
-// case _NAV:
-// oled_write_ln_P(PSTR(" NAV"), false);
-// break;
-// default:
-// oled_write_ln_P(PSTR("?????"), false);
-// }
-// }
-
-# define KEYLOG_LEN 11
-char keylog_str[KEYLOG_LEN] = {};
-uint8_t keylogs_str_idx = 0;
-uint16_t log_timer = 0;
-
-const char code_to_name[60] = {
- ' ', ' ', ' ', ' ', 'a', 'b', 'c', 'd', 'e', 'f',
- 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p',
- 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',
- '1', '2', '3', '4', '5', '6', '7', '8', '9', '0',
- 'R', 'E', 'B', 'T', '_', '-', '=', '[', ']', '\\',
- '#', ';', '\'', '`', ',', '.', '/', ' ', ' ', ' '};
-
-void add_keylog(uint16_t keycode) {
- if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX)) {
- keycode = keycode & 0xFF;
- }
-
- for (uint8_t i = KEYLOG_LEN - 1; i > 0; i--) {
- keylog_str[i] = keylog_str[i - 1];
- }
- if (keycode < 60) {
- keylog_str[0] = code_to_name[keycode];
- }
- keylog_str[KEYLOG_LEN - 1] = 0;
-
- log_timer = timer_read();
-}
-
-void update_log(void) {
- if (timer_elapsed(log_timer) > 750) {
- add_keylog(0);
- }
-}
-
-// Text only renders
-void render_keylogger_status(void) {
- oled_write_P(PSTR("-----"), false);
- oled_write(keylog_str, false);
-}
-
-void render_keylock_status(led_t led_state) {
- oled_write_P(PSTR("-----"), false);
- oled_write_P(PSTR("C"), led_state.caps_lock);
- oled_write_P(PSTR(" "), false);
- oled_write_P(PSTR("N"), led_state.num_lock);
- oled_write_P(PSTR(" "), false);
- oled_write_P(PSTR("S"), led_state.scroll_lock);
- // oled_write_ln_P(PSTR(" "), false);
-}
-
-void render_mod_status(uint8_t modifiers) {
- oled_write_P(PSTR("-----"), false);
- oled_write_ln_P(PSTR("SHFT"), (modifiers & MOD_MASK_SHIFT));
- oled_write_ln_P(PSTR("ALT"), (modifiers & MOD_MASK_ALT));
- oled_write_ln_P(PSTR("CTRL"), (modifiers & MOD_MASK_CTRL));
- oled_write_ln_P(PSTR("GUI"), (modifiers & MOD_MASK_GUI));
-}
-
+#ifdef OLED_ENABLE
bool oled_task_user(void) {
- render_lechiffre_logo();
+ oled_write_raw_P(lechiffre_logo, sizeof(lechiffre_logo));
oled_set_cursor(0, 3);
- // render_layer_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc)
+ oled_write_P(oled_section_break, false);
+ render_layer_status(get_u8_str(get_highest_layer(layer_state | default_layer_state), ' '));
+ oled_write_P(oled_section_break, false);
render_mod_status(get_mods() | get_oneshot_mods());
+ oled_write_P(oled_section_break, false);
render_keylock_status(host_keyboard_led_state());
+ oled_write_P(oled_section_break, false);
render_keylogger_status();
return false;
@@ -139,8 +50,9 @@ bool oled_task_user(void) {
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
if (record->event.pressed) {
- add_keylog(keycode);
+ add_keylog(keycode, record);
}
+
return true;
}
#endif
diff --git a/keyboards/tominabox1/le_chiffre/le_chiffre.c b/keyboards/tominabox1/le_chiffre/le_chiffre.c
new file mode 100644
index 0000000000..e33112edad
--- /dev/null
+++ b/keyboards/tominabox1/le_chiffre/le_chiffre.c
@@ -0,0 +1,123 @@
+// Copyright 2020 tominabox1 (@tominabox1)
+// Copyright 2019 @foostan
+// Copyright 2020 Drashna Jaelre <@drashna>
+// Copyright 2023 QMK Contributors <@qmk>
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#include "quantum.h"
+#include "le_chiffre.h"
+
+#if defined(OLED_ENABLE) // Special thanks to Sickbabies for this great OLED widget!
+
+/* CONSTANTS */
+const char PROGMEM code_to_name[53] = {
+ 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j',
+ 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't',
+ 'u', 'v', 'w', 'x', 'y', 'z', '1', '2', '3', '4',
+ '5', '6', '7', '8', '9', '0', 'R', 'E', 'B', 'T',
+ '_', '-', '=', '[', ']', '\\', '#', ';', '\'', '`',
+ ',', '.', '/'
+};
+
+const char PROGMEM lechiffre_logo[96] = {
+ // 'lechiffre_logo', 32x20px
+ 0x00, 0x3e, 0x20, 0x20, 0x00, 0x18, 0x2c, 0xa8, 0x80, 0x00, 0x1c, 0x22, 0x22, 0x00, 0x3e, 0x08,
+ 0x30, 0x00, 0x34, 0x00, 0x3c, 0x0a, 0x00, 0xbc, 0x8a, 0x00, 0x38, 0x08, 0x00, 0x18, 0x2c, 0x28,
+ 0x00, 0xb6, 0xb6, 0x00, 0xdb, 0xdb, 0x00, 0x6d, 0x6d, 0x00, 0xdb, 0xdb, 0x00, 0xdb, 0xdb, 0x00,
+ 0x00, 0xdb, 0xdb, 0x00, 0xdb, 0xdb, 0x00, 0x6d, 0x6d, 0x00, 0xdb, 0xdb, 0x00, 0xb6, 0xb6, 0x00,
+ 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x06, 0x06, 0x06, 0x00, 0x06, 0x06, 0x06, 0x06, 0x06, 0x00,
+ 0x00, 0x06, 0x06, 0x06, 0x06, 0x06, 0x00, 0x06, 0x06, 0x06, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00
+};
+
+const char PROGMEM oled_section_break[6] = OLED_SECTION_BREAK;
+/* END CONSTANTS */
+
+/* TRACKERS */
+static char keylog_str[KEYLOG_LEN] = {};
+static uint16_t log_timer = 0;
+/* END TRACKERS */
+
+/* BEGIN STANDARD QMK FUNCTIONS */
+
+oled_rotation_t oled_init_kb(oled_rotation_t rotation) {
+ return OLED_ROTATION_90;
+}
+
+bool oled_task_kb(void) {
+ if (!oled_task_user()) {
+ return false;
+ }
+ oled_write_raw_P(lechiffre_logo, sizeof(lechiffre_logo));
+ oled_set_cursor(0, 3);
+ oled_write_P(oled_section_break, false);
+ render_layer_status(get_u8_str(get_highest_layer(layer_state | default_layer_state), ' '));
+ oled_write_P(oled_section_break, false);
+ render_mod_status(get_mods() | get_oneshot_mods());
+ oled_write_P(oled_section_break, false);
+ render_keylock_status(host_keyboard_led_state());
+ return true;
+}
+
+/* END STANDARD QMK FUNCTIONS */
+/* BEGIN CUSTOM HELPER FUNCTIONS FOR OLED */
+
+/**
+ * Sickbabies deserves credit for the original OLED implementation,
+ * however most of the keylogging code appears to have been lifted from crkbd
+ * -- which is why @foostan and @drashna are now credited here as well.
+ *
+ * Improvements were lifted from crkbd again in 2023, with gratitude.
+ */
+void add_keylog(uint16_t keycode, keyrecord_t *record) {
+ if (IS_QK_MOD_TAP(keycode) && record->tap.count) {
+ keycode = QK_MOD_TAP_GET_TAP_KEYCODE(keycode);
+ } else if (IS_QK_LAYER_TAP(keycode) && record->tap.count) {
+ keycode = QK_LAYER_TAP_GET_TAP_KEYCODE(keycode);
+ } else if (IS_QK_MODS(keycode)) {
+ keycode = QK_MODS_GET_BASIC_KEYCODE(keycode);
+ }
+
+ if (keycode >= KC_A && keycode < KC_CAPS) {
+ keycode -= KC_A; // shift to first letter of alphabet
+ for (uint8_t i = KEYLOG_LEN - 1; i > 0; i--) {
+ keylog_str[i] = keylog_str[i - 1];
+ }
+ keylog_str[0] = pgm_read_byte(&(code_to_name[keycode]));
+ keylog_str[KEYLOG_LEN - 1] = 0x00;
+ }
+
+ log_timer = timer_read();
+}
+
+void render_keylock_status(led_t led_state) {
+ oled_write_P(PSTR("C"), led_state.caps_lock);
+ oled_advance_char();
+ oled_write_P(PSTR("N"), led_state.num_lock);
+ oled_advance_char();
+ oled_write_P(PSTR("S"), led_state.scroll_lock);
+}
+
+void render_keylogger_status(void) {
+ // zero out log after 30s idle time
+ if (strlen(keylog_str) > 0 && timer_elapsed(log_timer) > 30000) {
+ keylog_str[0] = 0x00;
+ oled_advance_page(true);
+ oled_advance_page(true);
+ }
+ oled_write(keylog_str, false);
+}
+
+void render_layer_status(const char* layer_name) {
+ oled_write(layer_name, false);
+ if (strlen(layer_name) < oled_max_chars()) {
+ oled_advance_page(true);
+ }
+}
+
+void render_mod_status(uint8_t modifiers) {
+ oled_write_ln_P(PSTR("SHFT"), (modifiers & MOD_MASK_SHIFT));
+ oled_write_ln_P(PSTR("ALT"), (modifiers & MOD_MASK_ALT));
+ oled_write_ln_P(PSTR("CTRL"), (modifiers & MOD_MASK_CTRL));
+ oled_write_ln_P(PSTR("GUI"), (modifiers & MOD_MASK_GUI));
+}
+#endif // OLED_ENABLE
diff --git a/keyboards/tominabox1/le_chiffre/le_chiffre.h b/keyboards/tominabox1/le_chiffre/le_chiffre.h
new file mode 100644
index 0000000000..5bbcbf51cf
--- /dev/null
+++ b/keyboards/tominabox1/le_chiffre/le_chiffre.h
@@ -0,0 +1,17 @@
+// Copyright 2020 tominabox1 (@tominabox1) and sickbabies
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#pragma once
+
+#define KEYLOG_LEN 11
+
+extern const char PROGMEM code_to_name[53];
+extern const char PROGMEM lechiffre_logo[96];
+extern const char PROGMEM oled_section_break[6];
+
+void add_keylog(uint16_t keycode, keyrecord_t* record);
+void render_keylock_status(led_t led_state);
+void render_keylogger_status(void);
+void render_layer_status(const char* layer_name);
+void render_mod_status(uint8_t modifiers);
+void update_layer_namebuf(layer_state_t layer, bool force_update);
diff --git a/keyboards/tominabox1/le_chiffre/post_config.h b/keyboards/tominabox1/le_chiffre/post_config.h
new file mode 100644
index 0000000000..181004038e
--- /dev/null
+++ b/keyboards/tominabox1/le_chiffre/post_config.h
@@ -0,0 +1,14 @@
+// Copyright 2023 The QMK Community (@qmk)
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#pragma once
+
+#if defined(OLED_ENABLE)
+# if !defined(OLED_UPDATE_INTERVAL)
+# define OLED_UPDATE_INTERVAL 5
+# endif
+
+# if !defined(OLED_SECTION_BREAK)
+# define OLED_SECTION_BREAK "-----"
+# endif
+#endif
diff --git a/keyboards/torn/rules.mk b/keyboards/torn/rules.mk
index d2ec5cf6d4..f855a651a5 100644
--- a/keyboards/torn/rules.mk
+++ b/keyboards/torn/rules.mk
@@ -18,4 +18,4 @@ SRC += matrix.c \
mcp23018.c \
torn_encoder.c
-QUANTUM_LIB_SRC += i2c_master.c
+I2C_DRIVER_REQUIRED = yes
diff --git a/keyboards/touchpad/rules.mk b/keyboards/touchpad/rules.mk
index c22f3a2da5..b9fb83c48c 100644
--- a/keyboards/touchpad/rules.mk
+++ b/keyboards/touchpad/rules.mk
@@ -12,4 +12,5 @@ AUDIO_ENABLE = no # Audio output
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
CUSTOM_MATRIX = yes
-SRC += matrix.c i2c_master.c
+SRC += matrix.c
+I2C_DRIVER_REQUIRED = yes
diff --git a/keyboards/tzarc/djinn/info.json b/keyboards/tzarc/djinn/info.json
index f0904b8578..8f47f35027 100644
--- a/keyboards/tzarc/djinn/info.json
+++ b/keyboards/tzarc/djinn/info.json
@@ -9,6 +9,9 @@
"build": {
"lto": true
},
+ "eeprom": {
+ "driver": "spi"
+ },
"features": {
"audio": true,
"backlight": true,
diff --git a/keyboards/tzarc/djinn/rules.mk b/keyboards/tzarc/djinn/rules.mk
index e7c32e4dc1..5a4589a86f 100644
--- a/keyboards/tzarc/djinn/rules.mk
+++ b/keyboards/tzarc/djinn/rules.mk
@@ -4,8 +4,6 @@ SERIAL_DRIVER = usart
CIE1931_CURVE = yes
-EEPROM_DRIVER = spi
-
AUDIO_DRIVER = pwm_software
QUANTUM_PAINTER_DRIVERS = ili9341_spi
diff --git a/keyboards/tzarc/ghoul/info.json b/keyboards/tzarc/ghoul/info.json
index bf07f122c3..26824ca4da 100644
--- a/keyboards/tzarc/ghoul/info.json
+++ b/keyboards/tzarc/ghoul/info.json
@@ -5,6 +5,9 @@
"build": {
"lto": true
},
+ "eeprom": {
+ "driver": "spi"
+ },
"features": {
"bootmagic": true,
"console": true,
diff --git a/keyboards/tzarc/ghoul/rules.mk b/keyboards/tzarc/ghoul/rules.mk
index 9590c52217..5efa406e26 100644
--- a/keyboards/tzarc/ghoul/rules.mk
+++ b/keyboards/tzarc/ghoul/rules.mk
@@ -1,5 +1,4 @@
CUSTOM_MATRIX = lite
-EEPROM_DRIVER = spi
QUANTUM_PAINTER_DRIVERS = ssd1351_spi
DEFAULT_FOLDER = tzarc/ghoul/rev1/stm32
diff --git a/keyboards/v60_type_r/keymaps/xtonhasvim/keymap.c b/keyboards/v60_type_r/keymaps/xtonhasvim/keymap.c
index f2fd693ece..b211ec0f3f 100644
--- a/keyboards/v60_type_r/keymaps/xtonhasvim/keymap.c
+++ b/keyboards/v60_type_r/keymaps/xtonhasvim/keymap.c
@@ -97,7 +97,7 @@ float rgb_brightness = 1.0;
void rgbflag(uint8_t r, uint8_t g, uint8_t b) {
float rgb_brightness = ((float)rgblight_get_val())/256;
if(rgb_brightness == 0) rgb_brightness = 0.05;
- LED_TYPE *target_led = user_rgb_mode ? shadowed_led : led;
+ rgb_led_t *target_led = user_rgb_mode ? shadowed_led : led;
target_led[0].r = (uint8_t)(r*rgb_brightness);
target_led[0].g = (uint8_t)(g*rgb_brightness);
target_led[0].b = (uint8_t)(b*rgb_brightness);
diff --git a/keyboards/vertex/angle65/config.h b/keyboards/vertex/angle65/config.h
index b3cf8b2507..018bad7cdb 100644
--- a/keyboards/vertex/angle65/config.h
+++ b/keyboards/vertex/angle65/config.h
@@ -18,5 +18,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define SOLENOID_PIN A2
-#define WS2812_SPI SPID2
+#define WS2812_SPI_DRIVER SPID2
#define WS2812_SPI_MOSI_PAL_MODE 5
diff --git a/keyboards/vertex/arc60/config.h b/keyboards/vertex/arc60/config.h
index 38b830e3df..cab5a59af0 100644
--- a/keyboards/vertex/arc60/config.h
+++ b/keyboards/vertex/arc60/config.h
@@ -16,7 +16,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once
-#define WS2812_SPI SPID2
+#define WS2812_SPI_DRIVER SPID2
#define WS2812_SPI_MOSI_PAL_MODE 5
/*
diff --git a/keyboards/vertex/arc60h/config.h b/keyboards/vertex/arc60h/config.h
index 38b830e3df..cab5a59af0 100644
--- a/keyboards/vertex/arc60h/config.h
+++ b/keyboards/vertex/arc60h/config.h
@@ -16,7 +16,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once
-#define WS2812_SPI SPID2
+#define WS2812_SPI_DRIVER SPID2
#define WS2812_SPI_MOSI_PAL_MODE 5
/*
diff --git a/keyboards/viendi8l/info.json b/keyboards/viendi8l/info.json
index 17449f406c..d50b96a887 100644
--- a/keyboards/viendi8l/info.json
+++ b/keyboards/viendi8l/info.json
@@ -20,6 +20,9 @@
"rows": ["C3", "C2", "C1", "C0", "B14", "A7"]
},
"diode_direction": "COL2ROW",
+ "eeprom": {
+ "driver": "i2c"
+ },
"encoder": {
"rotary": [
{"pin_a": "B10", "pin_b": "B12", "resolution": 2}
diff --git a/keyboards/viendi8l/rules.mk b/keyboards/viendi8l/rules.mk
index da10e34d1c..b269d5da35 100644
--- a/keyboards/viendi8l/rules.mk
+++ b/keyboards/viendi8l/rules.mk
@@ -12,6 +12,3 @@ RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
AUDIO_ENABLE = no # Audio output
ENCODER_ENABLE = yes
LTO_ENABLE = no
-
-EEPROM_DRIVER = i2c
-
diff --git a/keyboards/viktus/sp111/rules.mk b/keyboards/viktus/sp111/rules.mk
index 0b9b8490de..1be8c7ad68 100644
--- a/keyboards/viktus/sp111/rules.mk
+++ b/keyboards/viktus/sp111/rules.mk
@@ -18,4 +18,4 @@ CUSTOM_MATRIX = lite
VPATH += drivers/gpio
SRC += mcp23018.c matrix.c
-QUANTUM_LIB_SRC += i2c_master.c
+I2C_DRIVER_REQUIRED = yes
diff --git a/keyboards/wilba_tech/rama_works_kara/config.h b/keyboards/wilba_tech/rama_works_kara/config.h
index d34fd6468c..b3fa3808ec 100644
--- a/keyboards/wilba_tech/rama_works_kara/config.h
+++ b/keyboards/wilba_tech/rama_works_kara/config.h
@@ -16,7 +16,7 @@
#pragma once
// IS31FL3731 driver
-#define DRIVER_COUNT 2
+#define IS31FL3731_DRIVER_COUNT 2
#define RGB_MATRIX_LED_COUNT 72
// Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap
diff --git a/keyboards/wilba_tech/rama_works_kara/rules.mk b/keyboards/wilba_tech/rama_works_kara/rules.mk
index 465bc65d9e..b49711824a 100644
--- a/keyboards/wilba_tech/rama_works_kara/rules.mk
+++ b/keyboards/wilba_tech/rama_works_kara/rules.mk
@@ -22,5 +22,5 @@ CIE1931_CURVE = yes
SRC = keyboards/wilba_tech/wt_main.c \
keyboards/wilba_tech/wt_rgb_backlight.c \
quantum/color.c \
- drivers/led/issi/is31fl3731.c \
- i2c_master.c
+ drivers/led/issi/is31fl3731.c
+I2C_DRIVER_REQUIRED = yes
diff --git a/keyboards/wilba_tech/rama_works_koyu/config.h b/keyboards/wilba_tech/rama_works_koyu/config.h
index c3bb43ec6d..85bbf28051 100644
--- a/keyboards/wilba_tech/rama_works_koyu/config.h
+++ b/keyboards/wilba_tech/rama_works_koyu/config.h
@@ -16,7 +16,7 @@
#pragma once
// IS31FL3731 driver
-#define DRIVER_COUNT 2
+#define IS31FL3731_DRIVER_COUNT 2
#define RGB_MATRIX_LED_COUNT 72
// Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap
diff --git a/keyboards/wilba_tech/rama_works_koyu/rules.mk b/keyboards/wilba_tech/rama_works_koyu/rules.mk
index be907583a2..c921fc5c18 100644
--- a/keyboards/wilba_tech/rama_works_koyu/rules.mk
+++ b/keyboards/wilba_tech/rama_works_koyu/rules.mk
@@ -22,5 +22,5 @@ CIE1931_CURVE = yes
SRC = keyboards/wilba_tech/wt_main.c \
keyboards/wilba_tech/wt_rgb_backlight.c \
quantum/color.c \
- drivers/led/issi/is31fl3731.c \
- i2c_master.c
+ drivers/led/issi/is31fl3731.c
+I2C_DRIVER_REQUIRED = yes
diff --git a/keyboards/wilba_tech/rama_works_m10_b/config.h b/keyboards/wilba_tech/rama_works_m10_b/config.h
index 00ecf5f186..c8c922be6f 100644
--- a/keyboards/wilba_tech/rama_works_m10_b/config.h
+++ b/keyboards/wilba_tech/rama_works_m10_b/config.h
@@ -37,5 +37,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
//#define NO_ACTION_LAYER
//#define NO_ACTION_TAPPING
//#define NO_ACTION_ONESHOT
-
-#define DYNAMIC_KEYMAP_LAYER_COUNT 10
diff --git a/keyboards/wilba_tech/rama_works_m10_b/info.json b/keyboards/wilba_tech/rama_works_m10_b/info.json
index 0d80bce8a8..eb861e8d3f 100644
--- a/keyboards/wilba_tech/rama_works_m10_b/info.json
+++ b/keyboards/wilba_tech/rama_works_m10_b/info.json
@@ -13,6 +13,9 @@
"rows": ["E6"]
},
"diode_direction": "COL2ROW",
+ "dynamic_keymap": {
+ "layer_count": 10
+ },
"backlight": {
"pin": "C6"
},
diff --git a/keyboards/wilba_tech/rama_works_m10_c/config.h b/keyboards/wilba_tech/rama_works_m10_c/config.h
index 1cc9655b1b..b3cb0ef7a8 100644
--- a/keyboards/wilba_tech/rama_works_m10_c/config.h
+++ b/keyboards/wilba_tech/rama_works_m10_c/config.h
@@ -21,7 +21,7 @@
#define LOCKING_RESYNC_ENABLE
// IS31FL3731 driver
-#define DRIVER_COUNT 1
+#define IS31FL3731_DRIVER_COUNT 1
#define RGB_MATRIX_LED_COUNT 12
// Enable WT RGB backlight
@@ -73,8 +73,6 @@
#define RGB_BACKLIGHT_LAYER_2_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 }
#define RGB_BACKLIGHT_LAYER_3_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 }
-#define DYNAMIC_KEYMAP_LAYER_COUNT 10
-
// Backlight config starts after VIA's EEPROM usage,
// dynamic keymaps start after this.
#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 51
diff --git a/keyboards/wilba_tech/rama_works_m10_c/info.json b/keyboards/wilba_tech/rama_works_m10_c/info.json
index 64af4a5dcf..3b75a67557 100644
--- a/keyboards/wilba_tech/rama_works_m10_c/info.json
+++ b/keyboards/wilba_tech/rama_works_m10_c/info.json
@@ -13,6 +13,9 @@
"rows": ["E6"]
},
"diode_direction": "COL2ROW",
+ "dynamic_keymap": {
+ "layer_count": 10
+ },
"processor": "atmega32u4",
"bootloader": "atmel-dfu",
"layouts": {
diff --git a/keyboards/wilba_tech/rama_works_m10_c/rules.mk b/keyboards/wilba_tech/rama_works_m10_c/rules.mk
index 89e17a01b4..d8a2bae455 100644
--- a/keyboards/wilba_tech/rama_works_m10_c/rules.mk
+++ b/keyboards/wilba_tech/rama_works_m10_c/rules.mk
@@ -21,5 +21,5 @@ OPT_DEFS += -DNO_SUSPEND_POWER_DOWN
SRC = keyboards/wilba_tech/wt_main.c \
keyboards/wilba_tech/wt_rgb_backlight.c \
quantum/color.c \
- drivers/led/issi/is31fl3731.c \
- i2c_master.c
+ drivers/led/issi/is31fl3731.c
+I2C_DRIVER_REQUIRED = yes
diff --git a/keyboards/wilba_tech/rama_works_m50_a/config.h b/keyboards/wilba_tech/rama_works_m50_a/config.h
index ab04ab070b..16439309be 100644
--- a/keyboards/wilba_tech/rama_works_m50_a/config.h
+++ b/keyboards/wilba_tech/rama_works_m50_a/config.h
@@ -21,7 +21,7 @@
#define LOCKING_RESYNC_ENABLE
// IS31FL3731 driver
-#define DRIVER_COUNT 2
+#define IS31FL3731_DRIVER_COUNT 2
#define RGB_MATRIX_LED_COUNT 72
// Enable WT RGB backlight
diff --git a/keyboards/wilba_tech/rama_works_m50_a/rules.mk b/keyboards/wilba_tech/rama_works_m50_a/rules.mk
index 89e17a01b4..d8a2bae455 100644
--- a/keyboards/wilba_tech/rama_works_m50_a/rules.mk
+++ b/keyboards/wilba_tech/rama_works_m50_a/rules.mk
@@ -21,5 +21,5 @@ OPT_DEFS += -DNO_SUSPEND_POWER_DOWN
SRC = keyboards/wilba_tech/wt_main.c \
keyboards/wilba_tech/wt_rgb_backlight.c \
quantum/color.c \
- drivers/led/issi/is31fl3731.c \
- i2c_master.c
+ drivers/led/issi/is31fl3731.c
+I2C_DRIVER_REQUIRED = yes
diff --git a/keyboards/wilba_tech/rama_works_m60_a/config.h b/keyboards/wilba_tech/rama_works_m60_a/config.h
index c80a018496..7cec5dcc21 100644
--- a/keyboards/wilba_tech/rama_works_m60_a/config.h
+++ b/keyboards/wilba_tech/rama_works_m60_a/config.h
@@ -16,7 +16,7 @@
#pragma once
// IS31FL3731 driver
-#define DRIVER_COUNT 2
+#define IS31FL3731_DRIVER_COUNT 2
#define RGB_MATRIX_LED_COUNT 72
// Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap
diff --git a/keyboards/wilba_tech/rama_works_m60_a/keymaps/zyber/config.h b/keyboards/wilba_tech/rama_works_m60_a/keymaps/zyber/config.h
index 9ad052aab4..d34eafbaeb 100644
--- a/keyboards/wilba_tech/rama_works_m60_a/keymaps/zyber/config.h
+++ b/keyboards/wilba_tech/rama_works_m60_a/keymaps/zyber/config.h
@@ -3,6 +3,4 @@
#pragma once
#undef PRODUCT
-#define PRODUCT RAMA WORKS M60-A Seq2
-#undef DESCRIPTION
-#define DESCRIPTION RAMA WORKS M60-A Seq2
+#define PRODUCT "RAMA WORKS M60-A Seq2"
diff --git a/keyboards/wilba_tech/rama_works_m60_a/rules.mk b/keyboards/wilba_tech/rama_works_m60_a/rules.mk
index be907583a2..c921fc5c18 100644
--- a/keyboards/wilba_tech/rama_works_m60_a/rules.mk
+++ b/keyboards/wilba_tech/rama_works_m60_a/rules.mk
@@ -22,5 +22,5 @@ CIE1931_CURVE = yes
SRC = keyboards/wilba_tech/wt_main.c \
keyboards/wilba_tech/wt_rgb_backlight.c \
quantum/color.c \
- drivers/led/issi/is31fl3731.c \
- i2c_master.c
+ drivers/led/issi/is31fl3731.c
+I2C_DRIVER_REQUIRED = yes
diff --git a/keyboards/wilba_tech/rama_works_m65_b/config.h b/keyboards/wilba_tech/rama_works_m65_b/config.h
index 6d3f0fb97f..88f8341aa6 100644
--- a/keyboards/wilba_tech/rama_works_m65_b/config.h
+++ b/keyboards/wilba_tech/rama_works_m65_b/config.h
@@ -21,7 +21,7 @@
#define LOCKING_RESYNC_ENABLE
// IS31FL3731 driver
-#define DRIVER_COUNT 2
+#define IS31FL3731_DRIVER_COUNT 2
#define RGB_MATRIX_LED_COUNT 72
// Enable WT RGB backlight
diff --git a/keyboards/wilba_tech/rama_works_m65_b/rules.mk b/keyboards/wilba_tech/rama_works_m65_b/rules.mk
index 89e17a01b4..d8a2bae455 100644
--- a/keyboards/wilba_tech/rama_works_m65_b/rules.mk
+++ b/keyboards/wilba_tech/rama_works_m65_b/rules.mk
@@ -21,5 +21,5 @@ OPT_DEFS += -DNO_SUSPEND_POWER_DOWN
SRC = keyboards/wilba_tech/wt_main.c \
keyboards/wilba_tech/wt_rgb_backlight.c \
quantum/color.c \
- drivers/led/issi/is31fl3731.c \
- i2c_master.c
+ drivers/led/issi/is31fl3731.c
+I2C_DRIVER_REQUIRED = yes
diff --git a/keyboards/wilba_tech/rama_works_m65_bx/config.h b/keyboards/wilba_tech/rama_works_m65_bx/config.h
index e367a7fc76..be3af2f668 100644
--- a/keyboards/wilba_tech/rama_works_m65_bx/config.h
+++ b/keyboards/wilba_tech/rama_works_m65_bx/config.h
@@ -21,7 +21,7 @@
#define LOCKING_RESYNC_ENABLE
// IS31FL3731 driver
-#define DRIVER_COUNT 2
+#define IS31FL3731_DRIVER_COUNT 2
#define RGB_MATRIX_LED_COUNT 72
// Enable WT RGB backlight
diff --git a/keyboards/wilba_tech/rama_works_m65_bx/rules.mk b/keyboards/wilba_tech/rama_works_m65_bx/rules.mk
index 89e17a01b4..d8a2bae455 100644
--- a/keyboards/wilba_tech/rama_works_m65_bx/rules.mk
+++ b/keyboards/wilba_tech/rama_works_m65_bx/rules.mk
@@ -21,5 +21,5 @@ OPT_DEFS += -DNO_SUSPEND_POWER_DOWN
SRC = keyboards/wilba_tech/wt_main.c \
keyboards/wilba_tech/wt_rgb_backlight.c \
quantum/color.c \
- drivers/led/issi/is31fl3731.c \
- i2c_master.c
+ drivers/led/issi/is31fl3731.c
+I2C_DRIVER_REQUIRED = yes
diff --git a/keyboards/wilba_tech/rama_works_m6_b/config.h b/keyboards/wilba_tech/rama_works_m6_b/config.h
index a117bcc2a8..27a5e72c04 100644
--- a/keyboards/wilba_tech/rama_works_m6_b/config.h
+++ b/keyboards/wilba_tech/rama_works_m6_b/config.h
@@ -20,6 +20,8 @@
/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE
+#define RGB_MATRIX_LED_COUNT 6
+
#define RGB_BACKLIGHT_ENABLED 1
// This conditionally compiles the backlight code for M6-B specifics
diff --git a/keyboards/wilba_tech/rama_works_m6_b/rules.mk b/keyboards/wilba_tech/rama_works_m6_b/rules.mk
index 04a197576f..eff0605d90 100644
--- a/keyboards/wilba_tech/rama_works_m6_b/rules.mk
+++ b/keyboards/wilba_tech/rama_works_m6_b/rules.mk
@@ -22,5 +22,5 @@ CIE1931_CURVE = yes
SRC = keyboards/wilba_tech/wt_main.c \
keyboards/wilba_tech/wt_rgb_backlight.c \
quantum/color.c \
- drivers/led/issi/is31fl3218.c \
- i2c_master.c
+ drivers/led/issi/is31fl3218.c
+I2C_DRIVER_REQUIRED = yes
diff --git a/keyboards/wilba_tech/rama_works_u80_a/config.h b/keyboards/wilba_tech/rama_works_u80_a/config.h
index cb2d88bd47..0d8e1e12b5 100644
--- a/keyboards/wilba_tech/rama_works_u80_a/config.h
+++ b/keyboards/wilba_tech/rama_works_u80_a/config.h
@@ -38,7 +38,7 @@
//#define NO_ACTION_ONESHOT
// IS31FL3731 driver
-#define DRIVER_COUNT 3
+#define IS31FL3731_DRIVER_COUNT 3
#define RGB_MATRIX_LED_COUNT 108
#define RGB_BACKLIGHT_ENABLED 1
diff --git a/keyboards/wilba_tech/rama_works_u80_a/rules.mk b/keyboards/wilba_tech/rama_works_u80_a/rules.mk
index 3e1eda9d5e..b262985880 100644
--- a/keyboards/wilba_tech/rama_works_u80_a/rules.mk
+++ b/keyboards/wilba_tech/rama_works_u80_a/rules.mk
@@ -15,5 +15,5 @@ CIE1931_CURVE = yes
SRC = keyboards/wilba_tech/wt_main.c \
keyboards/wilba_tech/wt_rgb_backlight.c \
quantum/color.c \
- drivers/led/issi/is31fl3731.c \
- i2c_master.c
+ drivers/led/issi/is31fl3731.c
+I2C_DRIVER_REQUIRED = yes
diff --git a/keyboards/wilba_tech/wt60_a/config.h b/keyboards/wilba_tech/wt60_a/config.h
index 488eeade83..ec3f1abf30 100644
--- a/keyboards/wilba_tech/wt60_a/config.h
+++ b/keyboards/wilba_tech/wt60_a/config.h
@@ -61,3 +61,6 @@
// Backlight config starts after VIA's EEPROM usage,
// dynamic keymaps start after this.
#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 7
+
+#define IS31FL3736_DRIVER_COUNT 1
+#define LED_MATRIX_LED_COUNT 96
diff --git a/keyboards/wilba_tech/wt60_a/rules.mk b/keyboards/wilba_tech/wt60_a/rules.mk
index 4a53424c53..9ca8e8f973 100644
--- a/keyboards/wilba_tech/wt60_a/rules.mk
+++ b/keyboards/wilba_tech/wt60_a/rules.mk
@@ -11,8 +11,8 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
AUDIO_ENABLE = no # Audio output
# project specific files
-SRC = drivers/led/issi/is31fl3736.c \
- i2c_master.c \
+SRC = drivers/led/issi/is31fl3736-simple.c \
quantum/color.c \
keyboards/wilba_tech/wt_mono_backlight.c \
keyboards/wilba_tech/wt_main.c
+I2C_DRIVER_REQUIRED = yes \ No newline at end of file
diff --git a/keyboards/wilba_tech/wt60_b/config.h b/keyboards/wilba_tech/wt60_b/config.h
index cf495a2e78..c5818173ca 100644
--- a/keyboards/wilba_tech/wt60_b/config.h
+++ b/keyboards/wilba_tech/wt60_b/config.h
@@ -23,7 +23,7 @@
// IS31FL3731 driver
-#define DRIVER_COUNT 2
+#define IS31FL3731_DRIVER_COUNT 2
#define RGB_MATRIX_LED_COUNT 72
#define RGB_BACKLIGHT_ENABLED 1
diff --git a/keyboards/wilba_tech/wt60_b/rules.mk b/keyboards/wilba_tech/wt60_b/rules.mk
index a9fcf043e2..397643d372 100644
--- a/keyboards/wilba_tech/wt60_b/rules.mk
+++ b/keyboards/wilba_tech/wt60_b/rules.mk
@@ -22,5 +22,5 @@ CIE1931_CURVE = yes
SRC = keyboards/wilba_tech/wt_main.c \
keyboards/wilba_tech/wt_rgb_backlight.c \
quantum/color.c \
- drivers/led/issi/is31fl3731.c \
- i2c_master.c
+ drivers/led/issi/is31fl3731.c
+I2C_DRIVER_REQUIRED = yes
diff --git a/keyboards/wilba_tech/wt60_bx/config.h b/keyboards/wilba_tech/wt60_bx/config.h
index 6f89b14954..37ffe646bc 100644
--- a/keyboards/wilba_tech/wt60_bx/config.h
+++ b/keyboards/wilba_tech/wt60_bx/config.h
@@ -23,7 +23,7 @@
// IS31FL3731 driver
-#define DRIVER_COUNT 2
+#define IS31FL3731_DRIVER_COUNT 2
#define RGB_MATRIX_LED_COUNT 72
#define RGB_BACKLIGHT_ENABLED 1
diff --git a/keyboards/wilba_tech/wt60_bx/rules.mk b/keyboards/wilba_tech/wt60_bx/rules.mk
index a9fcf043e2..397643d372 100644
--- a/keyboards/wilba_tech/wt60_bx/rules.mk
+++ b/keyboards/wilba_tech/wt60_bx/rules.mk
@@ -22,5 +22,5 @@ CIE1931_CURVE = yes
SRC = keyboards/wilba_tech/wt_main.c \
keyboards/wilba_tech/wt_rgb_backlight.c \
quantum/color.c \
- drivers/led/issi/is31fl3731.c \
- i2c_master.c
+ drivers/led/issi/is31fl3731.c
+I2C_DRIVER_REQUIRED = yes
diff --git a/keyboards/wilba_tech/wt60_c/config.h b/keyboards/wilba_tech/wt60_c/config.h
index 776aebcf20..80f894e451 100644
--- a/keyboards/wilba_tech/wt60_c/config.h
+++ b/keyboards/wilba_tech/wt60_c/config.h
@@ -23,7 +23,7 @@
// IS31FL3731 driver
-#define DRIVER_COUNT 2
+#define IS31FL3731_DRIVER_COUNT 2
#define RGB_MATRIX_LED_COUNT 72
#define RGB_BACKLIGHT_ENABLED 1
diff --git a/keyboards/wilba_tech/wt60_c/rules.mk b/keyboards/wilba_tech/wt60_c/rules.mk
index a9fcf043e2..397643d372 100644
--- a/keyboards/wilba_tech/wt60_c/rules.mk
+++ b/keyboards/wilba_tech/wt60_c/rules.mk
@@ -22,5 +22,5 @@ CIE1931_CURVE = yes
SRC = keyboards/wilba_tech/wt_main.c \
keyboards/wilba_tech/wt_rgb_backlight.c \
quantum/color.c \
- drivers/led/issi/is31fl3731.c \
- i2c_master.c
+ drivers/led/issi/is31fl3731.c
+I2C_DRIVER_REQUIRED = yes
diff --git a/keyboards/wilba_tech/wt65_a/config.h b/keyboards/wilba_tech/wt65_a/config.h
index aa75002b4f..bddeb8397c 100644
--- a/keyboards/wilba_tech/wt65_a/config.h
+++ b/keyboards/wilba_tech/wt65_a/config.h
@@ -61,3 +61,6 @@
// Backlight config starts after VIA's EEPROM usage,
// dynamic keymaps start after this.
#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 7
+
+#define IS31FL3736_DRIVER_COUNT 1
+#define LED_MATRIX_LED_COUNT 96
diff --git a/keyboards/wilba_tech/wt65_a/rules.mk b/keyboards/wilba_tech/wt65_a/rules.mk
index 4a53424c53..9ca8e8f973 100644
--- a/keyboards/wilba_tech/wt65_a/rules.mk
+++ b/keyboards/wilba_tech/wt65_a/rules.mk
@@ -11,8 +11,8 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
AUDIO_ENABLE = no # Audio output
# project specific files
-SRC = drivers/led/issi/is31fl3736.c \
- i2c_master.c \
+SRC = drivers/led/issi/is31fl3736-simple.c \
quantum/color.c \
keyboards/wilba_tech/wt_mono_backlight.c \
keyboards/wilba_tech/wt_main.c
+I2C_DRIVER_REQUIRED = yes \ No newline at end of file
diff --git a/keyboards/wilba_tech/wt65_b/config.h b/keyboards/wilba_tech/wt65_b/config.h
index 60cdbe4cc6..f0aec12b06 100644
--- a/keyboards/wilba_tech/wt65_b/config.h
+++ b/keyboards/wilba_tech/wt65_b/config.h
@@ -61,3 +61,6 @@
// Backlight config starts after VIA's EEPROM usage,
// dynamic keymaps start after this.
#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 7
+
+#define IS31FL3736_DRIVER_COUNT 1
+#define LED_MATRIX_LED_COUNT 96
diff --git a/keyboards/wilba_tech/wt65_b/rules.mk b/keyboards/wilba_tech/wt65_b/rules.mk
index 4a53424c53..9ca8e8f973 100644
--- a/keyboards/wilba_tech/wt65_b/rules.mk
+++ b/keyboards/wilba_tech/wt65_b/rules.mk
@@ -11,8 +11,8 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
AUDIO_ENABLE = no # Audio output
# project specific files
-SRC = drivers/led/issi/is31fl3736.c \
- i2c_master.c \
+SRC = drivers/led/issi/is31fl3736-simple.c \
quantum/color.c \
keyboards/wilba_tech/wt_mono_backlight.c \
keyboards/wilba_tech/wt_main.c
+I2C_DRIVER_REQUIRED = yes \ No newline at end of file
diff --git a/keyboards/wilba_tech/wt75_a/config.h b/keyboards/wilba_tech/wt75_a/config.h
index 4638b0fba9..b2d20e3351 100644
--- a/keyboards/wilba_tech/wt75_a/config.h
+++ b/keyboards/wilba_tech/wt75_a/config.h
@@ -61,3 +61,6 @@
// Backlight config starts after VIA's EEPROM usage,
// dynamic keymaps start after this.
#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 7
+
+#define IS31FL3736_DRIVER_COUNT 1
+#define LED_MATRIX_LED_COUNT 96
diff --git a/keyboards/wilba_tech/wt75_a/rules.mk b/keyboards/wilba_tech/wt75_a/rules.mk
index 4a53424c53..9ca8e8f973 100644
--- a/keyboards/wilba_tech/wt75_a/rules.mk
+++ b/keyboards/wilba_tech/wt75_a/rules.mk
@@ -11,8 +11,8 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
AUDIO_ENABLE = no # Audio output
# project specific files
-SRC = drivers/led/issi/is31fl3736.c \
- i2c_master.c \
+SRC = drivers/led/issi/is31fl3736-simple.c \
quantum/color.c \
keyboards/wilba_tech/wt_mono_backlight.c \
keyboards/wilba_tech/wt_main.c
+I2C_DRIVER_REQUIRED = yes \ No newline at end of file
diff --git a/keyboards/wilba_tech/wt75_b/config.h b/keyboards/wilba_tech/wt75_b/config.h
index f519fe6603..cd6aa96577 100644
--- a/keyboards/wilba_tech/wt75_b/config.h
+++ b/keyboards/wilba_tech/wt75_b/config.h
@@ -61,3 +61,6 @@
// Backlight config starts after VIA's EEPROM usage,
// dynamic keymaps start after this.
#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 7
+
+#define IS31FL3736_DRIVER_COUNT 1
+#define LED_MATRIX_LED_COUNT 96
diff --git a/keyboards/wilba_tech/wt75_b/rules.mk b/keyboards/wilba_tech/wt75_b/rules.mk
index 4a53424c53..9ca8e8f973 100644
--- a/keyboards/wilba_tech/wt75_b/rules.mk
+++ b/keyboards/wilba_tech/wt75_b/rules.mk
@@ -11,8 +11,8 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
AUDIO_ENABLE = no # Audio output
# project specific files
-SRC = drivers/led/issi/is31fl3736.c \
- i2c_master.c \
+SRC = drivers/led/issi/is31fl3736-simple.c \
quantum/color.c \
keyboards/wilba_tech/wt_mono_backlight.c \
keyboards/wilba_tech/wt_main.c
+I2C_DRIVER_REQUIRED = yes \ No newline at end of file
diff --git a/keyboards/wilba_tech/wt75_c/config.h b/keyboards/wilba_tech/wt75_c/config.h
index 7d07822eb6..f2cebdc7aa 100644
--- a/keyboards/wilba_tech/wt75_c/config.h
+++ b/keyboards/wilba_tech/wt75_c/config.h
@@ -61,3 +61,6 @@
// Backlight config starts after VIA's EEPROM usage,
// dynamic keymaps start after this.
#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 7
+
+#define IS31FL3736_DRIVER_COUNT 1
+#define LED_MATRIX_LED_COUNT 96
diff --git a/keyboards/wilba_tech/wt75_c/rules.mk b/keyboards/wilba_tech/wt75_c/rules.mk
index 4a53424c53..9ca8e8f973 100644
--- a/keyboards/wilba_tech/wt75_c/rules.mk
+++ b/keyboards/wilba_tech/wt75_c/rules.mk
@@ -11,8 +11,8 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
AUDIO_ENABLE = no # Audio output
# project specific files
-SRC = drivers/led/issi/is31fl3736.c \
- i2c_master.c \
+SRC = drivers/led/issi/is31fl3736-simple.c \
quantum/color.c \
keyboards/wilba_tech/wt_mono_backlight.c \
keyboards/wilba_tech/wt_main.c
+I2C_DRIVER_REQUIRED = yes \ No newline at end of file
diff --git a/keyboards/wilba_tech/wt80_a/config.h b/keyboards/wilba_tech/wt80_a/config.h
index 59cb397a00..6b424a649f 100644
--- a/keyboards/wilba_tech/wt80_a/config.h
+++ b/keyboards/wilba_tech/wt80_a/config.h
@@ -61,3 +61,6 @@
// Backlight config starts after VIA's EEPROM usage,
// dynamic keymaps start after this.
#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 7
+
+#define IS31FL3736_DRIVER_COUNT 1
+#define LED_MATRIX_LED_COUNT 96
diff --git a/keyboards/wilba_tech/wt80_a/rules.mk b/keyboards/wilba_tech/wt80_a/rules.mk
index 4a53424c53..9ca8e8f973 100644
--- a/keyboards/wilba_tech/wt80_a/rules.mk
+++ b/keyboards/wilba_tech/wt80_a/rules.mk
@@ -11,8 +11,8 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
AUDIO_ENABLE = no # Audio output
# project specific files
-SRC = drivers/led/issi/is31fl3736.c \
- i2c_master.c \
+SRC = drivers/led/issi/is31fl3736-simple.c \
quantum/color.c \
keyboards/wilba_tech/wt_mono_backlight.c \
keyboards/wilba_tech/wt_main.c
+I2C_DRIVER_REQUIRED = yes \ No newline at end of file
diff --git a/keyboards/wilba_tech/wt_mono_backlight.c b/keyboards/wilba_tech/wt_mono_backlight.c
index 28ee5fae81..a1545a668b 100644
--- a/keyboards/wilba_tech/wt_mono_backlight.c
+++ b/keyboards/wilba_tech/wt_mono_backlight.c
@@ -33,7 +33,7 @@
#error VIA_EEPROM_CUSTOM_CONFIG_SIZE was not defined to store backlight_config struct
#endif
-#include "drivers/led/issi/is31fl3736.h"
+#include "drivers/led/issi/is31fl3736-simple.h"
#define ISSI_ADDR_DEFAULT 0x50
@@ -52,6 +52,116 @@ backlight_config g_config = {
.color_1 = MONO_BACKLIGHT_COLOR_1,
};
+const is31fl3736_led_t PROGMEM g_is31fl3736_leds[LED_MATRIX_LED_COUNT] = {
+ {0, A_1},
+ {0, A_2},
+ {0, A_3},
+ {0, A_4},
+ {0, A_5},
+ {0, A_6},
+ {0, A_7},
+ {0, A_8},
+
+ {0, B_1},
+ {0, B_2},
+ {0, B_3},
+ {0, B_4},
+ {0, B_5},
+ {0, B_6},
+ {0, B_7},
+ {0, B_8},
+
+ {0, C_1},
+ {0, C_2},
+ {0, C_3},
+ {0, C_4},
+ {0, C_5},
+ {0, C_6},
+ {0, C_7},
+ {0, C_8},
+
+ {0, D_1},
+ {0, D_2},
+ {0, D_3},
+ {0, D_4},
+ {0, D_5},
+ {0, D_6},
+ {0, D_7},
+ {0, D_8},
+
+ {0, E_1},
+ {0, E_2},
+ {0, E_3},
+ {0, E_4},
+ {0, E_5},
+ {0, E_6},
+ {0, E_7},
+ {0, E_8},
+
+ {0, F_1},
+ {0, F_2},
+ {0, F_3},
+ {0, F_4},
+ {0, F_5},
+ {0, F_6},
+ {0, F_7},
+ {0, F_8},
+
+ {0, G_1},
+ {0, G_2},
+ {0, G_3},
+ {0, G_4},
+ {0, G_5},
+ {0, G_6},
+ {0, G_7},
+ {0, G_8},
+
+ {0, H_1},
+ {0, H_2},
+ {0, H_3},
+ {0, H_4},
+ {0, H_5},
+ {0, H_6},
+ {0, H_7},
+ {0, H_8},
+
+ {0, I_1},
+ {0, I_2},
+ {0, I_3},
+ {0, I_4},
+ {0, I_5},
+ {0, I_6},
+ {0, I_7},
+ {0, I_8},
+
+ {0, J_1},
+ {0, J_2},
+ {0, J_3},
+ {0, J_4},
+ {0, J_5},
+ {0, J_6},
+ {0, J_7},
+ {0, J_8},
+
+ {0, K_1},
+ {0, K_2},
+ {0, K_3},
+ {0, K_4},
+ {0, K_5},
+ {0, K_6},
+ {0, K_7},
+ {0, K_8},
+
+ {0, L_1},
+ {0, L_2},
+ {0, L_3},
+ {0, L_4},
+ {0, L_5},
+ {0, L_6},
+ {0, L_7},
+ {0, L_8}
+};
+
bool g_suspend_state = false;
// Global tick at 20 Hz
@@ -67,9 +177,9 @@ void backlight_init_drivers(void)
is31fl3736_init( ISSI_ADDR_DEFAULT );
for ( uint8_t index = 0; index < 96; index++ ) {
- is31fl3736_mono_set_led_control_register( index, true );
+ is31fl3736_set_led_control_register( index, true );
}
- is31fl3736_update_led_control_registers( ISSI_ADDR_DEFAULT, 0x00 );
+ is31fl3736_update_led_control_registers( ISSI_ADDR_DEFAULT, 0 );
}
void backlight_set_key_hit(uint8_t row, uint8_t column)
@@ -119,17 +229,17 @@ void backlight_set_suspend_state(bool state)
void backlight_set_brightness_all( uint8_t value )
{
- is31fl3736_mono_set_brightness_all( value );
+ is31fl3736_set_value_all( value );
}
void backlight_effect_all_off(void)
{
- is31fl3736_mono_set_brightness_all( 0 );
+ is31fl3736_set_value_all( 0 );
}
void backlight_effect_all_on(void)
{
- is31fl3736_mono_set_brightness_all( g_config.brightness );
+ is31fl3736_set_value_all( g_config.brightness );
}
void backlight_effect_raindrops(bool initialize)
@@ -143,7 +253,7 @@ void backlight_effect_raindrops(bool initialize)
// If not, all but one will stay the same as before.
if ( initialize || i == led_to_change )
{
- is31fl3736_mono_set_brightness(i, rand() & 0xFF );
+ is31fl3736_set_value(i, rand() & 0xFF );
}
}
}
@@ -165,9 +275,9 @@ void backlight_effect_indicators(void)
// SW7,CS8 = (6*8+7) = 55
// SW8,CS8 = (7*8+7) = 63
// SW9,CS8 = (8*8+7) = 71
- is31fl3736_mono_set_brightness(55, rgb.r);
- is31fl3736_mono_set_brightness(63, rgb.g);
- is31fl3736_mono_set_brightness(71, rgb.b);
+ is31fl3736_set_value(55, rgb.r);
+ is31fl3736_set_value(63, rgb.g);
+ is31fl3736_set_value(71, rgb.b);
#endif // MONO_BACKLIGHT_WT75_A
// This pairs with "All Off" already setting zero brightness,
@@ -181,19 +291,19 @@ defined(MONO_BACKLIGHT_WT75_C) || \
defined(MONO_BACKLIGHT_WT80_A)
if ( host_keyboard_led_state().caps_lock ) {
// SW3,CS1 = (2*8+0) = 16
- is31fl3736_mono_set_brightness(16, 255);
+ is31fl3736_set_value(16, 255);
}
#endif
#if defined(MONO_BACKLIGHT_WT80_A)
if ( host_keyboard_led_state().scroll_lock ) {
// SW7,CS7 = (6*8+6) = 54
- is31fl3736_mono_set_brightness(54, 255);
+ is31fl3736_set_value(54, 255);
}
#endif
#if defined(MONO_BACKLIGHT_WT75_C)
if ( host_keyboard_led_state().scroll_lock ) {
// SW7,CS8 = (6*8+7) = 55
- is31fl3736_mono_set_brightness(55, 255);
+ is31fl3736_set_value(55, 255);
}
#endif
}
@@ -361,7 +471,7 @@ void backlight_config_save(void)
void backlight_update_pwm_buffers(void)
{
- is31fl3736_update_pwm_buffers(ISSI_ADDR_DEFAULT,0x00);
+ is31fl3736_update_pwm_buffers(ISSI_ADDR_DEFAULT, 0);
}
bool process_record_backlight(uint16_t keycode, keyrecord_t *record)
diff --git a/keyboards/wilba_tech/wt_rgb_backlight.c b/keyboards/wilba_tech/wt_rgb_backlight.c
index 6c57416622..1c865deecf 100644
--- a/keyboards/wilba_tech/wt_rgb_backlight.c
+++ b/keyboards/wilba_tech/wt_rgb_backlight.c
@@ -64,7 +64,7 @@
#if defined(RGB_BACKLIGHT_DAWN60)
#include "ws2812.h"
-LED_TYPE g_ws2812_leds[WS2812_LED_TOTAL];
+rgb_led_t g_ws2812_leds[WS2812_LED_TOTAL];
#endif
#include "progmem.h"
@@ -155,13 +155,9 @@ uint8_t g_key_hit[BACKLIGHT_LED_COUNT];
uint32_t g_any_key_hit = 0;
#if defined(RGB_BACKLIGHT_HS60)
+#define ISSI_ADDR_1 IS31FL3733_I2C_ADDRESS_GND_GND
-// This is a 7-bit address, that gets left-shifted and bit 0
-// set to 0 for write, 1 for read (as per I2C protocol)
-// ADDR_2 is not needed. it is here as a dummy
-#define ISSI_ADDR_1 0x50
-
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3733_led_t PROGMEM g_is31fl3733_leds[RGB_MATRIX_LED_COUNT] = {
/* Refer to IS31 manual for these locations
* driver
* | R location
@@ -235,14 +231,10 @@ const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
};
#elif defined(RGB_BACKLIGHT_NK65) || defined(RGB_BACKLIGHT_NEBULA68) || defined(RGB_BACKLIGHT_NK87) || defined(RGB_BACKLIGHT_KW_MEGA)
+#define ISSI_ADDR_1 IS31FL3733_I2C_ADDRESS_GND_GND
+#define ISSI_ADDR_2 IS31FL3733_I2C_ADDRESS_GND_SDA
-// This is a 7-bit address, that gets left-shifted and bit 0
-// set to 0 for write, 1 for read (as per I2C protocol)
-// ADDR_2 is not needed. it is here as a dummy
-#define ISSI_ADDR_1 0x50
-#define ISSI_ADDR_2 0x52
-
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3733_led_t PROGMEM g_is31fl3733_leds[RGB_MATRIX_LED_COUNT] = {
/* Refer to IS31 manual for these locations
* driver
* | R location
@@ -381,11 +373,9 @@ const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
};
#elif defined(RGB_BACKLIGHT_NEBULA12)
-// This is a 7-bit address, that gets left-shifted and bit 0
-// set to 0 for write, 1 for read (as per I2C protocol)
-#define ISSI_ADDR_1 0x74
+#define ISSI_ADDR_1 IS31FL3731_I2C_ADDRESS_GND
-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
@@ -411,13 +401,12 @@ const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
};
#elif defined(RGB_BACKLIGHT_U80_A)
-
// U80-A prototype uses 3 ISSI drivers
-#define ISSI_ADDR_1 0x74 // 11101[00] <- GND
-#define ISSI_ADDR_2 0x76 // 11101[10] <- SDA
-#define ISSI_ADDR_3 0x75 // 11101[01] <- SCL
+#define ISSI_ADDR_1 IS31FL3731_I2C_ADDRESS_GND
+#define ISSI_ADDR_2 IS31FL3731_I2C_ADDRESS_SDA
+#define ISSI_ADDR_3 IS31FL3731_I2C_ADDRESS_SCL
-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
@@ -539,12 +528,10 @@ const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
{2, C8_16, C7_16, C6_16}, // LF17
};
#elif defined(RGB_BACKLIGHT_DAWN60)
-// This is a 7-bit address, that gets left-shifted and bit 0
-// set to 0 for write, 1 for read (as per I2C protocol)
-#define ISSI_ADDR_1 0x74
-#define ISSI_ADDR_2 0x76
+#define ISSI_ADDR_1 IS31FL3731_I2C_ADDRESS_GND
+#define ISSI_ADDR_2 IS31FL3731_I2C_ADDRESS_SDA
-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
@@ -620,12 +607,10 @@ const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
{1, C9_16, C7_15, C6_15} //D16
};
#elif defined(RGB_BACKLIGHT_PORTICO)
-// This is a 7-bit address, that gets left-shifted and bit 0
-// set to 0 for write, 1 for read (as per I2C protocol)
-#define ISSI_ADDR_1 0x74
-#define ISSI_ADDR_2 0x77
+#define ISSI_ADDR_1 IS31FL3731_I2C_ADDRESS_GND
+#define ISSI_ADDR_2 IS31FL3731_I2C_ADDRESS_VCC
-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
@@ -706,12 +691,10 @@ const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
};
#elif defined(RGB_BACKLIGHT_PORTICO75)
-// This is a 7-bit address, that gets left-shifted and bit 0
-// set to 0 for write, 1 for read (as per I2C protocol)
-#define ISSI_ADDR_1 0x30
+#define ISSI_ADDR_1 IS31FL3741_I2C_ADDRESS_GND
#define ISSI_ADDR_2
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3741_led_t PROGMEM g_is31fl3741_leds[RGB_MATRIX_LED_COUNT] = {
/* Refer to IS31 manual for these locations
* driver
* | R location
@@ -834,14 +817,19 @@ const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
};
#elif defined(RGB_BACKLIGHT_M6_B)
- // Driver has fixed mapping of index to the red, green and blue LEDs
+const is31fl3218_led_t PROGMEM g_is31fl3218_leds[RGB_MATRIX_LED_COUNT] = {
+ {OUT1, OUT2, OUT3},
+ {OUT4, OUT5, OUT6},
+ {OUT7, OUT8, OUT9},
+ {OUT10, OUT11, OUT12},
+ {OUT13, OUT14, OUT15},
+ {OUT16, OUT17, OUT18}
+};
#elif defined(RGB_BACKLIGHT_M10_C)
-// This is a 7-bit address, that gets left-shifted and bit 0
-// set to 0 for write, 1 for read (as per I2C protocol)
-#define ISSI_ADDR_1 0x74
+#define ISSI_ADDR_1 IS31FL3731_I2C_ADDRESS_GND
#define ISSI_ADDR_2
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3731_led_t PROGMEM g_is31fl3731_leds[RGB_MATRIX_LED_COUNT] = {
{0, C1_9, C3_10, C4_10}, // LB1
{0, C1_10, C2_10, C4_11}, // LB2
{0, C1_11, C2_11, C3_11}, // LB3
@@ -856,12 +844,10 @@ const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
{0, C9_16, C7_15, C6_15} // LB16
};
#else
-// This is a 7-bit address, that gets left-shifted and bit 0
-// set to 0 for write, 1 for read (as per I2C protocol)
-#define ISSI_ADDR_1 0x74
-#define ISSI_ADDR_2 0x76
+#define ISSI_ADDR_1 IS31FL3731_I2C_ADDRESS_GND
+#define ISSI_ADDR_2 IS31FL3731_I2C_ADDRESS_SDA
-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
@@ -2915,6 +2901,17 @@ void backlight_init_drivers(void)
#if defined(RGB_BACKLIGHT_M6_B)
is31fl3218_init();
+
+ for ( int index = 0; index < RGB_MATRIX_LED_COUNT; index++ )
+ {
+ bool enabled = true;
+
+ // This only caches it for later
+ is31fl3218_set_led_control_register( index, enabled, enabled, enabled );
+ }
+
+ // This actually updates the LED drivers
+ is31fl3218_update_led_control_registers();
#elif defined(RGB_BACKLIGHT_HS60)
is31fl3733_init( ISSI_ADDR_1, 0 );
diff --git a/keyboards/wilba_tech/zeal60/config.h b/keyboards/wilba_tech/zeal60/config.h
index e57bafe20d..31ee2942ce 100644
--- a/keyboards/wilba_tech/zeal60/config.h
+++ b/keyboards/wilba_tech/zeal60/config.h
@@ -16,7 +16,7 @@
#pragma once
// IS31FL3731 driver
-#define DRIVER_COUNT 2
+#define IS31FL3731_DRIVER_COUNT 2
#define RGB_MATRIX_LED_COUNT 72
// Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap
diff --git a/keyboards/wilba_tech/zeal60/rules.mk b/keyboards/wilba_tech/zeal60/rules.mk
index 4f810f3d32..d1ce11b473 100644
--- a/keyboards/wilba_tech/zeal60/rules.mk
+++ b/keyboards/wilba_tech/zeal60/rules.mk
@@ -22,5 +22,5 @@ CIE1931_CURVE = yes
SRC = keyboards/wilba_tech/wt_main.c \
keyboards/wilba_tech/wt_rgb_backlight.c \
quantum/color.c \
- drivers/led/issi/is31fl3731.c \
- i2c_master.c
+ drivers/led/issi/is31fl3731.c
+I2C_DRIVER_REQUIRED = yes
diff --git a/keyboards/wilba_tech/zeal65/config.h b/keyboards/wilba_tech/zeal65/config.h
index 4a73ed3b27..7370931df1 100644
--- a/keyboards/wilba_tech/zeal65/config.h
+++ b/keyboards/wilba_tech/zeal65/config.h
@@ -16,7 +16,7 @@
#pragma once
// IS31FL3731 driver
-#define DRIVER_COUNT 2
+#define IS31FL3731_DRIVER_COUNT 2
#define RGB_MATRIX_LED_COUNT 72
// Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap
diff --git a/keyboards/wilba_tech/zeal65/rules.mk b/keyboards/wilba_tech/zeal65/rules.mk
index 4f810f3d32..d1ce11b473 100644
--- a/keyboards/wilba_tech/zeal65/rules.mk
+++ b/keyboards/wilba_tech/zeal65/rules.mk
@@ -22,5 +22,5 @@ CIE1931_CURVE = yes
SRC = keyboards/wilba_tech/wt_main.c \
keyboards/wilba_tech/wt_rgb_backlight.c \
quantum/color.c \
- drivers/led/issi/is31fl3731.c \
- i2c_master.c
+ drivers/led/issi/is31fl3731.c
+I2C_DRIVER_REQUIRED = yes
diff --git a/keyboards/woodkeys/meira/TWIlib.c b/keyboards/woodkeys/meira/TWIlib.c
deleted file mode 100755
index 89e03a73d4..0000000000
--- a/keyboards/woodkeys/meira/TWIlib.c
+++ /dev/null
@@ -1,300 +0,0 @@
-/*
- * TWIlib.c
- *
- * Created: 6/01/2014 10:41:33 PM
- * Author: Chris Herring
- */
-
-#include <avr/io.h>
-#include <avr/interrupt.h>
-#include "TWIlib.h"
-#include <util/delay.h>
-#include "print.h"
-
-// Global transmit buffer
-volatile uint8_t *TWITransmitBuffer;
-// Global receive buffer
-volatile uint8_t TWIReceiveBuffer[RXMAXBUFLEN];
-// Buffer indexes
-volatile int TXBuffIndex; // Index of the transmit buffer. Is volatile, can change at any time.
-int RXBuffIndex; // Current index in the receive buffer
-// Buffer lengths
-int TXBuffLen; // The total length of the transmit buffer
-int RXBuffLen; // The total number of bytes to read (should be less than RXMAXBUFFLEN)
-
-TWIInfoStruct TWIInfo;
-
-void TWIInit(void)
-{
- TWIInfo.mode = Ready;
- TWIInfo.errorCode = 0xFF;
- TWIInfo.repStart = 0;
- // Set pre-scalers (no pre-scaling)
- TWSR = 0;
- // Set bit rate
- TWBR = ((F_CPU / TWI_FREQ) - 16) / 2;
- // Enable TWI and interrupt
- TWCR = (1 << TWIE) | (1 << TWEN);
-}
-
-uint8_t isTWIReady(void)
-{
- if ( (TWIInfo.mode == Ready) | (TWIInfo.mode == RepeatedStartSent) )
- {
-
-// xprintf("i2c ready\n");
- return 1;
- }
- else
- {
- if(TWIInfo.mode == Initializing){
- switch(TWIInfo.errorCode){
- case TWI_SUCCESS:
- break;
- case TWI_NO_RELEVANT_INFO:
-
- break;
- case TWI_LOST_ARBIT:
- case TWI_MT_DATA_NACK:
- // Some kind of I2C error, reset and re-init
- xprintf("I2C init error: %d\n", TWIInfo.errorCode);
- TWCR = (1 << TWINT)|(1 << TWSTO);
- TWIInit();
- break;
- default:
- xprintf("Other i2c init error: %d\n", TWIInfo.errorCode);
- }
- }
- return 0;
- }
-}
-
-
-void TWITransmitData(void *const TXdata, uint8_t dataLen, uint8_t repStart, uint8_t blocking)
-{
- // Wait until ready
- while (!isTWIReady()) {_delay_us(1);}
- // Reset the I2C stuff
- TWCR = (1 << TWINT)|(1 << TWSTO);
- TWIInit();
- // Set repeated start mode
- TWIInfo.repStart = repStart;
- // Copy transmit info to global variables
- TWITransmitBuffer = (uint8_t *)TXdata;
- TXBuffLen = dataLen;
- TXBuffIndex = 0;
-
- // If a repeated start has been sent, then devices are already listening for an address
- // and another start does not need to be sent.
- if (TWIInfo.mode == RepeatedStartSent)
- {
- TWIInfo.mode = Initializing;
- TWDR = TWITransmitBuffer[TXBuffIndex++]; // Load data to transmit buffer
- TWISendTransmit(); // Send the data
- }
- else // Otherwise, just send the normal start signal to begin transmission.
- {
- TWIInfo.mode = Initializing;
- TWISendStart();
- }
- if(blocking){
- // Wait until ready
- while (!isTWIReady()){_delay_us(1);}
- }
-}
-
-
-// uint8_t TWITransmitData(void *const TXdata, uint8_t dataLen, uint8_t repStart)
-// {
-// if (dataLen <= TXMAXBUFLEN)
-// {
-// // Wait until ready
-// while (!isTWIReady()) {_delay_us(1);}
-// // Set repeated start mode
-// TWIInfo.repStart = repStart;
-// // Copy data into the transmit buffer
-// uint8_t *data = (uint8_t *)TXdata;
-// for (int i = 0; i < dataLen; i++)
-// {
-// TWITransmitBuffer[i] = data[i];
-// }
-// // Copy transmit info to global variables
-// TXBuffLen = dataLen;
-// TXBuffIndex = 0;
-
-// // If a repeated start has been sent, then devices are already listening for an address
-// // and another start does not need to be sent.
-// if (TWIInfo.mode == RepeatedStartSent)
-// {
-// TWIInfo.mode = Initializing;
-// TWDR = TWITransmitBuffer[TXBuffIndex++]; // Load data to transmit buffer
-// TWISendTransmit(); // Send the data
-// }
-// else // Otherwise, just send the normal start signal to begin transmission.
-// {
-// TWIInfo.mode = Initializing;
-// TWISendStart();
-// }
-
-// }
-// else
-// {
-// return 1; // return an error if data length is longer than buffer
-// }
-// return 0;
-// }
-
-uint8_t TWIReadData(uint8_t TWIaddr, uint8_t bytesToRead, uint8_t repStart)
-{
- // Check if number of bytes to read can fit in the RXbuffer
- if (bytesToRead < RXMAXBUFLEN)
- {
- // Reset buffer index and set RXBuffLen to the number of bytes to read
- RXBuffIndex = 0;
- RXBuffLen = bytesToRead;
- // Create the one value array for the address to be transmitted
- uint8_t TXdata[1];
- // Shift the address and AND a 1 into the read write bit (set to write mode)
- TXdata[0] = (TWIaddr << 1) | 0x01;
- // Use the TWITransmitData function to initialize the transfer and address the slave
- TWITransmitData(TXdata, 1, repStart, 0);
- }
- else
- {
- return 0;
- }
- return 1;
-}
-
-ISR (TWI_vect)
-{
- switch (TWI_STATUS)
- {
- // ----\/ ---- MASTER TRANSMITTER OR WRITING ADDRESS ----\/ ---- //
- case TWI_MT_SLAW_ACK: // SLA+W transmitted and ACK received
- // Set mode to Master Transmitter
- TWIInfo.mode = MasterTransmitter;
- case TWI_START_SENT: // Start condition has been transmitted
- case TWI_MT_DATA_ACK: // Data byte has been transmitted, ACK received
- if (TXBuffIndex < TXBuffLen) // If there is more data to send
- {
- TWDR = TWITransmitBuffer[TXBuffIndex++]; // Load data to transmit buffer
- TWIInfo.errorCode = TWI_NO_RELEVANT_INFO;
- TWISendTransmit(); // Send the data
- }
- // This transmission is complete however do not release bus yet
- else if (TWIInfo.repStart)
- {
- TWIInfo.errorCode = 0xFF;
- TWISendStart();
- }
- // All transmissions are complete, exit
- else
- {
- TWIInfo.mode = Ready;
- TWIInfo.errorCode = 0xFF;
- TWISendStop();
- }
- break;
-
- // ----\/ ---- MASTER RECEIVER ----\/ ---- //
-
- case TWI_MR_SLAR_ACK: // SLA+R has been transmitted, ACK has been received
- // Switch to Master Receiver mode
- TWIInfo.mode = MasterReceiver;
- // If there is more than one byte to be read, receive data byte and return an ACK
- if (RXBuffIndex < RXBuffLen-1)
- {
- TWIInfo.errorCode = TWI_NO_RELEVANT_INFO;
- TWISendACK();
- }
- // Otherwise when a data byte (the only data byte) is received, return NACK
- else
- {
- TWIInfo.errorCode = TWI_NO_RELEVANT_INFO;
- TWISendNACK();
- }
- break;
-
- case TWI_MR_DATA_ACK: // Data has been received, ACK has been transmitted.
-
- /// -- HANDLE DATA BYTE --- ///
- TWIReceiveBuffer[RXBuffIndex++] = TWDR;
- // If there is more than one byte to be read, receive data byte and return an ACK
- if (RXBuffIndex < RXBuffLen-1)
- {
- TWIInfo.errorCode = TWI_NO_RELEVANT_INFO;
- TWISendACK();
- }
- // Otherwise when a data byte (the only data byte) is received, return NACK
- else
- {
- TWIInfo.errorCode = TWI_NO_RELEVANT_INFO;
- TWISendNACK();
- }
- break;
-
- case TWI_MR_DATA_NACK: // Data byte has been received, NACK has been transmitted. End of transmission.
-
- /// -- HANDLE DATA BYTE --- ///
- TWIReceiveBuffer[RXBuffIndex++] = TWDR;
- // This transmission is complete however do not release bus yet
- if (TWIInfo.repStart)
- {
- TWIInfo.errorCode = 0xFF;
- TWISendStart();
- }
- // All transmissions are complete, exit
- else
- {
- TWIInfo.mode = Ready;
- TWIInfo.errorCode = 0xFF;
- TWISendStop();
- }
- break;
-
- // ----\/ ---- MT and MR common ----\/ ---- //
-
- case TWI_MR_SLAR_NACK: // SLA+R transmitted, NACK received
- case TWI_MT_SLAW_NACK: // SLA+W transmitted, NACK received
- case TWI_MT_DATA_NACK: // Data byte has been transmitted, NACK received
- case TWI_LOST_ARBIT: // Arbitration has been lost
- // Return error and send stop and set mode to ready
- if (TWIInfo.repStart)
- {
- TWIInfo.errorCode = TWI_STATUS;
- TWISendStart();
- }
- // All transmissions are complete, exit
- else
- {
- TWIInfo.mode = Ready;
- TWIInfo.errorCode = TWI_STATUS;
- TWISendStop();
- }
- break;
- case TWI_REP_START_SENT: // Repeated start has been transmitted
- // Set the mode but DO NOT clear TWINT as the next data is not yet ready
- TWIInfo.mode = RepeatedStartSent;
- break;
-
- // ----\/ ---- SLAVE RECEIVER ----\/ ---- //
-
- // TODO IMPLEMENT SLAVE RECEIVER FUNCTIONALITY
-
- // ----\/ ---- SLAVE TRANSMITTER ----\/ ---- //
-
- // TODO IMPLEMENT SLAVE TRANSMITTER FUNCTIONALITY
-
- // ----\/ ---- MISCELLANEOUS STATES ----\/ ---- //
- case TWI_NO_RELEVANT_INFO: // It is not really possible to get into this ISR on this condition
- // Rather, it is there to be manually set between operations
- break;
- case TWI_ILLEGAL_START_STOP: // Illegal START/STOP, abort and return error
- TWIInfo.errorCode = TWI_ILLEGAL_START_STOP;
- TWIInfo.mode = Ready;
- TWISendStop();
- break;
- }
-
-}
diff --git a/keyboards/woodkeys/meira/TWIlib.h b/keyboards/woodkeys/meira/TWIlib.h
deleted file mode 100755
index 8ba261c6e5..0000000000
--- a/keyboards/woodkeys/meira/TWIlib.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * TWIlib.h
- *
- * Created: 6/01/2014 10:38:42 PM
- * Author: Chris Herring
- */
-
-
-#ifndef TWILIB_H_
-#define TWILIB_H_
-// TWI bit rate
-#define TWI_FREQ 400000
-// Get TWI status
-#define TWI_STATUS (TWSR & 0xF8)
-// Transmit buffer length
-#define TXMAXBUFLEN 20
-// Receive buffer length
-#define RXMAXBUFLEN 20
-
-typedef enum {
- Ready,
- Initializing,
- RepeatedStartSent,
- MasterTransmitter,
- MasterReceiver,
- SlaceTransmitter,
- SlaveReciever
- } TWIMode;
-
- typedef struct TWIInfoStruct{
- TWIMode mode;
- uint8_t errorCode;
- uint8_t repStart;
- }TWIInfoStruct;
-
-extern TWIInfoStruct TWIInfo;
-
-// TWI Status Codes
-#define TWI_START_SENT 0x08 // Start sent
-#define TWI_REP_START_SENT 0x10 // Repeated Start sent
-// Master Transmitter Mode
-#define TWI_MT_SLAW_ACK 0x18 // SLA+W sent and ACK received
-#define TWI_MT_SLAW_NACK 0x20 // SLA+W sent and NACK received
-#define TWI_MT_DATA_ACK 0x28 // DATA sent and ACK received
-#define TWI_MT_DATA_NACK 0x30 // DATA sent and NACK received
-// Master Receiver Mode
-#define TWI_MR_SLAR_ACK 0x40 // SLA+R sent, ACK received
-#define TWI_MR_SLAR_NACK 0x48 // SLA+R sent, NACK received
-#define TWI_MR_DATA_ACK 0x50 // Data received, ACK returned
-#define TWI_MR_DATA_NACK 0x58 // Data received, NACK returned
-
-// Miscellaneous States
-#define TWI_LOST_ARBIT 0x38 // Arbitration has been lost
-#define TWI_NO_RELEVANT_INFO 0xF8 // No relevant information available
-#define TWI_ILLEGAL_START_STOP 0x00 // Illegal START or STOP condition has been detected
-#define TWI_SUCCESS 0xFF // Successful transfer, this state is impossible from TWSR as bit2 is 0 and read only
-
-
-#define TWISendStart() (TWCR = (1<<TWINT)|(1<<TWSTA)|(1<<TWEN)|(1<<TWIE)) // Send the START signal, enable interrupts and TWI, clear TWINT flag to resume transfer.
-#define TWISendStop() (TWCR = (1<<TWINT)|(1<<TWSTO)|(1<<TWEN)|(1<<TWIE)) // Send the STOP signal, enable interrupts and TWI, clear TWINT flag.
-#define TWISendTransmit() (TWCR = (1<<TWINT)|(1<<TWEN)|(1<<TWIE)) // Used to resume a transfer, clear TWINT and ensure that TWI and interrupts are enabled.
-#define TWISendACK() (TWCR = (1<<TWINT)|(1<<TWEN)|(1<<TWIE)|(1<<TWEA)) // FOR MR mode. Resume a transfer, ensure that TWI and interrupts are enabled and respond with an ACK if the device is addressed as a slave or after it receives a byte.
-#define TWISendNACK() (TWCR = (1<<TWINT)|(1<<TWEN)|(1<<TWIE)) // FOR MR mode. Resume a transfer, ensure that TWI and interrupts are enabled but DO NOT respond with an ACK if the device is addressed as a slave or after it receives a byte.
-
-// Function declarations
-void TWITransmitData(void *const TXdata, uint8_t dataLen, uint8_t repStart, uint8_t blocking);
-void TWIInit(void);
-uint8_t TWIReadData(uint8_t TWIaddr, uint8_t bytesToRead, uint8_t repStart);
-uint8_t isTWIReady(void);
-
-#endif // TWICOMMS_H_ \ No newline at end of file
diff --git a/keyboards/woodkeys/meira/config.h b/keyboards/woodkeys/meira/config.h
index 4b3491cfa1..1b0803602a 100644
--- a/keyboards/woodkeys/meira/config.h
+++ b/keyboards/woodkeys/meira/config.h
@@ -21,5 +21,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* key matrix size */
#define MATRIX_ROWS 4
#define MATRIX_COLS 12
-
-#define BACKLIGHT_PWM_MAP {2, 4, 8, 16, 40, 55, 70, 128, 200, 255}
diff --git a/keyboards/woodkeys/meira/featherble/config.h b/keyboards/woodkeys/meira/featherble/config.h
index eab64b36b9..fd224b2d50 100644
--- a/keyboards/woodkeys/meira/featherble/config.h
+++ b/keyboards/woodkeys/meira/featherble/config.h
@@ -32,7 +32,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// Column pins to demux in LSB order
#define MATRIX_COL_PINS { C7, B7, B6, C6, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN }
#define MATRIX_COL_PINS_SCANNED { C7, B7, B6, C6 }
-#define LED_EN_PIN D2
#define AUDIO_PIN B5
#define AUDIO_VOICES
diff --git a/keyboards/woodkeys/meira/info.json b/keyboards/woodkeys/meira/info.json
index 5905c00d2d..5fbcc9deaf 100644
--- a/keyboards/woodkeys/meira/info.json
+++ b/keyboards/woodkeys/meira/info.json
@@ -8,16 +8,6 @@
"pid": "0x6061",
"device_version": "0.0.1"
},
- "backlight": {
- "driver": "custom",
- "levels": 10
- },
- "rgblight": {
- "led_count": 15
- },
- "ws2812": {
- "pin": "D3"
- },
"processor": "atmega32u4",
"bootloader": "caterina",
"layout_aliases": {
diff --git a/keyboards/woodkeys/meira/issi.c b/keyboards/woodkeys/meira/issi.c
deleted file mode 100755
index 600a465ba3..0000000000
--- a/keyboards/woodkeys/meira/issi.c
+++ /dev/null
@@ -1,286 +0,0 @@
-#ifdef ISSI_ENABLE
-
-#include <stdlib.h>
-#include <stdint.h>
-#include <util/delay.h>
-#include <avr/sfr_defs.h>
-#include <avr/io.h>
-#include <util/twi.h>
-#include "issi.h"
-#include "print.h"
-#include "TWIlib.h"
-
-#define ISSI_ADDR_DEFAULT 0xE8
-
-#define ISSI_REG_CONFIG 0x00
-#define ISSI_REG_CONFIG_PICTUREMODE 0x00
-#define ISSI_REG_CONFIG_AUTOPLAYMODE 0x08
-
-#define ISSI_CONF_PICTUREMODE 0x00
-#define ISSI_CONF_AUTOFRAMEMODE 0x04
-#define ISSI_CONF_AUDIOMODE 0x08
-
-#define ISSI_REG_PICTUREFRAME 0x01
-
-#define ISSI_REG_SHUTDOWN 0x0A
-#define ISSI_REG_AUDIOSYNC 0x06
-
-#define ISSI_COMMANDREGISTER 0xFD
-#define ISSI_BANK_FUNCTIONREG 0x0B // helpfully called 'page nine'
-uint8_t control[8][9] = {
- {0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0},
-};
-ISSIDeviceStruct *issi_devices[4] = {0, 0, 0, 0};
-
-#ifndef cbi
-#define cbi(sfr, bit) (_SFR_BYTE(sfr) &= ~_BV(bit))
-#endif
-
-#ifndef sbi
-#define sbi(sfr, bit) (_SFR_BYTE(sfr) |= _BV(bit))
-#endif
-
-#define I2C_WRITE 0
-#define F_SCL 400000UL // SCL frequency
-#define Prescaler 1
-#define TWBR_val ((((F_CPU / F_SCL) / Prescaler) - 16 ) / 2)
-
-uint8_t i2c_start(uint8_t address)
-{
- // reset TWI control register
- TWCR = 0;
- // transmit START condition
- TWCR = (1<<TWINT) | (1<<TWSTA) | (1<<TWEN);
- // wait for end of transmission
- while( !(TWCR & (1<<TWINT)) );
-
- // check if the start condition was successfully transmitted
- if((TWSR & 0xF8) != TW_START){ return 1; }
-
- // load slave address into data register
- TWDR = address;
- // start transmission of address
- TWCR = (1<<TWINT) | (1<<TWEN);
- // wait for end of transmission
- while( !(TWCR & (1<<TWINT)) );
-
- // check if the device has acknowledged the READ / WRITE mode
- uint8_t twst = TW_STATUS & 0xF8;
- if ( (twst != TW_MT_SLA_ACK) && (twst != TW_MR_SLA_ACK) ) return 1;
-
- return 0;
-}
-
-uint8_t i2c_write(uint8_t data)
-{
- // load data into data register
- TWDR = data;
- // start transmission of data
- TWCR = (1 << TWINT) | (1 << TWEN);
- // wait for end of transmission
- while (!(TWCR & (1 << TWINT)))
- ;
-
- if ((TWSR & 0xF8) != TW_MT_DATA_ACK) {
- return 1;
- }
- return 0;
-}
-
-uint8_t i2c_transmit(uint8_t address, uint8_t* data, uint16_t length)
-{
- TWBR = (uint8_t)TWBR_val;
- if (i2c_start(address | I2C_WRITE))
- return 1;
- for (uint16_t i = 0; i < length; i++) {
- if (i2c_write(data[i]))
- return 1;
- }
- // transmit STOP condition
- TWCR = (1 << TWINT) | (1 << TWEN) | (1 << TWSTO);
- return 0;
-}
-
-void setFrame(uint8_t device, uint8_t frame)
-{
- static uint8_t current_frame = -1;
- if(current_frame != frame){
- uint8_t payload[] = {
- ISSI_ADDR_DEFAULT | device << 1,
- ISSI_COMMANDREGISTER,
- frame
- };
- TWITransmitData(payload, sizeof(payload), 0, 1);
- }
- // static uint8_t current_frame = 0xFF;
- // if(current_frame == frame){
- // // return;
- // }
- // uint8_t payload[2] = { ISSI_COMMANDREGISTER, frame };
- // i2c_transmit(ISSI_ADDR_DEFAULT | device << 1, payload, 2);
- // current_frame = frame;
-}
-
-void writeRegister8(uint8_t device, uint8_t frame, uint8_t reg, uint8_t data)
-{
- // Set the frame
- setFrame(device, frame);
-
- // Write to the register
- uint8_t payload[] = {
- ISSI_ADDR_DEFAULT | device << 1,
- reg,
- data
- };
- TWITransmitData(payload, sizeof(payload), 0, 1);
-}
-
-// void activateLED(uint8_t matrix, uint8_t cx, uint8_t cy, uint8_t pwm)
-// {
-// xprintf("activeLED: %02X %02X %02X %02X\n", matrix, cy, cx, pwm);
-// uint8_t x = cx - 1; // funciton takes 1 based counts, but we need 0...
-// uint8_t y = cy - 1; // creating them once for less confusion
-// if(pwm == 0){
-// cbi(control[matrix][y], x);
-// }else{
-// sbi(control[matrix][y], x);
-// }
-// uint8_t device = (matrix & 0x06) >> 1;
-// uint8_t control_reg = (y << 1) | (matrix & 0x01);
-// uint8_t pwm_reg = 0;
-// switch(matrix & 0x01){
-// case 0:
-// pwm_reg = 0x24;
-// break;
-// case 1:
-// pwm_reg = 0x2C;
-// break;
-// }
-// pwm_reg += (y << 4) + x;
-// xprintf(" device: %02X\n", device);
-// xprintf(" control: %02X %02X\n", control_reg, control[matrix][y]);
-// xprintf(" pwm: %02X %02X\n", pwm_reg, pwm);
-// writeRegister8(device, 0, control_reg, control[matrix][y]);
-// writeRegister8(device, 0, control_reg + 0x12, control[matrix][y]);
-// writeRegister8(device, 0, pwm_reg, pwm);
-// }
-
-void activateLED(uint8_t matrix, uint8_t cx, uint8_t cy, uint8_t pwm)
-{
- uint8_t device_addr = (matrix & 0x06) >> 1;
- ISSIDeviceStruct *device = issi_devices[device_addr];
- if(device == 0){
- return;
- }
- // xprintf("activeLED: %02X %02X %02X %02X\n", matrix, cy, cx, pwm);
- uint8_t x = cx - 1; // funciton takes 1 based counts, but we need 0...
- uint8_t y = cy - 1; // creating them once for less confusion
- uint8_t control_reg = (y << 1) | (matrix & 0x01);
- if(pwm == 0){
- cbi(device->led_ctrl[control_reg], x);
- cbi(device->led_blink_ctrl[control_reg], x);
- }else{
- sbi(device->led_ctrl[control_reg], x);
- sbi(device->led_blink_ctrl[control_reg], x);
- }
- uint8_t pwm_reg = 0;
- switch(matrix & 0x01){
- case 0:
- pwm_reg = 0x00;
- break;
- case 1:
- pwm_reg = 0x08;
- break;
- }
- pwm_reg += (y << 4) + x;
- // xprintf(" device_addr: %02X\n", device_addr);
- // xprintf(" control: %02X %02X\n", control_reg, control[matrix][y]);
- // xprintf(" pwm: %02X %02X\n", pwm_reg, pwm);
- // writeRegister8(device_addr, 0, control_reg, control[matrix][y]);
- device->led_pwm[pwm_reg] = pwm;
- device->led_dirty = 1;
-
- // writeRegister8(device_addr, 0, control_reg + 0x12, control[matrix][y]);
- // writeRegister8(device_addr, 0, pwm_reg, pwm);
-}
-
-void update_issi(uint8_t device_addr, uint8_t blocking)
-{
- // This seems to take about 6ms
- ISSIDeviceStruct *device = issi_devices[device_addr];
- if(device != 0){
- if(device->fn_dirty){
- device->fn_dirty = 0;
- setFrame(device_addr, ISSI_BANK_FUNCTIONREG);
- TWITransmitData(&device->fn_device_addr, sizeof(device->fn_registers) + 2, 0, 1);
- }
- if(device->led_dirty){
- device->led_dirty = 0;
- setFrame(device_addr, 0);
- TWITransmitData(&device->led_device_addr, 0xB6, 0, blocking);
- }
- }
-}
-
-void issi_init(void)
-{
- // Set LED_EN/SDB high to enable the chip
- xprintf("Enabing SDB on pin: %d\n", LED_EN_PIN);
- _SFR_IO8((LED_EN_PIN >> 4) + 1) &= ~_BV(LED_EN_PIN & 0xF); // IN
- _SFR_IO8((LED_EN_PIN >> 4) + 2) |= _BV(LED_EN_PIN & 0xF); // HI
- TWIInit();
- for(uint8_t device_addr = 0; device_addr < 4; device_addr++){
- xprintf("ISSI Init device: %d\n", device_addr);
- // If this device has been previously allocated, free it
- if(issi_devices[device_addr] != 0){
- free(issi_devices[device_addr]);
- }
- // Try to shutdown the device, if this fails skip this device
- writeRegister8(device_addr, ISSI_BANK_FUNCTIONREG, ISSI_REG_SHUTDOWN, 0x00);
- while (!isTWIReady()){_delay_us(1);}
- if(TWIInfo.errorCode != 0xFF){
- xprintf("ISSI init failed %d %02X %02X\n", device_addr, TWIInfo.mode, TWIInfo.errorCode);
- continue;
- }
- // Allocate the device structure - calloc zeros it for us
- ISSIDeviceStruct *device = (ISSIDeviceStruct *)calloc(sizeof(ISSIDeviceStruct) * 2, 1);
- issi_devices[device_addr] = device;
- device->fn_device_addr = ISSI_ADDR_DEFAULT | device_addr << 1;
- device->fn_register_addr = 0;
- device->led_device_addr = ISSI_ADDR_DEFAULT | device_addr << 1;
- device->led_register_addr = 0;
- // set dirty bits so that all of the buffered data is written out
- device->fn_dirty = 1;
- device->led_dirty = 1;
- update_issi(device_addr, 1);
- // Set the function register to picture mode
- // device->fn_reg[ISSI_REG_CONFIG] = ISSI_REG_CONFIG_PICTUREMODE;
- writeRegister8(device_addr, ISSI_BANK_FUNCTIONREG, ISSI_REG_SHUTDOWN, 0x01);
- }
-
- // Shutdown and set all registers to 0
- // writeRegister8(device_addr, ISSI_BANK_FUNCTIONREG, ISSI_REG_SHUTDOWN, 0x00);
- // for(uint8_t bank = 0; bank <= 7; bank++){
- // for (uint8_t reg = 0x00; reg <= 0xB3; reg++) {
- // writeRegister8(device_addr, bank, reg, 0x00);
- // }
- // }
- // for (uint8_t reg = 0; reg <= 0x0C; reg++) {
- // writeRegister8(device_addr, ISSI_BANK_FUNCTIONREG, reg, 0x00);
- // }
- // writeRegister8(device_addr, ISSI_BANK_FUNCTIONREG, ISSI_REG_CONFIG, ISSI_REG_CONFIG_PICTUREMODE);
- // writeRegister8(device_addr, ISSI_BANK_FUNCTIONREG, ISSI_REG_SHUTDOWN, 0x01);
- // picture mode
- // writeRegister8(ISSI_BANK_FUNCTIONREG, 0x01, 0x01);
-
- //Enable blink
- // writeRegister8(ISSI_BANK_FUNCTIONREG, 0x05, 0x48B);
-
- //Enable Breath
-
-}
-
-#endif
diff --git a/keyboards/woodkeys/meira/issi.h b/keyboards/woodkeys/meira/issi.h
deleted file mode 100755
index 74379ddbc8..0000000000
--- a/keyboards/woodkeys/meira/issi.h
+++ /dev/null
@@ -1,39 +0,0 @@
-#pragma once
-
-#ifdef ISSI_ENABLE
-
-typedef struct ISSIDeviceStruct{
- uint8_t fn_dirty; // function registers need to be resent
- uint8_t fn_device_addr;
- uint8_t fn_register_addr;
- uint8_t fn_registers[13];
- uint8_t led_dirty; // LED data has changed and needs to be resent
- uint8_t led_device_addr;
- uint8_t led_register_addr;
- uint8_t led_ctrl[18];
- uint8_t led_blink_ctrl[18];
- uint8_t led_pwm[144];
-}ISSIDeviceStruct;
-
-extern ISSIDeviceStruct *issi_devices[];
-
-// Low level commands- 'device' is the 2-bit i2c id.
-void issi_init(void);
-void set_shutdown(uint8_t device, uint8_t shutdown);
-void writeRegister8(uint8_t device, uint8_t frame, uint8_t reg, uint8_t data);
-
-// Higher level, no device is given, but it is calculated from 'matrix'
-// Each device has 2 blocks, max of 4 devices:
-// Device | Block = Matrix
-// 0 A 0
-// 0 B 1
-// 1 A 2
-// 1 B 3
-// 2 A 4
-// 2 B 5
-// 3 A 6
-// 3 B 7
-void activateLED(uint8_t matrix, uint8_t cx, uint8_t cy, uint8_t pwm);
-void update_issi(uint8_t device_addr, uint8_t blocking);
-
-#endif
diff --git a/keyboards/woodkeys/meira/keymaps/cole/keymap.c b/keyboards/woodkeys/meira/keymaps/cole/keymap.c
index b85da25a28..91a03d8861 100644
--- a/keyboards/woodkeys/meira/keymaps/cole/keymap.c
+++ b/keyboards/woodkeys/meira/keymaps/cole/keymap.c
@@ -14,7 +14,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include QMK_KEYBOARD_H
-#include "lighting.h"
#ifdef RGBLIGHT_ENABLE
//Following line allows macro to read current RGB settings
diff --git a/keyboards/woodkeys/meira/keymaps/default/keymap.c b/keyboards/woodkeys/meira/keymaps/default/keymap.c
index af3dca37a8..8aedffc675 100644
--- a/keyboards/woodkeys/meira/keymaps/default/keymap.c
+++ b/keyboards/woodkeys/meira/keymaps/default/keymap.c
@@ -14,7 +14,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include QMK_KEYBOARD_H
-#include "lighting.h"
#ifdef RGBLIGHT_ENABLE
// Following line allows macro to read current RGB settings
diff --git a/keyboards/woodkeys/meira/keymaps/grahampheath/keymap.c b/keyboards/woodkeys/meira/keymaps/grahampheath/keymap.c
index 8057bcf2b4..c95a3183b1 100644
--- a/keyboards/woodkeys/meira/keymaps/grahampheath/keymap.c
+++ b/keyboards/woodkeys/meira/keymaps/grahampheath/keymap.c
@@ -268,15 +268,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
return false;
break;
- case BL_TOGG:
-#ifdef ISSI_ENABLE
- if (record->event.pressed) {
- print("Enabling backlight\n");
- issi_init();
- }
-#endif
- return false;
- break;
case BL_STEP:
if (record->event.pressed) {
print("Stepping backlight\n");
diff --git a/keyboards/woodkeys/meira/keymaps/grahampheath/rules.mk b/keyboards/woodkeys/meira/keymaps/grahampheath/rules.mk
index 1c61fe1c12..c4e55a1a65 100644
--- a/keyboards/woodkeys/meira/keymaps/grahampheath/rules.mk
+++ b/keyboards/woodkeys/meira/keymaps/grahampheath/rules.mk
@@ -1,5 +1,3 @@
AUDIO_ENABLE = yes # Audio output on port C6
LTO_ENABLE = yes # -4-7k
MOUSEKEY_ENABLE = no # Mouse keys(-47kb)
-ISSI_ENABLE = no
-BACKLIGHT_ENABLE = no \ No newline at end of file
diff --git a/keyboards/woodkeys/meira/keymaps/takmiya/keymap.c b/keyboards/woodkeys/meira/keymaps/takmiya/keymap.c
index 8e3c41c332..cf1b2b8ce6 100644
--- a/keyboards/woodkeys/meira/keymaps/takmiya/keymap.c
+++ b/keyboards/woodkeys/meira/keymaps/takmiya/keymap.c
@@ -14,7 +14,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include QMK_KEYBOARD_H
-#include "lighting.h"
#ifdef RGBLIGHT_ENABLE
//Following line allows macro to read current RGB settings
@@ -189,15 +188,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
return false;
break;
- case BL_TOGG:
-#ifdef ISSI_ENABLE
- if (record->event.pressed) {
- print("Enabling backlight\n");
- issi_init();
- }
-#endif
- return false;
- break;
case BL_STEP:
if (record->event.pressed) {
print("Stepping backlight\n");
diff --git a/keyboards/woodkeys/meira/lighting.c b/keyboards/woodkeys/meira/lighting.c
deleted file mode 100755
index 6a17250a29..0000000000
--- a/keyboards/woodkeys/meira/lighting.c
+++ /dev/null
@@ -1,84 +0,0 @@
-#ifdef ISSI_ENABLE
-
-
-#include <avr/sfr_defs.h>
-#include <avr/timer_avr.h>
-#include <avr/wdt.h>
-#include "meira.h"
-#include "issi.h"
-#include "TWIlib.h"
-#include "lighting.h"
-#include "debug.h"
-#include "audio.h"
-
-
-const uint8_t backlight_pwm_map[BACKLIGHT_LEVELS] = BACKLIGHT_PWM_MAP;
-
- const uint8_t switch_matrices[] = {0, 1};
-
-void backlight_set(uint8_t level){
-#ifdef BACKLIGHT_ENABLE
- uint8_t pwm_value = 0;
- if(level >= BACKLIGHT_LEVELS){
- level = BACKLIGHT_LEVELS;
- }
- if(level > 0){
- pwm_value = backlight_pwm_map[level-1];
- }
- xprintf("BACKLIGHT_LEVELS: %d\n", BACKLIGHT_LEVELS);
- xprintf("backlight_set level: %d pwm: %d\n", level, pwm_value);
- for(int x = 1; x <= 9; x++){
- for(int y = 1; y <= 9; y++){
- activateLED(switch_matrices[0], x, y, pwm_value);
- activateLED(switch_matrices[1], x, y, pwm_value);
- }
- }
-#endif
-}
-
-
-
-void set_backlight_by_keymap(uint8_t col, uint8_t row){
-// dprintf("LED: %02X, %d %d %d\n", lookup_value, matrix, led_col, led_row);
-// activateLED(matrix, led_col, led_row, 255);
-}
-
-void force_issi_refresh(void){
- issi_devices[0]->led_dirty = true;
- update_issi(0, true);
- issi_devices[3]->led_dirty = true;
- update_issi(3, true);
-}
-
-void led_test(void){
-#ifdef WATCHDOG_ENABLE
- // This test take a long time to run, disable the WTD until its complete
- wdt_disable();
-#endif
- backlight_set(0);
- force_issi_refresh();
-// for(uint8_t x = 0; x < sizeof(rgb_sequence); x++){
-// set_rgb(rgb_sequence[x], 255, 0, 0);
-// force_issi_refresh();
-// _delay_ms(250);
-// set_rgb(rgb_sequence[x], 0, 255, 0);
-// force_issi_refresh();
-// _delay_ms(250);
-// set_rgb(rgb_sequence[x], 0, 0, 255);
-// force_issi_refresh();
-// _delay_ms(250);
-// set_rgb(rgb_sequence[x], 0, 0, 0);
-// force_issi_refresh();
-// }
-#ifdef WATCHDOG_ENABLE
- wdt_enable(WDTO_250MS);
-#endif
-}
-
-void backlight_init_ports(void){
- xprintf("backlight_init_ports\n");
- issi_init();
-}
-
-#endif
-
diff --git a/keyboards/woodkeys/meira/lighting.h b/keyboards/woodkeys/meira/lighting.h
deleted file mode 100755
index 42fee8ac92..0000000000
--- a/keyboards/woodkeys/meira/lighting.h
+++ /dev/null
@@ -1,6 +0,0 @@
-#pragma once
-
-void led_test(void);
-void force_issi_refresh(void);
-void set_backlight(uint8_t level);
-void set_backlight_by_keymap(uint8_t col, uint8_t row);
diff --git a/keyboards/woodkeys/meira/matrix.c b/keyboards/woodkeys/meira/matrix.c
index 145750a418..e08782dd40 100644
--- a/keyboards/woodkeys/meira/matrix.c
+++ b/keyboards/woodkeys/meira/matrix.c
@@ -19,18 +19,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/*
* scan matrix
*/
-#include <stdint.h>
-#include <stdbool.h>
-#if defined(__AVR__)
-#include <avr/io.h>
-#endif
+#include "matrix.h"
#include "meira.h"
#include "wait.h"
#include "print.h"
#include "debug.h"
-#include "util.h"
-#include "matrix.h"
-#include "config.h"
#include "timer.h"
#ifndef DEBOUNCE
diff --git a/keyboards/woodkeys/meira/meira.c b/keyboards/woodkeys/meira/meira.c
index 1f4c2557b0..cca87a1b51 100644
--- a/keyboards/woodkeys/meira/meira.c
+++ b/keyboards/woodkeys/meira/meira.c
@@ -14,24 +14,12 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "meira.h"
-#include "issi.h"
-#include "TWIlib.h"
-#include "lighting.h"
-#include "quantum.h"
-
-extern void backlight_set(uint8_t level);
void matrix_init_kb(void)
{
debug_enable=true;
print("meira matrix_init_kb\n");
-#ifdef ISSI_ENABLE
- issi_init();
-#endif
-#ifdef BACKLIGHT_ENABLE
- backlight_set(5);
-#endif
#ifdef WATCHDOG_ENABLE
// This is done after turning the layer LED red, if we're caught in a loop
// we should get a flashing red light
@@ -48,30 +36,6 @@ void matrix_scan_kb(void)
#ifdef WATCHDOG_ENABLE
wdt_reset();
#endif
-#ifdef ISSI_ENABLE
- // switch/underglow lighting update
- static uint32_t issi_device = 0;
- static uint32_t twi_last_ready = 0;
- if(twi_last_ready > 1000){
- // Its been way too long since the last ISSI update, reset the I2C bus and start again
- xprintf("TWI failed to recover, TWI re-init\n");
- twi_last_ready = 0;
- TWIInit();
- force_issi_refresh();
- }
- if(isTWIReady()){
- twi_last_ready = 0;
- // If the i2c bus is available, kick off the issi update, alternate between devices
- update_issi(issi_device, issi_device);
- if(issi_device){
- issi_device = 0;
- }else{
- issi_device = 3;
- }
- }else{
- twi_last_ready++;
- }
-#endif
matrix_scan_user();
}
@@ -80,9 +44,8 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
// set_backlight_by_keymap(record->event.key.col, record->event.key.row);
if (keycode == QK_BOOT) {
reset_keyboard_kb();
- } else {
}
- return process_record_user(keycode, record);
+ return process_record_user(keycode, record);
}
void reset_keyboard_kb(void){
diff --git a/keyboards/woodkeys/meira/meira.h b/keyboards/woodkeys/meira/meira.h
index 46d9791e48..cdf5b5adbe 100644
--- a/keyboards/woodkeys/meira/meira.h
+++ b/keyboards/woodkeys/meira/meira.h
@@ -16,6 +16,5 @@
#pragma once
#include "quantum.h"
-#include "issi.h"
void reset_keyboard_kb(void);
diff --git a/keyboards/woodkeys/meira/post_rules.mk b/keyboards/woodkeys/meira/post_rules.mk
deleted file mode 100644
index 5d85581c6e..0000000000
--- a/keyboards/woodkeys/meira/post_rules.mk
+++ /dev/null
@@ -1,9 +0,0 @@
-SRC += matrix.c TWIlib.c issi.c lighting.c
-
-#ifeq ($(strip $(ISSI_ENABLE)), yes)
-# OPT_DEFS += -DISSI_ENABLE
-#endif
-
-#ifeq ($(strip $(WATCHDOG_ENABLE)), yes)
-# OPT_DEFS += -DWATCHDOG_ENABLE
-#endif
diff --git a/keyboards/woodkeys/meira/promicro/config.h b/keyboards/woodkeys/meira/promicro/config.h
index 6c52f0fd11..6fda5d7ab3 100644
--- a/keyboards/woodkeys/meira/promicro/config.h
+++ b/keyboards/woodkeys/meira/promicro/config.h
@@ -33,8 +33,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MATRIX_COL_PINS { B1, B3, B2, B6, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN }
#define MATRIX_COL_PINS_SCANNED { B1, B3, B2, B6 }
-#define LED_EN_PIN D2
-
/*
* Feature disable options
* These options are also useful to firmware size reduction.
diff --git a/keyboards/woodkeys/meira/rules.mk b/keyboards/woodkeys/meira/rules.mk
index 63586244c0..bad7949ec0 100644
--- a/keyboards/woodkeys/meira/rules.mk
+++ b/keyboards/woodkeys/meira/rules.mk
@@ -7,11 +7,11 @@ EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE = no # Console for debug
COMMAND_ENABLE = no # Commands for debug and configuration
NKRO_ENABLE = no # Enable N-Key Rollover
-BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality, also set ISSI_ENABLE below for Meira
-ISSI_ENABLE = yes # If the I2C pullup resistors aren't install this must be disabled
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
AUDIO_ENABLE = no # Audio output
CUSTOM_MATRIX = yes
+SRC += matrix.c
DEFAULT_FOLDER = woodkeys/meira/promicro
diff --git a/keyboards/work_louder/rgb_functions.c b/keyboards/work_louder/rgb_functions.c
index 138779465e..b4d1a2ad72 100644
--- a/keyboards/work_louder/rgb_functions.c
+++ b/keyboards/work_louder/rgb_functions.c
@@ -24,7 +24,7 @@
#include "ws2812_bitbang.c"
-void rgblight_call_driver(LED_TYPE *start_led, uint8_t num_leds) {
+void rgblight_call_driver(rgb_led_t *start_led, uint8_t num_leds) {
ws2812_setleds(start_led, num_leds);
}
#endif
diff --git a/keyboards/xbows/knight/config.h b/keyboards/xbows/knight/config.h
index 0875283a78..c38628fef1 100644
--- a/keyboards/xbows/knight/config.h
+++ b/keyboards/xbows/knight/config.h
@@ -47,10 +47,10 @@
# define ENABLE_RGB_MATRIX_SPLASH // Full gradient & value pulse away from a single key hit then fades value out
# define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH // Hue & value pulse away from multiple key hits then fades value out
-# define DRIVER_ADDR_1 0b1110100
-# define DRIVER_ADDR_2 0b1110110
-# define DRIVER_ADDR_3 0b1110101
-# define DRIVER_COUNT 3
+# define DRIVER_ADDR_1 IS31FL3731_I2C_ADDRESS_GND
+# define DRIVER_ADDR_2 IS31FL3731_I2C_ADDRESS_SDA
+# define DRIVER_ADDR_3 IS31FL3731_I2C_ADDRESS_SCL
+# define IS31FL3731_DRIVER_COUNT 3
# define DRIVER_1_LED_TOTAL 36
# define DRIVER_2_LED_TOTAL 35
# define DRIVER_3_LED_TOTAL 15
diff --git a/keyboards/xbows/knight/knight.c b/keyboards/xbows/knight/knight.c
index 5be49f9d6f..05ff84060c 100644
--- a/keyboards/xbows/knight/knight.c
+++ b/keyboards/xbows/knight/knight.c
@@ -15,7 +15,7 @@
*/
#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
- const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+ const is31fl3731_led_t PROGMEM g_is31fl3731_leds[RGB_MATRIX_LED_COUNT] = {
{0, C1_3, C2_3, C3_3}, // L01
{0, C1_4, C2_4, C3_4}, // L02
diff --git a/keyboards/xbows/knight_plus/config.h b/keyboards/xbows/knight_plus/config.h
index f8ec6d273b..7a26ca9944 100644
--- a/keyboards/xbows/knight_plus/config.h
+++ b/keyboards/xbows/knight_plus/config.h
@@ -47,10 +47,10 @@
# define ENABLE_RGB_MATRIX_SPLASH // Full gradient & value pulse away from a single key hit then fades value out
# define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH // Hue & value pulse away from multiple key hits then fades value out
-# define DRIVER_ADDR_1 0b1110100
-# define DRIVER_ADDR_2 0b1110110
-# define DRIVER_ADDR_3 0b1110101
-# define DRIVER_COUNT 3
+# define DRIVER_ADDR_1 IS31FL3731_I2C_ADDRESS_GND
+# define DRIVER_ADDR_2 IS31FL3731_I2C_ADDRESS_SDA
+# define DRIVER_ADDR_3 IS31FL3731_I2C_ADDRESS_SCL
+# define IS31FL3731_DRIVER_COUNT 3
# define DRIVER_1_LED_TOTAL 36
# define DRIVER_2_LED_TOTAL 35
# define DRIVER_3_LED_TOTAL 15
diff --git a/keyboards/xbows/knight_plus/knight_plus.c b/keyboards/xbows/knight_plus/knight_plus.c
index ce718d22a5..b84f6b964b 100644
--- a/keyboards/xbows/knight_plus/knight_plus.c
+++ b/keyboards/xbows/knight_plus/knight_plus.c
@@ -15,7 +15,7 @@
*/
#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
- const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+ const is31fl3731_led_t PROGMEM g_is31fl3731_leds[RGB_MATRIX_LED_COUNT] = {
{0, C1_3, C2_3, C3_3}, // L01
{0, C1_4, C2_4, C3_4}, // L02
diff --git a/keyboards/xbows/nature/config.h b/keyboards/xbows/nature/config.h
index be7fbeaa64..f408d62699 100644
--- a/keyboards/xbows/nature/config.h
+++ b/keyboards/xbows/nature/config.h
@@ -49,10 +49,10 @@
# define ENABLE_RGB_MATRIX_SPLASH // Full gradient & value pulse away from a single key hit then fades value out
# define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH // Hue & value pulse away from multiple key hits then fades value out
-# define DRIVER_ADDR_1 0b1110100
-# define DRIVER_ADDR_2 0b1110110
-# define DRIVER_ADDR_3 0b1110101
-# define DRIVER_COUNT 3
+# define DRIVER_ADDR_1 IS31FL3731_I2C_ADDRESS_GND
+# define DRIVER_ADDR_2 IS31FL3731_I2C_ADDRESS_SDA
+# define DRIVER_ADDR_3 IS31FL3731_I2C_ADDRESS_SCL
+# define IS31FL3731_DRIVER_COUNT 3
# define DRIVER_1_LED_TOTAL 36
# define DRIVER_2_LED_TOTAL 36
# define DRIVER_3_LED_TOTAL 15
diff --git a/keyboards/xbows/nature/nature.c b/keyboards/xbows/nature/nature.c
index da0cb54a60..1ba964e453 100644
--- a/keyboards/xbows/nature/nature.c
+++ b/keyboards/xbows/nature/nature.c
@@ -15,7 +15,7 @@
*/
#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
- const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+ const is31fl3731_led_t PROGMEM g_is31fl3731_leds[RGB_MATRIX_LED_COUNT] = {
{0, C1_3, C2_3, C3_3}, // L01
{0, C1_4, C2_4, C3_4}, // L02
diff --git a/keyboards/xbows/numpad/config.h b/keyboards/xbows/numpad/config.h
index 1276efe191..d0c5d88491 100644
--- a/keyboards/xbows/numpad/config.h
+++ b/keyboards/xbows/numpad/config.h
@@ -47,7 +47,7 @@
# define ENABLE_RGB_MATRIX_SPLASH // Full gradient & value pulse away from a single key hit then fades value out
# define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH // Hue & value pulse away from multiple key hits then fades value out
-# define DRIVER_ADDR_1 0b1110111
-# define DRIVER_COUNT 1
+# define DRIVER_ADDR_1 IS31FL3731_I2C_ADDRESS_VCC
+# define IS31FL3731_DRIVER_COUNT 1
# define RGB_MATRIX_LED_COUNT 22
#endif
diff --git a/keyboards/xbows/numpad/numpad.c b/keyboards/xbows/numpad/numpad.c
index da20172f34..519a1b36f4 100644
--- a/keyboards/xbows/numpad/numpad.c
+++ b/keyboards/xbows/numpad/numpad.c
@@ -15,7 +15,7 @@
*/
#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
- const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+ const is31fl3731_led_t PROGMEM g_is31fl3731_leds[RGB_MATRIX_LED_COUNT] = {
{0, C3_3, C2_3, C1_3}, // L01
{0, C3_4, C2_4, C1_4}, // L02
diff --git a/keyboards/xbows/ranger/config.h b/keyboards/xbows/ranger/config.h
index 68c8227da0..81d9737449 100644
--- a/keyboards/xbows/ranger/config.h
+++ b/keyboards/xbows/ranger/config.h
@@ -46,10 +46,10 @@
# define ENABLE_RGB_MATRIX_SPLASH // Full gradient & value pulse away from a single key hit then fades value out
# define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH // Hue & value pulse away from multiple key hits then fades value out
-# define DRIVER_ADDR_1 0b1110100
-# define DRIVER_ADDR_2 0b1110101
-# define DRIVER_ADDR_3 0b1110110
-# define DRIVER_COUNT 3
+# define DRIVER_ADDR_1 IS31FL3731_I2C_ADDRESS_GND
+# define DRIVER_ADDR_2 IS31FL3731_I2C_ADDRESS_SCL
+# define DRIVER_ADDR_3 IS31FL3731_I2C_ADDRESS_SDA
+# define IS31FL3731_DRIVER_COUNT 3
# define DRIVER_1_LED_TOTAL 36
# define DRIVER_2_LED_TOTAL 36
# define DRIVER_3_LED_TOTAL 15
diff --git a/keyboards/xbows/ranger/ranger.c b/keyboards/xbows/ranger/ranger.c
index 4ae55e7d68..028b5fca5c 100644
--- a/keyboards/xbows/ranger/ranger.c
+++ b/keyboards/xbows/ranger/ranger.c
@@ -17,7 +17,7 @@
#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3731_led_t PROGMEM g_is31fl3731_leds[RGB_MATRIX_LED_COUNT] = {
{0, C3_3, C2_3, C1_3}, // L01
{0, C3_4, C2_4, C1_4}, // L02
diff --git a/keyboards/xbows/woody/config.h b/keyboards/xbows/woody/config.h
index bfdbcce8c2..4b6ea9f70a 100644
--- a/keyboards/xbows/woody/config.h
+++ b/keyboards/xbows/woody/config.h
@@ -56,9 +56,9 @@
// # define ENABLE_RGB_MATRIX_SOLID_SPLASH
// # define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
-# define DRIVER_ADDR_1 0b1110100
-# define DRIVER_ADDR_2 0b1110110
-# define DRIVER_COUNT 2
+# define DRIVER_ADDR_1 IS31FL3731_I2C_ADDRESS_GND
+# define DRIVER_ADDR_2 IS31FL3731_I2C_ADDRESS_SDA
+# define IS31FL3731_DRIVER_COUNT 2
# define DRIVER_1_LED_TOTAL 35
# define DRIVER_2_LED_TOTAL 32
# define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
diff --git a/keyboards/xbows/woody/woody.c b/keyboards/xbows/woody/woody.c
index fa0ba7f768..e58ec15e10 100644
--- a/keyboards/xbows/woody/woody.c
+++ b/keyboards/xbows/woody/woody.c
@@ -1,6 +1,6 @@
#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3731_led_t PROGMEM g_is31fl3731_leds[RGB_MATRIX_LED_COUNT] = {
{0, C8_8, C7_8, C6_8}, // LA17
{0, C9_8, C7_7, C6_7}, // LA16
diff --git a/keyboards/xelus/dawn60/rev1/config.h b/keyboards/xelus/dawn60/rev1/config.h
index d3b505447a..b895890388 100644
--- a/keyboards/xelus/dawn60/rev1/config.h
+++ b/keyboards/xelus/dawn60/rev1/config.h
@@ -16,7 +16,7 @@
#pragma once
// IS31FL3731 driver
-#define DRIVER_COUNT 2
+#define IS31FL3731_DRIVER_COUNT 2
#define RGB_MATRIX_LED_COUNT 64
// Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap
diff --git a/keyboards/xelus/dawn60/rev1/rules.mk b/keyboards/xelus/dawn60/rev1/rules.mk
index d4e70bfbec..0a72a60eca 100644
--- a/keyboards/xelus/dawn60/rev1/rules.mk
+++ b/keyboards/xelus/dawn60/rev1/rules.mk
@@ -26,4 +26,4 @@ SRC += keyboards/wilba_tech/wt_main.c \
quantum/color.c \
drivers/led/issi/is31fl3731.c
-QUANTUM_LIB_SRC += i2c_master.c
+I2C_DRIVER_REQUIRED = yes
diff --git a/keyboards/xelus/dawn60/rev1_qmk/config.h b/keyboards/xelus/dawn60/rev1_qmk/config.h
index ad399bd962..9958f8c2bb 100644
--- a/keyboards/xelus/dawn60/rev1_qmk/config.h
+++ b/keyboards/xelus/dawn60/rev1_qmk/config.h
@@ -24,10 +24,10 @@
#define WS2812_LED_TOTAL 20
//RGB Matrix defines
-#define DRIVER_ADDR_1 0x74
-#define DRIVER_ADDR_2 0x76
+#define DRIVER_ADDR_1 IS31FL3731_I2C_ADDRESS_GND
+#define DRIVER_ADDR_2 IS31FL3731_I2C_ADDRESS_SDA
-#define DRIVER_COUNT 2
+#define IS31FL3731_DRIVER_COUNT 2
#define DRIVER_1_LED_TOTAL 32
#define DRIVER_2_LED_TOTAL 32
#define ISSI_DRIVER_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
diff --git a/keyboards/xelus/dawn60/rev1_qmk/rev1_qmk.c b/keyboards/xelus/dawn60/rev1_qmk/rev1_qmk.c
index 7b77807326..0c6e0c12e3 100644
--- a/keyboards/xelus/dawn60/rev1_qmk/rev1_qmk.c
+++ b/keyboards/xelus/dawn60/rev1_qmk/rev1_qmk.c
@@ -23,9 +23,9 @@
#include "ws2812.h"
#ifdef RGB_MATRIX_ENABLE
-LED_TYPE rgb_matrix_ws2812_array[WS2812_LED_TOTAL];
+rgb_led_t rgb_matrix_ws2812_array[WS2812_LED_TOTAL];
-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/keyboards/xelus/dawn60/rev1_qmk/rules.mk b/keyboards/xelus/dawn60/rev1_qmk/rules.mk
index 4a799710d2..edb15fa760 100644
--- a/keyboards/xelus/dawn60/rev1_qmk/rules.mk
+++ b/keyboards/xelus/dawn60/rev1_qmk/rules.mk
@@ -25,6 +25,6 @@ COMMON_VPATH += $(DRIVER_PATH)/issi
# project specific files
SRC += drivers/led/issi/is31fl3731.c
-QUANTUM_LIB_SRC += i2c_master.c
+I2C_DRIVER_REQUIRED = yes
LTO_ENABLE = yes
diff --git a/keyboards/xelus/kangaroo/rev1/info.json b/keyboards/xelus/kangaroo/rev1/info.json
index ca5fa293e9..f40d455b9f 100644
--- a/keyboards/xelus/kangaroo/rev1/info.json
+++ b/keyboards/xelus/kangaroo/rev1/info.json
@@ -8,6 +8,9 @@
"rows": ["A9", "A8", "B15", "B14", "B13", "B12", "A4", "A5", "A6", "A7", "B0", "B1"]
},
"diode_direction": "COL2ROW",
+ "eeprom": {
+ "driver": "i2c"
+ },
"processor": "STM32F072",
"bootloader": "stm32-dfu"
}
diff --git a/keyboards/xelus/kangaroo/rev1/rules.mk b/keyboards/xelus/kangaroo/rev1/rules.mk
index a6006b7150..80aff9822d 100644
--- a/keyboards/xelus/kangaroo/rev1/rules.mk
+++ b/keyboards/xelus/kangaroo/rev1/rules.mk
@@ -9,5 +9,3 @@ COMMAND_ENABLE = yes # Commands for debug and configuration
NKRO_ENABLE = yes # Enable N-Key Rollover
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
AUDIO_ENABLE = no # Audio output
-EEPROM_DRIVER = i2c
-
diff --git a/keyboards/xelus/kangaroo/rev2/config.h b/keyboards/xelus/kangaroo/rev2/config.h
index 790db9b30a..dfe8035b10 100644
--- a/keyboards/xelus/kangaroo/rev2/config.h
+++ b/keyboards/xelus/kangaroo/rev2/config.h
@@ -20,6 +20,3 @@
#define LOCKING_SUPPORT_ENABLE
/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE
-
-#define WEAR_LEVELING_LOGICAL_SIZE 2048
-#define WEAR_LEVELING_BACKING_SIZE WEAR_LEVELING_LOGICAL_SIZE*2
diff --git a/keyboards/xelus/kangaroo/rev2/info.json b/keyboards/xelus/kangaroo/rev2/info.json
index 196f11860b..9e639df034 100644
--- a/keyboards/xelus/kangaroo/rev2/info.json
+++ b/keyboards/xelus/kangaroo/rev2/info.json
@@ -8,6 +8,11 @@
"rows": ["A9", "A8", "B15", "B14", "B13", "B12", "A4", "A5", "A6", "A7", "B0", "B1"]
},
"diode_direction": "COL2ROW",
+ "eeprom": {
+ "wear_leveling": {
+ "backing_size": 4096
+ }
+ },
"processor": "STM32L412",
"bootloader": "stm32-dfu"
}
diff --git a/keyboards/xelus/kangaroo/rev2/rules.mk b/keyboards/xelus/kangaroo/rev2/rules.mk
index 613adf3a22..80aff9822d 100644
--- a/keyboards/xelus/kangaroo/rev2/rules.mk
+++ b/keyboards/xelus/kangaroo/rev2/rules.mk
@@ -9,8 +9,3 @@ COMMAND_ENABLE = yes # Commands for debug and configuration
NKRO_ENABLE = yes # Enable N-Key Rollover
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
AUDIO_ENABLE = no # Audio output
-EEPROM_DRIVER = i2c
-
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = embedded_flash
-
diff --git a/keyboards/xelus/pachi/rgb/rev1/config.h b/keyboards/xelus/pachi/rgb/rev1/config.h
index 1007f5b3de..882f2a7e36 100644
--- a/keyboards/xelus/pachi/rgb/rev1/config.h
+++ b/keyboards/xelus/pachi/rgb/rev1/config.h
@@ -40,9 +40,9 @@
#define DYNAMIC_KEYMAP_EEPROM_MAX_ADDR 8191
// RGB Matrix defines
-#define DRIVER_ADDR_1 0b0110000
+#define DRIVER_ADDR_1 IS31FL3741_I2C_ADDRESS_GND
-#define DRIVER_COUNT 1
+#define IS31FL3741_DRIVER_COUNT 1
#define DRIVER_1_LED_TOTAL 117
#define RGB_MATRIX_LED_COUNT DRIVER_1_LED_TOTAL
#define ISSI_DRIVER_TOTAL RGB_MATRIX_LED_COUNT
diff --git a/keyboards/xelus/pachi/rgb/rev1/info.json b/keyboards/xelus/pachi/rgb/rev1/info.json
index 90ab8c19ef..092021b23a 100644
--- a/keyboards/xelus/pachi/rgb/rev1/info.json
+++ b/keyboards/xelus/pachi/rgb/rev1/info.json
@@ -17,6 +17,9 @@
"rows": ["B14", "B13", "B12", "B2", "A8", "B15"]
},
"diode_direction": "COL2ROW",
+ "eeprom": {
+ "driver": "i2c"
+ },
"processor": "STM32L422",
"bootloader": "stm32-dfu",
"layout_aliases": {
diff --git a/keyboards/xelus/pachi/rgb/rev1/rev1.c b/keyboards/xelus/pachi/rgb/rev1/rev1.c
index 156c5228da..a59d085f25 100644
--- a/keyboards/xelus/pachi/rgb/rev1/rev1.c
+++ b/keyboards/xelus/pachi/rgb/rev1/rev1.c
@@ -22,7 +22,7 @@ void matrix_io_delay(void) { __asm__ volatile("nop\nnop\nnop\n"); }
#ifdef RGB_MATRIX_ENABLE
#include "i2c_master.h"
#include "drivers/led/issi/is31fl3741.h"
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3741_led_t PROGMEM g_is31fl3741_leds[RGB_MATRIX_LED_COUNT] = {
/* Refer to IS31 manual for these locations
* driver
* | R location
diff --git a/keyboards/xelus/pachi/rgb/rev1/rules.mk b/keyboards/xelus/pachi/rgb/rev1/rules.mk
index cec6f3c13d..4c27f45008 100644
--- a/keyboards/xelus/pachi/rgb/rev1/rules.mk
+++ b/keyboards/xelus/pachi/rgb/rev1/rules.mk
@@ -11,8 +11,6 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
AUDIO_ENABLE = no # Audio output
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
-EEPROM_DRIVER = i2c
-
RGB_MATRIX_ENABLE = yes
COMMON_VPATH += $(DRIVER_PATH)/issi
diff --git a/keyboards/xelus/pachi/rgb/rev2/config.h b/keyboards/xelus/pachi/rgb/rev2/config.h
index a11aa27d3b..826e8f869e 100644
--- a/keyboards/xelus/pachi/rgb/rev2/config.h
+++ b/keyboards/xelus/pachi/rgb/rev2/config.h
@@ -37,9 +37,9 @@
#define EEPROM_I2C_24LC64
// RGB Matrix defines
-#define DRIVER_ADDR_1 0b0110000
+#define DRIVER_ADDR_1 IS31FL3741_I2C_ADDRESS_GND
-#define DRIVER_COUNT 1
+#define IS31FL3741_DRIVER_COUNT 1
#define DRIVER_1_LED_TOTAL 117
#define RGB_MATRIX_LED_COUNT DRIVER_1_LED_TOTAL
#define ISSI_DRIVER_TOTAL RGB_MATRIX_LED_COUNT
diff --git a/keyboards/xelus/pachi/rgb/rev2/info.json b/keyboards/xelus/pachi/rgb/rev2/info.json
index 64aa3172c0..e0b5dc7d1a 100644
--- a/keyboards/xelus/pachi/rgb/rev2/info.json
+++ b/keyboards/xelus/pachi/rgb/rev2/info.json
@@ -16,6 +16,9 @@
"rows": ["A5", "A6", "B0", "A7", "A8", "B1", "B4", "B5", "A15", "B3", "A13", "A14"]
},
"diode_direction": "COL2ROW",
+ "eeprom": {
+ "driver": "i2c"
+ },
"processor": "STM32L422",
"bootloader": "stm32-dfu",
"layout_aliases": {
diff --git a/keyboards/xelus/pachi/rgb/rev2/rev2.c b/keyboards/xelus/pachi/rgb/rev2/rev2.c
index d7c74730f8..7ca3c6f9f6 100644
--- a/keyboards/xelus/pachi/rgb/rev2/rev2.c
+++ b/keyboards/xelus/pachi/rgb/rev2/rev2.c
@@ -22,7 +22,7 @@ void matrix_io_delay(void) { __asm__ volatile("nop\nnop\nnop\n"); }
#ifdef RGB_MATRIX_ENABLE
#include "i2c_master.h"
#include "drivers/led/issi/is31fl3741.h"
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3741_led_t PROGMEM g_is31fl3741_leds[RGB_MATRIX_LED_COUNT] = {
/* Refer to IS31 manual for these locations
* driver
* | R location
diff --git a/keyboards/xelus/pachi/rgb/rev2/rules.mk b/keyboards/xelus/pachi/rgb/rev2/rules.mk
index d5c0eee734..62bb12bfb0 100644
--- a/keyboards/xelus/pachi/rgb/rev2/rules.mk
+++ b/keyboards/xelus/pachi/rgb/rev2/rules.mk
@@ -10,8 +10,6 @@ NKRO_ENABLE = yes # Enable N-Key Rollover
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
AUDIO_ENABLE = no # Audio output
-EEPROM_DRIVER = i2c
-
RGB_MATRIX_ENABLE = yes
COMMON_VPATH += $(DRIVER_PATH)/issi
diff --git a/keyboards/xelus/rs108/info.json b/keyboards/xelus/rs108/info.json
index fd2358d68d..0342177e64 100644
--- a/keyboards/xelus/rs108/info.json
+++ b/keyboards/xelus/rs108/info.json
@@ -14,6 +14,9 @@
"rows": ["B5", "B6", "B7", "A1", "A0", "C13", "B0", "A7", "A5", "A4", "A3", "A2"]
},
"diode_direction": "COL2ROW",
+ "eeprom": {
+ "driver": "i2c"
+ },
"indicators": {
"caps_lock": "A6",
"num_lock": "A14",
diff --git a/keyboards/xelus/rs108/rules.mk b/keyboards/xelus/rs108/rules.mk
index 612c1d666a..b763de52c7 100644
--- a/keyboards/xelus/rs108/rules.mk
+++ b/keyboards/xelus/rs108/rules.mk
@@ -11,8 +11,6 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
AUDIO_ENABLE = no # Audio output
-EEPROM_DRIVER = i2c
-
# Save hid interface
KEYBOARD_SHARED_EP = yes
diff --git a/keyboards/xelus/rs60/rev2_0/info.json b/keyboards/xelus/rs60/rev2_0/info.json
index ac976a4cb4..499a5a922f 100644
--- a/keyboards/xelus/rs60/rev2_0/info.json
+++ b/keyboards/xelus/rs60/rev2_0/info.json
@@ -8,6 +8,9 @@
"rows": ["B15", "B14", "B12", "B1", "B0"]
},
"diode_direction": "COL2ROW",
+ "eeprom": {
+ "driver": "i2c"
+ },
"indicators": {
"caps_lock": "A1"
},
diff --git a/keyboards/xelus/rs60/rev2_0/rules.mk b/keyboards/xelus/rs60/rev2_0/rules.mk
index 965f4edaef..b763de52c7 100644
--- a/keyboards/xelus/rs60/rev2_0/rules.mk
+++ b/keyboards/xelus/rs60/rev2_0/rules.mk
@@ -10,7 +10,6 @@ NKRO_ENABLE = yes # Enable N-Key Rollover
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
AUDIO_ENABLE = no # Audio output
-EEPROM_DRIVER = i2c
# Save hid interface
KEYBOARD_SHARED_EP = yes
diff --git a/keyboards/xelus/rs60/rev2_1/config.h b/keyboards/xelus/rs60/rev2_1/config.h
index 1c5fe4a336..430a5a47f7 100644
--- a/keyboards/xelus/rs60/rev2_1/config.h
+++ b/keyboards/xelus/rs60/rev2_1/config.h
@@ -21,6 +21,3 @@
// Locking resynchronize hack
#define LOCKING_RESYNC_ENABLE
-// Emulated EEPROM
-#define WEAR_LEVELING_LOGICAL_SIZE 2048
-#define WEAR_LEVELING_BACKING_SIZE WEAR_LEVELING_LOGICAL_SIZE*2
diff --git a/keyboards/xelus/rs60/rev2_1/info.json b/keyboards/xelus/rs60/rev2_1/info.json
index 118a671547..fe87561e61 100644
--- a/keyboards/xelus/rs60/rev2_1/info.json
+++ b/keyboards/xelus/rs60/rev2_1/info.json
@@ -8,6 +8,11 @@
"rows": ["B15", "B14", "B12", "B1", "B0"]
},
"diode_direction": "COL2ROW",
+ "eeprom": {
+ "wear_leveling": {
+ "backing_size": 4096
+ }
+ },
"indicators": {
"caps_lock": "A1",
"on_state": 0
diff --git a/keyboards/xelus/rs60/rev2_1/rules.mk b/keyboards/xelus/rs60/rev2_1/rules.mk
index 9eeaa8553b..b763de52c7 100644
--- a/keyboards/xelus/rs60/rev2_1/rules.mk
+++ b/keyboards/xelus/rs60/rev2_1/rules.mk
@@ -11,9 +11,6 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
AUDIO_ENABLE = no # Audio output
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = embedded_flash
-
# Save hid interface
KEYBOARD_SHARED_EP = yes
diff --git a/keyboards/xelus/valor/rev2/info.json b/keyboards/xelus/valor/rev2/info.json
index cdb3bb9947..c082afbca2 100644
--- a/keyboards/xelus/valor/rev2/info.json
+++ b/keyboards/xelus/valor/rev2/info.json
@@ -20,6 +20,9 @@
"rows": ["B11", "B10", "A3", "A1", "A2"]
},
"diode_direction": "COL2ROW",
+ "eeprom": {
+ "driver": "i2c"
+ },
"processor": "STM32L422",
"bootloader": "stm32-dfu",
"community_layouts": ["alice", "alice_split_bs"],
diff --git a/keyboards/xelus/valor/rev2/rules.mk b/keyboards/xelus/valor/rev2/rules.mk
index e0caab1474..7fd72e35e7 100644
--- a/keyboards/xelus/valor/rev2/rules.mk
+++ b/keyboards/xelus/valor/rev2/rules.mk
@@ -12,7 +12,6 @@ RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
AUDIO_ENABLE = no # Audio output
RGB_MATRIX_ENABLE = yes
RGB_MATRIX_CUSTOM_KB = yes
-EEPROM_DRIVER = i2c
OPT = 2
LTO_ENABLE = yes
diff --git a/keyboards/xelus/valor_frl_tkl/rev1/info.json b/keyboards/xelus/valor_frl_tkl/rev1/info.json
index 838396caaf..4816a9a3a5 100644
--- a/keyboards/xelus/valor_frl_tkl/rev1/info.json
+++ b/keyboards/xelus/valor_frl_tkl/rev1/info.json
@@ -8,6 +8,9 @@
"rows": ["A15", "A14", "A1", "B3", "B4"]
},
"diode_direction": "COL2ROW",
+ "eeprom": {
+ "driver": "i2c"
+ },
"processor": "STM32F072",
"bootloader": "stm32-dfu"
}
diff --git a/keyboards/xelus/valor_frl_tkl/rev1/rules.mk b/keyboards/xelus/valor_frl_tkl/rev1/rules.mk
index efbd7d0e9b..5356b24d77 100644
--- a/keyboards/xelus/valor_frl_tkl/rev1/rules.mk
+++ b/keyboards/xelus/valor_frl_tkl/rev1/rules.mk
@@ -10,6 +10,3 @@ NKRO_ENABLE = yes # Enable N-Key Rollover
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
AUDIO_ENABLE = no # Audio output
-
-EEPROM_DRIVER = i2c
-
diff --git a/keyboards/xelus/xs108/info.json b/keyboards/xelus/xs108/info.json
index ab9bf597dd..c9c65f7f8b 100644
--- a/keyboards/xelus/xs108/info.json
+++ b/keyboards/xelus/xs108/info.json
@@ -13,6 +13,9 @@
"rows": ["C14", "C13", "A10", "A3", "A1", "A0"]
},
"diode_direction": "COL2ROW",
+ "eeprom": {
+ "driver": "i2c"
+ },
"indicators": {
"caps_lock": "A2",
"num_lock": "B7",
diff --git a/keyboards/xelus/xs108/rules.mk b/keyboards/xelus/xs108/rules.mk
index 5ed7b869ae..5356b24d77 100644
--- a/keyboards/xelus/xs108/rules.mk
+++ b/keyboards/xelus/xs108/rules.mk
@@ -10,5 +10,3 @@ NKRO_ENABLE = yes # Enable N-Key Rollover
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
AUDIO_ENABLE = no # Audio output
-EEPROM_DRIVER = i2c
-
diff --git a/keyboards/xelus/xs60/hotswap/info.json b/keyboards/xelus/xs60/hotswap/info.json
index 81cf86498b..45a5e57542 100644
--- a/keyboards/xelus/xs60/hotswap/info.json
+++ b/keyboards/xelus/xs60/hotswap/info.json
@@ -17,6 +17,9 @@
"processor": "STM32L422",
"bootloader": "stm32-dfu",
"diode_direction": "COL2ROW",
+ "eeprom": {
+ "driver": "i2c"
+ },
"matrix_pins": {
"cols": ["B0", "B1", "A8", "A9", "B5", "A6", "C14", "C15", "A0", "A5", "A4", "A3", "A2", "A1"],
"rows": ["B4", "B3", "A15", "A14", "A7"]
diff --git a/keyboards/xelus/xs60/hotswap/rules.mk b/keyboards/xelus/xs60/hotswap/rules.mk
index 4819456d51..f632b896ab 100644
--- a/keyboards/xelus/xs60/hotswap/rules.mk
+++ b/keyboards/xelus/xs60/hotswap/rules.mk
@@ -10,8 +10,6 @@ NKRO_ENABLE = yes # Enable N-Key Rollover
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
AUDIO_ENABLE = no # Audio output
-EEPROM_DRIVER = i2c
-
RGBLIGHT_ENABLE = yes
LTO_ENABLE = yes
diff --git a/keyboards/xelus/xs60/soldered/info.json b/keyboards/xelus/xs60/soldered/info.json
index 20de0ef837..41af87ba7c 100644
--- a/keyboards/xelus/xs60/soldered/info.json
+++ b/keyboards/xelus/xs60/soldered/info.json
@@ -17,6 +17,9 @@
"processor": "STM32L422",
"bootloader": "stm32-dfu",
"diode_direction": "COL2ROW",
+ "eeprom": {
+ "driver": "i2c"
+ },
"matrix_pins": {
"cols": ["B0", "B1", "A8", "A9", "B5", "A6", "C14", "C15", "A0", "A5", "A4", "A3", "A2", "A1"],
"rows": ["B4", "B3", "A15", "A14", "A7"]
diff --git a/keyboards/xelus/xs60/soldered/rules.mk b/keyboards/xelus/xs60/soldered/rules.mk
index 4819456d51..f632b896ab 100644
--- a/keyboards/xelus/xs60/soldered/rules.mk
+++ b/keyboards/xelus/xs60/soldered/rules.mk
@@ -10,8 +10,6 @@ NKRO_ENABLE = yes # Enable N-Key Rollover
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
AUDIO_ENABLE = no # Audio output
-EEPROM_DRIVER = i2c
-
RGBLIGHT_ENABLE = yes
LTO_ENABLE = yes
diff --git a/keyboards/xiudi/xd002/keymaps/multilayer_rgb/rgblite.h b/keyboards/xiudi/xd002/keymaps/multilayer_rgb/rgblite.h
index 8a14a8f956..1fa6f899b9 100644
--- a/keyboards/xiudi/xd002/keymaps/multilayer_rgb/rgblite.h
+++ b/keyboards/xiudi/xd002/keymaps/multilayer_rgb/rgblite.h
@@ -4,6 +4,6 @@
#include "color.h"
static inline void rgblite_setrgb(uint8_t _r, uint8_t _g, uint8_t _b) {
- LED_TYPE leds[RGBLED_NUM] = {{.r = _r, .g = _g, .b = _b}, {.r = _r, .g = _g, .b = _b}};
+ rgb_led_t leds[RGBLED_NUM] = {{.r = _r, .g = _g, .b = _b}, {.r = _r, .g = _g, .b = _b}};
ws2812_setleds(leds, RGBLED_NUM);
}
diff --git a/keyboards/xiudi/xd002/keymaps/rgb_lite/rgblite.h b/keyboards/xiudi/xd002/keymaps/rgb_lite/rgblite.h
index b7919f9767..15ee0c0f6b 100644
--- a/keyboards/xiudi/xd002/keymaps/rgb_lite/rgblite.h
+++ b/keyboards/xiudi/xd002/keymaps/rgb_lite/rgblite.h
@@ -4,7 +4,7 @@
#include "color.h"
static inline void rgblite_setrgb(uint8_t _r, uint8_t _g, uint8_t _b) {
- LED_TYPE leds[RGBLED_NUM] = {{.r = _r, .g = _g, .b = _b}, {.r = _r, .g = _g, .b = _b}};
+ rgb_led_t leds[RGBLED_NUM] = {{.r = _r, .g = _g, .b = _b}, {.r = _r, .g = _g, .b = _b}};
ws2812_setleds(leds, RGBLED_NUM);
}
diff --git a/keyboards/xiudi/xd75/keymaps/odyssey/keymap.c b/keyboards/xiudi/xd75/keymaps/odyssey/keymap.c
index 4fe70b9cca..61eb4a2dcf 100644
--- a/keyboards/xiudi/xd75/keymaps/odyssey/keymap.c
+++ b/keyboards/xiudi/xd75/keymaps/odyssey/keymap.c
@@ -49,7 +49,7 @@ int speed = 300;
void set_colors(int r, int g, int b) {
for(int i = 0; i<6; i++) {
- sethsv(r, g, b, (LED_TYPE *)&led[i]);
+ sethsv(r, g, b, (rgb_led_t *)&led[i]);
}
rgblight_set();
}
@@ -213,7 +213,7 @@ void matrix_scan_user(void) {
if (rc == 0) {
rc = speed;
for(int i = 0; i<6; i++) {
- sethsv(42*((t+i)%6), 255, 255, (LED_TYPE *)&led[i]);
+ sethsv(42*((t+i)%6), 255, 255, (rgb_led_t *)&led[i]);
}
rgblight_set();
t++; t = t % 6;
@@ -224,9 +224,9 @@ void matrix_scan_user(void) {
col = (col + 1) % 36;
for (int i = 0; i<6; i++) {
if (i==t)
- sethsv(42*(((col-1)/6)%6), 255, 255, (LED_TYPE *)&led[(right ? t : 5-t)]);
+ sethsv(42*(((col-1)/6)%6), 255, 255, (rgb_led_t *)&led[(right ? t : 5-t)]);
else
- sethsv(0, 0, 0, (LED_TYPE *)&led[right ? i : 5-i]);
+ sethsv(0, 0, 0, (rgb_led_t *)&led[right ? i : 5-i]);
}
rgblight_set();
t++; t = t % 6;
diff --git a/keyboards/xiudi/xd84/rules.mk b/keyboards/xiudi/xd84/rules.mk
index c6c7f4ef93..89d05c5487 100644
--- a/keyboards/xiudi/xd84/rules.mk
+++ b/keyboards/xiudi/xd84/rules.mk
@@ -17,4 +17,4 @@ CUSTOM_MATRIX = lite
VPATH += drivers/gpio
SRC += pca9555.c matrix.c
-QUANTUM_LIB_SRC += i2c_master.c
+I2C_DRIVER_REQUIRED = yes
diff --git a/keyboards/xiudi/xd96/rules.mk b/keyboards/xiudi/xd96/rules.mk
index c6c7f4ef93..89d05c5487 100644
--- a/keyboards/xiudi/xd96/rules.mk
+++ b/keyboards/xiudi/xd96/rules.mk
@@ -17,4 +17,4 @@ CUSTOM_MATRIX = lite
VPATH += drivers/gpio
SRC += pca9555.c matrix.c
-QUANTUM_LIB_SRC += i2c_master.c
+I2C_DRIVER_REQUIRED = yes
diff --git a/keyboards/yiancardesigns/barleycorn/rules.mk b/keyboards/yiancardesigns/barleycorn/rules.mk
index b56efe3ef9..3808b0d3f2 100644
--- a/keyboards/yiancardesigns/barleycorn/rules.mk
+++ b/keyboards/yiancardesigns/barleycorn/rules.mk
@@ -14,4 +14,4 @@ AUDIO_ENABLE = no # Audio output
CUSTOM_MATRIX = lite
SRC += matrix.c
-QUANTUM_LIB_SRC += i2c_master.c
+I2C_DRIVER_REQUIRED = yes
diff --git a/keyboards/yiancardesigns/gingham/rules.mk b/keyboards/yiancardesigns/gingham/rules.mk
index 2fce424de8..cd47b89aed 100644
--- a/keyboards/yiancardesigns/gingham/rules.mk
+++ b/keyboards/yiancardesigns/gingham/rules.mk
@@ -1,5 +1,5 @@
-SRC = matrix.c \
- i2c_master.c
+SRC = matrix.c
+I2C_DRIVER_REQUIRED = yes
# Build Options
# change yes to no to disable
diff --git a/keyboards/yiancardesigns/seigaiha/rules.mk b/keyboards/yiancardesigns/seigaiha/rules.mk
index b56efe3ef9..3808b0d3f2 100644
--- a/keyboards/yiancardesigns/seigaiha/rules.mk
+++ b/keyboards/yiancardesigns/seigaiha/rules.mk
@@ -14,4 +14,4 @@ AUDIO_ENABLE = no # Audio output
CUSTOM_MATRIX = lite
SRC += matrix.c
-QUANTUM_LIB_SRC += i2c_master.c
+I2C_DRIVER_REQUIRED = yes
diff --git a/keyboards/ymdk/id75/info.json b/keyboards/ymdk/id75/info.json
index 692ef7e8b7..e30afaf717 100644
--- a/keyboards/ymdk/id75/info.json
+++ b/keyboards/ymdk/id75/info.json
@@ -3,7 +3,6 @@
"keyboard_name": "Idobao x YMDK ID75",
"maintainer": "qmk",
"bootloader": "uf2boot",
- "board": "STM32_F103_STM32DUINO",
"diode_direction": "ROW2COL",
"features": {
"bootmagic": true,
diff --git a/keyboards/ymdk/melody96/hotswap/info.json b/keyboards/ymdk/melody96/hotswap/info.json
new file mode 100644
index 0000000000..61112d88ab
--- /dev/null
+++ b/keyboards/ymdk/melody96/hotswap/info.json
@@ -0,0 +1,501 @@
+{
+ "keyboard_name": "Melody96 Hotswap",
+ "manufacturer": "YMDK",
+ "url": "",
+ "maintainer": "qmk",
+ "usb": {
+ "vid": "0x594D",
+ "pid": "0x4D97",
+ "device_version": "0.0.1"
+ },
+ "matrix_pins": {
+ "cols": ["D0", "D1", "D2", "D3", "D5", "D4", "D6", "D7", "B4"],
+ "rows": ["B7", "B3", "B2", "B1", "B0", "E6", "F0", "F1", "F4", "F5", "F6", "F7"]
+ },
+ "diode_direction": "ROW2COL",
+ "features": {
+ "audio": false,
+ "backlight": true,
+ "bootmagic": true,
+ "command": false,
+ "console": false,
+ "extrakey": true,
+ "mousekey": true,
+ "nkro": true,
+ "rgblight": true
+ },
+ "backlight": {
+ "pin": "B6",
+ "levels": 5
+ },
+ "rgblight": {
+ "led_count": 18,
+ "saturation_steps": 8,
+ "brightness_steps": 8,
+ "animations": {
+ "breathing": true,
+ "rainbow_mood": true,
+ "rainbow_swirl": true,
+ "snake": true,
+ "knight": true,
+ "christmas": true,
+ "static_gradient": true,
+ "rgb_test": true,
+ "alternating": true,
+ "twinkle": true
+ }
+ },
+ "ws2812": {
+ "pin": "E2"
+ },
+ "indicators": {
+ "caps_lock": "C7",
+ "num_lock": "C6",
+ "scroll_lock": "B5",
+ "on_state": 0
+ },
+ "bootmagic": {
+ "matrix": [5, 0]
+ },
+ "processor": "atmega32u4",
+ "bootloader": "atmel-dfu",
+ "community_layouts": ["96_ansi", "96_iso"],
+ "layouts": {
+ "LAYOUT_96_iso": {
+ "layout": [
+ {"matrix": [5, 0], "x": 0, "y": 0},
+ {"matrix": [5, 1], "x": 1, "y": 0},
+ {"matrix": [5, 2], "x": 2, "y": 0},
+ {"matrix": [5, 3], "x": 3, "y": 0},
+ {"matrix": [5, 4], "x": 4, "y": 0},
+ {"matrix": [5, 5], "x": 5, "y": 0},
+ {"matrix": [5, 6], "x": 6, "y": 0},
+ {"matrix": [5, 7], "x": 7, "y": 0},
+ {"matrix": [5, 8], "x": 8, "y": 0},
+ {"matrix": [11, 8], "x": 9, "y": 0},
+ {"matrix": [11, 7], "x": 10, "y": 0},
+ {"matrix": [11, 5], "x": 11, "y": 0},
+ {"matrix": [11, 4], "x": 12, "y": 0},
+ {"matrix": [11, 3], "x": 13, "y": 0},
+ {"matrix": [11, 6], "x": 14, "y": 0},
+ {"matrix": [11, 2], "x": 15, "y": 0},
+ {"matrix": [11, 1], "x": 16, "y": 0},
+ {"matrix": [11, 0], "x": 17, "y": 0},
+ {"matrix": [6, 3], "x": 18, "y": 0},
+
+ {"matrix": [4, 0], "x": 0, "y": 1},
+ {"matrix": [4, 1], "x": 1, "y": 1},
+ {"matrix": [4, 2], "x": 2, "y": 1},
+ {"matrix": [4, 3], "x": 3, "y": 1},
+ {"matrix": [4, 4], "x": 4, "y": 1},
+ {"matrix": [4, 5], "x": 5, "y": 1},
+ {"matrix": [4, 6], "x": 6, "y": 1},
+ {"matrix": [4, 7], "x": 7, "y": 1},
+ {"matrix": [4, 8], "x": 8, "y": 1},
+ {"matrix": [10, 8], "x": 9, "y": 1},
+ {"matrix": [10, 7], "x": 10, "y": 1},
+ {"matrix": [10, 5], "x": 11, "y": 1},
+ {"matrix": [10, 4], "x": 12, "y": 1},
+ {"matrix": [10, 6], "x": 13, "y": 1, "w": 2},
+ {"matrix": [10, 2], "x": 15, "y": 1},
+ {"matrix": [10, 1], "x": 16, "y": 1},
+ {"matrix": [10, 0], "x": 17, "y": 1},
+ {"matrix": [6, 4], "x": 18, "y": 1},
+
+ {"matrix": [3, 0], "x": 0, "y": 2, "w": 1.5},
+ {"matrix": [3, 1], "x": 1.5, "y": 2},
+ {"matrix": [3, 2], "x": 2.5, "y": 2},
+ {"matrix": [3, 3], "x": 3.5, "y": 2},
+ {"matrix": [3, 4], "x": 4.5, "y": 2},
+ {"matrix": [3, 5], "x": 5.5, "y": 2},
+ {"matrix": [3, 6], "x": 6.5, "y": 2},
+ {"matrix": [3, 7], "x": 7.5, "y": 2},
+ {"matrix": [3, 8], "x": 8.5, "y": 2},
+ {"matrix": [9, 8], "x": 9.5, "y": 2},
+ {"matrix": [9, 7], "x": 10.5, "y": 2},
+ {"matrix": [9, 5], "x": 11.5, "y": 2},
+ {"matrix": [9, 4], "x": 12.5, "y": 2},
+ {"matrix": [9, 6], "x": 15, "y": 2},
+ {"matrix": [9, 2], "x": 16, "y": 2},
+ {"matrix": [9, 1], "x": 17, "y": 2},
+ {"matrix": [8, 0], "x": 18, "y": 2, "h": 2},
+
+ {"matrix": [2, 0], "x": 0, "y": 3, "w": 1.75},
+ {"matrix": [2, 1], "x": 1.75, "y": 3},
+ {"matrix": [2, 2], "x": 2.75, "y": 3},
+ {"matrix": [2, 3], "x": 3.75, "y": 3},
+ {"matrix": [2, 4], "x": 4.75, "y": 3},
+ {"matrix": [2, 5], "x": 5.75, "y": 3},
+ {"matrix": [2, 6], "x": 6.75, "y": 3},
+ {"matrix": [2, 7], "x": 7.75, "y": 3},
+ {"matrix": [2, 8], "x": 8.75, "y": 3},
+ {"matrix": [8, 8], "x": 9.75, "y": 3},
+ {"matrix": [8, 7], "x": 10.75, "y": 3},
+ {"matrix": [8, 5], "x": 11.75, "y": 3},
+ {"matrix": [8, 4], "x": 12.75, "y": 3},
+ {"matrix": [9, 3], "x": 13.75, "y": 2, "w": 1.25, "h": 2},
+ {"matrix": [8, 6], "x": 15, "y": 3},
+ {"matrix": [8, 2], "x": 16, "y": 3},
+ {"matrix": [8, 1], "x": 17, "y": 3},
+
+ {"matrix": [1, 0], "x": 0, "y": 4, "w": 1.25},
+ {"matrix": [1, 1], "x": 1.25, "y": 4},
+ {"matrix": [1, 2], "x": 2.25, "y": 4},
+ {"matrix": [1, 3], "x": 3.25, "y": 4},
+ {"matrix": [1, 4], "x": 4.25, "y": 4},
+ {"matrix": [1, 5], "x": 5.25, "y": 4},
+ {"matrix": [1, 6], "x": 6.25, "y": 4},
+ {"matrix": [1, 7], "x": 7.25, "y": 4},
+ {"matrix": [1, 8], "x": 8.25, "y": 4},
+ {"matrix": [7, 8], "x": 9.25, "y": 4},
+ {"matrix": [7, 7], "x": 10.25, "y": 4},
+ {"matrix": [7, 5], "x": 11.25, "y": 4},
+ {"matrix": [7, 4], "x": 12.25, "y": 4, "w": 1.75},
+ {"matrix": [7, 3], "x": 14, "y": 4},
+ {"matrix": [7, 6], "x": 15, "y": 4},
+ {"matrix": [7, 2], "x": 16, "y": 4},
+ {"matrix": [7, 1], "x": 17, "y": 4},
+ {"matrix": [6, 0], "x": 18, "y": 4, "h": 2},
+
+ {"matrix": [0, 0], "x": 0, "y": 5, "w": 1.25},
+ {"matrix": [0, 1], "x": 1.25, "y": 5, "w": 1.25},
+ {"matrix": [0, 2], "x": 2.5, "y": 5, "w": 1.25},
+ {"matrix": [0, 6], "x": 3.75, "y": 5, "w": 6.25},
+ {"matrix": [0, 8], "x": 10, "y": 5},
+ {"matrix": [0, 7], "x": 11, "y": 5},
+ {"matrix": [0, 5], "x": 12, "y": 5},
+ {"matrix": [0, 4], "x": 13, "y": 5},
+ {"matrix": [0, 3], "x": 14, "y": 5},
+ {"matrix": [6, 6], "x": 15, "y": 5},
+ {"matrix": [6, 2], "x": 16, "y": 5},
+ {"matrix": [6, 1], "x": 17, "y": 5}
+ ]
+ },
+ "LAYOUT_96_iso_rwkl": {
+ "layout": [
+ {"matrix": [5, 0], "x": 0, "y": 0},
+ {"matrix": [5, 1], "x": 1, "y": 0},
+ {"matrix": [5, 2], "x": 2, "y": 0},
+ {"matrix": [5, 3], "x": 3, "y": 0},
+ {"matrix": [5, 4], "x": 4, "y": 0},
+ {"matrix": [5, 5], "x": 5, "y": 0},
+ {"matrix": [5, 6], "x": 6, "y": 0},
+ {"matrix": [5, 7], "x": 7, "y": 0},
+ {"matrix": [5, 8], "x": 8, "y": 0},
+ {"matrix": [11, 8], "x": 9, "y": 0},
+ {"matrix": [11, 7], "x": 10, "y": 0},
+ {"matrix": [11, 5], "x": 11, "y": 0},
+ {"matrix": [11, 4], "x": 12, "y": 0},
+ {"matrix": [11, 3], "x": 13, "y": 0},
+ {"matrix": [11, 6], "x": 14, "y": 0},
+ {"matrix": [11, 2], "x": 15, "y": 0},
+ {"matrix": [11, 1], "x": 16, "y": 0},
+ {"matrix": [11, 0], "x": 17, "y": 0},
+ {"matrix": [6, 3], "x": 18, "y": 0},
+
+ {"matrix": [4, 0], "x": 0, "y": 1},
+ {"matrix": [4, 1], "x": 1, "y": 1},
+ {"matrix": [4, 2], "x": 2, "y": 1},
+ {"matrix": [4, 3], "x": 3, "y": 1},
+ {"matrix": [4, 4], "x": 4, "y": 1},
+ {"matrix": [4, 5], "x": 5, "y": 1},
+ {"matrix": [4, 6], "x": 6, "y": 1},
+ {"matrix": [4, 7], "x": 7, "y": 1},
+ {"matrix": [4, 8], "x": 8, "y": 1},
+ {"matrix": [10, 8], "x": 9, "y": 1},
+ {"matrix": [10, 7], "x": 10, "y": 1},
+ {"matrix": [10, 5], "x": 11, "y": 1},
+ {"matrix": [10, 4], "x": 12, "y": 1},
+ {"matrix": [10, 6], "x": 13, "y": 1, "w": 2},
+ {"matrix": [10, 2], "x": 15, "y": 1},
+ {"matrix": [10, 1], "x": 16, "y": 1},
+ {"matrix": [10, 0], "x": 17, "y": 1},
+ {"matrix": [6, 4], "x": 18, "y": 1},
+
+ {"matrix": [3, 0], "x": 0, "y": 2, "w": 1.5},
+ {"matrix": [3, 1], "x": 1.5, "y": 2},
+ {"matrix": [3, 2], "x": 2.5, "y": 2},
+ {"matrix": [3, 3], "x": 3.5, "y": 2},
+ {"matrix": [3, 4], "x": 4.5, "y": 2},
+ {"matrix": [3, 5], "x": 5.5, "y": 2},
+ {"matrix": [3, 6], "x": 6.5, "y": 2},
+ {"matrix": [3, 7], "x": 7.5, "y": 2},
+ {"matrix": [3, 8], "x": 8.5, "y": 2},
+ {"matrix": [9, 8], "x": 9.5, "y": 2},
+ {"matrix": [9, 7], "x": 10.5, "y": 2},
+ {"matrix": [9, 5], "x": 11.5, "y": 2},
+ {"matrix": [9, 4], "x": 12.5, "y": 2},
+ {"matrix": [9, 6], "x": 15, "y": 2},
+ {"matrix": [9, 2], "x": 16, "y": 2},
+ {"matrix": [9, 1], "x": 17, "y": 2},
+ {"matrix": [8, 0], "x": 18, "y": 2, "h": 2},
+
+ {"matrix": [2, 0], "x": 0, "y": 3, "w": 1.75},
+ {"matrix": [2, 1], "x": 1.75, "y": 3},
+ {"matrix": [2, 2], "x": 2.75, "y": 3},
+ {"matrix": [2, 3], "x": 3.75, "y": 3},
+ {"matrix": [2, 4], "x": 4.75, "y": 3},
+ {"matrix": [2, 5], "x": 5.75, "y": 3},
+ {"matrix": [2, 6], "x": 6.75, "y": 3},
+ {"matrix": [2, 7], "x": 7.75, "y": 3},
+ {"matrix": [2, 8], "x": 8.75, "y": 3},
+ {"matrix": [8, 8], "x": 9.75, "y": 3},
+ {"matrix": [8, 7], "x": 10.75, "y": 3},
+ {"matrix": [8, 5], "x": 11.75, "y": 3},
+ {"matrix": [8, 4], "x": 12.75, "y": 3},
+ {"matrix": [9, 3], "x": 13.75, "y": 2, "w": 1.25, "h": 2},
+ {"matrix": [8, 6], "x": 15, "y": 3},
+ {"matrix": [8, 2], "x": 16, "y": 3},
+ {"matrix": [8, 1], "x": 17, "y": 3},
+
+ {"matrix": [1, 0], "x": 0, "y": 4, "w": 1.25},
+ {"matrix": [1, 1], "x": 1.25, "y": 4},
+ {"matrix": [1, 2], "x": 2.25, "y": 4},
+ {"matrix": [1, 3], "x": 3.25, "y": 4},
+ {"matrix": [1, 4], "x": 4.25, "y": 4},
+ {"matrix": [1, 5], "x": 5.25, "y": 4},
+ {"matrix": [1, 6], "x": 6.25, "y": 4},
+ {"matrix": [1, 7], "x": 7.25, "y": 4},
+ {"matrix": [1, 8], "x": 8.25, "y": 4},
+ {"matrix": [7, 8], "x": 9.25, "y": 4},
+ {"matrix": [7, 7], "x": 10.25, "y": 4},
+ {"matrix": [7, 5], "x": 11.25, "y": 4},
+ {"matrix": [7, 4], "x": 12.25, "y": 4, "w": 1.75},
+ {"matrix": [7, 3], "x": 14, "y": 4},
+ {"matrix": [7, 6], "x": 15, "y": 4},
+ {"matrix": [7, 2], "x": 16, "y": 4},
+ {"matrix": [7, 1], "x": 17, "y": 4},
+ {"matrix": [6, 0], "x": 18, "y": 4, "h": 2},
+
+ {"matrix": [0, 0], "x": 0, "y": 5, "w": 1.25},
+ {"matrix": [0, 1], "x": 1.25, "y": 5, "w": 1.25},
+ {"matrix": [0, 2], "x": 2.5, "y": 5, "w": 1.25},
+ {"matrix": [0, 6], "x": 3.75, "y": 5, "w": 6.25},
+ {"matrix": [0, 8], "x": 10, "y": 5, "w": 1.5},
+ {"matrix": [0, 5], "x": 11.5, "y": 5, "w": 1.5},
+ {"matrix": [0, 4], "x": 13, "y": 5},
+ {"matrix": [0, 3], "x": 14, "y": 5},
+ {"matrix": [6, 6], "x": 15, "y": 5},
+ {"matrix": [6, 2], "x": 16, "y": 5},
+ {"matrix": [6, 1], "x": 17, "y": 5}
+ ]
+ },
+ "LAYOUT_96_ansi": {
+ "layout": [
+ {"matrix": [5, 0], "x": 0, "y": 0},
+ {"matrix": [5, 1], "x": 1, "y": 0},
+ {"matrix": [5, 2], "x": 2, "y": 0},
+ {"matrix": [5, 3], "x": 3, "y": 0},
+ {"matrix": [5, 4], "x": 4, "y": 0},
+ {"matrix": [5, 5], "x": 5, "y": 0},
+ {"matrix": [5, 6], "x": 6, "y": 0},
+ {"matrix": [5, 7], "x": 7, "y": 0},
+ {"matrix": [5, 8], "x": 8, "y": 0},
+ {"matrix": [11, 8], "x": 9, "y": 0},
+ {"matrix": [11, 7], "x": 10, "y": 0},
+ {"matrix": [11, 5], "x": 11, "y": 0},
+ {"matrix": [11, 4], "x": 12, "y": 0},
+ {"matrix": [11, 3], "x": 13, "y": 0},
+ {"matrix": [11, 6], "x": 14, "y": 0},
+ {"matrix": [11, 2], "x": 15, "y": 0},
+ {"matrix": [11, 1], "x": 16, "y": 0},
+ {"matrix": [11, 0], "x": 17, "y": 0},
+ {"matrix": [6, 3], "x": 18, "y": 0},
+
+ {"matrix": [4, 0], "x": 0, "y": 1},
+ {"matrix": [4, 1], "x": 1, "y": 1},
+ {"matrix": [4, 2], "x": 2, "y": 1},
+ {"matrix": [4, 3], "x": 3, "y": 1},
+ {"matrix": [4, 4], "x": 4, "y": 1},
+ {"matrix": [4, 5], "x": 5, "y": 1},
+ {"matrix": [4, 6], "x": 6, "y": 1},
+ {"matrix": [4, 7], "x": 7, "y": 1},
+ {"matrix": [4, 8], "x": 8, "y": 1},
+ {"matrix": [10, 8], "x": 9, "y": 1},
+ {"matrix": [10, 7], "x": 10, "y": 1},
+ {"matrix": [10, 5], "x": 11, "y": 1},
+ {"matrix": [10, 4], "x": 12, "y": 1},
+ {"matrix": [10, 6], "x": 13, "y": 1, "w": 2},
+ {"matrix": [10, 2], "x": 15, "y": 1},
+ {"matrix": [10, 1], "x": 16, "y": 1},
+ {"matrix": [10, 0], "x": 17, "y": 1},
+ {"matrix": [6, 4], "x": 18, "y": 1},
+
+ {"matrix": [3, 0], "x": 0, "y": 2, "w": 1.5},
+ {"matrix": [3, 1], "x": 1.5, "y": 2},
+ {"matrix": [3, 2], "x": 2.5, "y": 2},
+ {"matrix": [3, 3], "x": 3.5, "y": 2},
+ {"matrix": [3, 4], "x": 4.5, "y": 2},
+ {"matrix": [3, 5], "x": 5.5, "y": 2},
+ {"matrix": [3, 6], "x": 6.5, "y": 2},
+ {"matrix": [3, 7], "x": 7.5, "y": 2},
+ {"matrix": [3, 8], "x": 8.5, "y": 2},
+ {"matrix": [9, 8], "x": 9.5, "y": 2},
+ {"matrix": [9, 7], "x": 10.5, "y": 2},
+ {"matrix": [9, 5], "x": 11.5, "y": 2},
+ {"matrix": [9, 4], "x": 12.5, "y": 2},
+ {"matrix": [9, 3], "x": 13.5, "y": 2, "w": 1.5},
+ {"matrix": [9, 6], "x": 15, "y": 2},
+ {"matrix": [9, 2], "x": 16, "y": 2},
+ {"matrix": [9, 1], "x": 17, "y": 2},
+ {"matrix": [8, 0], "x": 18, "y": 2, "h": 2},
+
+ {"matrix": [2, 0], "x": 0, "y": 3, "w": 1.75},
+ {"matrix": [2, 1], "x": 1.75, "y": 3},
+ {"matrix": [2, 2], "x": 2.75, "y": 3},
+ {"matrix": [2, 3], "x": 3.75, "y": 3},
+ {"matrix": [2, 4], "x": 4.75, "y": 3},
+ {"matrix": [2, 5], "x": 5.75, "y": 3},
+ {"matrix": [2, 6], "x": 6.75, "y": 3},
+ {"matrix": [2, 7], "x": 7.75, "y": 3},
+ {"matrix": [2, 8], "x": 8.75, "y": 3},
+ {"matrix": [8, 8], "x": 9.75, "y": 3},
+ {"matrix": [8, 7], "x": 10.75, "y": 3},
+ {"matrix": [8, 5], "x": 11.75, "y": 3},
+ {"matrix": [8, 4], "x": 12.75, "y": 3, "w": 2.25},
+ {"matrix": [8, 6], "x": 15, "y": 3},
+ {"matrix": [8, 2], "x": 16, "y": 3},
+ {"matrix": [8, 1], "x": 17, "y": 3},
+
+ {"matrix": [1, 0], "x": 0, "y": 4, "w": 2.25},
+ {"matrix": [1, 2], "x": 2.25, "y": 4},
+ {"matrix": [1, 3], "x": 3.25, "y": 4},
+ {"matrix": [1, 4], "x": 4.25, "y": 4},
+ {"matrix": [1, 5], "x": 5.25, "y": 4},
+ {"matrix": [1, 6], "x": 6.25, "y": 4},
+ {"matrix": [1, 7], "x": 7.25, "y": 4},
+ {"matrix": [1, 8], "x": 8.25, "y": 4},
+ {"matrix": [7, 8], "x": 9.25, "y": 4},
+ {"matrix": [7, 7], "x": 10.25, "y": 4},
+ {"matrix": [7, 5], "x": 11.25, "y": 4},
+ {"matrix": [7, 4], "x": 12.25, "y": 4, "w": 1.75},
+ {"matrix": [7, 3], "x": 14, "y": 4},
+ {"matrix": [7, 6], "x": 15, "y": 4},
+ {"matrix": [7, 2], "x": 16, "y": 4},
+ {"matrix": [7, 1], "x": 17, "y": 4},
+ {"matrix": [6, 0], "x": 18, "y": 4, "h": 2},
+
+ {"matrix": [0, 0], "x": 0, "y": 5, "w": 1.25},
+ {"matrix": [0, 1], "x": 1.25, "y": 5, "w": 1.25},
+ {"matrix": [0, 2], "x": 2.5, "y": 5, "w": 1.25},
+ {"matrix": [0, 6], "x": 3.75, "y": 5, "w": 6.25},
+ {"matrix": [0, 8], "x": 10, "y": 5},
+ {"matrix": [0, 7], "x": 11, "y": 5},
+ {"matrix": [0, 5], "x": 12, "y": 5},
+ {"matrix": [0, 4], "x": 13, "y": 5},
+ {"matrix": [0, 3], "x": 14, "y": 5},
+ {"matrix": [6, 6], "x": 15, "y": 5},
+ {"matrix": [6, 2], "x": 16, "y": 5},
+ {"matrix": [6, 1], "x": 17, "y": 5}
+ ]
+ },
+ "LAYOUT_96_ansi_rwkl": {
+ "layout": [
+ {"matrix": [5, 0], "x": 0, "y": 0},
+ {"matrix": [5, 1], "x": 1, "y": 0},
+ {"matrix": [5, 2], "x": 2, "y": 0},
+ {"matrix": [5, 3], "x": 3, "y": 0},
+ {"matrix": [5, 4], "x": 4, "y": 0},
+ {"matrix": [5, 5], "x": 5, "y": 0},
+ {"matrix": [5, 6], "x": 6, "y": 0},
+ {"matrix": [5, 7], "x": 7, "y": 0},
+ {"matrix": [5, 8], "x": 8, "y": 0},
+ {"matrix": [11, 8], "x": 9, "y": 0},
+ {"matrix": [11, 7], "x": 10, "y": 0},
+ {"matrix": [11, 5], "x": 11, "y": 0},
+ {"matrix": [11, 4], "x": 12, "y": 0},
+ {"matrix": [11, 3], "x": 13, "y": 0},
+ {"matrix": [11, 6], "x": 14, "y": 0},
+ {"matrix": [11, 2], "x": 15, "y": 0},
+ {"matrix": [11, 1], "x": 16, "y": 0},
+ {"matrix": [11, 0], "x": 17, "y": 0},
+ {"matrix": [6, 3], "x": 18, "y": 0},
+
+ {"matrix": [4, 0], "x": 0, "y": 1},
+ {"matrix": [4, 1], "x": 1, "y": 1},
+ {"matrix": [4, 2], "x": 2, "y": 1},
+ {"matrix": [4, 3], "x": 3, "y": 1},
+ {"matrix": [4, 4], "x": 4, "y": 1},
+ {"matrix": [4, 5], "x": 5, "y": 1},
+ {"matrix": [4, 6], "x": 6, "y": 1},
+ {"matrix": [4, 7], "x": 7, "y": 1},
+ {"matrix": [4, 8], "x": 8, "y": 1},
+ {"matrix": [10, 8], "x": 9, "y": 1},
+ {"matrix": [10, 7], "x": 10, "y": 1},
+ {"matrix": [10, 5], "x": 11, "y": 1},
+ {"matrix": [10, 4], "x": 12, "y": 1},
+ {"matrix": [10, 6], "x": 13, "y": 1, "w": 2},
+ {"matrix": [10, 2], "x": 15, "y": 1},
+ {"matrix": [10, 1], "x": 16, "y": 1},
+ {"matrix": [10, 0], "x": 17, "y": 1},
+ {"matrix": [6, 4], "x": 18, "y": 1},
+
+ {"matrix": [3, 0], "x": 0, "y": 2, "w": 1.5},
+ {"matrix": [3, 1], "x": 1.5, "y": 2},
+ {"matrix": [3, 2], "x": 2.5, "y": 2},
+ {"matrix": [3, 3], "x": 3.5, "y": 2},
+ {"matrix": [3, 4], "x": 4.5, "y": 2},
+ {"matrix": [3, 5], "x": 5.5, "y": 2},
+ {"matrix": [3, 6], "x": 6.5, "y": 2},
+ {"matrix": [3, 7], "x": 7.5, "y": 2},
+ {"matrix": [3, 8], "x": 8.5, "y": 2},
+ {"matrix": [9, 8], "x": 9.5, "y": 2},
+ {"matrix": [9, 7], "x": 10.5, "y": 2},
+ {"matrix": [9, 5], "x": 11.5, "y": 2},
+ {"matrix": [9, 4], "x": 12.5, "y": 2},
+ {"matrix": [9, 3], "x": 13.5, "y": 2, "w": 1.5},
+ {"matrix": [9, 6], "x": 15, "y": 2},
+ {"matrix": [9, 2], "x": 16, "y": 2},
+ {"matrix": [9, 1], "x": 17, "y": 2},
+ {"matrix": [8, 0], "x": 18, "y": 2, "h": 2},
+
+ {"matrix": [2, 0], "x": 0, "y": 3, "w": 1.75},
+ {"matrix": [2, 1], "x": 1.75, "y": 3},
+ {"matrix": [2, 2], "x": 2.75, "y": 3},
+ {"matrix": [2, 3], "x": 3.75, "y": 3},
+ {"matrix": [2, 4], "x": 4.75, "y": 3},
+ {"matrix": [2, 5], "x": 5.75, "y": 3},
+ {"matrix": [2, 6], "x": 6.75, "y": 3},
+ {"matrix": [2, 7], "x": 7.75, "y": 3},
+ {"matrix": [2, 8], "x": 8.75, "y": 3},
+ {"matrix": [8, 8], "x": 9.75, "y": 3},
+ {"matrix": [8, 7], "x": 10.75, "y": 3},
+ {"matrix": [8, 5], "x": 11.75, "y": 3},
+ {"matrix": [8, 4], "x": 12.75, "y": 3, "w": 2.25},
+ {"matrix": [8, 6], "x": 15, "y": 3},
+ {"matrix": [8, 2], "x": 16, "y": 3},
+ {"matrix": [8, 1], "x": 17, "y": 3},
+
+ {"matrix": [1, 0], "x": 0, "y": 4, "w": 2.25},
+ {"matrix": [1, 2], "x": 2.25, "y": 4},
+ {"matrix": [1, 3], "x": 3.25, "y": 4},
+ {"matrix": [1, 4], "x": 4.25, "y": 4},
+ {"matrix": [1, 5], "x": 5.25, "y": 4},
+ {"matrix": [1, 6], "x": 6.25, "y": 4},
+ {"matrix": [1, 7], "x": 7.25, "y": 4},
+ {"matrix": [1, 8], "x": 8.25, "y": 4},
+ {"matrix": [7, 8], "x": 9.25, "y": 4},
+ {"matrix": [7, 7], "x": 10.25, "y": 4},
+ {"matrix": [7, 5], "x": 11.25, "y": 4},
+ {"matrix": [7, 4], "x": 12.25, "y": 4, "w": 1.75},
+ {"matrix": [7, 3], "x": 14, "y": 4},
+ {"matrix": [7, 6], "x": 15, "y": 4},
+ {"matrix": [7, 2], "x": 16, "y": 4},
+ {"matrix": [7, 1], "x": 17, "y": 4},
+ {"matrix": [6, 0], "x": 18, "y": 4, "h": 2},
+
+ {"matrix": [0, 0], "x": 0, "y": 5, "w": 1.25},
+ {"matrix": [0, 1], "x": 1.25, "y": 5, "w": 1.25},
+ {"matrix": [0, 2], "x": 2.5, "y": 5, "w": 1.25},
+ {"matrix": [0, 6], "x": 3.75, "y": 5, "w": 6.25},
+ {"matrix": [0, 8], "x": 10, "y": 5, "w": 1.5},
+ {"matrix": [0, 5], "x": 11.5, "y": 5, "w": 1.5},
+ {"matrix": [0, 4], "x": 13, "y": 5},
+ {"matrix": [0, 3], "x": 14, "y": 5},
+ {"matrix": [6, 6], "x": 15, "y": 5},
+ {"matrix": [6, 2], "x": 16, "y": 5},
+ {"matrix": [6, 1], "x": 17, "y": 5}
+ ]
+ }
+ }
+}
diff --git a/keyboards/ymdk/melody96/hotswap/keymaps/default/keymap.c b/keyboards/ymdk/melody96/hotswap/keymaps/default/keymap.c
new file mode 100644
index 0000000000..90a18f965f
--- /dev/null
+++ b/keyboards/ymdk/melody96/hotswap/keymaps/default/keymap.c
@@ -0,0 +1,23 @@
+// Copyright 2023 James Young for QMK (@noroadsleft)
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#include QMK_KEYBOARD_H
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [0] = LAYOUT_96_iso(
+ KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_HOME, KC_END, KC_PGUP, KC_PGDN, KC_DEL,
+ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_NUM, KC_PSLS, KC_PAST, KC_PMNS,
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_P7, KC_P8, KC_P9, KC_PPLS,
+ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, KC_P4, KC_P5, KC_P6,
+ KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT,
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, MO(1), KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT
+ ),
+ [1] = LAYOUT_96_iso(
+ QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, RGB_TOG, _______, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______,
+ BL_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, BL_DOWN, BL_TOGG, BL_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+ )
+};
diff --git a/keyboards/ymdk/melody96/hotswap/keymaps/via/keymap.c b/keyboards/ymdk/melody96/hotswap/keymaps/via/keymap.c
new file mode 100644
index 0000000000..90a18f965f
--- /dev/null
+++ b/keyboards/ymdk/melody96/hotswap/keymaps/via/keymap.c
@@ -0,0 +1,23 @@
+// Copyright 2023 James Young for QMK (@noroadsleft)
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#include QMK_KEYBOARD_H
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [0] = LAYOUT_96_iso(
+ KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_HOME, KC_END, KC_PGUP, KC_PGDN, KC_DEL,
+ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_NUM, KC_PSLS, KC_PAST, KC_PMNS,
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_P7, KC_P8, KC_P9, KC_PPLS,
+ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, KC_P4, KC_P5, KC_P6,
+ KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT,
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, MO(1), KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT
+ ),
+ [1] = LAYOUT_96_iso(
+ QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, RGB_TOG, _______, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______,
+ BL_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, BL_DOWN, BL_TOGG, BL_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+ )
+};
diff --git a/keyboards/ymdk/melody96/keymaps/via/rules.mk b/keyboards/ymdk/melody96/hotswap/keymaps/via/rules.mk
index 36b7ba9cbc..36b7ba9cbc 100644
--- a/keyboards/ymdk/melody96/keymaps/via/rules.mk
+++ b/keyboards/ymdk/melody96/hotswap/keymaps/via/rules.mk
diff --git a/keyboards/ymdk/melody96/keymaps/zunger/config.h b/keyboards/ymdk/melody96/hotswap/keymaps/zunger/config.h
index cc06440e0d..cc06440e0d 100644
--- a/keyboards/ymdk/melody96/keymaps/zunger/config.h
+++ b/keyboards/ymdk/melody96/hotswap/keymaps/zunger/config.h
diff --git a/keyboards/ymdk/melody96/keymaps/zunger/keymap.c b/keyboards/ymdk/melody96/hotswap/keymaps/zunger/keymap.c
index d65f10dcec..c84f656080 100644
--- a/keyboards/ymdk/melody96/keymaps/zunger/keymap.c
+++ b/keyboards/ymdk/melody96/hotswap/keymaps/zunger/keymap.c
@@ -140,7 +140,7 @@ enum layers_keymap {
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// NB: Using GESC for escape in the QWERTY layer as a temporary hack because I messed up the
// switch on the KC_GRV key; change back to KC_ESC once this is fixed.
- [_QWERTY] = LAYOUT_hotswap(
+ [_QWERTY] = LAYOUT_96_ansi(
QK_GESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_HOME, KC_END, KC_PGUP, KC_PGDN, KC_MPLY, KC_BRK,
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_LLCK, KC_PSLS, KC_PAST, KC_PMNS,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_P7, KC_P8, KC_P9,
@@ -175,14 +175,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | CTL | ALT| CMD| SPACE | α | β | γ | | | | | | |
* `---------------------------------------------------------------------------'
*/
- [_GREEK] = LAYOUT_hotswap(
+ [_GREEK] = LAYOUT_96_ansi(
KC_GRV, H(00b9), H(00b2), H(00b3), H(2074), H(2075), H(2076), H(2077), H(2078), H(2079), H(2070), H(207b), H(207a), H(207d), H(207e), XXXXXXX, XXXXXXX, XXXXXXX, _______,
KC_GRV, _______, _______, _______, _______, _______, _______, _______, H(00b0), _______, _______, H(221d), H(223c), _______, _______, H(2298), H(2299), H(2296),
_______, H(03b8), H(03c9), H(03b5), H(03c1), H(03c4), H(03c8), H(03c5), H(03b9), H(03bf), H(03c0), KC_LBRC, KC_RBRC, KC_BSLS, KC_P7, KC_P8, KC_P9,
_______, H(03b1), H(03c3), H(03b4), H(03c6), H(03b3), H(03b7), H(03d1), H(03ba), H(03bb), H(22ef), H(22c5), _______, KC_P4, KC_P5, KC_P6, H(2295),
_______, H(03b6), H(03be), H(03c7), H(03c2), H(03b2), H(03bd), H(03bc), H(226a), H(226b), H(222b), _______, _______, KC_P1, KC_P2, KC_P3,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_P0, KC_PDOT, KC_PENT),
- [_SHIFTGREEK] = LAYOUT_hotswap(
+ [_SHIFTGREEK] = LAYOUT_96_ansi(
KC_GRV, H(2081), H(2082), H(2083), H(2084), H(2085), H(2086), H(2087), H(2088), H(2089), H(2080), H(208b), H(208a), H(208d), H(208e), XXXXXXX, XXXXXXX, XXXXXXX, _______,
KC_GRV, H(00bf), _______, H(20ac), _______, _______, _______, _______, _______, _______, _______, XXXXXXX, H(2241), _______, _______, XXXXXXX, H(2297), XXXXXXX,
_______, H(0398), H(03a9), H(0395), H(03a1), H(03a4), H(03a8), H(03a5), H(0399), H(039f), H(03a0), KC_LBRC, KC_RBRC, KC_BSLS, KC_P7, KC_P8, KC_P9,
@@ -218,14 +218,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* [1] CADET + numpad moves the mouse. SHIFT+CADET+NUMPAD moves it more quickly. CADET+5
* clicks the mouse, and SHIFT+CADET+FIVE right-clicks.
*/
- [_CADET] = LAYOUT_hotswap(
+ [_CADET] = LAYOUT_96_ansi(
H(00AC), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______,
KC_GRV, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, H(00b1), _______, _______, XXXXXXX, H(00d7), XXXXXXX,
_______, H(2227), H(2228), H(2229), H(222a), H(2282), H(2283), H(2200), H(221e), H(2203), H(2202), H(2208), XXXXXXX, XXXXXXX, KC_P7, KC_P8, KC_P9,
_______, H(22a5), H(22a4), H(22a2), H(22a3), H(2191), H(2193), H(2190), H(2192), H(2194), XXXXXXX, XXXXXXX, _______, KC_P4, KC_P5, KC_P6, XXXXXXX,
_______, XXXXXXX, H(2260), XXXXXXX, H(2248), H(2261), H(2264), H(2265), XXXXXXX, XXXXXXX, H(00f7), _______, _______, KC_P1, KC_P2, KC_P3,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_P0, KC_PDOT, KC_PENT),
- [_SHIFTCADET] = LAYOUT_hotswap(
+ [_SHIFTCADET] = LAYOUT_96_ansi(
H(2205), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______,
KC_GRV, H(00a1), XXXXXXX, H(00a3), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, H(2213), _______, _______, XXXXXXX, XXXXXXX, XXXXXXX,
_______, H(211a), XXXXXXX, XXXXXXX, H(211d), H(2286), H(2287), XXXXXXX, H(2135), H(2204), XXXXXXX, H(2209), XXXXXXX, XXXXXXX, KC_P7, KC_P8, KC_P9,
@@ -235,7 +235,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// Function layer is mostly for keyboard meta-control operations, but also contains the combining
// accent marks. These are deliberately placed to match where the analogous controls go on Mac OS.
- [_FUNCTION] = LAYOUT_hotswap(
+ [_FUNCTION] = LAYOUT_96_ansi(
KC_CGRV, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, QK_BOOT,
KC_CGRV, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, KC_CAGU, _______, _______, _______, KC_CDIA, KC_CCIR, _______, _______, _______, _______, _______, _______, _______, _______,
diff --git a/keyboards/ymdk/melody96/keymaps/zunger/readme.md b/keyboards/ymdk/melody96/hotswap/keymaps/zunger/readme.md
index 3eb64a2e73..3eb64a2e73 100644
--- a/keyboards/ymdk/melody96/keymaps/zunger/readme.md
+++ b/keyboards/ymdk/melody96/hotswap/keymaps/zunger/readme.md
diff --git a/keyboards/ymdk/melody96/keymaps/zunger/rules.mk b/keyboards/ymdk/melody96/hotswap/keymaps/zunger/rules.mk
index a61cfa33fa..a61cfa33fa 100644
--- a/keyboards/ymdk/melody96/keymaps/zunger/rules.mk
+++ b/keyboards/ymdk/melody96/hotswap/keymaps/zunger/rules.mk
diff --git a/keyboards/ymdk/melody96/hotswap/matrix_diagram.md b/keyboards/ymdk/melody96/hotswap/matrix_diagram.md
new file mode 100644
index 0000000000..77f7e6a925
--- /dev/null
+++ b/keyboards/ymdk/melody96/hotswap/matrix_diagram.md
@@ -0,0 +1,23 @@
+# Matrix Diagram for YMDK Melody96 Hotswap
+
+```
+┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
+│50 │51 │52 │53 │54 │55 │56 │57 │58 │B8 │B7 │B5 │B4 │B3 │B6 │B2 │B1 │B0 │63 │
+├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┴───┼───┼───┼───┼───┤
+│40 │41 │42 │43 │44 │45 │46 │47 │48 │A8 │A7 │A5 │A4 │A6 │A2 │A1 │A0 │64 │
+├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┼───┼───┼───┤ ┌─────┐
+│30 │31 │32 │33 │34 │35 │36 │37 │38 │98 │97 │95 │94 │93 │96 │92 │91 │80 │ │ │
+├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┼───┼───┤ │ ┌──┴┐93 │ ISO Enter
+│20 │21 │22 │23 │24 │25 │26 │27 │28 │88 │87 │85 │84 │86 │82 │81 │ │ │84 │ │
+├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┼───┼───┼───┤ └───┴────┘
+│10 │11 │12 │13 │14 │15 │16 │17 │18 │78 │77 │75 │74 │73 │76 │72 │71 │60 │
+├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┼───┼───┤ │
+│00 │01 │02 │06 │08 │07 │05 │04 │03 │66 │62 │61 │ │
+└────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┴───┴───┴───┘
+┌────────┐
+│10 │ 2.25u LShift
+└────────┘
+┌────┬────┬────┬────────────────────────┬─────┬─────┐
+│00 │01 │02 │06 │08 │05 │ RWKL
+└────┴────┴────┴────────────────────────┴─────┴─────┘
+```
diff --git a/keyboards/ymdk/melody96/hotswap/readme.md b/keyboards/ymdk/melody96/hotswap/readme.md
new file mode 100644
index 0000000000..9fd379b273
--- /dev/null
+++ b/keyboards/ymdk/melody96/hotswap/readme.md
@@ -0,0 +1,19 @@
+# YMDK Melody96 Hotswap
+
+![melody96](https://i.imgur.com/9o0a6XFh.png)
+
+A 96% hotswap keyboard from YMDK, available in four different layouts.
+
+* Keyboard Maintainer: [The QMK Community](https://github.com/qmk)
+* Hardware Supported: Melody96 Hotswap PCBs
+* Hardware Availability: [YMDK](https://ymdkey.com/products/ymdk-hot-swap-hot-swappable-kailh-socket-96-pcb-qmk-fully-programmable-support-ansi-iso-interchange-melody-96-ymd96), [AliExpress](https://www.aliexpress.us/item/2251832770844523.html)
+
+Make example for this keyboard (after setting up your build environment):
+
+ make ymdk/melody96/hotswap:default
+
+Flashing example for this keyboard:
+
+ make ymdk/melody96/hotswap:default:flash
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/ymdk/melody96/hotswap/rules.mk b/keyboards/ymdk/melody96/hotswap/rules.mk
new file mode 100644
index 0000000000..6e7633bfe0
--- /dev/null
+++ b/keyboards/ymdk/melody96/hotswap/rules.mk
@@ -0,0 +1 @@
+# This file intentionally left blank
diff --git a/keyboards/ymdk/melody96/rules.mk b/keyboards/ymdk/melody96/rules.mk
index 3d5cb57ad5..806543977b 100644
--- a/keyboards/ymdk/melody96/rules.mk
+++ b/keyboards/ymdk/melody96/rules.mk
@@ -1,12 +1 @@
-# Build Options
-# change yes to no to disable
-#
-BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
-MOUSEKEY_ENABLE = yes # Mouse keys
-EXTRAKEY_ENABLE = yes # Audio control and System control
-CONSOLE_ENABLE = no # Console for debug
-COMMAND_ENABLE = no # Commands for debug and configuration
-NKRO_ENABLE = yes # Enable N-Key Rollover
-BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
-RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
-AUDIO_ENABLE = no # Audio output
+DEFAULT_FOLDER = ymdk/melody96/soldered
diff --git a/keyboards/ymdk/melody96/config.h b/keyboards/ymdk/melody96/soldered/config.h
index 5f36081323..5f36081323 100644
--- a/keyboards/ymdk/melody96/config.h
+++ b/keyboards/ymdk/melody96/soldered/config.h
diff --git a/keyboards/ymdk/melody96/info.json b/keyboards/ymdk/melody96/soldered/info.json
index f941c65970..f941c65970 100644
--- a/keyboards/ymdk/melody96/info.json
+++ b/keyboards/ymdk/melody96/soldered/info.json
diff --git a/keyboards/ymdk/melody96/keymaps/crilith/keymap.c b/keyboards/ymdk/melody96/soldered/keymaps/crilith/keymap.c
index e5eff6ee9d..e5eff6ee9d 100644
--- a/keyboards/ymdk/melody96/keymaps/crilith/keymap.c
+++ b/keyboards/ymdk/melody96/soldered/keymaps/crilith/keymap.c
diff --git a/keyboards/ymdk/melody96/keymaps/default/keymap.c b/keyboards/ymdk/melody96/soldered/keymaps/default/keymap.c
index cc5a7cc0e5..cc5a7cc0e5 100644
--- a/keyboards/ymdk/melody96/keymaps/default/keymap.c
+++ b/keyboards/ymdk/melody96/soldered/keymaps/default/keymap.c
diff --git a/keyboards/ymdk/melody96/keymaps/default_96_with60_split_num0/keymap.c b/keyboards/ymdk/melody96/soldered/keymaps/default_96_with60_split_num0/keymap.c
index 6e4af827d6..6e4af827d6 100644
--- a/keyboards/ymdk/melody96/keymaps/default_96_with60_split_num0/keymap.c
+++ b/keyboards/ymdk/melody96/soldered/keymaps/default_96_with60_split_num0/keymap.c
diff --git a/keyboards/ymdk/melody96/keymaps/dvz/config.h b/keyboards/ymdk/melody96/soldered/keymaps/dvz/config.h
index 380e11a3a1..380e11a3a1 100644
--- a/keyboards/ymdk/melody96/keymaps/dvz/config.h
+++ b/keyboards/ymdk/melody96/soldered/keymaps/dvz/config.h
diff --git a/keyboards/ymdk/melody96/keymaps/dvz/keymap.c b/keyboards/ymdk/melody96/soldered/keymaps/dvz/keymap.c
index 20d4d1e510..20d4d1e510 100644
--- a/keyboards/ymdk/melody96/keymaps/dvz/keymap.c
+++ b/keyboards/ymdk/melody96/soldered/keymaps/dvz/keymap.c
diff --git a/keyboards/ymdk/melody96/keymaps/dvz/readme.md b/keyboards/ymdk/melody96/soldered/keymaps/dvz/readme.md
index d82055244e..d82055244e 100644
--- a/keyboards/ymdk/melody96/keymaps/dvz/readme.md
+++ b/keyboards/ymdk/melody96/soldered/keymaps/dvz/readme.md
diff --git a/keyboards/ymdk/melody96/keymaps/dvz/rules.mk b/keyboards/ymdk/melody96/soldered/keymaps/dvz/rules.mk
index a1e85f13f4..a1e85f13f4 100644
--- a/keyboards/ymdk/melody96/keymaps/dvz/rules.mk
+++ b/keyboards/ymdk/melody96/soldered/keymaps/dvz/rules.mk
diff --git a/keyboards/ymdk/melody96/keymaps/konstantin/config.h b/keyboards/ymdk/melody96/soldered/keymaps/konstantin/config.h
index 4b511eb848..4b511eb848 100644
--- a/keyboards/ymdk/melody96/keymaps/konstantin/config.h
+++ b/keyboards/ymdk/melody96/soldered/keymaps/konstantin/config.h
diff --git a/keyboards/ymdk/melody96/keymaps/konstantin/keymap.c b/keyboards/ymdk/melody96/soldered/keymaps/konstantin/keymap.c
index 5dff7a249a..5dff7a249a 100644
--- a/keyboards/ymdk/melody96/keymaps/konstantin/keymap.c
+++ b/keyboards/ymdk/melody96/soldered/keymaps/konstantin/keymap.c
diff --git a/keyboards/ymdk/melody96/keymaps/konstantin/rules.mk b/keyboards/ymdk/melody96/soldered/keymaps/konstantin/rules.mk
index b315c8e6b9..b315c8e6b9 100644
--- a/keyboards/ymdk/melody96/keymaps/konstantin/rules.mk
+++ b/keyboards/ymdk/melody96/soldered/keymaps/konstantin/rules.mk
diff --git a/keyboards/ymdk/melody96/keymaps/via/keymap.c b/keyboards/ymdk/melody96/soldered/keymaps/via/keymap.c
index 897d86acb7..897d86acb7 100644
--- a/keyboards/ymdk/melody96/keymaps/via/keymap.c
+++ b/keyboards/ymdk/melody96/soldered/keymaps/via/keymap.c
diff --git a/keyboards/ymdk/melody96/soldered/keymaps/via/rules.mk b/keyboards/ymdk/melody96/soldered/keymaps/via/rules.mk
new file mode 100644
index 0000000000..36b7ba9cbc
--- /dev/null
+++ b/keyboards/ymdk/melody96/soldered/keymaps/via/rules.mk
@@ -0,0 +1,2 @@
+VIA_ENABLE = yes
+LTO_ENABLE = yes
diff --git a/keyboards/ymdk/melody96/matrix_diagram.md b/keyboards/ymdk/melody96/soldered/matrix_diagram.md
index e589bcc469..af8ba0ec81 100644
--- a/keyboards/ymdk/melody96/matrix_diagram.md
+++ b/keyboards/ymdk/melody96/soldered/matrix_diagram.md
@@ -1,4 +1,4 @@
-# Matrix Diagram for YMDK Melody96
+# Matrix Diagram for YMDK Melody96 Soldered
```
┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
diff --git a/keyboards/ymdk/melody96/readme.md b/keyboards/ymdk/melody96/soldered/readme.md
index e0e57a081e..8cd3889a6c 100644
--- a/keyboards/ymdk/melody96/readme.md
+++ b/keyboards/ymdk/melody96/soldered/readme.md
@@ -10,10 +10,10 @@
Make example for this keyboard (after setting up your build environment):
- make ymdk/melody96:default
+ make ymdk/melody96/soldered:default
Flashing example for this keyboard:
- make ymdk/melody96:default:flash
+ make ymdk/melody96/soldered: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/keychron/q1/iso_encoder/rules.mk b/keyboards/ymdk/melody96/soldered/rules.mk
index d994ac1fad..3d5cb57ad5 100644
--- a/keyboards/keychron/q1/iso_encoder/rules.mk
+++ b/keyboards/ymdk/melody96/soldered/rules.mk
@@ -7,12 +7,6 @@ EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE = no # Console for debug
COMMAND_ENABLE = no # Commands for debug and configuration
NKRO_ENABLE = yes # Enable N-Key Rollover
-BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
-RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
+BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
+RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
AUDIO_ENABLE = no # Audio output
-ENCODER_ENABLE = yes # Enable Encoder
-DIP_SWITCH_ENABLE = yes
-RGB_MATRIX_ENABLE = yes
-RAW_ENABLE = yes
-LTO_ENABLE = yes
-
diff --git a/keyboards/ymdk/sp64/rules.mk b/keyboards/ymdk/sp64/rules.mk
index df9380f361..56da806510 100644
--- a/keyboards/ymdk/sp64/rules.mk
+++ b/keyboards/ymdk/sp64/rules.mk
@@ -14,4 +14,4 @@ RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
CUSTOM_MATRIX = yes
SRC += matrix.c
-QUANTUM_LIB_SRC += i2c_master.c
+I2C_DRIVER_REQUIRED = yes
diff --git a/keyboards/zoo/wampus/config.h b/keyboards/zoo/wampus/config.h
index eafc776bef..e0ddfaca88 100644
--- a/keyboards/zoo/wampus/config.h
+++ b/keyboards/zoo/wampus/config.h
@@ -22,7 +22,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define BACKLIGHT_PAL_MODE 1
// SPI RGB Driver
-#define WS2812_SPI SPID2
+#define WS2812_SPI_DRIVER SPID2
#define WS2812_SPI_MOSI_PAL_MODE 0
#define WS2812_SPI_SCK_PAL_MODE 0
#define WS2812_SPI_SCK_PIN B13
diff --git a/keyboards/zykrah/fuyu/config.h b/keyboards/zykrah/fuyu/config.h
index 0f24dfe7e3..20b0feb523 100644
--- a/keyboards/zykrah/fuyu/config.h
+++ b/keyboards/zykrah/fuyu/config.h
@@ -14,8 +14,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once
-#define DYNAMIC_KEYMAP_LAYER_COUNT 6
-
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 500U
diff --git a/keyboards/zykrah/fuyu/info.json b/keyboards/zykrah/fuyu/info.json
index 874114bfca..5431d14329 100644
--- a/keyboards/zykrah/fuyu/info.json
+++ b/keyboards/zykrah/fuyu/info.json
@@ -19,6 +19,9 @@
"rgb_matrix": true
},
"diode_direction": "COL2ROW",
+ "dynamic_keymap": {
+ "layer_count": 6
+ },
"matrix_pins": {
"rows": ["GP13", "GP12", "GP11", "GP10", "GP15", "GP14"],
"cols": ["GP29", "GP28", "GP26", "GP25", "GP24", "GP23", "GP22", "GP21", "GP20", "GP19", "GP18", "GP17", "GP16", "GP27", "GP9", "GP1", "GP0"]
diff --git a/keyboards/zykrah/fuyu/keymaps/via/keymap.c b/keyboards/zykrah/fuyu/keymaps/via/keymap.c
index 11f33854ce..95eb2692cb 100644
--- a/keyboards/zykrah/fuyu/keymaps/via/keymap.c
+++ b/keyboards/zykrah/fuyu/keymaps/via/keymap.c
@@ -73,15 +73,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// Code for Caps Locks indicator
#if defined(RGB_MATRIX_ENABLE) && defined(CAPS_LOCK_LED_INDEX)
-#define CAPS_LOCK_MAX_BRIGHTNESS 0xFF
-#ifdef RGB_MATRIX_MAXIMUM_BRIGHTNESS
- #undef CAPS_LOCK_MAX_BRIGHTNESS
+#if !defined(CAPS_LOCK_MAX_BRIGHTNESS)
#define CAPS_LOCK_MAX_BRIGHTNESS RGB_MATRIX_MAXIMUM_BRIGHTNESS
#endif
-#define CAPS_LOCK_VAL_STEP 8
-#ifdef RGB_MATRIX_VAL_STEP
- #undef CAPS_LOCK_VAL_STEP
+#if !defined(CAPS_LOCK_VAL_STEP)
#define CAPS_LOCK_VAL_STEP RGB_MATRIX_VAL_STEP
#endif
@@ -106,7 +102,7 @@ bool rgb_matrix_indicators_user(void) {
#if defined(RGB_MATRIX_ENABLE)
#define INDICATOR_RGB_DIVISOR 4
-extern LED_TYPE rgb_matrix_ws2812_array[DRIVER_LED_TOTAL];
+extern rgb_led_t rgb_matrix_ws2812_array[DRIVER_LED_TOTAL];
bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
for (uint8_t i = led_min; i < led_max; i++) {
if (g_led_config.flags[i] & LED_FLAG_INDICATOR) {
diff --git a/keyboards/zykrah/slime88/config.h b/keyboards/zykrah/slime88/config.h
index eb91a14f6e..e1a00bae4a 100644
--- a/keyboards/zykrah/slime88/config.h
+++ b/keyboards/zykrah/slime88/config.h
@@ -14,7 +14,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once
-#define DYNAMIC_KEYMAP_LAYER_COUNT 6
-
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 500U
diff --git a/keyboards/zykrah/slime88/info.json b/keyboards/zykrah/slime88/info.json
index bf1719352d..8b15524cca 100644
--- a/keyboards/zykrah/slime88/info.json
+++ b/keyboards/zykrah/slime88/info.json
@@ -18,6 +18,9 @@
"nkro": true
},
"diode_direction": "COL2ROW",
+ "dynamic_keymap": {
+ "layer_count": 6
+ },
"matrix_pins": {
"rows": ["GP2", "GP29", "GP28", "GP27", "GP11", "GP12"],
"cols": ["GP26", "GP25", "GP24", "GP23", "GP22", "GP21", "GP20", "GP19", "GP18", "GP17", "GP16", "GP15", "GP14", "GP13", "GP0", "GP1", "GP3"]
diff --git a/layouts/community/60_iso/unxmaal/config.h b/layouts/community/60_iso/unxmaal/config.h
index 4606bc8a6d..38384666ee 100644
--- a/layouts/community/60_iso/unxmaal/config.h
+++ b/layouts/community/60_iso/unxmaal/config.h
@@ -17,18 +17,20 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once
-#define WS2812_DI_PIN F4
-#define RGBLIGHT_EFFECT_BREATHING
-#define RGBLIGHT_EFFECT_RAINBOW_MOOD
-#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
-#define RGBLIGHT_EFFECT_SNAKE
-#define RGBLIGHT_EFFECT_KNIGHT
-#define RGBLIGHT_EFFECT_CHRISTMAS
-#define RGBLIGHT_EFFECT_STATIC_GRADIENT
-#define RGBLIGHT_EFFECT_RGB_TEST
-#define RGBLIGHT_EFFECT_ALTERNATING
-#define RGBLIGHT_EFFECT_TWINKLE
- #define RGBLED_NUM 8 // Number of LEDs
- #define RGBLIGHT_HUE_STEP 8
- #define RGBLIGHT_SAT_STEP 8
- #define RGBLIGHT_VAL_STEP 8
+#ifdef KEYBOARD_gh60_revc
+# define WS2812_DI_PIN F4
+# define RGBLIGHT_EFFECT_BREATHING
+# define RGBLIGHT_EFFECT_RAINBOW_MOOD
+# define RGBLIGHT_EFFECT_RAINBOW_SWIRL
+# define RGBLIGHT_EFFECT_SNAKE
+# define RGBLIGHT_EFFECT_KNIGHT
+# define RGBLIGHT_EFFECT_CHRISTMAS
+# define RGBLIGHT_EFFECT_STATIC_GRADIENT
+# define RGBLIGHT_EFFECT_RGB_TEST
+# define RGBLIGHT_EFFECT_ALTERNATING
+# define RGBLIGHT_EFFECT_TWINKLE
+# define RGBLED_NUM 8
+# define RGBLIGHT_HUE_STEP 8
+# define RGBLIGHT_SAT_STEP 8
+# define RGBLIGHT_VAL_STEP 8
+#endif
diff --git a/layouts/default/fullsize_extended_ansi/default_fullsize_extended_ansi/keymap.c b/layouts/default/fullsize_extended_ansi/default_fullsize_extended_ansi/keymap.c
new file mode 100644
index 0000000000..13ade5545d
--- /dev/null
+++ b/layouts/default/fullsize_extended_ansi/default_fullsize_extended_ansi/keymap.c
@@ -0,0 +1,32 @@
+// Copyright 2023 QMK
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#include QMK_KEYBOARD_H
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ /*
+ * ┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐ ┌───┬───┬───┬───┐
+ * │Esc│ │F1 │F2 │F3 │F4 │ │F5 │F6 │F7 │F8 │ │F9 │F10│F11│F12│ │PSc│Scr│Pse│ │Clc│VMT│VDN│VUP│
+ * └───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘ └───┴───┴───┴───┘
+ * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ ┌───┬───┬───┬───┐
+ * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Backsp│ │Ins│Hom│PgU│ │Num│ / │ * │ - │
+ * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ ├───┼───┼───┼───┤
+ * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │ │Del│End│PgD│ │ 7 │ 8 │ 9 │ │
+ * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ └───┴───┴───┘ ├───┼───┼───┤ + │
+ * │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │ │ 4 │ 5 │ 6 │ │
+ * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ ┌───┐ ├───┼───┼───┼───┤
+ * │ Shift │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shift │ │ ↑ │ │ 1 │ 2 │ 3 │ │
+ * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐ ├───┴───┼───┤Ent│
+ * │Ctrl│GUI │Alt │ │ Alt│ GUI│Menu│Ctrl│ │ ← │ ↓ │ → │ │ 0 │ . │ │
+ * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ └───────┴───┴───┘
+ */
+ [0] = LAYOUT_fullsize_extended_ansi(
+ KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SCRL, KC_PAUS, KC_CALC, KC_MUTE, KC_VOLD, KC_VOLU,
+
+ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, KC_NUM, KC_PSLS, KC_PAST, KC_PMNS,
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS,
+ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT,
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT
+ )
+};
diff --git a/layouts/default/fullsize_extended_ansi/info.json b/layouts/default/fullsize_extended_ansi/info.json
new file mode 100644
index 0000000000..55ce7d11f7
--- /dev/null
+++ b/layouts/default/fullsize_extended_ansi/info.json
@@ -0,0 +1,124 @@
+{
+ "keyboard_name": "Fullsize Extended ANSI layout",
+ "url": "",
+ "maintainer": "qmk",
+ "layouts": {
+ "LAYOUT_fullsize_extended_ansi": {
+ "layout": [
+ {"x":0, "y":0},
+ {"x":2, "y":0},
+ {"x":3, "y":0},
+ {"x":4, "y":0},
+ {"x":5, "y":0},
+ {"x":6.5, "y":0},
+ {"x":7.5, "y":0},
+ {"x":8.5, "y":0},
+ {"x":9.5, "y":0},
+ {"x":11, "y":0},
+ {"x":12, "y":0},
+ {"x":13, "y":0},
+ {"x":14, "y":0},
+ {"x":15.25, "y":0},
+ {"x":16.25, "y":0},
+ {"x":17.25, "y":0},
+ {"x":18.5, "y":0},
+ {"x":19.5, "y":0},
+ {"x":20.5, "y":0},
+ {"x":21.5, "y":0},
+
+ {"x":0, "y":1.25},
+ {"x":1, "y":1.25},
+ {"x":2, "y":1.25},
+ {"x":3, "y":1.25},
+ {"x":4, "y":1.25},
+ {"x":5, "y":1.25},
+ {"x":6, "y":1.25},
+ {"x":7, "y":1.25},
+ {"x":8, "y":1.25},
+ {"x":9, "y":1.25},
+ {"x":10, "y":1.25},
+ {"x":11, "y":1.25},
+ {"x":12, "y":1.25},
+ {"x":13, "y":1.25, "w":2},
+ {"x":15.25, "y":1.25},
+ {"x":16.25, "y":1.25},
+ {"x":17.25, "y":1.25},
+ {"x":18.5, "y":1.25},
+ {"x":19.5, "y":1.25},
+ {"x":20.5, "y":1.25},
+ {"x":21.5, "y":1.25},
+
+ {"x":0, "y":2.25, "w":1.5},
+ {"x":1.5, "y":2.25},
+ {"x":2.5, "y":2.25},
+ {"x":3.5, "y":2.25},
+ {"x":4.5, "y":2.25},
+ {"x":5.5, "y":2.25},
+ {"x":6.5, "y":2.25},
+ {"x":7.5, "y":2.25},
+ {"x":8.5, "y":2.25},
+ {"x":9.5, "y":2.25},
+ {"x":10.5, "y":2.25},
+ {"x":11.5, "y":2.25},
+ {"x":12.5, "y":2.25},
+ {"x":13.5, "y":2.25, "w":1.5},
+ {"x":15.25, "y":2.25},
+ {"x":16.25, "y":2.25},
+ {"x":17.25, "y":2.25},
+ {"x":18.5, "y":2.25},
+ {"x":19.5, "y":2.25},
+ {"x":20.5, "y":2.25},
+ {"x":21.5, "y":2.25, "h": 2},
+
+ {"x":0, "y":3.25, "w":1.75},
+ {"x":1.75, "y":3.25},
+ {"x":2.75, "y":3.25},
+ {"x":3.75, "y":3.25},
+ {"x":4.75, "y":3.25},
+ {"x":5.75, "y":3.25},
+ {"x":6.75, "y":3.25},
+ {"x":7.75, "y":3.25},
+ {"x":8.75, "y":3.25},
+ {"x":9.75, "y":3.25},
+ {"x":10.75, "y":3.25},
+ {"x":11.75, "y":3.25},
+ {"x":12.75, "y":3.25, "w":2.25},
+ {"x":18.5, "y":3.25},
+ {"x":19.5, "y":3.25},
+ {"x":20.5, "y":3.25},
+
+ {"x":0, "y":4.25, "w":2.25},
+ {"x":2.25, "y":4.25},
+ {"x":3.25, "y":4.25},
+ {"x":4.25, "y":4.25},
+ {"x":5.25, "y":4.25},
+ {"x":6.25, "y":4.25},
+ {"x":7.25, "y":4.25},
+ {"x":8.25, "y":4.25},
+ {"x":9.25, "y":4.25},
+ {"x":10.25, "y":4.25},
+ {"x":11.25, "y":4.25},
+ {"x":12.25, "y":4.25, "w":2.75},
+ {"x":16.25, "y":4.25},
+ {"x":18.5, "y":4.25},
+ {"x":19.5, "y":4.25},
+ {"x":20.5, "y":4.25},
+ {"x":21.5, "y":4.25, "h":2},
+
+ {"x":0, "y":5.25, "w":1.25},
+ {"x":1.25, "y":5.25, "w":1.25},
+ {"x":2.5, "y":5.25, "w":1.25},
+ {"x":3.75, "y":5.25, "w":6.25},
+ {"x":10, "y":5.25, "w":1.25},
+ {"x":11.25, "y":5.25, "w":1.25},
+ {"x":12.5, "y":5.25, "w":1.25},
+ {"x":13.75, "y":5.25, "w":1.25},
+ {"x":15.25, "y":5.25},
+ {"x":16.25, "y":5.25},
+ {"x":17.25, "y":5.25},
+ {"x":18.5, "y":5.25, "w":2},
+ {"x":20.5, "y":5.25}
+ ]
+ }
+ }
+}
diff --git a/layouts/default/fullsize_extended_ansi/layout.json b/layouts/default/fullsize_extended_ansi/layout.json
new file mode 100644
index 0000000000..b2503d1831
--- /dev/null
+++ b/layouts/default/fullsize_extended_ansi/layout.json
@@ -0,0 +1,6 @@
+[{a:7},"",{x:1},"","","","",{x:0.5},"","","","",{x:0.5},"","","","",{x:0.25},"","","",{x:0.25},"","","",""],
+[{y:0.25},"","","","","","","","","","","","","",{w:2},"",{x:0.25},"","","",{x:0.25},"","","",""],
+[{w:1.5},"","","","","","","","","","","","","",{w:1.5},"",{x:0.25},"","","",{x:0.25},"","","",{h:2},""],
+[{w:1.75},"","","","","","","","","","","","",{w:2.25},"",{x:3.5},"","",""],
+[{w:2.25},"","","","","","","","","","","",{w:2.75},"",{x:1.25},"",{x:1.25},"","","",{h:2},""],
+[{w:1.25},"",{w:1.25},"",{w:1.25},"",{w:6.25},"",{w:1.25},"",{w:1.25},"",{w:1.25},"",{w:1.25},"",{x:0.25},"","","",{x:0.25,w:2},"",""]
diff --git a/layouts/default/fullsize_extended_ansi/readme.md b/layouts/default/fullsize_extended_ansi/readme.md
new file mode 100644
index 0000000000..7cc035cde9
--- /dev/null
+++ b/layouts/default/fullsize_extended_ansi/readme.md
@@ -0,0 +1,3 @@
+# fullsize_extended_ansi
+
+ LAYOUT_fullsize_extended_ansi
diff --git a/layouts/default/fullsize_extended_iso/default_fullsize_extended_iso/keymap.c b/layouts/default/fullsize_extended_iso/default_fullsize_extended_iso/keymap.c
new file mode 100644
index 0000000000..3efe70b4cf
--- /dev/null
+++ b/layouts/default/fullsize_extended_iso/default_fullsize_extended_iso/keymap.c
@@ -0,0 +1,32 @@
+// Copyright 2023 QMK
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#include QMK_KEYBOARD_H
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ /*
+ * ┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐ ┌───┬───┬───┬───┐
+ * │Esc│ │F1 │F2 │F3 │F4 │ │F5 │F6 │F7 │F8 │ │F9 │F10│F11│F12│ │PSc│Scr│Pse│ │Clc│VMT│VDN│VUP│
+ * └───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘ └───┴───┴───┴───┘
+ * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ ┌───┬───┬───┬───┐
+ * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Backsp│ │Ins│Hom│PgU│ │Num│ / │ * │ - │
+ * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ ├───┼───┼───┼───┤
+ * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ │ │Del│End│PgD│ │ 7 │ 8 │ 9 │ │
+ * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ Ent│ └───┴───┴───┘ ├───┼───┼───┤ + │
+ * │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ # │ │ │ 4 │ 5 │ 6 │ │
+ * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ ┌───┐ ├───┼───┼───┼───┤
+ * │Shft│ \ │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shift │ │ ↑ │ │ 1 │ 2 │ 3 │ │
+ * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐ ├───┴───┼───┤Ent│
+ * │Ctrl│GUI │Alt │ │ Alt│ GUI│Menu│Ctrl│ │ ← │ ↓ │ → │ │ 0 │ . │ │
+ * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ └───────┴───┴───┘
+ */
+ [0] = LAYOUT_fullsize_extended_iso(
+ KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SCRL, KC_PAUS, KC_CALC, KC_MUTE, KC_VOLD, KC_VOLU,
+
+ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, KC_NUM, KC_PSLS, KC_PAST, KC_PMNS,
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS,
+ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, KC_P4, KC_P5, KC_P6,
+ KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT,
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT
+ )
+};
diff --git a/layouts/default/fullsize_extended_iso/info.json b/layouts/default/fullsize_extended_iso/info.json
new file mode 100644
index 0000000000..25a0e65b8e
--- /dev/null
+++ b/layouts/default/fullsize_extended_iso/info.json
@@ -0,0 +1,125 @@
+{
+ "keyboard_name": "Fullsize Extended ISO layout",
+ "url": "",
+ "maintainer": "qmk",
+ "layouts": {
+ "LAYOUT_fullsize_extended_iso": {
+ "layout": [
+ {"x":0, "y":0},
+ {"x":2, "y":0},
+ {"x":3, "y":0},
+ {"x":4, "y":0},
+ {"x":5, "y":0},
+ {"x":6.5, "y":0},
+ {"x":7.5, "y":0},
+ {"x":8.5, "y":0},
+ {"x":9.5, "y":0},
+ {"x":11, "y":0},
+ {"x":12, "y":0},
+ {"x":13, "y":0},
+ {"x":14, "y":0},
+ {"x":15.25, "y":0},
+ {"x":16.25, "y":0},
+ {"x":17.25, "y":0},
+ {"x":18.5, "y":0},
+ {"x":19.5, "y":0},
+ {"x":20.5, "y":0},
+ {"x":21.5, "y":0},
+
+ {"x":0, "y":1.25},
+ {"x":1, "y":1.25},
+ {"x":2, "y":1.25},
+ {"x":3, "y":1.25},
+ {"x":4, "y":1.25},
+ {"x":5, "y":1.25},
+ {"x":6, "y":1.25},
+ {"x":7, "y":1.25},
+ {"x":8, "y":1.25},
+ {"x":9, "y":1.25},
+ {"x":10, "y":1.25},
+ {"x":11, "y":1.25},
+ {"x":12, "y":1.25},
+ {"x":13, "y":1.25, "w":2},
+ {"x":15.25, "y":1.25},
+ {"x":16.25, "y":1.25},
+ {"x":17.25, "y":1.25},
+ {"x":18.5, "y":1.25},
+ {"x":19.5, "y":1.25},
+ {"x":20.5, "y":1.25},
+ {"x":21.5, "y":1.25},
+
+ {"x":0, "y":2.25, "w":1.5},
+ {"x":1.5, "y":2.25},
+ {"x":2.5, "y":2.25},
+ {"x":3.5, "y":2.25},
+ {"x":4.5, "y":2.25},
+ {"x":5.5, "y":2.25},
+ {"x":6.5, "y":2.25},
+ {"x":7.5, "y":2.25},
+ {"x":8.5, "y":2.25},
+ {"x":9.5, "y":2.25},
+ {"x":10.5, "y":2.25},
+ {"x":11.5, "y":2.25},
+ {"x":12.5, "y":2.25},
+ {"x":15.25, "y":2.25},
+ {"x":16.25, "y":2.25},
+ {"x":17.25, "y":2.25},
+ {"x":18.5, "y":2.25},
+ {"x":19.5, "y":2.25},
+ {"x":20.5, "y":2.25},
+ {"x":21.5, "y":2.25, "h": 2},
+
+ {"x":0, "y":3.25, "w":1.75},
+ {"x":1.75, "y":3.25},
+ {"x":2.75, "y":3.25},
+ {"x":3.75, "y":3.25},
+ {"x":4.75, "y":3.25},
+ {"x":5.75, "y":3.25},
+ {"x":6.75, "y":3.25},
+ {"x":7.75, "y":3.25},
+ {"x":8.75, "y":3.25},
+ {"x":9.75, "y":3.25},
+ {"x":10.75, "y":3.25},
+ {"x":11.75, "y":3.25},
+ {"x":12.75, "y":3.25},
+ {"x":13.75, "y":2.25, "w":1.25, "h":2},
+ {"x":18.5, "y":3.25},
+ {"x":19.5, "y":3.25},
+ {"x":20.5, "y":3.25},
+
+ {"x":0, "y":4.25, "w":1.25},
+ {"x":1.25, "y":4.25},
+ {"x":2.25, "y":4.25},
+ {"x":3.25, "y":4.25},
+ {"x":4.25, "y":4.25},
+ {"x":5.25, "y":4.25},
+ {"x":6.25, "y":4.25},
+ {"x":7.25, "y":4.25},
+ {"x":8.25, "y":4.25},
+ {"x":9.25, "y":4.25},
+ {"x":10.25, "y":4.25},
+ {"x":11.25, "y":4.25},
+ {"x":12.25, "y":4.25, "w":2.75},
+ {"x":16.25, "y":4.25},
+ {"x":18.5, "y":4.25},
+ {"x":19.5, "y":4.25},
+ {"x":20.5, "y":4.25},
+ {"x":21.5, "y":4.25, "h":2},
+
+ {"x":0, "y":5.25, "w":1.25},
+ {"x":1.25, "y":5.25, "w":1.25},
+ {"x":2.5, "y":5.25, "w":1.25},
+ {"x":3.75, "y":5.25, "w":6.25},
+ {"x":10, "y":5.25, "w":1.25},
+ {"x":11.25, "y":5.25, "w":1.25},
+ {"x":12.5, "y":5.25, "w":1.25},
+ {"x":13.75, "y":5.25, "w":1.25},
+ {"x":15.25, "y":5.25},
+ {"x":16.25, "y":5.25},
+ {"x":17.25, "y":5.25},
+ {"x":18.5, "y":5.25, "w":2},
+ {"x":20.5, "y":5.25}
+ ]
+ }
+ }
+}
diff --git a/layouts/default/fullsize_extended_iso/layout.json b/layouts/default/fullsize_extended_iso/layout.json
new file mode 100644
index 0000000000..c841aec943
--- /dev/null
+++ b/layouts/default/fullsize_extended_iso/layout.json
@@ -0,0 +1,6 @@
+[{a:7},"",{x:1},"","","","",{x:0.5},"","","","",{x:0.5},"","","","",{x:0.25},"","","",{x:0.25},"","","",""],
+[{y:0.25},"","","","","","","","","","","","","",{w:2},"",{x:0.25},"","","",{x:0.25},"","","",""],
+[{w:1.5},"","","","","","","","","","","","","",{x:0.25,w:1.25,h:2,w2:1.5,h2:1,x2:-0.25},"",{x:0.25},"","","",{x:0.25},"","","",{h:2},""],
+[{w:1.75},"","","","","","","","","","","","","",{x:4.75},"","",""],
+[{w:1.25},"","","","","","","","","","","","",{w:2.75},"",{x:1.25},"",{x:1.25},"","","",{h:2},""],
+[{w:1.25},"",{w:1.25},"",{w:1.25},"",{w:6.25},"",{w:1.25},"",{w:1.25},"",{w:1.25},"",{w:1.25},"",{x:0.25},"","","",{x:0.25,w:2},"",""]
diff --git a/layouts/default/fullsize_extended_iso/readme.md b/layouts/default/fullsize_extended_iso/readme.md
new file mode 100644
index 0000000000..8688591ef1
--- /dev/null
+++ b/layouts/default/fullsize_extended_iso/readme.md
@@ -0,0 +1,3 @@
+# fullsize_extended_iso
+
+ LAYOUT_fullsize_extended_iso
diff --git a/layouts/default/fullsize_extended_jis/default_fullsize_extended_jis/keymap.c b/layouts/default/fullsize_extended_jis/default_fullsize_extended_jis/keymap.c
new file mode 100644
index 0000000000..16c78f4b2d
--- /dev/null
+++ b/layouts/default/fullsize_extended_jis/default_fullsize_extended_jis/keymap.c
@@ -0,0 +1,32 @@
+// Copyright 2023 QMK
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#include QMK_KEYBOARD_H
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ /*
+ * ┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐ ┌───┬───┬───┬───┐
+ * │Esc│ │F1 │F2 │F3 │F4 │ │F5 │F6 │F7 │F8 │ │F9 │F10│F11│F12│ │PSc│Scr│Pse│ │Clc│VMT│VDN│VUP│
+ * └───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘ └───┴───┴───┴───┘
+ * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ ┌───┬───┬───┐ ┌───┬───┬───┬───┐
+ * │ZHK│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ ^ │ ¥ │Bsp│ │Ins│Hom│PgU│ │Num│ / │ * │ - │
+ * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ ├───┼───┼───┤ ├───┼───┼───┼───┤
+ * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ @ │ [ │ │ │Del│End│PgD│ │ 7 │ 8 │ 9 │ │
+ * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ Ent│ └───┴───┴───┘ ├───┼───┼───┤ + │
+ * │ Eisu │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ : │ ] │ │ │ 4 │ 5 │ 6 │ │
+ * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┤ ┌───┐ ├───┼───┼───┼───┤
+ * │ Shift │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ \ │ Shft │ │ ↑ │ │ 1 │ 2 │ 3 │ │
+ * ├────┬───┴┬──┴─┬─┴──┬┴───┴───┴───┼───┴┬──┴─┬─┴─┬─┴─┬─┴─┬────┤ ┌───┼───┼───┐ ├───┴───┼───┤Ent│
+ * │Ctrl│GUI │Alt │Mhen│ Space │Henk│Kana│Alt│GUI│App│Ctrl│ │ ← │ ↓ │ → │ │ 0 │ . │ │
+ * └────┴────┴────┴────┴────────────┴────┴────┴───┴───┴───┴────┘ └───┴───┴───┘ └───────┴───┴───┘
+ */
+ [0] = LAYOUT_fullsize_extended_jis(
+ KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SCRL, KC_PAUS, KC_CALC, KC_MUTE, KC_VOLD, KC_VOLU,
+
+ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_INT3, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, KC_NUM, KC_PSLS, KC_PAST, KC_PMNS,
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS,
+ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, KC_P4, KC_P5, KC_P6,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_INT1, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT,
+ KC_LCTL, KC_LGUI, KC_LALT, KC_INT5, KC_SPC, KC_INT4, KC_INT2, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT
+ )
+};
diff --git a/layouts/default/fullsize_extended_jis/info.json b/layouts/default/fullsize_extended_jis/info.json
new file mode 100644
index 0000000000..8267b4c54f
--- /dev/null
+++ b/layouts/default/fullsize_extended_jis/info.json
@@ -0,0 +1,129 @@
+{
+ "keyboard_name": "Fullsize Extended JIS layout",
+ "url": "",
+ "maintainer": "qmk",
+ "layouts": {
+ "LAYOUT_fullsize_extended_jis": {
+ "layout": [
+ {"x": 0, "y": 0},
+ {"x": 2, "y": 0},
+ {"x": 3, "y": 0},
+ {"x": 4, "y": 0},
+ {"x": 5, "y": 0},
+ {"x": 6.5, "y": 0},
+ {"x": 7.5, "y": 0},
+ {"x": 8.5, "y": 0},
+ {"x": 9.5, "y": 0},
+ {"x": 11, "y": 0},
+ {"x": 12, "y": 0},
+ {"x": 13, "y": 0},
+ {"x": 14, "y": 0},
+ {"x": 15.25, "y": 0},
+ {"x": 16.25, "y": 0},
+ {"x": 17.25, "y": 0},
+ {"x":18.5, "y":0},
+ {"x":19.5, "y":0},
+ {"x":20.5, "y":0},
+ {"x":21.5, "y":0},
+
+ {"x": 0, "y": 1.25},
+ {"x": 1, "y": 1.25},
+ {"x": 2, "y": 1.25},
+ {"x": 3, "y": 1.25},
+ {"x": 4, "y": 1.25},
+ {"x": 5, "y": 1.25},
+ {"x": 6, "y": 1.25},
+ {"x": 7, "y": 1.25},
+ {"x": 8, "y": 1.25},
+ {"x": 9, "y": 1.25},
+ {"x": 10, "y": 1.25},
+ {"x": 11, "y": 1.25},
+ {"x": 12, "y": 1.25},
+ {"x": 13, "y": 1.25},
+ {"x": 14, "y": 1.25},
+ {"x": 15.25, "y": 1.25},
+ {"x": 16.25, "y": 1.25},
+ {"x": 17.25, "y": 1.25},
+ {"x": 18.5, "y": 1.25},
+ {"x": 19.5, "y": 1.25},
+ {"x": 20.5, "y": 1.25},
+ {"x": 21.5, "y": 1.25},
+ {"x": 0, "y": 2.25, "w": 1.5},
+
+ {"x": 1.5, "y": 2.25},
+ {"x": 2.5, "y": 2.25},
+ {"x": 3.5, "y": 2.25},
+ {"x": 4.5, "y": 2.25},
+ {"x": 5.5, "y": 2.25},
+ {"x": 6.5, "y": 2.25},
+ {"x": 7.5, "y": 2.25},
+ {"x": 8.5, "y": 2.25},
+ {"x": 9.5, "y": 2.25},
+ {"x": 10.5, "y": 2.25},
+ {"x": 11.5, "y": 2.25},
+ {"x": 12.5, "y": 2.25},
+ {"x": 13.75, "y": 2.25, "w": 1.25, "h": 2},
+ {"x": 15.25, "y": 2.25},
+ {"x": 16.25, "y": 2.25},
+ {"x": 17.25, "y": 2.25},
+ {"x": 18.5, "y": 2.25},
+ {"x": 19.5, "y": 2.25},
+ {"x": 20.5, "y": 2.25},
+ {"x": 21.5, "y": 2.25, "h": 2},
+
+ {"x": 0, "y": 3.25, "w": 1.75},
+ {"x": 1.75, "y": 3.25},
+ {"x": 2.75, "y": 3.25},
+ {"x": 3.75, "y": 3.25},
+ {"x": 4.75, "y": 3.25},
+ {"x": 5.75, "y": 3.25},
+ {"x": 6.75, "y": 3.25},
+ {"x": 7.75, "y": 3.25},
+ {"x": 8.75, "y": 3.25},
+ {"x": 9.75, "y": 3.25},
+ {"x": 10.75, "y": 3.25},
+ {"x": 11.75, "y": 3.25},
+ {"x": 12.75, "y": 3.25},
+ {"x": 18.5, "y": 3.25},
+ {"x": 19.5, "y": 3.25},
+ {"x": 20.5, "y": 3.25},
+
+ {"x": 0, "y": 4.25, "w": 2.25},
+ {"x": 2.25, "y": 4.25},
+ {"x": 3.25, "y": 4.25},
+ {"x": 4.25, "y": 4.25},
+ {"x": 5.25, "y": 4.25},
+ {"x": 6.25, "y": 4.25},
+ {"x": 7.25, "y": 4.25},
+ {"x": 8.25, "y": 4.25},
+ {"x": 9.25, "y": 4.25},
+ {"x": 10.25, "y": 4.25},
+ {"x": 11.25, "y": 4.25},
+ {"x": 12.25, "y": 4.25},
+ {"x": 13.25, "y": 4.25, "w": 1.75},
+ {"x": 16.25, "y": 4.25},
+ {"x": 18.5, "y": 4.25},
+ {"x": 19.5, "y": 4.25},
+ {"x": 20.5, "y": 4.25},
+ {"x": 21.5, "y": 4.25, "h": 2},
+
+ {"x": 0, "y": 5.25, "w": 1.25},
+ {"x": 1.25, "y": 5.25, "w": 1.25},
+ {"x": 2.5, "y": 5.25, "w": 1.25},
+ {"x": 3.75, "y": 5.25, "w": 1.25},
+ {"x": 5, "y": 5.25, "w": 3.25},
+ {"x": 8.25, "y": 5.25, "w": 1.25},
+ {"x": 9.5, "y": 5.25, "w": 1.25},
+ {"x": 10.75, "y": 5.25},
+ {"x": 11.75, "y": 5.25},
+ {"x": 12.75, "y": 5.25},
+ {"x": 13.75, "y": 5.25, "w": 1.25},
+ {"x": 15.25, "y": 5.25},
+ {"x": 16.25, "y": 5.25},
+ {"x": 17.25, "y": 5.25},
+ {"x": 18.5, "y": 5.25, "w": 2},
+ {"x": 20.5, "y": 5.25}
+ ]
+ }
+ }
+}
diff --git a/layouts/default/fullsize_extended_jis/layout.json b/layouts/default/fullsize_extended_jis/layout.json
new file mode 100644
index 0000000000..e5716fe996
--- /dev/null
+++ b/layouts/default/fullsize_extended_jis/layout.json
@@ -0,0 +1,6 @@
+[{a:7},"",{x:1},"","","","",{x:0.5},"","","","",{x:0.5},"","","","",{x:0.25},"","","",{x:0.25},"","","",""],
+[{y:0.25},"","","","","","","","","","","","","","","",{x:0.25},"","","",{x:0.25},"","","",""],
+[{w:1.5},"","","","","","","","","","","","","",{x:0.25,w:1.25,h:2,w2:1.5,h2:1,x2:-0.25},"",{x:0.25},"","","",{x:0.25},"","","",{h:2},""],
+[{w:1.75},"","","","","","","","","","","","","",{x:4.75},"","",""],
+[{w:2.25},"","","","","","","","","","","","",{w:1.75},"",{x:1.25},"",{x:1.25},"","","",{h:2},""],
+[{w:1.25},"",{w:1.25},"",{w:1.25},"",{w:1.25},"",{w:3.25},"",{w:1.25},"",{w:1.25},"","","","",{w:1.25},"",{x:0.25},"","","",{x:0.25,w:2},"",""]
diff --git a/layouts/default/fullsize_extended_jis/readme.md b/layouts/default/fullsize_extended_jis/readme.md
new file mode 100644
index 0000000000..79a00b5084
--- /dev/null
+++ b/layouts/default/fullsize_extended_jis/readme.md
@@ -0,0 +1,3 @@
+# fullsize_extended_jis
+
+ LAYOUT_fullsize_extended_jis
diff --git a/layouts/default/readme.md b/layouts/default/readme.md
index 361fa86792..d5d268ae8b 100644
--- a/layouts/default/readme.md
+++ b/layouts/default/readme.md
@@ -1017,6 +1017,60 @@ LAYOUT_fullsize_jis
└────┴────┴────┴────┴────────────┴────┴────┴───┴───┴───┴────┘ └───┴───┴───┘ └───────┴───┴───┘
```
+```
+LAYOUT_fullsize_extended_ansi
+┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐ ┌───┬───┬───┬───┐
+│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
+└───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘ └───┴───┴───┴───┘
+┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ ┌───┬───┬───┬───┐
+│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
+├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ ├───┼───┼───┼───┤
+│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
+├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ └───┴───┴───┘ ├───┼───┼───┤ │
+│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
+├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ ┌───┐ ├───┼───┼───┼───┤
+│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
+├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐ ├───┴───┼───┤ │
+│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
+└────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ └───────┴───┴───┘
+```
+
+```
+LAYOUT_fullsize_extended_iso
+┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐ ┌───┬───┬───┬───┐
+│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
+└───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘ └───┴───┴───┴───┘
+┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ ┌───┬───┬───┬───┐
+│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
+├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ ├───┼───┼───┼───┤
+│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
+├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ └───┴───┴───┘ ├───┼───┼───┤ │
+│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
+├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ ┌───┐ ├───┼───┼───┼───┤
+│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
+├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐ ├───┴───┼───┤ │
+│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
+└────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ └───────┴───┴───┘
+```
+
+```
+LAYOUT_fullsize_extended_jis
+┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐ ┌───┬───┬───┬───┐
+│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
+└───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘ └───┴───┴───┴───┘
+┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ ┌───┬───┬───┐ ┌───┬───┬───┬───┐
+│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
+├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ ├───┼───┼───┤ ├───┼───┼───┼───┤
+│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
+├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ └───┴───┴───┘ ├───┼───┼───┤ │
+│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
+├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┤ ┌───┐ ├───┼───┼───┼───┤
+│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
+├────┬───┴┬──┴─┬─┴──┬┴───┴───┴───┼───┴┬──┴─┬─┴─┬─┴─┬─┴─┬────┤ ┌───┼───┼───┐ ├───┴───┼───┤ │
+│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
+└────┴────┴────┴────┴────────────┴────┴────┴───┴───┴───┴────┘ └───┴───┴───┘ └───────┴───┴───┘
+```
+
### Split Layouts
```
diff --git a/lib/python/qmk/cli/generate/config_h.py b/lib/python/qmk/cli/generate/config_h.py
index 64d4db6ffe..828785ea48 100755
--- a/lib/python/qmk/cli/generate/config_h.py
+++ b/lib/python/qmk/cli/generate/config_h.py
@@ -15,7 +15,12 @@ from qmk.constants import GPL2_HEADER_C_LIKE, GENERATED_HEADER_C_LIKE
def generate_define(define, value=None):
+ is_keymap = cli.args.filename
value = f' {value}' if value is not None else ''
+ if is_keymap:
+ return f"""
+#undef {define}
+#define {define}{value}"""
return f"""
#ifndef {define}
# define {define}{value}
diff --git a/lib/python/qmk/cli/generate/rules_mk.py b/lib/python/qmk/cli/generate/rules_mk.py
index fc272da6c6..5291556109 100755
--- a/lib/python/qmk/cli/generate/rules_mk.py
+++ b/lib/python/qmk/cli/generate/rules_mk.py
@@ -14,6 +14,12 @@ from qmk.path import normpath, FileType
from qmk.constants import GPL2_HEADER_SH_LIKE, GENERATED_HEADER_SH_LIKE
+def generate_rule(rules_key, rules_value):
+ is_keymap = cli.args.filename
+ rule_assignment_operator = '=' if is_keymap else '?='
+ return f'{rules_key} {rule_assignment_operator} {rules_value}'
+
+
def process_mapping_rule(kb_info_json, rules_key, info_dict):
"""Return the rules.mk line(s) for a mapping rule.
"""
@@ -29,15 +35,15 @@ def process_mapping_rule(kb_info_json, rules_key, info_dict):
return None
if key_type in ['array', 'list']:
- return f'{rules_key} ?= {" ".join(rules_value)}'
+ return generate_rule(rules_key, " ".join(rules_value))
elif key_type == 'bool':
- return f'{rules_key} ?= {"yes" if rules_value else "no"}'
+ return generate_rule(rules_key, "yes" if rules_value else "no")
elif key_type == 'mapping':
- return '\n'.join([f'{key} ?= {value}' for key, value in rules_value.items()])
+ return '\n'.join([generate_rule(key, value) for key, value in rules_value.items()])
elif key_type == 'str':
- return f'{rules_key} ?= "{rules_value}"'
+ return generate_rule(rules_key, f'"{rules_value}"')
- return f'{rules_key} ?= {rules_value}'
+ return generate_rule(rules_key, rules_value)
@cli.argument('filename', nargs='?', arg_only=True, type=FileType('r'), completer=FilesCompleter('.json'), help='A configurator export JSON to be compiled and flashed or a pre-compiled binary firmware file (bin/hex) to be flashed.')
@@ -77,21 +83,21 @@ def generate_rules_mk(cli):
for feature, enabled in kb_info_json['features'].items():
feature = feature.upper()
enabled = 'yes' if enabled else 'no'
- rules_mk_lines.append(f'{feature}_ENABLE ?= {enabled}')
+ rules_mk_lines.append(generate_rule(f'{feature}_ENABLE', enabled))
# Set SPLIT_TRANSPORT, if needed
if kb_info_json.get('split', {}).get('transport', {}).get('protocol') == 'custom':
- rules_mk_lines.append('SPLIT_TRANSPORT ?= custom')
+ rules_mk_lines.append(generate_rule('SPLIT_TRANSPORT', 'custom'))
# Set CUSTOM_MATRIX, if needed
if kb_info_json.get('matrix_pins', {}).get('custom'):
if kb_info_json.get('matrix_pins', {}).get('custom_lite'):
- rules_mk_lines.append('CUSTOM_MATRIX ?= lite')
+ rules_mk_lines.append(generate_rule('CUSTOM_MATRIX', 'lite'))
else:
- rules_mk_lines.append('CUSTOM_MATRIX ?= yes')
+ rules_mk_lines.append(generate_rule('CUSTOM_MATRIX', 'yes'))
if converter:
- rules_mk_lines.append(f'CONVERT_TO ?= {converter}')
+ rules_mk_lines.append(generate_rule('CONVERT_TO', converter))
# Show the results
dump_lines(cli.args.output, rules_mk_lines)
diff --git a/lib/python/qmk/info.py b/lib/python/qmk/info.py
index 9c8521a2a3..265e6a645f 100644
--- a/lib/python/qmk/info.py
+++ b/lib/python/qmk/info.py
@@ -428,6 +428,15 @@ def _extract_split_transport(info_data, config_c):
if 'protocol' not in info_data['split']['transport']:
info_data['split']['transport']['protocol'] = 'serial'
+ # Migrate
+ transport = info_data.get('split', {}).get('transport', {})
+ if 'sync_matrix_state' in transport:
+ transport['sync'] = transport.get('sync', {})
+ transport['sync']['matrix_state'] = transport.pop('sync_matrix_state')
+ if 'sync_modifiers' in transport:
+ transport['sync'] = transport.get('sync', {})
+ transport['sync']['modifiers'] = transport.pop('sync_modifiers')
+
def _extract_split_right_pins(info_data, config_c):
# Figure out the right half matrix pins
@@ -520,6 +529,8 @@ def _config_to_json(key_type, config_value):
return list(map(str.strip, config_value.split(',')))
elif key_type == 'bool':
+ if isinstance(config_value, bool):
+ return config_value
return config_value in true_values
elif key_type == 'hex':
diff --git a/platforms/avr/drivers/ws2812_bitbang.c b/platforms/avr/drivers/ws2812_bitbang.c
index aad10d86b0..116053591f 100644
--- a/platforms/avr/drivers/ws2812_bitbang.c
+++ b/platforms/avr/drivers/ws2812_bitbang.c
@@ -37,13 +37,13 @@
static inline void ws2812_sendarray_mask(uint8_t *data, uint16_t datlen, uint8_t masklo, uint8_t maskhi);
-void ws2812_setleds(LED_TYPE *ledarray, uint16_t number_of_leds) {
+void ws2812_setleds(rgb_led_t *ledarray, uint16_t number_of_leds) {
DDRx_ADDRESS(WS2812_DI_PIN) |= pinmask(WS2812_DI_PIN);
uint8_t masklo = ~(pinmask(WS2812_DI_PIN)) & PORTx_ADDRESS(WS2812_DI_PIN);
uint8_t maskhi = pinmask(WS2812_DI_PIN) | PORTx_ADDRESS(WS2812_DI_PIN);
- ws2812_sendarray_mask((uint8_t *)ledarray, number_of_leds * sizeof(LED_TYPE), masklo, maskhi);
+ ws2812_sendarray_mask((uint8_t *)ledarray, number_of_leds * sizeof(rgb_led_t), masklo, maskhi);
_delay_us(WS2812_TRST_US);
}
diff --git a/platforms/avr/drivers/ws2812_i2c.c b/platforms/avr/drivers/ws2812_i2c.c
index f4a2fbe0b3..f52a037b8e 100644
--- a/platforms/avr/drivers/ws2812_i2c.c
+++ b/platforms/avr/drivers/ws2812_i2c.c
@@ -18,12 +18,12 @@ void ws2812_init(void) {
}
// Setleds for standard RGB
-void ws2812_setleds(LED_TYPE *ledarray, uint16_t leds) {
+void ws2812_setleds(rgb_led_t *ledarray, uint16_t leds) {
static bool s_init = false;
if (!s_init) {
ws2812_init();
s_init = true;
}
- i2c_transmit(WS2812_I2C_ADDRESS, (uint8_t *)ledarray, sizeof(LED_TYPE) * leds, WS2812_I2C_TIMEOUT);
+ i2c_transmit(WS2812_I2C_ADDRESS, (uint8_t *)ledarray, sizeof(rgb_led_t) * leds, WS2812_I2C_TIMEOUT);
}
diff --git a/platforms/avr/flash.mk b/platforms/avr/flash.mk
index 9c2ab72410..51731f0aa8 100644
--- a/platforms/avr/flash.mk
+++ b/platforms/avr/flash.mk
@@ -130,10 +130,10 @@ avrdude-split-right: $(BUILD_DIR)/$(TARGET).hex check-size cpfirmware
$(call EXEC_AVRDUDE,eeprom-righthand.eep)
define EXEC_USBASP
- if $(AVRDUDE_PROGRAMMER) -p $(AVRDUDE_MCU) -c usbasp 2>&1 | grep -q "could not find USB device with"; then \
+ if $(AVRDUDE_PROGRAMMER) -p $(AVRDUDE_MCU) -c usbasp 2>&1 | grep -q "\(could not\|cannot\) find USB device with"; then \
printf "$(MSG_BOOTLOADER_NOT_FOUND_QUICK_RETRY)" ;\
sleep $(BOOTLOADER_RETRY_TIME) ;\
- until $(AVRDUDE_PROGRAMMER) -p $(AVRDUDE_MCU) -c usbasp 2>&1 | (! grep -q "could not find USB device with"); do\
+ until $(AVRDUDE_PROGRAMMER) -p $(AVRDUDE_MCU) -c usbasp 2>&1 | (! grep -q "\(could not\|cannot\) find USB device with"); do\
printf "." ;\
sleep $(BOOTLOADER_RETRY_TIME) ;\
done ;\
diff --git a/platforms/avr/platform.mk b/platforms/avr/platform.mk
index 09028d80af..aef449cadf 100644
--- a/platforms/avr/platform.mk
+++ b/platforms/avr/platform.mk
@@ -109,6 +109,29 @@ DEBUG_HOST = localhost
#============================================================================
+SIZE_MARGIN = 1024
+
+check-size:
+ $(eval MAX_SIZE=$(shell n=`$(CC) -E -mmcu=$(MCU) -D__ASSEMBLER__ $(CFLAGS) $(OPT_DEFS) platforms/avr/bootloader_size.c 2> /dev/null | $(SED) -ne 's/\r//;/^#/n;/^AVR_SIZE:/,$${s/^AVR_SIZE: //;p;}'` && echo $$(($$n)) || echo 0))
+ $(eval CURRENT_SIZE=$(shell if [ -f $(BUILD_DIR)/$(TARGET).hex ]; then $(SIZE) --target=$(FORMAT) $(BUILD_DIR)/$(TARGET).hex | $(AWK) 'NR==2 {print $$4}'; else printf 0; fi))
+ $(eval FREE_SIZE=$(shell expr $(MAX_SIZE) - $(CURRENT_SIZE)))
+ $(eval OVER_SIZE=$(shell expr $(CURRENT_SIZE) - $(MAX_SIZE)))
+ $(eval PERCENT_SIZE=$(shell expr $(CURRENT_SIZE) \* 100 / $(MAX_SIZE)))
+ if [ $(MAX_SIZE) -gt 0 ] && [ $(CURRENT_SIZE) -gt 0 ]; then \
+ $(SILENT) || printf "$(MSG_CHECK_FILESIZE)" | $(AWK_CMD); \
+ if [ $(CURRENT_SIZE) -gt $(MAX_SIZE) ]; then \
+ $(REMOVE) $(TARGET).$(FIRMWARE_FORMAT); \
+ $(REMOVE) $(BUILD_DIR)/$(TARGET).{hex,bin,uf2}; \
+ printf "\n * $(MSG_FILE_TOO_BIG)"; $(PRINT_ERROR_PLAIN); \
+ else \
+ if [ $(FREE_SIZE) -lt $(SIZE_MARGIN) ]; then \
+ $(PRINT_WARNING_PLAIN); printf " * $(MSG_FILE_NEAR_LIMIT)"; \
+ else \
+ $(PRINT_OK); $(SILENT) || printf " * $(MSG_FILE_JUST_RIGHT)"; \
+ fi ; \
+ fi ; \
+ fi
+
# Convert hex to bin.
bin: $(BUILD_DIR)/$(TARGET).hex
ifeq ($(BOOTLOADER),lufa-ms)
diff --git a/platforms/chibios/_pin_defs.h b/platforms/chibios/_pin_defs.h
index 414c9e3d11..e144ef9b0a 100644
--- a/platforms/chibios/_pin_defs.h
+++ b/platforms/chibios/_pin_defs.h
@@ -24,271 +24,272 @@
/* Include the vendor specific pin defs */
#if __has_include_next("_pin_defs.h")
# include_next "_pin_defs.h"
-#endif
+#else
+# define A0 PAL_LINE(GPIOA, 0)
+# define A1 PAL_LINE(GPIOA, 1)
+# define A2 PAL_LINE(GPIOA, 2)
+# define A3 PAL_LINE(GPIOA, 3)
+# define A4 PAL_LINE(GPIOA, 4)
+# define A5 PAL_LINE(GPIOA, 5)
+# define A6 PAL_LINE(GPIOA, 6)
+# define A7 PAL_LINE(GPIOA, 7)
+# define A8 PAL_LINE(GPIOA, 8)
+# define A9 PAL_LINE(GPIOA, 9)
+# define A10 PAL_LINE(GPIOA, 10)
+# define A11 PAL_LINE(GPIOA, 11)
+# define A12 PAL_LINE(GPIOA, 12)
+# define A13 PAL_LINE(GPIOA, 13)
+# define A14 PAL_LINE(GPIOA, 14)
+# define A15 PAL_LINE(GPIOA, 15)
+# define A16 PAL_LINE(GPIOA, 16)
+# define A17 PAL_LINE(GPIOA, 17)
+# define A18 PAL_LINE(GPIOA, 18)
+# define A19 PAL_LINE(GPIOA, 19)
+# define A20 PAL_LINE(GPIOA, 20)
+# define A21 PAL_LINE(GPIOA, 21)
+# define A22 PAL_LINE(GPIOA, 22)
+# define A23 PAL_LINE(GPIOA, 23)
+# define A24 PAL_LINE(GPIOA, 24)
+# define A25 PAL_LINE(GPIOA, 25)
+# define A26 PAL_LINE(GPIOA, 26)
+# define A27 PAL_LINE(GPIOA, 27)
+# define A28 PAL_LINE(GPIOA, 28)
+# define A29 PAL_LINE(GPIOA, 29)
+# define A30 PAL_LINE(GPIOA, 30)
+# define A31 PAL_LINE(GPIOA, 31)
+# define A32 PAL_LINE(GPIOA, 32)
+# define B0 PAL_LINE(GPIOB, 0)
+# define B1 PAL_LINE(GPIOB, 1)
+# define B2 PAL_LINE(GPIOB, 2)
+# define B3 PAL_LINE(GPIOB, 3)
+# define B4 PAL_LINE(GPIOB, 4)
+# define B5 PAL_LINE(GPIOB, 5)
+# define B6 PAL_LINE(GPIOB, 6)
+# define B7 PAL_LINE(GPIOB, 7)
+# define B8 PAL_LINE(GPIOB, 8)
+# define B9 PAL_LINE(GPIOB, 9)
+# define B10 PAL_LINE(GPIOB, 10)
+# define B11 PAL_LINE(GPIOB, 11)
+# define B12 PAL_LINE(GPIOB, 12)
+# define B13 PAL_LINE(GPIOB, 13)
+# define B14 PAL_LINE(GPIOB, 14)
+# define B15 PAL_LINE(GPIOB, 15)
+# define B16 PAL_LINE(GPIOB, 16)
+# define B17 PAL_LINE(GPIOB, 17)
+# define B18 PAL_LINE(GPIOB, 18)
+# define B19 PAL_LINE(GPIOB, 19)
+# define B20 PAL_LINE(GPIOB, 20)
+# define B21 PAL_LINE(GPIOB, 21)
+# define B22 PAL_LINE(GPIOB, 22)
+# define B23 PAL_LINE(GPIOB, 23)
+# define B24 PAL_LINE(GPIOB, 24)
+# define B25 PAL_LINE(GPIOB, 25)
+# define B26 PAL_LINE(GPIOB, 26)
+# define B27 PAL_LINE(GPIOB, 27)
+# define B28 PAL_LINE(GPIOB, 28)
+# define B29 PAL_LINE(GPIOB, 29)
+# define B30 PAL_LINE(GPIOB, 30)
+# define B31 PAL_LINE(GPIOB, 31)
+# define B32 PAL_LINE(GPIOB, 32)
+# define C0 PAL_LINE(GPIOC, 0)
+# define C1 PAL_LINE(GPIOC, 1)
+# define C2 PAL_LINE(GPIOC, 2)
+# define C3 PAL_LINE(GPIOC, 3)
+# define C4 PAL_LINE(GPIOC, 4)
+# define C5 PAL_LINE(GPIOC, 5)
+# define C6 PAL_LINE(GPIOC, 6)
+# define C7 PAL_LINE(GPIOC, 7)
+# define C8 PAL_LINE(GPIOC, 8)
+# define C9 PAL_LINE(GPIOC, 9)
+# define C10 PAL_LINE(GPIOC, 10)
+# define C11 PAL_LINE(GPIOC, 11)
+# define C12 PAL_LINE(GPIOC, 12)
+# define C13 PAL_LINE(GPIOC, 13)
+# define C14 PAL_LINE(GPIOC, 14)
+# define C15 PAL_LINE(GPIOC, 15)
+# define C16 PAL_LINE(GPIOC, 16)
+# define C17 PAL_LINE(GPIOC, 17)
+# define C18 PAL_LINE(GPIOC, 18)
+# define C19 PAL_LINE(GPIOC, 19)
+# define C20 PAL_LINE(GPIOC, 20)
+# define C21 PAL_LINE(GPIOC, 21)
+# define C22 PAL_LINE(GPIOC, 22)
+# define C23 PAL_LINE(GPIOC, 23)
+# define C24 PAL_LINE(GPIOC, 24)
+# define C25 PAL_LINE(GPIOC, 25)
+# define C26 PAL_LINE(GPIOC, 26)
+# define C27 PAL_LINE(GPIOC, 27)
+# define C28 PAL_LINE(GPIOC, 28)
+# define C29 PAL_LINE(GPIOC, 29)
+# define C30 PAL_LINE(GPIOC, 30)
+# define C31 PAL_LINE(GPIOC, 31)
+# define C32 PAL_LINE(GPIOC, 32)
+# define D0 PAL_LINE(GPIOD, 0)
+# define D1 PAL_LINE(GPIOD, 1)
+# define D2 PAL_LINE(GPIOD, 2)
+# define D3 PAL_LINE(GPIOD, 3)
+# define D4 PAL_LINE(GPIOD, 4)
+# define D5 PAL_LINE(GPIOD, 5)
+# define D6 PAL_LINE(GPIOD, 6)
+# define D7 PAL_LINE(GPIOD, 7)
+# define D8 PAL_LINE(GPIOD, 8)
+# define D9 PAL_LINE(GPIOD, 9)
+# define D10 PAL_LINE(GPIOD, 10)
+# define D11 PAL_LINE(GPIOD, 11)
+# define D12 PAL_LINE(GPIOD, 12)
+# define D13 PAL_LINE(GPIOD, 13)
+# define D14 PAL_LINE(GPIOD, 14)
+# define D15 PAL_LINE(GPIOD, 15)
+# define D16 PAL_LINE(GPIOD, 16)
+# define D17 PAL_LINE(GPIOD, 17)
+# define D18 PAL_LINE(GPIOD, 18)
+# define D19 PAL_LINE(GPIOD, 19)
+# define D20 PAL_LINE(GPIOD, 20)
+# define D21 PAL_LINE(GPIOD, 21)
+# define D22 PAL_LINE(GPIOD, 22)
+# define D23 PAL_LINE(GPIOD, 23)
+# define D24 PAL_LINE(GPIOD, 24)
+# define D25 PAL_LINE(GPIOD, 25)
+# define D26 PAL_LINE(GPIOD, 26)
+# define D27 PAL_LINE(GPIOD, 27)
+# define D28 PAL_LINE(GPIOD, 28)
+# define D29 PAL_LINE(GPIOD, 29)
+# define D30 PAL_LINE(GPIOD, 30)
+# define D31 PAL_LINE(GPIOD, 31)
+# define D32 PAL_LINE(GPIOD, 32)
+# define E0 PAL_LINE(GPIOE, 0)
+# define E1 PAL_LINE(GPIOE, 1)
+# define E2 PAL_LINE(GPIOE, 2)
+# define E3 PAL_LINE(GPIOE, 3)
+# define E4 PAL_LINE(GPIOE, 4)
+# define E5 PAL_LINE(GPIOE, 5)
+# define E6 PAL_LINE(GPIOE, 6)
+# define E7 PAL_LINE(GPIOE, 7)
+# define E8 PAL_LINE(GPIOE, 8)
+# define E9 PAL_LINE(GPIOE, 9)
+# define E10 PAL_LINE(GPIOE, 10)
+# define E11 PAL_LINE(GPIOE, 11)
+# define E12 PAL_LINE(GPIOE, 12)
+# define E13 PAL_LINE(GPIOE, 13)
+# define E14 PAL_LINE(GPIOE, 14)
+# define E15 PAL_LINE(GPIOE, 15)
+# define E16 PAL_LINE(GPIOE, 16)
+# define E17 PAL_LINE(GPIOE, 17)
+# define E18 PAL_LINE(GPIOE, 18)
+# define E19 PAL_LINE(GPIOE, 19)
+# define E20 PAL_LINE(GPIOE, 20)
+# define E21 PAL_LINE(GPIOE, 21)
+# define E22 PAL_LINE(GPIOE, 22)
+# define E23 PAL_LINE(GPIOE, 23)
+# define E24 PAL_LINE(GPIOE, 24)
+# define E25 PAL_LINE(GPIOE, 25)
+# define E26 PAL_LINE(GPIOE, 26)
+# define E27 PAL_LINE(GPIOE, 27)
+# define E28 PAL_LINE(GPIOE, 28)
+# define E29 PAL_LINE(GPIOE, 29)
+# define E30 PAL_LINE(GPIOE, 30)
+# define E31 PAL_LINE(GPIOE, 31)
+# define E32 PAL_LINE(GPIOE, 32)
+# define F0 PAL_LINE(GPIOF, 0)
+# define F1 PAL_LINE(GPIOF, 1)
+# define F2 PAL_LINE(GPIOF, 2)
+# define F3 PAL_LINE(GPIOF, 3)
+# define F4 PAL_LINE(GPIOF, 4)
+# define F5 PAL_LINE(GPIOF, 5)
+# define F6 PAL_LINE(GPIOF, 6)
+# define F7 PAL_LINE(GPIOF, 7)
+# define F8 PAL_LINE(GPIOF, 8)
+# define F9 PAL_LINE(GPIOF, 9)
+# define F10 PAL_LINE(GPIOF, 10)
+# define F11 PAL_LINE(GPIOF, 11)
+# define F12 PAL_LINE(GPIOF, 12)
+# define F13 PAL_LINE(GPIOF, 13)
+# define F14 PAL_LINE(GPIOF, 14)
+# define F15 PAL_LINE(GPIOF, 15)
+# define G0 PAL_LINE(GPIOG, 0)
+# define G1 PAL_LINE(GPIOG, 1)
+# define G2 PAL_LINE(GPIOG, 2)
+# define G3 PAL_LINE(GPIOG, 3)
+# define G4 PAL_LINE(GPIOG, 4)
+# define G5 PAL_LINE(GPIOG, 5)
+# define G6 PAL_LINE(GPIOG, 6)
+# define G7 PAL_LINE(GPIOG, 7)
+# define G8 PAL_LINE(GPIOG, 8)
+# define G9 PAL_LINE(GPIOG, 9)
+# define G10 PAL_LINE(GPIOG, 10)
+# define G11 PAL_LINE(GPIOG, 11)
+# define G12 PAL_LINE(GPIOG, 12)
+# define G13 PAL_LINE(GPIOG, 13)
+# define G14 PAL_LINE(GPIOG, 14)
+# define G15 PAL_LINE(GPIOG, 15)
+# define H0 PAL_LINE(GPIOH, 0)
+# define H1 PAL_LINE(GPIOH, 1)
+# define H2 PAL_LINE(GPIOH, 2)
+# define H3 PAL_LINE(GPIOH, 3)
+# define H4 PAL_LINE(GPIOH, 4)
+# define H5 PAL_LINE(GPIOH, 5)
+# define H6 PAL_LINE(GPIOH, 6)
+# define H7 PAL_LINE(GPIOH, 7)
+# define H8 PAL_LINE(GPIOH, 8)
+# define H9 PAL_LINE(GPIOH, 9)
+# define H10 PAL_LINE(GPIOH, 10)
+# define H11 PAL_LINE(GPIOH, 11)
+# define H12 PAL_LINE(GPIOH, 12)
+# define H13 PAL_LINE(GPIOH, 13)
+# define H14 PAL_LINE(GPIOH, 14)
+# define H15 PAL_LINE(GPIOH, 15)
+# define I0 PAL_LINE(GPIOI, 0)
+# define I1 PAL_LINE(GPIOI, 1)
+# define I2 PAL_LINE(GPIOI, 2)
+# define I3 PAL_LINE(GPIOI, 3)
+# define I4 PAL_LINE(GPIOI, 4)
+# define I5 PAL_LINE(GPIOI, 5)
+# define I6 PAL_LINE(GPIOI, 6)
+# define I7 PAL_LINE(GPIOI, 7)
+# define I8 PAL_LINE(GPIOI, 8)
+# define I9 PAL_LINE(GPIOI, 9)
+# define I10 PAL_LINE(GPIOI, 10)
+# define I11 PAL_LINE(GPIOI, 11)
+# define I12 PAL_LINE(GPIOI, 12)
+# define I13 PAL_LINE(GPIOI, 13)
+# define I14 PAL_LINE(GPIOI, 14)
+# define I15 PAL_LINE(GPIOI, 15)
+# define J0 PAL_LINE(GPIOJ, 0)
+# define J1 PAL_LINE(GPIOJ, 1)
+# define J2 PAL_LINE(GPIOJ, 2)
+# define J3 PAL_LINE(GPIOJ, 3)
+# define J4 PAL_LINE(GPIOJ, 4)
+# define J5 PAL_LINE(GPIOJ, 5)
+# define J6 PAL_LINE(GPIOJ, 6)
+# define J7 PAL_LINE(GPIOJ, 7)
+# define J8 PAL_LINE(GPIOJ, 8)
+# define J9 PAL_LINE(GPIOJ, 9)
+# define J10 PAL_LINE(GPIOJ, 10)
+# define J11 PAL_LINE(GPIOJ, 11)
+# define J12 PAL_LINE(GPIOJ, 12)
+# define J13 PAL_LINE(GPIOJ, 13)
+# define J14 PAL_LINE(GPIOJ, 14)
+# define J15 PAL_LINE(GPIOJ, 15)
-#define A0 PAL_LINE(GPIOA, 0)
-#define A1 PAL_LINE(GPIOA, 1)
-#define A2 PAL_LINE(GPIOA, 2)
-#define A3 PAL_LINE(GPIOA, 3)
-#define A4 PAL_LINE(GPIOA, 4)
-#define A5 PAL_LINE(GPIOA, 5)
-#define A6 PAL_LINE(GPIOA, 6)
-#define A7 PAL_LINE(GPIOA, 7)
-#define A8 PAL_LINE(GPIOA, 8)
-#define A9 PAL_LINE(GPIOA, 9)
-#define A10 PAL_LINE(GPIOA, 10)
-#define A11 PAL_LINE(GPIOA, 11)
-#define A12 PAL_LINE(GPIOA, 12)
-#define A13 PAL_LINE(GPIOA, 13)
-#define A14 PAL_LINE(GPIOA, 14)
-#define A15 PAL_LINE(GPIOA, 15)
-#define A16 PAL_LINE(GPIOA, 16)
-#define A17 PAL_LINE(GPIOA, 17)
-#define A18 PAL_LINE(GPIOA, 18)
-#define A19 PAL_LINE(GPIOA, 19)
-#define A20 PAL_LINE(GPIOA, 20)
-#define A21 PAL_LINE(GPIOA, 21)
-#define A22 PAL_LINE(GPIOA, 22)
-#define A23 PAL_LINE(GPIOA, 23)
-#define A24 PAL_LINE(GPIOA, 24)
-#define A25 PAL_LINE(GPIOA, 25)
-#define A26 PAL_LINE(GPIOA, 26)
-#define A27 PAL_LINE(GPIOA, 27)
-#define A28 PAL_LINE(GPIOA, 28)
-#define A29 PAL_LINE(GPIOA, 29)
-#define A30 PAL_LINE(GPIOA, 30)
-#define A31 PAL_LINE(GPIOA, 31)
-#define A32 PAL_LINE(GPIOA, 32)
-#define B0 PAL_LINE(GPIOB, 0)
-#define B1 PAL_LINE(GPIOB, 1)
-#define B2 PAL_LINE(GPIOB, 2)
-#define B3 PAL_LINE(GPIOB, 3)
-#define B4 PAL_LINE(GPIOB, 4)
-#define B5 PAL_LINE(GPIOB, 5)
-#define B6 PAL_LINE(GPIOB, 6)
-#define B7 PAL_LINE(GPIOB, 7)
-#define B8 PAL_LINE(GPIOB, 8)
-#define B9 PAL_LINE(GPIOB, 9)
-#define B10 PAL_LINE(GPIOB, 10)
-#define B11 PAL_LINE(GPIOB, 11)
-#define B12 PAL_LINE(GPIOB, 12)
-#define B13 PAL_LINE(GPIOB, 13)
-#define B14 PAL_LINE(GPIOB, 14)
-#define B15 PAL_LINE(GPIOB, 15)
-#define B16 PAL_LINE(GPIOB, 16)
-#define B17 PAL_LINE(GPIOB, 17)
-#define B18 PAL_LINE(GPIOB, 18)
-#define B19 PAL_LINE(GPIOB, 19)
-#define B20 PAL_LINE(GPIOB, 20)
-#define B21 PAL_LINE(GPIOB, 21)
-#define B22 PAL_LINE(GPIOB, 22)
-#define B23 PAL_LINE(GPIOB, 23)
-#define B24 PAL_LINE(GPIOB, 24)
-#define B25 PAL_LINE(GPIOB, 25)
-#define B26 PAL_LINE(GPIOB, 26)
-#define B27 PAL_LINE(GPIOB, 27)
-#define B28 PAL_LINE(GPIOB, 28)
-#define B29 PAL_LINE(GPIOB, 29)
-#define B30 PAL_LINE(GPIOB, 30)
-#define B31 PAL_LINE(GPIOB, 31)
-#define B32 PAL_LINE(GPIOB, 32)
-#define C0 PAL_LINE(GPIOC, 0)
-#define C1 PAL_LINE(GPIOC, 1)
-#define C2 PAL_LINE(GPIOC, 2)
-#define C3 PAL_LINE(GPIOC, 3)
-#define C4 PAL_LINE(GPIOC, 4)
-#define C5 PAL_LINE(GPIOC, 5)
-#define C6 PAL_LINE(GPIOC, 6)
-#define C7 PAL_LINE(GPIOC, 7)
-#define C8 PAL_LINE(GPIOC, 8)
-#define C9 PAL_LINE(GPIOC, 9)
-#define C10 PAL_LINE(GPIOC, 10)
-#define C11 PAL_LINE(GPIOC, 11)
-#define C12 PAL_LINE(GPIOC, 12)
-#define C13 PAL_LINE(GPIOC, 13)
-#define C14 PAL_LINE(GPIOC, 14)
-#define C15 PAL_LINE(GPIOC, 15)
-#define C16 PAL_LINE(GPIOC, 16)
-#define C17 PAL_LINE(GPIOC, 17)
-#define C18 PAL_LINE(GPIOC, 18)
-#define C19 PAL_LINE(GPIOC, 19)
-#define C20 PAL_LINE(GPIOC, 20)
-#define C21 PAL_LINE(GPIOC, 21)
-#define C22 PAL_LINE(GPIOC, 22)
-#define C23 PAL_LINE(GPIOC, 23)
-#define C24 PAL_LINE(GPIOC, 24)
-#define C25 PAL_LINE(GPIOC, 25)
-#define C26 PAL_LINE(GPIOC, 26)
-#define C27 PAL_LINE(GPIOC, 27)
-#define C28 PAL_LINE(GPIOC, 28)
-#define C29 PAL_LINE(GPIOC, 29)
-#define C30 PAL_LINE(GPIOC, 30)
-#define C31 PAL_LINE(GPIOC, 31)
-#define C32 PAL_LINE(GPIOC, 32)
-#define D0 PAL_LINE(GPIOD, 0)
-#define D1 PAL_LINE(GPIOD, 1)
-#define D2 PAL_LINE(GPIOD, 2)
-#define D3 PAL_LINE(GPIOD, 3)
-#define D4 PAL_LINE(GPIOD, 4)
-#define D5 PAL_LINE(GPIOD, 5)
-#define D6 PAL_LINE(GPIOD, 6)
-#define D7 PAL_LINE(GPIOD, 7)
-#define D8 PAL_LINE(GPIOD, 8)
-#define D9 PAL_LINE(GPIOD, 9)
-#define D10 PAL_LINE(GPIOD, 10)
-#define D11 PAL_LINE(GPIOD, 11)
-#define D12 PAL_LINE(GPIOD, 12)
-#define D13 PAL_LINE(GPIOD, 13)
-#define D14 PAL_LINE(GPIOD, 14)
-#define D15 PAL_LINE(GPIOD, 15)
-#define D16 PAL_LINE(GPIOD, 16)
-#define D17 PAL_LINE(GPIOD, 17)
-#define D18 PAL_LINE(GPIOD, 18)
-#define D19 PAL_LINE(GPIOD, 19)
-#define D20 PAL_LINE(GPIOD, 20)
-#define D21 PAL_LINE(GPIOD, 21)
-#define D22 PAL_LINE(GPIOD, 22)
-#define D23 PAL_LINE(GPIOD, 23)
-#define D24 PAL_LINE(GPIOD, 24)
-#define D25 PAL_LINE(GPIOD, 25)
-#define D26 PAL_LINE(GPIOD, 26)
-#define D27 PAL_LINE(GPIOD, 27)
-#define D28 PAL_LINE(GPIOD, 28)
-#define D29 PAL_LINE(GPIOD, 29)
-#define D30 PAL_LINE(GPIOD, 30)
-#define D31 PAL_LINE(GPIOD, 31)
-#define D32 PAL_LINE(GPIOD, 32)
-#define E0 PAL_LINE(GPIOE, 0)
-#define E1 PAL_LINE(GPIOE, 1)
-#define E2 PAL_LINE(GPIOE, 2)
-#define E3 PAL_LINE(GPIOE, 3)
-#define E4 PAL_LINE(GPIOE, 4)
-#define E5 PAL_LINE(GPIOE, 5)
-#define E6 PAL_LINE(GPIOE, 6)
-#define E7 PAL_LINE(GPIOE, 7)
-#define E8 PAL_LINE(GPIOE, 8)
-#define E9 PAL_LINE(GPIOE, 9)
-#define E10 PAL_LINE(GPIOE, 10)
-#define E11 PAL_LINE(GPIOE, 11)
-#define E12 PAL_LINE(GPIOE, 12)
-#define E13 PAL_LINE(GPIOE, 13)
-#define E14 PAL_LINE(GPIOE, 14)
-#define E15 PAL_LINE(GPIOE, 15)
-#define E16 PAL_LINE(GPIOE, 16)
-#define E17 PAL_LINE(GPIOE, 17)
-#define E18 PAL_LINE(GPIOE, 18)
-#define E19 PAL_LINE(GPIOE, 19)
-#define E20 PAL_LINE(GPIOE, 20)
-#define E21 PAL_LINE(GPIOE, 21)
-#define E22 PAL_LINE(GPIOE, 22)
-#define E23 PAL_LINE(GPIOE, 23)
-#define E24 PAL_LINE(GPIOE, 24)
-#define E25 PAL_LINE(GPIOE, 25)
-#define E26 PAL_LINE(GPIOE, 26)
-#define E27 PAL_LINE(GPIOE, 27)
-#define E28 PAL_LINE(GPIOE, 28)
-#define E29 PAL_LINE(GPIOE, 29)
-#define E30 PAL_LINE(GPIOE, 30)
-#define E31 PAL_LINE(GPIOE, 31)
-#define E32 PAL_LINE(GPIOE, 32)
-#define F0 PAL_LINE(GPIOF, 0)
-#define F1 PAL_LINE(GPIOF, 1)
-#define F2 PAL_LINE(GPIOF, 2)
-#define F3 PAL_LINE(GPIOF, 3)
-#define F4 PAL_LINE(GPIOF, 4)
-#define F5 PAL_LINE(GPIOF, 5)
-#define F6 PAL_LINE(GPIOF, 6)
-#define F7 PAL_LINE(GPIOF, 7)
-#define F8 PAL_LINE(GPIOF, 8)
-#define F9 PAL_LINE(GPIOF, 9)
-#define F10 PAL_LINE(GPIOF, 10)
-#define F11 PAL_LINE(GPIOF, 11)
-#define F12 PAL_LINE(GPIOF, 12)
-#define F13 PAL_LINE(GPIOF, 13)
-#define F14 PAL_LINE(GPIOF, 14)
-#define F15 PAL_LINE(GPIOF, 15)
-#define G0 PAL_LINE(GPIOG, 0)
-#define G1 PAL_LINE(GPIOG, 1)
-#define G2 PAL_LINE(GPIOG, 2)
-#define G3 PAL_LINE(GPIOG, 3)
-#define G4 PAL_LINE(GPIOG, 4)
-#define G5 PAL_LINE(GPIOG, 5)
-#define G6 PAL_LINE(GPIOG, 6)
-#define G7 PAL_LINE(GPIOG, 7)
-#define G8 PAL_LINE(GPIOG, 8)
-#define G9 PAL_LINE(GPIOG, 9)
-#define G10 PAL_LINE(GPIOG, 10)
-#define G11 PAL_LINE(GPIOG, 11)
-#define G12 PAL_LINE(GPIOG, 12)
-#define G13 PAL_LINE(GPIOG, 13)
-#define G14 PAL_LINE(GPIOG, 14)
-#define G15 PAL_LINE(GPIOG, 15)
-#define H0 PAL_LINE(GPIOH, 0)
-#define H1 PAL_LINE(GPIOH, 1)
-#define H2 PAL_LINE(GPIOH, 2)
-#define H3 PAL_LINE(GPIOH, 3)
-#define H4 PAL_LINE(GPIOH, 4)
-#define H5 PAL_LINE(GPIOH, 5)
-#define H6 PAL_LINE(GPIOH, 6)
-#define H7 PAL_LINE(GPIOH, 7)
-#define H8 PAL_LINE(GPIOH, 8)
-#define H9 PAL_LINE(GPIOH, 9)
-#define H10 PAL_LINE(GPIOH, 10)
-#define H11 PAL_LINE(GPIOH, 11)
-#define H12 PAL_LINE(GPIOH, 12)
-#define H13 PAL_LINE(GPIOH, 13)
-#define H14 PAL_LINE(GPIOH, 14)
-#define H15 PAL_LINE(GPIOH, 15)
-#define I0 PAL_LINE(GPIOI, 0)
-#define I1 PAL_LINE(GPIOI, 1)
-#define I2 PAL_LINE(GPIOI, 2)
-#define I3 PAL_LINE(GPIOI, 3)
-#define I4 PAL_LINE(GPIOI, 4)
-#define I5 PAL_LINE(GPIOI, 5)
-#define I6 PAL_LINE(GPIOI, 6)
-#define I7 PAL_LINE(GPIOI, 7)
-#define I8 PAL_LINE(GPIOI, 8)
-#define I9 PAL_LINE(GPIOI, 9)
-#define I10 PAL_LINE(GPIOI, 10)
-#define I11 PAL_LINE(GPIOI, 11)
-#define I12 PAL_LINE(GPIOI, 12)
-#define I13 PAL_LINE(GPIOI, 13)
-#define I14 PAL_LINE(GPIOI, 14)
-#define I15 PAL_LINE(GPIOI, 15)
-#define J0 PAL_LINE(GPIOJ, 0)
-#define J1 PAL_LINE(GPIOJ, 1)
-#define J2 PAL_LINE(GPIOJ, 2)
-#define J3 PAL_LINE(GPIOJ, 3)
-#define J4 PAL_LINE(GPIOJ, 4)
-#define J5 PAL_LINE(GPIOJ, 5)
-#define J6 PAL_LINE(GPIOJ, 6)
-#define J7 PAL_LINE(GPIOJ, 7)
-#define J8 PAL_LINE(GPIOJ, 8)
-#define J9 PAL_LINE(GPIOJ, 9)
-#define J10 PAL_LINE(GPIOJ, 10)
-#define J11 PAL_LINE(GPIOJ, 11)
-#define J12 PAL_LINE(GPIOJ, 12)
-#define J13 PAL_LINE(GPIOJ, 13)
-#define J14 PAL_LINE(GPIOJ, 14)
-#define J15 PAL_LINE(GPIOJ, 15)
// Keyboards can `#define KEYBOARD_REQUIRES_GPIOK` if they need to access GPIO-K pins. These conflict with a whole
// bunch of layout definitions, so it's intentionally left out unless absolutely required -- in that case, the
// keyboard designer should use a different symbol when defining their layout macros.
-#ifdef KEYBOARD_REQUIRES_GPIOK
-# define K0 PAL_LINE(GPIOK, 0)
-# define K1 PAL_LINE(GPIOK, 1)
-# define K2 PAL_LINE(GPIOK, 2)
-# define K3 PAL_LINE(GPIOK, 3)
-# define K4 PAL_LINE(GPIOK, 4)
-# define K5 PAL_LINE(GPIOK, 5)
-# define K6 PAL_LINE(GPIOK, 6)
-# define K7 PAL_LINE(GPIOK, 7)
-# define K8 PAL_LINE(GPIOK, 8)
-# define K9 PAL_LINE(GPIOK, 9)
-# define K10 PAL_LINE(GPIOK, 10)
-# define K11 PAL_LINE(GPIOK, 11)
-# define K12 PAL_LINE(GPIOK, 12)
-# define K13 PAL_LINE(GPIOK, 13)
-# define K14 PAL_LINE(GPIOK, 14)
-# define K15 PAL_LINE(GPIOK, 15)
+# ifdef KEYBOARD_REQUIRES_GPIOK
+# define K0 PAL_LINE(GPIOK, 0)
+# define K1 PAL_LINE(GPIOK, 1)
+# define K2 PAL_LINE(GPIOK, 2)
+# define K3 PAL_LINE(GPIOK, 3)
+# define K4 PAL_LINE(GPIOK, 4)
+# define K5 PAL_LINE(GPIOK, 5)
+# define K6 PAL_LINE(GPIOK, 6)
+# define K7 PAL_LINE(GPIOK, 7)
+# define K8 PAL_LINE(GPIOK, 8)
+# define K9 PAL_LINE(GPIOK, 9)
+# define K10 PAL_LINE(GPIOK, 10)
+# define K11 PAL_LINE(GPIOK, 11)
+# define K12 PAL_LINE(GPIOK, 12)
+# define K13 PAL_LINE(GPIOK, 13)
+# define K14 PAL_LINE(GPIOK, 14)
+# define K15 PAL_LINE(GPIOK, 15)
+# endif
#endif
diff --git a/platforms/chibios/boards/BONSAI_C4/configs/config.h b/platforms/chibios/boards/BONSAI_C4/configs/config.h
index c5dbb25c45..7539ebed41 100644
--- a/platforms/chibios/boards/BONSAI_C4/configs/config.h
+++ b/platforms/chibios/boards/BONSAI_C4/configs/config.h
@@ -66,7 +66,7 @@
#endif
// WS2812-style LED control on pin A10
-#ifdef WS2812_DRIVER_PWM
+#ifdef WS2812_PWM
# ifndef WS2812_DI_PIN
# define WS2812_DI_PIN PAL_LINE(GPIOA, 10)
# endif
diff --git a/platforms/chibios/boards/BONSAI_C4/configs/halconf.h b/platforms/chibios/boards/BONSAI_C4/configs/halconf.h
index 7887e7c9ba..6bab6fbcff 100644
--- a/platforms/chibios/boards/BONSAI_C4/configs/halconf.h
+++ b/platforms/chibios/boards/BONSAI_C4/configs/halconf.h
@@ -32,7 +32,7 @@
# endif
#endif
-#ifdef WS2812_DRIVER_PWM
+#ifdef WS2812_PWM
# ifndef HAL_USE_PWM
# define HAL_USE_PWM TRUE
# endif
diff --git a/platforms/chibios/boards/GENERIC_PROMICRO_RP2040/configs/mcuconf.h b/platforms/chibios/boards/GENERIC_PROMICRO_RP2040/configs/mcuconf.h
index 8621807cbb..4f39793264 100644
--- a/platforms/chibios/boards/GENERIC_PROMICRO_RP2040/configs/mcuconf.h
+++ b/platforms/chibios/boards/GENERIC_PROMICRO_RP2040/configs/mcuconf.h
@@ -54,6 +54,7 @@
#define RP_IRQ_USB0_PRIORITY 3
#define RP_IRQ_I2C0_PRIORITY 2
#define RP_IRQ_I2C1_PRIORITY 2
+#define RP_IRQ_RTC_PRIORITY 3
/*
* ADC driver system settings.
diff --git a/platforms/chibios/boards/GENERIC_RP_RP2040/configs/mcuconf.h b/platforms/chibios/boards/GENERIC_RP_RP2040/configs/mcuconf.h
index 902f9b5005..3a10f67727 100644
--- a/platforms/chibios/boards/GENERIC_RP_RP2040/configs/mcuconf.h
+++ b/platforms/chibios/boards/GENERIC_RP_RP2040/configs/mcuconf.h
@@ -54,6 +54,7 @@
#define RP_IRQ_USB0_PRIORITY 3
#define RP_IRQ_I2C0_PRIORITY 2
#define RP_IRQ_I2C1_PRIORITY 2
+#define RP_IRQ_RTC_PRIORITY 3
/*
* ADC driver system settings.
diff --git a/platforms/chibios/boards/GENERIC_WB32_F3G71XX/board/board.c b/platforms/chibios/boards/GENERIC_WB32_F3G71XX/board/board.c
index f74c9e8be7..80472b88f7 100644
--- a/platforms/chibios/boards/GENERIC_WB32_F3G71XX/board/board.c
+++ b/platforms/chibios/boards/GENERIC_WB32_F3G71XX/board/board.c
@@ -73,6 +73,7 @@ void __early_init(void) {
wb32_clock_init();
wb32_gpio_init();
}
+
/**
* @brief Board-specific initialization code.
* @note You can add your board-specific code here.
@@ -80,7 +81,3 @@ void __early_init(void) {
void boardInit(void) {
}
-
-void restart_usb_driver(USBDriver *usbp) {
- // Do nothing. Restarting the USB driver on these boards breaks it.
-}
diff --git a/platforms/chibios/boards/GENERIC_WB32_FQ95XX/board/board.c b/platforms/chibios/boards/GENERIC_WB32_FQ95XX/board/board.c
index a99537fc27..5701fd2e0d 100644
--- a/platforms/chibios/boards/GENERIC_WB32_FQ95XX/board/board.c
+++ b/platforms/chibios/boards/GENERIC_WB32_FQ95XX/board/board.c
@@ -73,6 +73,7 @@ void __early_init(void) {
wb32_clock_init();
wb32_gpio_init();
}
+
/**
* @brief Board-specific initialization code.
* @note You can add your board-specific code here.
@@ -80,7 +81,3 @@ void __early_init(void) {
void boardInit(void) {
}
-
-void restart_usb_driver(USBDriver *usbp) {
- // Do nothing. Restarting the USB driver on these boards breaks it.
-}
diff --git a/platforms/chibios/boards/QMK_BLOK/configs/mcuconf.h b/platforms/chibios/boards/QMK_BLOK/configs/mcuconf.h
index 0c2ef592d6..d5dec0fcd0 100644
--- a/platforms/chibios/boards/QMK_BLOK/configs/mcuconf.h
+++ b/platforms/chibios/boards/QMK_BLOK/configs/mcuconf.h
@@ -54,6 +54,7 @@
#define RP_IRQ_USB0_PRIORITY 3
#define RP_IRQ_I2C0_PRIORITY 2
#define RP_IRQ_I2C1_PRIORITY 2
+#define RP_IRQ_RTC_PRIORITY 3
/*
* ADC driver system settings.
diff --git a/platforms/chibios/boards/QMK_PM2040/configs/mcuconf.h b/platforms/chibios/boards/QMK_PM2040/configs/mcuconf.h
index 493dcf6434..e3351deb3b 100644
--- a/platforms/chibios/boards/QMK_PM2040/configs/mcuconf.h
+++ b/platforms/chibios/boards/QMK_PM2040/configs/mcuconf.h
@@ -54,6 +54,7 @@
#define RP_IRQ_USB0_PRIORITY 3
#define RP_IRQ_I2C0_PRIORITY 2
#define RP_IRQ_I2C1_PRIORITY 2
+#define RP_IRQ_RTC_PRIORITY 3
/*
* ADC driver system settings.
diff --git a/platforms/chibios/bootloader.mk b/platforms/chibios/bootloader.mk
index fc898e7699..5b6edd73ad 100644
--- a/platforms/chibios/bootloader.mk
+++ b/platforms/chibios/bootloader.mk
@@ -107,6 +107,7 @@ ifeq ($(strip $(BOOTLOADER)), tinyuf2)
endif
ifeq ($(strip $(BOOTLOADER)), uf2boot)
OPT_DEFS += -DBOOTLOADER_UF2BOOT
+ BOARD = STM32_F103_STM32DUINO
BOOTLOADER_TYPE = uf2boot
FIRMWARE_FORMAT = uf2
endif
diff --git a/platforms/chibios/chibios_config.h b/platforms/chibios/chibios_config.h
index 1f8a7842fe..f1636f9da0 100644
--- a/platforms/chibios/chibios_config.h
+++ b/platforms/chibios/chibios_config.h
@@ -37,7 +37,9 @@
# define BACKLIGHT_PAL_MODE (PAL_MODE_ALTERNATE_PWM | PAL_RP_PAD_DRIVE12 | PAL_RP_GPIO_OE)
# endif
# define BACKLIGHT_PWM_COUNTER_FREQUENCY 1000000
-# define BACKLIGHT_PWM_PERIOD BACKLIGHT_PWM_COUNTER_FREQUENCY / 2048
+# ifndef BACKLIGHT_PWM_PERIOD
+# define BACKLIGHT_PWM_PERIOD BACKLIGHT_PWM_COUNTER_FREQUENCY / 2048
+# endif
# ifndef AUDIO_PWM_PAL_MODE
# define AUDIO_PWM_PAL_MODE (PAL_MODE_ALTERNATE_PWM | PAL_RP_PAD_DRIVE12 | PAL_RP_GPIO_OE)
diff --git a/platforms/chibios/drivers/audio_dac_additive.c b/platforms/chibios/drivers/audio_dac_additive.c
index 22e4fa2608..26e044b048 100644
--- a/platforms/chibios/drivers/audio_dac_additive.c
+++ b/platforms/chibios/drivers/audio_dac_additive.c
@@ -84,7 +84,7 @@ static const dacsample_t dac_buffer_trapezoid[AUDIO_DAC_BUFFER_SIZE] = {0x0, 0
0xfff, 0xfdf, 0xf7f, 0xf1f, 0xebf, 0xe5f, 0xdff, 0xd9f, 0xd3f, 0xcdf, 0xc7f, 0xc1f, 0xbbf, 0xb5f, 0xaff, 0xa9f, 0xa3f, 0x9df, 0x97f, 0x91f, 0x8bf, 0x85f, 0x7ff, 0x79f, 0x73f, 0x6df, 0x67f, 0x61f, 0x5bf, 0x55f, 0x4ff, 0x49f, 0x43f, 0x3df, 0x37f, 0x31f, 0x2bf, 0x25f, 0x1ff, 0x19f, 0x13f, 0xdf, 0x7f, 0x1f, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0};
#endif // AUDIO_DAC_SAMPLE_WAVEFORM_TRAPEZOID
-static dacsample_t dac_buffer_empty[AUDIO_DAC_BUFFER_SIZE] = {AUDIO_DAC_OFF_VALUE};
+static dacsample_t dac_buffer[AUDIO_DAC_BUFFER_SIZE];
/* keep track of the sample position for for each frequency */
static float dac_if[AUDIO_MAX_SIMULTANEOUS_TONES] = {0.0};
@@ -121,24 +121,27 @@ __attribute__((weak)) uint16_t dac_value_generate(void) {
/* doing additive wave synthesis over all currently playing tones = adding up
* sine-wave-samples for each frequency, scaled by the number of active tones
*/
- uint16_t value = 0;
- float frequency = 0.0f;
+ uint_fast16_t value = 0;
+ float frequency = 0.0f;
- for (uint8_t i = 0; i < active_tones_snapshot_length; i++) {
+ for (size_t i = 0; i < active_tones_snapshot_length; i++) {
/* Note: a user implementation does not have to rely on the active_tones_snapshot, but
* could directly query the active frequencies through audio_get_processed_frequency */
frequency = active_tones_snapshot[i];
- dac_if[i] = dac_if[i] + ((frequency * AUDIO_DAC_BUFFER_SIZE) / AUDIO_DAC_SAMPLE_RATE) * 2 / 3;
+ float new_dac_if = dac_if[i];
+ new_dac_if += frequency * ((float)AUDIO_DAC_BUFFER_SIZE / AUDIO_DAC_SAMPLE_RATE * 2.0f / 3.0f);
/*Note: the 2/3 are necessary to get the correct frequencies on the
* DAC output (as measured with an oscilloscope), since the gpt
* timer runs with 3*AUDIO_DAC_SAMPLE_RATE; and the DAC callback
* is called twice per conversion.*/
- dac_if[i] = fmodf(dac_if[i], AUDIO_DAC_BUFFER_SIZE);
+ while (new_dac_if >= AUDIO_DAC_BUFFER_SIZE)
+ new_dac_if -= AUDIO_DAC_BUFFER_SIZE;
+ dac_if[i] = new_dac_if;
// Wavetable generation/lookup
- uint16_t dac_i = (uint16_t)dac_if[i];
+ size_t dac_i = (size_t)new_dac_if;
#if defined(AUDIO_DAC_SAMPLE_WAVEFORM_SINE)
value += dac_buffer_sine[dac_i] / active_tones_snapshot_length;
@@ -308,10 +311,17 @@ void audio_driver_initialize(void) {
DACD1.params->dac->CR &= ~DAC_CR_BOFF1;
DACD2.params->dac->CR &= ~DAC_CR_BOFF2;
+ /* Start the DAC output with all off values. This buffer will then get fed
+ * with samples from dac_end, which will play notes.
+ */
+ for (size_t i = 0; i < AUDIO_DAC_BUFFER_SIZE; i++) {
+ dac_buffer[i] = AUDIO_DAC_OFF_VALUE;
+ }
+
if (AUDIO_PIN == A4) {
- dacStartConversion(&DACD1, &dac_conv_cfg, dac_buffer_empty, AUDIO_DAC_BUFFER_SIZE);
+ dacStartConversion(&DACD1, &dac_conv_cfg, dac_buffer, AUDIO_DAC_BUFFER_SIZE);
} else if (AUDIO_PIN == A5) {
- dacStartConversion(&DACD2, &dac_conv_cfg, dac_buffer_empty, AUDIO_DAC_BUFFER_SIZE);
+ dacStartConversion(&DACD2, &dac_conv_cfg, dac_buffer, AUDIO_DAC_BUFFER_SIZE);
}
// no inverted/out-of-phase waveform (yet?), only pulling AUDIO_PIN_ALT to AUDIO_DAC_OFF_VALUE
diff --git a/platforms/chibios/drivers/eeprom/eeprom_kinetis_flexram.c b/platforms/chibios/drivers/eeprom/eeprom_kinetis_flexram.c
index 6468cbf3fa..9cf956b2f7 100644
--- a/platforms/chibios/drivers/eeprom/eeprom_kinetis_flexram.c
+++ b/platforms/chibios/drivers/eeprom/eeprom_kinetis_flexram.c
@@ -146,7 +146,7 @@ uint32_t eeprom_read_dword(const uint32_t *addr) {
*
* FIXME: needs doc
*/
-void eeprom_read_block(void *buf, const void *addr, uint32_t len) {
+void eeprom_read_block(void *buf, const void *addr, size_t len) {
uint32_t offset = (uint32_t)addr;
uint8_t *dest = (uint8_t *)buf;
uint32_t end = offset + len;
@@ -271,7 +271,7 @@ void eeprom_write_dword(uint32_t *addr, uint32_t value) {
*
* FIXME: needs doc
*/
-void eeprom_write_block(const void *buf, void *addr, uint32_t len) {
+void eeprom_write_block(const void *buf, void *addr, size_t len) {
uint32_t offset = (uint32_t)addr;
const uint8_t *src = (const uint8_t *)buf;
@@ -480,7 +480,7 @@ uint32_t eeprom_read_dword(const uint32_t *addr) {
return eeprom_read_byte(p) | (eeprom_read_byte(p + 1) << 8) | (eeprom_read_byte(p + 2) << 16) | (eeprom_read_byte(p + 3) << 24);
}
-void eeprom_read_block(void *buf, const void *addr, uint32_t len) {
+void eeprom_read_block(void *buf, const void *addr, size_t len) {
const uint8_t *p = (const uint8_t *)addr;
uint8_t * dest = (uint8_t *)buf;
while (len--) {
@@ -506,7 +506,7 @@ void eeprom_write_dword(uint32_t *addr, uint32_t value) {
eeprom_write_byte(p, value >> 24);
}
-void eeprom_write_block(const void *buf, void *addr, uint32_t len) {
+void eeprom_write_block(const void *buf, void *addr, size_t len) {
uint8_t * p = (uint8_t *)addr;
const uint8_t *src = (const uint8_t *)buf;
while (len--) {
diff --git a/platforms/chibios/drivers/serial.c b/platforms/chibios/drivers/serial.c
index f087d0c2ed..f199716a2b 100644
--- a/platforms/chibios/drivers/serial.c
+++ b/platforms/chibios/drivers/serial.c
@@ -10,7 +10,7 @@
#include <hal.h>
// TODO: resolve/remove build warnings
-#if defined(RGBLIGHT_ENABLE) && defined(RGBLED_SPLIT) && defined(PROTOCOL_CHIBIOS) && defined(WS2812_DRIVER_BITBANG)
+#if defined(RGBLIGHT_ENABLE) && defined(RGBLED_SPLIT) && defined(PROTOCOL_CHIBIOS) && defined(WS2812_BITBANG)
# warning "RGBLED_SPLIT not supported with bitbang WS2812 driver"
#endif
diff --git a/platforms/chibios/drivers/spi_master.c b/platforms/chibios/drivers/spi_master.c
index c3ab0623f0..481a2e422a 100644
--- a/platforms/chibios/drivers/spi_master.c
+++ b/platforms/chibios/drivers/spi_master.c
@@ -18,14 +18,14 @@
#include "timer.h"
-static pin_t currentSlavePin = NO_PIN;
+static bool spiStarted = false;
-#if defined(K20x) || defined(KL2x) || defined(RP2040)
-static SPIConfig spiConfig = {NULL, 0, 0, 0};
-#else
-static SPIConfig spiConfig = {false, NULL, 0, 0, 0, 0};
+#if SPI_SELECT_MODE == SPI_SELECT_MODE_NONE
+static pin_t currentSlavePin;
#endif
+static SPIConfig spiConfig;
+
__attribute__((weak)) void spi_init(void) {
static bool is_initialised = false;
if (!is_initialised) {
@@ -33,28 +33,45 @@ __attribute__((weak)) void spi_init(void) {
// Try releasing special pins for a short time
setPinInput(SPI_SCK_PIN);
- setPinInput(SPI_MOSI_PIN);
- setPinInput(SPI_MISO_PIN);
+ if (SPI_MOSI_PIN != NO_PIN) {
+ setPinInput(SPI_MOSI_PIN);
+ }
+ if (SPI_MISO_PIN != NO_PIN) {
+ setPinInput(SPI_MISO_PIN);
+ }
chThdSleepMilliseconds(10);
#if defined(USE_GPIOV1)
palSetPadMode(PAL_PORT(SPI_SCK_PIN), PAL_PAD(SPI_SCK_PIN), SPI_SCK_PAL_MODE);
- palSetPadMode(PAL_PORT(SPI_MOSI_PIN), PAL_PAD(SPI_MOSI_PIN), SPI_MOSI_PAL_MODE);
- palSetPadMode(PAL_PORT(SPI_MISO_PIN), PAL_PAD(SPI_MISO_PIN), SPI_MISO_PAL_MODE);
+ if (SPI_MOSI_PIN != NO_PIN) {
+ palSetPadMode(PAL_PORT(SPI_MOSI_PIN), PAL_PAD(SPI_MOSI_PIN), SPI_MOSI_PAL_MODE);
+ }
+ if (SPI_MISO_PIN != NO_PIN) {
+ palSetPadMode(PAL_PORT(SPI_MISO_PIN), PAL_PAD(SPI_MISO_PIN), SPI_MISO_PAL_MODE);
+ }
#else
palSetPadMode(PAL_PORT(SPI_SCK_PIN), PAL_PAD(SPI_SCK_PIN), SPI_SCK_FLAGS);
- palSetPadMode(PAL_PORT(SPI_MOSI_PIN), PAL_PAD(SPI_MOSI_PIN), SPI_MOSI_FLAGS);
- palSetPadMode(PAL_PORT(SPI_MISO_PIN), PAL_PAD(SPI_MISO_PIN), SPI_MISO_FLAGS);
+ if (SPI_MOSI_PIN != NO_PIN) {
+ palSetPadMode(PAL_PORT(SPI_MOSI_PIN), PAL_PAD(SPI_MOSI_PIN), SPI_MOSI_FLAGS);
+ }
+ if (SPI_MISO_PIN != NO_PIN) {
+ palSetPadMode(PAL_PORT(SPI_MISO_PIN), PAL_PAD(SPI_MISO_PIN), SPI_MISO_FLAGS);
+ }
#endif
spiStop(&SPI_DRIVER);
- currentSlavePin = NO_PIN;
+ spiStarted = false;
}
}
bool spi_start(pin_t slavePin, bool lsbFirst, uint8_t mode, uint16_t divisor) {
- if (currentSlavePin != NO_PIN || slavePin == NO_PIN) {
+ if (spiStarted) {
+ return false;
+ }
+#if SPI_SELECT_MODE != SPI_SELECT_MODE_NONE
+ if (slavePin == NO_PIN) {
return false;
}
+#endif
#if !(defined(WB32F3G71xx) || defined(WB32FQ95xx))
uint16_t roundedDivisor = 2;
@@ -247,13 +264,29 @@ bool spi_start(pin_t slavePin, bool lsbFirst, uint8_t mode, uint16_t divisor) {
}
#endif
- currentSlavePin = slavePin;
+ spiStarted = true;
+#if SPI_SELECT_MODE == SPI_SELECT_MODE_NONE
+ currentSlavePin = slavePin;
+#endif
+#if SPI_SELECT_MODE == SPI_SELECT_MODE_PAD
spiConfig.ssport = PAL_PORT(slavePin);
spiConfig.sspad = PAL_PAD(slavePin);
-
setPinOutput(slavePin);
+#elif SPI_SELECT_MODE == SPI_SELECT_MODE_NONE
+ if (slavePin != NO_PIN) {
+ setPinOutput(slavePin);
+ }
+#else
+# error "Unsupported SPI_SELECT_MODE"
+#endif
+
spiStart(&SPI_DRIVER, &spiConfig);
spiSelect(&SPI_DRIVER);
+#if SPI_SELECT_MODE == SPI_SELECT_MODE_NONE
+ if (slavePin != NO_PIN) {
+ writePinLow(slavePin);
+ }
+#endif
return true;
}
@@ -283,9 +316,14 @@ spi_status_t spi_receive(uint8_t *data, uint16_t length) {
}
void spi_stop(void) {
- if (currentSlavePin != NO_PIN) {
+ if (spiStarted) {
+#if SPI_SELECT_MODE == SPI_SELECT_MODE_NONE
+ if (currentSlavePin != NO_PIN) {
+ writePinHigh(currentSlavePin);
+ }
+#endif
spiUnselect(&SPI_DRIVER);
spiStop(&SPI_DRIVER);
- currentSlavePin = NO_PIN;
+ spiStarted = false;
}
}
diff --git a/platforms/chibios/drivers/vendor/RP/RP2040/ws2812_vendor.c b/platforms/chibios/drivers/vendor/RP/RP2040/ws2812_vendor.c
index 8d59e13bb2..de317e269a 100644
--- a/platforms/chibios/drivers/vendor/RP/RP2040/ws2812_vendor.c
+++ b/platforms/chibios/drivers/vendor/RP/RP2040/ws2812_vendor.c
@@ -268,7 +268,7 @@ static inline void sync_ws2812_transfer(void) {
busy_wait_until(LAST_TRANSFER);
}
-void ws2812_setleds(LED_TYPE* ledarray, uint16_t leds) {
+void ws2812_setleds(rgb_led_t* ledarray, uint16_t leds) {
static bool is_initialized = false;
if (unlikely(!is_initialized)) {
is_initialized = ws2812_init();
diff --git a/platforms/chibios/drivers/wear_leveling/wear_leveling_efl_config.h b/platforms/chibios/drivers/wear_leveling/wear_leveling_efl_config.h
index e74cf85efd..0f0fa694e9 100644
--- a/platforms/chibios/drivers/wear_leveling/wear_leveling_efl_config.h
+++ b/platforms/chibios/drivers/wear_leveling/wear_leveling_efl_config.h
@@ -50,5 +50,5 @@
// 1kB logical EEPROM
#ifndef WEAR_LEVELING_LOGICAL_SIZE
-# define WEAR_LEVELING_LOGICAL_SIZE 1024
+# define WEAR_LEVELING_LOGICAL_SIZE ((WEAR_LEVELING_BACKING_SIZE) / 2)
#endif // WEAR_LEVELING_LOGICAL_SIZE
diff --git a/platforms/chibios/drivers/wear_leveling/wear_leveling_rp2040_flash.c b/platforms/chibios/drivers/wear_leveling/wear_leveling_rp2040_flash.c
index 640628e1e9..6624c30b5b 100644
--- a/platforms/chibios/drivers/wear_leveling/wear_leveling_rp2040_flash.c
+++ b/platforms/chibios/drivers/wear_leveling/wear_leveling_rp2040_flash.c
@@ -25,8 +25,8 @@
#define FLASHCMD_READ_STATUS 0x05
#define FLASHCMD_WRITE_ENABLE 0x06
-extern uint8_t BOOT2_ROM[256];
-static uint32_t BOOT2_ROM_RAM[64];
+extern const uint8_t BOOT2_ROM[256];
+static uint32_t BOOT2_ROM_RAM[64];
static ssi_hw_t *const ssi = (ssi_hw_t *)XIP_SSI_BASE;
diff --git a/platforms/chibios/drivers/wear_leveling/wear_leveling_rp2040_flash_config.h b/platforms/chibios/drivers/wear_leveling/wear_leveling_rp2040_flash_config.h
index 93a9aa0372..e1e2433601 100644
--- a/platforms/chibios/drivers/wear_leveling/wear_leveling_rp2040_flash_config.h
+++ b/platforms/chibios/drivers/wear_leveling/wear_leveling_rp2040_flash_config.h
@@ -18,7 +18,7 @@
// 32kB logical EEPROM
#ifndef WEAR_LEVELING_LOGICAL_SIZE
-# define WEAR_LEVELING_LOGICAL_SIZE 4096
+# define WEAR_LEVELING_LOGICAL_SIZE ((WEAR_LEVELING_BACKING_SIZE) / 2)
#endif // WEAR_LEVELING_LOGICAL_SIZE
// Define how much flash space we have (defaults to lib/pico-sdk/src/boards/include/boards/***)
diff --git a/platforms/chibios/drivers/ws2812_bitbang.c b/platforms/chibios/drivers/ws2812_bitbang.c
index c55e0f654c..e3b735a1a6 100644
--- a/platforms/chibios/drivers/ws2812_bitbang.c
+++ b/platforms/chibios/drivers/ws2812_bitbang.c
@@ -72,7 +72,7 @@ void ws2812_init(void) {
}
// Setleds for standard RGB
-void ws2812_setleds(LED_TYPE *ledarray, uint16_t leds) {
+void ws2812_setleds(rgb_led_t *ledarray, uint16_t leds) {
static bool s_init = false;
if (!s_init) {
ws2812_init();
diff --git a/platforms/chibios/drivers/ws2812_pwm.c b/platforms/chibios/drivers/ws2812_pwm.c
index cfee547a82..440687bd72 100644
--- a/platforms/chibios/drivers/ws2812_pwm.c
+++ b/platforms/chibios/drivers/ws2812_pwm.c
@@ -379,7 +379,7 @@ void ws2812_write_led_rgbw(uint16_t led_number, uint8_t r, uint8_t g, uint8_t b,
}
// Setleds for standard RGB
-void ws2812_setleds(LED_TYPE* ledarray, uint16_t leds) {
+void ws2812_setleds(rgb_led_t* ledarray, uint16_t leds) {
static bool s_init = false;
if (!s_init) {
ws2812_init();
diff --git a/platforms/chibios/drivers/ws2812_spi.c b/platforms/chibios/drivers/ws2812_spi.c
index f188576e04..01162f07f4 100644
--- a/platforms/chibios/drivers/ws2812_spi.c
+++ b/platforms/chibios/drivers/ws2812_spi.c
@@ -6,8 +6,8 @@
/* Adapted from https://github.com/gamazeps/ws2812b-chibios-SPIDMA/ */
// Define the spi your LEDs are plugged to here
-#ifndef WS2812_SPI
-# define WS2812_SPI SPID1
+#ifndef WS2812_SPI_DRIVER
+# define WS2812_SPI_DRIVER SPID1
#endif
#ifndef WS2812_SPI_MOSI_PAL_MODE
@@ -106,7 +106,7 @@ static uint8_t get_protocol_eq(uint8_t data, int pos) {
return eq;
}
-static void set_led_color_rgb(LED_TYPE color, int pos) {
+static void set_led_color_rgb(rgb_led_t color, int pos) {
uint8_t* tx_start = &txbuf[PREAMBLE_SIZE];
#if (WS2812_BYTE_ORDER == WS2812_BYTE_ORDER_GRB)
@@ -179,15 +179,15 @@ void ws2812_init(void) {
#endif
};
- spiAcquireBus(&WS2812_SPI); /* Acquire ownership of the bus. */
- spiStart(&WS2812_SPI, &spicfg); /* Setup transfer parameters. */
- spiSelect(&WS2812_SPI); /* Slave Select assertion. */
+ spiAcquireBus(&WS2812_SPI_DRIVER); /* Acquire ownership of the bus. */
+ spiStart(&WS2812_SPI_DRIVER, &spicfg); /* Setup transfer parameters. */
+ spiSelect(&WS2812_SPI_DRIVER); /* Slave Select assertion. */
#ifdef WS2812_SPI_USE_CIRCULAR_BUFFER
- spiStartSend(&WS2812_SPI, ARRAY_SIZE(txbuf), txbuf);
+ spiStartSend(&WS2812_SPI_DRIVER, ARRAY_SIZE(txbuf), txbuf);
#endif
}
-void ws2812_setleds(LED_TYPE* ledarray, uint16_t leds) {
+void ws2812_setleds(rgb_led_t* ledarray, uint16_t leds) {
static bool s_init = false;
if (!s_init) {
ws2812_init();
@@ -202,9 +202,9 @@ void ws2812_setleds(LED_TYPE* ledarray, uint16_t leds) {
// Instead spiSend can be used to send synchronously (or the thread logic can be added back).
#ifndef WS2812_SPI_USE_CIRCULAR_BUFFER
# ifdef WS2812_SPI_SYNC
- spiSend(&WS2812_SPI, ARRAY_SIZE(txbuf), txbuf);
+ spiSend(&WS2812_SPI_DRIVER, ARRAY_SIZE(txbuf), txbuf);
# else
- spiStartSend(&WS2812_SPI, ARRAY_SIZE(txbuf), txbuf);
+ spiStartSend(&WS2812_SPI_DRIVER, ARRAY_SIZE(txbuf), txbuf);
# endif
#endif
}
diff --git a/platforms/chibios/vendors/RP/stage2_bootloaders.c b/platforms/chibios/vendors/RP/stage2_bootloaders.c
index e65b0a5802..131fa0ce9e 100644
--- a/platforms/chibios/vendors/RP/stage2_bootloaders.c
+++ b/platforms/chibios/vendors/RP/stage2_bootloaders.c
@@ -13,7 +13,7 @@
#if defined(RP2040_FLASH_AT25SF128A)
-uint8_t BOOTLOADER_SECTION BOOT2_ROM[256] = {
+const uint8_t BOOTLOADER_SECTION BOOT2_ROM[256] = {
0x00, 0xb5, 0x31, 0x4b, 0x21, 0x20, 0x58, 0x60, 0x98, 0x68, 0x02, 0x21,
0x88, 0x43, 0x98, 0x60, 0xd8, 0x60, 0x18, 0x61, 0x58, 0x61, 0x2d, 0x4b,
0x00, 0x21, 0x99, 0x60, 0x04, 0x21, 0x59, 0x61, 0x01, 0x21, 0xf0, 0x22,
@@ -40,7 +40,7 @@ uint8_t BOOTLOADER_SECTION BOOT2_ROM[256] = {
#elif defined(RP2040_FLASH_GD25Q64CS)
-uint8_t BOOTLOADER_SECTION BOOT2_ROM[256] = {
+const uint8_t BOOTLOADER_SECTION BOOT2_ROM[256] = {
0x00, 0xb5, 0x31, 0x4b, 0x21, 0x20, 0x58, 0x60, 0x98, 0x68, 0x02, 0x21,
0x88, 0x43, 0x98, 0x60, 0xd8, 0x60, 0x18, 0x61, 0x58, 0x61, 0x2d, 0x4b,
0x00, 0x21, 0x99, 0x60, 0x04, 0x21, 0x59, 0x61, 0x01, 0x21, 0xf0, 0x22,
@@ -67,7 +67,7 @@ uint8_t BOOTLOADER_SECTION BOOT2_ROM[256] = {
#elif defined(RP2040_FLASH_W25X10CL)
-uint8_t BOOTLOADER_SECTION BOOT2_ROM[256] = {
+const uint8_t BOOTLOADER_SECTION BOOT2_ROM[256] = {
0x00, 0xb5, 0x14, 0x4b, 0x00, 0x21, 0x99, 0x60, 0x04, 0x21, 0x59, 0x61,
0x12, 0x49, 0x19, 0x60, 0x00, 0x21, 0x59, 0x60, 0x11, 0x49, 0x12, 0x48,
0x01, 0x60, 0x01, 0x21, 0x99, 0x60, 0xbb, 0x21, 0x19, 0x66, 0x02, 0x21,
@@ -94,7 +94,7 @@ uint8_t BOOTLOADER_SECTION BOOT2_ROM[256] = {
#elif defined(RP2040_FLASH_IS25LP080)
-uint8_t BOOTLOADER_SECTION BOOT2_ROM[256] = {
+const uint8_t BOOTLOADER_SECTION BOOT2_ROM[256] = {
0x00, 0xb5, 0x2b, 0x4b, 0x00, 0x21, 0x99, 0x60, 0x04, 0x21, 0x59, 0x61,
0x29, 0x49, 0x19, 0x60, 0x01, 0x21, 0x99, 0x60, 0x28, 0x48, 0x00, 0xf0,
0x42, 0xf8, 0x28, 0x4a, 0x90, 0x42, 0x12, 0xd0, 0x06, 0x21, 0x19, 0x66,
@@ -121,7 +121,7 @@ uint8_t BOOTLOADER_SECTION BOOT2_ROM[256] = {
#elif defined(RP2040_FLASH_GENERIC_03H)
-uint8_t BOOTLOADER_SECTION BOOT2_ROM[256] = {
+const uint8_t BOOTLOADER_SECTION BOOT2_ROM[256] = {
0x00, 0xb5, 0x0c, 0x4b, 0x00, 0x21, 0x99, 0x60, 0x04, 0x21, 0x59, 0x61,
0x0a, 0x49, 0x19, 0x60, 0x0a, 0x49, 0x0b, 0x48, 0x01, 0x60, 0x00, 0x21,
0x59, 0x60, 0x01, 0x21, 0x99, 0x60, 0x01, 0xbc, 0x00, 0x28, 0x00, 0xd0,
@@ -148,7 +148,7 @@ uint8_t BOOTLOADER_SECTION BOOT2_ROM[256] = {
#else
-uint8_t BOOTLOADER_SECTION BOOT2_ROM[256] = {
+const uint8_t BOOTLOADER_SECTION BOOT2_ROM[256] = {
0x00, 0xb5, 0x32, 0x4b, 0x21, 0x20, 0x58, 0x60, 0x98, 0x68, 0x02, 0x21,
0x88, 0x43, 0x98, 0x60, 0xd8, 0x60, 0x18, 0x61, 0x58, 0x61, 0x2e, 0x4b,
0x00, 0x21, 0x99, 0x60, 0x04, 0x21, 0x59, 0x61, 0x01, 0x21, 0xf0, 0x22,
diff --git a/platforms/test/timer.c b/platforms/test/timer.c
index 320cc57782..eb929d7dac 100644
--- a/platforms/test/timer.c
+++ b/platforms/test/timer.c
@@ -17,34 +17,65 @@
#include "timer.h"
#include <stdatomic.h>
-static atomic_uint_least32_t current_time = 0;
+static atomic_uint_least32_t current_time = 0;
+static atomic_uint_least32_t async_tick_amount = 0;
+static atomic_uint_least32_t access_counter = 0;
+
+void simulate_async_tick(uint32_t t) {
+ async_tick_amount = t;
+}
+
+uint32_t timer_read_internal(void) {
+ return current_time;
+}
+
+uint32_t current_access_counter(void) {
+ return access_counter;
+}
+
+void reset_access_counter(void) {
+ access_counter = 0;
+}
void timer_init(void) {
- current_time = 0;
+ current_time = 0;
+ async_tick_amount = 0;
+ access_counter = 0;
}
void timer_clear(void) {
- current_time = 0;
+ current_time = 0;
+ async_tick_amount = 0;
+ access_counter = 0;
}
uint16_t timer_read(void) {
- return current_time & 0xFFFF;
+ return (uint16_t)timer_read32();
}
+
uint32_t timer_read32(void) {
+ if (access_counter++ > 0) {
+ current_time += async_tick_amount;
+ }
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;
+ current_time = t;
+ access_counter = 0;
}
+
void advance_time(uint32_t ms) {
current_time += ms;
+ access_counter = 0;
}
void wait_ms(uint32_t ms) {
diff --git a/quantum/action.c b/quantum/action.c
index 6368f7398c..349250472b 100644
--- a/quantum/action.c
+++ b/quantum/action.c
@@ -374,7 +374,7 @@ void process_action(keyrecord_t *record, action_t action) {
if (is_oneshot_layer_active() && event.pressed &&
(action.kind.id == ACT_USAGE || !(IS_MODIFIER_KEYCODE(action.key.code)
# ifndef NO_ACTION_TAPPING
- || (tap_count == 0 && (action.kind.id == ACT_LMODS_TAP || action.kind.id == ACT_RMODS_TAP))
+ || ((action.kind.id == ACT_LMODS_TAP || action.kind.id == ACT_RMODS_TAP) && (action.layer_tap.code <= MODS_TAP_TOGGLE || tap_count == 0))
# endif
))
# ifdef SWAP_HANDS_ENABLE
@@ -497,7 +497,7 @@ void process_action(keyrecord_t *record, action_t action) {
default:
if (event.pressed) {
if (tap_count > 0) {
-# ifdef HOLD_ON_OTHER_KEY_PRESS_PER_KEY
+# ifdef HOLD_ON_OTHER_KEY_PRESS
if (
# ifdef HOLD_ON_OTHER_KEY_PRESS_PER_KEY
get_hold_on_other_key_press(get_event_keycode(record->event, false), record) &&
diff --git a/quantum/action_tapping.c b/quantum/action_tapping.c
index f94e5e6f69..8f238490f2 100644
--- a/quantum/action_tapping.c
+++ b/quantum/action_tapping.c
@@ -116,25 +116,26 @@ void action_tapping_process(keyrecord_t record) {
* readable. The conditional definition of tapping_keycode and all the
* conditional uses of it are hidden inside macros named TAP_...
*/
-# if (defined(AUTO_SHIFT_ENABLE) && defined(RETRO_SHIFT)) || defined(PERMISSIVE_HOLD_PER_KEY) || defined(HOLD_ON_OTHER_KEY_PRESS_PER_KEY)
-# define TAP_DEFINE_KEYCODE const uint16_t tapping_keycode = get_record_keycode(&tapping_key, false)
-# else
-# define TAP_DEFINE_KEYCODE
-# endif
+# define TAP_DEFINE_KEYCODE const uint16_t tapping_keycode = get_record_keycode(&tapping_key, false)
# if defined(AUTO_SHIFT_ENABLE) && defined(RETRO_SHIFT)
# ifdef RETRO_TAPPING_PER_KEY
-# define TAP_GET_RETRO_TAPPING get_retro_tapping(tapping_keycode, &tapping_key)
+# define TAP_GET_RETRO_TAPPING(keyp) get_auto_shifted_key(tapping_keycode, keyp) && get_retro_tapping(tapping_keycode, &tapping_key)
# else
-# define TAP_GET_RETRO_TAPPING true
+# define TAP_GET_RETRO_TAPPING(keyp) get_auto_shifted_key(tapping_keycode, keyp)
# endif
-# define MAYBE_RETRO_SHIFTING(ev) (TAP_GET_RETRO_TAPPING && (RETRO_SHIFT + 0) != 0 && TIMER_DIFF_16((ev).time, tapping_key.event.time) < (RETRO_SHIFT + 0))
+/* Used to extend TAPPING_TERM:
+ * indefinitely if RETRO_SHIFT does not have a value
+ * to RETRO_SHIFT if RETRO_SHIFT is set
+ * for possibly retro shifted keys.
+ */
+# define MAYBE_RETRO_SHIFTING(ev, keyp) (get_auto_shifted_key(tapping_keycode, keyp) && TAP_GET_RETRO_TAPPING(keyp) && ((RETRO_SHIFT + 0) == 0 || TIMER_DIFF_16((ev).time, tapping_key.event.time) < (RETRO_SHIFT + 0)))
# define TAP_IS_LT IS_QK_LAYER_TAP(tapping_keycode)
# define TAP_IS_MT IS_QK_MOD_TAP(tapping_keycode)
# define TAP_IS_RETRO IS_RETRO(tapping_keycode)
# else
-# define TAP_GET_RETRO_TAPPING false
-# define MAYBE_RETRO_SHIFTING(ev) false
+# define TAP_GET_RETRO_TAPPING(keyp) false
+# define MAYBE_RETRO_SHIFTING(ev, kp) false
# define TAP_IS_LT false
# define TAP_IS_MT false
# define TAP_IS_RETRO false
@@ -187,20 +188,19 @@ 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)
TAP_DEFINE_KEYCODE;
+# endif
// process "pressed" tapping key state
if (tapping_key.event.pressed) {
- if (WITHIN_TAPPING_TERM(event) || MAYBE_RETRO_SHIFTING(event)) {
+ if (WITHIN_TAPPING_TERM(event) || MAYBE_RETRO_SHIFTING(event, keyp)) {
if (IS_NOEVENT(event)) {
// early return for tick events
return true;
}
if (tapping_key.tap.count == 0) {
if (IS_TAPPING_RECORD(keyp) && !event.pressed) {
-# if defined(AUTO_SHIFT_ENABLE) && defined(RETRO_SHIFT)
- retroshift_swap_times();
-# endif
// first tap!
ac_dprintf("Tapping: First tap(0->1).\n");
tapping_key.tap.count = 1;
@@ -218,28 +218,12 @@ bool process_tapping(keyrecord_t *keyp) {
*/
// clang-format off
else if (
+ !event.pressed && waiting_buffer_typed(event) &&
(
- !event.pressed && waiting_buffer_typed(event) &&
- TAP_GET_PERMISSIVE_HOLD
- )
- // Causes nested taps to not wait past TAPPING_TERM/RETRO_SHIFT
- // unnecessarily and fixes them for Layer Taps.
- || (TAP_GET_RETRO_TAPPING &&
- (
- // Rolled over the two keys.
- (tapping_key.tap.interrupted == true && (
- (TAP_IS_LT && TAP_GET_HOLD_ON_OTHER_KEY_PRESS) ||
- (TAP_IS_MT && TAP_GET_HOLD_ON_OTHER_KEY_PRESS)
- )
- )
- // Makes Retro Shift ignore the default behavior of
- // MTs and LTs on nested taps below TAPPING_TERM or RETRO_SHIFT
- || (
- TAP_IS_RETRO
- && (event.key.col != tapping_key.event.key.col || event.key.row != tapping_key.event.key.row)
- && !event.pressed && waiting_buffer_typed(event)
- )
- )
+ TAP_GET_PERMISSIVE_HOLD ||
+ // Causes nested taps to not wait past TAPPING_TERM/RETRO_SHIFT
+ // unnecessarily and fixes them for Layer Taps.
+ TAP_GET_RETRO_TAPPING(keyp)
)
) {
// clang-format on
@@ -284,10 +268,16 @@ bool process_tapping(keyrecord_t *keyp) {
process_record(keyp);
return true;
} else {
- // set interrupted flag when other key preesed during tapping
+ // 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 (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))
+# endif
+ ) {
ac_dprintf("Tapping: End. No tap. Interfered by pressed key\n");
process_record(&tapping_key);
tapping_key = (keyrecord_t){0};
@@ -332,6 +322,9 @@ bool process_tapping(keyrecord_t *keyp) {
return true;
} else {
ac_dprintf("Tapping: key event while last tap(>0).\n");
+# if defined(AUTO_SHIFT_ENABLE) && defined(RETRO_SHIFT)
+ retroshift_swap_times();
+# endif
process_record(keyp);
return true;
}
@@ -388,7 +381,7 @@ bool process_tapping(keyrecord_t *keyp) {
}
// process "released" tapping key state
else {
- if (WITHIN_TAPPING_TERM(event) || MAYBE_RETRO_SHIFTING(event)) {
+ if (WITHIN_TAPPING_TERM(event) || MAYBE_RETRO_SHIFTING(event, keyp)) {
if (IS_NOEVENT(event)) {
// early return for tick events
return true;
@@ -506,9 +499,16 @@ void waiting_buffer_scan_tap(void) {
return;
}
+# if (defined(AUTO_SHIFT_ENABLE) && defined(RETRO_SHIFT))
+ TAP_DEFINE_KEYCODE;
+# endif
for (uint8_t i = waiting_buffer_tail; i != waiting_buffer_head; i = (i + 1) % WAITING_BUFFER_SIZE) {
keyrecord_t *candidate = &waiting_buffer[i];
- if (IS_EVENT(candidate->event) && KEYEQ(candidate->event.key, tapping_key.event.key) && !candidate->event.pressed && WITHIN_TAPPING_TERM(candidate->event)) {
+ // clang-format off
+ if (IS_EVENT(candidate->event) && KEYEQ(candidate->event.key, tapping_key.event.key) && !candidate->event.pressed && (
+ WITHIN_TAPPING_TERM(waiting_buffer[i].event) || MAYBE_RETRO_SHIFTING(waiting_buffer[i].event, &tapping_key)
+ )) {
+ // clang-format on
tapping_key.tap.count = 1;
candidate->tap.count = 1;
process_record(&tapping_key);
diff --git a/quantum/backlight/backlight.c b/quantum/backlight/backlight.c
index 9d9f944f5d..e89b34696c 100644
--- a/quantum/backlight/backlight.c
+++ b/quantum/backlight/backlight.c
@@ -22,10 +22,21 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
backlight_config_t backlight_config;
+#ifndef BACKLIGHT_DEFAULT_ON
+# define BACKLIGHT_DEFAULT_ON true
+#endif
+
#ifndef BACKLIGHT_DEFAULT_LEVEL
# define BACKLIGHT_DEFAULT_LEVEL BACKLIGHT_LEVELS
#endif
+#ifndef BACKLIGHT_DEFAULT_BREATHING
+# define BACKLIGHT_DEFAULT_BREATHING false
+#else
+# undef BACKLIGHT_DEFAULT_BREATHING
+# define BACKLIGHT_DEFAULT_BREATHING true
+#endif
+
#ifdef BACKLIGHT_BREATHING
// TODO: migrate to backlight_config_t
static uint8_t breathing_period = BREATHING_PERIOD;
@@ -172,13 +183,9 @@ void eeconfig_update_backlight_current(void) {
}
void eeconfig_update_backlight_default(void) {
- backlight_config.enable = 1;
-#ifdef BACKLIGHT_DEFAULT_BREATHING
- backlight_config.breathing = 1;
-#else
- backlight_config.breathing = 0;
-#endif
- backlight_config.level = BACKLIGHT_DEFAULT_LEVEL;
+ backlight_config.enable = BACKLIGHT_DEFAULT_ON;
+ backlight_config.breathing = BACKLIGHT_DEFAULT_BREATHING;
+ backlight_config.level = BACKLIGHT_DEFAULT_LEVEL;
eeconfig_update_backlight(backlight_config.raw);
}
diff --git a/quantum/color.c b/quantum/color.c
index 767155c9db..395383f428 100644
--- a/quantum/color.c
+++ b/quantum/color.c
@@ -110,7 +110,7 @@ RGB hsv_to_rgb_nocie(HSV hsv) {
}
#ifdef RGBW
-void convert_rgb_to_rgbw(LED_TYPE *led) {
+void convert_rgb_to_rgbw(rgb_led_t *led) {
// Determine lowest value in all three colors, put that into
// the white channel and then shift all colors by that amount
led->w = MIN(led->r, MIN(led->g, led->b));
diff --git a/quantum/color.h b/quantum/color.h
index 135ad623b5..00a3bfb3f8 100644
--- a/quantum/color.h
+++ b/quantum/color.h
@@ -18,6 +18,7 @@
#include <stdint.h>
#include <stdbool.h>
+#include "util.h"
// clang-format off
@@ -73,22 +74,6 @@
// clang-format on
-#if defined(__GNUC__)
-# define PACKED __attribute__((__packed__))
-#else
-# define PACKED
-#endif
-
-#if defined(_MSC_VER)
-# pragma pack(push, 1)
-#endif
-
-#ifdef RGBW
-# define LED_TYPE cRGBW
-#else
-# define LED_TYPE RGB
-#endif
-
#define WS2812_BYTE_ORDER_RGB 0
#define WS2812_BYTE_ORDER_GRB 1
#define WS2812_BYTE_ORDER_BGR 2
@@ -97,26 +82,7 @@
# define WS2812_BYTE_ORDER WS2812_BYTE_ORDER_GRB
#endif
-typedef struct PACKED {
-#if (WS2812_BYTE_ORDER == WS2812_BYTE_ORDER_GRB)
- uint8_t g;
- uint8_t r;
- uint8_t b;
-#elif (WS2812_BYTE_ORDER == WS2812_BYTE_ORDER_RGB)
- uint8_t r;
- uint8_t g;
- uint8_t b;
-#elif (WS2812_BYTE_ORDER == WS2812_BYTE_ORDER_BGR)
- uint8_t b;
- uint8_t g;
- uint8_t r;
-#endif
-} cRGB;
-
-typedef cRGB RGB;
-
-// WS2812 specific layout
-typedef struct PACKED {
+typedef struct PACKED rgb_led_t {
#if (WS2812_BYTE_ORDER == WS2812_BYTE_ORDER_GRB)
uint8_t g;
uint8_t r;
@@ -130,21 +96,21 @@ typedef struct PACKED {
uint8_t g;
uint8_t r;
#endif
+#ifdef RGBW
uint8_t w;
-} cRGBW;
+#endif
+} rgb_led_t;
-typedef struct PACKED {
+typedef rgb_led_t RGB;
+
+typedef struct PACKED HSV {
uint8_t h;
uint8_t s;
uint8_t v;
} HSV;
-#if defined(_MSC_VER)
-# pragma pack(pop)
-#endif
-
RGB hsv_to_rgb(HSV hsv);
RGB hsv_to_rgb_nocie(HSV hsv);
#ifdef RGBW
-void convert_rgb_to_rgbw(LED_TYPE *led);
+void convert_rgb_to_rgbw(rgb_led_t *led);
#endif
diff --git a/quantum/debounce/none.c b/quantum/debounce/none.c
index 1b8b1dc13a..0a8ccfc4ee 100644
--- a/quantum/debounce/none.c
+++ b/quantum/debounce/none.c
@@ -20,9 +20,15 @@
void debounce_init(uint8_t num_rows) {}
bool debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool changed) {
- bool cooked_changed = memcmp(raw, cooked, sizeof(matrix_row_t) * num_rows) != 0;
+ bool cooked_changed = false;
- memcpy(cooked, raw, sizeof(matrix_row_t) * num_rows);
+ if (changed) {
+ size_t matrix_size = num_rows * sizeof(matrix_row_t);
+ if (memcmp(cooked, raw, matrix_size) != 0) {
+ memcpy(cooked, raw, matrix_size);
+ cooked_changed = true;
+ }
+ }
return cooked_changed;
}
diff --git a/quantum/debounce/sym_defer_g.c b/quantum/debounce/sym_defer_g.c
index 25e18890af..d96758fab3 100644
--- a/quantum/debounce/sym_defer_g.c
+++ b/quantum/debounce/sym_defer_g.c
@@ -24,6 +24,12 @@ When no state changes have occured for DEBOUNCE milliseconds, we push the state.
# define DEBOUNCE 5
#endif
+// Maximum debounce: 255ms
+#if DEBOUNCE > UINT8_MAX
+# undef DEBOUNCE
+# define DEBOUNCE UINT8_MAX
+#endif
+
#if DEBOUNCE > 0
static bool debouncing = false;
static fast_timer_t debouncing_time;
@@ -36,11 +42,10 @@ bool debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool
if (changed) {
debouncing = true;
debouncing_time = timer_read_fast();
- }
-
- if (debouncing && timer_elapsed_fast(debouncing_time) >= DEBOUNCE) {
- if (memcmp(cooked, raw, sizeof(matrix_row_t) * num_rows) != 0) {
- memcpy(cooked, raw, sizeof(matrix_row_t) * num_rows);
+ } else if (debouncing && timer_elapsed_fast(debouncing_time) >= DEBOUNCE) {
+ size_t matrix_size = num_rows * sizeof(matrix_row_t);
+ if (memcmp(cooked, raw, matrix_size) != 0) {
+ memcpy(cooked, raw, matrix_size);
cooked_changed = true;
}
debouncing = false;
diff --git a/quantum/debounce/sym_eager_pr.c b/quantum/debounce/sym_eager_pr.c
index ccc5d20fa2..6cd9308aff 100644
--- a/quantum/debounce/sym_eager_pr.c
+++ b/quantum/debounce/sym_eager_pr.c
@@ -128,8 +128,8 @@ static void transfer_matrix_values(matrix_row_t raw[], matrix_row_t cooked[], ui
if (existing_row != raw_row) {
if (*debounce_pointer == DEBOUNCE_ELAPSED) {
*debounce_pointer = DEBOUNCE;
- cooked[row] = raw_row;
- cooked_changed |= cooked[row] ^ raw[row];
+ cooked_changed |= cooked[row] ^ raw_row;
+ cooked[row] = raw_row;
counters_need_update = true;
}
}
diff --git a/quantum/debounce/tests/asym_eager_defer_pk_tests.cpp b/quantum/debounce/tests/asym_eager_defer_pk_tests.cpp
index 44b4fe1956..6737f499ab 100644
--- a/quantum/debounce/tests/asym_eager_defer_pk_tests.cpp
+++ b/quantum/debounce/tests/asym_eager_defer_pk_tests.cpp
@@ -392,3 +392,32 @@ TEST_F(DebounceTest, OneKeyDelayedScan8) {
time_jumps_ = true;
runEvents();
}
+
+TEST_F(DebounceTest, AsyncTickOneKeyShort1) {
+ addEvents({
+ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ /* Release key after 1ms delay */
+ {1, {{0, 1, UP}}, {}},
+
+ /*
+ * Until the eager timer on DOWN is observed to finish, the defer timer
+ * on UP can't start. There's no workaround for this because it's not
+ * possible to debounce an event that isn't being tracked.
+ *
+ * sym_defer_pk has the same problem but the test has to track that the
+ * key changed state so the DOWN timer is always allowed to finish
+ * before starting the UP timer.
+ */
+ {5, {}, {}},
+
+ {10, {}, {{0, 1, UP}}}, /* 5ms+5ms after DOWN at time 0 */
+ /* Press key again after 1ms delay */
+ {11, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ });
+ /*
+ * Debounce implementations should never read the timer more than once per invocation
+ */
+ async_time_jumps_ = DEBOUNCE;
+ runEvents();
+}
diff --git a/quantum/debounce/tests/debounce_test_common.cpp b/quantum/debounce/tests/debounce_test_common.cpp
index b11378b286..fd4b6f01a6 100644
--- a/quantum/debounce/tests/debounce_test_common.cpp
+++ b/quantum/debounce/tests/debounce_test_common.cpp
@@ -26,8 +26,12 @@ extern "C" {
#include "debounce.h"
#include "timer.h"
-void set_time(uint32_t t);
-void advance_time(uint32_t ms);
+void simulate_async_tick(uint32_t t);
+void reset_access_counter(void);
+uint32_t current_access_counter(void);
+uint32_t timer_read_internal(void);
+void set_time(uint32_t t);
+void advance_time(uint32_t ms);
}
void DebounceTest::addEvents(std::initializer_list<DebounceTestEvent> events) {
@@ -58,6 +62,7 @@ void DebounceTest::runEventsInternal() {
/* Initialise keyboard with start time (offset to avoid testing at 0) and all keys UP */
debounce_init(MATRIX_ROWS);
set_time(time_offset_);
+ simulate_async_tick(async_time_jumps_);
std::fill(std::begin(input_matrix_), std::end(input_matrix_), 0);
std::fill(std::begin(output_matrix_), std::end(output_matrix_), 0);
@@ -70,9 +75,9 @@ void DebounceTest::runEventsInternal() {
advance_time(1);
} else {
/* Fast forward to the time for this event, calling debounce() with no changes */
- ASSERT_LT((time_offset_ + event.time_) - timer_read_fast(), 60000) << "Test tries to advance more than 1 minute of time";
+ ASSERT_LT((time_offset_ + event.time_) - timer_read_internal(), 60000) << "Test tries to advance more than 1 minute of time";
- while (timer_read_fast() != time_offset_ + event.time_) {
+ while (timer_read_internal() != time_offset_ + event.time_) {
runDebounce(false);
checkCookedMatrix(false, "debounce() modified cooked matrix");
advance_time(1);
@@ -124,14 +129,20 @@ void DebounceTest::runDebounce(bool changed) {
std::copy(std::begin(input_matrix_), std::end(input_matrix_), std::begin(raw_matrix_));
std::copy(std::begin(output_matrix_), std::end(output_matrix_), std::begin(cooked_matrix_));
+ reset_access_counter();
+
bool cooked_changed = debounce(raw_matrix_, cooked_matrix_, MATRIX_ROWS, changed);
if (!std::equal(std::begin(input_matrix_), std::end(input_matrix_), std::begin(raw_matrix_))) {
FAIL() << "Fatal error: debounce() modified raw matrix at " << strTime() << "\ninput_matrix: changed=" << changed << "\n" << strMatrix(input_matrix_) << "\nraw_matrix:\n" << strMatrix(raw_matrix_);
}
- if (std::equal(std::begin(output_matrix_), std::end(output_matrix_), std::begin(cooked_matrix_)) && cooked_changed) {
- FAIL() << "Fatal error: debounce() did detect a wrong cooked matrix change at " << strTime() << "\noutput_matrix: cooked_changed=" << cooked_changed << "\n" << strMatrix(output_matrix_) << "\ncooked_matrix:\n" << strMatrix(cooked_matrix_);
+ if (std::equal(std::begin(output_matrix_), std::end(output_matrix_), std::begin(cooked_matrix_)) == cooked_changed) {
+ FAIL() << "Fatal error: debounce() reported a wrong cooked matrix change result at " << strTime() << "\noutput_matrix: cooked_changed=" << cooked_changed << "\n" << strMatrix(output_matrix_) << "\ncooked_matrix:\n" << strMatrix(cooked_matrix_);
+ }
+
+ if (current_access_counter() > 1) {
+ FAIL() << "Fatal error: debounce() read the timer multiple times, which is not allowed, at " << strTime() << "\ntimer: access_count=" << current_access_counter() << "\noutput_matrix: cooked_changed=" << cooked_changed << "\n" << strMatrix(output_matrix_) << "\ncooked_matrix:\n" << strMatrix(cooked_matrix_);
}
}
@@ -144,7 +155,7 @@ void DebounceTest::checkCookedMatrix(bool changed, const std::string &error_mess
std::string DebounceTest::strTime() {
std::stringstream text;
- text << "time " << (timer_read_fast() - time_offset_) << " (extra_iterations=" << extra_iterations_ << ", auto_advance_time=" << auto_advance_time_ << ")";
+ text << "time " << (timer_read_internal() - time_offset_) << " (extra_iterations=" << extra_iterations_ << ", auto_advance_time=" << auto_advance_time_ << ")";
return text.str();
}
diff --git a/quantum/debounce/tests/debounce_test_common.h b/quantum/debounce/tests/debounce_test_common.h
index 7319abfbf3..ebbe340c05 100644
--- a/quantum/debounce/tests/debounce_test_common.h
+++ b/quantum/debounce/tests/debounce_test_common.h
@@ -54,8 +54,9 @@ class DebounceTest : public ::testing::Test {
void addEvents(std::initializer_list<DebounceTestEvent> events);
void runEvents();
- fast_timer_t time_offset_ = 7777;
- bool time_jumps_ = false;
+ fast_timer_t time_offset_ = 7777;
+ bool time_jumps_ = false;
+ fast_timer_t async_time_jumps_ = 0;
private:
static bool directionValue(Direction direction);
diff --git a/quantum/debounce/tests/none_tests.cpp b/quantum/debounce/tests/none_tests.cpp
new file mode 100644
index 0000000000..69fdd02101
--- /dev/null
+++ b/quantum/debounce/tests/none_tests.cpp
@@ -0,0 +1,256 @@
+/* Copyright 2021 Simon Arlott
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "gtest/gtest.h"
+
+#include "debounce_test_common.h"
+
+TEST_F(DebounceTest, OneKeyShort1) {
+ addEvents({
+ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+
+ {5, {}, {}},
+ /* 0ms delay (fast scan rate) */
+ {5, {{0, 1, UP}}, {{0, 1, UP}}},
+
+ {10, {}, {}},
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyShort2) {
+ addEvents({
+ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+
+ {5, {}, {}},
+ /* 1ms delay */
+ {6, {{0, 1, UP}}, {{0, 1, UP}}},
+
+ {11, {}, {}},
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyShort3) {
+ addEvents({
+ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+
+ {5, {}, {}},
+ /* 2ms delay */
+ {7, {{0, 1, UP}}, {{0, 1, UP}}},
+
+ {12, {}, {}},
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyTooQuick1) {
+ addEvents({
+ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ /* Release key exactly on the debounce time */
+ {5, {{0, 1, UP}}, {{0, 1, UP}}},
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyTooQuick2) {
+ addEvents({
+ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+
+ {5, {}, {}},
+ {6, {{0, 1, UP}}, {{0, 1, UP}}},
+
+ /* Press key exactly on the debounce time */
+ {11, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyBouncing1) {
+ addEvents({
+ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ {1, {{0, 1, UP}}, {{0, 1, UP}}},
+ {2, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ {3, {{0, 1, UP}}, {{0, 1, UP}}},
+ {4, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ {5, {{0, 1, UP}}, {{0, 1, UP}}},
+ {6, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ {11, {{0, 1, UP}}, {{0, 1, UP}}}, /* 5ms after DOWN at time 7 */
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyBouncing2) {
+ addEvents({
+ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ {5, {}, {}},
+ {6, {{0, 1, UP}}, {{0, 1, UP}}},
+ {7, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ {8, {{0, 1, UP}}, {{0, 1, UP}}},
+ {9, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ {10, {{0, 1, UP}}, {{0, 1, UP}}},
+ {15, {}, {}}, /* 5ms after UP at time 10 */
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyLong) {
+ addEvents({
+ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+
+ {5, {}, {}},
+
+ {25, {{0, 1, UP}}, {{0, 1, UP}}},
+
+ {30, {}, {}},
+
+ {50, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+
+ {55, {}, {}},
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, TwoKeysShort) {
+ addEvents({
+ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ {1, {{0, 2, DOWN}}, {{0, 2, DOWN}}},
+
+ {6, {}, {}},
+
+ {7, {{0, 1, UP}}, {{0, 1, UP}}},
+ {8, {{0, 2, UP}}, {{0, 2, UP}}},
+
+ {13, {}, {}},
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, TwoKeysSimultaneous1) {
+ addEvents({
+ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}, {0, 2, DOWN}}, {{0, 1, DOWN}, {0, 2, DOWN}}},
+
+ {5, {}, {}},
+ {6, {{0, 1, UP}, {0, 2, UP}}, {{0, 1, UP}, {0, 2, UP}}},
+
+ {11, {}, {}},
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, TwoKeysSimultaneous2) {
+ addEvents({
+ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ {1, {{0, 2, DOWN}}, {{0, 2, DOWN}}},
+
+ {5, {}, {}},
+ {6, {}, {}},
+ {7, {{0, 1, UP}}, {{0, 1, UP}}},
+ {8, {{0, 2, UP}}, {{0, 2, UP}}},
+
+ {13, {}, {}},
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyDelayedScan1) {
+ addEvents({
+ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+
+ /* Processing is very late */
+ {300, {}, {}},
+ /* Immediately release key */
+ {300, {{0, 1, UP}}, {{0, 1, UP}}},
+
+ {305, {}, {}},
+ });
+ time_jumps_ = true;
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyDelayedScan2) {
+ addEvents({
+ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+
+ /* Processing is very late */
+ {300, {}, {}},
+ /* Release key after 1ms */
+ {301, {{0, 1, UP}}, {{0, 1, UP}}},
+
+ {306, {}, {}},
+ });
+ time_jumps_ = true;
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyDelayedScan3) {
+ addEvents({
+ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+
+ /* Release key before debounce expires */
+ {300, {{0, 1, UP}}, {{0, 1, UP}}},
+ });
+ time_jumps_ = true;
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyDelayedScan4) {
+ addEvents({
+ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+
+ /* Processing is a bit late */
+ {50, {}, {}},
+ /* Release key after 1ms */
+ {51, {{0, 1, UP}}, {{0, 1, UP}}},
+
+ {56, {}, {}},
+ });
+ time_jumps_ = true;
+ runEvents();
+}
+
+TEST_F(DebounceTest, AsyncTickOneKeyShort1) {
+ addEvents({
+ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+
+ {5, {}, {}},
+ /* 0ms delay (fast scan rate) */
+ {5, {{0, 1, UP}}, {{0, 1, UP}}},
+
+ {10, {}, {}},
+ });
+ /*
+ * Debounce implementations should never read the timer more than once per invocation
+ */
+ async_time_jumps_ = DEBOUNCE;
+ runEvents();
+}
diff --git a/quantum/debounce/tests/rules.mk b/quantum/debounce/tests/rules.mk
index 8318b1c668..bbc362d4c7 100644
--- a/quantum/debounce/tests/rules.mk
+++ b/quantum/debounce/tests/rules.mk
@@ -18,6 +18,11 @@ DEBOUNCE_COMMON_DEFS := -DMATRIX_ROWS=4 -DMATRIX_COLS=10 -DDEBOUNCE=5
DEBOUNCE_COMMON_SRC := $(QUANTUM_PATH)/debounce/tests/debounce_test_common.cpp \
$(PLATFORM_PATH)/$(PLATFORM_KEY)/timer.c
+debounce_none_DEFS := $(DEBOUNCE_COMMON_DEFS)
+debounce_none_SRC := $(DEBOUNCE_COMMON_SRC) \
+ $(QUANTUM_PATH)/debounce/none.c \
+ $(QUANTUM_PATH)/debounce/tests/none_tests.cpp
+
debounce_sym_defer_g_DEFS := $(DEBOUNCE_COMMON_DEFS)
debounce_sym_defer_g_SRC := $(DEBOUNCE_COMMON_SRC) \
$(QUANTUM_PATH)/debounce/sym_defer_g.c \
diff --git a/quantum/debounce/tests/sym_defer_g_tests.cpp b/quantum/debounce/tests/sym_defer_g_tests.cpp
index 73d3d45e30..33e8b17852 100644
--- a/quantum/debounce/tests/sym_defer_g_tests.cpp
+++ b/quantum/debounce/tests/sym_defer_g_tests.cpp
@@ -236,3 +236,21 @@ TEST_F(DebounceTest, OneKeyDelayedScan4) {
time_jumps_ = true;
runEvents();
}
+
+TEST_F(DebounceTest, AsyncTickOneKeyShort1) {
+ addEvents({
+ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {}},
+
+ {5, {}, {{0, 1, DOWN}}},
+ /* 0ms delay (fast scan rate) */
+ {5, {{0, 1, UP}}, {}},
+
+ {10, {}, {{0, 1, UP}}},
+ });
+ /*
+ * Debounce implementations should never read the timer more than once per invocation
+ */
+ async_time_jumps_ = DEBOUNCE;
+ runEvents();
+}
diff --git a/quantum/debounce/tests/sym_defer_pk_tests.cpp b/quantum/debounce/tests/sym_defer_pk_tests.cpp
index 7542c2dad4..864b7afcc4 100644
--- a/quantum/debounce/tests/sym_defer_pk_tests.cpp
+++ b/quantum/debounce/tests/sym_defer_pk_tests.cpp
@@ -238,3 +238,21 @@ TEST_F(DebounceTest, OneKeyDelayedScan4) {
time_jumps_ = true;
runEvents();
}
+
+TEST_F(DebounceTest, AsyncTickOneKeyShort1) {
+ addEvents({
+ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {}},
+
+ {5, {}, {{0, 1, DOWN}}},
+ /* 0ms delay (fast scan rate) */
+ {5, {{0, 1, UP}}, {}},
+
+ {10, {}, {{0, 1, UP}}},
+ });
+ /*
+ * Debounce implementations should never read the timer more than once per invocation
+ */
+ async_time_jumps_ = DEBOUNCE;
+ runEvents();
+}
diff --git a/quantum/debounce/tests/sym_defer_pr_tests.cpp b/quantum/debounce/tests/sym_defer_pr_tests.cpp
index 417e1f4ca2..3ed360b966 100644
--- a/quantum/debounce/tests/sym_defer_pr_tests.cpp
+++ b/quantum/debounce/tests/sym_defer_pr_tests.cpp
@@ -236,3 +236,21 @@ TEST_F(DebounceTest, OneKeyDelayedScan4) {
time_jumps_ = true;
runEvents();
}
+
+TEST_F(DebounceTest, AsyncTickOneKeyShort1) {
+ addEvents({
+ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {}},
+
+ {5, {}, {{0, 1, DOWN}}},
+ /* 0ms delay (fast scan rate) */
+ {5, {{0, 1, UP}}, {}},
+
+ {10, {}, {{0, 1, UP}}},
+ });
+ /*
+ * Debounce implementations should never read the timer more than once per invocation
+ */
+ async_time_jumps_ = DEBOUNCE;
+ runEvents();
+}
diff --git a/quantum/debounce/tests/sym_eager_pk_tests.cpp b/quantum/debounce/tests/sym_eager_pk_tests.cpp
index d9a02fe33c..39d5b10d8e 100644
--- a/quantum/debounce/tests/sym_eager_pk_tests.cpp
+++ b/quantum/debounce/tests/sym_eager_pk_tests.cpp
@@ -251,3 +251,21 @@ TEST_F(DebounceTest, OneKeyDelayedScan6) {
time_jumps_ = true;
runEvents();
}
+
+TEST_F(DebounceTest, AsyncTickOneKeyShort1) {
+ addEvents({
+ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ {1, {{0, 1, UP}}, {}},
+
+ {5, {}, {{0, 1, UP}}},
+ /* Press key again after 1ms delay (debounce has not yet finished) */
+ {6, {{0, 1, DOWN}}, {}},
+ {10, {}, {{0, 1, DOWN}}}, /* 5ms after UP at time 5 */
+ });
+ /*
+ * Debounce implementations should never read the timer more than once per invocation
+ */
+ async_time_jumps_ = DEBOUNCE;
+ runEvents();
+}
diff --git a/quantum/debounce/tests/sym_eager_pr_tests.cpp b/quantum/debounce/tests/sym_eager_pr_tests.cpp
index e91dd9cb87..9a94807a49 100644
--- a/quantum/debounce/tests/sym_eager_pr_tests.cpp
+++ b/quantum/debounce/tests/sym_eager_pr_tests.cpp
@@ -297,3 +297,21 @@ TEST_F(DebounceTest, OneKeyDelayedScan6) {
time_jumps_ = true;
runEvents();
}
+
+TEST_F(DebounceTest, AsyncTickOneKeyShort1) {
+ addEvents({
+ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ {1, {{0, 1, UP}}, {}},
+
+ {5, {}, {{0, 1, UP}}},
+ /* Press key again after 1ms delay (debounce has not yet finished) */
+ {6, {{0, 1, DOWN}}, {}},
+ {10, {}, {{0, 1, DOWN}}}, /* 5ms after UP at time 5 */
+ });
+ /*
+ * Debounce implementations should never read the timer more than once per invocation
+ */
+ async_time_jumps_ = DEBOUNCE;
+ runEvents();
+}
diff --git a/quantum/debounce/tests/testlist.mk b/quantum/debounce/tests/testlist.mk
index f7bd520698..dd53633343 100644
--- a/quantum/debounce/tests/testlist.mk
+++ b/quantum/debounce/tests/testlist.mk
@@ -1,4 +1,5 @@
TEST_LIST += \
+ debounce_none \
debounce_sym_defer_g \
debounce_sym_defer_pk \
debounce_sym_defer_pr \
diff --git a/quantum/eeconfig.c b/quantum/eeconfig.c
index 84de025f0e..d9eea13758 100644
--- a/quantum/eeconfig.c
+++ b/quantum/eeconfig.c
@@ -49,15 +49,15 @@ void eeconfig_init_quantum(void) {
eeprom_update_word(EECONFIG_MAGIC, EECONFIG_MAGIC_NUMBER);
eeprom_update_byte(EECONFIG_DEBUG, 0);
- eeprom_update_byte(EECONFIG_DEFAULT_LAYER, 0);
- default_layer_state = 0;
+ default_layer_state = (layer_state_t)1 << 0;
+ eeprom_update_byte(EECONFIG_DEFAULT_LAYER, default_layer_state);
// Enable oneshot and autocorrect by default: 0b0001 0100 0000 0000
eeprom_update_word(EECONFIG_KEYMAP, 0x1400);
eeprom_update_byte(EECONFIG_BACKLIGHT, 0);
eeprom_update_byte(EECONFIG_AUDIO, 0xFF); // On by default
eeprom_update_dword(EECONFIG_RGBLIGHT, 0);
eeprom_update_byte(EECONFIG_RGBLIGHT_EXTENDED, 0);
- eeprom_update_byte(EECONFIG_VELOCIKEY, 0);
+ eeprom_update_byte(EECONFIG_UNUSED, 0);
eeprom_update_byte(EECONFIG_UNICODEMODE, 0);
eeprom_update_byte(EECONFIG_STENOMODE, 0);
uint64_t dummy = 0;
diff --git a/quantum/eeconfig.h b/quantum/eeconfig.h
index 85e80226b6..d7cce166bd 100644
--- a/quantum/eeconfig.h
+++ b/quantum/eeconfig.h
@@ -19,6 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <stdint.h>
#include <stdbool.h>
+#include "eeprom.h"
#ifndef EECONFIG_MAGIC_NUMBER
# define EECONFIG_MAGIC_NUMBER (uint16_t)0xFEE6 // When changing, decrement this value to avoid future re-init issues
@@ -39,7 +40,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define EECONFIG_HANDEDNESS (uint8_t *)14
#define EECONFIG_KEYBOARD (uint32_t *)15
#define EECONFIG_USER (uint32_t *)19
-#define EECONFIG_VELOCIKEY (uint8_t *)23
+#define EECONFIG_UNUSED (uint8_t *)23
// Mutually exclusive
#define EECONFIG_LED_MATRIX (uint32_t *)24
#define EECONFIG_RGB_MATRIX (uint64_t *)24
diff --git a/quantum/haptic.c b/quantum/haptic.c
index 5a700dca38..a1fea29625 100644
--- a/quantum/haptic.c
+++ b/quantum/haptic.c
@@ -20,6 +20,7 @@
#include "debug.h"
#include "usb_device_state.h"
#include "gpio.h"
+#include "keyboard.h"
#ifdef HAPTIC_DRV2605L
# include "drv2605l.h"
@@ -58,6 +59,11 @@ static void set_haptic_config_enable(bool enabled) {
}
void haptic_init(void) {
+// only initialize on secondary boards if the user desires
+#if defined(SPLIT_KEYBOARD) && !defined(SPLIT_HAPTIC_ENABLE)
+ if (!is_keyboard_master()) return;
+#endif
+
if (!eeconfig_is_enabled()) {
eeconfig_init();
}
@@ -99,8 +105,12 @@ void haptic_init(void) {
void haptic_task(void) {
#ifdef HAPTIC_SOLENOID
+// Only run task on seconary boards if the user desires
+# if defined(SPLIT_KEYBOARD) && !defined(SPLIT_HAPTIC_ENABLE)
+ if (!is_keyboard_master()) return;
+# endif
solenoid_check();
-#endif
+#endif // HAPTIC_SOLENOID
}
void eeconfig_debug_haptic(void) {
diff --git a/quantum/keyboard.c b/quantum/keyboard.c
index c2ca15d52d..86a1a9fea3 100644
--- a/quantum/keyboard.c
+++ b/quantum/keyboard.c
@@ -99,9 +99,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifdef ST7565_ENABLE
# include "st7565.h"
#endif
-#ifdef VELOCIKEY_ENABLE
-# include "velocikey.h"
-#endif
#ifdef VIA_ENABLE
# include "via.h"
#endif
@@ -395,9 +392,6 @@ void quantum_init(void) {
#if defined(UNICODE_COMMON_ENABLE)
unicode_input_mode_init();
#endif
-#ifdef HAPTIC_ENABLE
- haptic_init();
-#endif
}
/** \brief keyboard_init
@@ -462,6 +456,9 @@ void keyboard_init(void) {
#ifdef BLUETOOTH_ENABLE
bluetooth_init();
#endif
+#ifdef HAPTIC_ENABLE
+ haptic_init();
+#endif
#if defined(DEBUG_MATRIX_SCAN_RATE) && defined(CONSOLE_ENABLE)
debug_enable = true;
@@ -617,10 +614,6 @@ void quantum_task(void) {
decay_wpm();
#endif
-#ifdef HAPTIC_ENABLE
- haptic_task();
-#endif
-
#ifdef DIP_SWITCH_ENABLE
dip_switch_read(false);
#endif
@@ -712,12 +705,6 @@ void keyboard_task(void) {
midi_task();
#endif
-#ifdef VELOCIKEY_ENABLE
- if (velocikey_enabled()) {
- velocikey_decelerate();
- }
-#endif
-
#ifdef JOYSTICK_ENABLE
joystick_task();
#endif
@@ -726,5 +713,9 @@ void keyboard_task(void) {
bluetooth_task();
#endif
+#ifdef HAPTIC_ENABLE
+ haptic_task();
+#endif
+
led_task();
}
diff --git a/quantum/led_matrix/led_matrix.c b/quantum/led_matrix/led_matrix.c
index 1676a60aa3..c13ca94077 100644
--- a/quantum/led_matrix/led_matrix.c
+++ b/quantum/led_matrix/led_matrix.c
@@ -58,35 +58,6 @@ const led_point_t k_led_matrix_center = LED_MATRIX_CENTER;
// -----End led effect includes macros-------
// ------------------------------------------
-#ifndef LED_MATRIX_TIMEOUT
-# define LED_MATRIX_TIMEOUT 0
-#endif
-
-#if !defined(LED_MATRIX_MAXIMUM_BRIGHTNESS) || LED_MATRIX_MAXIMUM_BRIGHTNESS > UINT8_MAX
-# undef LED_MATRIX_MAXIMUM_BRIGHTNESS
-# define LED_MATRIX_MAXIMUM_BRIGHTNESS UINT8_MAX
-#endif
-
-#if !defined(LED_MATRIX_VAL_STEP)
-# define LED_MATRIX_VAL_STEP 8
-#endif
-
-#if !defined(LED_MATRIX_SPD_STEP)
-# define LED_MATRIX_SPD_STEP 16
-#endif
-
-#if !defined(LED_MATRIX_DEFAULT_MODE)
-# define LED_MATRIX_DEFAULT_MODE LED_MATRIX_SOLID
-#endif
-
-#if !defined(LED_MATRIX_DEFAULT_VAL)
-# define LED_MATRIX_DEFAULT_VAL LED_MATRIX_MAXIMUM_BRIGHTNESS
-#endif
-
-#if !defined(LED_MATRIX_DEFAULT_SPD)
-# define LED_MATRIX_DEFAULT_SPD UINT8_MAX / 2
-#endif
-
// globals
led_eeconfig_t led_matrix_eeconfig; // TODO: would like to prefix this with g_ for global consistancy, do this in another pr
uint32_t g_led_timer;
@@ -126,7 +97,7 @@ void eeconfig_update_led_matrix(void) {
void eeconfig_update_led_matrix_default(void) {
dprintf("eeconfig_update_led_matrix_default\n");
- led_matrix_eeconfig.enable = 1;
+ led_matrix_eeconfig.enable = LED_MATRIX_DEFAULT_ON;
led_matrix_eeconfig.mode = LED_MATRIX_DEFAULT_MODE;
led_matrix_eeconfig.val = LED_MATRIX_DEFAULT_VAL;
led_matrix_eeconfig.speed = LED_MATRIX_DEFAULT_SPD;
@@ -632,7 +603,7 @@ void led_matrix_decrease_speed(void) {
void led_matrix_set_flags_eeprom_helper(led_flags_t flags, bool write_to_eeprom) {
led_matrix_eeconfig.flags = flags;
eeconfig_flag_led_matrix(write_to_eeprom);
- dprintf("led matrix set speed [%s]: %u\n", (write_to_eeprom) ? "EEPROM" : "NOEEPROM", led_matrix_eeconfig.flags);
+ dprintf("led matrix set flags [%s]: %u\n", (write_to_eeprom) ? "EEPROM" : "NOEEPROM", led_matrix_eeconfig.flags);
}
led_flags_t led_matrix_get_flags(void) {
diff --git a/quantum/led_matrix/led_matrix.h b/quantum/led_matrix/led_matrix.h
index c2533ca49c..77d4f558ac 100644
--- a/quantum/led_matrix/led_matrix.h
+++ b/quantum/led_matrix/led_matrix.h
@@ -25,16 +25,60 @@
#include "led_matrix_types.h"
#include "keyboard.h"
-#ifdef IS31FL3731
+#if defined(LED_MATRIX_IS31FL3218)
+# include "is31fl3218-simple.h"
+#elif defined(LED_MATRIX_IS31FL3731)
# include "is31fl3731-simple.h"
-#elif defined(IS31FLCOMMON)
-# include "is31flcommon.h"
#endif
-#ifdef IS31FL3733
+#ifdef LED_MATRIX_IS31FL3733
# include "is31fl3733-simple.h"
#endif
-#ifdef CKLED2001
-# include "ckled2001-simple.h"
+#ifdef LED_MATRIX_IS31FL3736
+# include "is31fl3736-simple.h"
+#endif
+#ifdef LED_MATRIX_IS31FL3737
+# include "is31fl3737-simple.h"
+#endif
+#ifdef LED_MATRIX_IS31FL3741
+# include "is31fl3741-simple.h"
+#endif
+#if defined(IS31FLCOMMON)
+# include "is31flcommon.h"
+#endif
+#ifdef LED_MATRIX_SNLED27351
+# include "snled27351-simple.h"
+#endif
+
+#ifndef LED_MATRIX_TIMEOUT
+# define LED_MATRIX_TIMEOUT 0
+#endif
+
+#ifndef LED_MATRIX_MAXIMUM_BRIGHTNESS
+# define LED_MATRIX_MAXIMUM_BRIGHTNESS UINT8_MAX
+#endif
+
+#ifndef LED_MATRIX_VAL_STEP
+# define LED_MATRIX_VAL_STEP 8
+#endif
+
+#ifndef LED_MATRIX_SPD_STEP
+# define LED_MATRIX_SPD_STEP 16
+#endif
+
+#ifndef LED_MATRIX_DEFAULT_ON
+# define LED_MATRIX_DEFAULT_ON true
+#endif
+
+#ifndef LED_MATRIX_DEFAULT_MODE
+# define LED_MATRIX_DEFAULT_MODE LED_MATRIX_SOLID
+#endif
+
+#ifndef LED_MATRIX_DEFAULT_VAL
+# define LED_MATRIX_DEFAULT_VAL LED_MATRIX_MAXIMUM_BRIGHTNESS
+#endif
+
+#ifndef LED_MATRIX_DEFAULT_SPD
+# define LED_MATRIX_DEFAULT_SPD UINT8_MAX / 2
#endif
#ifndef LED_MATRIX_LED_FLUSH_LIMIT
diff --git a/quantum/led_matrix/led_matrix_drivers.c b/quantum/led_matrix/led_matrix_drivers.c
index 13c8935d11..f52870aea5 100644
--- a/quantum/led_matrix/led_matrix_drivers.c
+++ b/quantum/led_matrix/led_matrix_drivers.c
@@ -25,13 +25,16 @@
* in their own files.
*/
-#if defined(IS31FL3731) || defined(IS31FL3733) || defined(IS31FLCOMMON) || defined(CKLED2001)
+#if defined(LED_MATRIX_IS31FL3218) || defined(LED_MATRIX_IS31FL3731) || defined(LED_MATRIX_IS31FL3733) || defined(LED_MATRIX_IS31FL3736) || defined(LED_MATRIX_IS31FL3737) || defined(LED_MATRIX_IS31FL3741) || defined(IS31FLCOMMON) || defined(LED_MATRIX_SNLED27351)
# include "i2c_master.h"
static void init(void) {
i2c_init();
-# if defined(IS31FL3731)
+# if defined(LED_MATRIX_IS31FL3218)
+ is31fl3218_init();
+
+# elif defined(LED_MATRIX_IS31FL3731)
is31fl3731_init(LED_DRIVER_ADDR_1);
# if defined(LED_DRIVER_ADDR_2)
is31fl3731_init(LED_DRIVER_ADDR_2);
@@ -43,7 +46,7 @@ static void init(void) {
# endif
# endif
-# elif defined(IS31FL3733)
+# elif defined(LED_MATRIX_IS31FL3733)
# if !defined(LED_DRIVER_SYNC_1)
# define LED_DRIVER_SYNC_1 0
# endif
@@ -67,6 +70,42 @@ static void init(void) {
# endif
# endif
+# elif defined(LED_MATRIX_IS31FL3736)
+ is31fl3736_init(LED_DRIVER_ADDR_1);
+# if defined(LED_DRIVER_ADDR_2)
+ is31fl3736_init(LED_DRIVER_ADDR_2);
+# if defined(LED_DRIVER_ADDR_3)
+ is31fl3736_init(LED_DRIVER_ADDR_3);
+# if defined(LED_DRIVER_ADDR_4)
+ is31fl3736_init(LED_DRIVER_ADDR_4);
+# endif
+# endif
+# endif
+
+# elif defined(LED_MATRIX_IS31FL3737)
+ is31fl3737_init(LED_DRIVER_ADDR_1);
+# if defined(LED_DRIVER_ADDR_2)
+ is31fl3737_init(LED_DRIVER_ADDR_2);
+# if defined(LED_DRIVER_ADDR_3)
+ is31fl3737_init(LED_DRIVER_ADDR_3);
+# if defined(LED_DRIVER_ADDR_4)
+ is31fl3737_init(LED_DRIVER_ADDR_4);
+# endif
+# endif
+# endif
+
+# elif defined(LED_MATRIX_IS31FL3741)
+ is31fl3741_init(LED_DRIVER_ADDR_1);
+# if defined(LED_DRIVER_ADDR_2)
+ is31fl3741_init(LED_DRIVER_ADDR_2);
+# if defined(LED_DRIVER_ADDR_3)
+ is31fl3741_init(LED_DRIVER_ADDR_3);
+# if defined(LED_DRIVER_ADDR_4)
+ is31fl3741_init(LED_DRIVER_ADDR_4);
+# endif
+# endif
+# endif
+
# elif defined(IS31FLCOMMON)
IS31FL_common_init(DRIVER_ADDR_1, ISSI_SSR_1);
# if defined(LED_DRIVER_ADDR_2)
@@ -78,38 +117,49 @@ static void init(void) {
# endif
# endif
# endif
-# elif defined(CKLED2001)
+# elif defined(LED_MATRIX_SNLED27351)
# if defined(LED_DRIVER_SHUTDOWN_PIN)
setPinOutput(LED_DRIVER_SHUTDOWN_PIN);
writePinHigh(LED_DRIVER_SHUTDOWN_PIN);
# endif
- ckled2001_init(DRIVER_ADDR_1);
+ snled27351_init(DRIVER_ADDR_1);
# if defined(DRIVER_ADDR_2)
- ckled2001_init(DRIVER_ADDR_2);
+ snled27351_init(DRIVER_ADDR_2);
# if defined(DRIVER_ADDR_3)
- ckled2001_init(DRIVER_ADDR_3);
+ snled27351_init(DRIVER_ADDR_3);
# if defined(DRIVER_ADDR_4)
- ckled2001_init(DRIVER_ADDR_4);
+ snled27351_init(DRIVER_ADDR_4);
# endif
# endif
# endif
# endif
for (int index = 0; index < LED_MATRIX_LED_COUNT; index++) {
-# if defined(IS31FL3731)
+# if defined(LED_MATRIX_IS31FL3218)
+ is31fl3218_set_led_control_register(index, true);
+# elif defined(LED_MATRIX_IS31FL3731)
is31fl3731_set_led_control_register(index, true);
-# elif defined(IS31FL3733)
+# elif defined(LED_MATRIX_IS31FL3733)
is31fl3733_set_led_control_register(index, true);
+# elif defined(LED_MATRIX_IS31FL3736)
+ is31fl3736_set_led_control_register(index, true);
+# elif defined(LED_MATRIX_IS31FL3737)
+ is31fl3737_set_led_control_register(index, true);
+# elif defined(LED_MATRIX_IS31FL3741)
+ is31fl3741_set_led_control_register(index, true);
# elif defined(IS31FLCOMMON)
IS31FL_simple_set_scaling_buffer(index, true);
-# elif defined(CKLED2001)
- ckled2001_set_led_control_register(index, true);
+# elif defined(LED_MATRIX_SNLED27351)
+ snled27351_set_led_control_register(index, true);
# endif
}
// This actually updates the LED drivers
-# if defined(IS31FL3731)
+# if defined(LED_MATRIX_IS31FL3218)
+ is31fl3218_update_led_control_registers();
+
+# elif defined(LED_MATRIX_IS31FL3731)
is31fl3731_update_led_control_registers(LED_DRIVER_ADDR_1, 0);
# if defined(LED_DRIVER_ADDR_2)
is31fl3731_update_led_control_registers(LED_DRIVER_ADDR_2, 1);
@@ -121,7 +171,7 @@ static void init(void) {
# endif
# endif
-# elif defined(IS31FL3733)
+# elif defined(LED_MATRIX_IS31FL3733)
is31fl3733_update_led_control_registers(LED_DRIVER_ADDR_1, 0);
# if defined(LED_DRIVER_ADDR_2)
is31fl3733_update_led_control_registers(LED_DRIVER_ADDR_2, 1);
@@ -133,6 +183,42 @@ static void init(void) {
# endif
# endif
+# elif defined(LED_MATRIX_IS31FL3736)
+ is31fl3736_update_led_control_registers(LED_DRIVER_ADDR_1, 0);
+# if defined(LED_DRIVER_ADDR_2)
+ is31fl3736_update_led_control_registers(LED_DRIVER_ADDR_2, 1);
+# if defined(LED_DRIVER_ADDR_3)
+ is31fl3736_update_led_control_registers(LED_DRIVER_ADDR_3, 2);
+# if defined(LED_DRIVER_ADDR_4)
+ is31fl3736_update_led_control_registers(LED_DRIVER_ADDR_4, 3);
+# endif
+# endif
+# endif
+
+# elif defined(LED_MATRIX_IS31FL3737)
+ is31fl3737_update_led_control_registers(LED_DRIVER_ADDR_1, 0);
+# if defined(LED_DRIVER_ADDR_2)
+ is31fl3737_update_led_control_registers(LED_DRIVER_ADDR_2, 1);
+# if defined(LED_DRIVER_ADDR_3)
+ is31fl3737_update_led_control_registers(LED_DRIVER_ADDR_3, 2);
+# if defined(LED_DRIVER_ADDR_4)
+ is31fl3737_update_led_control_registers(LED_DRIVER_ADDR_4, 3);
+# endif
+# endif
+# endif
+
+# elif defined(LED_MATRIX_IS31FL3741)
+ is31fl3741_update_led_control_registers(LED_DRIVER_ADDR_1, 0);
+# if defined(LED_DRIVER_ADDR_2)
+ is31fl3741_update_led_control_registers(LED_DRIVER_ADDR_2, 1);
+# if defined(LED_DRIVER_ADDR_3)
+ is31fl3741_update_led_control_registers(LED_DRIVER_ADDR_3, 2);
+# if defined(LED_DRIVER_ADDR_4)
+ is31fl3741_update_led_control_registers(LED_DRIVER_ADDR_4, 3);
+# endif
+# endif
+# endif
+
# elif defined(IS31FLCOMMON)
# ifdef ISSI_MANUAL_SCALING
IS31FL_set_manual_scaling_buffer();
@@ -147,21 +233,33 @@ static void init(void) {
# endif
# endif
# endif
-# elif defined(CKLED2001)
- ckled2001_update_led_control_registers(DRIVER_ADDR_1, 0);
+# elif defined(LED_MATRIX_SNLED27351)
+ snled27351_update_led_control_registers(DRIVER_ADDR_1, 0);
# if defined(DRIVER_ADDR_2)
- ckled2001_update_led_control_registers(DRIVER_ADDR_2, 1);
+ snled27351_update_led_control_registers(DRIVER_ADDR_2, 1);
# if defined(DRIVER_ADDR_3)
- ckled2001_update_led_control_registers(DRIVER_ADDR_3, 2);
+ snled27351_update_led_control_registers(DRIVER_ADDR_3, 2);
# if defined(DRIVER_ADDR_4)
- ckled2001_update_led_control_registers(DRIVER_ADDR_4, 3);
+ snled27351_update_led_control_registers(DRIVER_ADDR_4, 3);
# endif
# endif
# endif
# endif
}
-# if defined(IS31FL3731)
+# if defined(LED_MATRIX_IS31FL3218)
+static void flush(void) {
+ is31fl3218_update_pwm_buffers();
+}
+
+const led_matrix_driver_t led_matrix_driver = {
+ .init = init,
+ .flush = flush,
+ .set_value = is31fl3218_set_value,
+ .set_value_all = is31fl3218_set_value_all,
+};
+
+# elif defined(LED_MATRIX_IS31FL3731)
static void flush(void) {
is31fl3731_update_pwm_buffers(LED_DRIVER_ADDR_1, 0);
# if defined(LED_DRIVER_ADDR_2)
@@ -176,13 +274,13 @@ static void flush(void) {
}
const led_matrix_driver_t led_matrix_driver = {
- .init = init,
- .flush = flush,
- .set_value = is31fl3731_set_value,
+ .init = init,
+ .flush = flush,
+ .set_value = is31fl3731_set_value,
.set_value_all = is31fl3731_set_value_all,
};
-# elif defined(IS31FL3733)
+# elif defined(LED_MATRIX_IS31FL3733)
static void flush(void) {
is31fl3733_update_pwm_buffers(LED_DRIVER_ADDR_1, 0);
# if defined(LED_DRIVER_ADDR_2)
@@ -203,6 +301,69 @@ const led_matrix_driver_t led_matrix_driver = {
.set_value_all = is31fl3733_set_value_all,
};
+# elif defined(LED_MATRIX_IS31FL3736)
+static void flush(void) {
+ is31fl3736_update_pwm_buffers(LED_DRIVER_ADDR_1, 0);
+# if defined(LED_DRIVER_ADDR_2)
+ is31fl3736_update_pwm_buffers(LED_DRIVER_ADDR_2, 1);
+# if defined(LED_DRIVER_ADDR_3)
+ is31fl3736_update_pwm_buffers(LED_DRIVER_ADDR_3, 2);
+# if defined(LED_DRIVER_ADDR_4)
+ is31fl3736_update_pwm_buffers(LED_DRIVER_ADDR_4, 3);
+# endif
+# endif
+# endif
+}
+
+const led_matrix_driver_t led_matrix_driver = {
+ .init = init,
+ .flush = flush,
+ .set_value = is31fl3736_set_value,
+ .set_value_all = is31fl3736_set_value_all,
+};
+
+# elif defined(LED_MATRIX_IS31FL3737)
+static void flush(void) {
+ is31fl3737_update_pwm_buffers(LED_DRIVER_ADDR_1, 0);
+# if defined(LED_DRIVER_ADDR_2)
+ is31fl3737_update_pwm_buffers(LED_DRIVER_ADDR_2, 1);
+# if defined(LED_DRIVER_ADDR_3)
+ is31fl3737_update_pwm_buffers(LED_DRIVER_ADDR_3, 2);
+# if defined(LED_DRIVER_ADDR_4)
+ is31fl3737_update_pwm_buffers(LED_DRIVER_ADDR_4, 3);
+# endif
+# endif
+# endif
+}
+
+const led_matrix_driver_t led_matrix_driver = {
+ .init = init,
+ .flush = flush,
+ .set_value = is31fl3737_set_value,
+ .set_value_all = is31fl3737_set_value_all,
+};
+
+# elif defined(LED_MATRIX_IS31FL3741)
+static void flush(void) {
+ is31fl3741_update_pwm_buffers(LED_DRIVER_ADDR_1, 0);
+# if defined(LED_DRIVER_ADDR_2)
+ is31fl3741_update_pwm_buffers(LED_DRIVER_ADDR_2, 1);
+# if defined(LED_DRIVER_ADDR_3)
+ is31fl3741_update_pwm_buffers(LED_DRIVER_ADDR_3, 2);
+# if defined(LED_DRIVER_ADDR_4)
+ is31fl3741_update_pwm_buffers(LED_DRIVER_ADDR_4, 3);
+# endif
+# endif
+# endif
+}
+
+const led_matrix_driver_t led_matrix_driver = {
+ .init = init,
+ .flush = flush,
+ .set_value = is31fl3741_set_value,
+ .set_value_all = is31fl3741_set_value_all,
+};
+
# elif defined(IS31FLCOMMON)
static void flush(void) {
IS31FL_common_update_pwm_register(DRIVER_ADDR_1, 0);
@@ -223,15 +384,15 @@ const led_matrix_driver_t led_matrix_driver = {
.set_value = IS31FL_simple_set_brightness,
.set_value_all = IS31FL_simple_set_brigntness_all,
};
-# elif defined(CKLED2001)
+# elif defined(LED_MATRIX_SNLED27351)
static void flush(void) {
- ckled2001_update_pwm_buffers(DRIVER_ADDR_1, 0);
+ snled27351_update_pwm_buffers(DRIVER_ADDR_1, 0);
# if defined(DRIVER_ADDR_2)
- ckled2001_update_pwm_buffers(DRIVER_ADDR_2, 1);
+ snled27351_update_pwm_buffers(DRIVER_ADDR_2, 1);
# if defined(DRIVER_ADDR_3)
- ckled2001_update_pwm_buffers(DRIVER_ADDR_3, 2);
+ snled27351_update_pwm_buffers(DRIVER_ADDR_3, 2);
# if defined(DRIVER_ADDR_4)
- ckled2001_update_pwm_buffers(DRIVER_ADDR_4, 3);
+ snled27351_update_pwm_buffers(DRIVER_ADDR_4, 3);
# endif
# endif
# endif
@@ -240,8 +401,8 @@ static void flush(void) {
const led_matrix_driver_t led_matrix_driver = {
.init = init,
.flush = flush,
- .set_value = ckled2001_set_value,
- .set_value_all = ckled2001_set_value_all,
+ .set_value = snled27351_set_value,
+ .set_value_all = snled27351_set_value_all,
};
# endif
#endif
diff --git a/quantum/led_matrix/led_matrix_types.h b/quantum/led_matrix/led_matrix_types.h
index 6709a558bb..5a516ceb10 100644
--- a/quantum/led_matrix/led_matrix_types.h
+++ b/quantum/led_matrix/led_matrix_types.h
@@ -18,16 +18,7 @@
#include <stdint.h>
#include <stdbool.h>
-
-#if defined(__GNUC__)
-# define PACKED __attribute__((__packed__))
-#else
-# define PACKED
-#endif
-
-#if defined(_MSC_VER)
-# pragma pack(push, 1)
-#endif
+#include "util.h"
#if defined(LED_MATRIX_KEYPRESSES) || defined(LED_MATRIX_KEYRELEASES)
# define LED_MATRIX_KEYREACTIVE_ENABLED
@@ -92,7 +83,3 @@ typedef union {
} led_eeconfig_t;
_Static_assert(sizeof(led_eeconfig_t) == sizeof(uint32_t), "LED Matrix EECONFIG out of spec.");
-
-#if defined(_MSC_VER)
-# pragma pack(pop)
-#endif
diff --git a/quantum/mousekey.c b/quantum/mousekey.c
index c982a2f40b..3910811752 100644
--- a/quantum/mousekey.c
+++ b/quantum/mousekey.c
@@ -389,7 +389,20 @@ void mousekey_on(uint8_t code) {
if (mouse_timer == 0) {
mouse_timer = timer_read();
}
-# endif /* #ifdef MK_KINETIC_SPEED */
+# endif
+
+# ifndef MOUSEKEY_INERTIA
+ // If mouse report is not zero, the current mousekey press is overlapping
+ // with another. Restart acceleration for smoother directional transition.
+ if (mouse_report.x || mouse_report.y || mouse_report.h || mouse_report.v) {
+# ifdef MK_KINETIC_SPEED
+ mouse_timer = timer_read() - (MOUSEKEY_INTERVAL << 2);
+# else
+ mousekey_repeat = MOUSEKEY_MOVE_DELTA;
+ mousekey_wheel_repeat = MOUSEKEY_WHEEL_DELTA;
+# endif
+ }
+# endif // ifndef MOUSEKEY_INERTIA
# ifdef MOUSEKEY_INERTIA
diff --git a/quantum/painter/lvgl/qp_lvgl.c b/quantum/painter/lvgl/qp_lvgl.c
index 280aeaf91f..877b2652c6 100644
--- a/quantum/painter/lvgl/qp_lvgl.c
+++ b/quantum/painter/lvgl/qp_lvgl.c
@@ -81,8 +81,8 @@ bool qp_lvgl_attach(painter_device_t device) {
lvgl_state_t *lv_task_handler_state = &lvgl_states[1];
lv_task_handler_state->fnc_id = 1;
- lv_task_handler_state->delay_ms = 5;
- lv_task_handler_state->defer_token = defer_exec_advanced(lvgl_executors, 2, 5, tick_task_callback, lv_task_handler_state);
+ lv_task_handler_state->delay_ms = QP_LVGL_TASK_PERIOD;
+ lv_task_handler_state->defer_token = defer_exec_advanced(lvgl_executors, 2, QP_LVGL_TASK_PERIOD, tick_task_callback, lv_task_handler_state);
if (lv_task_handler_state->defer_token == INVALID_DEFERRED_TOKEN) {
qp_dprintf("qp_lvgl_attach: fail (could not set up qp_lvgl executor)\n");
@@ -96,13 +96,14 @@ bool qp_lvgl_attach(painter_device_t device) {
// Set up lvgl display buffer
static lv_disp_draw_buf_t draw_buf;
// Allocate a buffer for 1/10 screen size
- const size_t count_required = driver->panel_width * driver->panel_height / 10;
- color_buffer = color_buffer ? realloc(color_buffer, sizeof(lv_color_t) * count_required) : malloc(sizeof(lv_color_t) * count_required);
- if (!color_buffer) {
+ const size_t count_required = driver->panel_width * driver->panel_height / 10;
+ void * new_color_buffer = realloc(color_buffer, sizeof(lv_color_t) * count_required);
+ if (!new_color_buffer) {
qp_dprintf("qp_lvgl_attach: fail (could not set up memory buffer)\n");
qp_lvgl_detach();
return false;
}
+ color_buffer = new_color_buffer;
memset(color_buffer, 0, sizeof(lv_color_t) * count_required);
// Initialize the display buffer.
lv_disp_draw_buf_init(&draw_buf, color_buffer, NULL, count_required);
diff --git a/quantum/painter/lvgl/qp_lvgl.h b/quantum/painter/lvgl/qp_lvgl.h
index d9ad5e8df1..87ba3ac0a5 100644
--- a/quantum/painter/lvgl/qp_lvgl.h
+++ b/quantum/painter/lvgl/qp_lvgl.h
@@ -7,6 +7,10 @@
#include "qp.h"
#include "lvgl.h"
+#ifndef QP_LVGL_TASK_PERIOD
+# define QP_LVGL_TASK_PERIOD 5
+#endif
+
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Quantum Painter - LVGL External API
diff --git a/quantum/painter/qp.c b/quantum/painter/qp.c
index f27bb7892a..609163afe2 100644
--- a/quantum/painter/qp.c
+++ b/quantum/painter/qp.c
@@ -131,49 +131,124 @@ bool qp_flush(painter_device_t device) {
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-// Quantum Painter External API: qp_get_geometry
+// Quantum Painter External API: qp_get_*
-void qp_get_geometry(painter_device_t device, uint16_t *width, uint16_t *height, painter_rotation_t *rotation, uint16_t *offset_x, uint16_t *offset_y) {
- qp_dprintf("qp_get_geometry: entry\n");
+uint16_t qp_get_width(painter_device_t device) {
+ qp_dprintf("qp_get_width: entry\n");
painter_driver_t *driver = (painter_driver_t *)device;
- if (!driver) {
- qp_dprintf("qp_get_geometry: fail (pointer to NULL)\n");
- return;
+ if (!driver || !driver->validate_ok) {
+ qp_dprintf("qp_get_width: fail (invalid driver)\n");
+ return 0;
+ }
+
+ uint16_t width;
+ switch (driver->rotation) {
+ default:
+ case QP_ROTATION_0:
+ case QP_ROTATION_180:
+ width = driver->panel_width;
+
+ case QP_ROTATION_90:
+ case QP_ROTATION_270:
+ width = driver->panel_height;
+ }
+
+ qp_dprintf("qp_get_width: ok\n");
+ return width;
+}
+
+uint16_t qp_get_height(painter_device_t device) {
+ qp_dprintf("qp_get_height: entry\n");
+ painter_driver_t *driver = (painter_driver_t *)device;
+
+ if (!driver || !driver->validate_ok) {
+ qp_dprintf("qp_get_height: fail (invalid driver)\n");
+ return 0;
}
+ uint16_t height;
switch (driver->rotation) {
default:
case QP_ROTATION_0:
case QP_ROTATION_180:
- if (width) {
- *width = driver->panel_width;
- }
- if (height) {
- *height = driver->panel_height;
- }
- break;
+ height = driver->panel_height;
+
case QP_ROTATION_90:
case QP_ROTATION_270:
- if (width) {
- *width = driver->panel_height;
- }
- if (height) {
- *height = driver->panel_width;
- }
- break;
+ height = driver->panel_width;
+ }
+
+ qp_dprintf("qp_get_height: ok\n");
+ return height;
+}
+
+painter_rotation_t qp_get_rotation(painter_device_t device) {
+ qp_dprintf("qp_get_rotation: entry\n");
+ painter_driver_t *driver = (painter_driver_t *)device;
+
+ if (!driver || !driver->validate_ok) {
+ qp_dprintf("qp_get_rotation: fail (invalid driver)\n");
+ return QP_ROTATION_0;
+ }
+
+ qp_dprintf("qp_get_rotation: ok\n");
+ return driver->rotation;
+}
+
+uint16_t qp_get_offset_x(painter_device_t device) {
+ qp_dprintf("qp_get_offset_x: entry\n");
+ painter_driver_t *driver = (painter_driver_t *)device;
+
+ if (!driver || !driver->validate_ok) {
+ qp_dprintf("qp_get_offset_x: fail (invalid driver)\n");
+ return 0;
+ }
+
+ qp_dprintf("qp_get_offset_x: ok\n");
+ return driver->offset_x;
+}
+
+uint16_t qp_get_offset_y(painter_device_t device) {
+ qp_dprintf("qp_get_offset_y: entry\n");
+ painter_driver_t *driver = (painter_driver_t *)device;
+
+ if (!driver || !driver->validate_ok) {
+ qp_dprintf("qp_get_offset_y: fail (invalid driver)\n");
+ return 0;
+ }
+
+ qp_dprintf("qp_get_offset_y: ok\n");
+ return driver->offset_y;
+}
+
+void qp_get_geometry(painter_device_t device, uint16_t *width, uint16_t *height, painter_rotation_t *rotation, uint16_t *offset_x, uint16_t *offset_y) {
+ qp_dprintf("qp_geometry: entry\n");
+ painter_driver_t *driver = (painter_driver_t *)device;
+
+ if (!driver || !driver->validate_ok) {
+ qp_dprintf("qp_geometry: fail (invalid driver)\n");
+ return;
+ }
+
+ if (width) {
+ *width = qp_get_width(device);
+ }
+
+ if (height) {
+ *height = qp_get_height(device);
}
if (rotation) {
- *rotation = driver->rotation;
+ *rotation = qp_get_rotation(device);
}
if (offset_x) {
- *offset_x = driver->offset_x;
+ *offset_x = qp_get_offset_x(device);
}
if (offset_y) {
- *offset_y = driver->offset_y;
+ *offset_y = qp_get_offset_y(device);
}
qp_dprintf("qp_get_geometry: ok\n");
diff --git a/quantum/painter/qp.h b/quantum/painter/qp.h
index 7222d3b413..68cb40aa59 100644
--- a/quantum/painter/qp.h
+++ b/quantum/painter/qp.h
@@ -176,6 +176,41 @@ bool qp_clear(painter_device_t device);
bool qp_flush(painter_device_t device);
/**
+ * Retrieves the width of the display.
+ *
+ * @param device[in] the handle of the device to control
+ */
+uint16_t qp_get_width(painter_device_t device);
+
+/**
+ * Retrieves the height of the display.
+ *
+ * @param device[in] the handle of the device to control
+ */
+uint16_t qp_get_height(painter_device_t device);
+
+/**
+ * Retrieves the rotation of the display.
+ *
+ * @param device[in] the handle of the device to control
+ */
+painter_rotation_t qp_get_rotation(painter_device_t device);
+
+/**
+ * Retrieves the x-offset of the display.
+ *
+ * @param device[in] the handle of the device to control
+ */
+uint16_t qp_get_offset_x(painter_device_t device);
+
+/**
+ * Retrieves the y-offset of the display.
+ *
+ * @param device[in] the handle of the device to control
+ */
+uint16_t qp_get_offset_y(painter_device_t device);
+
+/**
* Retrieves the size, rotation, and offsets for the display.
*
* @note Any arguments of NULL will be ignored.
diff --git a/quantum/painter/qp_draw_ellipse.c b/quantum/painter/qp_draw_ellipse.c
index e912a3e91f..9e77bca8b0 100644
--- a/quantum/painter/qp_draw_ellipse.c
+++ b/quantum/painter/qp_draw_ellipse.c
@@ -67,10 +67,10 @@ bool qp_ellipse(painter_device_t device, uint16_t x, uint16_t y, uint16_t sizex,
return false;
}
- int16_t aa = ((int16_t)sizex) * ((int16_t)sizex);
- int16_t bb = ((int16_t)sizey) * ((int16_t)sizey);
- int16_t fa = 4 * ((int16_t)aa);
- int16_t fb = 4 * ((int16_t)bb);
+ int32_t aa = ((int32_t)sizex) * ((int32_t)sizex);
+ int32_t bb = ((int32_t)sizey) * ((int32_t)sizey);
+ int32_t fa = 4 * aa;
+ int32_t fb = 4 * bb;
int16_t dx = 0;
int16_t dy = ((int16_t)sizey);
@@ -83,7 +83,7 @@ bool qp_ellipse(painter_device_t device, uint16_t x, uint16_t y, uint16_t sizex,
}
bool ret = true;
- for (int16_t delta = (2 * bb) + (aa * (1 - (2 * sizey))); bb * dx <= aa * dy; dx++) {
+ for (int32_t delta = (2 * bb) + (aa * (1 - (2 * sizey))); bb * dx <= aa * dy; dx++) {
if (!qp_ellipse_helper_impl(device, x, y, dx, dy, filled)) {
ret = false;
break;
@@ -98,7 +98,7 @@ bool qp_ellipse(painter_device_t device, uint16_t x, uint16_t y, uint16_t sizex,
dx = sizex;
dy = 0;
- for (int16_t delta = (2 * aa) + (bb * (1 - (2 * sizex))); aa * dy <= bb * dx; dy++) {
+ for (int32_t delta = (2 * aa) + (bb * (1 - (2 * sizex))); aa * dy <= bb * dx; dy++) {
if (!qp_ellipse_helper_impl(device, x, y, dx, dy, filled)) {
ret = false;
break;
diff --git a/quantum/process_keycode/process_auto_shift.c b/quantum/process_keycode/process_auto_shift.c
index 9b78214e43..28a21c4b67 100644
--- a/quantum/process_keycode/process_auto_shift.c
+++ b/quantum/process_keycode/process_auto_shift.c
@@ -66,7 +66,7 @@ __attribute__((weak)) bool get_custom_auto_shifted_key(uint16_t keycode, keyreco
return false;
}
-/** \brief Called on physical press, returns whether is Auto Shift key */
+/** \brief Called on physical press, returns whether key is an Auto Shift key */
__attribute__((weak)) bool get_auto_shifted_key(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
#ifndef NO_AUTO_SHIFT_ALPHA
@@ -178,9 +178,8 @@ static bool autoshift_press(uint16_t keycode, uint16_t now, keyrecord_t *record)
}
// Store record to be sent to user functions if there's no release record then.
- autoshift_lastrecord = *record;
- autoshift_lastrecord.event.pressed = false;
- autoshift_lastrecord.event.time = 0;
+ autoshift_lastrecord = *record;
+ autoshift_lastrecord.event.time = 0;
// clang-format off
#if defined(AUTO_SHIFT_REPEAT) || defined(AUTO_SHIFT_REPEAT_PER_KEY)
if (keycode == autoshift_lastkey &&
@@ -409,8 +408,12 @@ bool process_auto_shift(uint16_t keycode, keyrecord_t *record) {
// If Retro Shift is disabled, possible custom actions shouldn't happen.
// clang-format off
#if defined(RETRO_SHIFT) && !defined(NO_ACTION_TAPPING)
-# ifdef HOLD_ON_OTHER_KEY_PRESS_PER_KEY
- const bool is_hold_on_interrupt = get_hold_on_other_key_press(keycode, record);
+# ifdef HOLD_ON_OTHER_KEY_PRESS
+ const bool is_hold_on_interrupt = (IS_QK_MOD_TAP(keycode)
+# ifdef HOLD_ON_OTHER_KEY_PRESS_PER_KEY
+ && get_hold_on_other_key_press(keycode, record)
+# endif
+ );
# else
const bool is_hold_on_interrupt = false;
# endif
@@ -450,8 +453,12 @@ bool process_auto_shift(uint16_t keycode, keyrecord_t *record) {
#endif
) {
// Fixes modifiers not being applied to rolls with AUTO_SHIFT_MODIFIERS set.
-#ifdef HOLD_ON_OTHER_KEY_PRESS_PER_KEY
- if (autoshift_flags.in_progress && get_hold_on_other_key_press(keycode, record)) {
+#ifdef HOLD_ON_OTHER_KEY_PRESS
+ if (autoshift_flags.in_progress
+# ifdef HOLD_ON_OTHER_KEY_PRESS_PER_KEY
+ && get_hold_on_other_key_press(keycode, record)
+# endif
+ ) {
autoshift_end(KC_NO, now, false, &autoshift_lastrecord);
}
#endif
@@ -488,10 +495,8 @@ void retroshift_poll_time(keyevent_t *event) {
}
// Used to swap the times of Retro Shifted key and Auto Shift key that interrupted it.
void retroshift_swap_times(void) {
- if (last_retroshift_time != 0 && autoshift_flags.in_progress) {
- uint16_t temp = retroshift_time;
- retroshift_time = last_retroshift_time;
- last_retroshift_time = temp;
+ if (autoshift_flags.in_progress) {
+ autoshift_time = last_retroshift_time;
}
}
#endif
diff --git a/quantum/process_keycode/process_auto_shift.h b/quantum/process_keycode/process_auto_shift.h
index 885a47b533..1353548aa6 100644
--- a/quantum/process_keycode/process_auto_shift.h
+++ b/quantum/process_keycode/process_auto_shift.h
@@ -56,4 +56,5 @@ uint16_t (get_autoshift_timeout)(uint16_t keycode, keyrecord_t *record);
void set_autoshift_timeout(uint16_t timeout);
void autoshift_matrix_scan(void);
bool get_custom_auto_shifted_key(uint16_t keycode, keyrecord_t *record);
+bool get_auto_shifted_key(uint16_t keycode, keyrecord_t *record);
// clang-format on
diff --git a/quantum/quantum.c b/quantum/quantum.c
index 3323a5adb6..f721ab0a1f 100644
--- a/quantum/quantum.c
+++ b/quantum/quantum.c
@@ -68,10 +68,6 @@
# include "process_unicode_common.h"
#endif
-#ifdef VELOCIKEY_ENABLE
-# include "velocikey.h"
-#endif
-
#ifdef AUDIO_ENABLE
# ifndef GOODBYE_SONG
# define GOODBYE_SONG SONG(GOODBYE_SOUND)
@@ -288,9 +284,9 @@ bool process_record_quantum(keyrecord_t *record) {
}
#endif
-#ifdef VELOCIKEY_ENABLE
- if (velocikey_enabled() && record->event.pressed) {
- velocikey_accelerate();
+#ifdef RGBLIGHT_ENABLE
+ if (record->event.pressed) {
+ preprocess_rgblight();
}
#endif
diff --git a/quantum/quantum.h b/quantum/quantum.h
index 4d183e755f..e41542e4af 100644
--- a/quantum/quantum.h
+++ b/quantum/quantum.h
@@ -56,6 +56,8 @@
#include "suspend.h"
#include <stddef.h>
#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
#ifdef DEFERRED_EXEC_ENABLE
# include "deferred_exec.h"
@@ -209,6 +211,10 @@ extern layer_state_t layer_state;
# include "pointing_device.h"
#endif
+#ifdef MOUSEKEY_ENABLE
+# include "mousekey.h"
+#endif
+
#ifdef CAPS_WORD_ENABLE
# include "caps_word.h"
# include "process_caps_word.h"
diff --git a/quantum/rgb_matrix/animations/flower_blooming_anim.h b/quantum/rgb_matrix/animations/flower_blooming_anim.h
new file mode 100644
index 0000000000..7629fde858
--- /dev/null
+++ b/quantum/rgb_matrix/animations/flower_blooming_anim.h
@@ -0,0 +1,53 @@
+/* Copyright 2023 HorrorTroll <https://github.com/HorrorTroll>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General 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/>.
+ */
+
+#ifdef ENABLE_RGB_MATRIX_FLOWER_BLOOMING
+RGB_MATRIX_EFFECT(FLOWER_BLOOMING)
+# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
+
+typedef HSV (*flower_blooming_f)(HSV hsv, uint8_t i, uint8_t time);
+
+bool effect_runner_bloom(effect_params_t* params, flower_blooming_f effect_func) {
+ RGB_MATRIX_USE_LIMITS(led_min, led_max);
+
+ uint8_t time = scale16by8(g_rgb_timer, qadd8(rgb_matrix_config.speed / 10, 1));
+ for (uint8_t i = led_min; i < led_max; i++) {
+ RGB_MATRIX_TEST_LED_FLAGS();
+ if (g_led_config.point[i].y > k_rgb_matrix_center.y) {
+ RGB bgr = rgb_matrix_hsv_to_rgb(effect_func(rgb_matrix_config.hsv, i, time));
+ rgb_matrix_set_color(i, bgr.b, bgr.g, bgr.r);
+ } else {
+ RGB rgb = rgb_matrix_hsv_to_rgb(effect_func(rgb_matrix_config.hsv, i, time));
+ rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
+ }
+ }
+ return rgb_matrix_check_finished_leds(led_max);
+}
+
+static HSV FLOWER_BLOOMING_math(HSV hsv, uint8_t i, uint8_t time) {
+ if (g_led_config.point[i].y > k_rgb_matrix_center.y)
+ hsv.h = g_led_config.point[i].x * 3 - g_led_config.point[i].y * 3 + time;
+ else
+ hsv.h = g_led_config.point[i].x * 3 - g_led_config.point[i].y * 3 - time;
+ return hsv;
+}
+
+bool FLOWER_BLOOMING(effect_params_t* params) {
+ return effect_runner_bloom(params, &FLOWER_BLOOMING_math);
+}
+
+# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
+#endif // ENABLE_RGB_MATRIX_FLOWER_BLOOMING
diff --git a/quantum/rgb_matrix/animations/rgb_matrix_effects.inc b/quantum/rgb_matrix/animations/rgb_matrix_effects.inc
index ac7bac428d..df34718838 100644
--- a/quantum/rgb_matrix/animations/rgb_matrix_effects.inc
+++ b/quantum/rgb_matrix/animations/rgb_matrix_effects.inc
@@ -21,6 +21,7 @@
#include "dual_beacon_anim.h"
#include "rainbow_beacon_anim.h"
#include "rainbow_pinwheels_anim.h"
+#include "flower_blooming_anim.h"
#include "raindrops_anim.h"
#include "jellybean_raindrops_anim.h"
#include "hue_breathing_anim.h"
diff --git a/quantum/rgb_matrix/rgb_matrix.c b/quantum/rgb_matrix/rgb_matrix.c
index 96be615162..8e69616a0e 100644
--- a/quantum/rgb_matrix/rgb_matrix.c
+++ b/quantum/rgb_matrix/rgb_matrix.c
@@ -60,56 +60,6 @@ __attribute__((weak)) RGB rgb_matrix_hsv_to_rgb(HSV hsv) {
// -----End rgb effect includes macros-------
// ------------------------------------------
-#ifndef RGB_MATRIX_TIMEOUT
-# define RGB_MATRIX_TIMEOUT 0
-#endif
-
-#if !defined(RGB_MATRIX_MAXIMUM_BRIGHTNESS) || RGB_MATRIX_MAXIMUM_BRIGHTNESS > UINT8_MAX
-# undef RGB_MATRIX_MAXIMUM_BRIGHTNESS
-# define RGB_MATRIX_MAXIMUM_BRIGHTNESS UINT8_MAX
-#endif
-
-#if !defined(RGB_MATRIX_HUE_STEP)
-# define RGB_MATRIX_HUE_STEP 8
-#endif
-
-#if !defined(RGB_MATRIX_SAT_STEP)
-# define RGB_MATRIX_SAT_STEP 16
-#endif
-
-#if !defined(RGB_MATRIX_VAL_STEP)
-# define RGB_MATRIX_VAL_STEP 16
-#endif
-
-#if !defined(RGB_MATRIX_SPD_STEP)
-# define RGB_MATRIX_SPD_STEP 16
-#endif
-
-#if !defined(RGB_MATRIX_DEFAULT_MODE)
-# ifdef ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
-# define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_CYCLE_LEFT_RIGHT
-# else
-// fallback to solid colors if RGB_MATRIX_CYCLE_LEFT_RIGHT is disabled in userspace
-# define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_SOLID_COLOR
-# endif
-#endif
-
-#if !defined(RGB_MATRIX_DEFAULT_HUE)
-# define RGB_MATRIX_DEFAULT_HUE 0
-#endif
-
-#if !defined(RGB_MATRIX_DEFAULT_SAT)
-# define RGB_MATRIX_DEFAULT_SAT UINT8_MAX
-#endif
-
-#if !defined(RGB_MATRIX_DEFAULT_VAL)
-# define RGB_MATRIX_DEFAULT_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS
-#endif
-
-#if !defined(RGB_MATRIX_DEFAULT_SPD)
-# define RGB_MATRIX_DEFAULT_SPD UINT8_MAX / 2
-#endif
-
// globals
rgb_config_t rgb_matrix_config; // TODO: would like to prefix this with g_ for global consistancy, do this in another pr
uint32_t g_rgb_timer;
@@ -149,7 +99,7 @@ void eeconfig_update_rgb_matrix(void) {
void eeconfig_update_rgb_matrix_default(void) {
dprintf("eeconfig_update_rgb_matrix_default\n");
- rgb_matrix_config.enable = 1;
+ rgb_matrix_config.enable = RGB_MATRIX_DEFAULT_ON;
rgb_matrix_config.mode = RGB_MATRIX_DEFAULT_MODE;
rgb_matrix_config.hsv = (HSV){RGB_MATRIX_DEFAULT_HUE, RGB_MATRIX_DEFAULT_SAT, RGB_MATRIX_DEFAULT_VAL};
rgb_matrix_config.speed = RGB_MATRIX_DEFAULT_SPD;
@@ -736,7 +686,7 @@ void rgb_matrix_decrease_speed(void) {
void rgb_matrix_set_flags_eeprom_helper(led_flags_t flags, bool write_to_eeprom) {
rgb_matrix_config.flags = flags;
eeconfig_flag_rgb_matrix(write_to_eeprom);
- dprintf("rgb matrix set speed [%s]: %u\n", (write_to_eeprom) ? "EEPROM" : "NOEEPROM", rgb_matrix_config.flags);
+ dprintf("rgb matrix set flags [%s]: %u\n", (write_to_eeprom) ? "EEPROM" : "NOEEPROM", rgb_matrix_config.flags);
}
led_flags_t rgb_matrix_get_flags(void) {
diff --git a/quantum/rgb_matrix/rgb_matrix.h b/quantum/rgb_matrix/rgb_matrix.h
index 38040fb0cc..8ac263c635 100644
--- a/quantum/rgb_matrix/rgb_matrix.h
+++ b/quantum/rgb_matrix/rgb_matrix.h
@@ -24,26 +24,81 @@
#include "color.h"
#include "keyboard.h"
-#ifdef IS31FL3731
+#if defined(RGB_MATRIX_IS31FL3218)
+# include "is31fl3218.h"
+#elif defined(RGB_MATRIX_IS31FL3731)
# include "is31fl3731.h"
-#elif defined(IS31FL3733)
+#elif defined(RGB_MATRIX_IS31FL3733)
# include "is31fl3733.h"
-#elif defined(IS31FL3736)
+#elif defined(RGB_MATRIX_IS31FL3736)
# include "is31fl3736.h"
-#elif defined(IS31FL3737)
+#elif defined(RGB_MATRIX_IS31FL3737)
# include "is31fl3737.h"
-#elif defined(IS31FL3741)
+#elif defined(RGB_MATRIX_IS31FL3741)
# include "is31fl3741.h"
#elif defined(IS31FLCOMMON)
# include "is31flcommon.h"
-#elif defined(CKLED2001)
-# include "ckled2001.h"
-#elif defined(AW20216)
-# include "aw20216.h"
-#elif defined(WS2812)
+#elif defined(RGB_MATRIX_SNLED27351)
+# include "snled27351.h"
+#elif defined(RGB_MATRIX_AW20216S)
+# include "aw20216s.h"
+#elif defined(RGB_MATRIX_WS2812)
# include "ws2812.h"
#endif
+#ifndef RGB_MATRIX_TIMEOUT
+# define RGB_MATRIX_TIMEOUT 0
+#endif
+
+#ifndef RGB_MATRIX_MAXIMUM_BRIGHTNESS
+# define RGB_MATRIX_MAXIMUM_BRIGHTNESS UINT8_MAX
+#endif
+
+#ifndef RGB_MATRIX_HUE_STEP
+# define RGB_MATRIX_HUE_STEP 8
+#endif
+
+#ifndef RGB_MATRIX_SAT_STEP
+# define RGB_MATRIX_SAT_STEP 16
+#endif
+
+#ifndef RGB_MATRIX_VAL_STEP
+# define RGB_MATRIX_VAL_STEP 16
+#endif
+
+#ifndef RGB_MATRIX_SPD_STEP
+# define RGB_MATRIX_SPD_STEP 16
+#endif
+
+#ifndef RGB_MATRIX_DEFAULT_ON
+# define RGB_MATRIX_DEFAULT_ON true
+#endif
+
+#ifndef RGB_MATRIX_DEFAULT_MODE
+# ifdef ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
+# define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_CYCLE_LEFT_RIGHT
+# else
+// fallback to solid colors if RGB_MATRIX_CYCLE_LEFT_RIGHT is disabled in userspace
+# define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_SOLID_COLOR
+# endif
+#endif
+
+#ifndef RGB_MATRIX_DEFAULT_HUE
+# define RGB_MATRIX_DEFAULT_HUE 0
+#endif
+
+#ifndef RGB_MATRIX_DEFAULT_SAT
+# define RGB_MATRIX_DEFAULT_SAT UINT8_MAX
+#endif
+
+#ifndef RGB_MATRIX_DEFAULT_VAL
+# define RGB_MATRIX_DEFAULT_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS
+#endif
+
+#ifndef RGB_MATRIX_DEFAULT_SPD
+# define RGB_MATRIX_DEFAULT_SPD UINT8_MAX / 2
+#endif
+
#ifndef RGB_MATRIX_LED_FLUSH_LIMIT
# define RGB_MATRIX_LED_FLUSH_LIMIT 16
#endif
diff --git a/quantum/rgb_matrix/rgb_matrix_drivers.c b/quantum/rgb_matrix/rgb_matrix_drivers.c
index 695ecc78a4..06d82b9c69 100644
--- a/quantum/rgb_matrix/rgb_matrix_drivers.c
+++ b/quantum/rgb_matrix/rgb_matrix_drivers.c
@@ -24,7 +24,7 @@
* be here if shared between boards.
*/
-#if defined(IS31FL3731) || defined(IS31FL3733) || defined(IS31FL3736) || defined(IS31FL3737) || defined(IS31FL3741) || defined(IS31FLCOMMON) || defined(CKLED2001)
+#if defined(RGB_MATRIX_IS31FL3218) || defined(RGB_MATRIX_IS31FL3731) || defined(RGB_MATRIX_IS31FL3733) || defined(RGB_MATRIX_IS31FL3736) || defined(RGB_MATRIX_IS31FL3737) || defined(RGB_MATRIX_IS31FL3741) || defined(IS31FLCOMMON) || defined(RGB_MATRIX_SNLED27351)
# include "i2c_master.h"
// TODO: Remove this at some later date
@@ -37,7 +37,10 @@
static void init(void) {
i2c_init();
-# if defined(IS31FL3731)
+# if defined(RGB_MATRIX_IS31FL3218)
+ is31fl3218_init();
+
+# elif defined(RGB_MATRIX_IS31FL3731)
is31fl3731_init(DRIVER_ADDR_1);
# if defined(DRIVER_ADDR_2)
is31fl3731_init(DRIVER_ADDR_2);
@@ -49,7 +52,7 @@ static void init(void) {
# endif
# endif
-# elif defined(IS31FL3733)
+# elif defined(RGB_MATRIX_IS31FL3733)
# if !defined(DRIVER_SYNC_1)
# define DRIVER_SYNC_1 0
# endif
@@ -73,7 +76,7 @@ static void init(void) {
# endif
# endif
-# elif defined(IS31FL3736)
+# elif defined(RGB_MATRIX_IS31FL3736)
is31fl3736_init(DRIVER_ADDR_1);
# if defined(DRIVER_ADDR_2)
is31fl3736_init(DRIVER_ADDR_2);
@@ -85,7 +88,7 @@ static void init(void) {
# endif
# endif
-# elif defined(IS31FL3737)
+# elif defined(RGB_MATRIX_IS31FL3737)
is31fl3737_init(DRIVER_ADDR_1);
# if defined(DRIVER_ADDR_2)
is31fl3737_init(DRIVER_ADDR_2);
@@ -97,7 +100,7 @@ static void init(void) {
# endif
# endif
-# elif defined(IS31FL3741)
+# elif defined(RGB_MATRIX_IS31FL3741)
is31fl3741_init(DRIVER_ADDR_1);
# if defined(DRIVER_ADDR_2)
is31fl3741_init(DRIVER_ADDR_2);
@@ -121,14 +124,14 @@ static void init(void) {
# endif
# endif
-# elif defined(CKLED2001)
- ckled2001_init(DRIVER_ADDR_1);
+# elif defined(RGB_MATRIX_SNLED27351)
+ snled27351_init(DRIVER_ADDR_1);
# if defined(DRIVER_ADDR_2)
- ckled2001_init(DRIVER_ADDR_2);
+ snled27351_init(DRIVER_ADDR_2);
# if defined(DRIVER_ADDR_3)
- ckled2001_init(DRIVER_ADDR_3);
+ snled27351_init(DRIVER_ADDR_3);
# if defined(DRIVER_ADDR_4)
- ckled2001_init(DRIVER_ADDR_4);
+ snled27351_init(DRIVER_ADDR_4);
# endif
# endif
# endif
@@ -138,25 +141,30 @@ static void init(void) {
bool enabled = true;
// This only caches it for later
-# if defined(IS31FL3731)
+# if defined(RGB_MATRIX_IS31FL3218)
+ is31fl3218_set_led_control_register(index, enabled, enabled, enabled);
+# elif defined(RGB_MATRIX_IS31FL3731)
is31fl3731_set_led_control_register(index, enabled, enabled, enabled);
-# elif defined(IS31FL3733)
+# elif defined(RGB_MATRIX_IS31FL3733)
is31fl3733_set_led_control_register(index, enabled, enabled, enabled);
-# elif defined(IS31FL3736)
+# elif defined(RGB_MATRIX_IS31FL3736)
is31fl3736_set_led_control_register(index, enabled, enabled, enabled);
-# elif defined(IS31FL3737)
+# elif defined(RGB_MATRIX_IS31FL3737)
is31fl3737_set_led_control_register(index, enabled, enabled, enabled);
-# elif defined(IS31FL3741)
+# elif defined(RGB_MATRIX_IS31FL3741)
is31fl3741_set_led_control_register(index, enabled, enabled, enabled);
# elif defined(IS31FLCOMMON)
IS31FL_RGB_set_scaling_buffer(index, enabled, enabled, enabled);
-# elif defined(CKLED2001)
- ckled2001_set_led_control_register(index, enabled, enabled, enabled);
+# elif defined(RGB_MATRIX_SNLED27351)
+ snled27351_set_led_control_register(index, enabled, enabled, enabled);
# endif
}
// This actually updates the LED drivers
-# if defined(IS31FL3731)
+# if defined(RGB_MATRIX_IS31FL3218)
+ is31fl3218_update_led_control_registers();
+
+# elif defined(RGB_MATRIX_IS31FL3731)
is31fl3731_update_led_control_registers(DRIVER_ADDR_1, 0);
# if defined(DRIVER_ADDR_2)
is31fl3731_update_led_control_registers(DRIVER_ADDR_2, 1);
@@ -168,7 +176,7 @@ static void init(void) {
# endif
# endif
-# elif defined(IS31FL3733)
+# elif defined(RGB_MATRIX_IS31FL3733)
is31fl3733_update_led_control_registers(DRIVER_ADDR_1, 0);
# if defined(DRIVER_ADDR_2)
is31fl3733_update_led_control_registers(DRIVER_ADDR_2, 1);
@@ -180,7 +188,7 @@ static void init(void) {
# endif
# endif
-# elif defined(IS31FL3736)
+# elif defined(RGB_MATRIX_IS31FL3736)
is31fl3736_update_led_control_registers(DRIVER_ADDR_1, 0);
# if defined(DRIVER_ADDR_2)
is31fl3736_update_led_control_registers(DRIVER_ADDR_2, 1);
@@ -192,7 +200,7 @@ static void init(void) {
# endif
# endif
-# elif defined(IS31FL3737)
+# elif defined(RGB_MATRIX_IS31FL3737)
is31fl3737_update_led_control_registers(DRIVER_ADDR_1, 0);
# if defined(DRIVER_ADDR_2)
is31fl3737_update_led_control_registers(DRIVER_ADDR_2, 1);
@@ -204,7 +212,7 @@ static void init(void) {
# endif
# endif
-# elif defined(IS31FL3741)
+# elif defined(RGB_MATRIX_IS31FL3741)
is31fl3741_update_led_control_registers(DRIVER_ADDR_1, 0);
# if defined(DRIVER_ADDR_2)
is31fl3741_update_led_control_registers(DRIVER_ADDR_2, 1);
@@ -231,21 +239,33 @@ static void init(void) {
# endif
# endif
-# elif defined(CKLED2001)
- ckled2001_update_led_control_registers(DRIVER_ADDR_1, 0);
+# elif defined(RGB_MATRIX_SNLED27351)
+ snled27351_update_led_control_registers(DRIVER_ADDR_1, 0);
# if defined(DRIVER_ADDR_2)
- ckled2001_update_led_control_registers(DRIVER_ADDR_2, 1);
+ snled27351_update_led_control_registers(DRIVER_ADDR_2, 1);
# if defined(DRIVER_ADDR_3)
- ckled2001_update_led_control_registers(DRIVER_ADDR_3, 2);
+ snled27351_update_led_control_registers(DRIVER_ADDR_3, 2);
# if defined(DRIVER_ADDR_4)
- ckled2001_update_led_control_registers(DRIVER_ADDR_4, 3);
+ snled27351_update_led_control_registers(DRIVER_ADDR_4, 3);
# endif
# endif
# endif
# endif
}
-# if defined(IS31FL3731)
+# if defined(RGB_MATRIX_IS31FL3218)
+static void flush(void) {
+ is31fl3218_update_pwm_buffers();
+}
+
+const rgb_matrix_driver_t rgb_matrix_driver = {
+ .init = init,
+ .flush = flush,
+ .set_color = is31fl3218_set_color,
+ .set_color_all = is31fl3218_set_color_all,
+};
+
+# elif defined(RGB_MATRIX_IS31FL3731)
static void flush(void) {
is31fl3731_update_pwm_buffers(DRIVER_ADDR_1, 0);
# if defined(DRIVER_ADDR_2)
@@ -260,13 +280,13 @@ static void flush(void) {
}
const rgb_matrix_driver_t rgb_matrix_driver = {
- .init = init,
- .flush = flush,
- .set_color = is31fl3731_set_color,
+ .init = init,
+ .flush = flush,
+ .set_color = is31fl3731_set_color,
.set_color_all = is31fl3731_set_color_all,
};
-# elif defined(IS31FL3733)
+# elif defined(RGB_MATRIX_IS31FL3733)
static void flush(void) {
is31fl3733_update_pwm_buffers(DRIVER_ADDR_1, 0);
# if defined(DRIVER_ADDR_2)
@@ -287,7 +307,7 @@ const rgb_matrix_driver_t rgb_matrix_driver = {
.set_color_all = is31fl3733_set_color_all,
};
-# elif defined(IS31FL3736)
+# elif defined(RGB_MATRIX_IS31FL3736)
static void flush(void) {
is31fl3736_update_pwm_buffers(DRIVER_ADDR_1, 0);
# if defined(DRIVER_ADDR_2)
@@ -308,7 +328,7 @@ const rgb_matrix_driver_t rgb_matrix_driver = {
.set_color_all = is31fl3736_set_color_all,
};
-# elif defined(IS31FL3737)
+# elif defined(RGB_MATRIX_IS31FL3737)
static void flush(void) {
is31fl3737_update_pwm_buffers(DRIVER_ADDR_1, 0);
# if defined(DRIVER_ADDR_2)
@@ -329,7 +349,7 @@ const rgb_matrix_driver_t rgb_matrix_driver = {
.set_color_all = is31fl3737_set_color_all,
};
-# elif defined(IS31FL3741)
+# elif defined(RGB_MATRIX_IS31FL3741)
static void flush(void) {
is31fl3741_update_pwm_buffers(DRIVER_ADDR_1, 0);
# if defined(DRIVER_ADDR_2)
@@ -371,15 +391,15 @@ const rgb_matrix_driver_t rgb_matrix_driver = {
.set_color_all = IS31FL_RGB_set_color_all,
};
-# elif defined(CKLED2001)
+# elif defined(RGB_MATRIX_SNLED27351)
static void flush(void) {
- ckled2001_update_pwm_buffers(DRIVER_ADDR_1, 0);
+ snled27351_update_pwm_buffers(DRIVER_ADDR_1, 0);
# if defined(DRIVER_ADDR_2)
- ckled2001_update_pwm_buffers(DRIVER_ADDR_2, 1);
+ snled27351_update_pwm_buffers(DRIVER_ADDR_2, 1);
# if defined(DRIVER_ADDR_3)
- ckled2001_update_pwm_buffers(DRIVER_ADDR_3, 2);
+ snled27351_update_pwm_buffers(DRIVER_ADDR_3, 2);
# if defined(DRIVER_ADDR_4)
- ckled2001_update_pwm_buffers(DRIVER_ADDR_4, 3);
+ snled27351_update_pwm_buffers(DRIVER_ADDR_4, 3);
# endif
# endif
# endif
@@ -388,46 +408,46 @@ static void flush(void) {
const rgb_matrix_driver_t rgb_matrix_driver = {
.init = init,
.flush = flush,
- .set_color = ckled2001_set_color,
- .set_color_all = ckled2001_set_color_all,
+ .set_color = snled27351_set_color,
+ .set_color_all = snled27351_set_color_all,
};
# endif
-#elif defined(AW20216)
+#elif defined(RGB_MATRIX_AW20216S)
# include "spi_master.h"
static void init(void) {
spi_init();
- aw20216_init(DRIVER_1_CS, DRIVER_1_EN);
-# if defined(DRIVER_2_CS)
- aw20216_init(DRIVER_2_CS, DRIVER_2_EN);
+ aw20216s_init(AW20216S_DRIVER_1_CS, AW20216S_DRIVER_1_EN);
+# if defined(AW20216S_DRIVER_2_CS)
+ aw20216s_init(AW20216S_DRIVER_2_CS, AW20216S_DRIVER_2_EN);
# endif
}
static void flush(void) {
- aw20216_update_pwm_buffers(DRIVER_1_CS, 0);
-# if defined(DRIVER_2_CS)
- aw20216_update_pwm_buffers(DRIVER_2_CS, 1);
+ aw20216s_update_pwm_buffers(AW20216S_DRIVER_1_CS, 0);
+# if defined(AW20216S_DRIVER_2_CS)
+ aw20216s_update_pwm_buffers(AW20216S_DRIVER_2_CS, 1);
# endif
}
const rgb_matrix_driver_t rgb_matrix_driver = {
.init = init,
.flush = flush,
- .set_color = aw20216_set_color,
- .set_color_all = aw20216_set_color_all,
+ .set_color = aw20216s_set_color,
+ .set_color_all = aw20216s_set_color_all,
};
-#elif defined(WS2812)
-# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_CUSTOM_DRIVER)
+#elif defined(RGB_MATRIX_WS2812)
+# if defined(RGBLIGHT_WS2812)
# pragma message "Cannot use RGBLIGHT and RGB Matrix using WS2812 at the same time."
# pragma message "You need to use a custom driver, or re-implement the WS2812 driver to use a different configuration."
# endif
// LED color buffer
-LED_TYPE rgb_matrix_ws2812_array[RGB_MATRIX_LED_COUNT];
-bool ws2812_dirty = false;
+rgb_led_t rgb_matrix_ws2812_array[RGB_MATRIX_LED_COUNT];
+bool ws2812_dirty = false;
static void init(void) {
ws2812_dirty = false;
diff --git a/quantum/rgb_matrix/rgb_matrix_types.h b/quantum/rgb_matrix/rgb_matrix_types.h
index 53ff7321b8..0a3fd7cc0d 100644
--- a/quantum/rgb_matrix/rgb_matrix_types.h
+++ b/quantum/rgb_matrix/rgb_matrix_types.h
@@ -19,16 +19,7 @@
#include <stdint.h>
#include <stdbool.h>
#include "color.h"
-
-#if defined(__GNUC__)
-# define PACKED __attribute__((__packed__))
-#else
-# define PACKED
-#endif
-
-#if defined(_MSC_VER)
-# pragma pack(push, 1)
-#endif
+#include "util.h"
#if defined(RGB_MATRIX_KEYPRESSES) || defined(RGB_MATRIX_KEYRELEASES)
# define RGB_MATRIX_KEYREACTIVE_ENABLED
@@ -94,7 +85,3 @@ typedef union {
} rgb_config_t;
_Static_assert(sizeof(rgb_config_t) == sizeof(uint64_t), "RGB Matrix EECONFIG out of spec.");
-
-#if defined(_MSC_VER)
-# pragma pack(pop)
-#endif
diff --git a/quantum/rgblight/rgblight.c b/quantum/rgblight/rgblight.c
index 158112f31d..8ac886d441 100644
--- a/quantum/rgblight/rgblight.c
+++ b/quantum/rgblight/rgblight.c
@@ -27,9 +27,6 @@
#ifdef EEPROM_ENABLE
# include "eeprom.h"
#endif
-#ifdef VELOCIKEY_ENABLE
-# include "velocikey.h"
-#endif
#ifdef RGBLIGHT_SPLIT
/* for split keyboard */
@@ -89,6 +86,10 @@ static uint8_t mode_base_table[] = {
# define RGBLIGHT_DEFAULT_SPD 0
#endif
+#if !defined(RGBLIGHT_DEFAULT_ON)
+# define RGBLIGHT_DEFAULT_ON true
+#endif
+
static inline int is_static_effect(uint8_t mode) {
return memchr(static_effect_table, mode, sizeof(static_effect_table)) != NULL;
}
@@ -115,7 +116,7 @@ animation_status_t animation_status = {};
#endif
#ifndef LED_ARRAY
-LED_TYPE led[RGBLED_NUM];
+rgb_led_t led[RGBLED_NUM];
# define LED_ARRAY led
#endif
@@ -144,17 +145,17 @@ __attribute__((weak)) RGB rgblight_hsv_to_rgb(HSV hsv) {
return hsv_to_rgb(hsv);
}
-void sethsv_raw(uint8_t hue, uint8_t sat, uint8_t val, LED_TYPE *led1) {
+void sethsv_raw(uint8_t hue, uint8_t sat, uint8_t val, rgb_led_t *led1) {
HSV hsv = {hue, sat, val};
RGB rgb = rgblight_hsv_to_rgb(hsv);
setrgb(rgb.r, rgb.g, rgb.b, led1);
}
-void sethsv(uint8_t hue, uint8_t sat, uint8_t val, LED_TYPE *led1) {
+void sethsv(uint8_t hue, uint8_t sat, uint8_t val, rgb_led_t *led1) {
sethsv_raw(hue, sat, val > RGBLIGHT_LIMIT_VAL ? RGBLIGHT_LIMIT_VAL : val, led1);
}
-void setrgb(uint8_t r, uint8_t g, uint8_t b, LED_TYPE *led1) {
+void setrgb(uint8_t r, uint8_t g, uint8_t b, rgb_led_t *led1) {
led1->r = r;
led1->g = g;
led1->b = b;
@@ -198,12 +199,13 @@ void eeconfig_update_rgblight_current(void) {
}
void eeconfig_update_rgblight_default(void) {
- rgblight_config.enable = 1;
- rgblight_config.mode = RGBLIGHT_DEFAULT_MODE;
- rgblight_config.hue = RGBLIGHT_DEFAULT_HUE;
- rgblight_config.sat = RGBLIGHT_DEFAULT_SAT;
- rgblight_config.val = RGBLIGHT_DEFAULT_VAL;
- rgblight_config.speed = RGBLIGHT_DEFAULT_SPD;
+ rgblight_config.enable = RGBLIGHT_DEFAULT_ON;
+ rgblight_config.velocikey = 0;
+ rgblight_config.mode = RGBLIGHT_DEFAULT_MODE;
+ rgblight_config.hue = RGBLIGHT_DEFAULT_HUE;
+ rgblight_config.sat = RGBLIGHT_DEFAULT_SAT;
+ rgblight_config.val = RGBLIGHT_DEFAULT_VAL;
+ rgblight_config.speed = RGBLIGHT_DEFAULT_SPD;
RGBLIGHT_SPLIT_SET_CHANGE_MODEHSVS;
eeconfig_update_rgblight(rgblight_config.raw);
}
@@ -211,6 +213,7 @@ void eeconfig_update_rgblight_default(void) {
void eeconfig_debug_rgblight(void) {
dprintf("rgblight_config EEPROM:\n");
dprintf("rgblight_config.enable = %d\n", rgblight_config.enable);
+ dprintf("rgblight_config.velocikey = %d\n", rgblight_config.velocikey);
dprintf("rghlight_config.mode = %d\n", rgblight_config.mode);
dprintf("rgblight_config.hue = %d\n", rgblight_config.hue);
dprintf("rgblight_config.sat = %d\n", rgblight_config.sat);
@@ -516,7 +519,7 @@ void rgblight_decrease_speed_noeeprom(void) {
void rgblight_sethsv_noeeprom_old(uint8_t hue, uint8_t sat, uint8_t val) {
if (rgblight_config.enable) {
- LED_TYPE tmp_led;
+ rgb_led_t tmp_led;
sethsv(hue, sat, val, &tmp_led);
rgblight_setrgb(tmp_led.r, tmp_led.g, tmp_led.b);
}
@@ -532,7 +535,7 @@ void rgblight_sethsv_eeprom_helper(uint8_t hue, uint8_t sat, uint8_t val, bool w
rgblight_status.base_mode = mode_base_table[rgblight_config.mode];
if (rgblight_config.mode == RGBLIGHT_MODE_STATIC_LIGHT) {
// same static color
- LED_TYPE tmp_led;
+ rgb_led_t tmp_led;
#ifdef RGBLIGHT_LAYERS_RETAIN_VAL
// needed for rgblight_layers_write() to get the new val, since it reads rgblight_config.val
rgblight_config.val = val;
@@ -576,7 +579,7 @@ void rgblight_sethsv_eeprom_helper(uint8_t hue, uint8_t sat, uint8_t val, bool w
_hue = hue - _hue;
}
dprintf("rgblight rainbow set hsv: %d,%d,%d,%u\n", i, _hue, direction, range);
- sethsv(_hue, sat, val, (LED_TYPE *)&led[i + rgblight_ranges.effect_start_pos]);
+ sethsv(_hue, sat, val, (rgb_led_t *)&led[i + rgblight_ranges.effect_start_pos]);
}
# ifdef RGBLIGHT_LAYERS_RETAIN_VAL
// needed for rgblight_layers_write() to get the new val, since it reads rgblight_config.val
@@ -679,7 +682,7 @@ void rgblight_sethsv_at(uint8_t hue, uint8_t sat, uint8_t val, uint8_t index) {
return;
}
- LED_TYPE tmp_led;
+ rgb_led_t tmp_led;
sethsv(hue, sat, val, &tmp_led);
rgblight_setrgb_at(tmp_led.r, tmp_led.g, tmp_led.b, index);
}
@@ -689,9 +692,9 @@ void rgblight_sethsv_at(uint8_t hue, uint8_t sat, uint8_t val, uint8_t index) {
static uint8_t get_interval_time(const uint8_t *default_interval_address, uint8_t velocikey_min, uint8_t velocikey_max) {
return
# ifdef VELOCIKEY_ENABLE
- velocikey_enabled() ? velocikey_match_speed(velocikey_min, velocikey_max) :
+ rgblight_velocikey_enabled() ? rgblight_velocikey_match_speed(velocikey_min, velocikey_max) :
# endif
- pgm_read_byte(default_interval_address);
+ pgm_read_byte(default_interval_address);
}
#endif
@@ -717,7 +720,7 @@ void rgblight_sethsv_range(uint8_t hue, uint8_t sat, uint8_t val, uint8_t start,
return;
}
- LED_TYPE tmp_led;
+ rgb_led_t tmp_led;
sethsv(hue, sat, val, &tmp_led);
rgblight_setrgb_range(tmp_led.r, tmp_led.g, tmp_led.b, start, end);
}
@@ -786,8 +789,8 @@ static void rgblight_layers_write(void) {
break; // No more segments
}
// Write segment.count LEDs
- LED_TYPE *const limit = &led[MIN(segment.index + segment.count, RGBLED_NUM)];
- for (LED_TYPE *led_ptr = &led[segment.index]; led_ptr < limit; led_ptr++) {
+ rgb_led_t *const limit = &led[MIN(segment.index + segment.count, RGBLED_NUM)];
+ for (rgb_led_t *led_ptr = &led[segment.index]; led_ptr < limit; led_ptr++) {
# ifdef RGBLIGHT_LAYERS_RETAIN_VAL
sethsv(segment.hue, segment.sat, current_val, led_ptr);
# else
@@ -897,15 +900,15 @@ void rgblight_wakeup(void) {
#endif
-__attribute__((weak)) void rgblight_call_driver(LED_TYPE *start_led, uint8_t num_leds) {
+__attribute__((weak)) void rgblight_call_driver(rgb_led_t *start_led, uint8_t num_leds) {
ws2812_setleds(start_led, num_leds);
}
-#ifndef RGBLIGHT_CUSTOM_DRIVER
+#ifndef RGBLIGHT_CUSTOM
void rgblight_set(void) {
- LED_TYPE *start_led;
- uint8_t num_leds = rgblight_ranges.clipping_num_leds;
+ rgb_led_t *start_led;
+ uint8_t num_leds = rgblight_ranges.clipping_num_leds;
if (!rgblight_config.enable) {
for (uint8_t i = rgblight_ranges.effect_start_pos; i < rgblight_ranges.effect_end_pos; i++) {
@@ -931,7 +934,7 @@ void rgblight_set(void) {
# endif
# ifdef RGBLIGHT_LED_MAP
- LED_TYPE led0[RGBLED_NUM];
+ rgb_led_t led0[RGBLED_NUM];
for (uint8_t i = 0; i < RGBLED_NUM; i++) {
led0[i] = led[pgm_read_byte(&led_map[i])];
}
@@ -1049,7 +1052,7 @@ static void rgblight_effect_dummy(animation_status_t *anim) {
**/
}
-void rgblight_task(void) {
+void rgblight_timer_task(void) {
if (rgblight_status.timer_enabled) {
effect_func_t effect_func = rgblight_effect_dummy;
uint16_t interval_time = 2000; // dummy interval
@@ -1230,7 +1233,7 @@ void rgblight_effect_rainbow_swirl(animation_status_t *anim) {
for (i = 0; i < rgblight_ranges.effect_num_leds; i++) {
hue = (RGBLIGHT_RAINBOW_SWIRL_RANGE / rgblight_ranges.effect_num_leds * i + anim->current_hue);
- sethsv(hue, rgblight_config.sat, rgblight_config.val, (LED_TYPE *)&led[i + rgblight_ranges.effect_start_pos]);
+ sethsv(hue, rgblight_config.sat, rgblight_config.val, (rgb_led_t *)&led[i + rgblight_ranges.effect_start_pos]);
}
rgblight_set();
@@ -1267,10 +1270,10 @@ void rgblight_effect_snake(animation_status_t *anim) {
# endif
for (i = 0; i < rgblight_ranges.effect_num_leds; i++) {
- LED_TYPE *ledp = led + i + rgblight_ranges.effect_start_pos;
- ledp->r = 0;
- ledp->g = 0;
- ledp->b = 0;
+ rgb_led_t *ledp = led + i + rgblight_ranges.effect_start_pos;
+ ledp->r = 0;
+ ledp->g = 0;
+ ledp->b = 0;
# ifdef RGBW
ledp->w = 0;
# endif
@@ -1340,7 +1343,7 @@ void rgblight_effect_knight(animation_status_t *anim) {
cur = (i + RGBLIGHT_EFFECT_KNIGHT_OFFSET) % rgblight_ranges.effect_num_leds + rgblight_ranges.effect_start_pos;
if (i >= low_bound && i <= high_bound) {
- sethsv(rgblight_config.hue, rgblight_config.sat, rgblight_config.val, (LED_TYPE *)&led[cur]);
+ sethsv(rgblight_config.hue, rgblight_config.sat, rgblight_config.val, (rgb_led_t *)&led[cur]);
} else {
led[cur].r = 0;
led[cur].g = 0;
@@ -1392,7 +1395,7 @@ void rgblight_effect_christmas(animation_status_t *anim) {
for (i = 0; i < rgblight_ranges.effect_num_leds; i++) {
uint8_t local_hue = (i / RGBLIGHT_EFFECT_CHRISTMAS_STEP) % 2 ? hue : hue_green - hue;
- sethsv(local_hue, rgblight_config.sat, val, (LED_TYPE *)&led[i + rgblight_ranges.effect_start_pos]);
+ sethsv(local_hue, rgblight_config.sat, val, (rgb_led_t *)&led[i + rgblight_ranges.effect_start_pos]);
}
rgblight_set();
@@ -1415,7 +1418,7 @@ void rgblight_effect_rgbtest(animation_status_t *anim) {
uint8_t b;
if (maxval == 0) {
- LED_TYPE tmp_led;
+ rgb_led_t tmp_led;
sethsv(0, 255, RGBLIGHT_LIMIT_VAL, &tmp_led);
maxval = tmp_led.r;
}
@@ -1439,7 +1442,7 @@ void rgblight_effect_rgbtest(animation_status_t *anim) {
#ifdef RGBLIGHT_EFFECT_ALTERNATING
void rgblight_effect_alternating(animation_status_t *anim) {
for (int i = 0; i < rgblight_ranges.effect_num_leds; i++) {
- LED_TYPE *ledp = led + i + rgblight_ranges.effect_start_pos;
+ rgb_led_t *ledp = led + i + rgblight_ranges.effect_start_pos;
if (i < rgblight_ranges.effect_num_leds / 2 && anim->pos) {
sethsv(rgblight_config.hue, rgblight_config.sat, rgblight_config.val, ledp);
} else if (i >= rgblight_ranges.effect_num_leds / 2 && !anim->pos) {
@@ -1512,10 +1515,68 @@ void rgblight_effect_twinkle(animation_status_t *anim) {
// This LED is off, and was NOT selected to start brightening
}
- LED_TYPE *ledp = led + i + rgblight_ranges.effect_start_pos;
+ rgb_led_t *ledp = led + i + rgblight_ranges.effect_start_pos;
sethsv(c->h, c->s, c->v, ledp);
}
rgblight_set();
}
#endif
+
+void preprocess_rgblight(void) {
+#ifdef VELOCIKEY_ENABLE
+ if (rgblight_velocikey_enabled()) {
+ rgblight_velocikey_accelerate();
+ }
+#endif
+}
+
+void rgblight_task(void) {
+#ifdef RGBLIGHT_USE_TIMER
+ rgblight_timer_task();
+#endif
+
+#ifdef VELOCIKEY_ENABLE
+ if (rgblight_velocikey_enabled()) {
+ rgblight_velocikey_decelerate();
+ }
+#endif
+}
+
+#ifdef VELOCIKEY_ENABLE
+# define TYPING_SPEED_MAX_VALUE 200
+
+static uint8_t typing_speed = 0;
+
+bool rgblight_velocikey_enabled(void) {
+ return rgblight_config.velocikey;
+}
+
+void rgblight_velocikey_toggle(void) {
+ dprintf("rgblight velocikey toggle [EEPROM]: rgblight_config.velocikey = %u\n", !rgblight_config.velocikey);
+ rgblight_config.velocikey = !rgblight_config.velocikey;
+ eeconfig_update_rgblight_current();
+}
+
+void rgblight_velocikey_accelerate(void) {
+ if (typing_speed < TYPING_SPEED_MAX_VALUE) typing_speed += (TYPING_SPEED_MAX_VALUE / 100);
+}
+
+void rgblight_velocikey_decelerate(void) {
+ static uint16_t decay_timer = 0;
+
+ if (timer_elapsed(decay_timer) > 500 || decay_timer == 0) {
+ if (typing_speed > 0) typing_speed -= 1;
+ // Decay a little faster at half of max speed
+ if (typing_speed > TYPING_SPEED_MAX_VALUE / 2) typing_speed -= 1;
+ // Decay even faster at 3/4 of max speed
+ if (typing_speed > TYPING_SPEED_MAX_VALUE / 4 * 3) typing_speed -= 2;
+ decay_timer = timer_read();
+ }
+}
+
+uint8_t rgblight_velocikey_match_speed(uint8_t minValue, uint8_t maxValue) {
+ return MAX(minValue, maxValue - (maxValue - minValue) * ((float)typing_speed / TYPING_SPEED_MAX_VALUE));
+}
+
+#endif \ No newline at end of file
diff --git a/quantum/rgblight/rgblight.h b/quantum/rgblight/rgblight.h
index 001058f962..a222ab6b9f 100644
--- a/quantum/rgblight/rgblight.h
+++ b/quantum/rgblight/rgblight.h
@@ -233,7 +233,7 @@ void rgblight_unblink_all_but_layer(uint8_t layer);
#endif
-extern LED_TYPE led[RGBLED_NUM];
+extern rgb_led_t led[RGBLED_NUM];
extern const uint8_t RGBLED_BREATHING_INTERVALS[4] PROGMEM;
extern const uint8_t RGBLED_RAINBOW_MOOD_INTERVALS[3] PROGMEM;
@@ -248,7 +248,8 @@ typedef union {
uint64_t raw;
struct {
bool enable : 1;
- uint8_t mode : 7;
+ bool velocikey : 1;
+ uint8_t mode : 6;
uint8_t hue : 8;
uint8_t sat : 8;
uint8_t val : 8;
@@ -283,9 +284,9 @@ typedef struct _rgblight_ranges_t {
extern rgblight_ranges_t rgblight_ranges;
/* === Utility Functions ===*/
-void sethsv(uint8_t hue, uint8_t sat, uint8_t val, LED_TYPE *led1);
-void sethsv_raw(uint8_t hue, uint8_t sat, uint8_t val, LED_TYPE *led1); // without RGBLIGHT_LIMIT_VAL check
-void setrgb(uint8_t r, uint8_t g, uint8_t b, LED_TYPE *led1);
+void sethsv(uint8_t hue, uint8_t sat, uint8_t val, rgb_led_t *led1);
+void sethsv_raw(uint8_t hue, uint8_t sat, uint8_t val, rgb_led_t *led1); // without RGBLIGHT_LIMIT_VAL check
+void setrgb(uint8_t r, uint8_t g, uint8_t b, rgb_led_t *led1);
/* === Low level Functions === */
void rgblight_set(void);
@@ -385,14 +386,15 @@ void rgblight_mode_eeprom_helper(uint8_t mode, bool write_to_eeprom);
#define EZ_RGB(val) rgblight_show_solid_color((val >> 16) & 0xFF, (val >> 8) & 0xFF, val & 0xFF)
void rgblight_show_solid_color(uint8_t r, uint8_t g, uint8_t b);
-#ifdef RGBLIGHT_USE_TIMER
+void preprocess_rgblight(void);
void rgblight_task(void);
+
+#ifdef RGBLIGHT_USE_TIMER
void rgblight_timer_init(void);
void rgblight_timer_enable(void);
void rgblight_timer_disable(void);
void rgblight_timer_toggle(void);
#else
-# define rgblight_task()
# define rgblight_timer_init()
# define rgblight_timer_enable()
# define rgblight_timer_disable()
@@ -446,3 +448,14 @@ void rgblight_effect_alternating(animation_status_t *anim);
void rgblight_effect_twinkle(animation_status_t *anim);
#endif
+
+#ifdef VELOCIKEY_ENABLE
+bool rgblight_velocikey_enabled(void);
+void rgblight_velocikey_toggle(void);
+void rgblight_velocikey_accelerate(void);
+void rgblight_velocikey_decelerate(void);
+uint8_t rgblight_velocikey_match_speed(uint8_t minValue, uint8_t maxValue);
+
+# define velocikey_enabled rgblight_velocikey_enabled
+# define velocikey_toggle rgblight_velocikey_toggle
+#endif
diff --git a/quantum/util.h b/quantum/util.h
index 9c034cc404..21e3487b28 100644
--- a/quantum/util.h
+++ b/quantum/util.h
@@ -46,3 +46,7 @@
*/
# define ARRAY_SIZE(array) (__builtin_choose_expr(IS_ARRAY((array)), sizeof((array)) / sizeof((array)[0]), (void)0))
#endif
+
+#if !defined(PACKED)
+# define PACKED __attribute__((__packed__))
+#endif
diff --git a/quantum/velocikey.c b/quantum/velocikey.c
deleted file mode 100644
index 03e91911f6..0000000000
--- a/quantum/velocikey.c
+++ /dev/null
@@ -1,40 +0,0 @@
-#include "velocikey.h"
-#include "timer.h"
-#include "eeconfig.h"
-#include "eeprom.h"
-#include "util.h"
-
-#define TYPING_SPEED_MAX_VALUE 200
-uint8_t typing_speed = 0;
-
-bool velocikey_enabled(void) {
- return eeprom_read_byte(EECONFIG_VELOCIKEY) == 1;
-}
-
-void velocikey_toggle(void) {
- if (velocikey_enabled())
- eeprom_update_byte(EECONFIG_VELOCIKEY, 0);
- else
- eeprom_update_byte(EECONFIG_VELOCIKEY, 1);
-}
-
-void velocikey_accelerate(void) {
- if (typing_speed < TYPING_SPEED_MAX_VALUE) typing_speed += (TYPING_SPEED_MAX_VALUE / 100);
-}
-
-void velocikey_decelerate(void) {
- static uint16_t decay_timer = 0;
-
- if (timer_elapsed(decay_timer) > 500 || decay_timer == 0) {
- if (typing_speed > 0) typing_speed -= 1;
- // Decay a little faster at half of max speed
- if (typing_speed > TYPING_SPEED_MAX_VALUE / 2) typing_speed -= 1;
- // Decay even faster at 3/4 of max speed
- if (typing_speed > TYPING_SPEED_MAX_VALUE / 4 * 3) typing_speed -= 2;
- decay_timer = timer_read();
- }
-}
-
-uint8_t velocikey_match_speed(uint8_t minValue, uint8_t maxValue) {
- return MAX(minValue, maxValue - (maxValue - minValue) * ((float)typing_speed / TYPING_SPEED_MAX_VALUE));
-}
diff --git a/quantum/velocikey.h b/quantum/velocikey.h
deleted file mode 100644
index c375f82f71..0000000000
--- a/quantum/velocikey.h
+++ /dev/null
@@ -1,10 +0,0 @@
-#pragma once
-
-#include <stdint.h>
-#include <stdbool.h>
-
-bool velocikey_enabled(void);
-void velocikey_toggle(void);
-void velocikey_accelerate(void);
-void velocikey_decelerate(void);
-uint8_t velocikey_match_speed(uint8_t minValue, uint8_t maxValue);
diff --git a/quantum/via.c b/quantum/via.c
index 2acd7aa90c..643d7aa3c3 100644
--- a/quantum/via.c
+++ b/quantum/via.c
@@ -634,11 +634,6 @@ void via_qmk_rgblight_save(void) {
#if defined(RGB_MATRIX_ENABLE)
-# if !defined(RGB_MATRIX_MAXIMUM_BRIGHTNESS) || RGB_MATRIX_MAXIMUM_BRIGHTNESS > UINT8_MAX
-# undef RGB_MATRIX_MAXIMUM_BRIGHTNESS
-# define RGB_MATRIX_MAXIMUM_BRIGHTNESS UINT8_MAX
-# endif
-
void via_qmk_rgb_matrix_command(uint8_t *data, uint8_t length) {
// data = [ command_id, channel_id, value_id, value_data ]
uint8_t *command_id = &(data[0]);
@@ -727,11 +722,6 @@ void via_qmk_rgb_matrix_save(void) {
#if defined(LED_MATRIX_ENABLE)
-# if !defined(LED_MATRIX_MAXIMUM_BRIGHTNESS) || LED_MATRIX_MAXIMUM_BRIGHTNESS > UINT8_MAX
-# undef LED_MATRIX_MAXIMUM_BRIGHTNESS
-# define LED_MATRIX_MAXIMUM_BRIGHTNESS UINT8_MAX
-# endif
-
void via_qmk_led_matrix_command(uint8_t *data, uint8_t length) {
// data = [ command_id, channel_id, value_id, value_data ]
uint8_t *command_id = &(data[0]);
diff --git a/readme.md b/readme.md
index 5649ddfa09..c2fcda103e 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/keyboards/novelkeys/nk1/config.h b/tests/auto_shift/auto_shift_repeat/auto_shift_no_auto_repeat/config.h
index 1bcd22e6e5..973e04582f 100644
--- a/keyboards/novelkeys/nk1/config.h
+++ b/tests/auto_shift/auto_shift_repeat/auto_shift_no_auto_repeat/config.h
@@ -1,5 +1,4 @@
-
-/* Copyright 2021 Yiancar
+/* Copyright 2022 Isaac Elenbaas
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -17,5 +16,7 @@
#pragma once
-/* There is only 1 Button so limiting VIA to 1 layer */
-#define DYNAMIC_KEYMAP_LAYER_COUNT 1
+#include "test_common.h"
+
+#define AUTO_SHIFT_REPEAT
+#define AUTO_SHIFT_NO_AUTO_REPEAT
diff --git a/tests/auto_shift/auto_shift_repeat/auto_shift_no_auto_repeat/test.mk b/tests/auto_shift/auto_shift_repeat/auto_shift_no_auto_repeat/test.mk
new file mode 100644
index 0000000000..b687332005
--- /dev/null
+++ b/tests/auto_shift/auto_shift_repeat/auto_shift_no_auto_repeat/test.mk
@@ -0,0 +1,20 @@
+# Copyright 2022 Isaac Elenbaas
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General 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/>.
+
+# --------------------------------------------------------------------------------
+# Keep this file, even if it is empty, as a marker that this folder contains tests
+# --------------------------------------------------------------------------------
+
+AUTO_SHIFT_ENABLE = yes
diff --git a/tests/auto_shift/auto_shift_repeat/auto_shift_no_auto_repeat/test_auto_shift.cpp b/tests/auto_shift/auto_shift_repeat/auto_shift_no_auto_repeat/test_auto_shift.cpp
new file mode 100644
index 0000000000..cd219a5474
--- /dev/null
+++ b/tests/auto_shift/auto_shift_repeat/auto_shift_no_auto_repeat/test_auto_shift.cpp
@@ -0,0 +1,105 @@
+/* Copyright 2022 Isaac Elenbaas
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General 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"
+
+using testing::_;
+using testing::AnyNumber;
+using testing::AnyOf;
+using testing::InSequence;
+
+class AutoShiftNoAutoRepeat : public TestFixture {};
+
+TEST_F(AutoShiftNoAutoRepeat, no_auto_repeat) {
+ TestDriver driver;
+ InSequence s;
+ auto repeat_key = KeymapKey(0, 1, 0, KC_A);
+
+ set_keymap({repeat_key});
+
+ /* Press repeat key. */
+ EXPECT_NO_REPORT(driver);
+ repeat_key.press();
+ run_one_scan_loop();
+ testing::Mock::VerifyAndClearExpectations(&driver);
+
+ /* Idle for auto-repeat to (not) kick in. */
+ 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);
+ run_one_scan_loop();
+ testing::Mock::VerifyAndClearExpectations(&driver);
+
+ /* Release repeat key. */
+ EXPECT_NO_REPORT(driver);
+ repeat_key.release();
+ run_one_scan_loop();
+ testing::Mock::VerifyAndClearExpectations(&driver);
+}
+
+TEST_F(AutoShiftNoAutoRepeat, tap_regular_key_while_another_key_repeats) {
+ TestDriver driver;
+ InSequence s;
+ auto repeat_key = KeymapKey(0, 1, 0, KC_P);
+ auto regular_key = KeymapKey(0, 2, 0, KC_A);
+
+ set_keymap({repeat_key, regular_key});
+
+ /* Press repeat key. */
+ EXPECT_NO_REPORT(driver);
+ repeat_key.press();
+ run_one_scan_loop();
+ testing::Mock::VerifyAndClearExpectations(&driver);
+
+ /* Release repeat key. */
+ EXPECT_REPORT(driver, (KC_P));
+ EXPECT_EMPTY_REPORT(driver);
+ repeat_key.release();
+ run_one_scan_loop();
+ testing::Mock::VerifyAndClearExpectations(&driver);
+
+ /* Press repeat key. */
+ EXPECT_REPORT(driver, (KC_P));
+ repeat_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_REPORT(driver, (KC_P, KC_A));
+ EXPECT_REPORT(driver, (KC_P));
+ regular_key.release();
+ run_one_scan_loop();
+ testing::Mock::VerifyAndClearExpectations(&driver);
+
+ /* Release repeat key. */
+ EXPECT_EMPTY_REPORT(driver);
+ repeat_key.release();
+ run_one_scan_loop();
+ testing::Mock::VerifyAndClearExpectations(&driver);
+}
diff --git a/keyboards/aozora/config.h b/tests/auto_shift/auto_shift_repeat/config.h
index 5171d0c312..fb4c506b20 100644
--- a/keyboards/aozora/config.h
+++ b/tests/auto_shift/auto_shift_repeat/config.h
@@ -1,4 +1,4 @@
-/* Copyright 2021 Salmon Cat Studio
+/* Copyright 2022 Isaac Elenbaas
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -16,5 +16,6 @@
#pragma once
-/* EEPROM for via */
-#define DYNAMIC_KEYMAP_LAYER_COUNT 2
+#include "test_common.h"
+
+#define AUTO_SHIFT_REPEAT
diff --git a/tests/auto_shift/auto_shift_repeat/test.mk b/tests/auto_shift/auto_shift_repeat/test.mk
new file mode 100644
index 0000000000..b687332005
--- /dev/null
+++ b/tests/auto_shift/auto_shift_repeat/test.mk
@@ -0,0 +1,20 @@
+# Copyright 2022 Isaac Elenbaas
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General 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/>.
+
+# --------------------------------------------------------------------------------
+# Keep this file, even if it is empty, as a marker that this folder contains tests
+# --------------------------------------------------------------------------------
+
+AUTO_SHIFT_ENABLE = yes
diff --git a/tests/auto_shift/auto_shift_repeat/test_auto_shift.cpp b/tests/auto_shift/auto_shift_repeat/test_auto_shift.cpp
new file mode 100644
index 0000000000..4a7569ea90
--- /dev/null
+++ b/tests/auto_shift/auto_shift_repeat/test_auto_shift.cpp
@@ -0,0 +1,107 @@
+/* Copyright 2022 Isaac Elenbaas
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General 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"
+
+using testing::_;
+using testing::AnyNumber;
+using testing::InSequence;
+
+class AutoShiftRepeat : public TestFixture {};
+
+TEST_F(AutoShiftRepeat, tap_regular_key_cancelling_another_key_hold) {
+ TestDriver driver;
+ InSequence s;
+ auto repeat_key = KeymapKey(0, 1, 0, KC_P);
+ auto regular_key = KeymapKey(0, 2, 0, KC_A);
+
+ set_keymap({repeat_key, regular_key});
+
+ /* Press repeat key. */
+ EXPECT_NO_REPORT(driver);
+ repeat_key.press();
+ run_one_scan_loop();
+ testing::Mock::VerifyAndClearExpectations(&driver);
+
+ /* Press regular key. */
+ EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())).Times(testing::AnyNumber());
+ EXPECT_REPORT(driver, (KC_P));
+ EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())).Times(testing::AnyNumber());
+ regular_key.press();
+ run_one_scan_loop();
+ testing::Mock::VerifyAndClearExpectations(&driver);
+
+ /* Release regular key. */
+ EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())).Times(testing::AnyNumber());
+ EXPECT_REPORT(driver, (KC_A));
+ EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())).Times(testing::AnyNumber());
+ regular_key.release();
+ run_one_scan_loop();
+ testing::Mock::VerifyAndClearExpectations(&driver);
+
+ /* Release repeat key. */
+ EXPECT_NO_REPORT(driver);
+ repeat_key.release();
+ run_one_scan_loop();
+ testing::Mock::VerifyAndClearExpectations(&driver);
+}
+
+TEST_F(AutoShiftRepeat, tap_regular_key_while_another_key_is_held) {
+ TestDriver driver;
+ InSequence s;
+ auto repeat_key = KeymapKey(0, 1, 0, KC_P);
+ auto regular_key = KeymapKey(0, 2, 0, KC_A);
+
+ set_keymap({repeat_key, regular_key});
+
+ /* Press repeat key. */
+ EXPECT_NO_REPORT(driver);
+ repeat_key.press();
+ run_one_scan_loop();
+ testing::Mock::VerifyAndClearExpectations(&driver);
+
+ /* Idle for auto-repeat to kick in. */
+ EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT))).Times(AnyNumber());
+ EXPECT_REPORT(driver, (KC_LSFT, KC_P));
+ idle_for(AUTO_SHIFT_TIMEOUT);
+ run_one_scan_loop();
+ testing::Mock::VerifyAndClearExpectations(&driver);
+
+ /* Press regular key. */
+ EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT))).Times(AnyNumber());
+ EXPECT_NO_REPORT(driver);
+ regular_key.press();
+ run_one_scan_loop();
+ testing::Mock::VerifyAndClearExpectations(&driver);
+
+ /* Release regular key. */
+ EXPECT_REPORT(driver, (KC_P, KC_A));
+ EXPECT_REPORT(driver, (KC_P));
+ regular_key.release();
+ run_one_scan_loop();
+ testing::Mock::VerifyAndClearExpectations(&driver);
+
+ /* Release repeat key. */
+ EXPECT_EMPTY_REPORT(driver);
+ repeat_key.release();
+ run_one_scan_loop();
+ testing::Mock::VerifyAndClearExpectations(&driver);
+}
diff --git a/tests/auto_shift/config.h b/tests/auto_shift/config.h
index 4f343b4529..6d872dd57b 100644
--- a/tests/auto_shift/config.h
+++ b/tests/auto_shift/config.h
@@ -16,4 +16,4 @@
#pragma once
-#include "test_common.h" \ No newline at end of file
+#include "test_common.h"
diff --git a/keyboards/input_club/infinity60/halconf.h b/tests/auto_shift/retro_shift/tap_hold_configurations/default_mod_tap/config.h
index f2a330b416..0de9845d9d 100644
--- a/keyboards/input_club/infinity60/halconf.h
+++ b/tests/auto_shift/retro_shift/tap_hold_configurations/default_mod_tap/config.h
@@ -1,4 +1,4 @@
-/* Copyright 2020 QMK
+/* Copyright 2022 Isaac Elenbaas
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -14,14 +14,11 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/*
- * This file was auto-generated by:
- * `qmk chibios-confmigrate -i keyboards/infinity60/halconf.h -r platforms/chibios/common/configs/halconf.h`
- */
-
#pragma once
-#define HAL_USE_I2C TRUE
-
-#include_next <halconf.h>
+#include "test_common.h"
+#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/auto_shift/retro_shift/tap_hold_configurations/default_mod_tap/no_timeout/config.h b/tests/auto_shift/retro_shift/tap_hold_configurations/default_mod_tap/no_timeout/config.h
new file mode 100644
index 0000000000..dc9dc28cab
--- /dev/null
+++ b/tests/auto_shift/retro_shift/tap_hold_configurations/default_mod_tap/no_timeout/config.h
@@ -0,0 +1,21 @@
+/* Copyright 2021 Stefan Kerkmann
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General 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 RETRO_SHIFT
diff --git a/tests/auto_shift/retro_shift/tap_hold_configurations/default_mod_tap/no_timeout/test.mk b/tests/auto_shift/retro_shift/tap_hold_configurations/default_mod_tap/no_timeout/test.mk
new file mode 100644
index 0000000000..b687332005
--- /dev/null
+++ b/tests/auto_shift/retro_shift/tap_hold_configurations/default_mod_tap/no_timeout/test.mk
@@ -0,0 +1,20 @@
+# Copyright 2022 Isaac Elenbaas
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General 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/>.
+
+# --------------------------------------------------------------------------------
+# Keep this file, even if it is empty, as a marker that this folder contains tests
+# --------------------------------------------------------------------------------
+
+AUTO_SHIFT_ENABLE = yes
diff --git a/tests/auto_shift/retro_shift/tap_hold_configurations/default_mod_tap/no_timeout/test_retro_shift.cpp b/tests/auto_shift/retro_shift/tap_hold_configurations/default_mod_tap/no_timeout/test_retro_shift.cpp
new file mode 100644
index 0000000000..6d7d06427c
--- /dev/null
+++ b/tests/auto_shift/retro_shift/tap_hold_configurations/default_mod_tap/no_timeout/test_retro_shift.cpp
@@ -0,0 +1,57 @@
+/* Copyright 2022 Isaac Elenbaas
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General 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 RetroShiftDefaultTapHold : public TestFixture {};
+
+TEST_F(RetroShiftDefaultTapHold, hold_mod_tap_key_for_long) {
+ TestDriver driver;
+ InSequence s;
+ auto mod_tap_hold_key = KeymapKey(0, 0, 0, CTL_T(KC_A));
+
+ set_keymap({mod_tap_hold_key});
+
+ /* Press mod-tap-hold key. */
+ EXPECT_NO_REPORT(driver);
+ mod_tap_hold_key.press();
+ run_one_scan_loop();
+ idle_for(4 * TAPPING_TERM);
+ testing::Mock::VerifyAndClearExpectations(&driver);
+
+ /* Release mod-tap-hold 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);
+ mod_tap_hold_key.release();
+ run_one_scan_loop();
+ testing::Mock::VerifyAndClearExpectations(&driver);
+}
diff --git a/tests/auto_shift/retro_shift/tap_hold_configurations/default_mod_tap/test.mk b/tests/auto_shift/retro_shift/tap_hold_configurations/default_mod_tap/test.mk
new file mode 100644
index 0000000000..b687332005
--- /dev/null
+++ b/tests/auto_shift/retro_shift/tap_hold_configurations/default_mod_tap/test.mk
@@ -0,0 +1,20 @@
+# Copyright 2022 Isaac Elenbaas
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General 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/>.
+
+# --------------------------------------------------------------------------------
+# Keep this file, even if it is empty, as a marker that this folder contains tests
+# --------------------------------------------------------------------------------
+
+AUTO_SHIFT_ENABLE = yes
diff --git a/tests/auto_shift/retro_shift/tap_hold_configurations/default_mod_tap/test_retro_shift.cpp b/tests/auto_shift/retro_shift/tap_hold_configurations/default_mod_tap/test_retro_shift.cpp
new file mode 100644
index 0000000000..f85a511632
--- /dev/null
+++ b/tests/auto_shift/retro_shift/tap_hold_configurations/default_mod_tap/test_retro_shift.cpp
@@ -0,0 +1,485 @@
+/* Copyright 2022 Isaac Elenbaas
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General 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 RetroShiftDefaultTapHold : public TestFixture {};
+
+TEST_F(RetroShiftDefaultTapHold, tap_mod_tap_key) {
+ TestDriver driver;
+ InSequence s;
+ auto mod_tap_hold_key = KeymapKey(0, 0, 0, CTL_T(KC_A));
+
+ set_keymap({mod_tap_hold_key});
+
+ /* Press mod-tap-hold key. */
+ EXPECT_NO_REPORT(driver);
+ mod_tap_hold_key.press();
+ run_one_scan_loop();
+ testing::Mock::VerifyAndClearExpectations(&driver);
+
+ /* Release mod-tap-hold key. */
+ EXPECT_REPORT(driver, (KC_A));
+ EXPECT_EMPTY_REPORT(driver);
+ mod_tap_hold_key.release();
+ run_one_scan_loop();
+ testing::Mock::VerifyAndClearExpectations(&driver);
+}
+
+TEST_F(RetroShiftDefaultTapHold, hold_mod_tap_key_under_retro_shift) {
+ TestDriver driver;
+ InSequence s;
+ auto mod_tap_hold_key = KeymapKey(0, 0, 0, CTL_T(KC_A));
+
+ set_keymap({mod_tap_hold_key});
+
+ /* Press mod-tap-hold key. */
+ EXPECT_NO_REPORT(driver);
+ mod_tap_hold_key.press();
+ run_one_scan_loop();
+ idle_for(AUTO_SHIFT_TIMEOUT);
+ testing::Mock::VerifyAndClearExpectations(&driver);
+
+ /* Release mod-tap-hold 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);
+ mod_tap_hold_key.release();
+ run_one_scan_loop();
+ testing::Mock::VerifyAndClearExpectations(&driver);
+}
+
+TEST_F(RetroShiftDefaultTapHold, hold_mod_tap_key_over_retro_shift) {
+ TestDriver driver;
+ InSequence s;
+ auto mod_tap_hold_key = KeymapKey(0, 0, 0, CTL_T(KC_A));
+
+ set_keymap({mod_tap_hold_key});
+
+ /* Press mod-tap-hold key. */
+ EXPECT_REPORT(driver, (KC_LCTL));
+ mod_tap_hold_key.press();
+ run_one_scan_loop();
+ idle_for(RETRO_SHIFT);
+ 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(RetroShiftDefaultTapHold, 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, 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(RetroShiftDefaultTapHold, 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, 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(RetroShiftDefaultTapHold, 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, 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(RetroShiftDefaultTapHold, 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, 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(RetroShiftDefaultTapHold, 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, 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(RetroShiftDefaultTapHold, 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, 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(RetroShiftDefaultTapHold, 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, 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(RetroShiftDefaultTapHold, 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, 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(RetroShiftDefaultTapHold, 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, 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(RetroShiftDefaultTapHold, 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, 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/tests/auto_shift/retro_shift/tap_hold_configurations/hold_on_other_key_press/config.h b/tests/auto_shift/retro_shift/tap_hold_configurations/hold_on_other_key_press/config.h
new file mode 100644
index 0000000000..396683963d
--- /dev/null
+++ b/tests/auto_shift/retro_shift/tap_hold_configurations/hold_on_other_key_press/config.h
@@ -0,0 +1,26 @@
+/* Copyright 2022 Isaac Elenbaas
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General 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 HOLD_ON_OTHER_KEY_PRESS
+
+#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/auto_shift/retro_shift/tap_hold_configurations/hold_on_other_key_press/test.mk b/tests/auto_shift/retro_shift/tap_hold_configurations/hold_on_other_key_press/test.mk
new file mode 100644
index 0000000000..b687332005
--- /dev/null
+++ b/tests/auto_shift/retro_shift/tap_hold_configurations/hold_on_other_key_press/test.mk
@@ -0,0 +1,20 @@
+# Copyright 2022 Isaac Elenbaas
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General 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/>.
+
+# --------------------------------------------------------------------------------
+# Keep this file, even if it is empty, as a marker that this folder contains tests
+# --------------------------------------------------------------------------------
+
+AUTO_SHIFT_ENABLE = yes
diff --git a/tests/auto_shift/retro_shift/tap_hold_configurations/hold_on_other_key_press/test_retro_shift.cpp b/tests/auto_shift/retro_shift/tap_hold_configurations/hold_on_other_key_press/test_retro_shift.cpp
new file mode 100644
index 0000000000..52fc082ea3
--- /dev/null
+++ b/tests/auto_shift/retro_shift/tap_hold_configurations/hold_on_other_key_press/test_retro_shift.cpp
@@ -0,0 +1,442 @@
+/* Copyright 2022 Isaac Elenbaas
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General 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 RetroShiftHoldOnOtherKeyPress : public TestFixture {};
+
+TEST_F(RetroShiftHoldOnOtherKeyPress, 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, 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(RetroShiftHoldOnOtherKeyPress, 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, 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(RetroShiftHoldOnOtherKeyPress, 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, 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(RetroShiftHoldOnOtherKeyPress, 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, 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(RetroShiftHoldOnOtherKeyPress, 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, 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(RetroShiftHoldOnOtherKeyPress, 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, 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(RetroShiftHoldOnOtherKeyPress, 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, 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_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LCTL))).Times(AnyNumber());
+ mod_tap_hold_key.release();
+ 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));
+ EXPECT_EMPTY_REPORT(driver);
+ regular_key.release();
+ run_one_scan_loop();
+ testing::Mock::VerifyAndClearExpectations(&driver);
+}
+
+TEST_F(RetroShiftHoldOnOtherKeyPress, 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, 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_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LCTL))).Times(AnyNumber());
+ 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_LCTL))).Times(AnyNumber());
+ EXPECT_REPORT(driver, (KC_LCTL, KC_A));
+ EXPECT_REPORT(driver, (KC_LCTL));
+ EXPECT_EMPTY_REPORT(driver);
+ mod_tap_regular_key.release();
+ run_one_scan_loop();
+ testing::Mock::VerifyAndClearExpectations(&driver);
+}
+
+TEST_F(RetroShiftHoldOnOtherKeyPress, 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, 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_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LCTL))).Times(AnyNumber());
+ mod_tap_hold_key.release();
+ run_one_scan_loop();
+ 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),
+ KeyboardReport(KC_LCTL))))
+ .Times(AnyNumber());
+ // clang-format on
+ EXPECT_EMPTY_REPORT(driver);
+ idle_for(AUTO_SHIFT_TIMEOUT);
+ regular_key.release();
+ run_one_scan_loop();
+ testing::Mock::VerifyAndClearExpectations(&driver);
+}
+
+TEST_F(RetroShiftHoldOnOtherKeyPress, 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, 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_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LCTL))).Times(AnyNumber());
+ mod_tap_hold_key.release();
+ run_one_scan_loop();
+ 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),
+ KeyboardReport(KC_LCTL))))
+ .Times(AnyNumber());
+ // clang-format on
+ 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/tests/auto_shift/retro_shift/tap_hold_configurations/permissive_hold/config.h b/tests/auto_shift/retro_shift/tap_hold_configurations/permissive_hold/config.h
new file mode 100644
index 0000000000..5194027c9f
--- /dev/null
+++ b/tests/auto_shift/retro_shift/tap_hold_configurations/permissive_hold/config.h
@@ -0,0 +1,26 @@
+/* Copyright 2022 Isaac Elenbaas
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General 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 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/auto_shift/retro_shift/tap_hold_configurations/permissive_hold/test.mk b/tests/auto_shift/retro_shift/tap_hold_configurations/permissive_hold/test.mk
new file mode 100644
index 0000000000..b687332005
--- /dev/null
+++ b/tests/auto_shift/retro_shift/tap_hold_configurations/permissive_hold/test.mk
@@ -0,0 +1,20 @@
+# Copyright 2022 Isaac Elenbaas
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General 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/>.
+
+# --------------------------------------------------------------------------------
+# Keep this file, even if it is empty, as a marker that this folder contains tests
+# --------------------------------------------------------------------------------
+
+AUTO_SHIFT_ENABLE = yes
diff --git a/tests/auto_shift/retro_shift/tap_hold_configurations/permissive_hold/test_retro_shift.cpp b/tests/auto_shift/retro_shift/tap_hold_configurations/permissive_hold/test_retro_shift.cpp
new file mode 100644
index 0000000000..a6c2cab167
--- /dev/null
+++ b/tests/auto_shift/retro_shift/tap_hold_configurations/permissive_hold/test_retro_shift.cpp
@@ -0,0 +1,419 @@
+/* Copyright 2022 Isaac Elenbaas
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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/tests/auto_shift/retro_shift/tap_hold_configurations/permissive_hold_hold_on_other_key_press/config.h b/tests/auto_shift/retro_shift/tap_hold_configurations/permissive_hold_hold_on_other_key_press/config.h
new file mode 100644
index 0000000000..a9535d8db0
--- /dev/null
+++ b/tests/auto_shift/retro_shift/tap_hold_configurations/permissive_hold_hold_on_other_key_press/config.h
@@ -0,0 +1,27 @@
+/* Copyright 2022 Isaac Elenbaas
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General 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 HOLD_ON_OTHER_KEY_PRESS
+#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/auto_shift/retro_shift/tap_hold_configurations/permissive_hold_hold_on_other_key_press/test.mk b/tests/auto_shift/retro_shift/tap_hold_configurations/permissive_hold_hold_on_other_key_press/test.mk
new file mode 100644
index 0000000000..b687332005
--- /dev/null
+++ b/tests/auto_shift/retro_shift/tap_hold_configurations/permissive_hold_hold_on_other_key_press/test.mk
@@ -0,0 +1,20 @@
+# Copyright 2022 Isaac Elenbaas
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General 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/>.
+
+# --------------------------------------------------------------------------------
+# Keep this file, even if it is empty, as a marker that this folder contains tests
+# --------------------------------------------------------------------------------
+
+AUTO_SHIFT_ENABLE = yes
diff --git a/tests/auto_shift/retro_shift/tap_hold_configurations/permissive_hold_hold_on_other_key_press/test_retro_shift.cpp b/tests/auto_shift/retro_shift/tap_hold_configurations/permissive_hold_hold_on_other_key_press/test_retro_shift.cpp
new file mode 100644
index 0000000000..25c80b2cba
--- /dev/null
+++ b/tests/auto_shift/retro_shift/tap_hold_configurations/permissive_hold_hold_on_other_key_press/test_retro_shift.cpp
@@ -0,0 +1,442 @@
+/* Copyright 2022 Isaac Elenbaas
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General 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 RetroShiftPermissiveHoldHoldOnOtherKeyPress : public TestFixture {};
+
+TEST_F(RetroShiftPermissiveHoldHoldOnOtherKeyPress, 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, 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(RetroShiftPermissiveHoldHoldOnOtherKeyPress, 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, 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(RetroShiftPermissiveHoldHoldOnOtherKeyPress, 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, 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(RetroShiftPermissiveHoldHoldOnOtherKeyPress, 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, 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(RetroShiftPermissiveHoldHoldOnOtherKeyPress, 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, 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(RetroShiftPermissiveHoldHoldOnOtherKeyPress, 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, 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(RetroShiftPermissiveHoldHoldOnOtherKeyPress, 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, 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_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LCTL))).Times(AnyNumber());
+ mod_tap_hold_key.release();
+ 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));
+ EXPECT_EMPTY_REPORT(driver);
+ regular_key.release();
+ run_one_scan_loop();
+ testing::Mock::VerifyAndClearExpectations(&driver);
+}
+
+TEST_F(RetroShiftPermissiveHoldHoldOnOtherKeyPress, 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, 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_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LCTL))).Times(AnyNumber());
+ 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_LCTL))).Times(AnyNumber());
+ EXPECT_REPORT(driver, (KC_LCTL, KC_A));
+ EXPECT_REPORT(driver, (KC_LCTL));
+ EXPECT_EMPTY_REPORT(driver);
+ mod_tap_regular_key.release();
+ run_one_scan_loop();
+ testing::Mock::VerifyAndClearExpectations(&driver);
+}
+
+TEST_F(RetroShiftPermissiveHoldHoldOnOtherKeyPress, 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, 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_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LCTL))).Times(AnyNumber());
+ mod_tap_hold_key.release();
+ run_one_scan_loop();
+ 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),
+ KeyboardReport(KC_LCTL))))
+ .Times(AnyNumber());
+ // clang-format on
+ EXPECT_EMPTY_REPORT(driver);
+ idle_for(AUTO_SHIFT_TIMEOUT);
+ regular_key.release();
+ run_one_scan_loop();
+ testing::Mock::VerifyAndClearExpectations(&driver);
+}
+
+TEST_F(RetroShiftPermissiveHoldHoldOnOtherKeyPress, 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, 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_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LCTL))).Times(AnyNumber());
+ mod_tap_hold_key.release();
+ run_one_scan_loop();
+ 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),
+ KeyboardReport(KC_LCTL))))
+ .Times(AnyNumber());
+ // clang-format on
+ 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/tests/auto_shift/test.mk b/tests/auto_shift/test.mk
index 4259c606e4..a4c6b380ed 100644
--- a/tests/auto_shift/test.mk
+++ b/tests/auto_shift/test.mk
@@ -17,4 +17,4 @@
# Keep this file, even if it is empty, as a marker that this folder contains tests
# --------------------------------------------------------------------------------
-AUTO_SHIFT_ENABLE = yes \ No newline at end of file
+AUTO_SHIFT_ENABLE = yes
diff --git a/tests/basic/config.h b/tests/basic/config.h
index 85fa9d691d..7fc76d7c2e 100644
--- a/tests/basic/config.h
+++ b/tests/basic/config.h
@@ -16,4 +16,4 @@
#pragma once
-#include "test_common.h" \ No newline at end of file
+#include "test_common.h"
diff --git a/tests/basic/test.mk b/tests/basic/test.mk
index 29690d1adf..6ec384609c 100644
--- a/tests/basic/test.mk
+++ b/tests/basic/test.mk
@@ -15,4 +15,4 @@
# --------------------------------------------------------------------------------
# Keep this file, even if it is empty, as a marker that this folder contains tests
-# -------------------------------------------------------------------------------- \ No newline at end of file
+# --------------------------------------------------------------------------------
diff --git a/tests/basic/test_one_shot_keys.cpp b/tests/basic/test_one_shot_keys.cpp
index 2a3434bf16..9748dad7da 100644
--- a/tests/basic/test_one_shot_keys.cpp
+++ b/tests/basic/test_one_shot_keys.cpp
@@ -337,3 +337,49 @@ TEST_F(OneShot, OSLWithAdditionalKeypress) {
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};
+
+ set_keymap({osl_key, osm_key, regular_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);
+ osm_key.press();
+ run_one_scan_loop();
+ osm_key.release();
+ run_one_scan_loop();
+ EXPECT_TRUE(layer_state_is(1));
+ VERIFY_AND_CLEAR(driver);
+
+ /* Press regular key */
+ EXPECT_REPORT(driver, (osm_key.report_code, regular_key.report_code)).Times(1);
+ EXPECT_EMPTY_REPORT(driver);
+ regular_key.press();
+ run_one_scan_loop();
+ EXPECT_FALSE(layer_state_is(1));
+ VERIFY_AND_CLEAR(driver);
+
+ /* Release regular key */
+ EXPECT_NO_REPORT(driver);
+ regular_key.release();
+ run_one_scan_loop();
+ VERIFY_AND_CLEAR(driver);
+}
diff --git a/tests/caps_word/auto_shift/config.h b/tests/caps_word/auto_shift/config.h
new file mode 100644
index 0000000000..aff389100e
--- /dev/null
+++ b/tests/caps_word/auto_shift/config.h
@@ -0,0 +1,21 @@
+// Copyright 2022 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 TAPPING_TERM 200
+#define AUTO_SHIFT_TIMEOUT 150
diff --git a/tests/caps_word/caps_word_autoshift/config.h b/tests/caps_word/auto_shift/retro_shift/config.h
index b80f53b9dd..b80f53b9dd 100644
--- a/tests/caps_word/caps_word_autoshift/config.h
+++ b/tests/caps_word/auto_shift/retro_shift/config.h
diff --git a/tests/caps_word/caps_word_autoshift/test.mk b/tests/caps_word/auto_shift/retro_shift/test.mk
index 7f717d7fc1..7f717d7fc1 100644
--- a/tests/caps_word/caps_word_autoshift/test.mk
+++ b/tests/caps_word/auto_shift/retro_shift/test.mk
diff --git a/tests/caps_word/caps_word_autoshift/test_caps_word_autoshift.cpp b/tests/caps_word/auto_shift/retro_shift/test_caps_word_retroshift.cpp
index 01b1a78a5f..03a7a61a73 100644
--- a/tests/caps_word/caps_word_autoshift/test_caps_word_autoshift.cpp
+++ b/tests/caps_word/auto_shift/retro_shift/test_caps_word_retroshift.cpp
@@ -27,6 +27,10 @@
KeyboardReport(KC_LSFT))))
// clang-format on
+bool get_auto_shifted_key(uint16_t keycode, keyrecord_t *record) {
+ return true;
+}
+
using ::testing::_;
using ::testing::AnyNumber;
using ::testing::AnyOf;
diff --git a/tests/caps_word/auto_shift/test.mk b/tests/caps_word/auto_shift/test.mk
new file mode 100644
index 0000000000..7f717d7fc1
--- /dev/null
+++ b/tests/caps_word/auto_shift/test.mk
@@ -0,0 +1,18 @@
+# Copyright 2022 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/>.
+
+CAPS_WORD_ENABLE = yes
+AUTO_SHIFT_ENABLE = yes
+
diff --git a/tests/caps_word/auto_shift/test_caps_word_autoshift.cpp b/tests/caps_word/auto_shift/test_caps_word_autoshift.cpp
new file mode 100644
index 0000000000..849b993525
--- /dev/null
+++ b/tests/caps_word/auto_shift/test_caps_word_autoshift.cpp
@@ -0,0 +1,66 @@
+// Copyright 2022 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 "test_fixture.hpp"
+#include "test_keymap_key.hpp"
+
+using ::testing::_;
+using ::testing::AnyNumber;
+using ::testing::AnyOf;
+using ::testing::InSequence;
+
+class CapsWord : public TestFixture {
+ public:
+ void SetUp() override {
+ caps_word_off();
+ }
+};
+
+// Tests that with Auto Shift, letter keys are shifted by Caps Word
+// regardless of whether they are released before AUTO_SHIFT_TIMEOUT.
+TEST_F(CapsWord, AutoShiftKeys) {
+ TestDriver driver;
+ KeymapKey key_a(0, 0, 0, KC_A);
+ KeymapKey key_spc(0, 1, 0, KC_SPC);
+ set_keymap({key_a, key_spc});
+
+ // Allow any number of reports with no keys or only KC_LSFT.
+ // clang-format off
+ EXPECT_CALL(driver, send_keyboard_mock(AnyOf(
+ KeyboardReport(),
+ KeyboardReport(KC_LSFT))))
+ .Times(AnyNumber());
+ // clang-format on
+ { // Expect: "A, A, space, a".
+ InSequence s;
+ EXPECT_REPORT(driver, (KC_LSFT, KC_A));
+ EXPECT_REPORT(driver, (KC_LSFT, KC_A));
+ EXPECT_REPORT(driver, (KC_SPC));
+ EXPECT_REPORT(driver, (KC_A));
+ }
+
+ // Turn on Caps Word and type "A (quick tap), A (long press), space, A".
+ caps_word_on();
+
+ tap_key(key_a); // Tap A quickly.
+ tap_key(key_a, AUTO_SHIFT_TIMEOUT + 1); // Long press A.
+ tap_key(key_spc);
+ tap_key(key_a);
+
+ testing::Mock::VerifyAndClearExpectations(&driver);
+}
diff --git a/tests/caps_word/caps_word_unicodemap/config.h b/tests/caps_word/unicodemap/config.h
index 0f770337b1..0f770337b1 100644
--- a/tests/caps_word/caps_word_unicodemap/config.h
+++ b/tests/caps_word/unicodemap/config.h
diff --git a/tests/caps_word/caps_word_unicodemap/test.mk b/tests/caps_word/unicodemap/test.mk
index 92bcba762c..92bcba762c 100644
--- a/tests/caps_word/caps_word_unicodemap/test.mk
+++ b/tests/caps_word/unicodemap/test.mk
diff --git a/tests/caps_word/caps_word_unicodemap/test_caps_word_unicodemap.cpp b/tests/caps_word/unicodemap/test_caps_word_unicodemap.cpp
index 21e5493526..21e5493526 100644
--- a/tests/caps_word/caps_word_unicodemap/test_caps_word_unicodemap.cpp
+++ b/tests/caps_word/unicodemap/test_caps_word_unicodemap.cpp
diff --git a/tests/tap_hold_configurations/default_mod_tap/test.mk b/tests/tap_hold_configurations/default_mod_tap/test.mk
index cfab996e0e..efecca2c22 100644
--- a/tests/tap_hold_configurations/default_mod_tap/test.mk
+++ b/tests/tap_hold_configurations/default_mod_tap/test.mk
@@ -15,4 +15,4 @@
# --------------------------------------------------------------------------------
# Keep this file, even if it is empty, as a marker that this folder contains tests
-# -------------------------------------------------------------------------------- \ No newline at end of file
+# --------------------------------------------------------------------------------
diff --git a/tests/tap_hold_configurations/permissive_hold/config.h b/tests/tap_hold_configurations/permissive_hold/config.h
index 2d5a9849e7..0031c6e5bc 100644
--- a/tests/tap_hold_configurations/permissive_hold/config.h
+++ b/tests/tap_hold_configurations/permissive_hold/config.h
@@ -18,4 +18,4 @@
#include "test_common.h"
-#define PERMISSIVE_HOLD \ No newline at end of file
+#define PERMISSIVE_HOLD
diff --git a/tests/test_common/build.mk b/tests/test_common/build.mk
index aeb3057854..d7423bc78a 100644
--- a/tests/test_common/build.mk
+++ b/tests/test_common/build.mk
@@ -13,4 +13,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/>.
-CUSTOM_MATRIX=yes \ No newline at end of file
+CUSTOM_MATRIX=yes
diff --git a/tests/test_common/main.cpp b/tests/test_common/main.cpp
index 0f4e320b07..ac481b8fba 100644
--- a/tests/test_common/main.cpp
+++ b/tests/test_common/main.cpp
@@ -29,4 +29,4 @@ int main(int argc, char **argv) {
init_logging();
return RUN_ALL_TESTS();
-} \ No newline at end of file
+}
diff --git a/tests/test_common/test_common.h b/tests/test_common/test_common.h
index 19ffcddcea..8b93c032b6 100644
--- a/tests/test_common/test_common.h
+++ b/tests/test_common/test_common.h
@@ -1,4 +1,4 @@
#pragma once
#define MATRIX_ROWS 4
-#define MATRIX_COLS 10 \ No newline at end of file
+#define MATRIX_COLS 10
diff --git a/tmk_core/protocol/arm_atsam/usb/udi_device_epsize.h b/tmk_core/protocol/arm_atsam/usb/udi_device_epsize.h
index 7a9ed31930..47bd02c074 100644
--- a/tmk_core/protocol/arm_atsam/usb/udi_device_epsize.h
+++ b/tmk_core/protocol/arm_atsam/usb/udi_device_epsize.h
@@ -19,7 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define _UDI_DEVICE_EPSIZE_H_
#define KEYBOARD_EPSIZE 8
-#define MOUSE_EPSIZE 8
+#define MOUSE_EPSIZE 16
#define EXTRAKEY_EPSIZE 8
#define RAW_EPSIZE 32
#define CONSOLE_EPSIZE 32
diff --git a/tmk_core/protocol/host.h b/tmk_core/protocol/host.h
index add408caf6..e4fb3a74f2 100644
--- a/tmk_core/protocol/host.h
+++ b/tmk_core/protocol/host.h
@@ -23,9 +23,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "host_driver.h"
#include "led.h"
-#define IS_LED_ON(leds, led_name) ((leds) & (1 << (led_name)))
-#define IS_LED_OFF(leds, led_name) (~(leds) & (1 << (led_name)))
-
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/tmk_core/protocol/report.c b/tmk_core/protocol/report.c
index 1ba3be4604..27d267abae 100644
--- a/tmk_core/protocol/report.c
+++ b/tmk_core/protocol/report.c
@@ -59,7 +59,7 @@ uint8_t get_first_key(report_keyboard_t* keyboard_report) {
#ifdef NKRO_ENABLE
if (keyboard_protocol && keymap_config.nkro) {
uint8_t i = 0;
- for (; i < KEYBOARD_REPORT_BITS && !keyboard_report->nkro.bits[i]; i++)
+ for (; i < NKRO_REPORT_BITS && !keyboard_report->nkro.bits[i]; i++)
;
return i << 3 | biton(keyboard_report->nkro.bits[i]);
}
@@ -89,7 +89,7 @@ bool is_key_pressed(report_keyboard_t* keyboard_report, uint8_t key) {
}
#ifdef NKRO_ENABLE
if (keyboard_protocol && keymap_config.nkro) {
- if ((key >> 3) < KEYBOARD_REPORT_BITS) {
+ if ((key >> 3) < NKRO_REPORT_BITS) {
return keyboard_report->nkro.bits[key >> 3] & 1 << (key & 7);
} else {
return false;
@@ -216,7 +216,7 @@ void del_key_byte(report_keyboard_t* keyboard_report, uint8_t code) {
* FIXME: Needs doc
*/
void add_key_bit(report_keyboard_t* keyboard_report, uint8_t code) {
- if ((code >> 3) < KEYBOARD_REPORT_BITS) {
+ if ((code >> 3) < NKRO_REPORT_BITS) {
keyboard_report->nkro.bits[code >> 3] |= 1 << (code & 7);
} else {
dprintf("add_key_bit: can't add: %02X\n", code);
@@ -228,7 +228,7 @@ void add_key_bit(report_keyboard_t* keyboard_report, uint8_t code) {
* FIXME: Needs doc
*/
void del_key_bit(report_keyboard_t* keyboard_report, uint8_t code) {
- if ((code >> 3) < KEYBOARD_REPORT_BITS) {
+ if ((code >> 3) < NKRO_REPORT_BITS) {
keyboard_report->nkro.bits[code >> 3] &= ~(1 << (code & 7));
} else {
dprintf("del_key_bit: can't del: %02X\n", code);
diff --git a/tmk_core/protocol/report.h b/tmk_core/protocol/report.h
index 9d415a3bfd..dd3cee3df0 100644
--- a/tmk_core/protocol/report.h
+++ b/tmk_core/protocol/report.h
@@ -20,6 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <stdint.h>
#include <stdbool.h>
#include "keycode.h"
+#include "util.h"
// clang-format off
@@ -129,10 +130,10 @@ enum desktop_usages {
#if defined(NKRO_ENABLE)
# if defined(PROTOCOL_LUFA) || defined(PROTOCOL_CHIBIOS)
# include "protocol/usb_descriptor.h"
-# define KEYBOARD_REPORT_BITS (SHARED_EPSIZE - 2)
+# define NKRO_REPORT_BITS (SHARED_EPSIZE - 2)
# elif defined(PROTOCOL_ARM_ATSAM)
# include "protocol/arm_atsam/usb/udi_device_epsize.h"
-# define KEYBOARD_REPORT_BITS (NKRO_EPSIZE - 1)
+# define NKRO_REPORT_BITS (NKRO_EPSIZE - 1)
# undef NKRO_SHARED_EP
# undef MOUSE_SHARED_EP
# else
@@ -188,20 +189,20 @@ typedef union {
uint8_t report_id;
# endif
uint8_t mods;
- uint8_t bits[KEYBOARD_REPORT_BITS];
+ uint8_t bits[NKRO_REPORT_BITS];
} nkro;
#endif
-} __attribute__((packed)) report_keyboard_t;
+} PACKED report_keyboard_t;
typedef struct {
uint8_t report_id;
uint16_t usage;
-} __attribute__((packed)) report_extra_t;
+} PACKED report_extra_t;
typedef struct {
uint8_t report_id;
uint32_t usage;
-} __attribute__((packed)) report_programmable_button_t;
+} PACKED report_programmable_button_t;
#ifdef MOUSE_EXTENDED_REPORT
typedef int16_t mouse_xy_report_t;
@@ -222,7 +223,7 @@ typedef struct {
mouse_xy_report_t y;
int8_t v;
int8_t h;
-} __attribute__((packed)) report_mouse_t;
+} PACKED report_mouse_t;
typedef struct {
#ifdef DIGITIZER_SHARED_EP
@@ -234,7 +235,7 @@ typedef struct {
uint8_t reserved : 5;
uint16_t x;
uint16_t y;
-} __attribute__((packed)) report_digitizer_t;
+} PACKED report_digitizer_t;
typedef struct {
#ifdef JOYSTICK_SHARED_EP
@@ -251,7 +252,7 @@ typedef struct {
#if JOYSTICK_BUTTON_COUNT > 0
uint8_t buttons[(JOYSTICK_BUTTON_COUNT - 1) / 8 + 1];
#endif
-} __attribute__((packed)) report_joystick_t;
+} PACKED report_joystick_t;
/* keycode to system usage */
static inline uint16_t KEYCODE2SYSTEM(uint8_t key) {
diff --git a/tmk_core/protocol/usb_descriptor.c b/tmk_core/protocol/usb_descriptor.c
index e215c90900..eb214c0492 100644
--- a/tmk_core/protocol/usb_descriptor.c
+++ b/tmk_core/protocol/usb_descriptor.c
@@ -359,10 +359,10 @@ const USB_Descriptor_HIDReport_Datatype_t PROGMEM SharedReport[] = {
// Keycodes
HID_RI_USAGE_PAGE(8, 0x07), // Keyboard/Keypad
HID_RI_USAGE_MINIMUM(8, 0x00),
- HID_RI_USAGE_MAXIMUM(8, KEYBOARD_REPORT_BITS * 8 - 1),
+ HID_RI_USAGE_MAXIMUM(8, NKRO_REPORT_BITS * 8 - 1),
HID_RI_LOGICAL_MINIMUM(8, 0x00),
HID_RI_LOGICAL_MAXIMUM(8, 0x01),
- HID_RI_REPORT_COUNT(8, KEYBOARD_REPORT_BITS * 8),
+ HID_RI_REPORT_COUNT(8, NKRO_REPORT_BITS * 8),
HID_RI_REPORT_SIZE(8, 0x01),
HID_RI_INPUT(8, HID_IOF_DATA | HID_IOF_VARIABLE | HID_IOF_ABSOLUTE),
diff --git a/tmk_core/protocol/usb_descriptor.h b/tmk_core/protocol/usb_descriptor.h
index ed84f4c9ab..1268bdae73 100644
--- a/tmk_core/protocol/usb_descriptor.h
+++ b/tmk_core/protocol/usb_descriptor.h
@@ -299,7 +299,7 @@ enum usb_endpoints {
#define KEYBOARD_EPSIZE 8
#define SHARED_EPSIZE 32
-#define MOUSE_EPSIZE 8
+#define MOUSE_EPSIZE 16
#define RAW_EPSIZE 32
#define CONSOLE_EPSIZE 32
#define MIDI_STREAM_EPSIZE 64
diff --git a/users/brandonschlack/brandonschlack.c b/users/brandonschlack/brandonschlack.c
index 1e52bd6452..6a9c04a73d 100644
--- a/users/brandonschlack/brandonschlack.c
+++ b/users/brandonschlack/brandonschlack.c
@@ -88,9 +88,7 @@ void suspend_power_down_keymap(void) {}
*/
void suspend_power_down_user(void) {
#ifdef RGB_MATRIX_ENABLE
- if (!g_suspend_state) {
- rgb_matrix_set_suspend_state(true);
- }
+ rgb_matrix_set_suspend_state(true);
#endif //RGB_MATRIX_ENABLE
suspend_power_down_keymap();
}
@@ -103,9 +101,7 @@ void suspend_wakeup_init_keymap(void) {}
*/
void suspend_wakeup_init_user(void) {
#ifdef RGB_MATRIX_ENABLE
- if (g_suspend_state) {
- rgb_matrix_set_suspend_state(false);
- }
+ rgb_matrix_set_suspend_state(false);
#endif //RGB_MATRIX_ENABLE
suspend_wakeup_init_keymap();
}
diff --git a/users/curry/rgb_lighting_user.c b/users/curry/rgb_lighting_user.c
index 34156744fe..81f3c4e505 100644
--- a/users/curry/rgb_lighting_user.c
+++ b/users/curry/rgb_lighting_user.c
@@ -142,7 +142,7 @@ void scan_rgblight_fadeout(void) { // Don't effing change this function .... rg
if (light->life) {
light->life -= 1;
if (get_highest_layer(layer_state) == 0) {
- sethsv(light->hue + rand() % 0xF, 255, light->life, (LED_TYPE *)&led[light_index]);
+ sethsv(light->hue + rand() % 0xF, 255, light->life, (rgb_led_t *)&led[light_index]);
}
light->timer = timer_read();
} else {
diff --git a/users/romus/romus.c b/users/romus/romus.c
index e16dd3b8a0..a49a2fe205 100644
--- a/users/romus/romus.c
+++ b/users/romus/romus.c
@@ -1,25 +1,5 @@
#include "romus.h"
-/*---------------*\
-|*-----MOUSE-----*|
-\*---------------*/
-#ifdef MOUSEKEY_ENABLE
-#include "mousekey.h"
-#endif
-
-/*-------------*\
-|*-----RGB-----*|
-\*-------------*/
-#ifdef RGBLIGHT_ENABLE
-#include "rgblight.h"
-#endif
-
-/*-------------*\
-|*---UNICODE---*|
-\*-------------*/
-#ifdef UNICODE_ENABLE
-#endif
-
/*-----------------*\
|*-----SECRETS-----*|
\*-----------------*/
diff --git a/users/tominabox1/dimple_rgb.c b/users/tominabox1/dimple_rgb.c
index 299dc830f1..8d80d45b95 100644
--- a/users/tominabox1/dimple_rgb.c
+++ b/users/tominabox1/dimple_rgb.c
@@ -1,7 +1,7 @@
#include "dz60rgb.h"
#include "config.h"
#if defined (dzrgb60_iso)
-const is31_led g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3733_led_t g_is31fl3733_leds[RGB_MATRIX_LED_COUNT] = {
{0, K_14, J_14, L_14},
{0, K_13, J_13, L_13},
{0, K_12, J_12, L_12},
@@ -86,7 +86,7 @@ led_config_t g_led_config = { {
} };
#elif defined (dzrgb60_hhkb)
-const is31_led g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3733_led_t g_is31fl3733_leds[RGB_MATRIX_LED_COUNT] = {
{0, H_15, G_15, I_15},
{0, K_14, J_14, L_14},
{0, K_13, J_13, L_13},
@@ -172,7 +172,7 @@ led_config_t g_led_config = { {
} };
#elif defined (dzrgb60_hhkb_iso)
-const is31_led g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3733_led_t g_is31fl3733_leds[RGB_MATRIX_LED_COUNT] = {
{0, H_15, G_15, I_15},
{0, K_14, J_14, L_14},
{0, K_13, J_13, L_13},
@@ -258,7 +258,7 @@ led_config_t g_led_config = { {
} };
#elif defined (dzrgb60_ansi)
-const is31_led g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3733_led_t g_is31fl3733_leds[RGB_MATRIX_LED_COUNT] = {
{0, K_14, J_14, L_14},
{0, K_13, J_13, L_13},
{0, K_12, J_12, L_12},
@@ -343,7 +343,7 @@ led_config_t g_led_config = { {
} };
#else
-const is31_led g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3733_led_t g_is31fl3733_leds[RGB_MATRIX_LED_COUNT] = {
{0, K_14, J_14, L_14},
{0, K_13, J_13, L_13},
{0, K_12, J_12, L_12},
diff --git a/users/xtonhasvim/fancylighting.c b/users/xtonhasvim/fancylighting.c
index a88ca4beb3..e3d1093b8d 100644
--- a/users/xtonhasvim/fancylighting.c
+++ b/users/xtonhasvim/fancylighting.c
@@ -45,7 +45,7 @@ void matrix_scan_keymap(void) {
uint16_t effect_start_timer = 0;
uint8_t user_rgb_mode = 0;
-LED_TYPE shadowed_led[RGBLED_NUM] = {{0}};
+rgb_led_t shadowed_led[RGBLED_NUM] = {{0}};
void start_firey_return(void) {
user_rgb_mode = BREATH_FIRE;
@@ -79,7 +79,7 @@ void set_color_for_offsets(uint16_t time_offset, uint16_t space_offset, uint8_t
float alpha = (time_progress + 0.1) * 7.0 - space_progress;
alpha = fmin(1.0, alpha*alpha);
- LED_TYPE px[1] = {{0}};
+ rgb_led_t px[1] = {{0}};
sethsv((uint16_t)(fmod(time_progress * 1.5 + space_progress,1.0)*360), 255, (uint8_t)(progress*255),&px[0]);
led[idx].r = alpha * px[0].r + ( 1.0 - alpha) * shadowed_led[idx].r;
led[idx].g = alpha * px[0].g + ( 1.0 - alpha) * shadowed_led[idx].g;
diff --git a/users/xtonhasvim/fancylighting.h b/users/xtonhasvim/fancylighting.h
index 02fb58b84a..b1a5c725f1 100644
--- a/users/xtonhasvim/fancylighting.h
+++ b/users/xtonhasvim/fancylighting.h
@@ -22,7 +22,7 @@
extern uint8_t user_rgb_mode;
-extern LED_TYPE shadowed_led[];
+extern rgb_led_t shadowed_led[];
#endif //RGBLIGHT_ENABLE
diff --git a/users/zer09/lights.h b/users/zer09/lights.h
index f1bd7245d5..380283b733 100644
--- a/users/zer09/lights.h
+++ b/users/zer09/lights.h
@@ -9,7 +9,7 @@
#define EECONFIG_LED_DIM_LVL (uint8_t *)15
#define SET_LED_RGB(r, g, b, led_dim, pos) \
- setrgb(r >> led_dim, g >> led_dim, b >> led_dim, (LED_TYPE *)&led[pos])
+ setrgb(r >> led_dim, g >> led_dim, b >> led_dim, (rgb_led_t *)&led[pos])
typedef enum {
DEFAULT,