summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--builddefs/common_features.mk25
-rw-r--r--builddefs/common_rules.mk31
-rw-r--r--builddefs/message.mk1
-rw-r--r--data/mappings/info_config.hjson4
-rw-r--r--data/mappings/info_rules.hjson1
-rw-r--r--data/mappings/keyboard_aliases.hjson6
-rw-r--r--data/schemas/keyboard.jsonschema14
-rw-r--r--docs/eeprom_driver.md12
-rw-r--r--docs/feature_backlight.md1
-rw-r--r--docs/feature_led_matrix.md42
-rw-r--r--docs/feature_oled_driver.md56
-rw-r--r--docs/feature_rgb_matrix.md229
-rw-r--r--docs/feature_rgblight.md6
-rw-r--r--docs/quantum_painter_lvgl.md8
-rw-r--r--docs/reference_info_json.md9
-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.c89
-rw-r--r--drivers/led/ckled2001-simple.h181
-rw-r--r--drivers/led/ckled2001.c89
-rw-r--r--drivers/led/ckled2001.h181
-rw-r--r--drivers/led/issi/is31fl3218.c118
-rw-r--r--drivers/led/issi/is31fl3218.h38
-rw-r--r--drivers/led/issi/is31fl3731-simple.c104
-rw-r--r--drivers/led/issi/is31fl3731-simple.h21
-rw-r--r--drivers/led/issi/is31fl3731.c90
-rw-r--r--drivers/led/issi/is31fl3731.h21
-rw-r--r--drivers/led/issi/is31fl3733-simple.c135
-rw-r--r--drivers/led/issi/is31fl3733-simple.h70
-rw-r--r--drivers/led/issi/is31fl3733.c129
-rw-r--r--drivers/led/issi/is31fl3733.h69
-rw-r--r--drivers/led/issi/is31fl3736.c123
-rw-r--r--drivers/led/issi/is31fl3736.h75
-rw-r--r--drivers/led/issi/is31fl3737.c125
-rw-r--r--drivers/led/issi/is31fl3737.h61
-rw-r--r--drivers/led/issi/is31fl3741.c143
-rw-r--r--drivers/led/issi/is31fl3741.h59
-rw-r--r--drivers/oled/oled_driver.c4
-rw-r--r--drivers/oled/oled_driver.h20
-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/4pplet/eagle_viper_rep/rev_a/config.h3
-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/abko/ak84bt/config.h6
-rw-r--r--keyboards/acheron/apollo/87h/gamma/config.h4
-rw-r--r--keyboards/acheron/shark/beta/info.json3
-rw-r--r--keyboards/acheron/shark/beta/rules.mk3
-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/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/akko/5108/config.h6
-rw-r--r--keyboards/akko/5108/info.json10
-rw-r--r--keyboards/akko/5108/rules.mk3
-rw-r--r--keyboards/akko/acr87/config.h6
-rw-r--r--keyboards/akko/acr87/info.json10
-rw-r--r--keyboards/akko/acr87/rules.mk4
-rw-r--r--keyboards/akko/top40/config.h6
-rw-r--r--keyboards/akko/top40/info.json10
-rw-r--r--keyboards/akko/top40/rules.mk7
-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/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)28
-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/canary/canary60rgb/v1/config.h4
-rw-r--r--keyboards/cannonkeys/brutalv2_1800/rules.mk3
-rw-r--r--keyboards/cannonkeys/caerdroia/rules.mk3
-rw-r--r--keyboards/cannonkeys/ortho48v2/rules.mk3
-rw-r--r--keyboards/cannonkeys/ortho60v2/rules.mk3
-rw-r--r--keyboards/cannonkeys/typeb/rules.mk3
-rw-r--r--keyboards/chosfox/cf81/config.h6
-rw-r--r--keyboards/chosfox/cf81/info.json6
-rw-r--r--keyboards/chosfox/cf81/rules.mk2
-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/clueboard/66/keymaps/magicmonty/keymap.c6
-rw-r--r--keyboards/clueboard/66_hotswap/gen1/config.h11
-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/deng/thirty/config.h5
-rw-r--r--keyboards/deng/thirty/info.json3
-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/dp60/config.h6
-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.h8
-rw-r--r--keyboards/drop/ctrl/v2/config.h8
-rw-r--r--keyboards/drop/sense75/config.h8
-rw-r--r--keyboards/drop/shift/v2/config.h10
-rw-r--r--keyboards/durgod/dgk6x/config.h17
-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/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/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/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/dz65rgb/v1/config.h6
-rw-r--r--keyboards/dztech/dz65rgb/v2/config.h6
-rwxr-xr-xkeyboards/dztech/dz65rgb/v3/config.h4
-rw-r--r--keyboards/dztech/og60/info.json448
-rw-r--r--keyboards/dztech/tofu/ii/v1/config.h6
-rw-r--r--keyboards/dztech/tofu/jr/v1/config.h6
-rw-r--r--keyboards/dztech/tofu60/info.json448
-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/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/era/divine/config.h (renamed from keyboards/gmmk/pro/rev1/ansi/keymaps/mattgauf/helpers.c)15
-rw-r--r--keyboards/era/divine/halconf.h (renamed from keyboards/aozora/config.h)9
-rw-r--r--keyboards/era/divine/info.json9
-rw-r--r--keyboards/era/divine/mcuconf.h (renamed from keyboards/novelkeys/nk1/config.h)11
-rw-r--r--keyboards/era/divine/readme.md4
-rw-r--r--keyboards/ergodox_ez/config.h6
-rw-r--r--keyboards/ergodox_ez/keymaps/pvinis/keymap.c1
-rw-r--r--keyboards/ergodox_ez/led_i2c.c2
-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/exclusive/e6_rgb/config.h4
-rwxr-xr-xkeyboards/fallacy/config.h4
-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/ferris/0_2/bling/config.h6
-rwxr-xr-xkeyboards/flashquark/horizon_z/config.h4
-rw-r--r--keyboards/frooastboard/walnut/config.h10
-rw-r--r--keyboards/gboards/butterstick/sten.h2
-rw-r--r--keyboards/gboards/georgi/sten.h2
-rw-r--r--keyboards/geekboards/tester/config.h6
-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
-rw-r--r--keyboards/gkeyboard/gpad8_2r/config.h2
-rw-r--r--keyboards/gkeyboard/gpad8_2r/info.json3
-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.json2
-rw-r--r--keyboards/gmmk/gmmk2/p65/iso/iso.c4
-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/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/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/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/lovelive9/keymaps/default/keymap.c20
-rw-r--r--keyboards/handwired/orbweaver/config.h4
-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/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/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/hs60/v1/config.h6
-rw-r--r--keyboards/hs60/v2/ansi/config.h2
-rw-r--r--keyboards/hs60/v2/hhkb/config.h2
-rw-r--r--keyboards/hs60/v2/iso/config.h2
-rw-r--r--keyboards/ibm/model_m/mschwingen/mschwingen.c22
-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/simpler64/config.h4
-rw-r--r--keyboards/inett_studio/sqx/hotswap/config.h6
-rw-r--r--keyboards/inett_studio/sqx/universal/config.h6
-rw-r--r--keyboards/inland/kb83/config.h3
-rw-r--r--keyboards/inland/kb83/info.json7
-rw-r--r--keyboards/inland/kb83/rules.mk2
-rw-r--r--keyboards/inland/mk47/config.h3
-rw-r--r--keyboards/inland/mk47/info.json9
-rw-r--r--keyboards/inland/mk47/rules.mk3
-rw-r--r--keyboards/input_club/ergodox_infinity/config.h4
-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.h31
-rw-r--r--keyboards/input_club/k_type/k_type-rgbdriver.c10
-rw-r--r--keyboards/input_club/k_type/k_type.c12
-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/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/kbdcraft/adam64/config.h4
-rw-r--r--keyboards/kbdfans/bella/rgb/config.h4
-rw-r--r--keyboards/kbdfans/bella/rgb_iso/config.h4
-rw-r--r--keyboards/kbdfans/boop65/rgb/config.h4
-rw-r--r--keyboards/kbdfans/kbd67/mkiirgb/v1/config.h6
-rw-r--r--keyboards/kbdfans/kbd67/mkiirgb/v2/config.h6
-rwxr-xr-xkeyboards/kbdfans/kbd67/mkiirgb/v3/config.h4
-rw-r--r--keyboards/kbdfans/kbdmini/config.h4
-rwxr-xr-xkeyboards/kbdfans/maja/config.h6
-rw-r--r--keyboards/kbdfans/niu_mini/keymaps/xtonhasvim/keymap.c2
-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
-rwxr-xr-xkeyboards/keebwerk/mega/ansi/config.h2
-rw-r--r--keyboards/keychron/c1_pro/ansi/rgb/config.h9
-rw-r--r--keyboards/keychron/c1_pro/ansi/white/config.h7
-rw-r--r--keyboards/keychron/c2_pro/ansi/rgb/config.h6
-rw-r--r--keyboards/keychron/c2_pro/ansi/white/config.h4
-rw-r--r--keyboards/keychron/q0/rev_0130/config.h4
-rw-r--r--keyboards/keychron/q0/rev_0130/rules.mk4
-rw-r--r--keyboards/keychron/q0/rev_0131/config.h7
-rw-r--r--keyboards/keychron/q0/rev_0131/rules.mk4
-rw-r--r--keyboards/keychron/q1/config.h6
-rw-r--r--keyboards/keychron/q1/iso_encoder/config.h8
-rw-r--r--keyboards/keychron/q10/ansi_encoder/rules.mk2
-rw-r--r--keyboards/keychron/q10/config.h9
-rw-r--r--keyboards/keychron/q10/iso_encoder/rules.mk2
-rw-r--r--keyboards/keychron/q11/ansi_encoder/rules.mk5
-rwxr-xr-xkeyboards/keychron/q11/config.h4
-rw-r--r--keyboards/keychron/q12/ansi_encoder/rules.mk2
-rw-r--r--keyboards/keychron/q12/config.h6
-rw-r--r--keyboards/keychron/q12/iso_encoder/rules.mk2
-rw-r--r--keyboards/keychron/q2/ansi/rules.mk3
-rw-r--r--keyboards/keychron/q2/ansi_encoder/rules.mk3
-rw-r--r--keyboards/keychron/q2/config.h9
-rw-r--r--keyboards/keychron/q2/iso/rules.mk3
-rw-r--r--keyboards/keychron/q2/iso_encoder/rules.mk3
-rw-r--r--keyboards/keychron/q2/jis/rules.mk3
-rw-r--r--keyboards/keychron/q2/jis_encoder/rules.mk3
-rw-r--r--keyboards/keychron/q3/ansi/rules.mk3
-rw-r--r--keyboards/keychron/q3/ansi_encoder/rules.mk2
-rw-r--r--keyboards/keychron/q3/config.h9
-rw-r--r--keyboards/keychron/q3/iso/rules.mk3
-rw-r--r--keyboards/keychron/q3/iso_encoder/rules.mk2
-rw-r--r--keyboards/keychron/q3/jis/rules.mk3
-rw-r--r--keyboards/keychron/q3/jis_encoder/rules.mk2
-rw-r--r--keyboards/keychron/q4/ansi_v1/config.h9
-rw-r--r--keyboards/keychron/q4/ansi_v1/rules.mk3
-rw-r--r--keyboards/keychron/q4/ansi_v2/config.h4
-rw-r--r--keyboards/keychron/q4/ansi_v2/rules.mk3
-rw-r--r--keyboards/keychron/q4/iso/config.h4
-rw-r--r--keyboards/keychron/q4/iso/rules.mk3
-rw-r--r--keyboards/keychron/q5/ansi/rules.mk2
-rw-r--r--keyboards/keychron/q5/ansi_encoder/rules.mk2
-rw-r--r--keyboards/keychron/q5/config.h6
-rw-r--r--keyboards/keychron/q5/iso/rules.mk2
-rw-r--r--keyboards/keychron/q5/iso_encoder/rules.mk2
-rw-r--r--keyboards/keychron/q6/ansi/rules.mk2
-rw-r--r--keyboards/keychron/q6/ansi_encoder/rules.mk2
-rw-r--r--keyboards/keychron/q6/config.h6
-rw-r--r--keyboards/keychron/q6/iso/rules.mk2
-rw-r--r--keyboards/keychron/q6/iso_encoder/rules.mk2
-rw-r--r--keyboards/keychron/q60/ansi/rules.mk3
-rw-r--r--keyboards/keychron/q60/config.h4
-rw-r--r--keyboards/keychron/q65/ansi_encoder/rules.mk2
-rw-r--r--keyboards/keychron/q65/config.h9
-rw-r--r--keyboards/keychron/q7/ansi/rules.mk3
-rw-r--r--keyboards/keychron/q7/config.h9
-rw-r--r--keyboards/keychron/q7/iso/rules.mk3
-rw-r--r--keyboards/keychron/q8/ansi/rules.mk3
-rw-r--r--keyboards/keychron/q8/ansi_encoder/rules.mk3
-rw-r--r--keyboards/keychron/q8/config.h9
-rw-r--r--keyboards/keychron/q8/iso/rules.mk3
-rw-r--r--keyboards/keychron/q8/iso_encoder/rules.mk3
-rw-r--r--keyboards/keychron/q9/ansi/rules.mk3
-rw-r--r--keyboards/keychron/q9/ansi_encoder/rules.mk3
-rw-r--r--keyboards/keychron/q9/config.h4
-rw-r--r--keyboards/keychron/q9/iso/rules.mk3
-rw-r--r--keyboards/keychron/q9/iso_encoder/rules.mk3
-rw-r--r--keyboards/keychron/s1/ansi/rgb/config.h9
-rw-r--r--keyboards/keychron/s1/ansi/rgb/rules.mk3
-rw-r--r--keyboards/keychron/s1/ansi/white/config.h7
-rw-r--r--keyboards/keychron/s1/ansi/white/rules.mk3
-rw-r--r--keyboards/keychron/v1/ansi/rules.mk2
-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/rules.mk2
-rw-r--r--keyboards/keychron/v1/iso_encoder/rules.mk2
-rw-r--r--keyboards/keychron/v1/jis/config.h5
-rw-r--r--keyboards/keychron/v1/jis/rules.mk2
-rw-r--r--keyboards/keychron/v1/jis_encoder/rules.mk2
-rw-r--r--keyboards/keychron/v10/ansi_encoder/rules.mk2
-rw-r--r--keyboards/keychron/v10/config.h9
-rw-r--r--keyboards/keychron/v10/iso_encoder/rules.mk2
-rw-r--r--keyboards/keychron/v2/ansi/rules.mk3
-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/rules.mk3
-rw-r--r--keyboards/keychron/v2/iso_encoder/rules.mk3
-rw-r--r--keyboards/keychron/v2/jis/rules.mk3
-rw-r--r--keyboards/keychron/v2/jis_encoder/rules.mk3
-rw-r--r--keyboards/keychron/v3/ansi/rules.mk3
-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/rules.mk3
-rw-r--r--keyboards/keychron/v3/iso_encoder/rules.mk2
-rw-r--r--keyboards/keychron/v3/jis/rules.mk3
-rw-r--r--keyboards/keychron/v3/jis_encoder/rules.mk2
-rw-r--r--keyboards/keychron/v4/ansi/rules.mk3
-rw-r--r--keyboards/keychron/v4/config.h4
-rw-r--r--keyboards/keychron/v4/iso/rules.mk3
-rw-r--r--keyboards/keychron/v5/ansi/rules.mk2
-rw-r--r--keyboards/keychron/v5/ansi_encoder/rules.mk2
-rw-r--r--keyboards/keychron/v5/config.h6
-rw-r--r--keyboards/keychron/v5/iso/rules.mk2
-rw-r--r--keyboards/keychron/v5/iso_encoder/rules.mk2
-rw-r--r--keyboards/keychron/v6/ansi/rules.mk2
-rw-r--r--keyboards/keychron/v6/ansi_encoder/rules.mk2
-rw-r--r--keyboards/keychron/v6/config.h6
-rw-r--r--keyboards/keychron/v6/iso/rules.mk2
-rw-r--r--keyboards/keychron/v6/iso_encoder/rules.mk2
-rw-r--r--keyboards/keychron/v7/ansi/rules.mk3
-rw-r--r--keyboards/keychron/v7/config.h9
-rw-r--r--keyboards/keychron/v7/iso/rules.mk3
-rw-r--r--keyboards/keychron/v8/ansi/rules.mk3
-rw-r--r--keyboards/keychron/v8/ansi_encoder/rules.mk3
-rw-r--r--keyboards/keychron/v8/config.h9
-rw-r--r--keyboards/keychron/v8/iso/rules.mk3
-rw-r--r--keyboards/keychron/v8/iso_encoder/rules.mk3
-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
-rw-r--r--keyboards/kprepublic/bm60hsrgb/rev2/config.h4
-rw-r--r--keyboards/kprepublic/bm60hsrgb/rev2/rev2.c2
-rw-r--r--keyboards/kprepublic/bm60hsrgb_ec/rev2/config.h4
-rw-r--r--keyboards/kprepublic/bm60hsrgb_iso/rev2/config.h4
-rw-r--r--keyboards/kprepublic/bm60hsrgb_iso/rev2/rev2.c2
-rw-r--r--keyboards/kprepublic/bm60hsrgb_poker/rev2/config.h4
-rw-r--r--keyboards/kprepublic/bm60hsrgb_poker/rev2/rev2.c2
-rw-r--r--keyboards/kprepublic/bm68hsrgb/rev2/config.h4
-rw-r--r--keyboards/kprepublic/bm80v2/config.h4
-rw-r--r--keyboards/kprepublic/bm80v2_iso/config.h4
-rw-r--r--keyboards/latincompass/latin17rgb/config.h13
-rw-r--r--keyboards/latincompass/latin60rgb/config.h4
-rw-r--r--keyboards/latincompass/latin6rgb/config.h11
-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/m20add/config.h4
-rw-r--r--keyboards/matrix/m20add/rgb_ring.c2
-rw-r--r--keyboards/matrix/noah/config.h6
-rw-r--r--keyboards/matrix/noah/noah.c2
-rw-r--r--keyboards/mechlovin/adelais/rgb_led/rev2/config.h13
-rw-r--r--keyboards/mechlovin/adelais/rgb_led/rev3/config.h11
-rw-r--r--keyboards/mechlovin/delphine/rgb_led/config.h12
-rw-r--r--keyboards/mechlovin/hannah60rgb/rev2/config.h14
-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/olly/octagon/config.h11
-rw-r--r--keyboards/mechlovin/zed65/mono_led/config.h11
-rw-r--r--keyboards/mechwild/sugarglider/config.h2
-rw-r--r--keyboards/mechwild/sugarglider/info.json3
-rwxr-xr-xkeyboards/melgeek/mach80/config.h4
-rw-r--r--keyboards/melgeek/mj61/config.h4
-rw-r--r--keyboards/melgeek/mj63/config.h4
-rw-r--r--keyboards/melgeek/mj64/config.h4
-rw-r--r--keyboards/melgeek/mj65/config.h4
-rwxr-xr-xkeyboards/melgeek/mojo68/config.h4
-rw-r--r--keyboards/melgeek/mojo75/config.h4
-rwxr-xr-xkeyboards/melgeek/tegic/config.h4
-rw-r--r--keyboards/melgeek/z70ultra/config.h4
-rw-r--r--keyboards/miller/gm862/config.h4
-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
-rw-r--r--keyboards/monsgeek/m1/config.h6
-rw-r--r--keyboards/monsgeek/m1/info.json10
-rw-r--r--keyboards/monsgeek/m1/rules.mk7
-rw-r--r--keyboards/monsgeek/m5/config.h6
-rw-r--r--keyboards/monsgeek/m5/info.json10
-rw-r--r--keyboards/monsgeek/m5/rules.mk3
-rw-r--r--keyboards/monsgeek/m6/config.h6
-rw-r--r--keyboards/monsgeek/m6/info.json10
-rw-r--r--keyboards/monsgeek/m6/rules.mk3
-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/rules.mk1
-rw-r--r--keyboards/mt/mt64rgb/config.h4
-rw-r--r--keyboards/mt/mt84/config.h6
-rw-r--r--keyboards/mxss/mxss_frontled.c2
-rw-r--r--keyboards/mxss/rgblight.c46
-rw-r--r--keyboards/neson_design/700e/700e.c8
-rw-r--r--keyboards/neson_design/700e/config.h6
-rw-r--r--keyboards/neson_design/n6/config.h6
-rw-r--r--keyboards/neson_design/n6/n6.c4
-rw-r--r--keyboards/neson_design/nico/nico.c4
-rwxr-xr-xkeyboards/novelkeys/nk65/config.h2
-rwxr-xr-xkeyboards/novelkeys/nk87/config.h2
-rwxr-xr-xkeyboards/novelkeys/nk_plus/info.json1
-rw-r--r--keyboards/novelkeys/nk_plus/rules.mk5
-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/owlab/voice65/hotswap/config.h4
-rw-r--r--keyboards/owlab/voice65/soldered/config.h4
-rw-r--r--keyboards/phage_studio/pila87/rules.mk4
-rw-r--r--keyboards/planck/ez/config.h4
-rw-r--r--keyboards/planck/light/config.h13
-rw-r--r--keyboards/playkbtw/pk64rgb/config.h4
-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/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/redragon/k667/config.h6
-rw-r--r--keyboards/rgbkb/mun/config.h3
-rw-r--r--keyboards/rgbkb/mun/rev1/info.json5
-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/sirius/uni660/rev1/config.h2
-rw-r--r--keyboards/sirius/uni660/rev2/ansi/config.h2
-rw-r--r--keyboards/sirius/uni660/rev2/iso/config.h2
-rw-r--r--keyboards/smallkeyboard/config.h11
-rw-r--r--keyboards/smithrune/iron165r2/f411/info.json3
-rw-r--r--keyboards/smithrune/iron165r2/f411/rules.mk2
-rwxr-xr-xkeyboards/spaceholdings/nebula12/config.h2
-rwxr-xr-xkeyboards/spaceholdings/nebula68/config.h2
-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/teleport/native/config.h6
-rw-r--r--keyboards/terrazzo/config.h4
-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/portico68v2/config.h4
-rw-r--r--keyboards/tkc/portico75/config.h6
-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/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/viendi8l/info.json3
-rw-r--r--keyboards/viendi8l/rules.mk3
-rw-r--r--keyboards/wilba_tech/rama_works_kara/config.h2
-rw-r--r--keyboards/wilba_tech/rama_works_koyu/config.h2
-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_m50_a/config.h2
-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_m65_b/config.h2
-rw-r--r--keyboards/wilba_tech/rama_works_m65_bx/config.h2
-rw-r--r--keyboards/wilba_tech/rama_works_m6_b/config.h2
-rw-r--r--keyboards/wilba_tech/rama_works_u80_a/config.h2
-rw-r--r--keyboards/wilba_tech/wt60_a/config.h3
-rw-r--r--keyboards/wilba_tech/wt60_b/config.h2
-rw-r--r--keyboards/wilba_tech/wt60_bx/config.h2
-rw-r--r--keyboards/wilba_tech/wt60_c/config.h2
-rw-r--r--keyboards/wilba_tech/wt65_a/config.h3
-rw-r--r--keyboards/wilba_tech/wt65_b/config.h3
-rw-r--r--keyboards/wilba_tech/wt75_a/config.h3
-rw-r--r--keyboards/wilba_tech/wt75_b/config.h3
-rw-r--r--keyboards/wilba_tech/wt75_c/config.h3
-rw-r--r--keyboards/wilba_tech/wt80_a/config.h3
-rw-r--r--keyboards/wilba_tech/wt_rgb_backlight.c73
-rw-r--r--keyboards/wilba_tech/zeal60/config.h2
-rw-r--r--keyboards/wilba_tech/zeal65/config.h2
-rw-r--r--keyboards/work_louder/rgb_functions.c2
-rw-r--r--keyboards/xbows/knight/config.h8
-rw-r--r--keyboards/xbows/knight_plus/config.h8
-rw-r--r--keyboards/xbows/nature/config.h8
-rw-r--r--keyboards/xbows/numpad/config.h4
-rw-r--r--keyboards/xbows/ranger/config.h8
-rw-r--r--keyboards/xbows/woody/config.h6
-rw-r--r--keyboards/xelus/dawn60/rev1/config.h2
-rw-r--r--keyboards/xelus/dawn60/rev1_qmk/config.h6
-rw-r--r--keyboards/xelus/dawn60/rev1_qmk/rev1_qmk.c2
-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/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/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/zykrah/fuyu/config.h2
-rw-r--r--keyboards/zykrah/fuyu/info.json3
-rw-r--r--keyboards/zykrah/fuyu/keymaps/via/keymap.c2
-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--platforms/avr/drivers/ws2812_bitbang.c4
-rw-r--r--platforms/avr/drivers/ws2812_i2c.c4
-rw-r--r--platforms/avr/platform.mk23
-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/chibios_config.h4
-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.c4
-rw-r--r--platforms/chibios/vendors/RP/stage2_bootloaders.c12
-rw-r--r--quantum/color.c2
-rw-r--r--quantum/color.h52
-rw-r--r--quantum/eeconfig.c4
-rw-r--r--quantum/led_matrix/led_matrix_types.h15
-rw-r--r--quantum/painter/lvgl/qp_lvgl.c4
-rw-r--r--quantum/painter/lvgl/qp_lvgl.h4
-rw-r--r--quantum/quantum.h4
-rw-r--r--quantum/rgb_matrix/rgb_matrix.h8
-rw-r--r--quantum/rgb_matrix/rgb_matrix_drivers.c58
-rw-r--r--quantum/rgb_matrix/rgb_matrix_types.h15
-rw-r--r--quantum/rgblight/rgblight.c50
-rw-r--r--quantum/rgblight/rgblight.h8
-rw-r--r--quantum/util.h4
-rw-r--r--readme.md4
-rw-r--r--tmk_core/protocol/host.h3
-rw-r--r--users/curry/rgb_lighting_user.c2
-rw-r--r--users/romus/romus.c20
-rw-r--r--users/xtonhasvim/fancylighting.c4
-rw-r--r--users/xtonhasvim/fancylighting.h2
-rw-r--r--users/zer09/lights.h2
766 files changed, 5637 insertions, 7682 deletions
diff --git a/builddefs/common_features.mk b/builddefs/common_features.mk
index 094eda6fef..58017ad1dd 100644
--- a/builddefs/common_features.mk
+++ b/builddefs/common_features.mk
@@ -347,6 +347,11 @@ ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
endif
endif
+# Deprecated driver names - do not use
+ifeq ($(strip $(LED_MATRIX_DRIVER)), aw20216)
+LED_MATRIX_DRIVER := aw20216s
+endif
+
LED_MATRIX_ENABLE ?= no
VALID_LED_MATRIX_TYPES := is31fl3731 is31fl3742a is31fl3743a is31fl3745 is31fl3746a ckled2001 custom
# TODO: is31fl3733 is31fl3737 is31fl3741
@@ -414,9 +419,14 @@ endif
endif
+# Deprecated driver names - do not use
+ifeq ($(strip $(RGB_MATRIX_DRIVER)), aw20216)
+RGB_MATRIX_DRIVER := aw20216s
+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 ckled2001 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)
@@ -437,13 +447,20 @@ 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)
+ OPT_DEFS += -DAW20216S -DSTM32_SPI -DHAL_USE_SPI=TRUE
COMMON_VPATH += $(DRIVER_PATH)/led
- SRC += aw20216.c
+ SRC += aw20216s.c
QUANTUM_LIB_SRC += spi_master.c
endif
+ ifeq ($(strip $(RGB_MATRIX_DRIVER)), is31fl3218)
+ OPT_DEFS += -DIS31FL3218 -DSTM32_I2C -DHAL_USE_I2C=TRUE
+ COMMON_VPATH += $(DRIVER_PATH)/led/issi
+ SRC += is31fl3218.c
+ QUANTUM_LIB_SRC += i2c_master.c
+ endif
+
ifeq ($(strip $(RGB_MATRIX_DRIVER)), is31fl3731)
OPT_DEFS += -DIS31FL3731 -DSTM32_I2C -DHAL_USE_I2C=TRUE
COMMON_VPATH += $(DRIVER_PATH)/led/issi
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/message.mk b/builddefs/message.mk
index bf39554dab..c7cc5171e7 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
diff --git a/data/mappings/info_config.hjson b/data/mappings/info_config.hjson
index ab9a4a0e45..c3db2e46a2 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"},
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 60c5deaad5..294e7ba094 100644
--- a/data/mappings/keyboard_aliases.hjson
+++ b/data/mappings/keyboard_aliases.hjson
@@ -166,6 +166,9 @@
"dztech/volcano660": {
"target": "ilumkb/volcano660"
},
+ "dztech/og60": {
+ "target": "dztech/tofu60"
+ },
"eek": {
"target": "eek/silk_down"
},
@@ -199,6 +202,9 @@
"handwired/dactyl_manuform/6x6_kinesis": {
"target": "handwired/dactyl_kinesis"
},
+ "handwired/dactyl_manuform/dmote/62key": {
+ "target": "handwired/dmote"
+ },
"handwired/ferris": {
"target": "ferris/0_1"
},
diff --git a/data/schemas/keyboard.jsonschema b/data/schemas/keyboard.jsonschema
index 4053387f3b..1d9b7e7e6a 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": {
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_backlight.md b/docs/feature_backlight.md
index d032c33f18..2f9381e3dc 100644
--- a/docs/feature_backlight.md
+++ b/docs/feature_backlight.md
@@ -39,6 +39,7 @@ Add the following to your `config.h`:
|`BACKLIGHT_LIMIT_VAL` |`255` |The maximum duty cycle of the backlight -- `255` allows for full brightness, any lower will decrease the maximum.|
|`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..e44cc87e32 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)
@@ -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
};
```
diff --git a/docs/feature_oled_driver.md b/docs/feature_oled_driver.md
index f3769742f8..3b6b4e7a1e 100644
--- a/docs/feature_oled_driver.md
+++ b/docs/feature_oled_driver.md
@@ -166,6 +166,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:
@@ -275,7 +311,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,
@@ -283,7 +319,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);
@@ -301,8 +337,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
@@ -333,8 +373,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
@@ -351,6 +389,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
@@ -364,6 +403,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..fe4e1d1ab0 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)
@@ -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)
@@ -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)
@@ -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)
@@ -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
@@ -654,12 +657,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
diff --git a/docs/feature_rgblight.md b/docs/feature_rgblight.md
index 39b7e6a6f1..2bdfe6a7cf 100644
--- a/docs/feature_rgblight.md
+++ b/docs/feature_rgblight.md
@@ -370,9 +370,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.
```
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..c8cb72101e 100644
--- a/docs/reference_info_json.md
+++ b/docs/reference_info_json.md
@@ -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
@@ -523,7 +530,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`, `ckled2001`, `custom`, `is31fl3218`, `is31fl3731`, `is31fl3733`, `is31fl3736`, `is31fl3737`, `is31fl3741`, `is31fl3742a`, `is31fl3743a`, `is31fl3745`, `is31fl3746a`, `ws2812`.
* `hue_steps`
* The number of hue adjustment steps.
* Default: `8`
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
index c4d4c0a4cc..936b915af8 100644
--- a/drivers/led/ckled2001-simple.c
+++ b/drivers/led/ckled2001-simple.c
@@ -16,18 +16,17 @@
#include "ckled2001-simple.h"
#include "i2c_master.h"
-#include "wait.h"
-#ifndef CKLED2001_TIMEOUT
-# define CKLED2001_TIMEOUT 100
+#ifndef CKLED2001_I2C_TIMEOUT
+# define CKLED2001_I2C_TIMEOUT 100
#endif
-#ifndef CKLED2001_PERSISTENCE
-# define CKLED2001_PERSISTENCE 0
+#ifndef CKLED2001_I2C_PERSISTENCE
+# define CKLED2001_I2C_PERSISTENCE 0
#endif
-#ifndef PHASE_CHANNEL
-# define PHASE_CHANNEL MSKPHASE_12CHANNEL
+#ifndef CKLED2001_PHASE_CHANNEL
+# define CKLED2001_PHASE_CHANNEL CKLED2001_MSKPHASE_12CHANNEL
#endif
#ifndef CKLED2001_CURRENT_TUNE
@@ -44,25 +43,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 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_pwm_buffer[CKLED2001_DRIVER_COUNT][192];
+bool g_pwm_buffer_update_required[CKLED2001_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[CKLED2001_DRIVER_COUNT][24] = {0};
+bool g_led_control_registers_update_required[CKLED2001_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) {
+#if CKLED2001_I2C_PERSISTENCE > 0
+ for (uint8_t i = 0; i < CKLED2001_I2C_PERSISTENCE; i++) {
+ if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, CKLED2001_I2C_TIMEOUT) != 0) {
return false;
}
}
#else
- if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, CKLED2001_TIMEOUT) != 0) {
+ if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, CKLED2001_I2C_TIMEOUT) != 0) {
return false;
}
#endif
@@ -85,14 +84,14 @@ bool ckled2001_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer) {
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) {
+#if CKLED2001_I2C_PERSISTENCE > 0
+ for (uint8_t i = 0; i < CKLED2001_I2C_PERSISTENCE; i++) {
+ if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, CKLED2001_I2C_TIMEOUT) != 0) {
return false;
}
}
#else
- if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, CKLED2001_TIMEOUT) != 0) {
+ if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, CKLED2001_I2C_TIMEOUT) != 0) {
return false;
}
#endif
@@ -102,48 +101,48 @@ bool ckled2001_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer) {
void ckled2001_init(uint8_t addr) {
// Select to function page
- ckled2001_write_register(addr, CONFIGURE_CMD_PAGE, FUNCTION_PAGE);
+ ckled2001_write_register(addr, CKLED2001_REG_CONFIGURE_CMD_PAGE, CKLED2001_FUNCTION_PAGE);
// Setting LED driver to shutdown mode
- ckled2001_write_register(addr, CONFIGURATION_REG, MSKSW_SHUT_DOWN_MODE);
+ ckled2001_write_register(addr, CKLED2001_REG_CONFIGURATION, CKLED2001_MSKSW_SHUT_DOWN_MODE);
// Setting internal channel pulldown/pullup
- ckled2001_write_register(addr, PDU_REG, MSKSET_CA_CB_CHANNEL);
+ ckled2001_write_register(addr, CKLED2001_REG_PDU, CKLED2001_MSKSET_CA_CB_CHANNEL);
// Select number of scan phase
- ckled2001_write_register(addr, SCAN_PHASE_REG, PHASE_CHANNEL);
+ ckled2001_write_register(addr, CKLED2001_REG_SCAN_PHASE, CKLED2001_PHASE_CHANNEL);
// Setting PWM Delay Phase
- ckled2001_write_register(addr, SLEW_RATE_CONTROL_MODE1_REG, MSKPWM_DELAY_PHASE_ENABLE);
+ ckled2001_write_register(addr, CKLED2001_REG_SLEW_RATE_CONTROL_MODE1, CKLED2001_MSKPWM_DELAY_PHASE_ENABLE);
// Setting Driving/Sinking Channel Slew Rate
- ckled2001_write_register(addr, SLEW_RATE_CONTROL_MODE2_REG, MSKDRIVING_SINKING_CHHANNEL_SLEWRATE_ENABLE);
+ ckled2001_write_register(addr, CKLED2001_REG_SLEW_RATE_CONTROL_MODE2, CKLED2001_MSKDRIVING_SINKING_CHANNEL_SLEWRATE_ENABLE);
// Setting Iref
- ckled2001_write_register(addr, SOFTWARE_SLEEP_REG, MSKSLEEP_DISABLE);
+ ckled2001_write_register(addr, CKLED2001_REG_SOFTWARE_SLEEP, CKLED2001_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, CKLED2001_REG_CONFIGURE_CMD_PAGE, CKLED2001_LED_CONTROL_PAGE);
+ for (int i = 0; i < CKLED2001_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, CKLED2001_REG_CONFIGURE_CMD_PAGE, CKLED2001_LED_PWM_PAGE);
+ for (int i = 0; i < CKLED2001_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]);
+ uint8_t current_tune_reg_list[CKLED2001_LED_CURRENT_TUNE_LENGTH] = CKLED2001_CURRENT_TUNE;
+ ckled2001_write_register(addr, CKLED2001_REG_CONFIGURE_CMD_PAGE, CKLED2001_CURRENT_TUNE_PAGE);
+ for (int i = 0; i < CKLED2001_LED_CURRENT_TUNE_LENGTH; i++) {
+ ckled2001_write_register(addr, i, current_tune_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, CKLED2001_REG_CONFIGURE_CMD_PAGE, CKLED2001_LED_CONTROL_PAGE);
+ for (int i = 0; i < CKLED2001_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);
+ ckled2001_write_register(addr, CKLED2001_REG_CONFIGURE_CMD_PAGE, CKLED2001_FUNCTION_PAGE);
// Setting LED driver to normal mode
- ckled2001_write_register(addr, CONFIGURATION_REG, MSKSW_NORMAL_MODE);
+ ckled2001_write_register(addr, CKLED2001_REG_CONFIGURATION, CKLED2001_MSKSW_NORMAL_MODE);
}
void ckled2001_set_value(int index, uint8_t value) {
@@ -183,7 +182,7 @@ void ckled2001_set_led_control_register(uint8_t index, bool value) {
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);
+ ckled2001_write_register(addr, CKLED2001_REG_CONFIGURE_CMD_PAGE, CKLED2001_LED_PWM_PAGE);
// If any of the transactions fail we risk writing dirty PG0,
// refresh page 0 just in case.
@@ -196,7 +195,7 @@ void ckled2001_update_pwm_buffers(uint8_t addr, uint8_t index) {
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);
+ ckled2001_write_register(addr, CKLED2001_REG_CONFIGURE_CMD_PAGE, CKLED2001_LED_CONTROL_PAGE);
for (int i = 0; i < 24; i++) {
ckled2001_write_register(addr, i, g_led_control_registers[index][i]);
}
@@ -206,16 +205,16 @@ void ckled2001_update_led_control_registers(uint8_t addr, uint8_t index) {
void ckled2001_sw_return_normal(uint8_t addr) {
// Select to function page
- ckled2001_write_register(addr, CONFIGURE_CMD_PAGE, FUNCTION_PAGE);
+ ckled2001_write_register(addr, CKLED2001_REG_CONFIGURE_CMD_PAGE, CKLED2001_FUNCTION_PAGE);
// Setting LED driver to normal mode
- ckled2001_write_register(addr, CONFIGURATION_REG, MSKSW_NORMAL_MODE);
+ ckled2001_write_register(addr, CKLED2001_REG_CONFIGURATION, CKLED2001_MSKSW_NORMAL_MODE);
}
void ckled2001_sw_shutdown(uint8_t addr) {
// Select to function page
- ckled2001_write_register(addr, CONFIGURE_CMD_PAGE, FUNCTION_PAGE);
+ ckled2001_write_register(addr, CKLED2001_REG_CONFIGURE_CMD_PAGE, CKLED2001_FUNCTION_PAGE);
// Setting LED driver to shutdown mode
- ckled2001_write_register(addr, CONFIGURATION_REG, MSKSW_SHUT_DOWN_MODE);
+ ckled2001_write_register(addr, CKLED2001_REG_CONFIGURATION, CKLED2001_MSKSW_SHUT_DOWN_MODE);
// Write SW Sleep Register
- ckled2001_write_register(addr, SOFTWARE_SLEEP_REG, MSKSLEEP_ENABLE);
+ ckled2001_write_register(addr, CKLED2001_REG_SOFTWARE_SLEEP, CKLED2001_MSKSLEEP_ENABLE);
}
diff --git a/drivers/led/ckled2001-simple.h b/drivers/led/ckled2001-simple.h
index c94df62dd2..1080da34c2 100644
--- a/drivers/led/ckled2001-simple.h
+++ b/drivers/led/ckled2001-simple.h
@@ -20,6 +20,39 @@
#include <stdbool.h>
#include "progmem.h"
+// ======== DEPRECATED DEFINES - DO NOT USE ========
+#ifdef DRIVER_COUNT
+# define CKLED2001_DRIVER_COUNT DRIVER_COUNT
+#endif
+#ifdef CKLED2001_TIMEOUT
+# define CKLED2001_I2C_TIMEOUT CKLED2001_TIMEOUT
+#endif
+#ifdef CKLED2001_PERSISTENCE
+# define CKLED2001_I2C_PERSISTENCE CKLED2001_PERSISTENCE
+#endif
+#ifdef PHASE_CHANNEL
+# define CKLED2001_PHASE_CHANNEL PHASE_CHANNEL
+#endif
+
+#define MSKPHASE_12CHANNEL CKLED2001_MSKPHASE_12CHANNEL
+#define MSKPHASE_11CHANNEL CKLED2001_MSKPHASE_11CHANNEL
+#define MSKPHASE_10CHANNEL CKLED2001_MSKPHASE_10CHANNEL
+#define MSKPHASE_9CHANNEL CKLED2001_MSKPHASE_9CHANNEL
+#define MSKPHASE_8CHANNEL CKLED2001_MSKPHASE_8CHANNEL
+#define MSKPHASE_7CHANNEL CKLED2001_MSKPHASE_7CHANNEL
+#define MSKPHASE_6CHANNEL CKLED2001_MSKPHASE_6CHANNEL
+#define MSKPHASE_5CHANNEL CKLED2001_MSKPHASE_5CHANNEL
+#define MSKPHASE_4CHANNEL CKLED2001_MSKPHASE_4CHANNEL
+#define MSKPHASE_3CHANNEL CKLED2001_MSKPHASE_3CHANNEL
+#define MSKPHASE_2CHANNEL CKLED2001_MSKPHASE_2CHANNEL
+#define MSKPHASE_1CHANNEL CKLED2001_MSKPHASE_1CHANNEL
+// ========
+
+#define CKLED2001_I2C_ADDRESS_GND 0x74
+#define CKLED2001_I2C_ADDRESS_SCL 0x75
+#define CKLED2001_I2C_ADDRESS_SDA 0x76
+#define CKLED2001_I2C_ADDRESS_VDDIO 0x77
+
typedef struct ckled2001_led {
uint8_t driver : 2;
uint8_t v;
@@ -47,90 +80,90 @@ 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
+#define CKLED2001_REG_CONFIGURE_CMD_PAGE 0xFD
+#define CKLED2001_LED_CONTROL_PAGE 0x00
+#define CKLED2001_LED_PWM_PAGE 0x01
+#define CKLED2001_FUNCTION_PAGE 0x03
+#define CKLED2001_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
+#define CKLED2001_REG_CONFIGURATION 0x00
+#define CKLED2001_MSKSW_SHUT_DOWN_MODE (0x0 << 0)
+#define CKLED2001_MSKSW_NORMAL_MODE (0x1 << 0)
+
+#define CKLED2001_REG_DRIVER_ID 0x11
+#define CKLED2001_DRIVER_ID 0x8A
+
+#define CKLED2001_REG_PDU 0x13
+#define CKLED2001_MSKSET_CA_CB_CHANNEL 0xAA
+#define CKLED2001_MSKCLR_CA_CB_CHANNEL 0x00
+
+#define CKLED2001_REG_SCAN_PHASE 0x14
+#define CKLED2001_MSKPHASE_12CHANNEL 0x00
+#define CKLED2001_MSKPHASE_11CHANNEL 0x01
+#define CKLED2001_MSKPHASE_10CHANNEL 0x02
+#define CKLED2001_MSKPHASE_9CHANNEL 0x03
+#define CKLED2001_MSKPHASE_8CHANNEL 0x04
+#define CKLED2001_MSKPHASE_7CHANNEL 0x05
+#define CKLED2001_MSKPHASE_6CHANNEL 0x06
+#define CKLED2001_MSKPHASE_5CHANNEL 0x07
+#define CKLED2001_MSKPHASE_4CHANNEL 0x08
+#define CKLED2001_MSKPHASE_3CHANNEL 0x09
+#define CKLED2001_MSKPHASE_2CHANNEL 0x0A
+#define CKLED2001_MSKPHASE_1CHANNEL 0x0B
+
+#define CKLED2001_REG_SLEW_RATE_CONTROL_MODE1 0x15
+#define CKLED2001_MSKPWM_DELAY_PHASE_ENABLE 0x04
+#define CKLED2001_MSKPWM_DELAY_PHASE_DISABLE 0x00
+
+#define CKLED2001_REG_SLEW_RATE_CONTROL_MODE2 0x16
+#define CKLED2001_MSKDRIVING_SINKING_CHANNEL_SLEWRATE_ENABLE 0xC0
+#define CKLED2001_MSKDRIVING_SINKING_CHANNEL_SLEWRATE_DISABLE 0x00
+
+#define CKLED2001_REG_OPEN_SHORT_ENABLE 0x17
+#define CKLED2001_MSKOPEN_DETECTION_ENABLE (0x01 << 7)
+#define CKLED2001_MSKOPEN_DETECTION_DISABLE (0x00)
+
+#define CKLED2001_MSKSHORT_DETECTION_ENABLE (0x01 << 6)
+#define CKLED2001_MSKSHORT_DETECTION_DISABLE (0x00)
+
+#define CKLED2001_REG_OPEN_SHORT_DUTY 0x18
+#define CKLED2001_REG_OPEN_SHORT_FLAG 0x19
+
+#define CKLED2001_MSKOPEN_DETECTION_INTERRUPT_ENABLE (0x01 << 7)
+#define CKLED2001_MSKOPEN_DETECTION_INTERRUPT_DISABLE (0x00)
+
+#define CKLED2001_MSKSHORT_DETECTION_INTERRUPT_ENABLE (0x01 << 6)
+#define CKLED2001_MSKSHORT_DETECTION_INTERRUPT_DISABLE (0x00)
+
+#define CKLED2001_REG_SOFTWARE_SLEEP 0x1A
+#define CKLED2001_MSKSLEEP_ENABLE 0x02
+#define CKLED2001_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 CKLED2001_LED_CONTROL_ON_OFF_FIRST_ADDR 0x0
+#define CKLED2001_LED_CONTROL_ON_OFF_LAST_ADDR 0x17
+#define CKLED2001_LED_CONTROL_ON_OFF_LENGTH ((CKLED2001_LED_CONTROL_ON_OFF_LAST_ADDR - CKLED2001_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 CKLED2001_LED_CONTROL_OPEN_FIRST_ADDR 0x18
+#define CKLED2001_LED_CONTROL_OPEN_LAST_ADDR 0x2F
+#define CKLED2001_LED_CONTROL_OPEN_LENGTH ((CKLED2001_LED_CONTROL_OPEN_LAST_ADDR - CKLED2001_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 CKLED2001_LED_CONTROL_SHORT_FIRST_ADDR 0x30
+#define CKLED2001_LED_CONTROL_SHORT_LAST_ADDR 0x47
+#define CKLED2001_LED_CONTROL_SHORT_LENGTH ((CKLED2001_LED_CONTROL_SHORT_LAST_ADDR - CKLED2001_LED_CONTROL_SHORT_FIRST_ADDR) + 1)
-#define LED_CONTROL_PAGE_LENGTH 0x48
+#define CKLED2001_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
+#define CKLED2001_LED_PWM_FIRST_ADDR 0x00
+#define CKLED2001_LED_PWM_LAST_ADDR 0xBF
+#define CKLED2001_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 CKLED2001_LED_CURRENT_TUNE_FIRST_ADDR 0x00
+#define CKLED2001_LED_CURRENT_TUNE_LAST_ADDR 0x0B
+#define CKLED2001_LED_CURRENT_TUNE_LENGTH 0x0C
#define A_1 0x00
#define A_2 0x01
@@ -334,4 +367,4 @@ void ckled2001_sw_shutdown(uint8_t addr);
#define L_13 0xBC
#define L_14 0xBD
#define L_15 0xBE
-#define L_16 0xBF \ No newline at end of file
+#define L_16 0xBF
diff --git a/drivers/led/ckled2001.c b/drivers/led/ckled2001.c
index 6ababf55e9..8340aae823 100644
--- a/drivers/led/ckled2001.c
+++ b/drivers/led/ckled2001.c
@@ -16,18 +16,17 @@
#include "ckled2001.h"
#include "i2c_master.h"
-#include "wait.h"
-#ifndef CKLED2001_TIMEOUT
-# define CKLED2001_TIMEOUT 100
+#ifndef CKLED2001_I2C_TIMEOUT
+# define CKLED2001_I2C_TIMEOUT 100
#endif
-#ifndef CKLED2001_PERSISTENCE
-# define CKLED2001_PERSISTENCE 0
+#ifndef CKLED2001_I2C_PERSISTENCE
+# define CKLED2001_I2C_PERSISTENCE 0
#endif
-#ifndef PHASE_CHANNEL
-# define PHASE_CHANNEL MSKPHASE_12CHANNEL
+#ifndef CKLED2001_PHASE_CHANNEL
+# define CKLED2001_PHASE_CHANNEL CKLED2001_MSKPHASE_12CHANNEL
#endif
#ifndef CKLED2001_CURRENT_TUNE
@@ -44,25 +43,25 @@ uint8_t g_twi_transfer_buffer[65];
// 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_pwm_buffer[CKLED2001_DRIVER_COUNT][192];
+bool g_pwm_buffer_update_required[CKLED2001_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[CKLED2001_DRIVER_COUNT][24] = {0};
+bool g_led_control_registers_update_required[CKLED2001_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) {
+#if CKLED2001_I2C_PERSISTENCE > 0
+ for (uint8_t i = 0; i < CKLED2001_I2C_PERSISTENCE; i++) {
+ if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, CKLED2001_I2C_TIMEOUT) != 0) {
return false;
}
}
#else
- if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, CKLED2001_TIMEOUT) != 0) {
+ if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, CKLED2001_I2C_TIMEOUT) != 0) {
return false;
}
#endif
@@ -84,14 +83,14 @@ bool ckled2001_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer) {
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) {
+#if CKLED2001_I2C_PERSISTENCE > 0
+ for (uint8_t i = 0; i < CKLED2001_I2C_PERSISTENCE; i++) {
+ if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 65, CKLED2001_I2C_TIMEOUT) != 0) {
return false;
}
}
#else
- if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 65, CKLED2001_TIMEOUT) != 0) {
+ if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 65, CKLED2001_I2C_TIMEOUT) != 0) {
return false;
}
#endif
@@ -101,48 +100,48 @@ bool ckled2001_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer) {
void ckled2001_init(uint8_t addr) {
// Select to function page
- ckled2001_write_register(addr, CONFIGURE_CMD_PAGE, FUNCTION_PAGE);
+ ckled2001_write_register(addr, CKLED2001_REG_CONFIGURE_CMD_PAGE, CKLED2001_FUNCTION_PAGE);
// Setting LED driver to shutdown mode
- ckled2001_write_register(addr, CONFIGURATION_REG, MSKSW_SHUT_DOWN_MODE);
+ ckled2001_write_register(addr, CKLED2001_REG_CONFIGURATION, CKLED2001_MSKSW_SHUT_DOWN_MODE);
// Setting internal channel pulldown/pullup
- ckled2001_write_register(addr, PDU_REG, MSKSET_CA_CB_CHANNEL);
+ ckled2001_write_register(addr, CKLED2001_REG_PDU, CKLED2001_MSKSET_CA_CB_CHANNEL);
// Select number of scan phase
- ckled2001_write_register(addr, SCAN_PHASE_REG, PHASE_CHANNEL);
+ ckled2001_write_register(addr, CKLED2001_REG_SCAN_PHASE, CKLED2001_PHASE_CHANNEL);
// Setting PWM Delay Phase
- ckled2001_write_register(addr, SLEW_RATE_CONTROL_MODE1_REG, MSKPWM_DELAY_PHASE_ENABLE);
+ ckled2001_write_register(addr, CKLED2001_REG_SLEW_RATE_CONTROL_MODE1, CKLED2001_MSKPWM_DELAY_PHASE_ENABLE);
// Setting Driving/Sinking Channel Slew Rate
- ckled2001_write_register(addr, SLEW_RATE_CONTROL_MODE2_REG, MSKDRIVING_SINKING_CHHANNEL_SLEWRATE_ENABLE);
+ ckled2001_write_register(addr, CKLED2001_REG_SLEW_RATE_CONTROL_MODE2, CKLED2001_MSKDRIVING_SINKING_CHANNEL_SLEWRATE_ENABLE);
// Setting Iref
- ckled2001_write_register(addr, SOFTWARE_SLEEP_REG, MSKSLEEP_DISABLE);
+ ckled2001_write_register(addr, CKLED2001_REG_SOFTWARE_SLEEP, CKLED2001_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, CKLED2001_REG_CONFIGURE_CMD_PAGE, CKLED2001_LED_CONTROL_PAGE);
+ for (int i = 0; i < CKLED2001_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, CKLED2001_REG_CONFIGURE_CMD_PAGE, CKLED2001_LED_PWM_PAGE);
+ for (int i = 0; i < CKLED2001_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]);
+ uint8_t current_tune_reg_list[CKLED2001_LED_CURRENT_TUNE_LENGTH] = CKLED2001_CURRENT_TUNE;
+ ckled2001_write_register(addr, CKLED2001_REG_CONFIGURE_CMD_PAGE, CKLED2001_CURRENT_TUNE_PAGE);
+ for (int i = 0; i < CKLED2001_LED_CURRENT_TUNE_LENGTH; i++) {
+ ckled2001_write_register(addr, i, current_tune_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, CKLED2001_REG_CONFIGURE_CMD_PAGE, CKLED2001_LED_CONTROL_PAGE);
+ for (int i = 0; i < CKLED2001_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);
+ ckled2001_write_register(addr, CKLED2001_REG_CONFIGURE_CMD_PAGE, CKLED2001_FUNCTION_PAGE);
// Setting LED driver to normal mode
- ckled2001_write_register(addr, CONFIGURATION_REG, MSKSW_NORMAL_MODE);
+ ckled2001_write_register(addr, CKLED2001_REG_CONFIGURATION, CKLED2001_MSKSW_NORMAL_MODE);
}
void ckled2001_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) {
@@ -198,7 +197,7 @@ void ckled2001_set_led_control_register(uint8_t index, bool red, bool green, boo
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);
+ ckled2001_write_register(addr, CKLED2001_REG_CONFIGURE_CMD_PAGE, CKLED2001_LED_PWM_PAGE);
// If any of the transactions fail we risk writing dirty PG0,
// refresh page 0 just in case.
@@ -211,7 +210,7 @@ void ckled2001_update_pwm_buffers(uint8_t addr, uint8_t index) {
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);
+ ckled2001_write_register(addr, CKLED2001_REG_CONFIGURE_CMD_PAGE, CKLED2001_LED_CONTROL_PAGE);
for (int i = 0; i < 24; i++) {
ckled2001_write_register(addr, i, g_led_control_registers[index][i]);
}
@@ -221,16 +220,16 @@ void ckled2001_update_led_control_registers(uint8_t addr, uint8_t index) {
void ckled2001_sw_return_normal(uint8_t addr) {
// Select to function page
- ckled2001_write_register(addr, CONFIGURE_CMD_PAGE, FUNCTION_PAGE);
+ ckled2001_write_register(addr, CKLED2001_REG_CONFIGURE_CMD_PAGE, CKLED2001_FUNCTION_PAGE);
// Setting LED driver to normal mode
- ckled2001_write_register(addr, CONFIGURATION_REG, MSKSW_NORMAL_MODE);
+ ckled2001_write_register(addr, CKLED2001_REG_CONFIGURATION, CKLED2001_MSKSW_NORMAL_MODE);
}
void ckled2001_sw_shutdown(uint8_t addr) {
// Select to function page
- ckled2001_write_register(addr, CONFIGURE_CMD_PAGE, FUNCTION_PAGE);
+ ckled2001_write_register(addr, CKLED2001_REG_CONFIGURE_CMD_PAGE, CKLED2001_FUNCTION_PAGE);
// Setting LED driver to shutdown mode
- ckled2001_write_register(addr, CONFIGURATION_REG, MSKSW_SHUT_DOWN_MODE);
+ ckled2001_write_register(addr, CKLED2001_REG_CONFIGURATION, CKLED2001_MSKSW_SHUT_DOWN_MODE);
// Write SW Sleep Register
- ckled2001_write_register(addr, SOFTWARE_SLEEP_REG, MSKSLEEP_ENABLE);
+ ckled2001_write_register(addr, CKLED2001_REG_SOFTWARE_SLEEP, CKLED2001_MSKSLEEP_ENABLE);
}
diff --git a/drivers/led/ckled2001.h b/drivers/led/ckled2001.h
index 32da137fb7..257efbb6a1 100644
--- a/drivers/led/ckled2001.h
+++ b/drivers/led/ckled2001.h
@@ -20,6 +20,39 @@
#include <stdbool.h>
#include "progmem.h"
+// ======== DEPRECATED DEFINES - DO NOT USE ========
+#ifdef DRIVER_COUNT
+# define CKLED2001_DRIVER_COUNT DRIVER_COUNT
+#endif
+#ifdef CKLED2001_TIMEOUT
+# define CKLED2001_I2C_TIMEOUT CKLED2001_TIMEOUT
+#endif
+#ifdef CKLED2001_PERSISTENCE
+# define CKLED2001_I2C_PERSISTENCE CKLED2001_PERSISTENCE
+#endif
+#ifdef PHASE_CHANNEL
+# define CKLED2001_PHASE_CHANNEL PHASE_CHANNEL
+#endif
+
+#define MSKPHASE_12CHANNEL CKLED2001_MSKPHASE_12CHANNEL
+#define MSKPHASE_11CHANNEL CKLED2001_MSKPHASE_11CHANNEL
+#define MSKPHASE_10CHANNEL CKLED2001_MSKPHASE_10CHANNEL
+#define MSKPHASE_9CHANNEL CKLED2001_MSKPHASE_9CHANNEL
+#define MSKPHASE_8CHANNEL CKLED2001_MSKPHASE_8CHANNEL
+#define MSKPHASE_7CHANNEL CKLED2001_MSKPHASE_7CHANNEL
+#define MSKPHASE_6CHANNEL CKLED2001_MSKPHASE_6CHANNEL
+#define MSKPHASE_5CHANNEL CKLED2001_MSKPHASE_5CHANNEL
+#define MSKPHASE_4CHANNEL CKLED2001_MSKPHASE_4CHANNEL
+#define MSKPHASE_3CHANNEL CKLED2001_MSKPHASE_3CHANNEL
+#define MSKPHASE_2CHANNEL CKLED2001_MSKPHASE_2CHANNEL
+#define MSKPHASE_1CHANNEL CKLED2001_MSKPHASE_1CHANNEL
+// ========
+
+#define CKLED2001_I2C_ADDRESS_GND 0x74
+#define CKLED2001_I2C_ADDRESS_SCL 0x75
+#define CKLED2001_I2C_ADDRESS_SDA 0x76
+#define CKLED2001_I2C_ADDRESS_VDDIO 0x77
+
typedef struct ckled2001_led {
uint8_t driver : 2;
uint8_t r;
@@ -49,90 +82,90 @@ 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
+#define CKLED2001_REG_CONFIGURE_CMD_PAGE 0xFD
+#define CKLED2001_LED_CONTROL_PAGE 0x00
+#define CKLED2001_LED_PWM_PAGE 0x01
+#define CKLED2001_FUNCTION_PAGE 0x03
+#define CKLED2001_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
+#define CKLED2001_REG_CONFIGURATION 0x00
+#define CKLED2001_MSKSW_SHUT_DOWN_MODE (0x0 << 0)
+#define CKLED2001_MSKSW_NORMAL_MODE (0x1 << 0)
+
+#define CKLED2001_REG_DRIVER_ID 0x11
+#define CKLED2001_DRIVER_ID 0x8A
+
+#define CKLED2001_REG_PDU 0x13
+#define CKLED2001_MSKSET_CA_CB_CHANNEL 0xAA
+#define CKLED2001_MSKCLR_CA_CB_CHANNEL 0x00
+
+#define CKLED2001_REG_SCAN_PHASE 0x14
+#define CKLED2001_MSKPHASE_12CHANNEL 0x00
+#define CKLED2001_MSKPHASE_11CHANNEL 0x01
+#define CKLED2001_MSKPHASE_10CHANNEL 0x02
+#define CKLED2001_MSKPHASE_9CHANNEL 0x03
+#define CKLED2001_MSKPHASE_8CHANNEL 0x04
+#define CKLED2001_MSKPHASE_7CHANNEL 0x05
+#define CKLED2001_MSKPHASE_6CHANNEL 0x06
+#define CKLED2001_MSKPHASE_5CHANNEL 0x07
+#define CKLED2001_MSKPHASE_4CHANNEL 0x08
+#define CKLED2001_MSKPHASE_3CHANNEL 0x09
+#define CKLED2001_MSKPHASE_2CHANNEL 0x0A
+#define CKLED2001_MSKPHASE_1CHANNEL 0x0B
+
+#define CKLED2001_REG_SLEW_RATE_CONTROL_MODE1 0x15
+#define CKLED2001_MSKPWM_DELAY_PHASE_ENABLE 0x04
+#define CKLED2001_MSKPWM_DELAY_PHASE_DISABLE 0x00
+
+#define CKLED2001_REG_SLEW_RATE_CONTROL_MODE2 0x16
+#define CKLED2001_MSKDRIVING_SINKING_CHANNEL_SLEWRATE_ENABLE 0xC0
+#define CKLED2001_MSKDRIVING_SINKING_CHANNEL_SLEWRATE_DISABLE 0x00
+
+#define CKLED2001_REG_OPEN_SHORT_ENABLE 0x17
+#define CKLED2001_MSKOPEN_DETECTION_ENABLE (0x01 << 7)
+#define CKLED2001_MSKOPEN_DETECTION_DISABLE (0x00)
+
+#define CKLED2001_MSKSHORT_DETECTION_ENABLE (0x01 << 6)
+#define CKLED2001_MSKSHORT_DETECTION_DISABLE (0x00)
+
+#define CKLED2001_REG_OPEN_SHORT_DUTY 0x18
+#define CKLED2001_REG_OPEN_SHORT_FLAG 0x19
+
+#define CKLED2001_MSKOPEN_DETECTION_INTERRUPT_ENABLE (0x01 << 7)
+#define CKLED2001_MSKOPEN_DETECTION_INTERRUPT_DISABLE (0x00)
+
+#define CKLED2001_MSKSHORT_DETECTION_INTERRUPT_ENABLE (0x01 << 6)
+#define CKLED2001_MSKSHORT_DETECTION_INTERRUPT_DISABLE (0x00)
+
+#define CKLED2001_REG_SOFTWARE_SLEEP 0x1A
+#define CKLED2001_MSKSLEEP_ENABLE 0x02
+#define CKLED2001_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 CKLED2001_LED_CONTROL_ON_OFF_FIRST_ADDR 0x0
+#define CKLED2001_LED_CONTROL_ON_OFF_LAST_ADDR 0x17
+#define CKLED2001_LED_CONTROL_ON_OFF_LENGTH ((CKLED2001_LED_CONTROL_ON_OFF_LAST_ADDR - CKLED2001_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 CKLED2001_LED_CONTROL_OPEN_FIRST_ADDR 0x18
+#define CKLED2001_LED_CONTROL_OPEN_LAST_ADDR 0x2F
+#define CKLED2001_LED_CONTROL_OPEN_LENGTH ((CKLED2001_LED_CONTROL_OPEN_LAST_ADDR - CKLED2001_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 CKLED2001_LED_CONTROL_SHORT_FIRST_ADDR 0x30
+#define CKLED2001_LED_CONTROL_SHORT_LAST_ADDR 0x47
+#define CKLED2001_LED_CONTROL_SHORT_LENGTH ((CKLED2001_LED_CONTROL_SHORT_LAST_ADDR - CKLED2001_LED_CONTROL_SHORT_FIRST_ADDR) + 1)
-#define LED_CONTROL_PAGE_LENGTH 0x48
+#define CKLED2001_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
+#define CKLED2001_LED_PWM_FIRST_ADDR 0x00
+#define CKLED2001_LED_PWM_LAST_ADDR 0xBF
+#define CKLED2001_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 CKLED2001_LED_CURRENT_TUNE_FIRST_ADDR 0x00
+#define CKLED2001_LED_CURRENT_TUNE_LAST_ADDR 0x0B
+#define CKLED2001_LED_CURRENT_TUNE_LENGTH 0x0C
#define A_1 0x00
#define A_2 0x01
@@ -336,4 +369,4 @@ void ckled2001_sw_shutdown(uint8_t addr);
#define L_13 0xBC
#define L_14 0xBD
#define L_15 0xBE
-#define L_16 0xBF \ No newline at end of file
+#define L_16 0xBF
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..19bbc73d12 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,20 +58,20 @@ 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};
+uint8_t g_pwm_buffer[IS31FL3731_DRIVER_COUNT][144];
+bool g_pwm_buffer_update_required[IS31FL3731_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}};
+#if IS31FL3731_DRIVER_COUNT == 1
+uint8_t g_led_control_registers[IS31FL3731_DRIVER_COUNT][18] = {{0}};
+#elif IS31FL3731_DRIVER_COUNT == 2
+uint8_t g_led_control_registers[IS31FL3731_DRIVER_COUNT][18] = {{0}, {0}};
+#elif IS31FL3731_DRIVER_COUNT == 3
+uint8_t g_led_control_registers[IS31FL3731_DRIVER_COUNT][18] = {{0}, {0}, {0}};
+#elif IS31FL3731_DRIVER_COUNT == 4
+uint8_t g_led_control_registers[IS31FL3731_DRIVER_COUNT][18] = {{0}, {0}, {0}, {0}};
#endif
-bool g_led_control_registers_update_required[LED_DRIVER_COUNT] = {false};
+bool g_led_control_registers_update_required[IS31FL3731_DRIVER_COUNT] = {false};
// This is the bit pattern in the LED control registers
// (for matrix A, add one to register for matrix B)
@@ -99,14 +91,14 @@ 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 +117,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 +134,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,15 +171,15 @@ 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) {
diff --git a/drivers/led/issi/is31fl3731-simple.h b/drivers/led/issi/is31fl3731-simple.h
index 69fba14a0b..e6c9ce37c5 100644
--- a/drivers/led/issi/is31fl3731-simple.h
+++ b/drivers/led/issi/is31fl3731-simple.h
@@ -20,9 +20,28 @@
#include <stdint.h>
#include <stdbool.h>
-#include <string.h>
#include "progmem.h"
+// ======== 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 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 is31_led {
uint8_t driver : 2;
uint8_t v;
diff --git a/drivers/led/issi/is31fl3731.c b/drivers/led/issi/is31fl3731.c
index 15a01b6d75..2123438a5f 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,11 +57,11 @@ 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_pwm_buffer[IS31FL3731_DRIVER_COUNT][144];
+bool g_pwm_buffer_update_required[IS31FL3731_DRIVER_COUNT] = {false};
-uint8_t g_led_control_registers[DRIVER_COUNT][18] = {{0}};
-bool g_led_control_registers_update_required[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};
// This is the bit pattern in the LED control registers
// (for matrix A, add one to register for matrix B)
@@ -89,12 +81,12 @@ 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 +105,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 +122,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,15 +159,15 @@ 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) {
diff --git a/drivers/led/issi/is31fl3731.h b/drivers/led/issi/is31fl3731.h
index bdf03de1ee..ccd972a03e 100644
--- a/drivers/led/issi/is31fl3731.h
+++ b/drivers/led/issi/is31fl3731.h
@@ -19,9 +19,28 @@
#include <stdint.h>
#include <stdbool.h>
-#include <string.h>
#include "progmem.h"
+// ======== 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 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 is31_led {
uint8_t driver : 2;
uint8_t r;
diff --git a/drivers/led/issi/is31fl3733-simple.c b/drivers/led/issi/is31fl3733-simple.c
index f9a0a271a8..514d9e366d 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,34 @@ 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};
+uint8_t g_pwm_buffer[IS31FL3733_DRIVER_COUNT][192];
+bool g_pwm_buffer_update_required[IS31FL3733_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}};
+#if IS31FL3733_DRIVER_COUNT == 1
+uint8_t g_led_control_registers[IS31FL3733_DRIVER_COUNT][24] = {{0}};
+#elif IS31FL3733_DRIVER_COUNT == 2
+uint8_t g_led_control_registers[IS31FL3733_DRIVER_COUNT][24] = {{0}, {0}};
+#elif IS31FL3733_DRIVER_COUNT == 3
+uint8_t g_led_control_registers[IS31FL3733_DRIVER_COUNT][24] = {{0}, {0}, {0}};
+#elif IS31FL3733_DRIVER_COUNT == 4
+uint8_t g_led_control_registers[IS31FL3733_DRIVER_COUNT][24] = {{0}, {0}, {0}, {0}};
#endif
-bool g_led_control_registers_update_required[LED_DRIVER_COUNT] = {false};
+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 +120,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 +143,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,18 +164,18 @@ 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);
@@ -230,8 +219,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 +234,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..b870c5c58c 100644
--- a/drivers/led/issi/is31fl3733-simple.h
+++ b/drivers/led/issi/is31fl3733-simple.h
@@ -22,9 +22,57 @@
#include <stdint.h>
#include <stdbool.h>
-#include <string.h>
#include "progmem.h"
+// ======== 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 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 is31_led {
uint8_t driver : 2;
uint8_t v;
@@ -48,13 +96,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..e501175a11 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,18 +154,18 @@ 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);
@@ -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..e16560807f 100644
--- a/drivers/led/issi/is31fl3733.h
+++ b/drivers/led/issi/is31fl3733.h
@@ -23,6 +23,55 @@
#include <stdbool.h>
#include "progmem.h"
+// ======== 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 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 is31_led {
uint8_t driver : 2;
uint8_t r;
@@ -48,13 +97,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.c b/drivers/led/issi/is31fl3736.c
index 0de8b3bbae..7f50411f1f 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}, {0}};
+bool g_led_control_registers_update_required = 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,18 +140,18 @@ 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);
@@ -266,19 +259,19 @@ void is31fl3736_mono_set_led_control_register(uint8_t index, bool enabled) {
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) {
// 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(addr1, IS31FL3736_COMMANDREGISTER_WRITELOCK, 0xC5);
+ is31fl3736_write_register(addr1, 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]);
diff --git a/drivers/led/issi/is31fl3736.h b/drivers/led/issi/is31fl3736.h
index 32bdef4a80..baf200f8ad 100644
--- a/drivers/led/issi/is31fl3736.h
+++ b/drivers/led/issi/is31fl3736.h
@@ -19,19 +19,54 @@
#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
+
+#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 is31_led {
uint8_t driver : 2;
@@ -62,14 +97,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.c b/drivers/led/issi/is31fl3737.c
index 947c0a1d1a..3d93548a46 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,18 +143,18 @@ 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);
@@ -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..2d6612b704 100644
--- a/drivers/led/issi/is31fl3737.h
+++ b/drivers/led/issi/is31fl3737.h
@@ -21,9 +21,46 @@
#include <stdint.h>
#include <stdbool.h>
-#include <string.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 is31_led {
uint8_t driver : 2;
uint8_t r;
@@ -49,14 +86,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.c b/drivers/led/issi/is31fl3741.c
index 70671c2a40..f34e0b87a1 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);
@@ -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]);
}
@@ -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) {
diff --git a/drivers/led/issi/is31fl3741.h b/drivers/led/issi/is31fl3741.h
index 4ae84dc3c6..65f8af98c8 100644
--- a/drivers/led/issi/is31fl3741.h
+++ b/drivers/led/issi/is31fl3741.h
@@ -23,6 +23,44 @@
#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 is31_led {
uint32_t driver : 2;
uint32_t r : 10;
@@ -51,14 +89,19 @@ void is31fl3741_set_scaling_registers(const is31_led *pled, uint8_t red, uint8_t
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
+#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/oled/oled_driver.c b/drivers/oled/oled_driver.c
index 8ff6e0426c..ab04ff3d40 100644
--- a/drivers/oled/oled_driver.c
+++ b/drivers/oled/oled_driver.c
@@ -448,7 +448,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) {
@@ -460,7 +460,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 627a3da0ba..fba6633176 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/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/4pplet/eagle_viper_rep/rev_a/config.h b/keyboards/4pplet/eagle_viper_rep/rev_a/config.h
index 9bec945f24..7b89744ff2 100644
--- a/keyboards/4pplet/eagle_viper_rep/rev_a/config.h
+++ b/keyboards/4pplet/eagle_viper_rep/rev_a/config.h
@@ -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 4be993daea..167051ca94 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/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/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/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/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/akko/5108/config.h b/keyboards/akko/5108/config.h
index f56e825e05..a50041ccc9 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,10 +32,9 @@
#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 IS31FL3733_DRIVER_COUNT 2
#define DRIVER_ADDR_1 0b1110100
#define DRIVER_ADDR_2 0b1110111
#define I2C1_SCL_PAL_MODE 4
diff --git a/keyboards/akko/5108/info.json b/keyboards/akko/5108/info.json
index 7049b20a64..93e73f3cd3 100644
--- a/keyboards/akko/5108/info.json
+++ b/keyboards/akko/5108/info.json
@@ -26,6 +26,16 @@
"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"
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/config.h b/keyboards/akko/acr87/config.h
index 221cad86ad..6afa413552 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,10 +29,9 @@
#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 IS31FL3733_DRIVER_COUNT 3
#define DRIVER_ADDR_1 0b1110100
#define DRIVER_ADDR_2 0b1110111
#define DRIVER_ADDR_3 0b1110110
diff --git a/keyboards/akko/acr87/info.json b/keyboards/akko/acr87/info.json
index 5ff1926d0c..0533d328a9 100644
--- a/keyboards/akko/acr87/info.json
+++ b/keyboards/akko/acr87/info.json
@@ -26,6 +26,16 @@
"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",
"max_brightness": 180,
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..09474e1217 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,10 +29,9 @@
#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 IS31FL3733_DRIVER_COUNT 2
#define DRIVER_ADDR_1 0b1110100
#define DRIVER_ADDR_2 0b1110111
#define I2C1_SCL_PAL_MODE 4
diff --git a/keyboards/akko/top40/info.json b/keyboards/akko/top40/info.json
index 48252e6c77..b5ff321740 100644
--- a/keyboards/akko/top40/info.json
+++ b/keyboards/akko/top40/info.json
@@ -26,6 +26,16 @@
"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",
"max_brightness": 180,
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/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/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..7d88a837d1 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) {}
@@ -162,13 +162,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..f4532628ae 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
+QUANTUM_LIB_SRC += uart.c
+SRC += bluetooth_custom.c
diff --git a/keyboards/bioi/g60ble/rules.mk b/keyboards/bioi/g60ble/rules.mk
index 31cc2c22b6..2e79ce77a5 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
+
+QUANTUM_LIB_SRC += uart.c
+SRC += bluetooth_custom.c
diff --git a/keyboards/bioi/morgan65/rules.mk b/keyboards/bioi/morgan65/rules.mk
index 2b955ce793..f4532628ae 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
+QUANTUM_LIB_SRC += uart.c
+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/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/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/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/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/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/chosfox/cf81/config.h b/keyboards/chosfox/cf81/config.h
index b1ea8bba20..2c85f5dd04 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,10 +29,9 @@
#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 IS31FL3733_DRIVER_COUNT 2
#define DRIVER_ADDR_1 0b1110100
#define DRIVER_ADDR_2 0b1110111
#define I2C1_OPMODE OPMODE_I2C
diff --git a/keyboards/chosfox/cf81/info.json b/keyboards/chosfox/cf81/info.json
index 827347f41e..bbfc2deb31 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",
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/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/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/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/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/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/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/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 f3f432390e..31b8750155 100644
--- a/keyboards/drop/alt/v2/config.h
+++ b/keyboards/drop/alt/v2/config.h
@@ -14,11 +14,11 @@
#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 DRIVER_ADDR_1 IS31FL3733_I2C_ADDRESS_GND_VCC
+#define DRIVER_ADDR_2 IS31FL3733_I2C_ADDRESS_VCC_VCC
+#define IS31FL3733_DRIVER_COUNT 2
#define RGB_MATRIX_LED_COUNT 111
-#define ISSI_PWM_FREQUENCY 0b010 // 26k
+#define IS31FL3733_PWM_FREQUENCY IS31FL3733_PWM_FREQUENCY_26K7_HZ
#define RGB_DISABLE_WHEN_USB_SUSPENDED
#define RGB_MATRIX_DEFAULT_VAL 100
diff --git a/keyboards/drop/ctrl/v2/config.h b/keyboards/drop/ctrl/v2/config.h
index 539c505cb3..f3292bcb9c 100644
--- a/keyboards/drop/ctrl/v2/config.h
+++ b/keyboards/drop/ctrl/v2/config.h
@@ -14,11 +14,11 @@
#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 DRIVER_ADDR_1 IS31FL3733_I2C_ADDRESS_GND_VCC
+#define DRIVER_ADDR_2 IS31FL3733_I2C_ADDRESS_VCC_VCC
+#define IS31FL3733_DRIVER_COUNT 2
#define RGB_MATRIX_LED_COUNT 119
-#define ISSI_PWM_FREQUENCY 0b010 // 26k
+#define IS31FL3733_PWM_FREQUENCY IS31FL3733_PWM_FREQUENCY_26K7_HZ
#define RGB_DISABLE_WHEN_USB_SUSPENDED
#define RGB_MATRIX_DEFAULT_VAL 100
diff --git a/keyboards/drop/sense75/config.h b/keyboards/drop/sense75/config.h
index b8d47c311c..70e425eb74 100644
--- a/keyboards/drop/sense75/config.h
+++ b/keyboards/drop/sense75/config.h
@@ -9,11 +9,11 @@
#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 DRIVER_ADDR_1 IS31FL3733_I2C_ADDRESS_GND_GND
+#define DRIVER_ADDR_2 IS31FL3733_I2C_ADDRESS_VCC_VCC
+#define IS31FL3733_DRIVER_COUNT 2
#define RGB_MATRIX_LED_COUNT 111
-#define ISSI_PWM_FREQUENCY 0b010 // 26k
+#define IS31FL3733_PWM_FREQUENCY IS31FL3733_PWM_FREQUENCY_26K7_HZ
#define RGB_DISABLE_WHEN_USB_SUSPENDED
#define RGB_MATRIX_KEYPRESSES
diff --git a/keyboards/drop/shift/v2/config.h b/keyboards/drop/shift/v2/config.h
index 6c651d1f83..29b77cba9b 100644
--- a/keyboards/drop/shift/v2/config.h
+++ b/keyboards/drop/shift/v2/config.h
@@ -14,12 +14,12 @@
#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 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 RGB_MATRIX_LED_COUNT 166
-#define ISSI_PWM_FREQUENCY 0b010 // 26k
+#define IS31FL3733_PWM_FREQUENCY IS31FL3733_PWM_FREQUENCY_26K7_HZ
#define RGB_DISABLE_WHEN_USB_SUSPENDED
#define RGB_MATRIX_DEFAULT_VAL 100
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/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/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/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/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/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/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/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/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/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/tofu60/info.json b/keyboards/dztech/tofu60/info.json
new file mode 100644
index 0000000000..fb6bc52889
--- /dev/null
+++ b/keyboards/dztech/tofu60/info.json
@@ -0,0 +1,448 @@
+{
+ "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_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/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/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/gmmk/pro/rev1/ansi/keymaps/mattgauf/helpers.c b/keyboards/era/divine/config.h
index d30224636b..e1083fe5e2 100644
--- a/keyboards/gmmk/pro/rev1/ansi/keymaps/mattgauf/helpers.c
+++ b/keyboards/era/divine/config.h
@@ -1,4 +1,4 @@
-/* Copyright 2021 Matt Gauf
+/* 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
@@ -13,13 +13,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/>.
*/
+
+#pragma once
-#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);
- }
- }
-}
+#define BACKLIGHT_PWM_DRIVER PWMD0
+#define BACKLIGHT_PWM_CHANNEL RP2040_PWM_CHANNEL_A \ No newline at end of file
diff --git a/keyboards/aozora/config.h b/keyboards/era/divine/halconf.h
index 5171d0c312..5a527da781 100644
--- a/keyboards/aozora/config.h
+++ b/keyboards/era/divine/halconf.h
@@ -1,4 +1,4 @@
-/* Copyright 2021 Salmon Cat Studio
+/* 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
@@ -13,8 +13,9 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-
+
#pragma once
-/* EEPROM for via */
-#define DYNAMIC_KEYMAP_LAYER_COUNT 2
+#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/novelkeys/nk1/config.h b/keyboards/era/divine/mcuconf.h
index 1bcd22e6e5..7698b5d139 100644
--- a/keyboards/novelkeys/nk1/config.h
+++ b/keyboards/era/divine/mcuconf.h
@@ -1,5 +1,4 @@
-
-/* Copyright 2021 Yiancar
+/* 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
@@ -14,8 +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/>.
*/
-
+
#pragma once
-/* There is only 1 Button so limiting VIA to 1 layer */
-#define DYNAMIC_KEYMAP_LAYER_COUNT 1
+#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/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/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/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/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/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..52f4ce803d 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
+QUANTUM_LIB_SRC += i2c_master.c
+
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..52f4ce803d 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
+QUANTUM_LIB_SRC += i2c_master.c
+
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/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/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/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/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/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/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/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/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/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..a266ce2b4f 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"],
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/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 6534d28027..42b40231b6 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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/inland/kb83/config.h b/keyboards/inland/kb83/config.h
index d1e7d11acc..ed1f3cf160 100644
--- a/keyboards/inland/kb83/config.h
+++ b/keyboards/inland/kb83/config.h
@@ -36,10 +36,9 @@
#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 IS31FL3733_DRIVER_COUNT 2
#define DRIVER_ADDR_1 0b1110100
#define DRIVER_ADDR_2 0b1110111
#define I2C1_SDA_PIN B7
diff --git a/keyboards/inland/kb83/info.json b/keyboards/inland/kb83/info.json
index ce577fb029..cd538ef4ee 100644
--- a/keyboards/inland/kb83/info.json
+++ b/keyboards/inland/kb83/info.json
@@ -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/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..db9aea328f 100644
--- a/keyboards/inland/mk47/config.h
+++ b/keyboards/inland/mk47/config.h
@@ -23,10 +23,9 @@
#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 IS31FL3733_DRIVER_COUNT 1
#define DRIVER_ADDR_1 0b1110100
/* WB32 MCU has no default definition */
#define I2C1_OPMODE OPMODE_I2C
diff --git a/keyboards/inland/mk47/info.json b/keyboards/inland/mk47/info.json
index 45a11e913a..7d94365724 100644
--- a/keyboards/inland/mk47/info.json
+++ b/keyboards/inland/mk47/info.json
@@ -25,6 +25,14 @@
"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",
"max_brightness": 200,
@@ -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/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/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..851b56a37d 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) {
+ is31_led led;
if (index >= 0 && index < RGB_MATRIX_LED_COUNT) {
- is31_led led = g_is31_leds[index];
+ memcpy_P(&led, (&g_is31_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];
+ is31_led led;
+ memcpy_P(&led, (&g_is31_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..796708f507 100644
--- a/keyboards/input_club/k_type/is31fl3733-dual.h
+++ b/keyboards/input_club/k_type/is31fl3733-dual.h
@@ -22,6 +22,23 @@
#include <stdbool.h>
#include "progmem.h"
+#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 is31_led {
uint8_t driver : 2;
uint8_t r;
@@ -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..dc1ca9dc25 100644
--- a/keyboards/input_club/k_type/k_type.c
+++ b/keyboards/input_club/k_type/k_type.c
@@ -18,9 +18,7 @@ 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] = {
{ 0, B_1, A_1, C_1 },
@@ -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,7 +213,6 @@ 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.
@@ -228,7 +222,7 @@ void matrix_init_kb(void) {
# 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/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/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_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/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/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/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/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/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/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/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/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/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/keychron/c1_pro/ansi/rgb/config.h b/keyboards/keychron/c1_pro/ansi/rgb/config.h
index a103d190d0..c6b63b4d7c 100644
--- a/keyboards/keychron/c1_pro/ansi/rgb/config.h
+++ b/keyboards/keychron/c1_pro/ansi/rgb/config.h
@@ -20,17 +20,16 @@
// #define MATRIX_UNSELECT_DRIVE_HIGH
/* RGB Matrix Driver Configuration */
-#define DRIVER_COUNT 2
-#define DRIVER_ADDR_1 0b1110111
-#define DRIVER_ADDR_2 0b1110100
+#define CKLED2001_DRIVER_COUNT 2
+#define DRIVER_ADDR_1 CKLED2001_I2C_ADDRESS_VDDIO
+#define DRIVER_ADDR_2 CKLED2001_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 CKLED2001_PHASE_CHANNEL CKLED2001_MSKPHASE_9CHANNEL
/* Set led driver current */
#define CKLED2001_CURRENT_TUNE \
{ 0x9D, 0x9D, 0x44, 0x9D, 0x9D, 0x44, 0x9D, 0x9D, 0x44, 0x9D, 0x9D, 0x44 }
diff --git a/keyboards/keychron/c1_pro/ansi/white/config.h b/keyboards/keychron/c1_pro/ansi/white/config.h
index dd3e1da477..5492eca28f 100644
--- a/keyboards/keychron/c1_pro/ansi/white/config.h
+++ b/keyboards/keychron/c1_pro/ansi/white/config.h
@@ -20,14 +20,13 @@
// #define MATRIX_UNSELECT_DRIVE_HIGH
/* LED Matrix Driver Configuration */
-#define DRIVER_COUNT 1
-#define DRIVER_ADDR_1 0b1110100
+#define CKLED2001_DRIVER_COUNT 1
+#define DRIVER_ADDR_1 CKLED2001_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 CKLED2001_PHASE_CHANNEL CKLED2001_MSKPHASE_9CHANNEL
/* Set led driver current */
#define CKLED2001_CURRENT_TUNE \
{ 0x9D, 0x9D, 0x44, 0x9D, 0x9D, 0x44, 0x9D, 0x9D, 0x44, 0x9D, 0x9D, 0x44 }
diff --git a/keyboards/keychron/c2_pro/ansi/rgb/config.h b/keyboards/keychron/c2_pro/ansi/rgb/config.h
index d62b756f5a..d2d3d61f29 100644
--- a/keyboards/keychron/c2_pro/ansi/rgb/config.h
+++ b/keyboards/keychron/c2_pro/ansi/rgb/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 CKLED2001_DRIVER_COUNT 2
+#define DRIVER_ADDR_1 CKLED2001_I2C_ADDRESS_VDDIO
+#define DRIVER_ADDR_2 CKLED2001_I2C_ADDRESS_GND
/* Set LED driver current */
#define CKLED2001_CURRENT_TUNE \
diff --git a/keyboards/keychron/c2_pro/ansi/white/config.h b/keyboards/keychron/c2_pro/ansi/white/config.h
index d2a0e27b57..fb2ca3aa41 100644
--- a/keyboards/keychron/c2_pro/ansi/white/config.h
+++ b/keyboards/keychron/c2_pro/ansi/white/config.h
@@ -17,8 +17,8 @@
#pragma once
/* LED Matrix Driver Configuration */
-#define DRIVER_COUNT 1
-#define DRIVER_ADDR_1 0b1110100
+#define CKLED2001_DRIVER_COUNT 1
+#define DRIVER_ADDR_1 CKLED2001_I2C_ADDRESS_GND
/* Set LED driver current */
#define CKLED2001_CURRENT_TUNE \
diff --git a/keyboards/keychron/q0/rev_0130/config.h b/keyboards/keychron/q0/rev_0130/config.h
index 12ecfe1356..c6a241a1ce 100644
--- a/keyboards/keychron/q0/rev_0130/config.h
+++ b/keyboards/keychron/q0/rev_0130/config.h
@@ -17,8 +17,8 @@
#pragma once
/* RGB Matrix Driver Configuration */
-#define DRIVER_COUNT 1
-#define DRIVER_ADDR_1 0b1110100
+#define CKLED2001_DRIVER_COUNT 1
+#define DRIVER_ADDR_1 CKLED2001_I2C_ADDRESS_GND
/* RGB Matrix Configuration */
#define DRIVER_1_LED_TOTAL 21
diff --git a/keyboards/keychron/q0/rev_0130/rules.mk b/keyboards/keychron/q0/rev_0130/rules.mk
index f6868e88e3..6e7633bfe0 100644
--- a/keyboards/keychron/q0/rev_0130/rules.mk
+++ b/keyboards/keychron/q0/rev_0130/rules.mk
@@ -1,3 +1 @@
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = embedded_flash
-
+# This file intentionally left blank
diff --git a/keyboards/keychron/q0/rev_0131/config.h b/keyboards/keychron/q0/rev_0131/config.h
index e4c5c2d3fc..f1d06a2842 100644
--- a/keyboards/keychron/q0/rev_0131/config.h
+++ b/keyboards/keychron/q0/rev_0131/config.h
@@ -17,15 +17,14 @@
#pragma once
/* RGB Matrix Driver Configuration */
-#define DRIVER_COUNT 1
-#define DRIVER_ADDR_1 0b1110111
+#define CKLED2001_DRIVER_COUNT 1
+#define DRIVER_ADDR_1 CKLED2001_I2C_ADDRESS_VDDIO
/* RGB Matrix Configuration */
#define DRIVER_1_LED_TOTAL 26
#define RGB_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_9CHANNEL
+#define CKLED2001_PHASE_CHANNEL CKLED2001_MSKPHASE_9CHANNEL
/* Enable num-lock LED */
#define NUM_LOCK_LED_INDEX 5
diff --git a/keyboards/keychron/q0/rev_0131/rules.mk b/keyboards/keychron/q0/rev_0131/rules.mk
index f6868e88e3..6e7633bfe0 100644
--- a/keyboards/keychron/q0/rev_0131/rules.mk
+++ b/keyboards/keychron/q0/rev_0131/rules.mk
@@ -1,3 +1 @@
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = embedded_flash
-
+# This file intentionally left blank
diff --git a/keyboards/keychron/q1/config.h b/keyboards/keychron/q1/config.h
index c78453dc5f..543f62f9d8 100644
--- a/keyboards/keychron/q1/config.h
+++ b/keyboards/keychron/q1/config.h
@@ -17,9 +17,9 @@
#pragma once
/* RGB Matrix Driver Configuration */
-#define DRIVER_COUNT 2
-#define DRIVER_ADDR_1 0b1010000
-#define DRIVER_ADDR_2 0b1011111
+#define IS31FL3733_DRIVER_COUNT 2
+#define DRIVER_ADDR_1 IS31FL3733_I2C_ADDRESS_GND_GND
+#define DRIVER_ADDR_2 IS31FL3733_I2C_ADDRESS_VCC_VCC
/* DIP switch */
#define DIP_SWITCH_MATRIX_GRID { {0,1} }
diff --git a/keyboards/keychron/q1/iso_encoder/config.h b/keyboards/keychron/q1/iso_encoder/config.h
index c1e84e44d3..33916cf8c4 100644
--- a/keyboards/keychron/q1/iso_encoder/config.h
+++ b/keyboards/keychron/q1/iso_encoder/config.h
@@ -16,14 +16,6 @@
#pragma once
-/* 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
-
/* RGB Matrix Configuration */
#define DRIVER_1_LED_TOTAL 59
#define DRIVER_2_LED_TOTAL 24
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..3a0d613510 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 CKLED2001_DRIVER_COUNT 2
+#define DRIVER_ADDR_1 CKLED2001_I2C_ADDRESS_VDDIO
+#define DRIVER_ADDR_2 CKLED2001_I2C_ADDRESS_GND
/* Increase I2C speed to 1000 KHz */
#define I2C1_TIMINGR_PRESC 0U
@@ -41,8 +41,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 CKLED2001_PHASE_CHANNEL CKLED2001_MSKPHASE_9CHANNEL
#define CKLED2001_CURRENT_TUNE \
{ 0x98, 0x98, 0x4A, 0x98, 0x98, 0x4A, 0x98, 0x98, 0x4A, 0x98, 0x98, 0x4A }
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/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..90bd7e0a56 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 CKLED2001_DRIVER_COUNT 1
+#define DRIVER_ADDR_1 CKLED2001_I2C_ADDRESS_GND
/* Increase I2C speed to 1000 KHz */
#define I2C1_TIMINGR_PRESC 0U
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..52c4ade5a6 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 CKLED2001_DRIVER_COUNT 2
+#define DRIVER_ADDR_1 CKLED2001_I2C_ADDRESS_VDDIO
+#define DRIVER_ADDR_2 CKLED2001_I2C_ADDRESS_GND
/* Increase I2C speed to 1000 KHz */
#define I2C1_TIMINGR_PRESC 0U
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/q2/ansi/rules.mk b/keyboards/keychron/q2/ansi/rules.mk
index ede7d6fab2..eca21676ee 100644
--- a/keyboards/keychron/q2/ansi/rules.mk
+++ b/keyboards/keychron/q2/ansi/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/q2/ansi_encoder/rules.mk b/keyboards/keychron/q2/ansi_encoder/rules.mk
index b294cf950e..dfa13564d2 100644
--- a/keyboards/keychron/q2/ansi_encoder/rules.mk
+++ b/keyboards/keychron/q2/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/q2/config.h b/keyboards/keychron/q2/config.h
index 63e31cd01d..1ecff68e4d 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 CKLED2001_DRIVER_COUNT 2
+#define DRIVER_ADDR_1 CKLED2001_I2C_ADDRESS_VDDIO
+#define DRIVER_ADDR_2 CKLED2001_I2C_ADDRESS_GND
-/* Scan phase of led driver set as MSKPHASE_9CHANNEL(defined as 0x03 in CKLED2001.h) */
-#define PHASE_CHANNEL MSKPHASE_9CHANNEL
+#define CKLED2001_PHASE_CHANNEL CKLED2001_MSKPHASE_9CHANNEL
/* Disable DIP switch in matrix data */
#define MATRIX_MASKED
diff --git a/keyboards/keychron/q2/iso/rules.mk b/keyboards/keychron/q2/iso/rules.mk
index b3de962291..2cdda3f9a7 100644
--- a/keyboards/keychron/q2/iso/rules.mk
+++ b/keyboards/keychron/q2/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/q2/iso_encoder/rules.mk b/keyboards/keychron/q2/iso_encoder/rules.mk
index aba76c0944..f7e6a950e8 100644
--- a/keyboards/keychron/q2/iso_encoder/rules.mk
+++ b/keyboards/keychron/q2/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/q2/jis/rules.mk b/keyboards/keychron/q2/jis/rules.mk
index c37beecb9e..cf31e094cb 100644
--- a/keyboards/keychron/q2/jis/rules.mk
+++ b/keyboards/keychron/q2/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/q2/jis_encoder/rules.mk b/keyboards/keychron/q2/jis_encoder/rules.mk
index 5091fe9414..5d77f09971 100644
--- a/keyboards/keychron/q2/jis_encoder/rules.mk
+++ b/keyboards/keychron/q2/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/q3/ansi/rules.mk b/keyboards/keychron/q3/ansi/rules.mk
index 58bbb89a72..cf4b02e6da 100644
--- a/keyboards/keychron/q3/ansi/rules.mk
+++ b/keyboards/keychron/q3/ansi/rules.mk
@@ -13,6 +13,3 @@ 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
-
diff --git a/keyboards/keychron/q3/ansi_encoder/rules.mk b/keyboards/keychron/q3/ansi_encoder/rules.mk
index 77b90f2466..929c4532a0 100644
--- a/keyboards/keychron/q3/ansi_encoder/rules.mk
+++ b/keyboards/keychron/q3/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/q3/config.h b/keyboards/keychron/q3/config.h
index 79f07d0390..5914df0200 100644
--- a/keyboards/keychron/q3/config.h
+++ b/keyboards/keychron/q3/config.h
@@ -24,9 +24,9 @@
#define DIODE_DIRECTION ROW2COL
/* RGB Matrix Driver Configuration */
-#define DRIVER_COUNT 2
-#define DRIVER_ADDR_1 0b1110111
-#define DRIVER_ADDR_2 0b1110100
+#define CKLED2001_DRIVER_COUNT 2
+#define DRIVER_ADDR_1 CKLED2001_I2C_ADDRESS_VDDIO
+#define DRIVER_ADDR_2 CKLED2001_I2C_ADDRESS_GND
/* Increase I2C speed to 1000 KHz */
#define I2C1_TIMINGR_PRESC 0U
@@ -35,8 +35,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 CKLED2001_PHASE_CHANNEL CKLED2001_MSKPHASE_9CHANNEL
/* DIP switch */
#define DIP_SWITCH_MATRIX_GRID { {5, 4} }
diff --git a/keyboards/keychron/q3/iso/rules.mk b/keyboards/keychron/q3/iso/rules.mk
index 58bbb89a72..cf4b02e6da 100644
--- a/keyboards/keychron/q3/iso/rules.mk
+++ b/keyboards/keychron/q3/iso/rules.mk
@@ -13,6 +13,3 @@ 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
-
diff --git a/keyboards/keychron/q3/iso_encoder/rules.mk b/keyboards/keychron/q3/iso_encoder/rules.mk
index 77b90f2466..929c4532a0 100644
--- a/keyboards/keychron/q3/iso_encoder/rules.mk
+++ b/keyboards/keychron/q3/iso_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/q3/jis/rules.mk b/keyboards/keychron/q3/jis/rules.mk
index 58bbb89a72..cf4b02e6da 100644
--- a/keyboards/keychron/q3/jis/rules.mk
+++ b/keyboards/keychron/q3/jis/rules.mk
@@ -13,6 +13,3 @@ 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
-
diff --git a/keyboards/keychron/q3/jis_encoder/rules.mk b/keyboards/keychron/q3/jis_encoder/rules.mk
index 77b90f2466..929c4532a0 100644
--- a/keyboards/keychron/q3/jis_encoder/rules.mk
+++ b/keyboards/keychron/q3/jis_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/q4/ansi_v1/config.h b/keyboards/keychron/q4/ansi_v1/config.h
index e11ab12b93..cf12c75966 100644
--- a/keyboards/keychron/q4/ansi_v1/config.h
+++ b/keyboards/keychron/q4/ansi_v1/config.h
@@ -17,17 +17,16 @@
#pragma once
/* RGB Matrix Driver Configuration */
-#define DRIVER_COUNT 2
-#define DRIVER_ADDR_1 0b1110111
-#define DRIVER_ADDR_2 0b1110100
+#define CKLED2001_DRIVER_COUNT 2
+#define DRIVER_ADDR_1 CKLED2001_I2C_ADDRESS_VDDIO
+#define DRIVER_ADDR_2 CKLED2001_I2C_ADDRESS_GND
/* 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_PHASE_CHANNEL CKLED2001_MSKPHASE_9CHANNEL
#define CKLED2001_CURRENT_TUNE \
{ 0xCA, 0xCA, 0x60, 0xCA, 0xCA, 0x60, 0xCA, 0xCA, 0x60, 0xCA, 0xCA, 0x60 }
diff --git a/keyboards/keychron/q4/ansi_v1/rules.mk b/keyboards/keychron/q4/ansi_v1/rules.mk
index cad488b009..04fb3f58a3 100644
--- a/keyboards/keychron/q4/ansi_v1/rules.mk
+++ b/keyboards/keychron/q4/ansi_v1/rules.mk
@@ -13,6 +13,3 @@ 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/config.h b/keyboards/keychron/q4/ansi_v2/config.h
index cc906fed03..1bcaf204ef 100644
--- a/keyboards/keychron/q4/ansi_v2/config.h
+++ b/keyboards/keychron/q4/ansi_v2/config.h
@@ -17,8 +17,8 @@
#pragma once
/* RGB Matrix Driver Configuration */
-#define DRIVER_COUNT 1
-#define DRIVER_ADDR_1 0b1110100
+#define CKLED2001_DRIVER_COUNT 1
+#define DRIVER_ADDR_1 CKLED2001_I2C_ADDRESS_GND
/* RGB Matrix Configuration */
#define DRIVER_1_LED_TOTAL 61
diff --git a/keyboards/keychron/q4/ansi_v2/rules.mk b/keyboards/keychron/q4/ansi_v2/rules.mk
index cad488b009..04fb3f58a3 100644
--- a/keyboards/keychron/q4/ansi_v2/rules.mk
+++ b/keyboards/keychron/q4/ansi_v2/rules.mk
@@ -13,6 +13,3 @@ 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/iso/config.h b/keyboards/keychron/q4/iso/config.h
index 9e4a1fc3e5..b61f8be4a4 100644
--- a/keyboards/keychron/q4/iso/config.h
+++ b/keyboards/keychron/q4/iso/config.h
@@ -17,8 +17,8 @@
#pragma once
/* RGB Matrix Driver Configuration */
-#define DRIVER_COUNT 1
-#define DRIVER_ADDR_1 0b1110100
+#define CKLED2001_DRIVER_COUNT 1
+#define DRIVER_ADDR_1 CKLED2001_I2C_ADDRESS_GND
/* RGB Matrix Configuration */
#define DRIVER_1_LED_TOTAL 62
diff --git a/keyboards/keychron/q4/iso/rules.mk b/keyboards/keychron/q4/iso/rules.mk
index cad488b009..04fb3f58a3 100644
--- a/keyboards/keychron/q4/iso/rules.mk
+++ b/keyboards/keychron/q4/iso/rules.mk
@@ -13,6 +13,3 @@ 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/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/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..d459d8c54e 100644
--- a/keyboards/keychron/q5/config.h
+++ b/keyboards/keychron/q5/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 CKLED2001_DRIVER_COUNT 2
+#define DRIVER_ADDR_1 CKLED2001_I2C_ADDRESS_VDDIO
+#define DRIVER_ADDR_2 CKLED2001_I2C_ADDRESS_GND
#define CKLED2001_CURRENT_TUNE \
{ 0xB6, 0xB6, 0x56, 0xB6, 0xB6, 0x56, 0xB6, 0xB6, 0x56, 0xB6, 0xB6, 0x56 }
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/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/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/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..98e3642c4d 100644
--- a/keyboards/keychron/q6/config.h
+++ b/keyboards/keychron/q6/config.h
@@ -24,9 +24,9 @@
#define DIODE_DIRECTION ROW2COL
/* RGB Matrix Driver Configuration */
-#define DRIVER_COUNT 2
-#define DRIVER_ADDR_1 0b1110111
-#define DRIVER_ADDR_2 0b1110100
+#define CKLED2001_DRIVER_COUNT 2
+#define DRIVER_ADDR_1 CKLED2001_I2C_ADDRESS_VDDIO
+#define DRIVER_ADDR_2 CKLED2001_I2C_ADDRESS_GND
#define CKLED2001_CURRENT_TUNE \
{ 0xA4, 0xA4, 0x52, 0xA4, 0xA4, 0x52, 0xA4, 0xA4, 0x52, 0xA4, 0xA4, 0x52 }
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/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/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..e5d0954ba0 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 CKLED2001_DRIVER_COUNT 1
+#define DRIVER_ADDR_1 CKLED2001_I2C_ADDRESS_GND
/* Increase I2C speed to 1000 KHz */
#define I2C1_TIMINGR_PRESC 0U
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..35d05ffab7 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 CKLED2001_DRIVER_COUNT 2
+#define DRIVER_ADDR_1 CKLED2001_I2C_ADDRESS_VDDIO
+#define DRIVER_ADDR_2 CKLED2001_I2C_ADDRESS_GND
/* Increase I2C speed to 1000 KHz */
#define I2C1_TIMINGR_PRESC 0U
@@ -37,8 +37,7 @@
#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_PHASE_CHANNEL CKLED2001_MSKPHASE_9CHANNEL
#define CKLED2001_CURRENT_TUNE \
{ 0xB8, 0xB8, 0x58, 0xB8, 0xB8, 0x58, 0xB8, 0xB8, 0x58, 0xB8, 0xB8, 0x58 }
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..125e17a3da 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 CKLED2001_DRIVER_COUNT 2
+#define DRIVER_ADDR_1 CKLED2001_I2C_ADDRESS_VDDIO
+#define DRIVER_ADDR_2 CKLED2001_I2C_ADDRESS_GND
/* Increase I2C speed to 1000 KHz */
#define I2C1_TIMINGR_PRESC 0U
@@ -28,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 SCAN_PHASE_CHANNEL MSKPHASE_9CHANNEL
+#define CKLED2001_PHASE_CHANNEL CKLED2001_MSKPHASE_9CHANNEL
#define CKLED2001_CURRENT_TUNE \
{ 0xF8, 0xF8, 0x80, 0xF8, 0xF8, 0x80, 0xF8, 0xF8, 0x80, 0xF8, 0xF8, 0x80 }
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/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/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..4b6d5f1614 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 CKLED2001_DRIVER_COUNT 2
+#define DRIVER_ADDR_1 CKLED2001_I2C_ADDRESS_VDDIO
+#define DRIVER_ADDR_2 CKLED2001_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 CKLED2001_PHASE_CHANNEL CKLED2001_MSKPHASE_9CHANNEL
#define CKLED2001_CURRENT_TUNE \
{ 0xC4, 0xC4, 0x60, 0xC4, 0xC4, 0x60, 0xC4, 0xC4, 0x60, 0xC4, 0xC4, 0x60 }
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/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/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/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..de5795a5f6 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 CKLED2001_DRIVER_COUNT 1
+#define DRIVER_ADDR_1 CKLED2001_I2C_ADDRESS_GND
/* Increase I2C speed to 1000 KHz */
#define I2C1_TIMINGR_PRESC 0U
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/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/s1/ansi/rgb/config.h b/keyboards/keychron/s1/ansi/rgb/config.h
index 9cf8df3b82..1f77559339 100644
--- a/keyboards/keychron/s1/ansi/rgb/config.h
+++ b/keyboards/keychron/s1/ansi/rgb/config.h
@@ -17,15 +17,14 @@
#pragma once
/* RGB Matrix Driver Configuration */
-#define DRIVER_COUNT 2
-#define DRIVER_ADDR_1 0b1110111
-#define DRIVER_ADDR_2 0b1110100
+#define CKLED2001_DRIVER_COUNT 2
+#define DRIVER_ADDR_1 CKLED2001_I2C_ADDRESS_VDDIO
+#define DRIVER_ADDR_2 CKLED2001_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_PHASE_CHANNEL CKLED2001_MSKPHASE_9CHANNEL
#define CKLED2001_CURRENT_TUNE \
{ 0xA0, 0xA0, 0x48, 0xA0, 0xA0, 0x48, 0xA0, 0xA0, 0x48, 0xA0, 0xA0, 0x48 }
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..02eeb7fc81 100644
--- a/keyboards/keychron/s1/ansi/white/config.h
+++ b/keyboards/keychron/s1/ansi/white/config.h
@@ -17,13 +17,12 @@
#pragma once
/* LED Matrix Driver Configuration */
-#define DRIVER_COUNT 1
-#define DRIVER_ADDR_1 0b1110100
+#define CKLED2001_DRIVER_COUNT 1
+#define DRIVER_ADDR_1 CKLED2001_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_PHASE_CHANNEL CKLED2001_MSKPHASE_6CHANNEL
#define CKLED2001_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/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/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/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..8edbf05ca8 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 CKLED2001_DRIVER_COUNT 2
+#define DRIVER_ADDR_1 CKLED2001_I2C_ADDRESS_VDDIO
+#define DRIVER_ADDR_2 CKLED2001_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 CKLED2001_PHASE_CHANNEL CKLED2001_MSKPHASE_9CHANNEL
/* turn off effects when suspended */
#define RGB_DISABLE_WHEN_USB_SUSPENDED
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/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..474a84c8b9 100644
--- a/keyboards/keychron/v1/jis/config.h
+++ b/keyboards/keychron/v1/jis/config.h
@@ -16,11 +16,6 @@
#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
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/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/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..b8aa40a186 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 CKLED2001_DRIVER_COUNT 2
+#define DRIVER_ADDR_1 CKLED2001_I2C_ADDRESS_VDDIO
+#define DRIVER_ADDR_2 CKLED2001_I2C_ADDRESS_GND
/* Increase I2C speed to 1000 KHz */
#define I2C1_TIMINGR_PRESC 0U
@@ -42,8 +42,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 CKLED2001_PHASE_CHANNEL CKLED2001_MSKPHASE_9CHANNEL
#define CKLED2001_CURRENT_TUNE { 0x98, 0x98, 0x4A, 0x98, 0x98, 0x4A, 0x98, 0x98, 0x4A, 0x98, 0x98, 0x4A }
/* DIP switch */
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/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/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..8e881da987 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 CKLED2001_DRIVER_COUNT 2
+#define DRIVER_ADDR_1 CKLED2001_I2C_ADDRESS_VDDIO
+#define DRIVER_ADDR_2 CKLED2001_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 CKLED2001_PHASE_CHANNEL CKLED2001_MSKPHASE_9CHANNEL
/* Disable DIP switch in matrix data */
#define MATRIX_MASKED
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/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/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/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/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/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..8757f6bace 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 CKLED2001_DRIVER_COUNT 2
+#define DRIVER_ADDR_1 CKLED2001_I2C_ADDRESS_VDDIO
+#define DRIVER_ADDR_2 CKLED2001_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 CKLED2001_PHASE_CHANNEL CKLED2001_MSKPHASE_9CHANNEL
/* DIP switch */
#define DIP_SWITCH_MATRIX_GRID { {5, 4} }
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/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/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/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/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..2fc94aaaee 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 CKLED2001_DRIVER_COUNT 1
+#define DRIVER_ADDR_1 CKLED2001_I2C_ADDRESS_VDDIO
/* Increase I2C speed to 1000 KHz */
#define I2C1_TIMINGR_PRESC 0U
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/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/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..0ee5e4e46b 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 CKLED2001_DRIVER_COUNT 2
+#define DRIVER_ADDR_1 CKLED2001_I2C_ADDRESS_VDDIO
+#define DRIVER_ADDR_2 CKLED2001_I2C_ADDRESS_GND
/* Increase I2C speed to 1000 KHz */
#define I2C1_TIMINGR_PRESC 0U
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/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/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/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..e836cced84 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 CKLED2001_DRIVER_COUNT 2
+#define DRIVER_ADDR_1 CKLED2001_I2C_ADDRESS_VDDIO
+#define DRIVER_ADDR_2 CKLED2001_I2C_ADDRESS_GND
/* Increase I2C speed to 1000 KHz */
#define I2C1_TIMINGR_PRESC 0U
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/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/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..606f682719 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 CKLED2001_DRIVER_COUNT 2
+#define DRIVER_ADDR_1 CKLED2001_I2C_ADDRESS_VDDIO
+#define DRIVER_ADDR_2 CKLED2001_I2C_ADDRESS_GND
/* Increase I2C speed to 1000 KHz */
#define I2C1_TIMINGR_PRESC 0U
@@ -28,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 SCAN_PHASE_CHANNEL MSKPHASE_9CHANNEL
+#define CKLED2001_PHASE_CHANNEL CKLED2001_MSKPHASE_9CHANNEL
#define CKLED2001_CURRENT_TUNE { 0xFC, 0xFC, 0x70, 0xFC, 0xFC, 0x70, 0xFC, 0xFC, 0x70, 0xFC, 0xFC, 0x70 }
/* DIP switch */
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/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/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..3dc6d58518 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 CKLED2001_DRIVER_COUNT 2
+#define DRIVER_ADDR_1 CKLED2001_I2C_ADDRESS_VDDIO
+#define DRIVER_ADDR_2 CKLED2001_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 CKLED2001_PHASE_CHANNEL CKLED2001_MSKPHASE_9CHANNEL
#define CKLED2001_CURRENT_TUNE { 0xC4, 0xC4, 0x60, 0xC4, 0xC4, 0x60, 0xC4, 0xC4, 0x60, 0xC4, 0xC4, 0x60 }
/* DIP switch */
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/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/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/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..e51bec0049 100644
--- a/keyboards/kprepublic/bm60hsrgb/rev2/rev2.c
+++ b/keyboards/kprepublic/bm60hsrgb/rev2/rev2.c
@@ -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_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_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..075e8ae580 100644
--- a/keyboards/kprepublic/bm60hsrgb_iso/rev2/rev2.c
+++ b/keyboards/kprepublic/bm60hsrgb_iso/rev2/rev2.c
@@ -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_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..0084fd9245 100644
--- a/keyboards/kprepublic/bm60hsrgb_poker/rev2/rev2.c
+++ b/keyboards/kprepublic/bm60hsrgb_poker/rev2/rev2.c
@@ -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/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/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/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/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/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/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/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/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..be41e0ac02 100644
--- a/keyboards/matrix/m20add/rgb_ring.c
+++ b/keyboards/matrix/m20add/rgb_ring.c
@@ -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/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..f3d6062059 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));
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/rev3/config.h b/keyboards/mechlovin/adelais/rgb_led/rev3/config.h
index c4961c6492..72011af8df 100644
--- a/keyboards/mechlovin/adelais/rgb_led/rev3/config.h
+++ b/keyboards/mechlovin/adelais/rgb_led/rev3/config.h
@@ -22,15 +22,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/monsgeek/m1/config.h b/keyboards/monsgeek/m1/config.h
index 3e44e815fa..efec0207c3 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,10 +31,9 @@
#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 IS31FL3733_DRIVER_COUNT 2
#define DRIVER_ADDR_1 0b1110100
#define DRIVER_ADDR_2 0b1110111
#define I2C1_OPMODE OPMODE_I2C
diff --git a/keyboards/monsgeek/m1/info.json b/keyboards/monsgeek/m1/info.json
index 4de1803818..3eade9d76d 100644
--- a/keyboards/monsgeek/m1/info.json
+++ b/keyboards/monsgeek/m1/info.json
@@ -26,6 +26,16 @@
"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"}
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..ef2a43cdb3 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,10 +32,9 @@
#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 IS31FL3733_DRIVER_COUNT 2
#define DRIVER_ADDR_1 0b1110100
#define DRIVER_ADDR_2 0b1110111
#define I2C1_OPMODE OPMODE_I2C
diff --git a/keyboards/monsgeek/m5/info.json b/keyboards/monsgeek/m5/info.json
index 4e504b8663..7b01d2526d 100644
--- a/keyboards/monsgeek/m5/info.json
+++ b/keyboards/monsgeek/m5/info.json
@@ -25,6 +25,16 @@
"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"
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..fac90ac0ad 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,10 +29,9 @@
#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 IS31FL3733_DRIVER_COUNT 2
#define DRIVER_ADDR_1 0b1110100
#define DRIVER_ADDR_2 0b1110111
#define I2C1_SCL_PAL_MODE 4
diff --git a/keyboards/monsgeek/m6/info.json b/keyboards/monsgeek/m6/info.json
index d23d2f8322..d3951c8046 100644
--- a/keyboards/monsgeek/m6/info.json
+++ b/keyboards/monsgeek/m6/info.json
@@ -25,6 +25,16 @@
"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",
"max_brightness": 200,
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/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/rules.mk b/keyboards/moonlander/rules.mk
index 12987afdac..a96d00f2f1 100644
--- a/keyboards/moonlander/rules.mk
+++ b/keyboards/moonlander/rules.mk
@@ -14,7 +14,6 @@ AUDIO_DRIVER = dac_additive
CUSTOM_MATRIX = lite
SWAP_HANDS_ENABLE = yes
RGB_MATRIX_ENABLE = yes
-EEPROM_DRIVER = i2c
#project specific files
SRC += matrix.c
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/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/mxss/mxss_frontled.c b/keyboards/mxss/mxss_frontled.c
index 2ab9a27bea..11c942c959 100644
--- a/keyboards/mxss/mxss_frontled.c
+++ b/keyboards/mxss/mxss_frontled.c
@@ -25,7 +25,7 @@
// 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
+rgb_led_t fleds[2]; // Front LED rgb values for indicator mode use
// Layer indicator colors
__attribute__ ((weak))
diff --git a/keyboards/mxss/rgblight.c b/keyboards/mxss/rgblight.c
index 94f6b1dfe8..873139b5c6 100644
--- a/keyboards/mxss/rgblight.c
+++ b/keyboards/mxss/rgblight.c
@@ -98,7 +98,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
@@ -111,10 +111,10 @@ 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];
+extern rgb_led_t fleds[2];
hs_set fled_hs[2];
-void copyrgb(LED_TYPE *src, LED_TYPE *dst) {
+void copyrgb(rgb_led_t *src, rgb_led_t *dst) {
dst->r = src->r;
dst->g = src->g;
dst->b = src->b;
@@ -135,7 +135,7 @@ void rgblight_set_effect_range(uint8_t start_pos, uint8_t 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) {
+void sethsv_raw(uint8_t hue, uint8_t sat, uint8_t val, rgb_led_t *led1) {
HSV hsv = {hue, sat, val};
// MxSS custom
// if led is front leds, cache the hue and sat values
@@ -150,9 +150,9 @@ void sethsv_raw(uint8_t hue, uint8_t sat, uint8_t val, LED_TYPE *led1) {
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 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;
@@ -454,7 +454,7 @@ void rgblight_sethsv_noeeprom_old(uint8_t hue, uint8_t sat, uint8_t val) {
fled_hs[0].hue = fled_hs[1].hue = hue;
fled_hs[0].sat = fled_hs[1].sat = sat;
- 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);
}
@@ -465,7 +465,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;
sethsv(hue, sat, val, &tmp_led);
// MxSS custom
@@ -515,7 +515,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]);
}
rgblight_set();
}
@@ -601,7 +601,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);
}
@@ -640,7 +640,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);
}
@@ -702,8 +702,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++) {
sethsv(segment.hue, segment.sat, segment.val, led_ptr);
}
segment_ptr++;
@@ -737,11 +737,11 @@ void rgblight_unblink_layers(void) {
#endif
-__attribute__((weak)) void rgblight_call_driver(LED_TYPE *start_led, uint8_t num_leds) { ws2812_setleds(start_led, 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
void rgblight_set(void) {
- LED_TYPE *start_led;
+ rgb_led_t *start_led;
uint8_t num_leds = rgblight_ranges.clipping_num_leds;
if (!rgblight_config.enable) {
@@ -769,7 +769,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])];
}
@@ -1089,7 +1089,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();
@@ -1130,7 +1130,7 @@ void rgblight_effect_snake(animation_status_t *anim) {
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;
+ rgb_led_t *ledp = led + i + rgblight_ranges.effect_start_pos;
ledp->r = 0;
ledp->g = 0;
ledp->b = 0;
@@ -1203,7 +1203,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 {
// MxSS custom code
if (cur == RGBLIGHT_FLED1) {
@@ -1262,7 +1262,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();
@@ -1285,7 +1285,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;
}
@@ -1322,7 +1322,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) {
@@ -1383,7 +1383,7 @@ 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);
}
diff --git a/keyboards/neson_design/700e/700e.c b/keyboards/neson_design/700e/700e.c
index cf31b6b72b..70438233c5 100644
--- a/keyboards/neson_design/700e/700e.c
+++ b/keyboards/neson_design/700e/700e.c
@@ -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/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..0bff544672 100644
--- a/keyboards/neson_design/n6/n6.c
+++ b/keyboards/neson_design/n6/n6.c
@@ -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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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..ceeed9e1a7 100755
--- a/keyboards/spaceholdings/nebula12/config.h
+++ b/keyboards/spaceholdings/nebula12/config.h
@@ -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/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/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/teleport/native/config.h b/keyboards/teleport/native/config.h
index 1453bfdc94..ed858db0c7 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)
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/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/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/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/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/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/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/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_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_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_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_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_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_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_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_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/wt60_a/config.h b/keyboards/wilba_tech/wt60_a/config.h
index 488eeade83..54f68e9aaf 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 2
+#define RGB_MATRIX_LED_COUNT 96
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_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_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/wt65_a/config.h b/keyboards/wilba_tech/wt65_a/config.h
index aa75002b4f..8b30dd6cde 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 2
+#define RGB_MATRIX_LED_COUNT 96
diff --git a/keyboards/wilba_tech/wt65_b/config.h b/keyboards/wilba_tech/wt65_b/config.h
index 60cdbe4cc6..0a2a7526d9 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 2
+#define RGB_MATRIX_LED_COUNT 96
diff --git a/keyboards/wilba_tech/wt75_a/config.h b/keyboards/wilba_tech/wt75_a/config.h
index 4638b0fba9..e987252e44 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 2
+#define RGB_MATRIX_LED_COUNT 96
diff --git a/keyboards/wilba_tech/wt75_b/config.h b/keyboards/wilba_tech/wt75_b/config.h
index f519fe6603..9d6dfb9585 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 2
+#define RGB_MATRIX_LED_COUNT 96
diff --git a/keyboards/wilba_tech/wt75_c/config.h b/keyboards/wilba_tech/wt75_c/config.h
index 7d07822eb6..c4f9170872 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 2
+#define RGB_MATRIX_LED_COUNT 96
diff --git a/keyboards/wilba_tech/wt80_a/config.h b/keyboards/wilba_tech/wt80_a/config.h
index 59cb397a00..b33d797bdf 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 2
+#define RGB_MATRIX_LED_COUNT 96
diff --git a/keyboards/wilba_tech/wt_rgb_backlight.c b/keyboards/wilba_tech/wt_rgb_backlight.c
index 6c57416622..20932138ed 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,11 +155,7 @@ uint8_t g_key_hit[BACKLIGHT_LED_COUNT];
uint32_t g_any_key_hit = 0;
#if defined(RGB_BACKLIGHT_HS60)
-
-// 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_1 IS31FL3733_I2C_ADDRESS_GND_GND
const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
/* Refer to IS31 manual for these locations
@@ -235,12 +231,8 @@ 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)
-
-// 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
+#define ISSI_ADDR_1 IS31FL3733_I2C_ADDRESS_GND_GND
+#define ISSI_ADDR_2 IS31FL3733_I2C_ADDRESS_GND_SDA
const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
/* Refer to IS31 manual for these locations
@@ -381,9 +373,7 @@ 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] = {
/* Refer to IS31 manual for these locations
@@ -411,11 +401,10 @@ 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] = {
/* Refer to IS31 manual for these locations
@@ -539,10 +528,8 @@ 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] = {
/* Refer to IS31 manual for these locations
@@ -620,10 +607,8 @@ 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] = {
/* Refer to IS31 manual for these locations
@@ -706,9 +691,7 @@ 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] = {
@@ -834,11 +817,16 @@ 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] = {
@@ -856,10 +844,8 @@ 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] = {
/* Refer to IS31 manual for these locations
@@ -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/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/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_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/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/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/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/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/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_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..b10114e134 100644
--- a/keyboards/xelus/dawn60/rev1_qmk/rev1_qmk.c
+++ b/keyboards/xelus/dawn60/rev1_qmk/rev1_qmk.c
@@ -23,7 +23,7 @@
#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] = {
/* Refer to IS31 manual for these locations
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/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/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 a8068eff89..0d0629408e 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_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/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..1ad867731e 100644
--- a/keyboards/zykrah/fuyu/keymaps/via/keymap.c
+++ b/keyboards/zykrah/fuyu/keymaps/via/keymap.c
@@ -106,7 +106,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 439613911a..ea5b366081 100644
--- a/layouts/default/readme.md
+++ b/layouts/default/readme.md
@@ -942,6 +942,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/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/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/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/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/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..f56236a8b8 100644
--- a/platforms/chibios/drivers/ws2812_spi.c
+++ b/platforms/chibios/drivers/ws2812_spi.c
@@ -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)
@@ -187,7 +187,7 @@ void ws2812_init(void) {
#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();
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/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/eeconfig.c b/quantum/eeconfig.c
index 84de025f0e..4579d67c28 100644
--- a/quantum/eeconfig.c
+++ b/quantum/eeconfig.c
@@ -49,8 +49,8 @@ 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);
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/painter/lvgl/qp_lvgl.c b/quantum/painter/lvgl/qp_lvgl.c
index 280aeaf91f..2e433d7761 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");
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/quantum.h b/quantum/quantum.h
index 4d183e755f..66e4569991 100644
--- a/quantum/quantum.h
+++ b/quantum/quantum.h
@@ -209,6 +209,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/rgb_matrix.h b/quantum/rgb_matrix/rgb_matrix.h
index 38040fb0cc..377f6658bb 100644
--- a/quantum/rgb_matrix/rgb_matrix.h
+++ b/quantum/rgb_matrix/rgb_matrix.h
@@ -24,7 +24,9 @@
#include "color.h"
#include "keyboard.h"
-#ifdef IS31FL3731
+#if defined(IS31FL3218)
+# include "is31fl3218.h"
+#elif defined(IS31FL3731)
# include "is31fl3731.h"
#elif defined(IS31FL3733)
# include "is31fl3733.h"
@@ -38,8 +40,8 @@
# include "is31flcommon.h"
#elif defined(CKLED2001)
# include "ckled2001.h"
-#elif defined(AW20216)
-# include "aw20216.h"
+#elif defined(AW20216S)
+# include "aw20216s.h"
#elif defined(WS2812)
# include "ws2812.h"
#endif
diff --git a/quantum/rgb_matrix/rgb_matrix_drivers.c b/quantum/rgb_matrix/rgb_matrix_drivers.c
index 695ecc78a4..a81edce180 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(IS31FL3218) || defined(IS31FL3731) || defined(IS31FL3733) || defined(IS31FL3736) || defined(IS31FL3737) || defined(IS31FL3741) || defined(IS31FLCOMMON) || defined(CKLED2001)
# 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(IS31FL3218)
+ is31fl3218_init();
+
+# elif defined(IS31FL3731)
is31fl3731_init(DRIVER_ADDR_1);
# if defined(DRIVER_ADDR_2)
is31fl3731_init(DRIVER_ADDR_2);
@@ -138,7 +141,9 @@ static void init(void) {
bool enabled = true;
// This only caches it for later
-# if defined(IS31FL3731)
+# if defined(IS31FL3218)
+ is31fl3218_set_led_control_register(index, enabled, enabled, enabled);
+# elif defined(IS31FL3731)
is31fl3731_set_led_control_register(index, enabled, enabled, enabled);
# elif defined(IS31FL3733)
is31fl3733_set_led_control_register(index, enabled, enabled, enabled);
@@ -156,7 +161,10 @@ static void init(void) {
}
// This actually updates the LED drivers
-# if defined(IS31FL3731)
+# if defined(IS31FL3218)
+ is31fl3218_update_led_control_registers();
+
+# elif defined(IS31FL3731)
is31fl3731_update_led_control_registers(DRIVER_ADDR_1, 0);
# if defined(DRIVER_ADDR_2)
is31fl3731_update_led_control_registers(DRIVER_ADDR_2, 1);
@@ -245,7 +253,19 @@ static void init(void) {
# endif
}
-# if defined(IS31FL3731)
+# if defined(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(IS31FL3731)
static void flush(void) {
is31fl3731_update_pwm_buffers(DRIVER_ADDR_1, 0);
# if defined(DRIVER_ADDR_2)
@@ -260,9 +280,9 @@ 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,
};
@@ -393,30 +413,30 @@ const rgb_matrix_driver_t rgb_matrix_driver = {
};
# endif
-#elif defined(AW20216)
+#elif defined(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)
@@ -426,8 +446,8 @@ const rgb_matrix_driver_t rgb_matrix_driver = {
# 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..70672ceb8f 100644
--- a/quantum/rgblight/rgblight.c
+++ b/quantum/rgblight/rgblight.c
@@ -115,7 +115,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 +144,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;
@@ -516,7 +516,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 +532,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 +576,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 +679,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);
}
@@ -717,7 +717,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 +786,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 +897,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
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 +931,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])];
}
@@ -1230,7 +1230,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 +1267,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 +1340,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 +1392,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 +1415,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 +1439,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,7 +1512,7 @@ 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);
}
diff --git a/quantum/rgblight/rgblight.h b/quantum/rgblight/rgblight.h
index 001058f962..450caf603e 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;
@@ -283,9 +283,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);
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/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/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/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/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,